]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/AliDielectronVarManager.cxx
o small fix in mixing handler (bin finding)
[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   "TPCsignalN",
56   "TPCsignalNfrac",
57   "TPCchi2PerCluster",
58   "TPCclsDiff",
59   "TrackStatus",
60     
61   "NclsTRD",
62   "TRDntracklets",
63   "TRDpidQuality",
64   "TRDpidProb_Electrons",
65   "TRDpidProb_Pions",
66   "TRDphi",
67   "TRDpidEffLeg",
68
69   "ImpactParXY",
70   "ImpactParZ",
71   "TrackLength",
72
73   "PdgCode",
74   "PdgCodeMother",
75   "PdgCodeGrandMother",
76   "NumberOfDaughters",
77   "HaveSameMother",
78   "IsJpsiPrimary",
79   "NumberOfJPsisIncl",
80   "NumberOfJPsisPrompt",
81   "NumberOfJPsisNPrompt",
82   
83   "ITS_signal",
84   "SSD1_signal",
85   "SSD2_signal",
86   "SDD1_signal",
87   "SDD2_signal",
88   "ITS_clusterMap",
89   "ITSLayerFirstCls",
90   "ITS_nSigma_Electrons",
91   "ITS_nSigma_Pions",
92   "ITS_nSigma_Muons",
93   "ITS_nSigma_Kaons",
94   "ITS_nSigma_Protons",
95
96   "P_InnerParam",
97   "P_OuterParam",
98   "Y_signed_InnerParam",
99   "TPC_signal",
100   "TOF_signal",
101   "TOF_beta",
102   "TOF_PIDbit",
103   
104   "TPC_nSigma_Electrons",
105   "TPC_nSigma_Pions",
106   "TPC_nSigma_Muons",
107   "TPC_nSigma_Kaons",
108   "TPC_nSigma_Protons",
109
110   "TOF_nSigma_Electrons",
111   "TOF_nSigma_Pions",
112   "TOF_nSigma_Muons",
113   "TOF_nSigma_Kaons",
114   "TOF_nSigma_Protons",
115
116   "EMCAL_nSigma_Electrons",
117   "EMCAL_EoverP",
118   "EMCAL_NCells",
119   "EMCAL_M02",
120   "EMCAL_M20",
121   "EMCAL_Dispersion",
122
123   "KinkIndex0",
124   //
125   "Chi2NDF",
126   "DecayLength",
127   "R",
128   "OpeningAngle",
129   "ThetaHE",
130   "PhiHE",
131   "Cos2PhiHE",
132   "CosTilPhiHE",
133   "ThetaCS",
134   "PhiCS",
135   "PsiPair",
136   "Cos2PhiCS",
137   "CosTilPhiCS",
138   "DeltaPhiV0ArpH2",        
139   "DeltaPhiV0CrpH2",        
140   "DeltaPhiV0ACrpH2",       
141   "V0ArpH2FlowV2",         
142   "V0CrpH2FlowV2",      
143   "V0ACrpH2FlowV2",
144   "LegDistance",
145   "LegDistanceXY",
146   "DeltaEta",
147   "DeltaPhi",
148   "Merr",
149   "DCA",
150   "PairType",
151   "PseudoProperTime",
152   "PseudoProperTimeResolution",
153   "PseudoProperTimePull",
154   "TRDpidEffPair",
155   //
156   "X",
157   "Y",
158   "Z",
159   "XRes",
160   "YRes",
161   "ZRes",
162
163   "v0ArpH2",
164   "v0CrpH2",
165   "v0ACrpH2",
166   "v0ATPCDiffH2",
167   "v0CTPCDiffH2",
168   "v0Av0CDiffH2",
169
170   "MultV0A", 
171   "MultV0C",
172   "MultV0",
173   "AdcV0A",
174   "AdcV0C",
175   "AdcV0",  
176   "VZERO_ch0",  "VZERO_ch1",  "VZERO_ch2",  "VZERO_ch3",  "VZERO_ch4",  "VZERO_ch5",  "VZERO_ch6",  "VZERO_ch7",  "VZERO_ch8",  "VZERO_ch9",
177   "VZERO_ch10", "VZERO_ch11", "VZERO_ch12", "VZERO_ch13", "VZERO_ch14", "VZERO_ch15", "VZERO_ch16", "VZERO_ch17", "VZERO_ch18", "VZERO_ch19",
178   "VZERO_ch20", "VZERO_ch21", "VZERO_ch22", "VZERO_ch23", "VZERO_ch24", "VZERO_ch25", "VZERO_ch26", "VZERO_ch27", "VZERO_ch28", "VZERO_ch29",
179   "VZERO_ch30", "VZERO_ch31", "VZERO_ch32", "VZERO_ch33", "VZERO_ch34", "VZERO_ch35", "VZERO_ch36", "VZERO_ch37", "VZERO_ch38", "VZERO_ch39",
180   "VZERO_ch40", "VZERO_ch41", "VZERO_ch42", "VZERO_ch43", "VZERO_ch44", "VZERO_ch45", "VZERO_ch46", "VZERO_ch47", "VZERO_ch48", "VZERO_ch49",
181   "VZERO_ch50", "VZERO_ch51", "VZERO_ch52", "VZERO_ch53", "VZERO_ch54", "VZERO_ch55", "VZERO_ch56", "VZERO_ch57", "VZERO_ch58", "VZERO_ch59",
182   "VZERO_ch60", "VZERO_ch61", "VZERO_ch62", "VZERO_ch63",
183   "V0AxH2", 
184   "V0AyH2",
185   "V0ArpH2",
186   "V0CxH2",
187   "V0CyH2",
188   "V0CrpH2",
189   "V0ACxH2",
190   "V0ACyH2",
191   "V0ACrpH2",
192   "V0ArpResH2",
193   "V0CrpResH2",
194   "V0ACrpResH2",
195   "V0XaXcH2",
196   "V0XaYaH2",
197   "V0XaYcH2",
198   "V0YaXcH2",
199   "V0YaYcH2",
200   "V0XcYcH2",
201   "V0ATPCDiffH2",
202   "V0CTPCDiffH2",
203   "V0AV0CDiffH2",
204   "TPCxH2",
205   "TPCyH2",
206   "TPCrpH2",
207   "TPCsub1xH2",
208   "TPCsub1yH2",
209   "TPCsub1rpH2",
210   "TPCsub2xH2",
211   "TPCsub2yH2",
212   "TPCsub2rpH2",
213   "TPCsub12DiffH2",
214   "TPCsub12DiffH2Sin",
215
216   "TPCxH2uc",
217   "TPCyH2uc",
218   "TPCrpH2uc",
219   "TPCsub1xH2uc",
220   "TPCsub1yH2uc",
221   "TPCsub1rpH2uc",
222   "TPCsub2xH2uc",
223   "TPCsub2yH2uc",
224   "TPCsub2rpH2uc",
225   "TPCsub12DiffH2uc",
226
227   "NTrk",
228   "Tracks",
229   "NVtxContrib",
230   "Nacc",
231   "NaccTrcklts",
232   "NaccTrcklts0916",
233   
234   "NaccTrckltsEsd05",
235   "NaccTrckltsEsd10",
236   "NaccTrckltsEsd16",
237   "NaccTrckltsEsd05Corr",
238   "NaccTrckltsEsd10Corr",
239   "NaccTrckltsEsd16Corr",
240   "NaccItsTpcEsd05",
241   "NaccItsTpcEsd10",
242   "NaccItsTpcEsd16",
243   "NaccItsTpcEsd05Corr",
244   "NaccItsTpcEsd10Corr",
245   "NaccItsTpcEsd16Corr",
246   "NaccItsPureEsd05",
247   "NaccItsPureEsd10",
248   "NaccItsPureEsd16",
249   "NaccItsPureEsd05Corr",
250   "NaccItsPureEsd10Corr",
251   "NaccItsPureEsd16Corr",  
252     
253   "Nch",
254   "Nch05",
255   "Nch10",
256   "Centrality",
257   "CentralitySPD",
258   "Nevents",
259   "RunNumber",
260   "MixingBin"
261 };
262
263 AliPIDResponse* AliDielectronVarManager::fgPIDResponse      = 0x0;
264 AliVEvent*      AliDielectronVarManager::fgEvent            = 0x0;
265 AliEventplane*  AliDielectronVarManager::fgTPCEventPlane    = 0x0;
266 AliKFVertex*    AliDielectronVarManager::fgKFVertex         = 0x0;
267 TProfile*       AliDielectronVarManager::fgMultEstimatorAvg[4][9] = {{0x0}};
268 TH3D*           AliDielectronVarManager::fgTRDpidEff[10][4] = {{0x0}};
269 Double_t        AliDielectronVarManager::fgTRDpidEffCentRanges[10][4] = {{0.0}};
270 TString         AliDielectronVarManager::fgVZEROCalibrationFile = "";
271 TString         AliDielectronVarManager::fgVZERORecenteringFile = "";
272 TProfile2D*     AliDielectronVarManager::fgVZEROCalib[64] = {0x0};
273 TProfile2D*     AliDielectronVarManager::fgVZERORecentering[2][2] = {{0x0,0x0},{0x0,0x0}};
274 Int_t           AliDielectronVarManager::fgCurrentRun = -1;
275 Double_t        AliDielectronVarManager::fgData[AliDielectronVarManager::kNMaxValues] = {0.};
276 //________________________________________________________________
277 AliDielectronVarManager::AliDielectronVarManager() :
278   TNamed("AliDielectronVarManager","AliDielectronVarManager")
279 {
280   //
281   // Default constructor
282   //
283   for(Int_t i=0; i<4; ++i)
284     for(Int_t j=0; j<9; ++j)
285       fgMultEstimatorAvg[i][j] = 0x0;
286   for(Int_t i=0; i<10; ++i)
287     for(Int_t j=0; j<4; ++j)
288       fgTRDpidEff[i][j] = 0x0;
289   for(Int_t i=0; i<64; ++i) fgVZEROCalib[i] = 0x0;
290   for(Int_t i=0; i<2; ++i) {
291     for(Int_t j=0; j<2; ++j) fgVZERORecentering[i][j] = 0x0;
292   }
293 }
294
295 //________________________________________________________________
296 AliDielectronVarManager::AliDielectronVarManager(const char* name, const char* title) :
297   TNamed(name,title)
298 {
299   //
300   // Named constructor
301   //
302   for(Int_t i=0; i<4; ++i)
303     for(Int_t j=0; j<9; ++j)
304       fgMultEstimatorAvg[i][j] = 0x0;
305   for(Int_t i=0; i<10; ++i)
306     for(Int_t j=0; j<4; ++j)
307       fgTRDpidEff[i][j] = 0x0;  
308   for(Int_t i=0; i<64; ++i) fgVZEROCalib[i] = 0x0;
309   for(Int_t i=0; i<2; ++i)
310     for(Int_t j=0; j<2; ++j) 
311       fgVZERORecentering[i][j] = 0x0;
312 }
313
314 //________________________________________________________________
315 AliDielectronVarManager::~AliDielectronVarManager()
316 {
317   //
318   // Default destructor
319   //
320   for(Int_t i=0; i<4; ++i)
321     for(Int_t j=0; j<9; ++j)
322       if(fgMultEstimatorAvg[i][j]) delete fgMultEstimatorAvg[i][j];
323   for(Int_t i=0; i<10; ++i)
324     for(Int_t j=0; j<4; ++j)
325       if(fgTRDpidEff[i][j]) delete fgTRDpidEff[i][j];    
326   for(Int_t i=0; i<64; ++i) 
327     if(fgVZEROCalib[i]) delete fgVZEROCalib[i];
328   for(Int_t i=0; i<2; ++i)
329     for(Int_t j=0; j<2; ++j) 
330       if(fgVZERORecentering[i][j]) delete fgVZERORecentering[i][j]; 
331 }
332