]>
Commit | Line | Data |
---|---|---|
26d4b141 | 1 | #ifndef ALIPHOSPIDV1_H |
2 | #define ALIPHOSPIDV1_H | |
6ad0bfa0 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
b2a60966 | 8 | |
9 | //_________________________________________________________________________ | |
10 | // Implementation version v1 of the PHOS particle identifier | |
148b2bba | 11 | // Identification is based on information from CPV and EMC |
2f04ed65 | 12 | // Oh yeah |
148b2bba | 13 | //*-- Author: Yves Schutz (SUBATECH), Gustavo Conesa. |
6ad0bfa0 | 14 | |
15 | // --- ROOT system --- | |
148b2bba | 16 | //class TFormula ; |
7acf6008 | 17 | class TVector3 ; |
148b2bba | 18 | class TMatrixD ; |
19 | class TPrincipal ; | |
6ad0bfa0 | 20 | |
21 | // --- Standard library --- | |
22 | ||
23 | // --- AliRoot header files --- | |
7acf6008 | 24 | class AliPHOSEmcRecPoint ; |
25 | class AliPHOSRecPoint ; | |
6ad0bfa0 | 26 | |
26d4b141 | 27 | #include "AliPHOSPID.h" |
6ad0bfa0 | 28 | |
26d4b141 | 29 | class AliPHOSPIDv1 : public AliPHOSPID { |
50739f15 | 30 | |
31 | public: | |
32 | ||
7acf6008 | 33 | AliPHOSPIDv1() ; // ctor |
fbf811ec | 34 | AliPHOSPIDv1(const char* headerFile, const char * tsBranch = "Default", const Bool_t toSplit=kFALSE) ; |
50739f15 | 35 | |
7acf6008 | 36 | virtual ~AliPHOSPIDv1() ; // dtor |
50739f15 | 37 | |
a496c46c | 38 | virtual void Exec(Option_t * option) ; |
fbf811ec | 39 | // virtual char * GetRecParticlesBranch()const {return (char*) fRecParticlesTitle.Data() ;} |
40 | // virtual char * GetTrackSegmentsBranch()const{return (char*) fTrackSegmentsTitle.Data(); } | |
2b60655b | 41 | virtual const Int_t GetRecParticlesInRun() const {return fRecParticlesInRun ;} |
50739f15 | 42 | |
a496c46c | 43 | virtual void Print(Option_t * option) const {} |
44 | void Print() ; | |
50739f15 | 45 | |
e61ea9b9 | 46 | //Get files that contain the PCA |
50739f15 | 47 | const TString GetPrincipalFile( )const {return fFileName ;} |
48 | const TString GetPrincipalFilePar( )const {return fFileNamePar ;} | |
bc0c084c | 49 | |
50 | //To turn on or off the Pi0 analysis | |
51 | const Bool_t GetPi0Analysis(){return fPi0Analysis;} | |
1f0e7ccd | 52 | void SetPi0Analysis(Bool_t turnonoff){ fPi0Analysis = turnonoff; } |
53 | ||
50739f15 | 54 | // Set and Get all parameters necessary in the PID depending on the |
bc0c084c | 55 | // custer energy and Purity-Efficiency point |
56 | void SetCpvtoEmcDistanceCutParameters(Float_t Cluster_En, Int_t Eff_Pur, TString Axis,Float_t cut) ; | |
57 | void SetTimeGate(Int_t Eff_Pur, Float_t gate) ; | |
f0a4c9e9 | 58 | |
bc0c084c | 59 | const Float_t GetCpvtoEmcDistanceCut(const Float_t e, const TString Axis ) const ; |
60 | const Double_t GetTimeGate(const Int_t Eff_Pur) const; | |
50739f15 | 61 | |
1f0e7ccd | 62 | void SetEllipseParameter (TString Param, Int_t i, Double_t par) ; |
63 | void SetEllipseParameterPi0(TString Param, Int_t i, Double_t par) ; | |
50739f15 | 64 | const Double_t GetParameterToCalculateEllipse(const TString Param, const Int_t i) const ; |
65 | const Double_t GetEllipseParameter(const TString Param, Float_t E) const; | |
1f0e7ccd | 66 | const Double_t GetParameterToCalculatePi0Ellipse(const TString Param, const Int_t i) const ; |
67 | const Double_t GetEllipseParameterPi0(const TString Param, Float_t E) const; | |
e61ea9b9 | 68 | //Get and Set energy calibration parameters |
50739f15 | 69 | |
70 | void SetCalibrationParameter(Int_t Param,Double_t param); | |
71 | const Double_t GetCalibrationParameter(const Int_t i) const; | |
72 | const Double_t GetCalibratedEnergy(const Float_t e) const; //Calibrates energy. | |
73 | ||
fbf811ec | 74 | // virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;} |
75 | // virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;} | |
7b7c1533 | 76 | virtual const char * Version() const { return "pid-v1" ; } |
79bf6a2f | 77 | |
148b2bba | 78 | private: |
50739f15 | 79 | |
c6987a88 | 80 | const TString BranchName() const ; |
79bf6a2f | 81 | virtual void Init() ; |
8d0f3f77 | 82 | virtual void InitParameters() ; |
7acf6008 | 83 | void MakeRecParticles(void ) ; |
e61ea9b9 | 84 | // Relative Distance CPV-EMC |
50739f15 | 85 | const Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; |
bc0c084c | 86 | const Int_t GetCPVBit(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv,const Int_t EffPur, const Float_t e) const; |
1f0e7ccd | 87 | const Int_t GetPrincipalBit (const Double_t* P, const Int_t eff_pur, const Float_t E)const ; //Principal cut |
88 | const Int_t GetPrincipalPi0Bit(const Double_t* P, const Int_t eff_pur, const Float_t E)const ; //Principal cut | |
9688c1dd | 89 | TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ; |
7acf6008 | 90 | void PrintRecParticles(Option_t * option) ; |
e61ea9b9 | 91 | virtual void WriteRecParticles(Int_t event) ; |
92 | void SetParameters() ; //Fills the matrix of parameters | |
50739f15 | 93 | |
e61ea9b9 | 94 | |
09fc14a0 | 95 | |
96 | private: | |
97 | ||
92f521a9 | 98 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
1f0e7ccd | 99 | TString fFileName ; // File that contains the Principal file for analysis |
100 | TString fFileNamePi0 ; // File that contains the Pi0 Principal file for analysis | |
101 | TString fFileNamePar ; // File that contains the parameters for analysis | |
e61ea9b9 | 102 | |
fbf811ec | 103 | // TString fFrom ; // name of Recpoints and TrackSegments |
104 | // TString fHeaderFileName ; // file name with event header | |
105 | // TString fTrackSegmentsTitle; // branch name with track segments | |
106 | // TString fRecPointsTitle ; // branch name with rec points | |
107 | // TString fRecParticlesTitle ; // branch name with rec particles | |
148b2bba | 108 | |
a496c46c | 109 | Int_t fNEvent ; //! current event number |
fbf811ec | 110 | // AliPHOSClusterizer * fClusterizer ; //! clusterizer |
111 | // AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker | |
e61ea9b9 | 112 | |
bc0c084c | 113 | |
114 | Bool_t fPi0Analysis; //! Pi0 analysis on or off | |
50739f15 | 115 | TPrincipal * fPrincipal ; //! TPrincipal from pca file |
1f0e7ccd | 116 | TPrincipal * fPrincipalPi0 ; //! TPrincipal from Pi0 pca file |
a496c46c | 117 | Double_t * fX ; //! Principal data |
118 | Double_t * fP ; //! Principal eigenvalues | |
1f0e7ccd | 119 | Double_t * fPPi0 ; //! Principal Pi0 eigenvalues |
120 | ||
e61ea9b9 | 121 | Int_t fRecParticlesInRun ; //! Total number of recparticles in one run |
50739f15 | 122 | TMatrixD * fParameters; //! Matrix of identification Parameters |
7acf6008 | 123 | |
1f0e7ccd | 124 | ClassDef( AliPHOSPIDv1,7) // Particle identifier implementation version 1 |
6ad0bfa0 | 125 | |
126 | }; | |
127 | ||
26d4b141 | 128 | #endif // AliPHOSPIDV1_H |