]>
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 { |
6ad0bfa0 | 30 | |
31 | public: | |
32 | ||
7acf6008 | 33 | AliPHOSPIDv1() ; // ctor |
148b2bba | 34 | AliPHOSPIDv1(const char* headerFile, const char * tsBranch = "Default", const char * from = 0) ; |
e0ed2e49 | 35 | |
7acf6008 | 36 | virtual ~AliPHOSPIDv1() ; // dtor |
37 | ||
a496c46c | 38 | virtual void Exec(Option_t * option) ; |
7b7c1533 | 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 ;} |
148b2bba | 42 | |
a496c46c | 43 | virtual void Print(Option_t * option) const {} |
44 | void Print() ; | |
148b2bba | 45 | // Get CpvtoEmcDistanceCut and TimeGate parameters depending on the custer energy and |
46 | // Purity-Efficiency point (possible options "HIGH EFFICIENCY" "MEDIUM EFFICIENCY" "LOW | |
47 | // EFFICIENCY" and 3 more options changing EFFICIENCY by PURITY) | |
e61ea9b9 | 48 | Double_t GetCpvtoEmcDistanceCut(const Float_t Cluster_En, const TString Eff_Pur) ; |
49 | Double_t GetTimeGate(const Float_t Cluster_En, const TString Eff_Pur) ; | |
50 | ||
51 | //Get files that contain the PCA | |
52 | const TString GetPrincipalFile5( )const {return fFileName5 ;} | |
53 | const TString GetPrincipalFilePar5( )const {return fFileNamePar5 ;} | |
54 | const TString GetPrincipalFile100( )const {return fFileName100 ;} | |
55 | const TString GetPrincipalFilePar100( )const {return fFileNamePar100 ;} | |
148b2bba | 56 | |
57 | // Set all parameters necessary in the PID depending on the custer energy and | |
58 | // Purity-Efficiency point (possible options "HIGH EFFICIENCY" "MEDIUM EFFICIENCY" "LOW | |
59 | // EFFICIENCY" and 3 more options changing EFFICIENCY by PURITY) | |
60 | void SetCpvtoEmcDistanceCut(Float_t Cluster_En, TString Eff_Pur, Float_t cut) ; | |
61 | void SetTimeGate(Float_t Cluster_En, TString Eff_Pur, Float_t gate) ; | |
62 | void SetEllipseXCenter(Float_t Cluster_En, TString Eff_Pur, Float_t x) ; | |
63 | void SetEllipseYCenter(Float_t Cluster_En, TString Eff_Pur, Float_t y) ; | |
64 | void SetEllipseAParameter(Float_t Cluster_En, TString Eff_Pur, Float_t a) ; | |
65 | void SetEllipseBParameter(Float_t Cluster_En, TString Eff_Pur, Float_t b) ; | |
66 | void SetEllipseAngle(Float_t Cluster_En, TString Eff_Pur, Float_t angle) ; | |
67 | void SetEllipseParameters(Float_t Cluster_En, TString Eff_Pur, Float_t x, Float_t y,Float_t a, Float_t b,Float_t angle) ; | |
f0a4c9e9 | 68 | |
e61ea9b9 | 69 | //Get and Set energy calibration parameters |
70 | Float_t GetACalParameter() {return fACalParameter ;} | |
71 | Float_t GetBCalParameter() {return fBCalParameter ;} | |
72 | Float_t GetCCalParameter() {return fCCalParameter ;} | |
73 | void SetACalParameter(Float_t a) { fACalParameter = a ;} | |
74 | void SetBCalParameter(Float_t b) { fBCalParameter = b ;} | |
75 | void SetCCalParameter(Float_t c) { fCCalParameter = c ;} | |
76 | ||
7b7c1533 | 77 | virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;} |
78 | virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;} | |
79 | virtual const char * Version() const { return "pid-v1" ; } | |
79bf6a2f | 80 | |
148b2bba | 81 | private: |
82 | ||
c6987a88 | 83 | const TString BranchName() const ; |
79bf6a2f | 84 | virtual void Init() ; |
8d0f3f77 | 85 | virtual void InitParameters() ; |
7acf6008 | 86 | void MakeRecParticles(void ) ; |
e61ea9b9 | 87 | // Relative Distance CPV-EMC |
88 | Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; | |
148b2bba | 89 | Int_t GetPrincipalSign(Double_t* P, Int_t ell, Int_t eff_pur)const ; //Principal cut |
9688c1dd | 90 | TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ; |
7acf6008 | 91 | void PrintRecParticles(Option_t * option) ; |
e61ea9b9 | 92 | // Gives in wich cluster energy range is the event |
93 | void GetClusterOption(const Float_t Cluster_En,const Bool_t range) ; | |
94 | // Gives the Efficiency-Purity point. | |
95 | Int_t GetEffPurOption(const TString Eff_Pur)const ; | |
96 | virtual void WriteRecParticles(Int_t event) ; | |
97 | void SetParameters() ; //Fills the matrix of parameters | |
98 | //Selects principal and parameters file in function of energy range. | |
99 | void GetAnalysisParameters(Float_t ClusterEn) ; | |
100 | Double_t CalibratedEnergy(Float_t e) ; //Calibrates energy. | |
101 | ||
09fc14a0 | 102 | |
103 | private: | |
104 | ||
92f521a9 | 105 | Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) |
e61ea9b9 | 106 | TString fFileName5 ; // File that contains the Principal file for analysis from 0.5 to 5 GeV |
107 | TString fFileName100 ; // File that contains the Principal file for analysis from 0.5 to 100 GeV | |
108 | TString fFileNamePar5 ; // File that contains the parameters for analysis from 0.5 to 5 GeV | |
109 | TString fFileNamePar100 ;// File that contains the parameters for analysis from 0.5 to 100 GeV | |
110 | ||
111 | ||
112 | TString fFrom ; // name of Recpoints and TrackSegments | |
113 | TString fHeaderFileName ; // file name with event header | |
114 | TString fTrackSegmentsTitle; // branch name with track segments | |
115 | TString fRecPointsTitle ; // branch name with rec points | |
116 | TString fRecParticlesTitle ; // branch name with rec particles | |
148b2bba | 117 | |
a496c46c | 118 | Int_t fNEvent ; //! current event number |
119 | AliPHOSClusterizer * fClusterizer ; //! clusterizer | |
120 | AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker | |
e61ea9b9 | 121 | |
122 | TPrincipal * fPrincipal5 ; //! TPrincipal from fFileName5 | |
123 | TPrincipal * fPrincipal100 ; //! TPrincipal from fFileName100 | |
124 | TPrincipal * fPrincipal ; //! TPrincipal copy | |
a496c46c | 125 | Double_t * fX ; //! Principal data |
126 | Double_t * fP ; //! Principal eigenvalues | |
e61ea9b9 | 127 | |
128 | Int_t fRecParticlesInRun ; //! Total number of recparticles in one run | |
129 | ||
130 | TMatrixD * fParameters5 ; //! Matrix of identification Parameters 0.5 to 5 GeV | |
131 | TMatrixD * fParameters100 ; //! Matrix of identification Parameters 5-100 GeV | |
132 | TMatrixD * fParameters; //! Matrix copy of identification Parameters | |
133 | ||
134 | Int_t fCluster; // Cluster energy range to choose parameters | |
135 | Int_t fClusterrcpv; // Cluster energy range to choos rcpv parameters | |
136 | Int_t fMatrixExtraRow; // Different size of the parameters file. Depends on range | |
137 | ||
138 | Float_t fACalParameter ;// A parameter energy calibration Encal=A+B*En+C*En^2 | |
139 | Float_t fBCalParameter ;// B parameter energy calibration Encal=A+B*En+C*En^2 | |
140 | Float_t fCCalParameter ;// B parameter energy calibration Encal=A+B*En+C*En^2 | |
7acf6008 | 141 | |
e61ea9b9 | 142 | ClassDef( AliPHOSPIDv1,4) // Particle identifier implementation version 1 |
6ad0bfa0 | 143 | |
144 | }; | |
145 | ||
26d4b141 | 146 | #endif // AliPHOSPIDV1_H |