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