]>
Commit | Line | Data |
---|---|---|
1 | #ifndef AliAODJet_H | |
2 | #define AliAODJet_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // AOD jet class | |
10 | // Author: Andreas Morsch, CERN | |
11 | //------------------------------------------------------------------------- | |
12 | ||
13 | #include <TLorentzVector.h> | |
14 | #include "AliVParticle.h" | |
15 | #include <TArrayI.h> | |
16 | #include "AliAODVertex.h" | |
17 | ||
18 | ||
19 | class AliAODJet : public AliVParticle { | |
20 | ||
21 | public: | |
22 | AliAODJet(); | |
23 | AliAODJet(Double_t px, Double_t py, Double_t pz, Double_t e); | |
24 | AliAODJet(TLorentzVector & p); | |
25 | virtual ~AliAODJet(); | |
26 | AliAODJet(const AliAODJet& jet); | |
27 | AliAODJet& operator=(const AliAODJet& jet); | |
28 | // AliVParticle methods | |
29 | virtual Double_t Px() const { return fMomentum->Px(); } | |
30 | virtual Double_t Py() const { return fMomentum->Py(); } | |
31 | virtual Double_t Pz() const { return fMomentum->Pz(); } | |
32 | virtual Double_t Pt() const { return fMomentum->Pt(); } | |
33 | virtual Double_t P() const { return fMomentum->P(); } | |
34 | virtual Double_t OneOverPt() const { return 1. / fMomentum->Pt(); } | |
35 | virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; } | |
36 | virtual Double_t Phi() const; | |
37 | virtual Double_t Theta() const { return fMomentum->Theta(); } | |
38 | virtual Double_t E() const { return fMomentum->E(); } | |
39 | virtual Double_t M() const { return fMomentum->M(); } | |
40 | virtual Double_t Eta() const { return fMomentum->Eta(); } | |
41 | virtual Double_t Y() const { return fMomentum->Rapidity();} | |
42 | virtual Double_t Xv() const {return -999.;} // put reasonable values here | |
43 | virtual Double_t Yv() const {return -999.;} // | |
44 | virtual Double_t Zv() const {return -999.;} // | |
45 | virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; } | |
46 | virtual Bool_t IsTriggeredEMCAL(){return (fTrigger&kEMCALTriggered)==kEMCALTriggered;} | |
47 | virtual Bool_t IsTriggeredTRD(){return (fTrigger&kTRDTriggered)==kTRDTriggered;} | |
48 | virtual UChar_t Trigger(){return fTrigger;} | |
49 | ||
50 | virtual void AddTrack(TObject *tr); | |
51 | ||
52 | TObject* GetTrack(Int_t i) {return fRefTracks->At(i);} | |
53 | virtual void SetBgEnergy(Double_t bgEnCh, Double_t bgEnNe) | |
54 | {fBackgEnergy[0] = bgEnCh; fBackgEnergy[1] = bgEnNe;} | |
55 | virtual void SetEffArea(Double_t effACh, Double_t effANe, Double_t effAErrCh = 0, Double_t effAErrNe = 0) | |
56 | { | |
57 | fEffectiveArea[0] = effACh; fEffectiveArea[1] = effANe; | |
58 | fEffectiveAreaError[0] = effAErrCh; | |
59 | fEffectiveAreaError[1] = effAErrNe; | |
60 | } | |
61 | virtual void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e); | |
62 | virtual void SetTrigger(UChar_t f){fTrigger |= f;} | |
63 | virtual void ResetTrigger(UChar_t f){fTrigger &= ~f;} | |
64 | ||
65 | virtual TRefArray* GetRefTracks() const { return fRefTracks;} | |
66 | virtual Double_t ChargedBgEnergy() const { return fBackgEnergy[0];} | |
67 | virtual Double_t NeutralBgEnergy() const { return fBackgEnergy[1];} | |
68 | virtual Double_t TotalBgEnergy() const { return (fBackgEnergy[0] + fBackgEnergy[1]);} | |
69 | ||
70 | virtual Double_t EffectiveAreaCharged() const { return fEffectiveArea[0];} | |
71 | virtual Double_t EffectiveAreaNeutral() const { return fEffectiveArea[1];} | |
72 | virtual void SetVectorAreaCharged(TLorentzVector *effVACh){ | |
73 | if(!fVectorAreaCharged)fVectorAreaCharged= new TLorentzVector(*effVACh); | |
74 | else *fVectorAreaCharged = *effVACh; | |
75 | } | |
76 | virtual TLorentzVector* VectorAreaCharged() const {return fVectorAreaCharged;} | |
77 | ||
78 | ||
79 | ||
80 | virtual Double_t ErrorEffectiveAreaCharged() const { return fEffectiveAreaError[0];} | |
81 | virtual Double_t ErrorEffectiveAreaNeutral() const { return fEffectiveAreaError[1];} | |
82 | virtual Double_t DeltaR(const AliVParticle* part); | |
83 | ||
84 | ||
85 | TLorentzVector* MomentumVector() const {return fMomentum;} | |
86 | virtual void Print(Option_t* /*option*/) const; | |
87 | ||
88 | // Dummy | |
89 | virtual Short_t Charge() const { return 0;} | |
90 | virtual const Double_t* PID() const { return NULL;} | |
91 | virtual Int_t GetLabel() const { return -1;} | |
92 | // Dummy | |
93 | virtual Int_t PdgCode() const {return 0;} | |
94 | ||
95 | // | |
96 | ||
97 | // first only one bit for EMCAL and TRD, leave space for more | |
98 | // trigger types and/or other detectors | |
99 | enum {kEMCALTriggered = 1<<0, | |
100 | kTRDTriggered = 4<<0}; | |
101 | ||
102 | ||
103 | private: | |
104 | Double32_t fBackgEnergy[2]; // Subtracted background energy | |
105 | Double32_t fEffectiveArea[2]; // Effective jet area used for background subtraction | |
106 | Double32_t fEffectiveAreaError[2]; //[0,1,10] relative error of jet areas, 10 bit precision | |
107 | Double32_t fNeutralFraction; //[0,1,12] Neutral fraction between 0 and 1 12 bit precision; | |
108 | UChar_t fTrigger; // Bit mask to flag jets triggered by a certain detector | |
109 | TLorentzVector* fMomentum; // Jet 4-momentum vector | |
110 | TLorentzVector* fVectorAreaCharged; // jet area four momentum | |
111 | TRefArray* fRefTracks; // array of references to the tracks belonging to the jet | |
112 | ||
113 | ClassDef(AliAODJet,7); | |
114 | ||
115 | }; | |
116 | ||
117 | inline Double_t AliAODJet::Phi() const | |
118 | { | |
119 | // Return phi | |
120 | Double_t phi = fMomentum->Phi(); | |
121 | if (phi < 0.) phi += 2. * TMath::Pi(); | |
122 | return phi; | |
123 | } | |
124 | ||
125 | #endif |