Particle identification improvment by Gustavo
[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) ;
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 ;}
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)
148b2bba 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) ;
f0a4c9e9 56
50739f15 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;
e61ea9b9 63 //Get and Set energy calibration parameters
50739f15 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
fbf811ec 69 // virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;}
70 // virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;}
7b7c1533 71 virtual const char * Version() const { return "pid-v1" ; }
79bf6a2f 72
148b2bba 73 private:
50739f15 74
c6987a88 75 const TString BranchName() const ;
79bf6a2f 76 virtual void Init() ;
8d0f3f77 77 virtual void InitParameters() ;
7acf6008 78 void MakeRecParticles(void ) ;
e61ea9b9 79 // Relative Distance CPV-EMC
50739f15 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
9688c1dd 82 TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
7acf6008 83 void PrintRecParticles(Option_t * option) ;
e61ea9b9 84 // Gives in wich cluster energy range is the event
50739f15 85 const Int_t GetClusterOption(const Float_t Cluster_En) const;
e61ea9b9 86 // Gives the Efficiency-Purity point.
50739f15 87 const Int_t GetEffPurOption(const TString Eff_Pur)const ;
e61ea9b9 88 virtual void WriteRecParticles(Int_t event) ;
89 void SetParameters() ; //Fills the matrix of parameters
50739f15 90
e61ea9b9 91
09fc14a0 92
93 private:
94
92f521a9 95 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
50739f15 96 TString fFileName ; // File that contains the Principal file for analysis
97 TString fFileNamePar ;// File that contains the parameters for analysis
e61ea9b9 98
fbf811ec 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
148b2bba 104
a496c46c 105 Int_t fNEvent ; //! current event number
fbf811ec 106 // AliPHOSClusterizer * fClusterizer ; //! clusterizer
107 // AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker
e61ea9b9 108
50739f15 109 TPrincipal * fPrincipal ; //! TPrincipal from pca file
a496c46c 110 Double_t * fX ; //! Principal data
111 Double_t * fP ; //! Principal eigenvalues
e61ea9b9 112 Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
50739f15 113 TMatrixD * fParameters; //! Matrix of identification Parameters
7acf6008 114
50739f15 115 ClassDef( AliPHOSPIDv1,6) // Particle identifier implementation version 1
6ad0bfa0 116
117};
118
26d4b141 119#endif // AliPHOSPIDV1_H