]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSPIDv2.h
Energy correction for default absorber configuration.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPIDv2.h
1 #ifndef ALIPHOSPIDV2_H
2 #define ALIPHOSPIDV2_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 v2 of the PHOS particle identifier 
11 // Identification is based on information from PPSD and EMC
12 // Oh yeah                 
13 //*-- Author: Yves Schutz (SUBATECH)
14
15 // --- ROOT system ---
16 //class TFormula ;
17 class TVector3 ;
18 class TEllipse ;
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  AliPHOSPIDv2 : public AliPHOSPID {
30
31 public:
32
33   AliPHOSPIDv2() ;          // ctor            
34   AliPHOSPIDv2(const char* headerFile, const char * tsBranch = "Default", const char * from = 0) ;
35   virtual ~AliPHOSPIDv2() ; // dtor
36
37   virtual void Exec(Option_t * option);
38   virtual char * GetRecParticlesBranch()const {return (char*) fRecParticlesTitle.Data() ;}      
39   virtual char * GetTrackSegmentsBranch()const{return (char*) fTrackSegmentsTitle.Data(); }
40   virtual const Int_t GetRecParticlesInRun() const  {return fRecParticlesInRun ;}  
41  
42   virtual void Print(Option_t * option)const ; 
43   Float_t GetCpvtoEmcDistanceCut() const {return fCpvEmcDistance ;}
44   Float_t GetTimeGate()            const {return fTimeGate ;}
45   virtual void SetCpvtoEmcDistanceCut(Float_t cut )      {fCpvEmcDistance = cut ;} 
46   virtual void SetTimeGate(Float_t gate)                 {fTimeGate = gate ;}
47
48   void SetEllipseXCenter(Float_t x)              {fX_center = x ;}
49   void SetEllipseYCenter(Float_t y)              {fY_center = y ;}
50   void SetEllipseAParameter(Float_t a)           {fA = a  ;} 
51   void SetEllipseBParameter(Float_t b)           {fB = b ;}
52   void SetEllipseAngle(Float_t angle)            {fAngle = angle ;}
53   void SetEllipseParameters(Float_t x, Float_t y, Float_t a, Float_t b, Float_t angle);
54  
55   virtual void SetTrackSegmentsBranch(const char* title) { fTrackSegmentsTitle = title;}
56   virtual void SetRecParticlesBranch (const char* title) { fRecParticlesTitle = title;} 
57   virtual const char * Version() const { return "pid-v2" ; }  
58                      
59  private:
60
61   virtual void Init() ;
62   void     MakeRecParticles(void ) ;
63   Float_t  GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; // Relative Distance CPV-EMC
64   Int_t    GetPrincipalSign(Double_t* P )const ; //Principal cut
65   TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
66   void     PrintRecParticles(Option_t * option) ;
67   virtual void WriteRecParticles(Int_t event) ; 
68
69  private:
70
71   TString                fFrom ;              // name of Recpoints and TrackSegments 
72   TString                fHeaderFileName ;    // file name with event header
73   TString                fTrackSegmentsTitle; // branch name with track segments
74   TString                fRecPointsTitle ;    // branch name with rec points
75   TString                fRecParticlesTitle ; // branch name with rec particles
76  
77   Int_t                  fNEvent ;            // current event number
78
79   AliPHOSClusterizer   * fClusterizer ;       //!
80   AliPHOSTrackSegmentMaker * fTSMaker ;       //!
81   TPrincipal           * fPrincipal ;         //!
82   
83   Float_t                fCpvEmcDistance ;    // Max EMC-CPV distance
84   Float_t                fTimeGate ;          // Time of the latest EmcRecPoint accepted as EM
85   Int_t                  fRecParticlesInRun ; //! Total number of recparticles in one run
86
87   Double_t*              fX ; //! Principal data 
88   Double_t*              fP ; //! Principal eigenvalues
89
90   Double_t               fX_center  ; 
91   Double_t               fY_center ; 
92   Double_t               fA  ; 
93   Double_t               fB  ; 
94   Double_t               fAngle ; 
95
96   TString                fFileName;
97   
98   ClassDef( AliPHOSPIDv2,1)  // Particle identifier implementation version 1
99
100 };
101
102 #endif // AliPHOSPIDV2_H