]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/ESD/AliESDpid.h
Adding the possibility to get an oldest version, also via GetAll, by means
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDpid.h
1 #ifndef ALIESDPID_H
2 #define ALIESDPID_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //-------------------------------------------------------
9 //                    Combined PID class
10 //           for the Event Summary Data class
11 //   Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
12 //   Modified: Jens Wiechula, Uni Tuebingen, jens.wiechula@cern.ch
13 //-------------------------------------------------------
14 #include <Rtypes.h>
15 #include "AliESDtrack.h" // Needed for inline functions
16 #include "AliMCEventHandler.h"
17
18 //#include "HMPID/AliHMPID.h"
19 //#include "TRD/AliTRDpidESD.h"
20
21 #include "AliPIDResponse.h"
22
23 class AliESDEvent;
24 class AliVEvent;
25 class AliVParticle;
26
27 class AliESDpid : public AliPIDResponse  {
28 public:
29   AliESDpid(Bool_t forMC=kFALSE): AliPIDResponse(forMC), fRangeTOFMismatch(5.), fEventHandler(NULL) {;}
30 AliESDpid(const AliESDpid&a): AliPIDResponse(a), fRangeTOFMismatch(a.fRangeTOFMismatch), fEventHandler(NULL){;};
31 AliESDpid& operator=(const AliESDpid& a){if (this==&a) return *this; AliPIDResponse::operator=(a); fRangeTOFMismatch=a.fRangeTOFMismatch; fEventHandler=NULL; return *this;};
32   virtual ~AliESDpid() {}
33   
34   Int_t MakePID(AliESDEvent *event, Bool_t TPCOnly = kFALSE, Float_t timeZeroTOF=9999) const;
35   void MakeTPCPID(AliESDtrack *track) const;
36   void MakeITSPID(AliESDtrack *track) const;
37   void MakeTOFPID(AliESDtrack *track, Float_t /*timeZeroTOF*/) const;
38   Bool_t CheckTOFMatching(AliESDtrack *track) const;
39   //  void MakeHMPIDPID(AliESDtrack *track);
40   void MakeTRDPID(AliESDtrack *track) const;
41   void CombinePID(AliESDtrack *track) const;
42
43 //   Float_t NumberOfSigmasTOF(const AliVParticle *track, AliPID::EParticleType type) const {return AliPIDResponse::NumberOfSigmasTOF(track,type);}
44 //   Float_t GetNumberOfSigmasTOF(const AliVParticle *track, AliPID::EParticleType type, const Float_t timeZeroTOF) const;
45   
46   void SetNMaxSigmaTOFTPCMismatch(Float_t range) {fRangeTOFMismatch=range;}
47   Float_t GetNMaxSigmaTOFTPCMismatch() const {return fRangeTOFMismatch;}
48
49   Float_t GetTPCsignalTunedOnData(const AliVTrack *t) const;
50   Float_t GetTOFsignalTunedOnData(const AliVTrack *t) const;
51
52   void SetEventHandler(AliVEventHandler *event){fEventHandler=event;};
53 protected:
54   virtual Float_t GetSignalDeltaTOFold(const AliVParticle *track, AliPID::EParticleType type, Bool_t ratio=kFALSE) const;
55   virtual Float_t GetNumberOfSigmasTOFold(const AliVParticle *track, AliPID::EParticleType type) const;
56
57 private:
58
59   Float_t           fRangeTOFMismatch; // nSigma max for TOF matching with TPC
60   AliVEventHandler *fEventHandler; //! MC event handler
61   
62   ClassDef(AliESDpid,7)  // PID calculation class
63 };
64
65
66 #endif
67
68