]>
Commit | Line | Data |
---|---|---|
b2c10007 | 1 | #ifndef ALIANALYSISETTRACKMATCHCORRECTIONS_H |
2 | #define ALIANALYSISETTRACKMATCHCORRECTIONS_H | |
3 | ||
4 | ||
5 | #include "TNamed.h" | |
6 | #include "TF1.h" | |
6a152780 | 7 | #include "TH2F.h" |
b2c10007 | 8 | |
9 | class AliAnalysisEtTrackMatchCorrections : public TNamed | |
10 | { | |
11 | ||
12 | public: | |
13 | ||
14 | //! Default constructor | |
15 | AliAnalysisEtTrackMatchCorrections(); | |
16 | ||
17 | //! Constructor | |
6a152780 | 18 | AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr, const TH2F &recoEff, Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary); |
b2c10007 | 19 | |
20 | //! Copy constructor | |
21 | AliAnalysisEtTrackMatchCorrections(const AliAnalysisEtTrackMatchCorrections &obj); | |
22 | ||
23 | //! Destructor | |
24 | virtual ~AliAnalysisEtTrackMatchCorrections(); | |
25 | ||
26 | //! Assignment operator | |
27 | AliAnalysisEtTrackMatchCorrections& operator=(const AliAnalysisEtTrackMatchCorrections& other); | |
28 | ||
29 | // Getters | |
30 | ||
31 | TF1 ChargedContr() const { | |
02c62614 | 32 | return *fChargedContr; |
b2c10007 | 33 | } |
34 | ||
35 | TF1 NeutralContr() const { | |
02c62614 | 36 | return *fNeutralContr; |
b2c10007 | 37 | } |
38 | ||
39 | TF1 GammaContr() const { | |
02c62614 | 40 | return *fGammaContr; |
b2c10007 | 41 | } |
42 | ||
43 | TF1 SecondaryContr() const { | |
02c62614 | 44 | return *fSecondaryContr; |
b2c10007 | 45 | } |
6a152780 | 46 | |
43dd5a38 | 47 | TH2F *TrackMatchingEfficiency() const { |
48 | return fRecoEff; | |
6a152780 | 49 | } |
b2c10007 | 50 | |
51 | Double_t ChargedContr(int mult) const { | |
02c62614 | 52 | return fChargedContr->Eval(mult)*fMeanCharged; |
b2c10007 | 53 | } |
54 | ||
55 | Double_t NeutralContr(int mult) const { | |
02c62614 | 56 | return fNeutralContr->Eval(mult)*fMeanNeutral; |
b2c10007 | 57 | } |
58 | ||
59 | Double_t GammaContr(int mult) const { | |
02c62614 | 60 | return -fGammaContr->Eval(mult)*fMeanGamma; |
b2c10007 | 61 | } |
62 | ||
63 | Double_t SecondaryContr(int mult) const { | |
02c62614 | 64 | return fSecondaryContr->Eval(mult)*fMeanSecondary; |
b2c10007 | 65 | } |
66 | ||
31c813d5 | 67 | Double_t TrackMatchingEfficiency(Float_t pT, Int_t cent) const; |
6a152780 | 68 | |
b2c10007 | 69 | |
70 | // Setters | |
71 | ||
02c62614 | 72 | void SetChargedcontr(const TF1 &chargedContr) { |
73 | *fChargedContr = chargedContr; | |
b2c10007 | 74 | } |
75 | ||
02c62614 | 76 | void SetNeutralcontr(const TF1 &neutralContr) { |
77 | *fNeutralContr = neutralContr; | |
b2c10007 | 78 | } |
79 | ||
02c62614 | 80 | void SetGammacontr(const TF1 &gammaContr) { |
81 | *fGammaContr = gammaContr; | |
b2c10007 | 82 | } |
83 | ||
02c62614 | 84 | void SetSecondarycontr(const TF1 &secondaryContr) { |
85 | *fSecondaryContr = secondaryContr; | |
b2c10007 | 86 | } |
87 | ||
6a152780 | 88 | void SetReconstructionEfficiency(const TH2F &recoEff) { |
89 | *fRecoEff = recoEff; | |
90 | } | |
91 | ||
f380d866 | 92 | void SetMinEtCorrection(Int_t cb, Double_t val){fMinEtCorrection[cb] = val;} |
13ae94ec | 93 | void SetNeutronCorrection(Int_t cb, Double_t val){fNeutronCorrection[cb] = val;} |
94 | void SetHadronCorrection(Int_t cb, Double_t val){fHadronCorrection[cb] = val;} | |
95 | void SetKaonCorrection(Int_t cb, Double_t val){fKaonCorrection[cb] = val;} | |
96 | void SetSecondaryCorrection(Int_t cb, Double_t val){fSecondaryCorrection[cb] = val;} | |
97 | ||
f380d866 | 98 | Double_t GetMinEtCorrection(Int_t cb){if(cb>=0 && cb <20){return fMinEtCorrection[cb];}else{return 0.0;}} |
13ae94ec | 99 | Double_t GetNeutronCorrection(Int_t cb){if(cb>=0 && cb <20){return fNeutronCorrection[cb];}else{return 0.0;}} |
100 | Double_t GetHadronCorrection(Int_t cb){if(cb>=0 && cb <20){return fHadronCorrection[cb];}else{return 0.0;}} | |
101 | Double_t GetKaonCorrection(Int_t cb){if(cb>=0 && cb <20){return fKaonCorrection[cb];}else{return 0.0;}} | |
102 | Double_t GetSecondaryCorrection(Int_t cb){if(cb>=0 && cb <20){return fSecondaryCorrection[cb];}else{return 0.0;}} | |
b2c10007 | 103 | |
104 | private: | |
105 | ||
106 | // ChargedContr | |
ad75e4df | 107 | TF1 *fChargedContr; |
b2c10007 | 108 | // NeutralContr |
ad75e4df | 109 | TF1 *fNeutralContr; |
b2c10007 | 110 | // GammaContr |
ad75e4df | 111 | TF1 *fGammaContr; |
b2c10007 | 112 | // SecondaryContr |
ad75e4df | 113 | TF1 *fSecondaryContr; |
6a152780 | 114 | |
ad75e4df | 115 | TH2F *fRecoEff;//Reconstruction efficiency, x axis = pT, y axis = multiplicity, z = efficiency |
b2c10007 | 116 | |
117 | // Mean deposited energy from charged particles | |
118 | Double_t fMeanCharged; | |
119 | // Mean deposited energy from neutral particles | |
120 | Double_t fMeanNeutral; | |
121 | // Mean deposited energy from gammas | |
122 | Double_t fMeanGamma; | |
123 | // Mean deposited energy from secondaries | |
124 | Double_t fMeanSecondary; | |
125 | ||
f380d866 | 126 | Double_t fMinEtCorrection[20];//NeutronCorrection |
13ae94ec | 127 | Double_t fNeutronCorrection[20];//NeutronCorrection |
128 | Double_t fHadronCorrection[20];//NeutronCorrection | |
129 | Double_t fKaonCorrection[20];//NeutronCorrection | |
130 | Double_t fSecondaryCorrection[20];//NeutronCorrection | |
131 | ||
b2c10007 | 132 | // Prohibited |
133 | //! Equality operator | |
134 | bool operator==(const AliAnalysisEtTrackMatchCorrections &other) const; | |
02c62614 | 135 | ClassDef(AliAnalysisEtTrackMatchCorrections, 2); |
b2c10007 | 136 | }; |
137 | ||
138 | #endif //ALIANALYSISETTRACKMATCHCORRECTIONS_H | |
139 |