]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALPID.h
possiblity to read ESD friends and TPC outer check (Jacek)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALPID.h
index eb47285280b32cb0c27fee7bfa62fc9ac7272933..b4fcf06563ccb28fdefd34ba568a592057eef46b 100644 (file)
@@ -1,60 +1,73 @@
-#ifndef ALIEMCALPID_H
-#define ALIEMCALPID_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-                            
-/* $Id$ */
-
-//_________________________________________________________________________
-//  Algorithm class for the identification of particles detected in EMCAL        
-//  base  class                             
-//  of identified particles                
-//*-- Author: Yves Schutz (SUBATECH)
-
-// --- ROOT system ---
+#ifndef AliEMCALPID_H
+#define AliEMCALPID_H
 
-#include "TTask.h" 
-#include "AliConfig.h"
-class TFormula ;
-class TClonesArray ;
-
-// --- Standard library ---
+/* $Id$ */
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.13  2007/07/11 13:43:29  hristov
+ * New class AliESDEvent, backward compatibility with the old AliESD (Christian)
+ *
+ * Revision 1.12  2007/02/20 20:17:43  hristov
+ * Corrected array size, removed warnings (icc)
+ *
+ * Revision 1.11  2006/12/19 08:49:35  gustavo
+ * New PID class for EMCAL, bayesian analysis done with ESD data, PID information filled when calling AliEMCALPID in AliEMCALReconstructor::FillESD()
+ *
+ *
+ */
 
-// --- AliRoot header files ---
+///////////////////////////////////////////////////////////////////////////////
+// Class AliEMCALPID
+///////////////////////////////////////////////////////////////////////////////
 
-class AliEMCALGeometry ;
-class AliEMCALClusterizer ;
-class AliEMCALTrackSegmentMaker ;
+#include "TTask.h"
+#include "TArrayD.h"
+#include "AliESDEvent.h"
+#include "AliPID.h" 
 
 class AliEMCALPID : public TTask {
 
- 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 *) = 0;
-  virtual const Int_t GetRecParticlesInRun()  const { Warning("GetRecParticlesInRun", "not defined" ) ; return 0 ;} 
-  virtual void Print() const { Warning("Print", "not defined" ) ;}
-  void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
-  void SetEventFolderName(TString name) { fEventFolderName = name ; }
-  virtual void SetPREtoECADistanceCut(Float_t, TString, Float_t) { 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() = 0;
-
-private: 
-  virtual void Init() { Warning("Init", "not defined" ) ; } 
-
-protected:
-  TString fEventFolderName ;  // event folder name
-  Int_t   fFirstEvent;        // first event to process
-  Int_t   fLastEvent;         // last  event to process
-  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)
+};
 
 #endif // ALIEMCALPID_H
+