]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSv1.h
c51912854968408ad5460bad3df1ad2cddf12923
[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) ; 
43   Int_t          Digitize(Float_t Energy);
44   virtual void   Hit2Digit(Int_t event) ;
45   virtual Int_t  IsVersion(void) const {
46     // Gives the version number 
47     return 1 ; 
48   }
49   virtual void   MakeBranch(Option_t* opt, char *file=0 ) ;
50   void           Reconstruction(AliPHOSReconstructioner * Reconstructioner) ;
51   void           ResetClusters(){} ;
52   virtual void   ResetHits() ; 
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   virtual void   SetTreeAddress(); 
60   virtual void   StepManager(void) ;                              
61   virtual TString Version(void){ 
62     // returns the version number 
63     return TString("v1") ; 
64   }
65
66   AliPHOSv1 & operator = (const AliPHOSv1 & rvalue)  {
67     // assignement operator requested by coding convention but not needed
68     assert(0==1) ;
69     return *this ; 
70   }
71
72   // IHEP's CPV specific functions
73
74   AliPHOSCPVModule &GetEMCModule(int n) { return *(AliPHOSCPVModule*)fEMCModules->operator[](n); }
75   AliPHOSCPVModule &GetCPVModule(int n) { return *(AliPHOSCPVModule*)fCPVModules->operator[](n); }
76
77   void       CPVDigitize (TLorentzVector p, Float_t *xy, Int_t moduleNumber, TClonesArray *digits) ;
78   Float_t    CPVPadResponseFunction(Float_t qhit, Float_t zg, Float_t xg) ;
79   Double_t   CPVCumulPadResponse(Double_t x, Double_t y) ;
80
81 protected:
82
83   Float_t fDigitThreshold ;                       // Threshold for the digit registration 
84   Float_t fPinElectronicNoise  ;                  // Electronic Noise in the PIN
85   AliPHOSReconstructioner  * fReconstructioner ;  // Reconstrutioner of the PHOS event: Clusterization and subtracking procedures
86   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Reconstructioner of the PHOS track segment: 2 x PPSD + 1 x EMC
87   TClonesArray             * fEMCModules;         // Array of EMC modules
88   TClonesArray             * fCPVModules;         // Array of CPV modules for the IHEP's version of CPV
89
90   ClassDef(AliPHOSv1,1)  // Implementation of PHOS manager class for layout EMC+PPSD
91
92 };
93
94 #endif // AliPHOSV1_H