1 #ifndef ALIDIELECTRONVARMANAGER_H
2 #define ALIDIELECTRONVARMANAGER_H
3 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //#############################################################
8 //# Class AliDielectronVarManager #
9 //# Class for management of available variables #
12 //# Anton Andronic, GSI / A.Andronic@gsi.de #
13 //# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de #
14 //# Julian Book, Uni Ffm / Julian.Book@cern.ch #
15 //# Markus Köhler, GSI / M.Koehler@gsi.de #
16 //# Frederick Kramer, Uni Ffm / Frederick.Kramer@cern.ch #
17 //# Magnus Mager, CERN / Magnus.Mager@cern.ch #
18 //# WooJin J. Park, GSI / W.J.Park@gsi.de #
19 //# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch #
21 //#############################################################
27 #include <TDatabasePDG.h>
30 #include <AliVEvent.h>
31 #include <AliESDEvent.h>
32 #include <AliAODEvent.h>
33 #include <AliMCEvent.h>
34 #include <AliVVertex.h>
35 #include <AliESDVertex.h>
36 #include <AliEventplane.h>
38 #include <AliESDVZERO.h>
39 #include <AliAODVZERO.h>
41 #include <AliVParticle.h>
42 #include <AliESDtrack.h>
43 #include <AliAODTrack.h>
44 #include <AliAODPid.h>
45 #include <AliKFParticle.h>
46 #include <AliKFVertex.h>
47 #include <AliMCParticle.h>
48 #include <AliAODMCParticle.h>
49 #include <AliVTrack.h> // ?
51 #include <AliExternalTrackParam.h>
52 #include <AliESDpid.h>
53 #include <AliCentrality.h>
54 #include <AliAODpidUtil.h>
56 #include <AliPIDResponse.h>
58 #include "AliDielectronPair.h"
59 #include "AliDielectronMC.h"
60 #include "AliDielectronPID.h"
61 #include "AliDielectronHelper.h"
65 //________________________________________________________________
66 class AliDielectronVarManager : public TNamed {
70 // Particle specific variables
75 kPt, // transverse momentum
77 kXv, // vertex position in x
78 kYv, // vertex position in y
79 kZv, // vertex position in z
82 kTheta, // theta angle
83 kEta, // pseudo-rapidity
88 kNclsITS, // number of clusters assigned in the ITS
89 kITSchi2Cl, // chi2/cl in the ITS
90 kNclsTPC, // number of clusters assigned in the TPC
91 kNclsSTPC, // number of shared clusters assigned in the TPC
92 kNclsSFracTPC, // fraction of shared clusters assigned in the TPC
93 kNclsTPCiter1, // number of clusters assigned in the TPC after first iteration
94 kNFclsTPC, // number of findable clusters in the TPC
95 kNFclsTPCr, // number of findable clusters in the TPC with more robust definition
96 kNFclsTPCrFrac, // number of found/findable clusters in the TPC with more robust definition
97 kTPCsignalN, // number of points used for dEdx
98 kTPCsignalNfrac, // fraction of points used for dEdx / cluster used for tracking
99 kTPCchi2Cl, // chi2/cl in TPC
100 kTPCclsDiff, // TPC cluster difference
101 kTrackStatus, // track status bits
103 kNclsTRD, // number of clusters assigned in the TRD
104 kTRDntracklets, // number of TRD tracklets used for tracking/PID TODO: correct getter
105 kTRDpidQuality, // number of TRD tracklets used for PID
106 kTRDprobEle, // TRD electron pid probability
107 kTRDprobPio, // TRD electron pid probability
108 kTRDphi, // Phi angle of the track at the entrance of the TRD
109 kTRDpidEffLeg, // TRD pid efficiency from conversion electrons
111 kImpactParXY, // Impact parameter in XY plane
112 kImpactParZ, // Impact parameter in Z
113 kTrackLength, // Track length
115 kPdgCode, // PDG code
116 kPdgCodeMother, // PDG code of the mother
117 kPdgCodeGrandMother, // PDG code of the grandmother
118 kNumberOfDaughters, // number of daughters
119 kHaveSameMother, // check that particles have the same mother (MC)
120 kIsJpsiPrimary, // check if the particle is primary (MC)
121 kNumberOfJPsis, // number of generated inclusive jpsis per event (MC)
122 kNumberOfJPsisPrompt, // number of generated prompt jpsis per event (MC)
123 kNumberOfJPsisNPrompt, // number of generated non-prompt jpsis per event (MC)
125 kITSsignal, // ITS dE/dx signal
126 kITSsignalSSD1, // SSD1 dE/dx signal
127 kITSsignalSSD2, // SSD2 dE/dx signal
128 kITSsignalSDD1, // SDD1 dE/dx signal
129 kITSsignalSDD2, // SDD2 dE/dx signal
130 kITSclusterMap, // ITS cluster map
131 kITSLayerFirstCls, // No of innermost ITS layer with a cluster of a track
132 kITSnSigmaEle, // number of sigmas to the dE/dx electron line in the ITS
133 kITSnSigmaPio, // number of sigmas to the dE/dx pion line in the ITS
134 kITSnSigmaMuo, // number of sigmas to the dE/dx muon line in the ITS
135 kITSnSigmaKao, // number of sigmas to the dE/dx kaon line in the ITS
136 kITSnSigmaPro, // number of sigmas to the dE/dx proton line in the ITS
138 kPIn, // momentum at inner wall of TPC (if available), used for PID
139 kPOut, // momentum at outer wall of TPC, used for TRD studies
140 kYsignedIn, // signed local y at inner wall of TPC
141 kTPCsignal, // TPC dE/dx signal
143 kTOFsignal, // TOF signal
144 kTOFbeta, // TOF beta
145 kTOFPIDBit, // TOF PID bit (1:set, 0:TOF not available)
147 kTPCnSigmaEle, // number of sigmas to the dE/dx electron line in the TPC
148 kTPCnSigmaPio, // number of sigmas to the dE/dx pion line in the TPC
149 kTPCnSigmaMuo, // number of sigmas to the dE/dx muon line in the TPC
150 kTPCnSigmaKao, // number of sigmas to the dE/dx kaon line in the TPC
151 kTPCnSigmaPro, // number of sigmas to the dE/dx proton line in the TPC
153 kTOFnSigmaEle, // number of sigmas to the electron line in the TOF
154 kTOFnSigmaPio, // number of sigmas to the pion line in the TOF
155 kTOFnSigmaMuo, // number of sigmas to the muon line in the TOF
156 kTOFnSigmaKao, // number of sigmas to the kaon line in the TOF
157 kTOFnSigmaPro, // number of sigmas to the proton line in the TOF
159 kEMCALnSigmaEle, // number of sigmas to the proton line in the TOF
161 kKinkIndex0, // kink index 0
164 // TODO: kRNClusters ??
165 // AliDielectronPair specific variables
166 kChi2NDF = kParticleMax, // Chi^2/NDF
167 kDecayLength, // decay length
168 kR, // distance to the origin
169 kOpeningAngle, // opening angle
170 // helicity picture: Z-axis is considered the direction of the mother's 3-momentum vector
171 kThetaHE, // theta in mother's rest frame in the helicity picture
172 kPhiHE, // phi in mother's rest frame in the helicity picture
173 kCos2PhiHE, // Cosine of 2*phi in mother's rest frame in the helicity picture
174 // Collins-Soper picture: Z-axis is considered the direction of the vectorial difference between
175 // the 3-mom vectors of target and projectile beams
176 kThetaCS, // theta in mother's rest frame in Collins-Soper picture
177 kPhiCS, // phi in mother's rest frame in Collins-Soper picture
178 kCos2PhiCS, // Cosine of 2*phi in mother's rest frame in the Collins-Soper picture
179 kDeltaPhiV0ArpH2, // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-A
180 kDeltaPhiV0CrpH2, // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-C
181 kDeltaPhiV0ACrpH2, // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-A + V0-C
182 kV0ArpH2FlowV2, // v2 coefficient with respect to the 2nd order reaction plane from V0-A
183 kV0CrpH2FlowV2, // v2 coefficient with respect to the 2nd order reaction plane from V0-C
184 kV0ACrpH2FlowV2, // v2 coefficient with respect to the 2nd order reaction plane from V0-A + V0-C
185 kLegDist, // distance of the legs
186 kLegDistXY, // distance of the legs in XY
187 kDeltaEta, // Absolute value of Delta Eta for the legs
188 kDeltaPhi, // Absolute value of Delta Phi for the legs
189 kMerr, // error of mass calculation
190 kDCA, // distance of closest approach TODO: not implemented yet
191 kPairType, // type of the pair, like like sign ++ unlikesign ...
192 kPseudoProperTime, // pseudo proper time
193 kPseudoProperTimeResolution, // resolution for pseudo proper decay time (reconstructed - MC truth)
194 kPseudoProperTimePull, // normalizd resolution for pseudo proper time = (reco - MC truth)/dReco
195 kTRDpidEffPair, // TRD pid efficieny from conversion electrons
197 // Event specific variables
198 kXvPrim=kPairMax, // prim vertex
199 kYvPrim, // prim vertex
200 kZvPrim, // prim vertex
201 kXRes, // primary vertex x-resolution
202 kYRes, // primary vertex y-resolution
203 kZRes, // primary vertex z-resolution
205 // v0 reaction plane quantities from AliEPSelectionTaks
206 kv0ArpH2, // VZERO-A reaction plane of the Q vector for 2nd harmonic
207 kv0CrpH2, // reaction plane
208 kv0ACrpH2, // VZERO-AC reaction plane of the Q vector for 2nd harmonic
209 kv0ATPCDiffH2, // V0A-TPC reaction plane difference for 2nd harmonic
210 kv0CTPCDiffH2, // V0C-TPC reaction plane difference for 2nd harmonic
211 kv0Av0CDiffH2, // V0A-V0C reaction plane difference for 2nd harmonic
213 kMultV0A, // VZERO multiplicity and ADC amplitudes
220 // VZERO reaction plane quantities
221 kV0AxH2=kVZEROchMult+64, // VZERO-A x-component of the Q vector for 2nd harmonic
222 kV0AyH2, // VZERO-A y-component of the Q vector for 2nd harmonic
223 kV0ArpH2, // VZERO-A reaction plane of the Q vector for 2nd harmonic
224 kV0CxH2, // VZERO-C x-component of the Q vector for 2nd harmonic
225 kV0CyH2, // y-component
226 kV0CrpH2, // reaction plane
227 kV0ACxH2, // VZERO-AC x-component of the Q vector for 2nd harmonic
228 kV0ACyH2, // VZERO-AC y-component of the Q vector for 2nd harmonic
229 kV0ACrpH2, // VZERO-AC reaction plane of the Q vector for 2nd harmonic
230 kV0ArpResH2, // 2nd harmonic reaction plane resolution for V0A
232 kV0ACrpResH2, // V0A+V0C
233 kV0XaXcH2, // Correlation quantities to check V0 reaction plane quality
239 kV0ATPCDiffH2, // V0A-TPC reaction plane difference for 2nd harmonic
240 kV0CTPCDiffH2, // V0C-TPC reaction plane difference for 2nd harmonic
241 kV0AV0CDiffH2, // V0A-V0C reaction plane difference for 2nd harmonic
242 // TPC reaction plane quantities
243 kTPCxH2, // TPC x-component of the Q vector for 2nd harmonic (corrected)
244 kTPCyH2, // TPC y-component of the Q vector for 2nd harmonic (corrected)
245 kTPCrpH2, // TPC reaction plane of the Q vector for 2nd harmonic (corrected)
246 kTPCsub1xH2, // TPC x-component of the Q vector for 2nd harmonic (corrected, sub event 1)
247 kTPCsub1yH2, // TPC y-component of the Q vector for 2nd harmonic (corrected, sub event 1)
248 kTPCsub1rpH2, // TPC reaction plane of the Q vector for 2nd harmonic (corrected, sub event 1)
249 kTPCsub2xH2, // TPC x-component of the Q vector for 2nd harmonic (corrected, sub event 2)
250 kTPCsub2yH2, // TPC y-component of the Q vector for 2nd harmonic (corrected, sub event 2)
251 kTPCsub2rpH2, // TPC reaction plane of the Q vector for 2nd harmonic (corrected, sub event 2)
252 kTPCsub12DiffH2, // TPC reaction plane difference of sub event 1,2 for 2nd harmonic
253 kTPCsub12DiffH2Sin, // TPC reaction plane difference of sub event 1,2 for 2nd harmonic, sinus term
255 kTPCxH2uc, // TPC x-component of the Q vector for 2nd harmonic (uncorrected)
256 kTPCyH2uc, // TPC y-component of the Q vector for 2nd harmonic (uncorrected)
257 kTPCrpH2uc, // TPC reaction plane of the Q vector for 2nd harmonic (uncorrected)
258 kTPCsub1xH2uc, // TPC x-component of the Q vector for 2nd harmonic (uncorrected, sub event 1)
259 kTPCsub1yH2uc, // TPC y-component of the Q vector for 2nd harmonic (uncorrected, sub event 1)
260 kTPCsub1rpH2uc, // TPC reaction plane of the Q vector for 2nd harmonic (uncorrected, sub event 1)
261 kTPCsub2xH2uc, // TPC x-component of the Q vector for 2nd harmonic (uncorrected, sub event 2)
262 kTPCsub2yH2uc, // TPC y-component of the Q vector for 2nd harmonic (uncorrected, sub event 2)
263 kTPCsub2rpH2uc, // TPC reaction plane of the Q vector for 2nd harmonic (uncorrected, sub event 2)
264 kTPCsub12DiffH2uc, // TPC reaction plane difference of sub event 1,2 for 2nd harmonic (uncorrected)
266 kNTrk, // number of tracks (or tracklets) TODO: ambiguous
267 kTracks, // ESD tracks TODO: ambiguous
268 kNacc, // Number of accepted tracks
269 kNaccTrcklts, // number of accepted SPD tracklets in |eta|<1.6
270 kNaccTrcklts0916, // number of accepted SPD tracklets in 0.9<|eta|<1.6
272 kNaccTrckltsEsd05, // number of accepted SPD tracklets in |eta|<0.5 (AliESDEvent::EstimateMultiplicity())
273 kNaccTrckltsEsd10, // number of accepted SPD tracklets in |eta|<1.0 (AliESDEvent::EstimateMultiplicity())
274 kNaccTrckltsEsd16, // number of accepted SPD tracklets in |eta|<1.6 (AliESDEvent::EstimateMultiplicity())
275 kNaccTrckltsEsd05Corr, //
276 kNaccTrckltsEsd10Corr, //
277 kNaccTrckltsEsd16Corr, //
278 kNaccItsTpcEsd05, // ITS-TPC tracks + ITS SA complementary tracks + tracklets from unassigned tracklets in |eta|<0.5 (AliESDEvent::EstimateMultiplicity())
279 kNaccItsTpcEsd10, // ITS-TPC tracks + ITS SA complementary tracks + tracklets from unassigned tracklets in |eta|<1.0 (AliESDEvent::EstimateMultiplicity())
280 kNaccItsTpcEsd16, // ITS-TPC tracks + ITS SA complementary tracks + tracklets from unassigned tracklets in |eta|<1.6 (AliESDEvent::EstimateMultiplicity())
281 kNaccItsTpcEsd05Corr, //
282 kNaccItsTpcEsd10Corr, //
283 kNaccItsTpcEsd16Corr, //
285 kNaccItsPureEsd05, // ITS SA tracks + tracklets from unassigned tracklets in |eta|<0.5 (AliESDEvent::EstimateMultiplicity())
286 kNaccItsPureEsd10, // ITS SA tracks + tracklets from unassigned tracklets in |eta|<1.0 (AliESDEvent::EstimateMultiplicity())
287 kNaccItsPureEsd16, // ITS SA tracks + tracklets from unassigned tracklets in |eta|<1.6 (AliESDEvent::EstimateMultiplicity())
288 kNaccItsPureEsd05Corr, //
289 kNaccItsPureEsd10Corr, //
290 kNaccItsPureEsd16Corr, //
292 kNch, // MC true number of charged particles in |eta|<1.6
293 kNch05, // MC true number of charged particles in |eta|<0.5
294 kNch10, // MC true number of charged particles in |eta|<1.0
296 kCentrality, // event centrality fraction
297 kNevents, // event counter
298 kRunNumber, // run number
300 // TODO: (for A+A) ZDCEnergy, impact parameter, Iflag??
304 AliDielectronVarManager();
305 AliDielectronVarManager(const char* name, const char* title);
306 virtual ~AliDielectronVarManager();
307 static void Fill(const TObject* particle, Double_t * const values);
308 static void FillVarMCParticle2(const AliVParticle *p1, const AliVParticle *p2, Double_t * const values);
310 static void InitESDpid(Int_t type=0);
311 static void InitAODpidUtil(Int_t type=0);
312 static void InitEstimatorAvg(const Char_t* filename);
313 static void InitTRDpidEffHistograms(const Char_t* filename);
314 static void SetPIDResponse(AliPIDResponse *pidResponse) {fgPIDResponse=pidResponse;}
315 static AliPIDResponse* GetPIDResponse() { return fgPIDResponse; }
316 static void SetEvent(AliVEvent * const ev);
317 static void SetEventData(const Double_t data[AliDielectronVarManager::kNMaxValues]);
318 static Bool_t GetDCA(const AliAODTrack *track, Double_t d0z0[2]);
319 static void SetTPCEventPlane(AliEventplane *const evplane);
320 static void GetVzeroRP(const AliVEvent* event, Double_t* qvec, Int_t sideOption); // 0- V0A; 1- V0C; 2- V0A+V0C
322 static TProfile* GetEstimatorHistogram(Int_t period, Int_t type) {return fgMultEstimatorAvg[period][type];}
323 static Double_t GetTRDpidEfficiency(Int_t runNo, Double_t centrality, Double_t eta, Double_t trdPhi, Double_t pout, Double_t& effErr);
325 static const AliKFVertex* GetKFVertex() {return fgKFVertex;}
327 static const char* GetValueName(Int_t i) { return (i>=0&&i<kNMaxValues)?fgkParticleNames[i]:""; }
329 static const Double_t* GetData() {return fgData;}
331 static Double_t GetValue(ValueTypes val) {return fgData[val];}
334 static const char* fgkParticleNames[kNMaxValues]; //variable names
336 static void FillVarVParticle(const AliVParticle *particle, Double_t * const values);
337 static void FillVarESDtrack(const AliESDtrack *particle, Double_t * const values);
338 static void FillVarAODTrack(const AliAODTrack *particle, Double_t * const values);
339 static void FillVarMCParticle(const AliMCParticle *particle, Double_t * const values);
340 static void FillVarAODMCParticle(const AliAODMCParticle *particle, Double_t * const values);
341 static void FillVarDielectronPair(const AliDielectronPair *pair, Double_t * const values);
342 static void FillVarKFParticle(const AliKFParticle *pair, Double_t * const values);
344 static void FillVarVEvent(const AliVEvent *event, Double_t * const values);
345 static void FillVarESDEvent(const AliESDEvent *event, Double_t * const values);
346 static void FillVarAODEvent(const AliAODEvent *event, Double_t * const values);
347 static void FillVarMCEvent(const AliMCEvent *event, Double_t * const values);
348 static void FillVarTPCEventPlane(const AliEventplane *evplane, Double_t * const values);
350 static AliPIDResponse *fgPIDResponse; // PID response object
351 static AliVEvent *fgEvent; // current event pointer
352 static AliEventplane *fgTPCEventPlane; // current event plane pointer
353 static AliKFVertex *fgKFVertex; // kf vertex
354 static TProfile *fgMultEstimatorAvg[4][9]; // multiplicity estimator averages (4 periods x 9 estimators)
355 static Double_t fgTRDpidEffCentRanges[10][4]; // centrality ranges for the TRD pid efficiency histograms
356 static TH3D *fgTRDpidEff[10][4]; // TRD pid efficiencies from conversion electrons
358 static Double_t fgData[kNMaxValues]; //! data
360 AliDielectronVarManager(const AliDielectronVarManager &c);
361 AliDielectronVarManager &operator=(const AliDielectronVarManager &c);
363 ClassDef(AliDielectronVarManager,1);
368 inline void AliDielectronVarManager::Fill(const TObject* object, Double_t * const values)
371 // Main function to fill all available variables according to the type of particle
373 // if (!object) return;
374 if (object->IsA() == AliESDtrack::Class()) FillVarESDtrack(static_cast<const AliESDtrack*>(object), values);
375 else if (object->IsA() == AliAODTrack::Class()) FillVarAODTrack(static_cast<const AliAODTrack*>(object), values);
376 else if (object->IsA() == AliMCParticle::Class()) FillVarMCParticle(static_cast<const AliMCParticle*>(object), values);
377 else if (object->IsA() == AliAODMCParticle::Class()) FillVarAODMCParticle(static_cast<const AliAODMCParticle*>(object), values);
378 else if (object->IsA() == AliDielectronPair::Class()) FillVarDielectronPair(static_cast<const AliDielectronPair*>(object), values);
379 else if (object->IsA() == AliKFParticle::Class()) FillVarKFParticle(static_cast<const AliKFParticle*>(object),values);
380 // Main function to fill all available variables according to the type of event
382 else if (object->IsA() == AliVEvent::Class()) FillVarVEvent(static_cast<const AliVEvent*>(object), values);
383 else if (object->IsA() == AliESDEvent::Class()) FillVarESDEvent(static_cast<const AliESDEvent*>(object), values);
384 else if (object->IsA() == AliAODEvent::Class()) FillVarAODEvent(static_cast<const AliAODEvent*>(object), values);
385 else if (object->IsA() == AliMCEvent::Class()) FillVarMCEvent(static_cast<const AliMCEvent*>(object), values);
386 else if (object->IsA() == AliEventplane::Class()) FillVarTPCEventPlane(static_cast<const AliEventplane*>(object), values);
387 // else printf(Form("AliDielectronVarManager::Fill: Type %s is not supported by AliDielectronVarManager!", object->ClassName())); //TODO: implement without object needed
390 inline void AliDielectronVarManager::FillVarVParticle(const AliVParticle *particle, Double_t * const values)
393 // Fill track information available in AliVParticle into an array
395 values[AliDielectronVarManager::kPx] = particle->Px();
396 values[AliDielectronVarManager::kPy] = particle->Py();
397 values[AliDielectronVarManager::kPz] = particle->Pz();
398 values[AliDielectronVarManager::kPt] = particle->Pt();
399 values[AliDielectronVarManager::kP] = particle->P();
401 values[AliDielectronVarManager::kXv] = particle->Xv();
402 values[AliDielectronVarManager::kYv] = particle->Yv();
403 values[AliDielectronVarManager::kZv] = particle->Zv();
405 values[AliDielectronVarManager::kOneOverPt] = (particle->Pt()>1.0e-3 ? particle->OneOverPt() : 0.0);
406 values[AliDielectronVarManager::kPhi] = particle->Phi();
407 values[AliDielectronVarManager::kTheta] = particle->Theta();
408 values[AliDielectronVarManager::kEta] = particle->Eta();
409 values[AliDielectronVarManager::kY] = particle->Y();
411 values[AliDielectronVarManager::kE] = particle->E();
412 values[AliDielectronVarManager::kM] = particle->M();
413 values[AliDielectronVarManager::kCharge] = particle->Charge();
415 values[AliDielectronVarManager::kPdgCode] = particle->PdgCode();
417 // if ( fgEvent ) AliDielectronVarManager::Fill(fgEvent, values);
418 for (Int_t i=AliDielectronVarManager::kPairMax; i<AliDielectronVarManager::kNMaxValues; ++i)
422 inline void AliDielectronVarManager::FillVarESDtrack(const AliESDtrack *particle, Double_t * const values)
425 // Fill track information available for histogramming into an array
428 // Fill common AliVParticle interface information
429 FillVarVParticle(particle, values);
431 AliESDtrack *esdTrack=0x0;
432 Double_t origdEdx=particle->GetTPCsignal();
434 // apply ETa correction, remove once this is in the tender
435 if( AliDielectronPID::GetEtaCorrFunction() ){
436 esdTrack=const_cast<AliESDtrack*>(particle);
437 esdTrack->SetTPCsignal(origdEdx/AliDielectronPID::GetEtaCorr(esdTrack),esdTrack->GetTPCsignalSigma(),esdTrack->GetTPCsignalN());
440 Double_t pidProbs[AliPID::kSPECIES];
441 // Fill AliESDtrack interface specific information
442 Double_t tpcNcls=particle->GetTPCNcls();
443 Double_t tpcNclsS = particle->GetTPCnclsS();
444 Double_t itsNcls=particle->GetNcls(0);
445 Double_t tpcSignalN=particle->GetTPCsignalN();
446 values[AliDielectronVarManager::kNclsITS] = itsNcls; // TODO: get rid of the plain numbers
447 values[AliDielectronVarManager::kNclsTPC] = tpcNcls; // TODO: get rid of the plain numbers
448 values[AliDielectronVarManager::kNclsSTPC] = tpcNclsS;
449 values[AliDielectronVarManager::kNclsSFracTPC] = tpcNcls>0?tpcNclsS/tpcNcls:0;
450 values[AliDielectronVarManager::kNclsTPCiter1] = particle->GetTPCNclsIter1(); // TODO: get rid of the plain numbers
451 values[AliDielectronVarManager::kNFclsTPC] = particle->GetTPCNclsF();
452 values[AliDielectronVarManager::kNFclsTPCr] = particle->GetTPCClusterInfo(2,1);
453 values[AliDielectronVarManager::kNFclsTPCrFrac] = particle->GetTPCClusterInfo(2);
454 values[AliDielectronVarManager::kTPCsignalN] = tpcSignalN;
455 values[AliDielectronVarManager::kTPCsignalNfrac]= tpcNcls>0?tpcSignalN/tpcNcls:0;
456 values[AliDielectronVarManager::kNclsTRD] = particle->GetNcls(2); // TODO: get rid of the plain numbers
457 values[AliDielectronVarManager::kTRDntracklets] = particle->GetTRDntracklets(); // TODO: GetTRDtracklets/GetTRDntracklets?
458 values[AliDielectronVarManager::kTRDpidQuality] = particle->GetTRDpidQuality();
459 values[AliDielectronVarManager::kTPCclsDiff] = tpcSignalN-tpcNcls;
460 values[AliDielectronVarManager::kTrackStatus] = (Double_t)particle->GetStatus();
463 values[AliDielectronVarManager::kTPCchi2Cl] = -1;
464 if (tpcNcls>0) values[AliDielectronVarManager::kTPCchi2Cl] = particle->GetTPCchi2() / tpcNcls;
465 values[AliDielectronVarManager::kITSchi2Cl] = -1;
466 if (itsNcls>0) values[AliDielectronVarManager::kITSchi2Cl] = particle->GetITSchi2() / itsNcls;
468 particle->GetTRDpid(pidProbs);
469 values[AliDielectronVarManager::kTRDprobEle] = pidProbs[AliPID::kElectron];
470 values[AliDielectronVarManager::kTRDprobPio] = pidProbs[AliPID::kPion];
472 values[AliDielectronVarManager::kKinkIndex0] = particle->GetKinkIndex(0);
474 Float_t impactParXY, impactParZ;
475 particle->GetImpactParameters(impactParXY, impactParZ);
476 values[AliDielectronVarManager::kImpactParXY] = impactParXY;
477 values[AliDielectronVarManager::kImpactParZ] = impactParZ;
480 values[AliDielectronVarManager::kPdgCode]=-1;
481 values[AliDielectronVarManager::kPdgCodeMother]=-1;
482 values[AliDielectronVarManager::kPdgCodeGrandMother]=-1;
484 values[AliDielectronVarManager::kNumberOfDaughters]=-999;
486 AliDielectronMC *mc=AliDielectronMC::Instance();
489 if (mc->GetMCTrack(particle))
490 values[AliDielectronVarManager::kPdgCode]=mc->GetMCTrack(particle)->PdgCode();
492 AliMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother
494 values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
496 motherMC=mc->GetMCTrackMother(motherMC); //grand motherMC
497 if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
500 values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle);
505 values[AliDielectronVarManager::kITSsignal] = particle->GetITSsignal();
508 particle->GetITSdEdxSamples(itsdEdx);
510 values[AliDielectronVarManager::kITSsignalSSD1] = itsdEdx[0];
511 values[AliDielectronVarManager::kITSsignalSSD2] = itsdEdx[1];
512 values[AliDielectronVarManager::kITSsignalSDD1] = itsdEdx[2];
513 values[AliDielectronVarManager::kITSsignalSDD2] = itsdEdx[3];
514 values[AliDielectronVarManager::kITSclusterMap] = particle->GetITSClusterMap();
515 values[AliDielectronVarManager::kITSLayerFirstCls] = -1.;
517 for (Int_t iC=0; iC<6; iC++) {
518 if (((particle->GetITSClusterMap()) & (1<<(iC))) > 0) {
519 values[AliDielectronVarManager::kITSLayerFirstCls] = iC;
525 values[AliDielectronVarManager::kTrackLength] = particle->GetIntegratedLength();
527 Double_t mom = particle->GetP();
528 const AliExternalTrackParam *in=particle->GetInnerParam();
529 Double_t ysignedIn=-100;
532 ysignedIn=particle->Charge()*in->GetY();
534 values[AliDielectronVarManager::kPIn]=mom;
535 values[AliDielectronVarManager::kYsignedIn]=ysignedIn;
536 const AliExternalTrackParam *out=particle->GetOuterParam();
537 if(out) values[AliDielectronVarManager::kPOut] = out->GetP();
538 else values[AliDielectronVarManager::kPOut] = mom;
540 Double_t localCoord[3]={0.0};
541 Bool_t localCoordGood = out->GetXYZAt(298.0, ((AliESDEvent*)fgEvent)->GetMagneticField(), localCoord);
542 values[AliDielectronVarManager::kTRDphi] = (localCoordGood && TMath::Abs(localCoord[0])>1.0e-6 && TMath::Abs(localCoord[1])>1.0e-6 ? TMath::ATan2(localCoord[1], localCoord[0]) : -999.);
544 if(mc->HasMC() && fgTRDpidEff[0][0]) {
545 Int_t runNo = (fgEvent ? fgEvent->GetRunNumber() : -1);
546 Float_t centrality=-1.0;
547 AliCentrality *esdCentrality = (fgEvent ? fgEvent->GetCentrality() : 0x0);
548 if(esdCentrality) centrality = esdCentrality->GetCentralityPercentile("V0M");
550 values[kTRDpidEffLeg] = GetTRDpidEfficiency(runNo, centrality, values[AliDielectronVarManager::kEta],
551 values[AliDielectronVarManager::kTRDphi],
552 values[AliDielectronVarManager::kPOut], effErr);
554 values[AliDielectronVarManager::kTPCsignal]=particle->GetTPCsignal();
556 values[AliDielectronVarManager::kTOFsignal]=particle->GetTOFsignal();
558 Double_t l = particle->GetIntegratedLength(); // cm
559 Double_t t = particle->GetTOFsignal();
560 Double_t t0 = fgPIDResponse->GetTOFResponse().GetTimeZero(); // ps
562 if( (l < 360. || l > 800.) || (t <= 0.) || (t0 >999990.0) ) {
563 values[AliDielectronVarManager::kTOFbeta]=0.0;
566 t -= t0; // subtract the T0
568 t *= 1e-12; //ps -> s
571 Float_t beta = v / TMath::C();
572 values[AliDielectronVarManager::kTOFbeta]=beta;
574 values[AliDielectronVarManager::kTOFPIDBit]=(particle->GetStatus()&AliESDtrack::kTOFpid? 1: 0);
576 // nsigma to Electron band
577 // TODO: for the moment we set the bethe bloch parameters manually
578 // this should be changed in future!
580 values[AliDielectronVarManager::kTPCnSigmaEle]=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kElectron)-AliDielectronPID::GetCorrVal();
581 values[AliDielectronVarManager::kTPCnSigmaPio]=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kPion);
582 values[AliDielectronVarManager::kTPCnSigmaMuo]=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kMuon);
583 values[AliDielectronVarManager::kTPCnSigmaKao]=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kKaon);
584 values[AliDielectronVarManager::kTPCnSigmaPro]=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kProton);
586 values[AliDielectronVarManager::kITSnSigmaEle]=fgPIDResponse->NumberOfSigmasITS(particle,AliPID::kElectron);
587 values[AliDielectronVarManager::kITSnSigmaPio]=fgPIDResponse->NumberOfSigmasITS(particle,AliPID::kPion);
588 values[AliDielectronVarManager::kITSnSigmaMuo]=fgPIDResponse->NumberOfSigmasITS(particle,AliPID::kMuon);
589 values[AliDielectronVarManager::kITSnSigmaKao]=fgPIDResponse->NumberOfSigmasITS(particle,AliPID::kKaon);
590 values[AliDielectronVarManager::kITSnSigmaPro]=fgPIDResponse->NumberOfSigmasITS(particle,AliPID::kProton);
592 values[AliDielectronVarManager::kTOFnSigmaEle]=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kElectron);
593 values[AliDielectronVarManager::kTOFnSigmaPio]=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kPion);
594 values[AliDielectronVarManager::kTOFnSigmaMuo]=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kMuon);
595 values[AliDielectronVarManager::kTOFnSigmaKao]=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kKaon);
596 values[AliDielectronVarManager::kTOFnSigmaPro]=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kProton);
598 values[AliDielectronVarManager::kEMCALnSigmaEle]=fgPIDResponse->NumberOfSigmasEMCAL(particle,AliPID::kElectron);
600 //restore TPC signal if it was changed
601 if (esdTrack) esdTrack->SetTPCsignal(origdEdx,esdTrack->GetTPCsignalSigma(),esdTrack->GetTPCsignalN());
604 inline void AliDielectronVarManager::FillVarAODTrack(const AliAODTrack *particle, Double_t * const values)
607 // Fill track information available for histogramming into an array
610 // Fill common AliVParticle interface information
611 FillVarVParticle(particle, values);
612 Double_t tpcNcls=particle->GetTPCNcls();
614 //GetNclsS not present in AODtrack
615 //Replace with method as soon as available
616 TBits tpcSharedMap = particle->GetTPCSharedMap();
617 Double_t tpcNclsS= tpcSharedMap.CountBits(0)-tpcSharedMap.CountBits(159);
618 // Reset AliESDtrack interface specific information
619 values[AliDielectronVarManager::kNclsITS] = 0;
620 values[AliDielectronVarManager::kITSchi2Cl] = -1;
621 values[AliDielectronVarManager::kNclsTPC] = tpcNcls;
622 values[AliDielectronVarManager::kNclsSTPC] = tpcNclsS;
623 values[AliDielectronVarManager::kNclsSFracTPC] = tpcNcls>0?tpcNclsS/tpcNcls:0;
624 values[AliDielectronVarManager::kNclsTPCiter1] = tpcNcls; // not really available in AOD
625 values[AliDielectronVarManager::kNFclsTPC] = 0;
626 values[AliDielectronVarManager::kNFclsTPCr] = 0;
627 values[AliDielectronVarManager::kNFclsTPCrFrac] = 0;
628 values[AliDielectronVarManager::kNclsTRD] = 0;
629 values[AliDielectronVarManager::kTRDntracklets] = 0;
630 values[AliDielectronVarManager::kTRDpidQuality] = 0;
632 values[AliDielectronVarManager::kTPCchi2Cl] = -1;
633 values[AliDielectronVarManager::kTrackStatus] = (Double_t)particle->GetStatus();
636 //TODO: set correctly
637 values[AliDielectronVarManager::kTRDprobEle] = 0;
638 values[AliDielectronVarManager::kTRDprobPio] = 0;
640 values[AliDielectronVarManager::kTPCsignalN] = 0;
641 values[AliDielectronVarManager::kTPCsignalNfrac]= 0;
643 // Fill AliAODTrack interface information
646 GetDCA(particle, d0z0);
647 values[AliDielectronVarManager::kImpactParXY] = d0z0[0];
648 values[AliDielectronVarManager::kImpactParZ] = d0z0[1];
650 values[AliDielectronVarManager::kPIn]=0;
651 values[AliDielectronVarManager::kTPCsignal]=0;
653 values[AliDielectronVarManager::kTOFsignal]=0;
654 values[AliDielectronVarManager::kTOFbeta]=0;
656 values[AliDielectronVarManager::kTPCnSigmaEle]=0;
657 values[AliDielectronVarManager::kTPCnSigmaPio]=0;
658 values[AliDielectronVarManager::kTPCnSigmaMuo]=0;
659 values[AliDielectronVarManager::kTPCnSigmaKao]=0;
660 values[AliDielectronVarManager::kTPCnSigmaPro]=0;
662 values[AliDielectronVarManager::kITSclusterMap] = particle->GetITSClusterMap();
664 AliAODPid *pid=particle->GetDetPid();
666 Double_t mom =pid->GetTPCmomentum();
667 Double_t tpcSignalN=pid->GetTPCsignalN();
668 values[AliDielectronVarManager::kTPCsignalN] = tpcSignalN;
669 values[AliDielectronVarManager::kTPCsignalN] = tpcNcls>0?tpcSignalN/tpcNcls:0;
670 values[AliDielectronVarManager::kTPCclsDiff] = tpcSignalN-tpcNcls;
671 Double_t tpcNsigmaEle=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kElectron);
672 Double_t tpcNsigmaPio=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kPion);
673 Double_t tpcNsigmaMuo=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kMuon);
674 Double_t tpcNsigmaKao=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kKaon);
675 Double_t tpcNsigmaPro=fgPIDResponse->NumberOfSigmasTPC(particle,AliPID::kProton);
677 values[AliDielectronVarManager::kPIn]=mom;
678 values[AliDielectronVarManager::kTPCsignal]=pid->GetTPCsignal();
680 values[AliDielectronVarManager::kTPCnSigmaEle]=tpcNsigmaEle;
681 values[AliDielectronVarManager::kTPCnSigmaPio]=tpcNsigmaPio;
682 values[AliDielectronVarManager::kTPCnSigmaMuo]=tpcNsigmaMuo;
683 values[AliDielectronVarManager::kTPCnSigmaKao]=tpcNsigmaKao;
684 values[AliDielectronVarManager::kTPCnSigmaPro]=tpcNsigmaPro;
686 values[AliDielectronVarManager::kTRDntracklets] = 0;
687 values[AliDielectronVarManager::kTRDpidQuality] = 0;
689 Double_t tofNsigmaEle=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kElectron);
690 Double_t tofNsigmaPio=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kPion);
691 Double_t tofNsigmaMuo=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kMuon);
692 Double_t tofNsigmaKao=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kKaon);
693 Double_t tofNsigmaPro=fgPIDResponse->NumberOfSigmasTOF(particle,AliPID::kProton);
695 values[AliDielectronVarManager::kTOFnSigmaEle]=tofNsigmaEle;
696 values[AliDielectronVarManager::kTOFnSigmaPio]=tofNsigmaPio;
697 values[AliDielectronVarManager::kTOFnSigmaMuo]=tofNsigmaMuo;
698 values[AliDielectronVarManager::kTOFnSigmaKao]=tofNsigmaKao;
699 values[AliDielectronVarManager::kTOFnSigmaPro]=tofNsigmaPro;
703 values[AliDielectronVarManager::kPdgCode]=-1;
704 values[AliDielectronVarManager::kPdgCodeMother]=-1;
705 values[AliDielectronVarManager::kPdgCodeGrandMother]=-1;
707 values[AliDielectronVarManager::kNumberOfDaughters]=-999;
709 AliDielectronMC *mc=AliDielectronMC::Instance();
712 if (mc->GetMCTrack(particle))
713 values[AliDielectronVarManager::kPdgCode]=mc->GetMCTrack(particle)->PdgCode();
715 AliAODMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother
717 values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
719 motherMC=mc->GetMCTrackMother(motherMC); //grand motherMC
720 if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
723 values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle);
726 values[AliDielectronVarManager::kTOFPIDBit]=(particle->GetStatus()&AliESDtrack::kTOFpid? 1: 0);
729 inline void AliDielectronVarManager::FillVarMCParticle(const AliMCParticle *particle, Double_t * const values)
732 // Fill track information available for histogramming into an array
735 values[AliDielectronVarManager::kNclsITS] = 0;
736 values[AliDielectronVarManager::kITSchi2Cl] = 0;
737 values[AliDielectronVarManager::kNclsTPC] = 0;
738 values[AliDielectronVarManager::kNclsSTPC] = 0;
739 values[AliDielectronVarManager::kNclsSFracTPC] = 0;
740 values[AliDielectronVarManager::kNclsTPCiter1] = 0;
741 values[AliDielectronVarManager::kNFclsTPC] = 0;
742 values[AliDielectronVarManager::kNFclsTPCr] = 0;
743 values[AliDielectronVarManager::kNFclsTPCrFrac] = 0;
744 values[AliDielectronVarManager::kNclsTRD] = 0;
745 values[AliDielectronVarManager::kTRDntracklets] = 0;
746 values[AliDielectronVarManager::kTRDpidQuality] = 0;
747 values[AliDielectronVarManager::kTPCchi2Cl] = 0;
748 values[AliDielectronVarManager::kTrackStatus] = 0;
749 values[AliDielectronVarManager::kTRDprobEle] = 0;
750 values[AliDielectronVarManager::kTRDprobPio] = 0;
751 values[AliDielectronVarManager::kTPCsignalN] = 0;
752 values[AliDielectronVarManager::kTPCclsDiff] = 0;
753 values[AliDielectronVarManager::kTPCsignalNfrac] = 0;
754 values[AliDielectronVarManager::kImpactParXY] = 0;
755 values[AliDielectronVarManager::kImpactParZ] = 0;
756 values[AliDielectronVarManager::kPIn] = 0;
757 values[AliDielectronVarManager::kYsignedIn] = 0;
758 values[AliDielectronVarManager::kTPCsignal] = 0;
759 values[AliDielectronVarManager::kTOFsignal] = 0;
760 values[AliDielectronVarManager::kTOFbeta] = 0;
761 values[AliDielectronVarManager::kTPCnSigmaEle] = 0;
762 values[AliDielectronVarManager::kTPCnSigmaPio] = 0;
763 values[AliDielectronVarManager::kTPCnSigmaMuo] = 0;
764 values[AliDielectronVarManager::kTPCnSigmaKao] = 0;
765 values[AliDielectronVarManager::kTPCnSigmaPro] = 0;
766 values[AliDielectronVarManager::kITSclusterMap] = 0;
768 values[AliDielectronVarManager::kPdgCode] = -1;
769 values[AliDielectronVarManager::kPdgCodeMother] = -1;
770 values[AliDielectronVarManager::kPdgCodeGrandMother] = -1;
772 // Fill common AliVParticle interface information
773 FillVarVParticle(particle, values);
775 AliDielectronMC *mc=AliDielectronMC::Instance();
777 // Fill AliMCParticle interface specific information
778 values[AliDielectronVarManager::kPdgCode] = particle->PdgCode();
780 AliMCParticle *motherMC = mc->GetMCTrackMother(particle);
782 values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
783 motherMC=mc->GetMCTrackMother(motherMC); //grand mother
784 if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
787 values[AliDielectronVarManager::kIsJpsiPrimary] = mc->IsJpsiPrimary(particle);
788 values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle);
792 inline void AliDielectronVarManager::FillVarMCParticle2(const AliVParticle *p1, const AliVParticle *p2, Double_t * const values) {
794 // fill 2 track information starting from MC legs
797 values[AliDielectronVarManager::kNclsITS] = 0;
798 values[AliDielectronVarManager::kITSchi2Cl] = -1;
799 values[AliDielectronVarManager::kNclsTPC] = 0;
800 values[AliDielectronVarManager::kNclsSTPC] = 0;
801 values[AliDielectronVarManager::kNclsSFracTPC] = 0;
802 values[AliDielectronVarManager::kNclsTPCiter1] = 0;
803 values[AliDielectronVarManager::kNFclsTPC] = 0;
804 values[AliDielectronVarManager::kNFclsTPCr] = 0;
805 values[AliDielectronVarManager::kNFclsTPCrFrac] = 0;
806 values[AliDielectronVarManager::kNclsTRD] = 0;
807 values[AliDielectronVarManager::kTRDntracklets] = 0;
808 values[AliDielectronVarManager::kTRDpidQuality] = 0;
809 values[AliDielectronVarManager::kTPCchi2Cl] = 0;
810 values[AliDielectronVarManager::kTrackStatus] = 0;
811 values[AliDielectronVarManager::kTRDprobEle] = 0;
812 values[AliDielectronVarManager::kTRDprobPio] = 0;
813 values[AliDielectronVarManager::kTPCsignalN] = 0;
814 values[AliDielectronVarManager::kTPCclsDiff] = 0;
815 values[AliDielectronVarManager::kTPCsignalNfrac] = 0;
816 values[AliDielectronVarManager::kImpactParXY] = 0;
817 values[AliDielectronVarManager::kImpactParZ] = 0;
818 values[AliDielectronVarManager::kPIn] = 0;
819 values[AliDielectronVarManager::kYsignedIn] = 0;
820 values[AliDielectronVarManager::kTPCsignal] = 0;
821 values[AliDielectronVarManager::kTPCnSigmaEle] = 0;
822 values[AliDielectronVarManager::kTPCnSigmaPio] = 0;
823 values[AliDielectronVarManager::kTPCnSigmaMuo] = 0;
824 values[AliDielectronVarManager::kTPCnSigmaKao] = 0;
825 values[AliDielectronVarManager::kTPCnSigmaPro] = 0;
826 values[AliDielectronVarManager::kITSclusterMap] = 0;
828 values[AliDielectronVarManager::kPdgCode] = 0;
829 values[AliDielectronVarManager::kPdgCodeMother] = 0;
831 AliDielectronMC *mc=AliDielectronMC::Instance();
832 AliVParticle* mother=0x0;
833 Int_t mLabel1 = mc->GetMothersLabel(p1->GetLabel());
834 Int_t mLabel2 = mc->GetMothersLabel(p2->GetLabel());
836 mother = mc->GetMCTrackFromMCEvent(mLabel1);
838 values[AliDielectronVarManager::kPseudoProperTime] = -2e10;
839 if(mother) { // same mother
840 FillVarVParticle(mother, values);
841 Double_t lxy = ((mother->Xv()- values[AliDielectronVarManager::kXvPrim]) * mother->Px() +
842 (mother->Yv()- values[AliDielectronVarManager::kYvPrim]) * mother->Py() )/mother->Pt();
843 values[AliDielectronVarManager::kPseudoProperTime] = lxy*(TDatabasePDG::Instance()->GetParticle(443)->Mass())/mother->Pt();
845 else { // the 2 particles come from different mothers so 2-particles quantities are calculated here
847 values[AliDielectronVarManager::kPx] = p1->Px()+p2->Px();
848 values[AliDielectronVarManager::kPy] = p1->Py()+p2->Py();
849 values[AliDielectronVarManager::kPz] = p1->Pz()+p2->Pz();
850 values[AliDielectronVarManager::kPt] = TMath::Sqrt(values[AliDielectronVarManager::kPx]*
851 values[AliDielectronVarManager::kPx]+
852 values[AliDielectronVarManager::kPy]*
853 values[AliDielectronVarManager::kPy]);
854 values[AliDielectronVarManager::kP] = TMath::Sqrt(values[AliDielectronVarManager::kPt]*
855 values[AliDielectronVarManager::kPt]+
856 values[AliDielectronVarManager::kPz]*
857 values[AliDielectronVarManager::kPz]);
859 values[AliDielectronVarManager::kXv] = 0;
860 values[AliDielectronVarManager::kYv] = 0;
861 values[AliDielectronVarManager::kZv] = 0;
863 values[AliDielectronVarManager::kOneOverPt] = (values[AliDielectronVarManager::kPt]>1.0e-6 ? 1.0/values[AliDielectronVarManager::kPt] : 0.0);
864 values[AliDielectronVarManager::kPhi] = TMath::ATan2(values[AliDielectronVarManager::kPy],values[AliDielectronVarManager::kPx]);
865 values[AliDielectronVarManager::kTheta] = TMath::ATan2(values[AliDielectronVarManager::kPt],values[AliDielectronVarManager::kPz]);
866 values[AliDielectronVarManager::kEta] = ((values[AliDielectronVarManager::kP]-values[AliDielectronVarManager::kPz])>1.0e-6 && (values[AliDielectronVarManager::kP]+values[AliDielectronVarManager::kPz])>1.0e-6 ? 0.5*TMath::Log((values[AliDielectronVarManager::kP]+values[AliDielectronVarManager::kPz])/(values[AliDielectronVarManager::kP]-values[AliDielectronVarManager::kPz])) : -9999.);
867 values[AliDielectronVarManager::kE] = p1->E()+p2->E();
868 values[AliDielectronVarManager::kY] = ((values[AliDielectronVarManager::kE]-values[AliDielectronVarManager::kPz])>1.0e-6 && (values[AliDielectronVarManager::kE]+values[AliDielectronVarManager::kPz])>1.0e-6 ? 0.5*TMath::Log((values[AliDielectronVarManager::kE]+values[AliDielectronVarManager::kPz])/(values[AliDielectronVarManager::kE]-values[AliDielectronVarManager::kPz])) : -9999.);
869 values[AliDielectronVarManager::kCharge] = p1->Charge()+p2->Charge();
871 values[AliDielectronVarManager::kM] = TMath::Sqrt(p1->M()*p1->M()+p2->M()*p2->M()+
872 2.0*(p1->E()*p2->E()-p1->Px()*p2->Px()-p1->Py()*p2->Py()-p1->Pz()*p2->Pz()));
874 if ( fgEvent ) AliDielectronVarManager::Fill(fgEvent, values);
876 values[AliDielectronVarManager::kThetaHE] = AliDielectronPair::ThetaPhiCM(p1,p2,kTRUE, kTRUE);
877 values[AliDielectronVarManager::kPhiHE] = AliDielectronPair::ThetaPhiCM(p1,p2,kTRUE, kFALSE);
878 values[AliDielectronVarManager::kCos2PhiHE] = TMath::Cos(2*values[AliDielectronVarManager::kPhiHE]);
879 values[AliDielectronVarManager::kThetaCS] = AliDielectronPair::ThetaPhiCM(p1,p2,kFALSE, kTRUE);
880 values[AliDielectronVarManager::kPhiCS] = AliDielectronPair::ThetaPhiCM(p1,p2,kFALSE, kFALSE);
881 values[AliDielectronVarManager::kCos2PhiCS] = TMath::Cos(2*values[AliDielectronVarManager::kPhiCS]);
885 inline void AliDielectronVarManager::FillVarAODMCParticle(const AliAODMCParticle *particle, Double_t * const values)
888 // Fill track information available for histogramming into an array
891 values[AliDielectronVarManager::kNclsITS] = 0;
892 values[AliDielectronVarManager::kITSchi2Cl] = -1;
893 values[AliDielectronVarManager::kNclsTPC] = 0;
894 values[AliDielectronVarManager::kNclsSTPC] = 0;
895 values[AliDielectronVarManager::kNclsSFracTPC] = 0;
896 values[AliDielectronVarManager::kNclsTPCiter1] = 0;
897 values[AliDielectronVarManager::kNFclsTPC] = 0;
898 values[AliDielectronVarManager::kNclsTRD] = 0;
899 values[AliDielectronVarManager::kTRDntracklets] = 0;
900 values[AliDielectronVarManager::kTRDpidQuality] = 0;
901 values[AliDielectronVarManager::kTPCchi2Cl] = 0;
902 values[AliDielectronVarManager::kTrackStatus] = 0;
903 values[AliDielectronVarManager::kTRDprobEle] = 0;
904 values[AliDielectronVarManager::kTRDprobPio] = 0;
905 values[AliDielectronVarManager::kTPCsignalN] = 0;
906 values[AliDielectronVarManager::kTPCclsDiff] = 0;
907 values[AliDielectronVarManager::kTPCsignalNfrac]= 0;
908 values[AliDielectronVarManager::kImpactParXY] = 0;
909 values[AliDielectronVarManager::kImpactParZ] = 0;
910 values[AliDielectronVarManager::kPIn] = 0;
911 values[AliDielectronVarManager::kYsignedIn] = 0;
912 values[AliDielectronVarManager::kTPCsignal] = 0;
913 values[AliDielectronVarManager::kTPCnSigmaEle] = 0;
914 values[AliDielectronVarManager::kTPCnSigmaPio] = 0;
915 values[AliDielectronVarManager::kTPCnSigmaMuo] = 0;
916 values[AliDielectronVarManager::kTPCnSigmaKao] = 0;
917 values[AliDielectronVarManager::kTPCnSigmaPro] = 0;
918 values[AliDielectronVarManager::kITSclusterMap] = 0;
920 values[AliDielectronVarManager::kPdgCode] = -1;
921 values[AliDielectronVarManager::kPdgCodeMother] = -1;
922 values[AliDielectronVarManager::kPdgCodeGrandMother] = -1;
924 // Fill common AliVParticle interface information
925 FillVarVParticle(particle, values);
927 AliDielectronMC *mc=AliDielectronMC::Instance();
930 // Fill AliAODMCParticle interface specific information
931 values[AliDielectronVarManager::kPdgCode] = particle->PdgCode();
933 AliAODMCParticle *motherMC = mc->GetMCTrackMother(particle);
935 values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
936 motherMC=mc->GetMCTrackMother(motherMC); //grand mother
937 if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
941 values[AliDielectronVarManager::kIsJpsiPrimary] = mc->IsJpsiPrimary(particle);
943 values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle);
946 inline void AliDielectronVarManager::FillVarDielectronPair(const AliDielectronPair *pair, Double_t * const values)
949 // Fill pair information available for histogramming into an array
952 values[AliDielectronVarManager::kPdgCode]=-1;
953 values[AliDielectronVarManager::kPdgCodeMother]=-1;
954 values[AliDielectronVarManager::kPdgCodeGrandMother]=-1;
956 // Fill common AliVParticle interface information
957 FillVarVParticle(pair, values);
959 // Fill AliDielectronPair specific information
960 const AliKFParticle &kfPair = pair->GetKFParticle();
967 pair->GetThetaPhiCM(thetaHE,phiHE,thetaCS,phiCS);
969 values[AliDielectronVarManager::kChi2NDF] = kfPair.GetChi2()/kfPair.GetNDF();
970 values[AliDielectronVarManager::kDecayLength] = kfPair.GetDecayLength();
971 values[AliDielectronVarManager::kR] = kfPair.GetR();
972 values[AliDielectronVarManager::kOpeningAngle] = pair->OpeningAngle();
973 values[AliDielectronVarManager::kThetaHE] = thetaHE;
974 values[AliDielectronVarManager::kPhiHE] = phiHE;
975 values[AliDielectronVarManager::kCos2PhiHE] = TMath::Cos(2.0*phiHE);
976 values[AliDielectronVarManager::kThetaCS] = thetaCS;
977 values[AliDielectronVarManager::kPhiCS] = phiCS;
978 values[AliDielectronVarManager::kCos2PhiCS] = TMath::Cos(2.0*phiCS);
979 values[AliDielectronVarManager::kLegDist] = pair->DistanceDaughters();
980 values[AliDielectronVarManager::kLegDistXY] = pair->DistanceDaughtersXY();
981 values[AliDielectronVarManager::kDeltaEta] = pair->DeltaEta();
982 values[AliDielectronVarManager::kDeltaPhi] = pair->DeltaPhi();
983 values[AliDielectronVarManager::kMerr] = kfPair.GetErrMass()>1e-30&&kfPair.GetMass()>1e-30?kfPair.GetErrMass()/kfPair.GetMass():1000000;
984 values[AliDielectronVarManager::kPairType] = pair->GetType();
986 Double_t errPseudoProperTime2 = -1;
987 values[AliDielectronVarManager::kPseudoProperTime] = fgEvent ? pair->GetKFParticle().GetPseudoProperDecayTime(*(fgEvent->GetPrimaryVertex()), TDatabasePDG::Instance()->GetParticle(443)->Mass(), &errPseudoProperTime2 ) : -1e10;
988 // values[AliDielectronVarManager::kPseudoProperTime] = fgEvent ? pair->GetPseudoProperTime(fgEvent->GetPrimaryVertex()): -1e10;
992 // v2 with respect to VZERO-A event plane
993 delta = values[AliDielectronVarManager::kPhi] - fgData[AliDielectronVarManager::kV0ArpH2];
994 if(delta>TMath::Pi()) delta -= 2.0*TMath::Pi(); // keep the [-pi,+pi] interval
995 if(delta<-1.0*TMath::Pi()) delta += 2.0*TMath::Pi();
996 values[AliDielectronVarManager::kV0ArpH2FlowV2] = TMath::Cos(2.0*delta); // 2nd harmonic flow coefficient
997 values[AliDielectronVarManager::kDeltaPhiV0ArpH2] = delta;
998 // v2 with respect to VZERO-C event plane
999 delta = values[AliDielectronVarManager::kPhi] - fgData[AliDielectronVarManager::kV0CrpH2];
1000 if(delta>TMath::Pi()) delta -= 2.0*TMath::Pi(); // keep the [-pi,+pi] interval
1001 if(delta<-1.0*TMath::Pi()) delta += 2.0*TMath::Pi();
1002 values[AliDielectronVarManager::kV0CrpH2FlowV2] = TMath::Cos(2.0*delta); // 2nd harmonic flow coefficient
1003 values[AliDielectronVarManager::kDeltaPhiV0CrpH2] = delta;
1004 // v2 with respect to the combined VZERO-A and VZERO-C event plane
1005 delta = values[AliDielectronVarManager::kPhi] - fgData[AliDielectronVarManager::kV0ACrpH2];
1006 if(delta>TMath::Pi()) delta -= 2.0*TMath::Pi(); // keep the [-pi,+pi] interval
1007 if(delta<-1.0*TMath::Pi()) delta += 2.0*TMath::Pi();
1008 values[AliDielectronVarManager::kV0ACrpH2FlowV2] = TMath::Cos(2.0*delta); // 2nd harmonic flow coefficient
1009 values[AliDielectronVarManager::kDeltaPhiV0ACrpH2] = delta;
1012 AliDielectronMC *mc=AliDielectronMC::Instance();
1015 values[AliDielectronVarManager::kPseudoProperTimeResolution] = -10.0e+10;
1016 Bool_t samemother = mc->HaveSameMother(pair);
1017 values[AliDielectronVarManager::kIsJpsiPrimary] = mc->IsJpsiPrimary(pair);
1018 values[AliDielectronVarManager::kHaveSameMother] = samemother ;
1020 // fill kPseudoProperTimeResolution
1021 values[AliDielectronVarManager::kPseudoProperTimeResolution] = -1e10;
1022 // values[AliDielectronVarManager::kPseudoProperTimePull] = -1e10;
1023 if(samemother && fgEvent) {
1024 if(pair->GetFirstDaughter()->GetLabel() > 0) {
1025 const AliVParticle* d1 = mc->GetMCTrackFromMCEvent(pair->GetFirstDaughter()->GetLabel());
1026 const AliVParticle* motherMC = mc->GetMCTrackFromMCEvent(((AliMCParticle*)d1)->GetMother());
1027 const AliVVertex* mcVtx = mc->GetMCEvent()->GetPrimaryVertex();
1028 if(motherMC && mcVtx) {
1029 const Double_t lxyMC = ( (motherMC->Xv() - mcVtx->GetX()) * motherMC->Px() +
1030 (motherMC->Yv() - mcVtx->GetY()) * motherMC->Py() ) / motherMC->Pt();
1031 const Double_t pseudoMC = lxyMC * (TDatabasePDG::Instance()->GetParticle(443)->Mass())/motherMC->Pt();
1032 values[AliDielectronVarManager::kPseudoProperTimeResolution] = values[AliDielectronVarManager::kPseudoProperTime] - pseudoMC;
1033 if (errPseudoProperTime2 > 0)
1034 values[AliDielectronVarManager::kPseudoProperTimePull] = values[AliDielectronVarManager::kPseudoProperTimeResolution]/sqrt(errPseudoProperTime2);
1038 Double_t valuesLeg1[AliDielectronVarManager::kNMaxValues];
1039 Double_t valuesLeg2[AliDielectronVarManager::kNMaxValues];
1040 AliVParticle* leg1 = pair->GetFirstDaughter();
1041 AliVParticle* leg2 = pair->GetSecondDaughter();
1042 Fill(leg1, valuesLeg1);
1043 Fill(leg2, valuesLeg2);
1044 values[AliDielectronVarManager::kTRDpidEffPair] = valuesLeg1[AliDielectronVarManager::kTRDpidEffLeg]*valuesLeg2[AliDielectronVarManager::kTRDpidEffLeg];
1050 inline void AliDielectronVarManager::FillVarKFParticle(const AliKFParticle *particle, Double_t * const values)
1053 // Fill track information available in AliVParticle into an array
1055 values[AliDielectronVarManager::kPx] = particle->GetPx();
1056 values[AliDielectronVarManager::kPy] = particle->GetPy();
1057 values[AliDielectronVarManager::kPz] = particle->GetPz();
1058 values[AliDielectronVarManager::kPt] = particle->GetPt();
1059 values[AliDielectronVarManager::kP] = particle->GetP();
1061 values[AliDielectronVarManager::kXv] = particle->GetX();
1062 values[AliDielectronVarManager::kYv] = particle->GetY();
1063 values[AliDielectronVarManager::kZv] = particle->GetZ();
1065 values[AliDielectronVarManager::kOneOverPt] = 0;
1066 values[AliDielectronVarManager::kPhi] = particle->GetPhi();
1067 values[AliDielectronVarManager::kTheta] = 0.;
1068 values[AliDielectronVarManager::kEta] = particle->GetEta();
1069 values[AliDielectronVarManager::kY] = ((particle->GetE()*particle->GetE()-particle->GetPx()*particle->GetPx()-particle->GetPy()*particle->GetPy()-particle->GetPz()*particle->GetPz())>0.) ? TLorentzVector(particle->GetPx(),particle->GetPy(),particle->GetPz(),particle->GetE()).Rapidity() : -1111.;
1071 values[AliDielectronVarManager::kE] = particle->GetE();
1072 values[AliDielectronVarManager::kM] = particle->GetMass();
1073 values[AliDielectronVarManager::kCharge] = particle->GetQ();
1075 values[AliDielectronVarManager::kNclsITS] = 0;
1076 values[AliDielectronVarManager::kITSchi2Cl] = -1;
1077 values[AliDielectronVarManager::kNclsTPC] = 0;
1078 values[AliDielectronVarManager::kNclsSTPC] = 0;
1079 values[AliDielectronVarManager::kNclsSFracTPC] = 0;
1080 values[AliDielectronVarManager::kNclsTPCiter1] = 0;
1081 values[AliDielectronVarManager::kNFclsTPC] = 0;
1082 values[AliDielectronVarManager::kNclsTRD] = 0;
1083 values[AliDielectronVarManager::kTRDntracklets] = 0;
1084 values[AliDielectronVarManager::kTRDpidQuality] = 0;
1085 values[AliDielectronVarManager::kTPCchi2Cl] = 0;
1086 values[AliDielectronVarManager::kTrackStatus] = 0;
1087 values[AliDielectronVarManager::kTRDprobEle] = 0;
1088 values[AliDielectronVarManager::kTRDprobPio] = 0;
1089 values[AliDielectronVarManager::kTPCsignalN] = 0;
1090 values[AliDielectronVarManager::kTPCclsDiff] = 0;
1091 values[AliDielectronVarManager::kTPCsignalNfrac]= 0;
1092 values[AliDielectronVarManager::kImpactParXY] = 0;
1093 values[AliDielectronVarManager::kImpactParZ] = 0;
1094 values[AliDielectronVarManager::kPIn] = 0;
1095 values[AliDielectronVarManager::kYsignedIn] = 0;
1096 values[AliDielectronVarManager::kTPCsignal] = 0;
1097 values[AliDielectronVarManager::kTOFsignal] = 0;
1098 values[AliDielectronVarManager::kTOFbeta] = 0;
1099 values[AliDielectronVarManager::kTPCnSigmaEle] = 0;
1100 values[AliDielectronVarManager::kTPCnSigmaPio] = 0;
1101 values[AliDielectronVarManager::kTPCnSigmaMuo] = 0;
1102 values[AliDielectronVarManager::kTPCnSigmaKao] = 0;
1103 values[AliDielectronVarManager::kTPCnSigmaPro] = 0;
1104 values[AliDielectronVarManager::kITSclusterMap] = 0;
1106 values[AliDielectronVarManager::kPdgCode] = -1;
1107 values[AliDielectronVarManager::kPdgCodeMother] = -1;
1108 values[AliDielectronVarManager::kPdgCodeGrandMother] = -1;
1111 // if ( fgEvent ) AliDielectronVarManager::Fill(fgEvent, values);
1112 for (Int_t i=AliDielectronVarManager::kPairMax; i<AliDielectronVarManager::kNMaxValues; ++i)
1113 values[i]=fgData[i];
1117 inline void AliDielectronVarManager::FillVarVEvent(const AliVEvent *event, Double_t * const values)
1120 // Fill event information available for histogramming into an array
1122 values[AliDielectronVarManager::kRunNumber] = event->GetRunNumber();
1123 const AliVVertex *primVtx = event->GetPrimaryVertex();
1125 values[AliDielectronVarManager::kXvPrim] = 0;
1126 values[AliDielectronVarManager::kYvPrim] = 0;
1127 values[AliDielectronVarManager::kZvPrim] = 0;
1128 // values[AliDielectronVarManager::kChi2NDF] = 0; //This is the pair value!!!
1130 values[AliDielectronVarManager::kNTrk] = 0;
1131 values[AliDielectronVarManager::kNacc] = 0;
1132 values[AliDielectronVarManager::kNaccTrcklts] = 0;
1133 values[AliDielectronVarManager::kNaccTrcklts0916] = 0;
1134 values[AliDielectronVarManager::kNevents] = 0; //always fill bin 0;
1136 if (!primVtx) return;
1138 values[AliDielectronVarManager::kXvPrim] = primVtx->GetX();
1139 values[AliDielectronVarManager::kYvPrim] = primVtx->GetY();
1140 values[AliDielectronVarManager::kZvPrim] = primVtx->GetZ();
1141 // values[AliDielectronVarManager::kChi2NDF] = primVtx->GetChi2perNDF(); //this is the pair value
1143 values[AliDielectronVarManager::kNTrk] = event->GetNumberOfTracks();
1144 values[AliDielectronVarManager::kNacc] = AliDielectronHelper::GetNacc(event);
1145 values[AliDielectronVarManager::kNaccTrcklts] = AliDielectronHelper::GetNaccTrcklts(event); // etaRange = 1.6 (default)
1146 values[AliDielectronVarManager::kNaccTrcklts0916] = AliDielectronHelper::GetNaccTrcklts(event,1.6)-AliDielectronHelper::GetNaccTrcklts(event,.9);
1147 // values[AliDielectronVarManager::kNaccTrcklts05] = AliDielectronHelper::GetNaccTrcklts(event, 0.5);
1148 // values[AliDielectronVarManager::kNaccTrcklts10] = AliDielectronHelper::GetNaccTrcklts(event, 1.0);
1149 // values[AliDielectronVarManager::kNaccTrckltsCorr] = AliDielectronHelper::GetNaccTrckltsCorrected(event, values[AliDielectronVarManager::kNaccTrcklts], values[AliDielectronVarManager::kZvPrim]);
1151 // TPC event plane (corrected)
1152 if(fgTPCEventPlane) FillVarTPCEventPlane(fgTPCEventPlane, values);
1154 // VZERO event plane quantities from the AliEPSelectionTask
1155 AliEventplane *ep = const_cast<AliVEvent*>(event)->GetEventplane();
1156 values[AliDielectronVarManager::kv0ACrpH2] = TVector2::Phi_mpi_pi(ep->GetEventplane("V0", event, 2));
1157 values[AliDielectronVarManager::kv0ArpH2] = TVector2::Phi_mpi_pi(ep->GetEventplane("V0A",event, 2));
1158 values[AliDielectronVarManager::kv0CrpH2] = TVector2::Phi_mpi_pi(ep->GetEventplane("V0C",event, 2));
1160 // ESD VZERO information
1161 AliVVZERO* vzeroData = event->GetVZEROData();
1162 values[AliDielectronVarManager::kMultV0A] = 0.0;
1163 values[AliDielectronVarManager::kMultV0C] = 0.0;
1164 values[AliDielectronVarManager::kAdcV0A] = 0.0;
1165 values[AliDielectronVarManager::kAdcV0C] = 0.0;
1166 for(Int_t i=0; i<32; ++i) {
1167 //values[AliDielectronVarManager::kVZEROchMult+i] = vzeroData->GetMultiplicity(i);
1168 //values[AliDielectronVarManager::kVZEROchMult+32+i] = vzeroData->GetMultiplicity(i+32);
1169 values[AliDielectronVarManager::kVZEROchMult+i] = event->GetVZEROEqMultiplicity(i);
1170 values[AliDielectronVarManager::kVZEROchMult+32+i] = event->GetVZEROEqMultiplicity(i+32);
1171 values[AliDielectronVarManager::kMultV0A] += vzeroData->GetMultiplicityV0A(i);
1172 values[AliDielectronVarManager::kMultV0C] += vzeroData->GetMultiplicityV0C(i);
1173 //values[AliDielectronVarManager::kAdcV0A] += vzeroData->GetAdcV0A(i);
1174 //values[AliDielectronVarManager::kAdcV0C] += vzeroData->GetAdcV0C(i);
1176 values[AliDielectronVarManager::kMultV0] = values[AliDielectronVarManager::kMultV0A] + values[AliDielectronVarManager::kMultV0C];
1177 values[AliDielectronVarManager::kAdcV0] = values[AliDielectronVarManager::kAdcV0A] + values[AliDielectronVarManager::kAdcV0C];
1178 // VZERO event plane quantities
1179 Double_t qvec[3]={0.0};
1180 GetVzeroRP(event, qvec,0); // V0-A
1181 values[AliDielectronVarManager::kV0AxH2] = qvec[0]; values[AliDielectronVarManager::kV0AyH2] = qvec[1];
1182 values[AliDielectronVarManager::kV0ArpH2] = qvec[2];
1183 qvec[0]=0.0; qvec[1]=0.0; qvec[2]=0.0;
1184 GetVzeroRP(event, qvec,1); // V0-C
1185 values[AliDielectronVarManager::kV0CxH2] = qvec[0]; values[AliDielectronVarManager::kV0CyH2] = qvec[1];
1186 values[AliDielectronVarManager::kV0CrpH2] = qvec[2];
1187 qvec[0]=0.0; qvec[1]=0.0; qvec[2]=0.0;
1188 GetVzeroRP(event, qvec,2); // V0-A and V0-C combined
1189 values[AliDielectronVarManager::kV0ACxH2] = qvec[0]; values[AliDielectronVarManager::kV0ACyH2] = qvec[1];
1190 values[AliDielectronVarManager::kV0ACrpH2] = qvec[2];
1191 // VZERO event plane resolution
1192 values[AliDielectronVarManager::kV0ArpResH2] = 1.0;
1193 values[AliDielectronVarManager::kV0CrpResH2] = 1.0;
1194 values[AliDielectronVarManager::kV0ACrpResH2] = 1.0;
1195 // Q vector components correlations
1196 values[AliDielectronVarManager::kV0XaXcH2] = values[AliDielectronVarManager::kV0AxH2]*values[AliDielectronVarManager::kV0CxH2];
1197 values[AliDielectronVarManager::kV0XaYaH2] = values[AliDielectronVarManager::kV0AxH2]*values[AliDielectronVarManager::kV0AyH2];
1198 values[AliDielectronVarManager::kV0XaYcH2] = values[AliDielectronVarManager::kV0AxH2]*values[AliDielectronVarManager::kV0CyH2];
1199 values[AliDielectronVarManager::kV0YaXcH2] = values[AliDielectronVarManager::kV0AyH2]*values[AliDielectronVarManager::kV0CxH2];
1200 values[AliDielectronVarManager::kV0YaYcH2] = values[AliDielectronVarManager::kV0AyH2]*values[AliDielectronVarManager::kV0CyH2];
1201 values[AliDielectronVarManager::kV0XcYcH2] = values[AliDielectronVarManager::kV0CxH2]*values[AliDielectronVarManager::kV0CyH2];
1203 // TPC event plane quantities (uncorrected)
1204 AliEventplane *evplane = const_cast<AliVEvent*>(event)->GetEventplane();
1205 TVector2 *qstd = evplane->GetQVector(); // This is the "standard" Q-Vector
1206 TVector2 *qsub1 = evplane->GetQsub1();
1207 TVector2 *qsub2 = evplane->GetQsub2();
1208 if(!qstd || !qsub1 || !qsub2) return;
1210 values[AliDielectronVarManager::kTPCxH2uc] = qstd->X();
1211 values[AliDielectronVarManager::kTPCyH2uc] = qstd->Y();
1212 values[AliDielectronVarManager::kTPCrpH2uc] = ((TMath::Abs(qstd->X())>1.0e-10) ? TMath::ATan2(qstd->Y(),qstd->X())/2.0 : 0.0);
1214 values[AliDielectronVarManager::kTPCsub1xH2uc] = qsub1->X();
1215 values[AliDielectronVarManager::kTPCsub1yH2uc] = qsub1->Y();
1216 values[AliDielectronVarManager::kTPCsub1rpH2uc] = ((TMath::Abs(qsub1->X())>1.0e-10) ? TMath::ATan2(qsub1->Y(),qsub1->X())/2.0 : 0.0);
1218 values[AliDielectronVarManager::kTPCsub2xH2uc] = qsub2->X();
1219 values[AliDielectronVarManager::kTPCsub2yH2uc] = qsub2->Y();
1220 values[AliDielectronVarManager::kTPCsub2rpH2uc] = ((TMath::Abs(qsub2->X())>1.0e-10) ? TMath::ATan2(qsub2->Y(),qsub2->X())/2.0 : 0.0);
1222 values[AliDielectronVarManager::kTPCsub12DiffH2uc] = TMath::Cos( 2.*(values[AliDielectronVarManager::kTPCsub1rpH2uc] -
1223 values[AliDielectronVarManager::kTPCsub2rpH2uc]) );
1225 // using corrected tpc quantities
1226 values[AliDielectronVarManager::kV0ATPCDiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kV0ArpH2] -
1227 values[AliDielectronVarManager::kTPCrpH2]) );
1229 values[AliDielectronVarManager::kV0CTPCDiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kV0CrpH2] -
1230 values[AliDielectronVarManager::kTPCrpH2]) );
1232 values[AliDielectronVarManager::kV0AV0CDiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kV0ArpH2] -
1233 values[AliDielectronVarManager::kV0CrpH2]) );
1235 values[AliDielectronVarManager::kv0ATPCDiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kv0ArpH2] -
1236 values[AliDielectronVarManager::kTPCrpH2]) );
1238 values[AliDielectronVarManager::kv0CTPCDiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kv0CrpH2] -
1239 values[AliDielectronVarManager::kTPCrpH2]) );
1241 values[AliDielectronVarManager::kv0Av0CDiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kv0ArpH2] -
1242 values[AliDielectronVarManager::kv0CrpH2]) );
1246 inline void AliDielectronVarManager::FillVarESDEvent(const AliESDEvent *event, Double_t * const values)
1249 // Fill event information available for histogramming into an array
1252 // Fill common AliVEvent interface information
1253 FillVarVEvent(event, values);
1255 Double_t centralityF=-1;
1256 AliCentrality *esdCentrality = const_cast<AliESDEvent*>(event)->GetCentrality();
1257 if (esdCentrality) centralityF = esdCentrality->GetCentralityPercentile("V0M");
1259 // Fill AliESDEvent interface specific information
1260 const AliESDVertex *primVtx = event->GetPrimaryVertex();
1261 values[AliDielectronVarManager::kXRes] = primVtx->GetXRes();
1262 values[AliDielectronVarManager::kYRes] = primVtx->GetYRes();
1263 values[AliDielectronVarManager::kZRes] = primVtx->GetZRes();
1264 values[AliDielectronVarManager::kCentrality] = centralityF;
1266 // Event multiplicity estimators
1267 Int_t nTrSPD05=0; Int_t nTrITSTPC05=0; Int_t nTrITSSA05=0;
1268 event->EstimateMultiplicity(nTrSPD05, nTrITSTPC05, nTrITSSA05, 0.5);
1269 values[AliDielectronVarManager::kNaccTrckltsEsd05] = nTrSPD05;
1270 values[AliDielectronVarManager::kNaccItsTpcEsd05] = nTrITSTPC05;
1271 values[AliDielectronVarManager::kNaccItsPureEsd05] = nTrITSSA05;
1272 values[AliDielectronVarManager::kNaccTrckltsEsd05Corr] =
1273 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrSPD05),values[AliDielectronVarManager::kZvPrim],0);
1274 values[AliDielectronVarManager::kNaccItsTpcEsd05Corr] =
1275 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrITSTPC05),values[AliDielectronVarManager::kZvPrim],3);
1276 values[AliDielectronVarManager::kNaccItsPureEsd05Corr] =
1277 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrITSSA05),values[AliDielectronVarManager::kZvPrim],6);
1279 Int_t nTrSPD10=0; Int_t nTrITSTPC10=0; Int_t nTrITSSA10=0;
1280 event->EstimateMultiplicity(nTrSPD10, nTrITSTPC10, nTrITSSA10, 1.0);
1281 values[AliDielectronVarManager::kNaccTrckltsEsd10] = nTrSPD10;
1282 values[AliDielectronVarManager::kNaccItsTpcEsd10] = nTrITSTPC10;
1283 values[AliDielectronVarManager::kNaccItsPureEsd10] = nTrITSSA10;
1284 values[AliDielectronVarManager::kNaccTrckltsEsd10Corr] =
1285 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrSPD10),values[AliDielectronVarManager::kZvPrim],1);
1286 values[AliDielectronVarManager::kNaccItsTpcEsd10Corr] =
1287 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrITSTPC10),values[AliDielectronVarManager::kZvPrim],4);
1288 values[AliDielectronVarManager::kNaccItsPureEsd10Corr] =
1289 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrITSSA10),values[AliDielectronVarManager::kZvPrim],7);
1291 Int_t nTrSPD16=0; Int_t nTrITSTPC16=0; Int_t nTrITSSA16=0;
1292 event->EstimateMultiplicity(nTrSPD16, nTrITSTPC16, nTrITSSA16, 1.6);
1293 values[AliDielectronVarManager::kNaccTrckltsEsd16] = nTrSPD16;
1294 values[AliDielectronVarManager::kNaccItsTpcEsd16] = nTrITSTPC16;
1295 values[AliDielectronVarManager::kNaccItsPureEsd16] = nTrITSSA16;
1296 values[AliDielectronVarManager::kNaccTrckltsEsd16Corr] =
1297 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrSPD16),values[AliDielectronVarManager::kZvPrim],2);
1298 values[AliDielectronVarManager::kNaccItsTpcEsd16Corr] =
1299 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrITSTPC16),values[AliDielectronVarManager::kZvPrim],5);
1300 values[AliDielectronVarManager::kNaccItsPureEsd16Corr] =
1301 AliDielectronHelper::GetNaccTrckltsCorrected(event,Double_t(nTrITSSA16),values[AliDielectronVarManager::kZvPrim],8);
1305 inline void AliDielectronVarManager::FillVarAODEvent(const AliAODEvent *event, Double_t * const values)
1308 // Fill event information available for histogramming into an array
1311 // Fill common AliVEvent interface information
1312 FillVarVEvent(event, values);
1314 // Fill AliAODEvent interface specific information
1317 inline void AliDielectronVarManager::FillVarMCEvent(const AliMCEvent *event, Double_t * const values)
1320 // Fill event information available for histogramming into an array
1323 // Fill common AliVEvent interface information
1324 // FillVarVEvent(event, values);
1325 const AliVVertex* vtx = event->GetPrimaryVertex();
1326 values[AliDielectronVarManager::kXvPrim] = (vtx ? vtx->GetX() : 0.0);
1327 values[AliDielectronVarManager::kYvPrim] = (vtx ? vtx->GetY() : 0.0);
1328 values[AliDielectronVarManager::kZvPrim] = (vtx ? vtx->GetZ() : 0.0);
1329 // Fill AliMCEvent interface specific information
1330 values[AliDielectronVarManager::kNch] = AliDielectronHelper::GetNch(event, 1.6);
1331 values[AliDielectronVarManager::kNch05] = AliDielectronHelper::GetNch(event, 0.5);
1332 values[AliDielectronVarManager::kNch10] = AliDielectronHelper::GetNch(event, 1.0);
1334 values[AliDielectronVarManager::kNumberOfJPsis] = AliDielectronHelper::GetNMothers(event, 0.9, 443, 11);
1335 values[AliDielectronVarManager::kNumberOfJPsisPrompt] = AliDielectronHelper::GetNMothers(event, 0.9, 443, 11, 1);
1336 values[AliDielectronVarManager::kNumberOfJPsisNPrompt] = AliDielectronHelper::GetNMothers(event, 0.9, 443, 11, 0);
1339 inline void AliDielectronVarManager::FillVarTPCEventPlane(const AliEventplane *evplane, Double_t * const values)
1342 // Fill TPC event plane information after correction
1344 if(!evplane) return;
1345 TVector2 *qcorr = const_cast<AliEventplane *>(evplane)->GetQVector(); // This is the "corrected" Q-Vector
1346 TVector2 *qcsub1 = const_cast<AliEventplane *>(evplane)->GetQsub1();
1347 TVector2 *qcsub2 = const_cast<AliEventplane *>(evplane)->GetQsub2();
1348 if(!qcorr || !qcsub1 || !qcsub2) return;
1350 values[AliDielectronVarManager::kTPCxH2] = qcorr->X();
1351 values[AliDielectronVarManager::kTPCyH2] = qcorr->Y();
1352 values[AliDielectronVarManager::kTPCrpH2] = ((TMath::Abs(qcorr->X())>1.0e-10) ? TMath::ATan2(qcorr->Y(),qcorr->X())/2.0 : 0.0);
1354 values[AliDielectronVarManager::kTPCsub1xH2] = qcsub1->X();
1355 values[AliDielectronVarManager::kTPCsub1yH2] = qcsub1->Y();
1356 values[AliDielectronVarManager::kTPCsub1rpH2] = ((TMath::Abs(qcsub1->X())>1.0e-10) ? TMath::ATan2(qcsub1->Y(),qcsub1->X())/2.0 : 0.0);
1358 values[AliDielectronVarManager::kTPCsub2xH2] = qcsub2->X();
1359 values[AliDielectronVarManager::kTPCsub2yH2] = qcsub2->Y();
1360 values[AliDielectronVarManager::kTPCsub2rpH2] = ((TMath::Abs(qcsub2->X())>1.0e-10) ? TMath::ATan2(qcsub2->Y(),qcsub2->X())/2.0 : 0.0);
1362 values[AliDielectronVarManager::kTPCsub12DiffH2] = TMath::Cos( 2.*(values[AliDielectronVarManager::kTPCsub1rpH2] -
1363 values[AliDielectronVarManager::kTPCsub2rpH2]) );
1364 values[AliDielectronVarManager::kTPCsub12DiffH2Sin] = TMath::Sin( 2.*(values[AliDielectronVarManager::kTPCsub1rpH2] -
1365 values[AliDielectronVarManager::kTPCsub2rpH2]) );
1368 inline void AliDielectronVarManager::InitESDpid(Int_t type)
1371 // initialize PID parameters
1372 // type=0 is simulation
1375 if (!fgPIDResponse) fgPIDResponse=new AliESDpid((Bool_t)(type==0));
1376 Double_t alephParameters[5];
1378 alephParameters[0] = 2.15898e+00/50.;
1379 alephParameters[1] = 1.75295e+01;
1380 alephParameters[2] = 3.40030e-09;
1381 alephParameters[3] = 1.96178e+00;
1382 alephParameters[4] = 3.91720e+00;
1383 fgPIDResponse->GetTOFResponse().SetTimeResolution(80.);
1387 alephParameters[0] = 0.0283086/0.97;
1388 alephParameters[1] = 2.63394e+01;
1389 alephParameters[2] = 5.04114e-11;
1390 alephParameters[3] = 2.12543e+00;
1391 alephParameters[4] = 4.88663e+00;
1392 fgPIDResponse->GetTOFResponse().SetTimeResolution(130.);
1393 fgPIDResponse->GetTPCResponse().SetMip(50.);
1396 fgPIDResponse->GetTPCResponse().SetBetheBlochParameters(
1397 alephParameters[0],alephParameters[1],alephParameters[2],
1398 alephParameters[3],alephParameters[4]);
1400 fgPIDResponse->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);
1403 inline void AliDielectronVarManager::InitAODpidUtil(Int_t type)
1405 if (!fgPIDResponse) fgPIDResponse=new AliAODpidUtil;
1406 Double_t alephParameters[5];
1408 alephParameters[0] = 2.15898e+00/50.;
1409 alephParameters[1] = 1.75295e+01;
1410 alephParameters[2] = 3.40030e-09;
1411 alephParameters[3] = 1.96178e+00;
1412 alephParameters[4] = 3.91720e+00;
1413 fgPIDResponse->GetTOFResponse().SetTimeResolution(80.);
1417 alephParameters[0] = 0.0283086/0.97;
1418 alephParameters[1] = 2.63394e+01;
1419 alephParameters[2] = 5.04114e-11;
1420 alephParameters[3] = 2.12543e+00;
1421 alephParameters[4] = 4.88663e+00;
1422 fgPIDResponse->GetTOFResponse().SetTimeResolution(130.);
1423 fgPIDResponse->GetTPCResponse().SetMip(50.);
1426 fgPIDResponse->GetTPCResponse().SetBetheBlochParameters(
1427 alephParameters[0],alephParameters[1],alephParameters[2],
1428 alephParameters[3],alephParameters[4]);
1430 fgPIDResponse->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);
1434 inline void AliDielectronVarManager::InitEstimatorAvg(const Char_t* filename)
1437 // initialize the profile histograms neccessary for the correction of the multiplicity estimators in pp collisions
1440 const Char_t* estimatorNames[9] = {"SPDmult05","SPDmult10","SPDmult16",
1441 "ITSTPC05", "ITSTPC10", "ITSTPC16",
1442 "ITSSA05", "ITSSA10", "ITSSA16"};
1443 const Char_t* periodNames[4] = {"LHC10b", "LHC10c", "LHC10d", "LHC10e"};
1444 TFile* file=TFile::Open(filename);
1447 for(Int_t ip=0; ip<4; ++ip) {
1448 for(Int_t ie=0; ie<9; ++ie) {
1449 fgMultEstimatorAvg[ip][ie] = (TProfile*)(file->Get(Form("%s_%s",estimatorNames[ie],periodNames[ip]))->Clone(Form("%s_%s_clone",estimatorNames[ie],periodNames[ip])));
1455 inline void AliDielectronVarManager::InitTRDpidEffHistograms(const Char_t* filename)
1458 // initialize the 3D histograms with the TRD pid efficiency histograms
1461 // reset the centrality ranges and the efficiency histograms
1462 for(Int_t i=0; i<10; ++i) { // centrality ranges
1463 for(Int_t j=0; j<4; ++j) fgTRDpidEffCentRanges[i][j] = -1.;
1464 if(fgTRDpidEff[i][0]) {
1465 delete fgTRDpidEff[i][0];
1466 fgTRDpidEff[i][0] = 0x0;
1468 if(fgTRDpidEff[i][1]) {
1469 delete fgTRDpidEff[i][1];
1470 fgTRDpidEff[i][1] = 0x0;
1474 TFile* file=TFile::Open(filename);
1475 TList* keys=file->GetListOfKeys();
1476 Int_t idxp=0; Int_t idxn=0;
1477 for(Int_t i=0; i<keys->GetEntries(); ++i) {
1478 if(idxp>=10) continue;
1479 if(idxn>=10) continue;
1480 TString name=((TKey*)keys->At(i))->ReadObj()->GetName();
1481 // Name of histograms should be in the format:
1482 // TRDeff<field>_cent_<centLow>_<centHigh>
1483 // <field> is either "BPLUS" or "BMINUS"
1484 if(!(name.Contains("BPLUS") || name.Contains("BMINUS"))) continue;
1485 TObjArray* arr = name.Tokenize("_");
1486 Bool_t isBplus = kTRUE;
1487 if(name.Contains("BMINUS")) isBplus = kFALSE;
1488 TString centMinStr = arr->At(2)->GetName(); TString centMaxStr = arr->At(3)->GetName();
1490 fgTRDpidEffCentRanges[idxp][2] = centMinStr.Atof();
1491 fgTRDpidEffCentRanges[idxp][3] = centMaxStr.Atof();
1492 fgTRDpidEff[idxp][1] = (TH3D*)(file->Get(name.Data())->Clone(Form("%s_clone",name.Data())));
1496 fgTRDpidEffCentRanges[idxn][0] = centMinStr.Atof();
1497 fgTRDpidEffCentRanges[idxn][1] = centMaxStr.Atof();
1498 fgTRDpidEff[idxn][0] = (TH3D*)(file->Get(name.Data())->Clone(Form("%s_clone",name.Data())));
1505 inline Double_t AliDielectronVarManager::GetTRDpidEfficiency(Int_t runNo, Double_t centrality,
1506 Double_t eta, Double_t trdPhi, Double_t pout,
1509 // return the efficiency in the given phase space cell
1511 // LHC10h data----------------------------------------------
1512 Bool_t isBplus = kTRUE;
1513 if(runNo<=138275) isBplus = kFALSE;
1514 // TODO: check magnetic polarity for runs in 2011 data
1515 // ---------------------------------------------------------
1517 for(Int_t icent=0; icent<10; ++icent) {
1519 if(centrality>=fgTRDpidEffCentRanges[icent][2] && centrality<fgTRDpidEffCentRanges[icent][3]) {
1525 if(centrality>=fgTRDpidEffCentRanges[icent][0] && centrality<fgTRDpidEffCentRanges[icent][1]) {
1531 TH3D* effH = fgTRDpidEff[centIdx][(isBplus ? 1 : 0)];
1532 if(!effH) {effErr=0x0; return 1.0;}
1533 Int_t etaBin = effH->GetXaxis()->FindBin(eta);
1534 if(eta<effH->GetXaxis()->GetXmin()) etaBin=1;
1535 if(eta>effH->GetXaxis()->GetXmax()) etaBin=effH->GetXaxis()->GetNbins();
1536 Int_t phiBin = effH->GetYaxis()->FindBin(trdPhi);
1537 if(trdPhi<effH->GetYaxis()->GetXmin()) phiBin=1;
1538 if(trdPhi>effH->GetYaxis()->GetXmax()) phiBin=effH->GetYaxis()->GetNbins();
1539 Int_t poutBin = effH->GetZaxis()->FindBin(pout);
1540 if(pout<effH->GetZaxis()->GetXmin()) poutBin=1;
1541 if(pout>effH->GetZaxis()->GetXmax()) poutBin=effH->GetZaxis()->GetNbins();
1542 Double_t eff = effH->GetBinContent(etaBin, phiBin, poutBin);
1543 effErr = effH->GetBinError(etaBin, phiBin, poutBin);
1552 inline void AliDielectronVarManager::SetEvent(AliVEvent * const ev)
1556 if (fgKFVertex) delete fgKFVertex;
1558 if (ev && ev->GetPrimaryVertex()) fgKFVertex=new AliKFVertex(*ev->GetPrimaryVertex());
1560 for (Int_t i=0; i<AliDielectronVarManager::kNMaxValues;++i) fgData[i]=0.;
1561 AliDielectronVarManager::Fill(fgEvent, fgData);
1564 inline void AliDielectronVarManager::SetEventData(const Double_t data[AliDielectronVarManager::kNMaxValues])
1566 for (Int_t i=0; i<kNMaxValues;++i) fgData[i]=0.;
1567 for (Int_t i=kPairMax; i<kNMaxValues;++i) fgData[i]=data[i];
1571 inline Bool_t AliDielectronVarManager::GetDCA(const AliAODTrack *track, Double_t d0z0[2])
1573 if(track->TestBit(AliAODTrack::kIsDCA)){
1574 d0z0[0]=track->DCA();
1575 d0z0[1]=track->ZAtDCA();
1579 Double_t covd0z0[3];
1580 AliAODTrack copy(*track);
1581 AliAODVertex *vtx =(AliAODVertex*)(fgEvent->GetPrimaryVertex());
1582 Double_t fBzkG = fgEvent->GetMagneticField(); // z componenent of field in kG
1583 Bool_t ok = copy.PropagateToDCA(vtx,fBzkG,kVeryBig,d0z0,covd0z0);
1591 inline void AliDielectronVarManager::SetTPCEventPlane(AliEventplane *const evplane)
1594 fgTPCEventPlane = evplane;
1595 // for (Int_t i=0; i<AliDielectronVarManager::kNMaxValues;++i) fgData[i]=0.;
1596 // AliDielectronVarManager::Fill(fgEvent, fgData);
1600 //_________________________________________________________________
1601 inline void AliDielectronVarManager::GetVzeroRP(const AliVEvent* event, Double_t* qvec, Int_t sideOption) {
1603 // Get the reaction plane from the VZERO detector for a given harmonic
1605 // sideOption = 0- V0A, 1- V0C, 2-both
1606 // Q{x,y} = SUM_i mult(i) * {cos(n*phi_i), sin(n*phi_i)}
1607 // phi_i - phi angle of the VZERO sector i
1608 // Each sector covers 45 degrees(8 sectors per ring). Middle of sector 0 is at 45/2
1613 // at the next ring continues the same
1615 // channel 9: 22.5 + 45
1617 const Double_t kX[8] = {0.92388, 0.38268, -0.38268, -0.92388, -0.92388, -0.38268, 0.38268, 0.92388}; // cosines of the angles of the VZERO sectors (8 per ring)
1618 const Double_t kY[8] = {0.38268, 0.92388, 0.92388, 0.38268, -0.38268, -0.92388, -0.92388, -0.38268}; // sines -- " --
1622 // AliVVZERO* vzero = event->GetVZEROData();
1624 for(Int_t iChannel=0; iChannel<64; ++iChannel) {
1625 if(iChannel<32 && sideOption==0) continue;
1626 if(iChannel>=32 && sideOption==1) continue;
1628 //mult = vzero->GetMultiplicity(iChannel);
1629 mult = event->GetVZEROEqMultiplicity(iChannel);
1631 qvec[0] += mult*(2.0*TMath::Power(kX[phi],2.0)-1);
1632 qvec[1] += mult*(2.0*kX[phi]*kY[phi]);
1633 } // end loop over channels
1634 if(TMath::Abs(qvec[0])>1.0e-10)
1635 qvec[2] = TMath::ATan2(qvec[1],qvec[0])/2.0;
1641 inline void AliDielectronVarManager::FillValues(const TParticle *particle, Double_t *values)
1644 // Fill track information available for histogramming into an array
1647 // Fill TParticle interface information
1648 values[AliDielectronVarManager::kPx] = particle->Px();
1649 values[AliDielectronVarManager::kPy] = particle->Py();
1650 values[AliDielectronVarManager::kPz] = particle->Pz();
1651 values[AliDielectronVarManager::kPt] = particle->Pt();
1652 values[AliDielectronVarManager::kP] = particle->P();
1654 values[AliDielectronVarManager::kXv] = particle->Vx();
1655 values[AliDielectronVarManager::kYv] = particle->Vy();
1656 values[AliDielectronVarManager::kZv] = particle->Vz();
1658 values[AliDielectronVarManager::kOneOverPt] = 1./particle->Pt();
1659 values[AliDielectronVarManager::kPhi] = particle->Phi();
1660 values[AliDielectronVarManager::kTheta] =
1661 values[AliDielectronVarManager::kEta] = particle->Eta();
1662 values[AliDielectronVarManager::kY] =
1664 values[AliDielectronVarManager::kE] = particle->Energy();
1665 values[AliDielectronVarManager::kM] = particle->GetMass();
1667 values[AliDielectronVarManager::kCharge] = particle->GetPDG()->Charge()/3; // uggly