]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/AliDielectronVarManager.cxx
New macros for the kaon train
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronVarManager.cxx
1 /*************************************************************************
2 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
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 **************************************************************************/
15
16 ///////////////////////////////////////////////////////////////////////////
17 //                Dielectron Variables Manager class                     //
18 //                                                                       //
19 /*
20
21 */
22 //                                                                       //
23 ///////////////////////////////////////////////////////////////////////////
24
25 #include "AliDielectronVarManager.h"
26
27 ClassImp(AliDielectronVarManager)
28
29 const char* AliDielectronVarManager::fgkParticleNames[AliDielectronVarManager::kNMaxValues] = {
30   "Px",
31   "Py",
32   "Pz",
33   "Pt",
34   "P",
35   "Xv",
36   "Yv",
37   "Zv",
38   "OneOverPt",
39   "Phi",
40   "Theta",
41   "Eta",
42   "Y",
43   "E",
44   "M",
45   "Charge",
46   "NclsITS",
47   "ITSchi2PerCluster",
48   "NclsTPC",
49   "NclsSTPC",
50   "NclsSFracTPC",
51   "NclsTPCiter1",
52   "NFclsTPC",
53   "NFclsTPCrobust",
54   "NFclsTPCrobustFraction",
55   "NFclsTPCfracCrossedRows",
56   "TPCsignalN",
57   "TPCsignalNfrac",
58   "TPCchi2PerCluster",
59   "TPCclsDiff",
60   "TPCclsSegments",
61   "TrackStatus",
62     
63   "NclsTRD",
64   "TRDntracklets",
65   "TRDpidQuality",
66   "TRDchi2",
67   "TRDpidProb_Electrons",
68   "TRDpidProb_Pions",
69   "TRDphi",
70   "TRDpidEffLeg",
71
72   "ImpactParXY",
73   "ImpactParZ",
74   "TrackLength",
75
76   "PdgCode",
77   "PdgCodeMother",
78   "PdgCodeGrandMother",
79   "NumberOfDaughters",
80   "HaveSameMother",
81   "IsJpsiPrimary",
82   "NumberOfJPsisIncl",
83   "NumberOfJPsisPrompt",
84   "NumberOfJPsisNPrompt",
85   
86   "ITS_signal",
87   "SSD1_signal",
88   "SSD2_signal",
89   "SDD1_signal",
90   "SDD2_signal",
91   "ITS_clusterMap",
92   "ITSLayerFirstCls",
93   "ITS_nSigma_Electrons",
94   "ITS_nSigma_Pions",
95   "ITS_nSigma_Muons",
96   "ITS_nSigma_Kaons",
97   "ITS_nSigma_Protons",
98
99   "P_InnerParam",
100   "P_OuterParam",
101   "Y_signed_InnerParam",
102   "TPC_signal",
103   "TOF_signal",
104   "TOF_beta",
105   "TOF_PIDbit",
106   
107   "TPC_nSigma_Electrons",
108   "TPC_nSigma_Pions",
109   "TPC_nSigma_Muons",
110   "TPC_nSigma_Kaons",
111   "TPC_nSigma_Protons",
112
113   "TOF_nSigma_Electrons",
114   "TOF_nSigma_Pions",
115   "TOF_nSigma_Muons",
116   "TOF_nSigma_Kaons",
117   "TOF_nSigma_Protons",
118
119   "EMCAL_nSigma_Electrons",
120   "EMCAL_EoverP",
121   "EMCAL_E",
122   "EMCAL_NCells",
123   "EMCAL_M02",
124   "EMCAL_M20",
125   "EMCAL_Dispersion",
126
127   "V0Index0",
128   "KinkIndex0",
129   //
130   "Chi2NDF",
131   "DecayLength",
132   "R",
133   "OpeningAngle",
134   "CosPointingAngle",
135   "ThetaHE",
136   "PhiHE",
137   "ThetaSqHE",
138   "Cos2PhiHE",
139   "CosTilPhiHE",
140   "ThetaCS",
141   "PhiCS",
142   "ThetaSqCS",
143   "PsiPair",
144   "PhivPair",
145   "Cos2PhiCS",
146   "CosTilPhiCS",
147   "DeltaPhiV0ArpH2",        
148   "DeltaPhiV0CrpH2",        
149   "DeltaPhiV0ACrpH2",       
150   "V0ArpH2FlowV2",         
151   "V0CrpH2FlowV2",      
152   "V0ACrpH2FlowV2",
153   "LegDistance",
154   "LegDistanceXY",
155   "DeltaEta",
156   "DeltaPhi",
157   "Merr",
158   "DCA",
159   "PairType",
160   "PseudoProperTime",
161   "PseudoProperTimeErr",
162   "PseudoProperTimeResolution",
163   "PseudoProperTimePull",
164   "TRDpidEffPair",
165   //
166   "X",
167   "Y",
168   "Z",
169   "XRes",
170   "YRes",
171   "ZRes",
172
173   "v0ArpH2",
174   "v0CrpH2",
175   "v0ACrpH2",
176   "v0AxH2",
177   "v0AyH2",
178   "v0CxH2",
179   "v0CyH2",
180   "v0ACxH2",
181   "v0ACyH2",
182   "v0A0rpH2",
183   "v0A3rpH2",
184   "v0C0rpH2",
185   "v0C3rpH2",
186
187   "DeltaPhiv0ArpH2",        
188   "DeltaPhiv0CrpH2",        
189   "DeltaPhiv0ACrpH2",       
190   "v0ATPCDiffH2",
191   "v0CTPCDiffH2",
192   "v0Av0CDiffH2",
193   "v0ArpH2FlowV2",         
194   "v0CrpH2FlowV2",      
195   "v0ACrpH2FlowV2",
196
197   "MultV0A", 
198   "MultV0C",
199   "MultV0",
200   "AdcV0A",
201   "AdcV0C",
202   "AdcV0",  
203   "VZERO_ch0",  "VZERO_ch1",  "VZERO_ch2",  "VZERO_ch3",  "VZERO_ch4",  "VZERO_ch5",  "VZERO_ch6",  "VZERO_ch7",  "VZERO_ch8",  "VZERO_ch9",
204   "VZERO_ch10", "VZERO_ch11", "VZERO_ch12", "VZERO_ch13", "VZERO_ch14", "VZERO_ch15", "VZERO_ch16", "VZERO_ch17", "VZERO_ch18", "VZERO_ch19",
205   "VZERO_ch20", "VZERO_ch21", "VZERO_ch22", "VZERO_ch23", "VZERO_ch24", "VZERO_ch25", "VZERO_ch26", "VZERO_ch27", "VZERO_ch28", "VZERO_ch29",
206   "VZERO_ch30", "VZERO_ch31", "VZERO_ch32", "VZERO_ch33", "VZERO_ch34", "VZERO_ch35", "VZERO_ch36", "VZERO_ch37", "VZERO_ch38", "VZERO_ch39",
207   "VZERO_ch40", "VZERO_ch41", "VZERO_ch42", "VZERO_ch43", "VZERO_ch44", "VZERO_ch45", "VZERO_ch46", "VZERO_ch47", "VZERO_ch48", "VZERO_ch49",
208   "VZERO_ch50", "VZERO_ch51", "VZERO_ch52", "VZERO_ch53", "VZERO_ch54", "VZERO_ch55", "VZERO_ch56", "VZERO_ch57", "VZERO_ch58", "VZERO_ch59",
209   "VZERO_ch60", "VZERO_ch61", "VZERO_ch62", "VZERO_ch63",
210   "V0AxH2", 
211   "V0AyH2",
212   "V0ArpH2",
213   "V0CxH2",
214   "V0CyH2",
215   "V0CrpH2",
216   "V0ACxH2",
217   "V0ACyH2",
218   "V0ACrpH2",
219   "V0ArpResH2",
220   "V0CrpResH2",
221   "V0ACrpResH2",
222   "V0XaXcH2",
223   "V0XaYaH2",
224   "V0XaYcH2",
225   "V0YaXcH2",
226   "V0YaYcH2",
227   "V0XcYcH2",
228   "V0ATPCDiffH2",
229   "V0CTPCDiffH2",
230   "V0AV0CDiffH2",
231   "TPCxH2",
232   "TPCyH2",
233   "TPCrpH2",
234   "TPCsub1xH2",
235   "TPCsub1yH2",
236   "TPCsub1rpH2",
237   "TPCsub2xH2",
238   "TPCsub2yH2",
239   "TPCsub2rpH2",
240   "TPCsub12DiffH2",
241   "TPCsub12DiffH2Sin",
242
243   "TPCxH2uc",
244   "TPCyH2uc",
245   "TPCrpH2uc",
246   "TPCsub1xH2uc",
247   "TPCsub1yH2uc",
248   "TPCsub1rpH2uc",
249   "TPCsub2xH2uc",
250   "TPCsub2yH2uc",
251   "TPCsub2rpH2uc",
252   "TPCsub12DiffH2uc",
253
254   "NTrk",
255   "Tracks",
256   "NVtxContrib",
257   "Nacc",
258   "NaccTrcklts",
259   "NaccTrcklts0916",
260   
261   "NaccTrckltsEsd05",
262   "NaccTrckltsEsd10",
263   "NaccTrckltsEsd16",
264   "NaccTrckltsEsd05Corr",
265   "NaccTrckltsEsd10Corr",
266   "NaccTrckltsEsd16Corr",
267   "NaccItsTpcEsd05",
268   "NaccItsTpcEsd10",
269   "NaccItsTpcEsd16",
270   "NaccItsTpcEsd05Corr",
271   "NaccItsTpcEsd10Corr",
272   "NaccItsTpcEsd16Corr",
273   "NaccItsPureEsd05",
274   "NaccItsPureEsd10",
275   "NaccItsPureEsd16",
276   "NaccItsPureEsd05Corr",
277   "NaccItsPureEsd10Corr",
278   "NaccItsPureEsd16Corr",  
279     
280   "Nch",
281   "Nch05",
282   "Nch10",
283   "Centrality",
284   "CentralitySPD",
285   "Nevents",
286   "RunNumber",
287   "MixingBin"
288 };
289
290 AliPIDResponse* AliDielectronVarManager::fgPIDResponse      = 0x0;
291 AliVEvent*      AliDielectronVarManager::fgEvent            = 0x0;
292 AliEventplane*  AliDielectronVarManager::fgTPCEventPlane    = 0x0;
293 AliKFVertex*    AliDielectronVarManager::fgKFVertex         = 0x0;
294 TProfile*       AliDielectronVarManager::fgMultEstimatorAvg[4][9] = {{0x0}};
295 TH3D*           AliDielectronVarManager::fgTRDpidEff[10][4] = {{0x0}};
296 Double_t        AliDielectronVarManager::fgTRDpidEffCentRanges[10][4] = {{0.0}};
297 TString         AliDielectronVarManager::fgVZEROCalibrationFile = "";
298 TString         AliDielectronVarManager::fgVZERORecenteringFile = "";
299 TProfile2D*     AliDielectronVarManager::fgVZEROCalib[64] = {0x0};
300 TProfile2D*     AliDielectronVarManager::fgVZERORecentering[2][2] = {{0x0,0x0},{0x0,0x0}};
301 Int_t           AliDielectronVarManager::fgCurrentRun = -1;
302 Double_t        AliDielectronVarManager::fgData[AliDielectronVarManager::kNMaxValues] = {0.};
303 //________________________________________________________________
304 AliDielectronVarManager::AliDielectronVarManager() :
305   TNamed("AliDielectronVarManager","AliDielectronVarManager")
306 {
307   //
308   // Default constructor
309   //
310   for(Int_t i=0; i<4; ++i)
311     for(Int_t j=0; j<9; ++j)
312       fgMultEstimatorAvg[i][j] = 0x0;
313   for(Int_t i=0; i<10; ++i)
314     for(Int_t j=0; j<4; ++j)
315       fgTRDpidEff[i][j] = 0x0;
316   for(Int_t i=0; i<64; ++i) fgVZEROCalib[i] = 0x0;
317   for(Int_t i=0; i<2; ++i) {
318     for(Int_t j=0; j<2; ++j) fgVZERORecentering[i][j] = 0x0;
319   }
320 }
321
322 //________________________________________________________________
323 AliDielectronVarManager::AliDielectronVarManager(const char* name, const char* title) :
324   TNamed(name,title)
325 {
326   //
327   // Named constructor
328   //
329   for(Int_t i=0; i<4; ++i)
330     for(Int_t j=0; j<9; ++j)
331       fgMultEstimatorAvg[i][j] = 0x0;
332   for(Int_t i=0; i<10; ++i)
333     for(Int_t j=0; j<4; ++j)
334       fgTRDpidEff[i][j] = 0x0;  
335   for(Int_t i=0; i<64; ++i) fgVZEROCalib[i] = 0x0;
336   for(Int_t i=0; i<2; ++i)
337     for(Int_t j=0; j<2; ++j) 
338       fgVZERORecentering[i][j] = 0x0;
339 }
340
341 //________________________________________________________________
342 AliDielectronVarManager::~AliDielectronVarManager()
343 {
344   //
345   // Default destructor
346   //
347   for(Int_t i=0; i<4; ++i)
348     for(Int_t j=0; j<9; ++j)
349       if(fgMultEstimatorAvg[i][j]) delete fgMultEstimatorAvg[i][j];
350   for(Int_t i=0; i<10; ++i)
351     for(Int_t j=0; j<4; ++j)
352       if(fgTRDpidEff[i][j]) delete fgTRDpidEff[i][j];    
353   for(Int_t i=0; i<64; ++i) 
354     if(fgVZEROCalib[i]) delete fgVZEROCalib[i];
355   for(Int_t i=0; i<2; ++i)
356     for(Int_t j=0; j<2; ++j) 
357       if(fgVZERORecentering[i][j]) delete fgVZERORecentering[i][j]; 
358 }
359