#ifndef ALIRSNMINIPARTICLE_H
#define ALIRSNMINIPARTICLE_H
#include <TMath.h>
#include <TObject.h>
#include <TLorentzVector.h>
class AliRsnDaughter;
class AliRsnMiniParticle : public TObject {
public:
AliRsnMiniParticle() : fIndex(-1), fCharge(0), fPDG(0), fMother(0), fMotherPDG(0), fDCA(0), fNTotSisters(0), fIsFromB(kFALSE), fIsQuarkFound(kFALSE), fCutBits(0x0) {Int_t i = 3; while (i--) fPsim[i] = fPrec[i] = fPmother[i] = 0.0;}
Int_t &Index() {return fIndex;}
Char_t &Charge() {return fCharge;}
Float_t &PsimX() {return fPsim[0];}
Float_t &PsimY() {return fPsim[1];}
Float_t &PsimZ() {return fPsim[2];}
Float_t &PrecX() {return fPrec[0];}
Float_t &PrecY() {return fPrec[1];}
Float_t &PrecZ() {return fPrec[2];}
Float_t &PmotherX() {return fPmother[0];}
Float_t &PmotherY() {return fPmother[1];}
Float_t &PmotherZ() {return fPmother[2];}
Float_t &Px(Bool_t mc) {return (mc ? fPsim[0] : fPrec[0]);}
Float_t &Py(Bool_t mc) {return (mc ? fPsim[1] : fPrec[1]);}
Float_t &Pz(Bool_t mc) {return (mc ? fPsim[2] : fPrec[2]);}
Short_t &PDG() {return fPDG;}
Short_t PDGAbs() {return TMath::Abs(fPDG);}
Double_t Mass();
Int_t &Mother() {return fMother;}
Short_t &MotherPDG() {return fMotherPDG;}
Bool_t &IsFromB() {return fIsFromB;}
Bool_t &IsQuarkFound() {return fIsQuarkFound;}
UShort_t &CutBits() {return fCutBits;}
Double_t DCA() {return fDCA;}
Short_t NTotSisters() {return fNTotSisters;}
Bool_t HasCutBit(Int_t i) {UShort_t bit = 1 << i; return ((fCutBits & bit) != 0);}
void SetCutBit(Int_t i) {UShort_t bit = 1 << i; fCutBits |= bit;}
void ClearCutBit(Int_t i) {UShort_t bit = 1 << i; fCutBits &= (~bit);}
void Set4Vector(TLorentzVector &v, Float_t mass=-1.0, Bool_t mc=kFALSE);
void CopyDaughter(AliRsnDaughter *daughter);
private:
Int_t fIndex;
Char_t fCharge;
Float_t fPsim[3];
Float_t fPrec[3];
Float_t fPmother[3];
Short_t fPDG;
Int_t fMother;
Short_t fMotherPDG;
Double_t fDCA;
Short_t fNTotSisters;
Bool_t fIsFromB;
Bool_t fIsQuarkFound;
UShort_t fCutBits;
ClassDef(AliRsnMiniParticle,6)
};
#endif