//_________________________________________________________________________
// Implementation version v1 of the PHOS particle identifier
-// Identification is based on information from PPSD and EMC
+// Identification is based on information from CPV and EMC
// Oh yeah
-//*-- Author: Yves Schutz (SUBATECH)
+//*-- Author: Yves Schutz (SUBATECH), Gustavo Conesa.
// --- ROOT system ---
-class TFormula ;
+//class TFormula ;
class TVector3 ;
+class TMatrixD ;
+class TPrincipal ;
// --- Standard library ---
public:
AliPHOSPIDv1() ; // ctor
- AliPHOSPIDv1(const char* headerFile, const char * tsBranch = 0) ;
+ AliPHOSPIDv1(const char* headerFile, const char * tsBranch = "Default", const char * from = 0) ;
virtual ~AliPHOSPIDv1() ; // dtor
virtual void Exec(Option_t * option);
virtual char * GetRecParticlesBranch()const {return (char*) fRecParticlesTitle.Data() ;}
virtual char * GetTrackSegmentsBranch()const{return (char*) fTrackSegmentsTitle.Data(); }
-
- virtual void Init() ;
- virtual void PlotDispersionCuts()const ;
- virtual void Print(Option_t * option)const ;
- virtual void SetIdentificationMethod(char * option = "CPV DISP" ){fIDOptions = option ;}
- virtual void SetShowerProfileCut(char * formula = "0.35*0.35 - (x-1.386)*(x-1.386) - 1.707*1.707*(y-1.008)*(y-1.008)") ;
- virtual void SetDispersionCut(Float_t cut){fDispersion = cut ; }
- virtual void SetCpvtoEmcDistanceCut(Float_t cut ) {fCpvEmcDistance = cut ;}
+ virtual const Int_t GetRecParticlesInRun() const {return fRecParticlesInRun ;}
+
+ virtual void Print(Option_t * option)const ;
+ // Get CpvtoEmcDistanceCut and TimeGate parameters depending on the custer energy and
+ // Purity-Efficiency point (possible options "HIGH EFFICIENCY" "MEDIUM EFFICIENCY" "LOW
+ // EFFICIENCY" and 3 more options changing EFFICIENCY by PURITY)
+ Double_t GetCpvtoEmcDistanceCut(const Float_t Cluster_En, const TString Eff_Pur)const ;
+ Double_t GetTimeGate(const Float_t Cluster_En, const TString Eff_Pur)const ;
+
+ // Set all parameters necessary in the PID depending on the custer energy and
+ // Purity-Efficiency point (possible options "HIGH EFFICIENCY" "MEDIUM EFFICIENCY" "LOW
+ // EFFICIENCY" and 3 more options changing EFFICIENCY by PURITY)
+ void SetCpvtoEmcDistanceCut(Float_t Cluster_En, TString Eff_Pur, Float_t cut) ;
+ void SetTimeGate(Float_t Cluster_En, TString Eff_Pur, Float_t gate) ;
+ void SetEllipseXCenter(Float_t Cluster_En, TString Eff_Pur, Float_t x) ;
+ void SetEllipseYCenter(Float_t Cluster_En, TString Eff_Pur, Float_t y) ;
+ void SetEllipseAParameter(Float_t Cluster_En, TString Eff_Pur, Float_t a) ;
+ void SetEllipseBParameter(Float_t Cluster_En, TString Eff_Pur, Float_t b) ;
+ void SetEllipseAngle(Float_t Cluster_En, TString Eff_Pur, Float_t angle) ;
+ void SetEllipseParameters(Float_t Cluster_En, TString Eff_Pur, Float_t x, Float_t y,Float_t a, Float_t b,Float_t angle) ;
+
+
virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;}
virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;}
virtual const char * Version() const { return "pid-v1" ; }
-
+
private:
+ virtual void Init() ;
void MakeRecParticles(void ) ;
- Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; // Relative Distance PPSD-EMC
- TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, AliPHOSRecPoint * ppsd)const ;
+ Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; // Relative Distance CPV-EMC
+ Int_t GetPrincipalSign(Double_t* P, Int_t ell, Int_t eff_pur)const ; //Principal cut
+ TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
void PrintRecParticles(Option_t * option) ;
- virtual Bool_t ReadTrackSegments(Int_t event) ;
virtual void WriteRecParticles(Int_t event) ;
private:
+ TString fFrom ; // name of Recpoints and TrackSegments
TString fHeaderFileName ; // file name with event header
TString fTrackSegmentsTitle; // branch name with track segments
TString fRecPointsTitle ; // branch name with rec points
TString fRecParticlesTitle ; // branch name with rec particles
- TString fIDOptions ; // PID option
+
Int_t fNEvent ; // current event number
- TObjArray * fEmcRecPoints ; // ! initial EMC RecPoints
- TObjArray * fCpvRecPoints ; // ! initial CPV RecPoints
- TClonesArray * fTrackSegments; // ! initial list of TrackSegments
- TClonesArray * fRecParticles ; // ! output
- AliPHOSClusterizer * fClusterizer ; // !
- AliPHOSTrackSegmentMaker * fTSMaker ; // !
+ AliPHOSClusterizer * fClusterizer ; //!
+ AliPHOSTrackSegmentMaker * fTSMaker ; //!
+ TPrincipal * fPrincipal ; //
+
+
+
+
+
+ Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
- TFormula * fFormula ; // formula to define cut on the shouer elips axis
- Float_t fDispersion ; // dispersion cut
- Float_t fCpvEmcDistance ; // Max EMC-CPV distance
+ Double_t* fX ; //! Principal data
+ Double_t* fP ; //! Principal eigenvalues
- ClassDef( AliPHOSPIDv1,1) // Particle identifier implementation version 1
+ TMatrixD* fParameters ;//! Matrix of all identification Parameters
+ TString fFileName ; // Name of the file which contains the Principal file
+ TString fFileNamePar ; //Name of the file which contains the parameters
+
+ ClassDef( AliPHOSPIDv1,2) // Particle identifier implementation version 1
};