1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 // AliAnalysisTaskCDMeson
22 // Xianguo Lu <lu@physi.uni-heidelberg.de>
24 // Felix Reidt <Felix.Reidt@cern.ch>
26 #ifndef ALICDMESONBASE_H
27 #define ALICDMESONBASE_H
29 #include "THnSparse.h"
42 kBinPM = 1, // unlike-sign
43 kBinPPMM, // like-sign
45 // pid results (used for single particles and pairs)
46 kBinPionE = 1, // pions with exclusion cut
47 kBinPion, // pions without exclusion cut but TPC and TOF
48 kBinSinglePion, // one pion identified, the other particle unidentified
49 kBinKaonE, // same for kaons ...
52 kBinProtonE, // protons
55 kBinElectronE, // and electrons
58 kBinPIDUnknown, // could not be identified
61 kBinDG = 1, // double gap
62 kBinGC, // single gap c side
63 kBinGA, // single gap a side
67 // event types used for the empty event studies
68 kBinEventI = 1, // Beam-Beam Interaction
69 kBinEventA, // Beam from A-side
70 kBinEventC, // Beam from C-side
71 kBinEventAC, // Beam from one side (there is no separation in 2011)
72 kBinEventE, // no beam (empty event)
75 // StatsFlow histogram entries
76 // names for the bins are specified in the .cxx-file
82 kBinEventsWithOutPileUp,
87 kBinv0fmdspdtpczdcGap,
102 kBinUnknownPIDEvents,
104 kBinResidualTracklets,
106 kBinLastValue, // used to specify the correct histogram width
109 // MC event/process types
110 kBinND = 0, // used for data as well, "Non-Diffractive"
111 kBinCD, // central diffractive
112 kBinSD, // single diffractive
113 kBinDD, // double diffractive
116 // gap-condition bits used in AliAnalysisTaskCDMeson::fGapRun
117 kBitBaseLine = (1<<0),
131 kBitCentAct = (1<<11),
132 kBitGapMax = (1<<12),
135 // analysis task status bits
136 // do not change the order in order to be backward compatible!
137 kBitConfigurationSet = (1<<0), // if not set everything is active
138 kBitImposeZDCGap = (1<<1), // excluding the ZDC gap
139 kBitEtaPhiMaps = (1<<2),
140 kBitEtaPhiMapsWithCuts = (1<<3),
141 kBitStatsFlow = (1<<4),
142 kBitMultPerGapHists = (1<<5),
143 kBitRmMultPerGapHists = (1<<6),
144 kBitTHnMother = (1<<7),
145 kBitFastORStudy = (1<<8), // also not active by default
146 kBitHitMapSPD = (1<<9),
147 kBitHitMapFMD = (1<<10),
148 kBitVtxStudies = (1<<11),
149 kBitEEStudy = (1<<12),
150 kBitPIDStudy = (1<<13),
151 kBitMCProcess = (1<<14),
152 kBitFMDsum = (1<<15),
153 kBitSoftTracks = (1<<16),
154 kBitPWAtree = (1<<17),
156 kBitMultResponseMC = (1<<19),
157 kBitMultStudy = (1<<20),
158 kBitReadPreprocessedGap = (1<<21), // not active by default as well
159 kBitReduceGapEvents = (1<<22),
160 kBitVZEROStudy = (1<<23),
161 kBitTPCGapStudy = (1<<24),
162 kBitAllTrackMass = (1<<25),
163 kBitCDonly = (1<<26),
164 kBitFastORmultStudy = (1<<27),
165 kBitConfigurationVersion = (1<<28) // always set, last bit
168 static Int_t GetGapBin(const TString tag, const Int_t gapcg,
169 Bool_t checkCentralActivity = kTRUE);
171 static THnSparseD* GetThnMother(TString name = "CDMeson_Mother");
172 static void FillThnMother(THnSparseD *thn, const Double_t vNch,
173 const Double_t vCombCh, const Double_t vCombPID,
174 const Double_t vV0, const Double_t vFMD,
175 const Double_t vSPD, const Double_t vTPC,
176 const Double_t vMass, const Double_t vPt,
177 const Double_t vOA, const Double_t vCTS,
178 const Double_t vDaughterPt,
179 const Double_t vTrackResiduals,
180 const Double_t vVertexZ,
181 const Double_t vProcessType,
182 const Double_t vVertexCoincidence,
183 const Double_t vTrkltResiduals);
184 static Int_t GetAxisMother(const TString name);
186 static THnSparseD* GetThnEmptyEvents();
187 static void FillThnEmptyEvents(THnSparseD *thn, const Int_t eventType,
188 const Int_t multFMDA, const Int_t multFMDC,
189 const Int_t multSPDIA, const Int_t multSPDIC,
190 const Int_t multSPDOA, const Int_t multSPDOC,
191 const Int_t multSPDtrklA,
192 const Int_t multSPDtrklC, const Int_t fmdSum1I,
193 const Int_t fmdSum2I, const Int_t fmdSum20,
194 const Int_t fmdSum3I, const Int_t fmdSum3O/*,
196 const Int_t multTPCdiffVertex */);
197 static Int_t GetAxisEmptyEvents(const TString name);
199 static THnSparseD* GetThnMultiplicity();
200 static void FillThnMultiplicity(THnSparseD *thn, const Double_t vNch,
201 const Double_t vNsoft,
202 const Double_t vNcombined,
203 const Double_t vV0, const Double_t vFMD,
204 const Double_t vSPD, const Double_t vTPC,
205 const Double_t vNresidualTracks,
206 const Double_t vNresidualTracklets,
207 const Double_t vVertexZ,
208 const Double_t vVerticesDistance,
209 const Double_t vProcessType);
210 static Int_t GetAxisMultiplicity(const TString name);
212 static TH1F* GetHistStatsFlow();
213 static TH2F* GetHistPIDStudies(TString name);
214 static TObjArray* GetHistVZEROStudies(TList* l);
216 static void GetGapTriggers(THnSparseI* gaprun, Int_t gapCondition,
217 const Int_t run, Double_t& triggers,
220 static void GetNoGapTriggers(THnSparseI* gaprun, Int_t gapCondition,
221 const Int_t run, Double_t& triggers,
224 static void CheckRange(Double_t &var, const Double_t min, const Double_t max);
225 static Int_t GetAxis(TString thntit, TString name);
226 static TString GetTitleMother();
227 static TString GetTitleEmptyEvents();
228 static TString GetTitleMultiplicity();
230 //== INVARIANT MASS DISTRIBUTIONS (ThnMother) ================================
231 //-- event characteristics
232 // number of charged primary particles - combined => can be w/ soft tracks
233 static const Int_t fgkNNcombined; // number of bins
234 static const Double_t fgkMinNcombined; // lower border
235 static const Double_t fgkMaxNcombined; // upper border (#bins + lower border)
237 // unlike sign or like sign charged?
238 static const Int_t fgkNCombCh; // kBinPPMM = number of bins
239 static const Double_t fgkMinCombCh; // kBinPM = lower border
240 static const Double_t fgkMaxCombCh; // kBinPPMM + kBinPM = upper border
242 // two track PID, take care the enum changed from time to time
243 static const Int_t fgkNCombPID; // kBinPIDUnknown = number of bins
244 static const Double_t fgkMinCombPID; // kBinPionE = lower border
245 static const Double_t fgkMaxCombPID; // ... = upper border
247 // gap configuration, used for different detectors
248 static const Int_t fgkNGapConfig; // kBinNG = number of bins
249 static const Double_t fgkMinGapConfig; // kBinDG = lower border
250 static const Double_t fgkMaxGapConfig; // kBinNG + kBinDG = upper border
252 //-- mother kinematics
253 // invariant mass of the two-track system
254 static const Int_t fgkNMass; // number of bins
255 static const Double_t fgkMinMass; // lower border
256 static const Double_t fgkMaxMass; // upper border
258 // transverse momentum of the two-track system
259 static const Int_t fgkNMotherPt; // number of bins
260 static const Double_t fgkMinMotherPt; // lower border
261 static const Double_t fgkMaxMotherPt; // upper border
263 // cosine theta* (opening angle of the two daugther tracks in the
264 // centre-of-mass system of the two-track/mother system)
265 // **no meaning full variable**
266 static const Int_t fgkNCTS; // number of bins
267 static const Double_t fgkMinCTS; // lower border
268 static const Double_t fgkMaxCTS; // upper border
270 // opening angle in the lab frame
271 static const Int_t fgkNOA; // number of bins
272 static const Double_t fgkMinOA; // lower border
273 static const Double_t fgkMaxOA; // upper border
275 //-- daughter kinematics
276 // transverse momentum of one of the two daughter particles
277 // (randomly selected)
278 static const Int_t fgkNDaughterPt; // number of bins
279 static const Double_t fgkMinDaughterPt; // lower border
280 static const Double_t fgkMaxDaughterPt; // upper border
282 // pseudo rapidity of one of the two daughter particles
283 // (randomly selected)
284 //static const Int_t fgkNDaughterEta; // number of bins
285 //static const Double_t fgkMinDaughterEta; // lower border
286 //static const Double_t fgkMaxDaughterEta; // upper border
288 //-- Event quality information
289 // boolean values to reduce output size
291 // are there tracks in addition to the ones selected using AliCDMesonTracks
292 static const Int_t fgkNTrackResiduals; // number of bins
293 static const Double_t fgkMinTrackResiduals; // lower border
294 static const Double_t fgkMaxTrackResiduals; // upper border
296 // vertex with in +/-4cm (0 = no, 1 = yes)
297 static const Int_t fgkNVertexZinRng; // number of bins
298 static const Double_t fgkMinVertexZinRng; // lower border
299 static const Double_t fgkMaxVertexZinRng; // upper border
301 // are the vertices from SPD and tracks within 0.5cm? (0 = no, 1 = yes)
302 static const Int_t fgkNVertexCoincidence; // number of bins
303 static const Double_t fgkMinVertexCoincidence; // lower border
304 static const Double_t fgkMaxVertexCoincidence; // upper border
306 // are there SPD tracklets which are not assigned to tracks? (0 = no, 1 = yes)
307 static const Int_t fgkNTrackletResiduals; // number of bins
308 static const Double_t fgkMinTrackletResiduals; // lower border
309 static const Double_t fgkMaxTrackletResiduals; // upper border
311 //-- MC event information
312 static const Int_t fgkNProcessType; // kBinDD = number of bins
313 static const Double_t fgkMinProcessType; // kBinND = lower border
314 static const Double_t fgkMaxProcessType; // kBinDD = upper border
317 //== EMPTY EVENT STUDY (ThnEmptyEvents) ======================================
319 static const Int_t fgkNEventType; // kBinEventE = number of bins
320 static const Double_t fgkMinEventType; // kBinEventI = lower border
321 static const Double_t fgkMaxEventType; // kBinEventE+kBinEventI = u. b.
323 // multiplicities (reused for different detectors and ways of counting)
324 static const Int_t fgkNMult; // number of bins
325 static const Double_t fgkMinMult; // lower border
326 static const Double_t fgkMaxMult; // upper border
328 // multplicities - extended range
329 // (reused for different detectors and ways of counting)
330 static const Int_t fgkNMultW; // number of bins
331 static const Double_t fgkMinMultW; // lower border
332 static const Double_t fgkMaxMultW; // upper border
334 //== MULTIPLICITY STUDY (TnnMultiplicity) ====================================
335 // number of ITSTPC tracks in event
336 static const Int_t fgkNNch; // number of bins
337 static const Double_t fgkMinNch; // lower border
338 static const Double_t fgkMaxNch; // upper border
340 // number of ITS standalone tracks in event
341 static const Int_t fgkNNsoft; // number of bins
342 static const Double_t fgkMinNsoft; // lower border
343 static const Double_t fgkMaxNsoft; // upper border
345 // combined multiplicity
346 static const Int_t fgkNNcomb; // number of bins
347 static const Double_t fgkMinNcomb; // lower border
348 static const Double_t fgkMaxNcomb; // upper border
350 // gap configuration is reused from THnMother
352 // number of residual tracks
353 static const Int_t fgkNNresidualTracks; // number of bins
354 static const Double_t fgkMinNresidualTracks; // lower border
355 static const Double_t fgkMaxNresidualTracks; // upper border
357 // number of residual tracklets
358 static const Int_t fgkNNresidualTracklets; // number of bins
359 static const Double_t fgkMinNresidualTracklets; // lower border
360 static const Double_t fgkMaxNresidualTracklets; // upper border
363 static const Int_t fgkNVertexZ; // number of bins
364 static const Double_t fgkMinVertexZ; // lower border
365 static const Double_t fgkMaxVertexZ; // upper border
367 // SPD and track vertex distance
368 static const Int_t fgkNVerticesDistance; // number of bins
369 static const Double_t fgkMinVerticesDistance; // lower border
370 static const Double_t fgkMaxVerticesDistance; // upper border
372 // MC process type is resued from THnMother