]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSv1.h
parameters have been redistributed; Hits2SDigits etc ... introduce
[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 "AliPHOSCPVModule.h"
25 #include "AliPHOSCPVHit.h"
26 #include "AliPHOSCPVDigit.h"
27
28 class AliPHOSv1 : public AliPHOSv0 {
29
30 public:
31
32   AliPHOSv1(void) ;
33   AliPHOSv1(const char *name, const char *title="") ;
34   AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title="") ;
35   AliPHOSv1(const AliPHOSv1 & phos) {
36     // cpy ctor: no implementation yet
37     // requested by the Coding Convention
38     assert(0==1) ; 
39   }
40   virtual ~AliPHOSv1(void) ;
41
42   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) ; 
43   Float_t        Calibrate(Int_t amp){ return (amp - fDigitizeA)/fDigitizeB ; }
44   Int_t          Digitize(Float_t Energy){ return (Int_t ) (fDigitizeA + Energy*fDigitizeB); }
45   //  virtual void   Hit2Digit(Int_t event) ;
46   virtual void   Hits2SDigits() ;
47   virtual void   MakeBranch(Option_t* opt, char *file=0 ) ;
48   void           Reconstruction(AliPHOSReconstructioner * Reconstructioner) ;
49   void           ResetClusters(){} ;
50   virtual void   ResetHits() ; 
51   virtual void   SDigits2Digits() ;  
52   virtual Int_t  IsVersion(void) const {
53     // Gives the version number 
54     return 1 ; 
55   }
56
57   virtual void   ResetReconstruction() ; // Reset reconstructed objects
58   void           SetReconstructioner(AliPHOSReconstructioner& Reconstructioner) {
59     // sets the reconstructionner object to be used
60     fReconstructioner = &Reconstructioner ;
61   }  
62   void           SetDigitThreshold(Float_t th) { fDigitThreshold = th ; } 
63   void           SetPpsdEnergyThreshold(Float_t enth)      { fPpsdEnergyThreshold = enth ; } 
64   void           SetCpvEnergyThreshold(Float_t enth)       { fCpvEnergyThreshold = enth ; } 
65
66   virtual void   SetTreeAddress(); 
67   virtual void   StepManager(void) ;                              
68   virtual TString Version(void){ 
69     // returns the version number 
70     return TString("v1") ; 
71   }
72
73   AliPHOSv1 & operator = (const AliPHOSv1 & rvalue)  {
74     // assignement operator requested by coding convention but not needed
75     assert(0==1) ;
76     return *this ; 
77   }
78
79   // IHEP's CPV specific functions
80
81   //  AliPHOSCPVModule &GetEMCModule(int n) { return *(AliPHOSCPVModule*)fEMCModules->operator[](n); }
82   //  AliPHOSCPVModule &GetCPVModule(int n) { return *(AliPHOSCPVModule*)fCPVModules->operator[](n); }
83
84   void       CPVDigitize (TLorentzVector p, Float_t *xy, Int_t moduleNumber, TClonesArray *digits) ;
85   Float_t    CPVPadResponseFunction(Float_t qhit, Float_t zg, Float_t xg) ;
86   Double_t   CPVCumulPadResponse(Double_t x, Double_t y) ;
87
88 protected:
89
90   Float_t fDigitThreshold ;                       // Threshold for the digit registration 
91   Float_t fPpsdEnergyThreshold;                   //PPSD
92   Float_t fCpvEnergyThreshold;                    //CPV  
93   Float_t fPinElectronicNoise  ;                  // Electronic Noise in the PIN
94   Float_t fDigitizeA ;                            //Parameters of the 
95   Float_t fDigitizeB ;                            //digitization 
96   Int_t   fnSdigits ; 
97   AliPHOSReconstructioner  * fReconstructioner ;  // Clusterization and subtracking procedures
98   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Reconstructioner of the PHOS track segment: 2 x PPSD + 1 x EMC
99   //  TClonesArray             * fEMCModules;         // Array of EMC modules
100   //  TClonesArray             * fCPVModules;         // Array of CPV modules for the IHEP's version of CPV
101
102   ClassDef(AliPHOSv1,1)  // Implementation of PHOS manager class for layout EMC+PPSD
103
104 };
105
106 #endif // AliPHOSV1_H