]>
Commit | Line | Data |
---|---|---|
7fac8669 | 1 | #ifndef ALIANALYSISTASKEVENTMIXINGBF_CXX |
2 | #define ALIANALYSISTASKEVENTMIXINGBF_CXX | |
3 | ||
4 | // Analysis task for the EventMixingBF code | |
5 | // Authors: Panos Cristakoglou@cern.ch, m.weber@cern.ch | |
6 | ||
7 | class TList; | |
8 | class TH1F; | |
9 | class TH2F; | |
10 | class TF1; | |
11 | ||
12 | class AliMixInputEventHandler; | |
13 | class AliBalanceEventMixing; | |
14 | class AliESDtrackCuts; | |
15 | ||
16 | #include "AliAnalysisTaskSE.h" | |
17 | #include "AliBalanceEventMixing.h" | |
18 | ||
19 | #include "AliPID.h" | |
20 | #include "AliPIDResponse.h" | |
21 | #include "AliPIDCombined.h" | |
22 | ||
23 | ||
24 | class AliAnalysisTaskEventMixingBF : public AliAnalysisTaskSE { | |
25 | public: | |
26 | AliAnalysisTaskEventMixingBF(const char *name = "AliAnalysisTaskEventMixingBF"); | |
27 | virtual ~AliAnalysisTaskEventMixingBF(); | |
28 | ||
29 | ||
30 | virtual void UserCreateOutputObjects(); | |
31 | virtual void UserExec(Option_t *option); | |
32 | virtual void UserExecMix(Option_t*); | |
33 | virtual void FinishTaskOutput(); | |
34 | virtual void Terminate(Option_t *); | |
35 | ||
36 | void SetAnalysisObject(AliBalanceEventMixing *const analysis) { | |
37 | fBalance = analysis; | |
38 | } | |
39 | void SetShufflingObject(AliBalanceEventMixing *const analysisShuffled) { | |
40 | fRunShuffling = kTRUE; | |
41 | fShuffledBalance = analysisShuffled; | |
42 | } | |
43 | void SetAnalysisCutObject(AliESDtrackCuts *const trackCuts) { | |
44 | fESDtrackCuts = trackCuts;} | |
45 | void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) { | |
46 | fVxMax = vx; | |
47 | fVyMax = vy; | |
48 | fVzMax = vz; | |
49 | } | |
50 | ||
51 | //==============AOD analysis==============// | |
52 | void SetAODtrackCutBit(Int_t bit){ | |
53 | nAODtrackCutBit = bit; | |
54 | } | |
55 | ||
56 | void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){ | |
57 | fPtMin = ptmin; fPtMax = ptmax; | |
58 | fEtaMin = etamin; fEtaMax = etamax; | |
59 | ||
60 | } | |
61 | ||
62 | void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){ | |
63 | fDCAxyCut = DCAxy; | |
64 | fDCAzCut = DCAz; | |
65 | } | |
66 | ||
67 | void SetExtraTPCCutsAOD(Double_t maxTPCchi2, Int_t minNClustersTPC){ | |
68 | fTPCchi2Cut = maxTPCchi2; | |
69 | fNClustersTPCCut = minNClustersTPC; | |
70 | } | |
71 | ||
72 | //==============MC analysis==============// | |
73 | void SetKinematicsCutsMC(Double_t ptmin, Double_t ptmax, | |
74 | Double_t etamin, Double_t etamax){ | |
75 | fPtMin = ptmin; fPtMax = ptmax; | |
76 | fEtaMin = etamin; fEtaMax = etamax; | |
77 | } | |
78 | void UseFlowAfterBurner(TF1 *gDifferentialV2) { | |
79 | fDifferentialV2 = gDifferentialV2; | |
80 | fUseFlowAfterBurner = kTRUE; | |
81 | } | |
82 | void ExcludeResonancesInMC() {fExcludeResonancesInMC = kTRUE;} | |
83 | ||
84 | void SetPDGCode(Int_t gPdgCode) { | |
85 | fUseMCPdgCode = kTRUE; | |
86 | fPDGCodeToBeAnalyzed = gPdgCode; | |
87 | } | |
88 | ||
89 | //Centrality | |
90 | void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;} | |
91 | const char* GetCentralityEstimator(void) const {return fCentralityEstimator;} | |
92 | void SetCentralityPercentileRange(Double_t min, Double_t max) { | |
93 | fUseCentrality = kTRUE; | |
94 | fCentralityPercentileMin=min; | |
95 | fCentralityPercentileMax=max; | |
96 | } | |
97 | void SetImpactParameterRange(Double_t min, Double_t max) { | |
98 | fUseCentrality = kTRUE; | |
99 | fImpactParameterMin=min; | |
100 | fImpactParameterMax=max; | |
101 | } | |
102 | ||
103 | //multiplicity | |
104 | void SetMultiplicityRange(Int_t min, Int_t max) { | |
105 | fUseMultiplicity = kTRUE; | |
106 | fNumberOfAcceptedTracksMin = min; | |
107 | fNumberOfAcceptedTracksMax = max;} | |
108 | ||
109 | void UseOfflineTrigger() {fUseOfflineTrigger = kTRUE;} | |
110 | ||
111 | //Acceptance filter | |
112 | void SetAcceptanceParameterization(TF1 *parameterization) { | |
113 | fAcceptanceParameterization = parameterization;} | |
114 | ||
115 | //pid | |
116 | enum kDetectorUsedForPID { kTPCpid, kTOFpid, kTPCTOF }; // default TPC & TOF pid (via GetTPCpid & GetTOFpid) | |
117 | enum kParticleOfInterest { kMuon, kElectron, kPion, kKaon, kProton }; | |
118 | ||
119 | void SetUseBayesianPID(Double_t gMinProbabilityValue) { | |
120 | fUsePID = kTRUE; fUsePIDnSigma = kFALSE; fUsePIDPropabilities = kTRUE; | |
121 | fMinAcceptedPIDProbability = gMinProbabilityValue; } | |
122 | ||
123 | void SetUseNSigmaPID(Double_t gMaxNSigma) { | |
124 | fUsePID = kTRUE; fUsePIDPropabilities = kFALSE; fUsePIDnSigma = kTRUE; | |
125 | fPIDNSigma = gMaxNSigma; } | |
126 | ||
127 | void SetParticleOfInterest(kParticleOfInterest poi) { | |
128 | fParticleOfInterest = poi;} | |
129 | void SetDetectorUsedForPID(kDetectorUsedForPID detConfig) { | |
130 | fPidDetectorConfig = detConfig;} | |
131 | ||
132 | private: | |
133 | AliBalanceEventMixing *fBalance; //EventMixingBF object | |
134 | Bool_t fRunShuffling;//run shuffling or not | |
135 | AliBalanceEventMixing *fShuffledBalance; //EventMixingBF object (shuffled) | |
136 | TList *fList; //fList object | |
137 | TList *fListEventMixingBF; //fList object | |
138 | TList *fListEventMixingBFS; //fList object | |
139 | TList *fHistListPIDQA; //! list of histograms | |
140 | ||
141 | TH1F *fHistEventStats; //event stats | |
142 | TH2F *fHistCentStats; //centrality stats | |
143 | TH1F *fHistTriggerStats; //trigger stats | |
144 | TH1F *fHistTrackStats; //Track filter bit stats | |
145 | TH1F *fHistVx; //x coordinate of the primary vertex | |
146 | TH1F *fHistVy; //y coordinate of the primary vertex | |
147 | TH1F *fHistVz; //z coordinate of the primary vertex | |
148 | ||
149 | TH2F *fHistClus;//number of clusters (QA histogram) | |
150 | TH2F *fHistDCA;//DCA (QA histogram) | |
151 | TH1F *fHistChi2;//track chi2 (QA histogram) | |
152 | TH1F *fHistPt;//transverse momentum (QA histogram) | |
153 | TH1F *fHistEta;//pseudorapidity (QA histogram) | |
154 | TH1F *fHistPhi;//phi (QA histogram) | |
155 | TH1F *fHistPhiBefore;//phi before v2 afterburner (QA histogram) | |
156 | TH1F *fHistPhiAfter;//phi after v2 afterburner (QA histogram) | |
157 | TH2F *fHistV0M;//V0 multiplicities (QA histogram) | |
158 | TH2F *fHistRefTracks;//reference track multiplicities (QA histogram) | |
159 | ||
160 | //============PID============// | |
161 | TH2D *fHistdEdxVsPTPCbeforePID;//TPC dEdx vs momentum before PID cuts (QA histogram) | |
162 | TH2D *fHistBetavsPTOFbeforePID;//beta vs momentum before PID cuts (QA histogram) | |
163 | TH2D *fHistProbTPCvsPtbeforePID; //TPC probability vs pT before PID cuts (QA histogram) | |
164 | TH2D *fHistProbTOFvsPtbeforePID;//TOF probability vs pT before PID cuts (QA histogram) | |
165 | TH2D *fHistProbTPCTOFvsPtbeforePID;//TOF/TPC probability vs pT before PID cuts (QA histogram) | |
166 | TH2D *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram) | |
167 | TH2D *fHistNSigmaTOFvsPtbeforePID;//TOF nsigma vs pT before PID cuts (QA histogram) | |
168 | TH2D *fHistdEdxVsPTPCafterPID;//TPC dEdx vs momentum after PID cuts (QA histogram) | |
169 | TH2D *fHistBetavsPTOFafterPID;//beta vs momentum after PID cuts (QA histogram) | |
170 | TH2D *fHistProbTPCvsPtafterPID; //TPC probability vs pT after PID cuts (QA histogram) | |
171 | TH2D *fHistProbTOFvsPtafterPID;//TOF probability vs pT after PID cuts (QA histogram) | |
172 | TH2D *fHistProbTPCTOFvsPtafterPID;//TOF/TPC probability vs pT after PID cuts (QA histogram) | |
173 | TH2D *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram) | |
174 | TH2D *fHistNSigmaTOFvsPtafterPID;//TOF nsigma vs pT after PID cuts (QA histogram) | |
175 | ||
176 | AliPIDResponse *fPIDResponse; //! PID response object | |
177 | AliPIDCombined *fPIDCombined; //! combined PID object | |
178 | ||
179 | kParticleOfInterest fParticleOfInterest;//analyzed particle | |
180 | kDetectorUsedForPID fPidDetectorConfig;//used detector for PID | |
181 | ||
182 | Bool_t fUsePID; //flag to use PID | |
183 | Bool_t fUsePIDnSigma;//flag to use nsigma method for PID | |
184 | Bool_t fUsePIDPropabilities;//flag to use probability method for PID | |
185 | Double_t fPIDNSigma;//nsigma cut for PID | |
186 | Double_t fMinAcceptedPIDProbability;//probability cut for PID | |
187 | //============PID============// | |
188 | ||
189 | AliESDtrackCuts *fESDtrackCuts; //ESD track cuts | |
190 | ||
191 | TString fCentralityEstimator; //"V0M","TRK","TKL","ZDC","FMD" | |
192 | Bool_t fUseCentrality;//use the centrality (PbPb) or not (pp) | |
193 | Double_t fCentralityPercentileMin;//centrality percentile min | |
194 | Double_t fCentralityPercentileMax;//centrality percentile max | |
195 | Double_t fImpactParameterMin;//impact parameter min (used for MC) | |
196 | Double_t fImpactParameterMax;//impact parameter max (used for MC) | |
197 | ||
198 | Bool_t fUseMultiplicity;//use the multiplicity cuts | |
199 | Int_t fNumberOfAcceptedTracksMin;//min. number of number of accepted tracks (used for the multiplicity dependence study - pp) | |
200 | Int_t fNumberOfAcceptedTracksMax;//max. number of number of accepted tracks (used for the multiplicity dependence study - pp) | |
201 | TH1F *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks | |
202 | ||
203 | Bool_t fUseOfflineTrigger;//Usage of the offline trigger selection | |
204 | ||
205 | Double_t fVxMax;//vxmax | |
206 | Double_t fVyMax;//vymax | |
207 | Double_t fVzMax;//vzmax | |
208 | ||
209 | Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs) | |
210 | ||
211 | Double_t fPtMin;//only used for AODs | |
212 | Double_t fPtMax;//only used for AODs | |
213 | Double_t fEtaMin;//only used for AODs | |
214 | Double_t fEtaMax;//only used for AODs | |
215 | ||
216 | Double_t fDCAxyCut;//only used for AODs | |
217 | Double_t fDCAzCut;//only used for AODs | |
218 | ||
219 | Double_t fTPCchi2Cut;//only used for AODs | |
220 | Int_t fNClustersTPCCut;//only used for AODs | |
221 | ||
222 | TF1 *fAcceptanceParameterization;//acceptance filter used for MC | |
223 | ||
224 | TF1 *fDifferentialV2;//pt-differential v2 (from real data) | |
225 | Bool_t fUseFlowAfterBurner;//Usage of a flow after burner | |
226 | ||
227 | Bool_t fExcludeResonancesInMC;//flag to exclude the resonances' decay products from the MC analysis | |
228 | Bool_t fUseMCPdgCode; //Boolean to analyze a set of particles in MC | |
229 | Int_t fPDGCodeToBeAnalyzed; //Analyze a set of particles in MC | |
230 | ||
231 | // Event Mixing | |
232 | AliVEvent *fMainEvent;//main event in the event mixing loop | |
233 | AliVEvent *fMixEvent;//second event in the event mixing loop | |
234 | ||
235 | AliMixInputEventHandler *SetupEventsForMixing(); | |
236 | ||
237 | AliAnalysisTaskEventMixingBF(const AliAnalysisTaskEventMixingBF&); // not implemented | |
238 | AliAnalysisTaskEventMixingBF& operator=(const AliAnalysisTaskEventMixingBF&); // not implemented | |
239 | ||
240 | ClassDef(AliAnalysisTaskEventMixingBF, 1); // example of analysis | |
241 | }; | |
242 | ||
243 | #endif |