]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/AliDielectronVarManager.cxx
o add variables
[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   "ThetaSqHE",
132   "Cos2PhiHE",
133   "CosTilPhiHE",
134   "ThetaCS",
135   "PhiCS",
136   "ThetaSqCS",
137   "PsiPair",
138   "Cos2PhiCS",
139   "CosTilPhiCS",
140   "DeltaPhiV0ArpH2",        
141   "DeltaPhiV0CrpH2",        
142   "DeltaPhiV0ACrpH2",       
143   "V0ArpH2FlowV2",         
144   "V0CrpH2FlowV2",      
145   "V0ACrpH2FlowV2",
146   "LegDistance",
147   "LegDistanceXY",
148   "DeltaEta",
149   "DeltaPhi",
150   "Merr",
151   "DCA",
152   "PairType",
153   "PseudoProperTime",
154   "PseudoProperTimeResolution",
155   "PseudoProperTimePull",
156   "TRDpidEffPair",
157   //
158   "X",
159   "Y",
160   "Z",
161   "XRes",
162   "YRes",
163   "ZRes",
164
165   "v0ArpH2",
166   "v0CrpH2",
167   "v0ACrpH2",
168   "v0ATPCDiffH2",
169   "v0CTPCDiffH2",
170   "v0Av0CDiffH2",
171
172   "MultV0A", 
173   "MultV0C",
174   "MultV0",
175   "AdcV0A",
176   "AdcV0C",
177   "AdcV0",  
178   "VZERO_ch0",  "VZERO_ch1",  "VZERO_ch2",  "VZERO_ch3",  "VZERO_ch4",  "VZERO_ch5",  "VZERO_ch6",  "VZERO_ch7",  "VZERO_ch8",  "VZERO_ch9",
179   "VZERO_ch10", "VZERO_ch11", "VZERO_ch12", "VZERO_ch13", "VZERO_ch14", "VZERO_ch15", "VZERO_ch16", "VZERO_ch17", "VZERO_ch18", "VZERO_ch19",
180   "VZERO_ch20", "VZERO_ch21", "VZERO_ch22", "VZERO_ch23", "VZERO_ch24", "VZERO_ch25", "VZERO_ch26", "VZERO_ch27", "VZERO_ch28", "VZERO_ch29",
181   "VZERO_ch30", "VZERO_ch31", "VZERO_ch32", "VZERO_ch33", "VZERO_ch34", "VZERO_ch35", "VZERO_ch36", "VZERO_ch37", "VZERO_ch38", "VZERO_ch39",
182   "VZERO_ch40", "VZERO_ch41", "VZERO_ch42", "VZERO_ch43", "VZERO_ch44", "VZERO_ch45", "VZERO_ch46", "VZERO_ch47", "VZERO_ch48", "VZERO_ch49",
183   "VZERO_ch50", "VZERO_ch51", "VZERO_ch52", "VZERO_ch53", "VZERO_ch54", "VZERO_ch55", "VZERO_ch56", "VZERO_ch57", "VZERO_ch58", "VZERO_ch59",
184   "VZERO_ch60", "VZERO_ch61", "VZERO_ch62", "VZERO_ch63",
185   "V0AxH2", 
186   "V0AyH2",
187   "V0ArpH2",
188   "V0CxH2",
189   "V0CyH2",
190   "V0CrpH2",
191   "V0ACxH2",
192   "V0ACyH2",
193   "V0ACrpH2",
194   "V0ArpResH2",
195   "V0CrpResH2",
196   "V0ACrpResH2",
197   "V0XaXcH2",
198   "V0XaYaH2",
199   "V0XaYcH2",
200   "V0YaXcH2",
201   "V0YaYcH2",
202   "V0XcYcH2",
203   "V0ATPCDiffH2",
204   "V0CTPCDiffH2",
205   "V0AV0CDiffH2",
206   "TPCxH2",
207   "TPCyH2",
208   "TPCrpH2",
209   "TPCsub1xH2",
210   "TPCsub1yH2",
211   "TPCsub1rpH2",
212   "TPCsub2xH2",
213   "TPCsub2yH2",
214   "TPCsub2rpH2",
215   "TPCsub12DiffH2",
216   "TPCsub12DiffH2Sin",
217
218   "TPCxH2uc",
219   "TPCyH2uc",
220   "TPCrpH2uc",
221   "TPCsub1xH2uc",
222   "TPCsub1yH2uc",
223   "TPCsub1rpH2uc",
224   "TPCsub2xH2uc",
225   "TPCsub2yH2uc",
226   "TPCsub2rpH2uc",
227   "TPCsub12DiffH2uc",
228
229   "NTrk",
230   "Tracks",
231   "NVtxContrib",
232   "Nacc",
233   "NaccTrcklts",
234   "NaccTrcklts0916",
235   
236   "NaccTrckltsEsd05",
237   "NaccTrckltsEsd10",
238   "NaccTrckltsEsd16",
239   "NaccTrckltsEsd05Corr",
240   "NaccTrckltsEsd10Corr",
241   "NaccTrckltsEsd16Corr",
242   "NaccItsTpcEsd05",
243   "NaccItsTpcEsd10",
244   "NaccItsTpcEsd16",
245   "NaccItsTpcEsd05Corr",
246   "NaccItsTpcEsd10Corr",
247   "NaccItsTpcEsd16Corr",
248   "NaccItsPureEsd05",
249   "NaccItsPureEsd10",
250   "NaccItsPureEsd16",
251   "NaccItsPureEsd05Corr",
252   "NaccItsPureEsd10Corr",
253   "NaccItsPureEsd16Corr",  
254     
255   "Nch",
256   "Nch05",
257   "Nch10",
258   "Centrality",
259   "CentralitySPD",
260   "Nevents",
261   "RunNumber",
262   "MixingBin"
263 };
264
265 AliPIDResponse* AliDielectronVarManager::fgPIDResponse      = 0x0;
266 AliVEvent*      AliDielectronVarManager::fgEvent            = 0x0;
267 AliEventplane*  AliDielectronVarManager::fgTPCEventPlane    = 0x0;
268 AliKFVertex*    AliDielectronVarManager::fgKFVertex         = 0x0;
269 TProfile*       AliDielectronVarManager::fgMultEstimatorAvg[4][9] = {{0x0}};
270 TH3D*           AliDielectronVarManager::fgTRDpidEff[10][4] = {{0x0}};
271 Double_t        AliDielectronVarManager::fgTRDpidEffCentRanges[10][4] = {{0.0}};
272 TString         AliDielectronVarManager::fgVZEROCalibrationFile = "";
273 TString         AliDielectronVarManager::fgVZERORecenteringFile = "";
274 TProfile2D*     AliDielectronVarManager::fgVZEROCalib[64] = {0x0};
275 TProfile2D*     AliDielectronVarManager::fgVZERORecentering[2][2] = {{0x0,0x0},{0x0,0x0}};
276 Int_t           AliDielectronVarManager::fgCurrentRun = -1;
277 Double_t        AliDielectronVarManager::fgData[AliDielectronVarManager::kNMaxValues] = {0.};
278 //________________________________________________________________
279 AliDielectronVarManager::AliDielectronVarManager() :
280   TNamed("AliDielectronVarManager","AliDielectronVarManager")
281 {
282   //
283   // Default constructor
284   //
285   for(Int_t i=0; i<4; ++i)
286     for(Int_t j=0; j<9; ++j)
287       fgMultEstimatorAvg[i][j] = 0x0;
288   for(Int_t i=0; i<10; ++i)
289     for(Int_t j=0; j<4; ++j)
290       fgTRDpidEff[i][j] = 0x0;
291   for(Int_t i=0; i<64; ++i) fgVZEROCalib[i] = 0x0;
292   for(Int_t i=0; i<2; ++i) {
293     for(Int_t j=0; j<2; ++j) fgVZERORecentering[i][j] = 0x0;
294   }
295 }
296
297 //________________________________________________________________
298 AliDielectronVarManager::AliDielectronVarManager(const char* name, const char* title) :
299   TNamed(name,title)
300 {
301   //
302   // Named constructor
303   //
304   for(Int_t i=0; i<4; ++i)
305     for(Int_t j=0; j<9; ++j)
306       fgMultEstimatorAvg[i][j] = 0x0;
307   for(Int_t i=0; i<10; ++i)
308     for(Int_t j=0; j<4; ++j)
309       fgTRDpidEff[i][j] = 0x0;  
310   for(Int_t i=0; i<64; ++i) fgVZEROCalib[i] = 0x0;
311   for(Int_t i=0; i<2; ++i)
312     for(Int_t j=0; j<2; ++j) 
313       fgVZERORecentering[i][j] = 0x0;
314 }
315
316 //________________________________________________________________
317 AliDielectronVarManager::~AliDielectronVarManager()
318 {
319   //
320   // Default destructor
321   //
322   for(Int_t i=0; i<4; ++i)
323     for(Int_t j=0; j<9; ++j)
324       if(fgMultEstimatorAvg[i][j]) delete fgMultEstimatorAvg[i][j];
325   for(Int_t i=0; i<10; ++i)
326     for(Int_t j=0; j<4; ++j)
327       if(fgTRDpidEff[i][j]) delete fgTRDpidEff[i][j];    
328   for(Int_t i=0; i<64; ++i) 
329     if(fgVZEROCalib[i]) delete fgVZEROCalib[i];
330   for(Int_t i=0; i<2; ++i)
331     for(Int_t j=0; j<2; ++j) 
332       if(fgVZERORecentering[i][j]) delete fgVZERORecentering[i][j]; 
333 }
334