AliPhysics  64f4410 (64f4410)
AliCaloTrackParticle.h
Go to the documentation of this file.
1 #ifndef ALICALOTRACKPARTICLE_H
2 #define ALICALOTRACKPARTICLE_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 //_________________________________________________________________________
23 //-------------------------------------------------------------------------
24 
25 //-- ROOT system --
26 #include <TLorentzVector.h>
27 class TString;
28 
29 //-- Analysis system
30 #include "AliVParticle.h"
31 
32 class AliCaloTrackParticle : public AliVParticle {
33 
34  public:
35 
38  AliCaloTrackParticle(TLorentzVector & p);
39 
40  virtual ~AliCaloTrackParticle();
41  virtual void Clear(const Option_t* /*opt*/);
42 
45 
46  // Main methods to recover kinematics or PID
47  TLorentzVector * GetMomentum() const { return fMomentum ; }
48  virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; }
49 
50  Bool_t IsPIDOK(Int_t ipid, Int_t pdgwanted) const;
51  Double_t GetPairMass(AliCaloTrackParticle * p) const { return (*(p->fMomentum)+*fMomentum).M() ; }
52 
53  // AliVParticle methods
54  virtual Double_t Px() const { return fMomentum->Px(); }
55  virtual Double_t Py() const { return fMomentum->Py(); }
56  virtual Double_t Pz() const { return fMomentum->Pz(); }
57  virtual Double_t Pt() const { return fMomentum->Pt(); }
58  virtual Double_t P() const { return fMomentum->P(); }
59  virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
60  virtual Double_t OneOverPt() const { return 1. / fMomentum->Pt(); }
61  virtual Double_t Phi() const;
62  virtual Double_t Theta() const { return fMomentum->Theta(); }
63  virtual Double_t E() const { return fMomentum->E(); }
64  virtual Double_t M() const { return fMomentum->M(); }
65  virtual Double_t Eta() const { return fMomentum->Eta(); }
66  virtual Double_t Y() const { return fMomentum->Rapidity();}
67  virtual Double_t Xv() const { return -999.;} // put reasonable values here
68  virtual Double_t Yv() const { return -999.;} //
69  virtual Double_t Zv() const { return -999.;} //
70  virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
71  virtual void Print(Option_t* /*option*/) const;
72 
73  //
74  //Dummy
75  virtual Short_t Charge() const { return 0 ; }
76  virtual const Double_t* PID() const { return NULL ; }
77  Int_t PdgCode() const { return 0 ; }
78  //
79 
80  //
81  // Specific getters
82  virtual Int_t GetIdentifiedParticleType() const { return fPdg ; }
83 
84  virtual Int_t GetLabel() const { return fLabel ; }
85  virtual Int_t GetCaloLabel (Int_t i) const { return fCaloLabel[i] ; }
86  virtual Int_t GetTrackLabel(Int_t i) const { return fTrackLabel[i]; }
87  virtual UInt_t GetDetectorTag() const { return fDetectorTag ; }
88  virtual Bool_t GetDispBit() const { return fDisp ; }
89  virtual Bool_t GetTOFBit() const { return fTof ; }
90  virtual Bool_t GetChargedBit() const { return fCharged ; }
91  virtual Int_t DistToBad() const { return fBadDist ; }
92  virtual Int_t GetInputFileIndex() const { return fInputFileIndex ; }
93  virtual Int_t GetFiducialArea() const { return fFidArea ; }
94 
95  // Tags
96  virtual Int_t GetTag() const { return fTag ; }
97  virtual Bool_t IsTagged() const { return fTagged ; }
98  virtual Int_t DecayTag() const { return fDecayTag ; }
99  virtual Bool_t IsIsolated() const { return fIsolated ; }
100  virtual Bool_t IsLeadingParticle() const { return fLeadingParticle ; }
101 
102  // Calorimeter specific param
103  virtual Int_t GetNLM() const { return fNLM ; }
104  virtual Float_t GetM02() const { return fM02 ; }
105  virtual Float_t GetM20() const { return fM20 ; }
106  virtual Float_t GetTime() const { return fTime ; }
107  virtual Int_t GetNCells() const { return fNCells ; }
108  virtual Int_t GetSModNumber() const { return fSuperModule ; }
109 
110  // Isolation cone background info
111  virtual Float_t GetChargedLeadPtInCone() const { return fIsoConePtLead[0] ; }
112  virtual Float_t GetNeutralLeadPtInCone() const { return fIsoConePtLead[1] ; }
113 
114  virtual Float_t GetChargedPtSumInCone () const { return fIsoConeSumPt[0] ; }
115  virtual Float_t GetNeutralPtSumInCone () const { return fIsoConeSumPt[1] ; }
116 
117  //
118  // Specific setters
120 
121  virtual void SetLabel(Int_t l) { fLabel = l ; }
122  virtual void SetCaloLabel (Int_t a, Int_t b) { fCaloLabel [0] = a; fCaloLabel [1] = b ; }
123  virtual void SetTrackLabel(Int_t a, Int_t b) { fTrackLabel[0] = a; fTrackLabel[1] = b ; }
124  virtual void SetTrackLabel(Int_t a, Int_t b, Int_t c, Int_t d)
125  { fTrackLabel[0] = a; fTrackLabel[1] = b ; fTrackLabel[2] = c; fTrackLabel[3] = d; }
126 
127  virtual void SetDetectorTag(UInt_t d) { fDetectorTag = d ; }
128  virtual void SetDispBit(Bool_t disp) { fDisp = disp ; }
129  virtual void SetTOFBit(Bool_t tof) { fTof = tof ; }
130  virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; }
131  virtual void SetDistToBad(Int_t dist) { fBadDist = dist ; }
132  virtual void SetInputFileIndex(Int_t i){ fInputFileIndex = i ; }
133  virtual void SetFiducialArea(Int_t a) { fFidArea = a ; }
134 
135  // Tags
136  virtual void SetTag(Int_t tag) { fTag = tag ; }
137  virtual void SetTagged(Bool_t tag) { fTagged = tag ; }
138  virtual void SetDecayTag(Int_t tag) { fDecayTag = tag ; }
139  virtual void SetIsolated(Bool_t iso) { fIsolated = iso ; }
140  virtual void SetLeadingParticle(Bool_t l) { fLeadingParticle = l ; }
141 
142  // Calorimeter specific param
143  virtual void SetNLM (Int_t nlm) { fNLM = nlm ; }
144  virtual void SetM02 (Float_t m02) { fM02 = m02 ; }
145  virtual void SetM20 (Float_t m20) { fM20 = m20 ; }
146  virtual void SetTime (Float_t tim) { fTime = tim ; }
147  virtual void SetNCells(Int_t nce) { fNCells = nce ; }
148  virtual void SetSModNumber(Int_t sm) { fSuperModule = sm ; }
149 
150  // Isolation cone background info
151  virtual void SetChargedLeadPtInCone(Float_t ptl) { fIsoConePtLead[0] = ptl ; }
152  virtual void SetNeutralLeadPtInCone(Float_t ptl) { fIsoConePtLead[1] = ptl ; }
153 
154  virtual void SetChargedPtSumInCone (Float_t pts) { fIsoConeSumPt[0] = pts ; }
155  virtual void SetNeutralPtSumInCone (Float_t pts) { fIsoConeSumPt[1] = pts ; }
156 
157  //
161 
162  virtual void SetBtag(Int_t tag) { fBtag = tag ; }
163  virtual Int_t GetBtag() const { return fBtag ; }
164 
166  void SetBTagBit(Int_t &tag, UInt_t set) const { tag |= (1<<set) ; }
167 
170  {
171  if (tag & (1<<test) ) return kTRUE ;
172  else return kFALSE ;
173  }
174 
175  private:
176 
177  TLorentzVector* fMomentum;
184 
185  // Calo specific
193 
194  // Tags
198 
201 
202  // PID bits
206 
207  // Not in use currently ...
212 
214  ClassDef(AliCaloTrackParticle, 1);
216 
217 };
218 
223 {
224  Double_t phi = fMomentum->Phi();
225  if (phi < 0.) phi += TMath::TwoPi();
226  return phi;
227 }
228 
229 #endif //ALICALOTRACKPARTICLE_H
virtual Int_t GetBtag() const
Bool_t fCharged
Charged bit.
virtual Double_t M() const
virtual Int_t GetSModNumber() const
virtual void SetTOFBit(Bool_t tof)
Int_t pdg
virtual Double_t Eta() const
virtual void SetNLM(Int_t nlm)
virtual Double_t Pt() const
virtual Double_t Zv() const
virtual Double_t Pz() const
double Double_t
Definition: External.C:58
UInt_t fDetectorTag
Detector where particle was measured, integer.
virtual void SetChargedLeadPtInCone(Float_t ptl)
virtual Bool_t IsTagged() const
virtual Int_t GetLabel() const
Int_t fPdg
type of identified particle, same code as PDG, but this is not a MonteCarlo particle ...
Int_t fInputFileIndex
0, standard input, 1 first input added. Only possible one for now, not really used.
virtual void SetNCells(Int_t nce)
virtual Float_t GetM20() const
Double_t GetPairMass(AliCaloTrackParticle *p) const
Int_t fBadDist
Distance to calorimeter bad cell in cell units.
virtual Int_t GetTrackLabel(Int_t i) const
virtual void SetFiducialArea(Int_t a)
TCanvas * c
Definition: TestFitELoss.C:172
virtual Int_t GetNCells() const
virtual void SetDetectorTag(UInt_t d)
virtual Int_t GetNLM() const
virtual Bool_t IsIsolated() const
Bool_t IsPIDOK(Int_t ipid, Int_t pdgwanted) const
virtual void SetTime(Float_t tim)
virtual Double_t OneOverPt() const
virtual UInt_t GetDetectorTag() const
virtual void SetIdentifiedParticleType(Int_t pdg)
virtual Short_t Charge() const
virtual void SetLeadingParticle(Bool_t l)
virtual Double_t E() const
virtual Bool_t GetDispBit() const
virtual Double_t Xv() const
Float_t fIsoConePtLead[2]
Pt of track [0] and calo cluster [1] with highest energy in the isolation cone.
Int_t fFidArea
Type of fiducial area hit by this photon.
virtual void SetInputFileIndex(Int_t i)
virtual Bool_t GetChargedBit() const
virtual Bool_t IsLeadingParticle() const
int Int_t
Definition: External.C:63
virtual void Print(Option_t *) const
Container for input particle information on CaloTrackCorr package.
Bool_t fDisp
Dispersion bit.
virtual void SetTrackLabel(Int_t a, Int_t b, Int_t c, Int_t d)
unsigned int UInt_t
Definition: External.C:33
Int_t fCaloLabel[2]
CaloCluster index, 1 for photons, 2 for pi0.
float Float_t
Definition: External.C:68
virtual Double_t Py() const
virtual void SetNeutralPtSumInCone(Float_t pts)
Bool_t fLeadingParticle
Particle is leading or not.
AliCaloTrackParticle & operator=(const AliCaloTrackParticle &photon)
virtual void SetTrackLabel(Int_t a, Int_t b)
virtual Float_t GetNeutralPtSumInCone() const
virtual Double_t Y() const
Int_t fNCells
Store the number of cells in calorimeter cluster.
virtual Bool_t XvYvZv(Double_t x[3]) const
Bool_t CheckBTagBit(Int_t tag, UInt_t test) const
Check if in fBtag the bit test (btagTypes) is set (not in use).
TLorentzVector * GetMomentum() const
virtual Int_t DistToBad() const
Int_t fBtag
tag particle from B.
virtual void Clear(const Option_t *)
virtual void SetIsolated(Bool_t iso)
virtual Float_t GetTime() const
Int_t fDecayTag
Tag the photon as decay from, pi0, eta, pi0 side band, eta side band.
virtual void SetM02(Float_t m02)
virtual Double_t Yv() const
virtual void SetDecayTag(Int_t tag)
virtual void SetChargedBit(Bool_t ch)
Float_t fM20
Store the second axis of the calorimeter shower shape.
Int_t fTrackLabel[4]
Track lable, 1 for pions, 2 for conversion photons.
virtual Int_t GetInputFileIndex() const
virtual void SetLabel(Int_t l)
virtual void SetTag(Int_t tag)
virtual void SetSModNumber(Int_t sm)
short Short_t
Definition: External.C:23
Float_t fM02
Store the main axis of the calorimeter shower shape.
virtual Double_t Px() const
virtual void SetCaloLabel(Int_t a, Int_t b)
virtual Float_t GetChargedLeadPtInCone() const
virtual Double_t Theta() const
virtual void SetTagged(Bool_t tag)
UInt_t fNLM
Store the number of local maxima in calorimeter cluster.
Bool_t fTagged
If photon tagged (pi0 decay), not used anymore, replace by fDecayTag.
Bool_t fIsolated
Particle is isolated or not.
virtual Bool_t GetTOFBit() const
virtual Int_t DecayTag() const
virtual Float_t GetNeutralLeadPtInCone() const
virtual Bool_t PxPyPz(Double_t p[3]) const
virtual Double_t Phi() const
void SetBTagBit(Int_t &tag, UInt_t set) const
Set bit of type set (btagTypes) in tag.
Int_t fTag
tag of particle (decay, fragment, prompt photon), MC
TLorentzVector * fMomentum
Photon 4-momentum vector.
virtual void SetDispBit(Bool_t disp)
const char Option_t
Definition: External.C:48
void test(int runnumber=195345)
virtual void SetBtag(Int_t tag)
virtual Float_t GetM02() const
virtual void SetM20(Float_t m20)
bool Bool_t
Definition: External.C:53
Float_t fIsoConeSumPt[2]
Sum of Pt of tracks [0] and calo clusters [1] in the isolation cone.
virtual Float_t GetChargedPtSumInCone() const
virtual Int_t GetTag() const
virtual Int_t GetFiducialArea() const
Int_t fSuperModule
Store the super-module number of calorimeter cluster.
virtual void SetDistToBad(Int_t dist)
virtual Int_t GetIdentifiedParticleType() const
virtual Int_t GetCaloLabel(Int_t i) const
virtual void SetChargedPtSumInCone(Float_t pts)
virtual Double_t P() const
virtual void SetMomentum(TLorentzVector *lv)
virtual void SetNeutralLeadPtInCone(Float_t ptl)
virtual const Double_t * PID() const
Float_t fTime
Store the time of calorimeter cluster or track, nano seconds.