changes from gsi. Using mult if no centrality. testfilterbit 128
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliV0Reader.h
1 #ifndef ALIV0READER_H
2 #define ALIV0READER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 ////////////////////////////////////////////////
7 //--------------------------------------------- 
8 // Class used to do analysis on conversion pairs
9 //---------------------------------------------
10 ////////////////////////////////////////////////
11
12 // --- ROOT system ---
13 #include "TObject.h" 
14 #include "AliMCEvent.h"   // for CF
15 #include "AliESDv0.h"
16 #include "AliESDEvent.h"
17 #include "AliKFParticle.h"
18 #include "TParticle.h"
19 #include "AliGammaConversionHistograms.h"
20 #include <vector>
21 #include "AliCFManager.h"
22 #include "AliGammaConversionBGHandler.h"
23 #include "AliESDpid.h"
24 #include "TF1.h"
25 #include "TRandom3.h"
26
27 class TClonesArray; 
28 class TFormula;
29 class Riostream;
30 class TChain;
31
32 //--- AliRoot system ---
33
34 class AliStack;
35 class AliMCEvent;       // for CF
36 class AliESDEvent; 
37 class AliMCEventHandler;
38 class AliESDInputHandler;
39 class AliESDVertex;
40 class AliLog;
41 class TChain;
42 class TChain;
43 class AliCFManager;   // for CF
44 class AliCFContainer;  // for CF
45 //class AliESDpid; // for dEdx cut based on nSigma to particle lines 
46 class AliESDtrackCuts; 
47 class TF1;
48 class TRandom3;
49
50 class AliV0Reader : public TObject {
51         
52         public: 
53         
54         
55         // for CF
56         enum{
57                 kStepGenerated = 0,
58                 kStepReconstructable = 1, 
59                 kStepGetOnFly = 2,
60                 kStepLikeSign = 3,
61                 kStepTPCRefit = 4,
62                 kStepKinks = 5,
63                 kStepdEdxElectronselection = 6,
64                 kStepdEdxPionrejection = 7,
65                 kStepNContributors = 8,
66                 kStepTPCPID = 9,
67                 kStepR = 10,
68                 kStepLine = 11,
69                 kStepZ = 12,
70                 kStepMinClsTPC = 13,
71                 kStepSinglePt= 14,  
72                 kStepNDF = 15,
73                 kStepChi2 = 16,
74                 kStepEta = 17,
75                 kStepPt = 18,
76                 kStepTrueGamma = 19
77         };
78         
79         AliV0Reader();                                        //constructor
80         AliV0Reader(const AliV0Reader & g);                   //copy constructor
81         AliV0Reader & operator = (const AliV0Reader & g);     //assignment operator
82         //  virtual ~AliV0Reader() {;}                            //virtual destructor
83         virtual ~AliV0Reader();                            //virtual destructor
84         /*
85                 *Initialize the reader
86                 */
87         void Initialize();
88         void SetInputAndMCEvent(AliVEvent* esd, AliMCEvent* mc) ;
89
90
91         virtual void SetInputEvent(AliVEvent* const input)  {fESDEvent  = dynamic_cast<AliESDEvent*>(input);}
92         virtual void SetMC(AliMCEvent* const mc)            {fMCEvent = mc;}
93
94                 
95         // for CF
96         void SetCFManager(AliCFManager * const io){fCFManager = io;};
97         AliCFManager *GetCFManager() const {return fCFManager;}
98                 
99                 
100                 
101                 
102         /*
103                 * Returns  AliESDEvent
104                 */                      
105         AliESDEvent* GetESDEvent() const{return fESDEvent;}     
106                 
107         /*
108                 *Returns the number of v0s in the event, no cuts applied.
109                 */
110         Int_t GetNumberOfV0s() const{return fESDEvent->GetNumberOfV0s();}
111                 
112         /*
113                 *Returns the number of contributors to the vertex
114                 */
115         //  Int_t GetNumberOfContributorsVtx() const{return fESDEvent->GetPrimaryVertex()->GetNContributors();}
116         Int_t GetNumberOfContributorsVtx();
117         
118         /*
119                 * Check if there are any more good v0s left in the v0 stack
120                 * if so, fCurrent v0 is set to this v0 and can be retrieved
121                 * by GetCurrentV0 function.
122                 * returns kFALSE if there is no more good v0s in the v0 stack
123                 */
124         Bool_t NextV0();
125                 
126         /*
127                 * Returns the v0 at the given index, no checks are done on the v0. 
128                 */
129         AliESDv0* GetV0(Int_t index);
130                 
131         /*
132                 * Returns the current v0
133                 */
134         AliESDv0* GetCurrentV0() const{return fCurrentV0;}
135                 
136         /*
137                 * Returns the negative ESD track which belongs to fCurrentV0
138                 */
139         //  AliESDtrack* GetNegativeESDTrack(){return fESDEvent->GetTrack(fCurrentV0->GetNindex());}
140         AliESDtrack* GetNegativeESDTrack(){return fCurrentNegativeESDTrack;}
141                 
142         /*
143                 * Returns the positive ESD track which belongs to fCurrentV0
144                 */
145         //  AliESDtrack* GetPositiveESDTrack(){return fESDEvent->GetTrack(fCurrentV0->GetPindex());}
146         AliESDtrack* GetPositiveESDTrack(){return fCurrentPositiveESDTrack;}
147                 
148         /*
149                 * Returns the negative KF particle which belongs to fCurrentV0
150                 */
151         AliKFParticle* GetNegativeKFParticle() const{return fCurrentNegativeKFParticle;}
152                 
153         /*
154                 * Returns the positive KF particle which belongs to fCurrentV0
155                 */
156         AliKFParticle* GetPositiveKFParticle() const{return fCurrentPositiveKFParticle;}
157                 
158         /*
159                 * Returns the KFParticle object of the 2 tracks.
160                 */
161         AliKFParticle* GetMotherCandidateKFCombination() const{return fCurrentMotherKFCandidate;}
162                 
163         /*
164                 * Checks the probablity that the PID of the particle is what we want it to be.
165                 */
166         Bool_t CheckPIDProbability(Double_t negProbCut, Double_t posProbCut);
167                 
168         /*
169                 * Checks if the PID of the two particles are within our cuts.
170                 */
171         void GetPIDProbability(Double_t &negPIDProb, Double_t &posPIDProb);
172
173         /*
174                 * Checks if the PID of the two particles are within our cuts.
175                 */
176         void GetPIDProbabilityMuonPion(Double_t &negPIDProb, Double_t &posPIDProb);
177                 
178         /*
179                 *Get the negative MC TParticle from the stack 
180                 */
181         TParticle * GetNegativeMCParticle() const{return fNegativeMCParticle;}
182                 
183         /*
184                 *Get the positive MC TParticle from the stack 
185                 */
186         TParticle * GetPositiveMCParticle() const{return fPositiveMCParticle;}
187                 
188         /*
189                 *Get the mother MC TParticle from the stack 
190                 */
191         TParticle * GetMotherMCParticle() const{return fMotherMCParticle;}
192                 
193         /*
194                 * Flag to see if the v0 particles share the same mother
195                 */
196         Bool_t HasSameMCMother();
197                 
198                 
199         /*
200                 *Get the PID of the MC mother particle
201                 */
202         Int_t GetMotherMCParticlePDGCode() const{return fMotherMCParticle->GetPdgCode();}
203                 
204         /*
205                 *Get the MC stack 
206                 */
207         AliStack* GetMCStack() const{return fMCStack;}
208                 
209                 
210         /*
211                 * Setup  AliMCEventHandler
212                 */                      
213         //  AliMCEventHandler* GetMCTruth() const{return fMCTruth;}     // for CF
214                 
215                 
216         /*
217                 *Get the MC stack 
218                 */
219         AliMCEvent* GetMCEvent() const{return fMCEvent;}   // for CF
220                 
221                 
222         /*
223                 *Get the magnetic field from the ESD event 
224                 */
225         Double_t GetMagneticField() const{return fESDEvent->GetMagneticField();}
226                 
227         /*
228                 *Get the primary vertex from the esd event
229                 */
230         const AliESDVertex *GetPrimaryVertex() const {return fESDEvent->GetPrimaryVertex();}
231
232         /*
233                 Calculate cos Pointing angle with new coords
234          */
235         Double_t GetV0CosineOfPointingAngle(Double_t V0PointX, Double_t V0PointY, Double_t V0PointZ);
236
237         /*
238                 * Set the PID of the negative track
239                 */
240         void SetNegativeTrackPID(Int_t negTrackPID){fNegativeTrackPID=negTrackPID;}
241                 
242         /*
243                 * Set the PID of the positive track
244                 */
245         void SetPositiveTrackPID(Int_t posTrackPID){fPositiveTrackPID=posTrackPID;}
246                 
247         /*
248                 * Set the flag to use the kfparticle class. Will also disable the use of esd tracks
249                 */
250         void UseKFParticle(){fUseKFParticle = kTRUE; fUseESDTrack = kFALSE;}
251                 
252         /*
253                 *  Set the flag to use the esd track class. Will also disable the use of kf particles
254                 */
255         void UseESDTrack(){fUseESDTrack = kTRUE; fUseKFParticle = kFALSE;}
256                 
257         /*
258                 *  Set the flag to use improved vertex or not
259                 */
260         void SetUseImprovedVertex(Bool_t useImprovedVertex){fUseImprovedVertex=useImprovedVertex;}
261                 
262         /*
263                 * Return the number in the species array belonging to the negative or positive track pid.
264                 */
265         Int_t GetSpeciesIndex(Int_t chargeOfTrack);
266                 
267         /*
268                 * Return the x coordinate of the v0
269                 */
270         Double_t GetX() const{return fCurrentXValue;}
271                 
272         /*
273                 * Return the y coordinate of the v0
274                 */
275         Double_t GetY() const{return fCurrentYValue;}
276                 
277         /*
278                 * Return the Z coordinate of the v0
279                 */
280         Double_t GetZ() const{return fCurrentZValue;}
281                 
282         /*
283                 * Return the radius of the v0
284                 */
285         Double_t GetXYRadius() const{return sqrt((Double_t)(fCurrentXValue*fCurrentXValue + fCurrentYValue*fCurrentYValue));}
286                 
287         /*
288                 * Get the opening angle between the two tracks
289                 */
290         Double_t GetOpeningAngle(){return fNegativeTrackLorentzVector->Angle(fPositiveTrackLorentzVector->Vect());}
291
292         /*
293                 * Get the Cos Pointing angle between the two tracks
294                 */
295         Double_t GetCosPointingAngle(){return fCurrentV0->GetV0CosineOfPointingAngle();}
296
297         /*
298          * Get the PsiPair angle between the two tracks
299          */
300         Double_t GetPsiPair(AliESDv0* v0);
301         /*
302          * Check If Particle is from BG Event
303          */
304         Bool_t IsParticleFromBGEvent(Int_t index);
305         /*
306          * GetNumberOfPrimariesFromHijingAndPythia
307          */
308         Int_t GetNumberOfHijingPlusPythiaPrimeries(Int_t excludeHeaderType);
309         Int_t GetPrimeriesFromHijingAndPythia(){return fNumberOfPrimerisFromHijingAndPythia;}
310         /*
311          * Get the DCA between the two tracks
312          */
313         Double_t GetDcaDaughters(){return fCurrentV0->GetDcaV0Daughters();}
314
315         /*
316                 * Get the Normalized DCA between the two tracks
317                 */
318         Double_t GetNormDcaDistDaughters(){return fCurrentV0->GetDcaV0Daughters()/fCurrentV0->GetDistSigma();}
319
320         /*
321                 * Get the Likelihood for a Conversion
322                 */
323         Double_t GetLikelihoodAP(){return fCurrentV0->GetLikelihoodAP(0,0);}
324                         
325         /*
326                 * Gets the Energy of the negative track.
327                 */
328         Double_t GetNegativeTrackEnergy() const{return fCurrentNegativeKFParticle->E();}
329                 
330         /*
331                 * Gets the Energy of the positive track.
332                 */
333         Double_t GetPositiveTrackEnergy() const{return fCurrentPositiveKFParticle->E();}
334                 
335         /*
336                 * Gets the Energy of the mother candidate.
337                 */
338         Double_t GetMotherCandidateEnergy() const{return fCurrentMotherKFCandidate->E();}
339                 
340         /*
341                 * Gets the Pt of the negative track.
342                 */
343         Double_t GetNegativeTrackPt() const{return fNegativeTrackLorentzVector->Pt();}
344                 
345         /*
346                 * Gets the Pt of the positive track.
347                 */
348         Double_t GetPositiveTrackPt() const{return fPositiveTrackLorentzVector->Pt();}
349                 
350
351         /*
352                 * Gets the Pt of the mother candidate.
353                 */
354         Double_t GetMotherCandidatePt() const{return fMotherCandidateLorentzVector->Pt();}
355
356
357         /*
358                 * Gets the P of the mother candidate.
359                 */
360         Double_t GetMotherCandidateP() const{return fMotherCandidateLorentzVector->P();}
361                 
362
363         /*
364                 * Gets the Eta of the negative track.
365                 */
366         Double_t GetNegativeTrackEta() const{return fNegativeTrackLorentzVector->Eta();}
367         /*
368                 * Gets the Eta of the positive track.
369                 */
370         Double_t GetPositiveTrackEta() const{return fPositiveTrackLorentzVector->Eta();}
371         /*
372                 * Gets the Eta of the mother candidate.
373                 */
374         Double_t GetMotherCandidateEta() const{return fMotherCandidateLorentzVector->Eta();}
375                 
376         /*
377                 * Gets the NDF of the mother candidate.
378                 */
379         Double_t GetMotherCandidateNDF() const{return fCurrentMotherKFCandidate->GetNDF();}
380                 
381         /*
382                 * Gets the Chi2 of the mother candidate.
383                 */
384         Double_t GetMotherCandidateChi2() const{return fCurrentMotherKFCandidate->GetChi2();}
385                 
386         /*
387                 * Gets the Mass of the mother candidate.
388                 */
389         Double_t GetMotherCandidateMass() const{return fMotherCandidateKFMass;}
390                 
391         /*
392                 * Gets the Width of the mother candidate.
393                 */
394         Double_t GetMotherCandidateWidth() const{return fMotherCandidateKFWidth;}
395                 
396         /*
397                 * Gets the Phi of the negative track.
398                 */
399         Double_t GetNegativeTrackPhi() const;
400                 
401         /*
402                 * Gets the Phi of the positive track.
403                 */
404         Double_t GetPositiveTrackPhi() const;
405                 
406         /*
407                 * Gets the Phi of the mother candidate.
408                 */
409         Double_t GetMotherCandidatePhi() const;
410                 
411         /*
412                 * Gets the Rapidity of the mother candidate.
413                 */
414         Double_t GetMotherCandidateRapidity() const;
415                 
416
417         /*
418                 * Gets the P of the negative track.
419                 */
420         Double_t GetNegativeTrackP() const{return fNegativeTrackLorentzVector->P();}
421                 
422         /*
423                 * Gets the P of the positive track.
424                 */
425         Double_t GetPositiveTrackP() const{return fPositiveTrackLorentzVector->P();}
426
427         /*
428                 * Gets the dE/dx in the TPC of the negative track.
429                 */
430         Double_t GetNegativeTrackTPCdEdx() const{return fCurrentNegativeESDTrack->GetTPCsignal();}
431                 
432         /*
433                 * Gets the dE/dx in the TPC of the positive track.
434                 */
435         Double_t GetPositiveTrackTPCdEdx() const{return fCurrentPositiveESDTrack->GetTPCsignal();}
436
437         /*
438                 * Gets the Number of the TPC clusters of the negative track.
439                 */
440         Int_t GetNegativeTracknTPCClusters() const{return fCurrentNegativeESDTrack->GetNcls(1);}
441
442         /*
443                 * Gets the Number of the TPC clusters of the positive track.
444                 */
445         Int_t GetPositiveTracknTPCClusters() const{return fCurrentPositiveESDTrack->GetNcls(1);}
446
447         /*
448                 * Get the TOFsignal for negative/positive track. RRnewTOF
449                 */
450         Double_t GetNegativeTrackTOFsignal() const{return fCurrentNegativeESDTrack->GetTOFsignal();}
451         Double_t GetPositiveTrackTOFsignal() const{return fCurrentPositiveESDTrack->GetTOFsignal();}    
452
453         /*
454                 * Gets the Number of the TPC findable clusters of the negative track.
455                 */
456         Int_t GetNegativeTracknTPCFClusters() const{return fCurrentNegativeESDTrack->GetTPCNclsF();}
457
458         /*
459                 * Gets the Number of the TPC findable clusters of the positive track.
460                 */
461         Int_t GetPositiveTracknTPCFClusters() const{return fCurrentPositiveESDTrack->GetTPCNclsF();}
462
463         /*
464                 * Gets the Number of the ITS clusters of the negative track.
465                 */
466         Int_t GetNegativeTracknITSClusters() const{return fCurrentNegativeESDTrack->GetNcls(0);}
467
468         /*
469                 * Gets the Number of the ITS clusters of the positive track.
470                 */
471         Int_t GetPositiveTracknITSClusters() const{return fCurrentPositiveESDTrack->GetNcls(0);}
472
473         /*
474                 * Gets the chi2 of the TPC  negative track.
475                 */
476         Double_t GetNegativeTrackTPCchi2() const{return fCurrentNegativeESDTrack->GetTPCchi2();}
477
478         /*
479                 * Gets the chi2 of the TPC  the positive track.
480                 */
481         Double_t GetPositiveTrackTPCchi2() const{return fCurrentPositiveESDTrack->GetTPCchi2();}
482                 
483         /*
484                 * Update data which need to be updated every event.
485                 */
486         void UpdateEventByEventData();
487
488         /*
489                 * Gets the MaxRCut value.
490                 */
491         Double_t GetMaxVertexZ() const{return fMaxVertexZ;}
492                 
493         /*
494                 * Gets the MaxRCut value.
495                 */
496         Double_t GetMaxRCut() const{return fMaxR;}
497
498                 /*
499                 * Gets the MinRCut value.
500                 */
501                 Double_t GetMinRCut() const{return fMinR;}
502                 
503         /*
504                 * Gets the Eta cut value.
505                 */
506         Double_t GetEtaCut() const{return fEtaCut;}
507
508         /*
509                 * Gets the Eta cut value.
510                 */
511         Double_t GetEtaCutMin() const{return fEtaCutMin;}
512
513         /*
514                 * Gets the Rapidity Meson cut value.
515                 */
516         Double_t GetRapidityMesonCut() const{return fRapidityMesonCut;}
517                 
518         /*
519                 * Gets the Pt cut value.
520                 */
521         Double_t GetPtCut() const{return fPtCut;}
522         Double_t GetSinglePtCut() const{return fSinglePtCut;}   
523                 
524         /*
525                 * Gets the MaxZCut value.
526                 */
527         Double_t GetMaxZCut() const{return fMaxZ;}
528                 
529                 
530         /*
531                 * Gets the MinClsTPC value.
532                 */
533         Double_t GetMinClsTPCCut() const{return fMinClsTPC;}
534                 
535         /*
536                 * Gets the MinClsTPC value.
537                 */
538         Double_t GetMinClsTPCCutToF() const{return fMinClsTPCToF;}
539         
540         const AliExternalTrackParam *GetExternalTrackParam(AliESDv0 *v0,Int_t charge);
541         const AliExternalTrackParam *GetExternalTrackParamP(AliESDv0 *v0){return GetExternalTrackParam(v0,1);};
542         const AliExternalTrackParam *GetExternalTrackParamN(AliESDv0 *v0){return GetExternalTrackParam(v0,-1);};
543         
544         AliVTrack *GetTrack(Int_t label);
545
546         /*
547                 * Gets the line cut values.
548                 */
549         Double_t GetLineCutZRSlope() const{return fLineCutZRSlope;}
550         Double_t GetLineCutZRSlopeMin() const{return fLineCutZRSlopeMin;}
551         Double_t GetLineCutZValue() const{return fLineCutZValue;}
552         Double_t GetLineCutZValueMin() const{return fLineCutZValueMin;} 
553         /*
554                 * Gets the Chi2 cut value for the conversions.
555                 */
556         Double_t GetChi2CutConversion() const{return fChi2CutConversion;}
557                 
558         /*
559                 * Gets the Chi2 cut value for the mesons.
560                 */
561         Double_t GetChi2CutMeson() const{return fChi2CutMeson;}
562                 
563         /*
564                 * Gets the alpha cut value for the mesons.
565                 */
566         Double_t GetAlphaCutMeson() const{return fAlphaCutMeson;}
567
568         /*
569                 * Gets the Minimum alpha cut value for the mesons.
570                 */
571         Double_t GetAlphaMinCutMeson() const{return fAlphaMinCutMeson;}
572
573         Double_t GetPositiveTrackLength() const{return fCurrentPositiveESDTrack->GetIntegratedLength();}
574         Double_t GetNegativeTrackLength() const{return fCurrentNegativeESDTrack->GetIntegratedLength();}
575                 
576         Double_t GetPositiveNTPCClusters() const{return fCurrentPositiveESDTrack->GetTPCNcls();}
577         Double_t GetNegativeNTPCClusters() const{return fCurrentNegativeESDTrack->GetTPCNcls();}
578                 
579         /*
580          * Sets the MaxVertexZ value.
581          */
582         void SetMaxVertexZ(Double_t maxVertexZ){fMaxVertexZ=maxVertexZ;}
583
584         /*
585          * Sets the MaxRCut value.
586          */
587         void SetMaxRCut(Double_t maxR){fMaxR=maxR;}
588         /*      
589          * Sets the MinRCut value.
590          */
591         void SetMinRCut(Double_t minR){fMinR=minR;}
592
593         /*
594          * Sets the EtaCut value.
595          */
596         void SetEtaCut(Double_t etaCut){fEtaCut=etaCut;}
597
598         /*
599          * Sets the EtaCutMin value.
600          */
601         void SetEtaCutMin(Double_t etaCutMin){fEtaCutMin=etaCutMin;}
602
603
604         /*
605          * Sets the Rapidity Meson Cut value.
606          */
607         void SetRapidityMesonCut(Double_t RapidityMesonCut){fRapidityMesonCut=RapidityMesonCut;}
608                 
609         /*
610          * Sets the PtCut value.
611          */
612         void SetPtCut(Double_t ptCut){fPtCut=ptCut;}
613                 
614         /*
615          * Sets the PtCut value.
616          */
617         void SetSinglePtCut(Double_t singleptCut){fSinglePtCut=singleptCut;}
618                 
619                 
620         /*
621          * Sets the MaxZCut value.
622          */
623         void SetMaxZCut(Double_t maxZ){fMaxZ=maxZ;}
624                 
625         /*
626          * Sets the MinClsTPC value.
627          */
628         void SetMinClsTPCCut(Double_t minClsTPC){fMinClsTPC=minClsTPC;}
629
630         /*
631          * Sets the MinClsTPC value.
632          */
633         void SetMinClsTPCCutToF(Double_t minClsTPCToF){fMinClsTPCToF=minClsTPCToF;}
634                 
635
636         /*
637          * Sets the LineCut values.
638          */
639         void SetLineCutZRSlope(Double_t LineCutZRSlope){fLineCutZRSlope=LineCutZRSlope;}
640         void SetLineCutZValue(Double_t LineCutZValue){fLineCutZValue=LineCutZValue;}
641                 
642         void SetLineCutZRSlopeMin(Double_t LineCutZRSlopeMin){fLineCutZRSlopeMin=LineCutZRSlopeMin;}
643         void SetLineCutZValueMin(Double_t LineCutZValueMin){fLineCutZValueMin=LineCutZValueMin;}
644                         
645         /*
646          * Sets the Chi2Cut value for conversions.
647          */
648         void SetChi2CutConversion(Double_t chi2){fChi2CutConversion=chi2;}
649                 
650         /*
651          * Sets the Chi2Cut for the mesons.
652          */
653         void SetChi2CutMeson(Double_t chi2){fChi2CutMeson=chi2;}
654                 
655         /*
656          * Sets the AlphaCut for the mesons.
657          */
658         void SetAlphaCutMeson(Double_t alpha){fAlphaCutMeson=alpha;}
659                 
660
661         /*
662          * Sets the AlphaCut for the mesons.
663          */
664         void SetAlphaMinCutMeson(Double_t alpha){fAlphaMinCutMeson=alpha;}
665
666
667         /*
668          * Sets the XVertexCut value.
669          */
670         void SetXVertexCut(Double_t xVtx){fCurrentXValue=xVtx;}
671                 
672         /*
673          * Sets the YVertexCut value.
674          */
675         void SetYVertexCut(Double_t yVtx){fCurrentYValue=yVtx;}
676                 
677         /*
678          * Sets the ZVertexCut value.
679          */
680         void SetZVertexCut(Double_t zVtx){fCurrentZValue=zVtx;}
681                 
682         /*
683          * Sets the PIDProbabilityCut value for track particles.
684          */
685         void SetPIDProbability(Double_t pidProb){fPIDProbabilityCutPositiveParticle=pidProb; fPIDProbabilityCutNegativeParticle=pidProb;}
686                 
687         /*
688          * Sets the PIDProbability cut value for the negative track.
689          */
690         void SetPIDProbabilityNegativeParticle(Double_t pidProb){fPIDProbabilityCutNegativeParticle=pidProb;}
691                 
692         /*
693          * Sets the PIDProbability cut value for the positive track.
694          */
695         void SetPIDProbabilityPositiveParticle(Double_t pidProb){fPIDProbabilityCutPositiveParticle=pidProb;}
696
697         /*
698          * Sets the PIDnSigmaAboveElectron cut value for the tracks.
699          */
700         void SetPIDnSigmaAboveElectronLine(Double_t nSigmaAbove){fPIDnSigmaAboveElectronLine=nSigmaAbove;}
701         void SetTofPIDnSigmaAboveElectronLine(Double_t nTofSigmaAbove){fTofPIDnSigmaAboveElectronLine=nTofSigmaAbove;} // RRnewTOF
702                 
703         /*
704          * Sets the PIDnSigmaBelowElectron cut value for the tracks.
705          */
706         void SetPIDnSigmaBelowElectronLine(Double_t nSigmaBelow){fPIDnSigmaBelowElectronLine=nSigmaBelow;}
707         void SetTofPIDnSigmaBelowElectronLine(Double_t nTofSigmaBelow){fTofPIDnSigmaBelowElectronLine=nTofSigmaBelow;} // RRnewTOF
708                 
709         /*
710          * Sets the PIDnSigmaAbovePion cut value for the tracks.
711          */
712         void SetPIDnSigmaAbovePionLine(Double_t nSigmaAbovePion){fPIDnSigmaAbovePionLine=nSigmaAbovePion;}
713
714         /*
715          * Sets the PIDnSigmaAbovePion cut value for the tracks.
716          */
717         void SetPIDnSigmaAbovePionLineHighPt(Double_t nSigmaAbovePionHighPt){fPIDnSigmaAbovePionLineHighPt=nSigmaAbovePionHighPt;}
718
719         /*
720          * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
721          */
722         void SetPIDMinPnSigmaAbovePionLine(Double_t MinPnSigmaAbovePion){fPIDMinPnSigmaAbovePionLine=MinPnSigmaAbovePion;}
723
724         /*
725          * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
726          */
727         void SetPIDMaxPnSigmaAbovePionLine(Double_t MaxPnSigmaAbovePion){fPIDMaxPnSigmaAbovePionLine=MaxPnSigmaAbovePion;}
728
729         /*
730          * Sets the SigmaMassCut value.
731          */
732         void SetSigmaMass(Double_t sigmaMass){fNSigmaMass=sigmaMass;}
733                 
734         /*
735          * Sets the flag to enable/disable the usage of MC information. 
736          */
737         void SetDoMCTruth(Bool_t doMC){fDoMC = doMC;}
738
739         /*
740          * Sets the flag to enable/disable the usage of MC information. 
741          */
742         Bool_t GetDoMCTruth() const {return fDoMC;}
743                 
744         /*
745          * Sets the flag to enable/disable the cut dedx N sigma 
746          */
747
748         void SetDodEdxSigmaCut( Bool_t dodEdxSigmaCut){fDodEdxSigmaCut=dodEdxSigmaCut;}
749         void SetDoTOFsigmaCut( Bool_t doTOFsigmaCut){fDoTOFsigmaCut=doTOFsigmaCut;} //RRnewTOF
750         void SetDoPhotonAsymmetryCut( Bool_t doPhotonAsymmetryCut){fDoPhotonAsymmetryCut=doPhotonAsymmetryCut;}
751         void SetUseESDQtCut(Int_t doESDQtCut){fdoESDQtCut=doESDQtCut;}
752
753         void SetMinPPhotonAsymmetryCut(Double_t minPPhotonAsymmetryCut){fMinPPhotonAsymmetryCut=minPPhotonAsymmetryCut;}
754         void SetMinPhotonAsymmetry(Double_t minPhotonAsymmetry){fMinPhotonAsymmetry=minPhotonAsymmetry;}
755         /*
756          * Sets the flag to enable/disable the cut dedx N sigma for Kaon Rejection at low p 
757          */
758         void SetDoKaonRejectionLowP( Bool_t doKaonRejectionLowP){fDoKaonRejectionLowP=doKaonRejectionLowP;}
759         /*
760          * Sets the flag to enable/disable the cut dedx N sigma for Proton Rejection at low p 
761          */
762         void SetDoProtonRejectionLowP( Bool_t doProtonRejectionLowP){fDoProtonRejectionLowP=doProtonRejectionLowP;}
763
764         /*
765          * Sets the flag to enable/disable the cut dedx N sigma for Pion Rejection at low p 
766          */
767         void SetDoPionRejectionLowP( Bool_t doPionRejectionLowP){fDoPionRejectionLowP=doPionRejectionLowP;}
768
769         /*
770          * Sets the PIDMinPnSigmaAroundKaon cut value for the tracks.
771          */
772         void SetPIDnSigmaAtLowPAroundKaonLine(Double_t nSigmaAtLowPAroundKaon){fPIDnSigmaAtLowPAroundKaonLine =nSigmaAtLowPAroundKaon;}
773
774         /*
775          * Sets the PIDMinPnSigmaAroundProton cut value for the tracks.
776          */
777         void SetPIDnSigmaAtLowPAroundProtonLine(Double_t nSigmaAtLowPAroundProton){fPIDnSigmaAtLowPAroundProtonLine =nSigmaAtLowPAroundProton;}
778
779         /*
780          * Sets the PIDMinPnSigmaAroundPion cut value for the tracks.
781          */
782         void SetPIDnSigmaAtLowPAroundPionLine(Double_t nSigmaAtLowPAroundPion){fPIDnSigmaAtLowPAroundPionLine =nSigmaAtLowPAroundPion;}
783
784         /*
785          * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
786          */
787         void SetPIDMinPKaonRejectionLowP(Double_t PIDMinPKaonRejectionLowP ){fPIDMinPKaonRejectionLowP=PIDMinPKaonRejectionLowP;}
788
789         /*
790          * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
791          */
792         void SetPIDMinPProtonRejectionLowP(Double_t PIDMinPProtonRejectionLowP ){fPIDMinPProtonRejectionLowP=PIDMinPProtonRejectionLowP;}
793         /*
794          * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
795          */
796         void SetPIDMinPPionRejectionLowP(Double_t PIDMinPPionRejectionLowP ){fPIDMinPPionRejectionLowP=PIDMinPPionRejectionLowP;}
797
798         /*
799          *Set if we want to use Gamma Selection based on Qt from Armenteros
800          */
801         void SetDoQtGammaSelection(Bool_t doQtGammaSelection){fDoQtGammaSelection=doQtGammaSelection;}
802         void SetDoHighPtQtGammaSelection(Bool_t doHighPtQtGammaSelection){fDoHighPtQtGammaSelection=doHighPtQtGammaSelection;} // RRnew
803         /*
804          * Sets the MaxQtCut value.
805          */
806         void SetQtMax(Double_t qtMax){fQtMax=qtMax;}
807         void SetHighPtQtMax(Double_t qtMaxHighPt){fHighPtQtMax=qtMaxHighPt;} // RRnew
808         void SetPtBorderForQt(Double_t ptBorderForQt){fPtBorderForQt=ptBorderForQt;} // RRnew
809
810         /*
811          * Updates the V0 information of the current V0.
812          */
813         Bool_t UpdateV0Information();
814                 
815         /*
816          * Resets the V0 index.
817          */
818         void ResetV0IndexNumber(){fCurrentV0IndexNumber=0;}
819         
820
821         /*
822          * Returns number of good v0s in the event
823          */
824         Int_t GetNGoodV0s() const {return fNumberOfGoodV0s;}
825
826         /*
827          * Sets the histograms.
828          */
829         void SetHistograms(AliGammaConversionHistograms * const histograms){fHistograms=histograms;}
830                 
831         /*
832          * Check for primary vertex.
833          */
834         Bool_t CheckForPrimaryVertex();
835                 
836         /*
837          * Check for primary vertex Z.
838          */
839         Bool_t CheckForPrimaryVertexZ();
840
841         /*
842          * Gets a vector of good v0s.
843          */
844         TClonesArray* GetCurrentEventGoodV0s() const{return fCurrentEventGoodV0s;}
845                 
846         /*
847          * Gets the vector of previous events v0s (for bacground analysis)
848          */
849         AliGammaConversionKFVector* GetBGGoodV0s(Int_t event) const;
850         //  vector<AliKFParticle> GetPreviousEventGoodV0s() const{return fPreviousEventGoodV0s;}
851
852         void SetUseOwnXYZCalculation(Bool_t flag){fUseOwnXYZCalculation=flag;}
853
854         void SetUseConstructGamma(Bool_t flag){fUseConstructGamma=flag;}
855
856         /*
857          * Excludes BG Events in HI Simulations e.g. in LHC10b_bis
858          */
859         void SetExcludeBackgroundEventForGammaCorrection(Int_t flag){fExcludeBackgroundEventForGammaCorrection=flag;}
860         /*
861          * Excludes BG Events in HI Simulations e.g. in LHC10b_bis
862          */
863         Int_t GetExcludeBackgroundEventForGammaCorrection(){return fExcludeBackgroundEventForGammaCorrection;}
864
865
866 //      Bool_t GetHelixCenter(AliESDtrack* track, Double_t b,Int_t charge, Double_t center[2]); 
867
868         Bool_t GetHelixCenter(const AliExternalTrackParam *track, Double_t b,Int_t charge, Double_t center[2]);
869         Bool_t GetConvPosXY(AliESDtrack* ptrack,AliESDtrack* ntrack, Double_t b, Double_t convpos[2]);
870         Double_t GetConvPosZ(AliESDtrack* ptrack,AliESDtrack* ntrack, Double_t b);
871         Bool_t GetConversionPoint(const AliExternalTrackParam *pparam,const AliExternalTrackParam *nparam,Double_t convpos[3]);
872         
873         Bool_t GetArmenterosQtAlpha(const AliKFParticle * posKFparticle, const AliKFParticle * negKFparticle, const AliKFParticle * gamKFparticle,Double_t armenterosQtAlpha[2]);
874         Bool_t GetArmenterosQtAlpha(const TParticle * posKFparticle, const TParticle * negKFparticle, const AliKFParticle * gamKFparticle,Double_t armenterosQtAlpha[2]);
875         Bool_t GetArmenterosQtAlpha(const TParticle * posKFparticle, const TParticle * negKFparticle, const TParticle * gamKFparticle,Double_t armenterosQtAlpha[2]);
876         Bool_t GetArmenterosQtAlpha(const AliESDv0 * v0, Double_t armenterosQtAlpha[2]);
877         Int_t GetUseESDQtCut(){ return fdoESDQtCut;}
878         Bool_t GetArmenterosQtAlpha(const AliKFParticle * posKFparticle, const AliKFParticle * negKFparticle, Double_t armenterosQtAlpha[2], Int_t kfProductionMethod);
879         void SetDoCF(Bool_t flag){fDoCF = flag;}
880
881         Bool_t CheckV0FinderStatus(AliESDv0 *v0);
882
883
884         void SetOnFlyFlag(Bool_t flag){fUseOnFlyV0Finder = flag;}
885
886         void SetPsiPairCut(Double_t flag){fPsiPairCut = flag;}
887         Double_t GetPsiPairCut(){return fPsiPairCut;}
888        
889         void SetCosinePointCut(Double_t flag){fCosinePointCut = TMath::Cos(flag);}
890         Double_t GetCosinePointCut(){return fCosinePointCut;}
891        
892         Int_t GetNBGEvents(){return fBGEventHandler->GetNBGEvents();}
893
894         void SetCalculateBackground(Bool_t flag){fCalculateBackground=flag;}
895
896         AliGammaConversionBGHandler* GetBGHandler() const {return fBGEventHandler;}
897
898         Double_t GetVertexZ(){return fESDEvent->GetPrimaryVertex()->GetZ();}
899
900         Int_t GetMultiplicity(){return CountESDTracks();}
901
902         void SetESDtrackCuts(AliESDtrackCuts * const trackCuts){fEsdTrackCuts = trackCuts;}
903
904         void SetNEventsForBG(Int_t nev){fNEventsForBGCalculation = nev;}
905
906         Int_t CountESDTracks();
907
908         Int_t GetCurrentV0IndexNumber() const {return fCurrentV0IndexNumber;}
909
910         Bool_t CheckIfPi0IsMother(Int_t label);
911         Bool_t CheckIfEtaIsMother(Int_t label);
912
913         static void InitESDpid(Int_t type=0);
914         static void SetESDpid(AliESDpid * const pid) {fgESDpid=pid;}
915         static AliESDpid* GetESDpid() {return fgESDpid;}
916
917         void SetUseChargedTracksMultiplicityForBG(Bool_t flag){fUseChargedTrackMultiplicityForBG = flag;}
918         void SetIsHeavyIon(Int_t isHeavyIon) {fIsHeavyIon=isHeavyIon;}
919         Int_t GetIsHeavyIon() const { return fIsHeavyIon;}
920         
921         Int_t GetPindex(Int_t i) {return fV0Pindex.at(i);}
922         Int_t GetNindex(Int_t i) {return fV0Nindex.at(i);}
923
924         void ResetNGoodV0s(){fNumberOfGoodV0s=0;}
925         Int_t GetFirstTPCRow(Double_t radius);
926
927         void SetUseCorrectedTPCClsInfo(Bool_t flag){fUseCorrectedTPCClsInfo = flag;}
928         Bool_t GetUseCorrectedTPCClsInfo() const {return fUseCorrectedTPCClsInfo;}
929
930         void SetUseMCPSmearing(Int_t useMCPSmearing) {fUseMCPSmearing=useMCPSmearing;}
931         void SetPBremSmearing(Double_t pBremSmearing){fPBremSmearing=pBremSmearing;}
932         void SetPSigSmearing(Double_t pSigSmearing){fPSigSmearing=pSigSmearing;}
933         void SetPSigSmearingCte(Double_t pSigSmearingCte){fPSigSmearingCte=pSigSmearingCte;}
934         void SmearKFParticle(AliKFParticle * kfParticle);
935   
936         private:
937                 AliStack * fMCStack;           // pointer to MonteCarlo particle stack 
938                 //  AliMCEventHandler* fMCTruth;   // for CF    pointer to the MC object
939                 AliMCEvent *fMCEvent;                   //  for CF      pointer to MC event
940                 TChain * fChain;               // pointer to the TChain
941                         
942                 //  AliESDInputHandler* fESDHandler;      //! pointer to esd object
943                 AliESDEvent *fESDEvent;               //! pointer to esd object
944                         
945                         
946                 // for CF
947                 AliCFManager *fCFManager; // pointer to the cf manager
948                 //  AliCFContainer *container;
949                         
950                 // for dEdx cut based on nSigma to a particle line
951                 //AliESDpid * fESDpid; // esd pid
952                         
953                 AliGammaConversionHistograms *fHistograms; // pointer to histogram handling class
954                         
955                 Int_t fCurrentV0IndexNumber;  // the current v0 index number
956                 AliESDv0 * fCurrentV0;                //! pointer to the current v0
957                 AliKFParticle * fCurrentNegativeKFParticle;  //! pointer to the negative KF particle
958                 AliKFParticle * fCurrentPositiveKFParticle;  //! pointer to the positive KF particle
959                 AliKFParticle * fCurrentMotherKFCandidate;   //! pointer to the positive KF particle
960                         
961                 AliESDtrack * fCurrentNegativeESDTrack;      //! pointer to the negative ESD track
962                 AliESDtrack * fCurrentPositiveESDTrack;      //! pointer to the positive ESD track
963                         
964                 TLorentzVector * fNegativeTrackLorentzVector; //! pointer to the negative Track Lorentz Vector
965                 TLorentzVector * fPositiveTrackLorentzVector; //! pointer to the positive Track Lorentz Vector
966                 TLorentzVector * fMotherCandidateLorentzVector;   //! pointer to the mother candidate Track Lorentz Vector
967                         
968                 Double_t fCurrentXValue;   // current x value
969                 Double_t fCurrentYValue;   // current y value
970                 Double_t fCurrentZValue;   // current z value
971                         
972                 Int_t fPositiveTrackPID;   // positive track pid
973                 Int_t fNegativeTrackPID;   // negative track pid
974                         
975                 TParticle *fNegativeMCParticle;      //!
976                 TParticle *fPositiveMCParticle;      //!
977                 TParticle *fMotherMCParticle;        //!
978                         
979                 Double_t fMotherCandidateKFMass;   // mass of mother candidate KF particle
980                 Double_t fMotherCandidateKFWidth;  // width of mother candidate KF particle
981                         
982                 Bool_t fUseKFParticle;   // flag 
983                 Bool_t fUseESDTrack;     // flag 
984                 Bool_t fDoMC;            // flag 
985
986                 //Event Cuts
987                 Double_t fMaxVertexZ; // max z vertex cut
988                 //cuts
989                 Double_t fMaxR; //r cut
990                 Double_t fMinR; //r cut
991                 Double_t fEtaCut; //eta cut
992                 Double_t fEtaCutMin; //eta cut
993                 Double_t fRapidityMesonCut; //rapidity for meson cut
994                 Double_t fPtCut; // pt cut
995                 Double_t fSinglePtCut; // pt cut for electron/positron
996                 Double_t fMaxZ; //z cut
997                 Double_t fMinClsTPC; // minimum clusters in the TPC
998                 Double_t fMinClsTPCToF; // minimum clusters to findable clusters
999                 Double_t fLineCutZRSlope; //linecut
1000                 Double_t fLineCutZValue; //linecut
1001                 Double_t fLineCutZRSlopeMin; //linecut
1002                 Double_t fLineCutZValueMin; //linecut
1003                 Double_t fChi2CutConversion; //chi2cut
1004                 Double_t fChi2CutMeson;  //chi2cut
1005                 Double_t fAlphaCutMeson;  //alphacut
1006                 Double_t fAlphaMinCutMeson;  //alphacut
1007                 Double_t fPIDProbabilityCutNegativeParticle; //pid cut
1008                 Double_t fPIDProbabilityCutPositiveParticle; //pid cut
1009                 Bool_t   fDodEdxSigmaCut; // flag to use the dEdxCut based on sigmas
1010                 Bool_t   fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
1011                 Double_t fPIDnSigmaAboveElectronLine; // sigma cut
1012                 Double_t fPIDnSigmaBelowElectronLine; // sigma cut
1013                 Double_t fTofPIDnSigmaAboveElectronLine; // sigma cut RRnewTOF
1014                 Double_t fTofPIDnSigmaBelowElectronLine; // sigma cut RRnewTOF 
1015                 Double_t fPIDnSigmaAbovePionLine;     // sigma cut
1016                 Double_t fPIDnSigmaAbovePionLineHighPt;     // sigma cut
1017                 Double_t fPIDMinPnSigmaAbovePionLine; // sigma cut
1018                 Double_t fPIDMaxPnSigmaAbovePionLine; // sigma cut
1019                 Double_t fDoKaonRejectionLowP;   // Kaon rejection at low p
1020                 Double_t fDoProtonRejectionLowP; // Proton rejection at low p
1021                 Double_t fDoPionRejectionLowP;   // Pion rejection at low p
1022                 Double_t fPIDnSigmaAtLowPAroundKaonLine; // sigma cut
1023                 Double_t fPIDnSigmaAtLowPAroundProtonLine; // sigma cut
1024                 Double_t fPIDnSigmaAtLowPAroundPionLine; // sigma cut
1025                 Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection
1026                 Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection
1027                 Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection
1028                 Bool_t   fDoQtGammaSelection; // Select gammas using qtMax
1029                 Bool_t   fDoHighPtQtGammaSelection; // RRnew Select gammas using qtMax for high pT
1030                 Double_t fQtMax; // Maximum Qt from Armenteros to select Gammas
1031                 Double_t fHighPtQtMax; // RRnew Maximum Qt for High pT from Armenteros to select Gammas
1032                 Double_t fPtBorderForQt; // RRnew 
1033                 Double_t fXVertexCut; //vertex cut
1034                 Double_t fYVertexCut; //vertex cut
1035                 Double_t fZVertexCut; // vertexcut
1036                 Double_t fPsiPairCut;
1037                 Double_t fCosinePointCut;
1038                 
1039                         
1040                 Double_t fNSigmaMass; //nsigma cut
1041                         
1042                 Bool_t fUseImprovedVertex; //flag
1043
1044                 Bool_t fUseOwnXYZCalculation; //flag that determines if we use our own calculation of xyz (markus)
1045
1046                 Bool_t fUseConstructGamma; //flag that determines if we use ConstructGamma method from AliKF
1047
1048                 Bool_t fDoCF; //flag
1049
1050                 Bool_t fUseEtaMinCut; //flag
1051
1052                 Bool_t fUseOnFlyV0Finder; //flag
1053
1054                 Bool_t fUpdateV0AlreadyCalled; //flag
1055                         
1056                 TClonesArray* fCurrentEventGoodV0s; //vector of good v0s
1057                 
1058                 vector<Int_t> fV0Pindex; // index of positive track belonging to a V0
1059                 vector<Int_t> fV0Nindex; // index of positive track belonging to a V0
1060                 //  vector<AliKFParticle> fPreviousEventGoodV0s; // vector of good v0s from prevous events
1061
1062                 Bool_t fCalculateBackground; //flag
1063                 AliGammaConversionBGHandler *fBGEventHandler; // background handler
1064                 Bool_t fBGEventInitialized; //flag
1065                         
1066                 AliESDtrackCuts *fEsdTrackCuts; // track cuts
1067                 Int_t fNumberOfESDTracks; //track counter
1068
1069                 static AliESDpid* fgESDpid;                 // ESD pid object
1070
1071                 Int_t fNEventsForBGCalculation; // Number of events used for background calculation
1072                 
1073                 Bool_t fUseChargedTrackMultiplicityForBG; // flag
1074                 Int_t fNumberOfGoodV0s; // number of good V0s
1075                 Int_t fIsHeavyIon; // flag
1076                 Bool_t fUseCorrectedTPCClsInfo;
1077                 Int_t fUseMCPSmearing;
1078                 Double_t fPBremSmearing;
1079                 Double_t fPSigSmearing;
1080                 Double_t fPSigSmearingCte;
1081                 TRandom3 fRandom;
1082                 TF1 * fBrem;    
1083                 Bool_t   fDoPhotonAsymmetryCut; // flag to use the PhotonAsymetryCut
1084                 Int_t    fdoESDQtCut; // flag for ESD based Qt cut
1085                 Double_t fMinPPhotonAsymmetryCut;
1086                 Double_t fMinPhotonAsymmetry;
1087                 Int_t fExcludeBackgroundEventForGammaCorrection; // flag for excluding Gamma from BGEvent for
1088                 Int_t fNumberOfPrimerisFromHijingAndPythia; //Number Of Primaries from Hijing and Pythia for PbPb
1089                 ClassDef(AliV0Reader,22) // RRnewTOF
1090 };
1091
1092 inline void AliV0Reader::InitESDpid(Int_t type)
1093 {
1094   //
1095   // initialize PID parameters
1096   // type=0 is simulation
1097   // type=1 is data
1098
1099         if (!fgESDpid) fgESDpid=new AliESDpid;
1100         Double_t alephParameters[5];
1101         // simulation
1102         alephParameters[0] = 2.15898e+00/50.;
1103         alephParameters[1] = 1.75295e+01;
1104         alephParameters[2] = 3.40030e-09;
1105         alephParameters[3] = 1.96178e+00;
1106         alephParameters[4] = 3.91720e+00;
1107         fgESDpid->GetTOFResponse().SetTimeResolution(80.);
1108
1109         // data
1110         if (type==1){
1111                 alephParameters[0] = 0.0283086/0.97;
1112                 alephParameters[1] = 2.63394e+01;
1113                 alephParameters[2] = 5.04114e-11;
1114                 alephParameters[3] = 2.12543e+00;
1115                 alephParameters[4] = 4.88663e+00;
1116                 fgESDpid->GetTOFResponse().SetTimeResolution(130.);
1117                 fgESDpid->GetTPCResponse().SetMip(50.);
1118         }
1119
1120         fgESDpid->GetTPCResponse().SetBetheBlochParameters(
1121                 alephParameters[0],alephParameters[1],alephParameters[2],
1122                 alephParameters[3],alephParameters[4]);
1123
1124         fgESDpid->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);
1125
1126 }
1127
1128 #endif
1129
1130
1131
1132
1133
1134