]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSPIDv1.h
in dtor check the existence of fFile before to close it (the case occurs when merger...
[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 {
6ad0bfa0 30
31public:
32
7acf6008 33 AliPHOSPIDv1() ; // ctor
148b2bba 34 AliPHOSPIDv1(const char* headerFile, const char * tsBranch = "Default", const char * from = 0) ;
7acf6008 35 virtual ~AliPHOSPIDv1() ; // dtor
36
a496c46c 37 virtual void Exec(Option_t * option) ;
7b7c1533 38 virtual char * GetRecParticlesBranch()const {return (char*) fRecParticlesTitle.Data() ;}
39 virtual char * GetTrackSegmentsBranch()const{return (char*) fTrackSegmentsTitle.Data(); }
2b60655b 40 virtual const Int_t GetRecParticlesInRun() const {return fRecParticlesInRun ;}
148b2bba 41
a496c46c 42 virtual void Print(Option_t * option) const {}
43 void Print() ;
148b2bba 44 // Get CpvtoEmcDistanceCut and TimeGate parameters depending on the custer energy and
45 // Purity-Efficiency point (possible options "HIGH EFFICIENCY" "MEDIUM EFFICIENCY" "LOW
46 // EFFICIENCY" and 3 more options changing EFFICIENCY by PURITY)
47 Double_t GetCpvtoEmcDistanceCut(const Float_t Cluster_En, const TString Eff_Pur)const ;
48 Double_t GetTimeGate(const Float_t Cluster_En, const TString Eff_Pur)const ;
49
50 // Set all parameters necessary in the PID depending on the custer energy and
51 // Purity-Efficiency point (possible options "HIGH EFFICIENCY" "MEDIUM EFFICIENCY" "LOW
52 // EFFICIENCY" and 3 more options changing EFFICIENCY by PURITY)
53 void SetCpvtoEmcDistanceCut(Float_t Cluster_En, TString Eff_Pur, Float_t cut) ;
54 void SetTimeGate(Float_t Cluster_En, TString Eff_Pur, Float_t gate) ;
55 void SetEllipseXCenter(Float_t Cluster_En, TString Eff_Pur, Float_t x) ;
56 void SetEllipseYCenter(Float_t Cluster_En, TString Eff_Pur, Float_t y) ;
57 void SetEllipseAParameter(Float_t Cluster_En, TString Eff_Pur, Float_t a) ;
58 void SetEllipseBParameter(Float_t Cluster_En, TString Eff_Pur, Float_t b) ;
59 void SetEllipseAngle(Float_t Cluster_En, TString Eff_Pur, Float_t angle) ;
60 void SetEllipseParameters(Float_t Cluster_En, TString Eff_Pur, Float_t x, Float_t y,Float_t a, Float_t b,Float_t angle) ;
61
62
7b7c1533 63 virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;}
64 virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;}
65 virtual const char * Version() const { return "pid-v1" ; }
79bf6a2f 66
148b2bba 67 private:
68
a496c46c 69 const TString AliPHOSPIDv1::BranchName() const ;
79bf6a2f 70 virtual void Init() ;
7acf6008 71 void MakeRecParticles(void ) ;
9688c1dd 72 Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; // Relative Distance CPV-EMC
148b2bba 73 Int_t GetPrincipalSign(Double_t* P, Int_t ell, Int_t eff_pur)const ; //Principal cut
9688c1dd 74 TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
7acf6008 75 void PrintRecParticles(Option_t * option) ;
a496c46c 76 void SetParameters() ;
7b7c1533 77 virtual void WriteRecParticles(Int_t event) ;
09fc14a0 78
79 private:
80
a496c46c 81 TString fFileName ; // Name of the file which contains the Principal file
82 TString fFileNamePar ; // Name of the file which contains the parameters
148b2bba 83 TString fFrom ; // name of Recpoints and TrackSegments
baef0810 84 TString fHeaderFileName ; // file name with event header
7b7c1533 85 TString fTrackSegmentsTitle; // branch name with track segments
baef0810 86 TString fRecPointsTitle ; // branch name with rec points
7b7c1533 87 TString fRecParticlesTitle ; // branch name with rec particles
148b2bba 88
a496c46c 89 Int_t fNEvent ; //! current event number
90 AliPHOSClusterizer * fClusterizer ; //! clusterizer
91 AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker
92 TPrincipal * fPrincipal ; //! TPrincipal from fFileName
93 Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
94 Double_t * fX ; //! Principal data
95 Double_t * fP ; //! Principal eigenvalues
96 TMatrixD * fParameters ; //! Matrix of all identification Parameters
7acf6008 97
148b2bba 98 ClassDef( AliPHOSPIDv1,2) // Particle identifier implementation version 1
6ad0bfa0 99
100};
101
26d4b141 102#endif // AliPHOSPIDV1_H