- public:
-
- AliEMCALPID() ; // ctor
- AliEMCALPID(const TString alirunFileName, const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ;
- AliEMCALPID(const AliEMCALPID & pid):TTask(pid) {;}
- virtual ~AliEMCALPID() ; // dtor
-
- virtual void Exec(Option_t * option) { Warning("Exec", "not defined" ) ; }
- virtual const Int_t GetRecParticlesInRun() const { Warning("GetRecParticlesInRun", "not defined" ) ; return 0 ;}
- virtual void Print(Option_t * option) const { Warning("Print", "not defined" ) ;}
- void SetEventFolderName(TString name) { fEventFolderName = name ; }
- virtual void SetPREtoECADistanceCut(Float_t Cluster_En, TString Eff_Pur,Float_t cut ) { Warning("SetCpvtoEmcDistanceCut", "not defined" ) ;}
- virtual void SetTimeGate(Float_t Cluster_En, TString Eff_Pur, Float_t gate) { Warning("SetTimeGate", "not defined" ) ; }
- virtual const char * Version() const { Warning("Version", "not defined" ) ; return 0 ; }
- virtual void WriteRecParticles(Int_t event) { Warning("WriteRecParticles", "not defined" ) ; }
-
-private:
- virtual void Init() { Warning("Init", "not defined" ) ; }
-
-protected:
- TString fEventFolderName ; // event folder name
-
- ClassDef(AliEMCALPID,3) // Particle Identifier algorithm (base class)
-
-} ;
+public:
+
+ AliEMCALPID();
+ virtual ~AliEMCALPID() { }
+
+ void RunPID(AliESDEvent *esd);
+ void ComputePID(Double_t energy, Double_t lambda0); // give the PID of a cluster
+ TArrayD DistLambda0(Double_t energy, Int_t nature); // compute lambda0 distributions
+
+ Double_t GetPID(Int_t idx) const {if (idx>=0&&idx<3) return fPID[idx]; else return 0.;}
+ Double_t GetPIDFinal(Int_t idx) const {if (idx>=0&&idx<AliPID::kSPECIESN) return fPIDFinal[idx]; else return 0.;}
+ Double_t GetPIDWeight(Int_t idx) const {if (idx>=0&&idx<3) return fPIDWeight[idx]; else return 0.;}
+
+ void SetPID(Double_t val, Int_t idx) {if (idx>=0&&idx<3) fPID[idx] = val;}
+ void SetPIDFinal(Double_t val, Int_t idx) {if (idx>=0&&idx<AliPID::kSPECIESN) fPIDFinal[idx] = val;}
+ void SetPIDWeight(Double_t val, Int_t idx) {if (idx>=0&&idx<3) fPIDWeight[idx] = val;}
+ void SetPrintInfo(Bool_t yesno) {fPrintInfo = yesno;}
+ void SetReconstructor(Bool_t yesno) {fReconstructor = yesno;}
+ private:
+
+ Double_t Polynomial(Double_t x, Double_t *params);
+
+ Bool_t fPrintInfo; // flag to decide if details about PID must be printed
+
+ Double_t fGamma[6][6]; // Parameter to Compute PID
+ Double_t fHadron[6][6]; // Parameter to Compute PID
+ Double_t fPiZero5to10[6][6]; // Parameter to Compute PID
+ Double_t fPiZero10to60[6][6]; // Parameter to Compute PID
+
+ Float_t fPID[3];
+
+ Float_t fPIDFinal[AliPID::kSPECIESN+1]; // final PID format
+ Float_t fPIDWeight[3]; // order: gamma, pi0, hadrons,
+ Double_t fProbGamma; // probility to be a Gamma
+ Double_t fProbPiZero; // probility to be a PiO
+ Double_t fProbHadron; // probility to be a Hadron
+ Bool_t fReconstructor; //Fill esdcalocluster when called from EMCALReconstructor
+
+ ClassDef(AliEMCALPID, 0)
+};