]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSv1.h
bag in AliPHOS::StepMamager fixed, AliPHOSCPVModule.* removed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv1.h
1 #ifndef ALIPHOSV1_H
2 #define ALIPHOSV1_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //_________________________________________________________________________
7 // Implementation version v1 of PHOS Manager class 
8 // Layout EMC + PPSD has name GPS2  
9 // Layout EMC + CPV  has name IHEP
10 //*--                  
11 //*-- Author: Yves Schutz (SUBATECH)
12
13 // --- ROOT system ---
14 #include "TClonesArray.h"
15
16 class TFile;
17
18 // --- AliRoot header files ---
19 #include "AliPHOSv0.h"
20 #include "AliPHOSGeometry.h"
21 #include "AliPHOSReconstructioner.h"
22 #include "AliPHOSTrackSegmentMaker.h"
23 #include "AliPHOSPID.h"
24 #include "AliPHOSCPVDigit.h"
25
26 class AliPHOSv1 : public AliPHOSv0 {
27
28 public:
29
30   AliPHOSv1(void) ;
31   AliPHOSv1(const char *name, const char *title="") ;
32   AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title="") ;
33   AliPHOSv1(const AliPHOSv1 & phos) {
34     // cpy ctor: no implementation yet
35     // requested by the Coding Convention
36     assert(0==1) ; 
37   }
38   virtual ~AliPHOSv1(void) ;
39
40   virtual void   AddHit( Int_t shunt, Int_t primary, Int_t track, Int_t id, Float_t *hits, Int_t pid, TLorentzVector p, Float_t *pos) ; 
41   Float_t        Calibrate(Int_t amp){ return (amp - fDigitizeA)/fDigitizeB ; }
42   Int_t          Digitize(Float_t Energy){ return (Int_t ) (fDigitizeA + Energy*fDigitizeB); }
43   virtual void   Hits2SDigits() ;
44   virtual void   MakeBranch(Option_t* opt, char *file=0 ) ;
45   void           Reconstruction(AliPHOSReconstructioner * Reconstructioner) ;
46   void           ResetClusters(){} ;
47   virtual void   SDigits2Digits() ;  
48   virtual Int_t  IsVersion(void) const {
49     // Gives the version number 
50     return 1 ; 
51   }
52
53   virtual void   ResetReconstruction() ; // Reset reconstructed objects
54   void           SetReconstructioner(AliPHOSReconstructioner& Reconstructioner) {
55     // sets the reconstructionner object to be used
56     fReconstructioner = &Reconstructioner ;
57   }  
58   void           SetDigitThreshold(Float_t th) { fDigitThreshold = th ; } 
59   void           SetPpsdEnergyThreshold(Float_t enth)      { fPpsdEnergyThreshold = enth ; } 
60   void           SetCpvEnergyThreshold(Float_t enth)       { fCpvEnergyThreshold = enth ; } 
61
62   virtual void   StepManager(void) ;                              
63   virtual TString Version(void){ 
64     // returns the version number 
65     return TString("v1") ; 
66   }
67
68   AliPHOSv1 & operator = (const AliPHOSv1 & rvalue)  {
69     // assignement operator requested by coding convention but not needed
70     assert(0==1) ;
71     return *this ; 
72   }
73
74   void       CPVDigitize (TLorentzVector p, Float_t *xy, Int_t moduleNumber, TClonesArray *digits) ;
75   Float_t    CPVPadResponseFunction(Float_t qhit, Float_t zg, Float_t xg) ;
76   Double_t   CPVCumulPadResponse(Double_t x, Double_t y) ;
77
78 protected:
79
80   Float_t fDigitThreshold ;                       // Threshold for the digit registration 
81   Float_t fPpsdEnergyThreshold;                   //PPSD
82   Float_t fCpvEnergyThreshold;                    //CPV  
83   Float_t fPinElectronicNoise  ;                  // Electronic Noise in the PIN
84   Float_t fDigitizeA ;                            //Parameters of the 
85   Float_t fDigitizeB ;                            //digitization 
86   Int_t   fnSdigits ; 
87   AliPHOSReconstructioner  * fReconstructioner ;  // Clusterization and subtracking procedures
88   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Reconstructioner of the PHOS track segment: 2 x PPSD + 1 x EMC
89
90   ClassDef(AliPHOSv1,1)  // Implementation of PHOS manager class for layout EMC+PPSD
91
92 };
93
94 #endif // AliPHOSV1_H