Updates in order to enable the '2D' PID for the TRD developed by Daniel Lohner.
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliPIDResponse.h
index 17a265ee2aa20c8b47cb45c6ba82e5f1ef2c98ed..d71573056430cc0ac72e2c70af187cbfe8210f03 100644 (file)
@@ -17,6 +17,7 @@
 #include "AliTOFPIDResponse.h"
 #include "AliEMCALPIDResponse.h"
 
+
 #include "AliVParticle.h"
 #include "AliVTrack.h"
 
@@ -24,6 +25,7 @@
 
 class AliVEvent;
 class TF1;
+class AliTRDPIDResponseObject; 
 
 class AliPIDResponse : public TNamed {
 public:
@@ -61,6 +63,7 @@ public:
   virtual Float_t NumberOfSigmasITS(const AliVParticle *track, AliPID::EParticleType type) const;
   virtual Float_t NumberOfSigmasTPC(const AliVParticle *track, AliPID::EParticleType type) const;
   virtual Float_t NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EParticleType type) const;
+  virtual Float_t NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EParticleType type, Double_t &eop, Double_t showershape[4]) const;
   virtual Float_t NumberOfSigmasTOF(const AliVParticle *track, AliPID::EParticleType type) const = 0;
   virtual Bool_t IdentifiedAsElectronTRD(const AliVTrack *track, Double_t efficiencyLevel) const;
 
@@ -76,10 +79,10 @@ public:
 
 
   void SetITSPIDmethod(ITSPIDmethod pmeth) { fITSPIDmethod = pmeth; }
-  virtual void SetTOFResponse(AliVEvent */*event*/,EStartTimeType_t /*option*/) {;}
   void SetTRDslicesForPID(UInt_t slice1, UInt_t slice2) {fTRDslicesForPID[0]=slice1;fTRDslicesForPID[1]=slice2;}
   
   void SetOADBPath(const char* path) {fOADBPath=path;}
+  const char *GetOADBPath() const {return fOADBPath.Data();}
   void InitialiseEvent(AliVEvent *event, Int_t pass);
   void SetCurrentFile(const char* file) { fCurrentFile=file; }
 
@@ -88,9 +91,17 @@ public:
   // User settings for the MC period and reco pass
   void SetMCperiod(const char *mcPeriod) {fMCperiodUser=mcPeriod;}
   void SetRecoPass(Int_t recoPass)       {fRecoPassUser=recoPass;}
-  
+
+  // event info
+  Float_t GetCurrentCentrality() const {return fCurrCentrality;};
+
+  // TOF setting
+  void SetTOFtail(Float_t tail=1.1){if(tail > 0) fTOFtail=tail; else printf("TOF tail should be greater than 0 (nothing done)\n");};
+  void SetTOFResponse(AliVEvent *vevent,EStartTimeType_t option);
+
   AliPIDResponse(const AliPIDResponse &other);
   AliPIDResponse& operator=(const AliPIDResponse &other);
+
   
 protected:
   AliITSPIDResponse fITSResponse;    //PID response function of the ITS
@@ -120,14 +131,17 @@ private:
   TObjArray *fArrPidResponseMaster;    //!  TPC pid splines
   TF1       *fResolutionCorrection;    //! TPC resolution correction
 
-  AliTRDPIDParams *fTRDPIDParams;       //! TRD PID Params
-  AliTRDPIDReference *fTRDPIDReference; //! TRD PID References
+  AliTRDPIDResponseObject *fTRDPIDResponseObject; //! TRD PID Response Object
   UInt_t fTRDslicesForPID[2];           //! TRD PID slices
 
-  Int_t   fTOFTimeZeroType;            //! default start time type for tof (ESD)
-  Float_t fTOFres;                     //! TOF resolution
+  Float_t fTOFtail;                    //! TOF tail effect used in TOF probability
+  AliTOFPIDParams *fTOFPIDParams;      //! TOF PID Params - period depending (OADB loaded)
+
+  TObjArray *fEMCALPIDParams;             //! EMCAL PID Params
 
   AliVEvent *fCurrentEvent;            //! event currently being processed
+
+  Float_t fCurrCentrality;             //! current centrality
   
   void ExecNewRun();
   
@@ -148,11 +162,17 @@ private:
   void InitializeTRDResponse();
 
   //TOF
-  
+  void SetTOFPidResponseMaster();
+  void InitializeTOFResponse();
+
+  //EMCAL
+  void SetEMCALPidResponseMaster();
+  void InitializeEMCALResponse();
+
   //
   void SetRecoInfo();
   
-  ClassDef(AliPIDResponse,2);  //PID response handling
+  ClassDef(AliPIDResponse,6);  //PID response handling
 };
 
 inline Float_t AliPIDResponse::NumberOfSigmasTPC(const AliVParticle *vtrack, AliPID::EParticleType type) const {