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