]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnMiniParticle.h
Adding macro to plot <Ncoll>
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniParticle.h
CommitLineData
03d23846 1#ifndef ALIRSNMINIPARTICLE_H
2#define ALIRSNMINIPARTICLE_H
3
4//
5// This object is used as lightweight temporary container
61f275d1 6// of all information needed from any input object and
03d23846 7// useful for resonance analysis.
61f275d1 8//
03d23846 9
10#include <TMath.h>
11#include <TObject.h>
12#include <TLorentzVector.h>
13
14class AliRsnDaughter;
15
16class AliRsnMiniParticle : public TObject {
17public:
18
31dbef4e 19 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;}
03d23846 20
61f275d1 21 Int_t &Index() {return fIndex;}
22 Char_t &Charge() {return fCharge;}
23 Float_t &PsimX() {return fPsim[0];}
24 Float_t &PsimY() {return fPsim[1];}
25 Float_t &PsimZ() {return fPsim[2];}
26 Float_t &PrecX() {return fPrec[0];}
27 Float_t &PrecY() {return fPrec[1];}
28 Float_t &PrecZ() {return fPrec[2];}
35b36c39 29 Float_t &PmotherX() {return fPmother[0];}
30 Float_t &PmotherY() {return fPmother[1];}
31 Float_t &PmotherZ() {return fPmother[2];}
61f275d1 32 Float_t &Px(Bool_t mc) {return (mc ? fPsim[0] : fPrec[0]);}
33 Float_t &Py(Bool_t mc) {return (mc ? fPsim[1] : fPrec[1]);}
34 Float_t &Pz(Bool_t mc) {return (mc ? fPsim[2] : fPrec[2]);}
35 Short_t &PDG() {return fPDG;}
03d23846 36 Short_t PDGAbs() {return TMath::Abs(fPDG);}
4fb0dfa3 37 Double_t Mass();
2036eec8 38 Int_t &Mother() {return fMother;}
61f275d1 39 Short_t &MotherPDG() {return fMotherPDG;}
31dbef4e 40 Bool_t &IsFromB() {return fIsFromB;}
41 Bool_t &IsQuarkFound() {return fIsQuarkFound;}
61f275d1 42 UShort_t &CutBits() {return fCutBits;}
213adb92 43 Double_t DCA() {return fDCA;}
088ca370 44 Short_t NTotSisters() {return fNTotSisters;}
03d23846 45 Bool_t HasCutBit(Int_t i) {UShort_t bit = 1 << i; return ((fCutBits & bit) != 0);}
46 void SetCutBit(Int_t i) {UShort_t bit = 1 << i; fCutBits |= bit;}
47 void ClearCutBit(Int_t i) {UShort_t bit = 1 << i; fCutBits &= (~bit);}
61f275d1 48
4fb0dfa3 49 void Set4Vector(TLorentzVector &v, Float_t mass=-1.0, Bool_t mc=kFALSE);
03d23846 50 void CopyDaughter(AliRsnDaughter *daughter);
51
52private:
53
17392566 54 Int_t fIndex; // ID of track in its event
03d23846 55 Char_t fCharge; // track charge *character*: '+', '-', '0' (whatever else = undefined)
56 Float_t fPsim[3]; // MC momentum of the track
57 Float_t fPrec[3]; // reconstructed momentum of the track
35b36c39 58 Float_t fPmother[3]; // MC momentum of the track's mother
03d23846 59 Short_t fPDG; // particle PDG code
2036eec8 60 Int_t fMother; // index of mother in its container
03d23846 61 Short_t fMotherPDG; // PDG code of mother
213adb92 62 Double_t fDCA; // DCA of the particle
088ca370 63 Short_t fNTotSisters; // number of daughters of the particle
31dbef4e 64 Bool_t fIsFromB; // is the particle from B meson flag
65 Bool_t fIsQuarkFound; // is the particle from a quark flag (used to reject or accept Hijing event)
03d23846 66 UShort_t fCutBits; // list of bits used to know what cuts were passed by this track
61f275d1 67
31dbef4e 68 ClassDef(AliRsnMiniParticle,6)
03d23846 69};
70
71#endif