Underscore removed from structure function name.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPIDv1.h
CommitLineData
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 17class TVector3 ;
148b2bba 18class TMatrixD ;
19class TPrincipal ;
6ad0bfa0 20
21// --- Standard library ---
22
23// --- AliRoot header files ---
7acf6008 24class AliPHOSEmcRecPoint ;
25class AliPHOSRecPoint ;
6ad0bfa0 26
26d4b141 27#include "AliPHOSPID.h"
6ad0bfa0 28
26d4b141 29class 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) ;
581354c5 35 AliPHOSPIDv1(AliPHOSPIDv1 & pid) ; // cpy ctor
36
7acf6008 37 virtual ~AliPHOSPIDv1() ; // dtor
50739f15 38
a496c46c 39 virtual void Exec(Option_t * option) ;
fbf811ec 40 // virtual char * GetRecParticlesBranch()const {return (char*) fRecParticlesTitle.Data() ;}
41 // virtual char * GetTrackSegmentsBranch()const{return (char*) fTrackSegmentsTitle.Data(); }
2b60655b 42 virtual const Int_t GetRecParticlesInRun() const {return fRecParticlesInRun ;}
50739f15 43
a496c46c 44 virtual void Print(Option_t * option) const {}
45 void Print() ;
50739f15 46
e61ea9b9 47 //Get files that contain the PCA
50739f15 48 const TString GetPrincipalFile( )const {return fFileName ;}
49 const TString GetPrincipalFilePar( )const {return fFileNamePar ;}
bc0c084c 50
51 //To turn on or off the Pi0 analysis
581354c5 52 const Bool_t GetPi0Analysis()const {return fPi0Analysis;}
1f0e7ccd 53 void SetPi0Analysis(Bool_t turnonoff){ fPi0Analysis = turnonoff; }
54
50739f15 55 // Set and Get all parameters necessary in the PID depending on the
bc0c084c 56 // custer energy and Purity-Efficiency point
581354c5 57 void SetCpvtoEmcDistanceCutParameters(Float_t clusterEn, Int_t effpur, TString Axis,Float_t cut) ;
58 void SetTimeGate(Int_t effpur, Float_t gate) ;
f0a4c9e9 59
bc0c084c 60 const Float_t GetCpvtoEmcDistanceCut(const Float_t e, const TString Axis ) const ;
581354c5 61 const Double_t GetTimeGate(const Int_t effpur) const;
50739f15 62
1f0e7ccd 63 void SetEllipseParameter (TString Param, Int_t i, Double_t par) ;
64 void SetEllipseParameterPi0(TString Param, Int_t i, Double_t par) ;
50739f15 65 const Double_t GetParameterToCalculateEllipse(const TString Param, const Int_t i) const ;
66 const Double_t GetEllipseParameter(const TString Param, Float_t E) const;
1f0e7ccd 67 const Double_t GetParameterToCalculatePi0Ellipse(const TString Param, const Int_t i) const ;
68 const Double_t GetEllipseParameterPi0(const TString Param, Float_t E) const;
e61ea9b9 69 //Get and Set energy calibration parameters
50739f15 70
581354c5 71 void SetCalibrationParameter(Int_t Param,Double_t param) const ;
50739f15 72 const Double_t GetCalibrationParameter(const Int_t i) const;
73 const Double_t GetCalibratedEnergy(const Float_t e) const; //Calibrates energy.
74
fbf811ec 75 // virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;}
76 // virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;}
7b7c1533 77 virtual const char * Version() const { return "pid-v1" ; }
79bf6a2f 78
581354c5 79 AliPHOSPIDv1 & operator = (const AliPHOSPIDv1 & pid) { return *this ;}
148b2bba 80 private:
50739f15 81
c6987a88 82 const TString BranchName() const ;
79bf6a2f 83 virtual void Init() ;
8d0f3f77 84 virtual void InitParameters() ;
7acf6008 85 void MakeRecParticles(void ) ;
e61ea9b9 86 // Relative Distance CPV-EMC
50739f15 87 const Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ;
bc0c084c 88 const Int_t GetCPVBit(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv,const Int_t EffPur, const Float_t e) const;
386aef34 89 const Int_t GetPrincipalBit (const Double_t* P, const Int_t effPur, const Float_t E)const ; //Principal cut
90 const Int_t GetPrincipalPi0Bit(const Double_t* P, const Int_t effPur, const Float_t E)const ; //Principal cut
9688c1dd 91 TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
7acf6008 92 void PrintRecParticles(Option_t * option) ;
e61ea9b9 93 virtual void WriteRecParticles(Int_t event) ;
94 void SetParameters() ; //Fills the matrix of parameters
50739f15 95
e61ea9b9 96
09fc14a0 97
98 private:
99
92f521a9 100 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
1f0e7ccd 101 TString fFileName ; // File that contains the Principal file for analysis
102 TString fFileNamePi0 ; // File that contains the Pi0 Principal file for analysis
103 TString fFileNamePar ; // File that contains the parameters for analysis
e61ea9b9 104
fbf811ec 105 // TString fFrom ; // name of Recpoints and TrackSegments
106 // TString fHeaderFileName ; // file name with event header
107 // TString fTrackSegmentsTitle; // branch name with track segments
108 // TString fRecPointsTitle ; // branch name with rec points
109 // TString fRecParticlesTitle ; // branch name with rec particles
148b2bba 110
a496c46c 111 Int_t fNEvent ; //! current event number
fbf811ec 112 // AliPHOSClusterizer * fClusterizer ; //! clusterizer
113 // AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker
e61ea9b9 114
bc0c084c 115
116 Bool_t fPi0Analysis; //! Pi0 analysis on or off
50739f15 117 TPrincipal * fPrincipal ; //! TPrincipal from pca file
1f0e7ccd 118 TPrincipal * fPrincipalPi0 ; //! TPrincipal from Pi0 pca file
a496c46c 119 Double_t * fX ; //! Principal data
120 Double_t * fP ; //! Principal eigenvalues
1f0e7ccd 121 Double_t * fPPi0 ; //! Principal Pi0 eigenvalues
122
e61ea9b9 123 Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
50739f15 124 TMatrixD * fParameters; //! Matrix of identification Parameters
7acf6008 125
1f0e7ccd 126 ClassDef( AliPHOSPIDv1,7) // Particle identifier implementation version 1
6ad0bfa0 127
128};
129
26d4b141 130#endif // AliPHOSPIDV1_H