#include "AliPHOSPID.h"
class AliPHOSPIDv1 : public AliPHOSPID {
-
-public:
-
+
+ public:
+
AliPHOSPIDv1() ; // ctor
- AliPHOSPIDv1(const char* headerFile, const char * tsBranch = "Default", const char * from = 0) ;
+ AliPHOSPIDv1(const char* headerFile, const char * tsBranch = "Default", const Bool_t toSplit=kFALSE) ;
+
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 Exec(Option_t * option) ;
+ // virtual char * GetRecParticlesBranch()const {return (char*) fRecParticlesTitle.Data() ;}
+ // virtual char * GetTrackSegmentsBranch()const{return (char*) fTrackSegmentsTitle.Data(); }
virtual const Int_t GetRecParticlesInRun() const {return fRecParticlesInRun ;}
+
+ virtual void Print(Option_t * option) const {}
+ void Print() ;
+
+ //Get files that contain the PCA
+ const TString GetPrincipalFile( )const {return fFileName ;}
+ const TString GetPrincipalFilePar( )const {return fFileNamePar ;}
+
+ //To turn on or off the Pi0 analysis
+ const Bool_t GetPi0Analysis(){return fPi0Analysis;}
+ void SetPi0Analysis(Bool_t turnonoff){ fPi0Analysis = turnonoff; }
+ // Set and Get all parameters necessary in the PID depending on the
+ // custer energy and Purity-Efficiency point
+ void SetCpvtoEmcDistanceCutParameters(Float_t Cluster_En, Int_t Eff_Pur, TString Axis,Float_t cut) ;
+ void SetTimeGate(Int_t Eff_Pur, Float_t gate) ;
- 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) ;
+ const Float_t GetCpvtoEmcDistanceCut(const Float_t e, const TString Axis ) const ;
+ const Double_t GetTimeGate(const Int_t Eff_Pur) const;
+
+ void SetEllipseParameter(TString Param, Int_t i, Double_t par) ;
+ const Double_t GetParameterToCalculateEllipse(const TString Param, const Int_t i) const ;
+ const Double_t GetEllipseParameter(const TString Param, Float_t E) const;
+ //Get and Set energy calibration parameters
+ void SetCalibrationParameter(Int_t Param,Double_t param);
+ const Double_t GetCalibrationParameter(const Int_t i) const;
+ const Double_t GetCalibratedEnergy(const Float_t e) const; //Calibrates energy.
- virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;}
- virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;}
+ // 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:
-
+
+ const TString BranchName() const ;
virtual void Init() ;
+ virtual void InitParameters() ;
void MakeRecParticles(void ) ;
- 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
+ // Relative Distance CPV-EMC
+ const Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ;
+ const Int_t GetCPVBit(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv,const Int_t EffPur, const Float_t e) const;
+ const Int_t GetPrincipalBit(const Double_t* P, const Int_t eff_pur, const Float_t E)const ; //Principal cut
TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
void PrintRecParticles(Option_t * option) ;
- virtual void WriteRecParticles(Int_t event) ;
+ virtual void WriteRecParticles(Int_t event) ;
+ void SetParameters() ; //Fills the matrix of parameters
+
+
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
-
- Int_t fNEvent ; // current event number
-
- AliPHOSClusterizer * fClusterizer ; //!
- AliPHOSTrackSegmentMaker * fTSMaker ; //!
- TPrincipal * fPrincipal ; //
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
+ TString fFileName ; // File that contains the Principal file for analysis
+ TString fFileNamePar ;// File that contains the parameters for analysis
+ // 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
+
+ Int_t fNEvent ; //! current event number
+ // AliPHOSClusterizer * fClusterizer ; //! clusterizer
+ // AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker
+ Bool_t fPi0Analysis; //! Pi0 analysis on or off
+ TPrincipal * fPrincipal ; //! TPrincipal from pca file
+ Double_t * fX ; //! Principal data
+ Double_t * fP ; //! Principal eigenvalues
+ Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
+ TMatrixD * fParameters; //! Matrix of identification Parameters
-
- Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
-
- Double_t* fX ; //! Principal data
- Double_t* fP ; //! Principal eigenvalues
-
- 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
+ ClassDef( AliPHOSPIDv1,6) // Particle identifier implementation version 1
};