]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSv1.h
Break segmentation cured
[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 // --- AliRoot header files ---
17 #include "AliPHOSv0.h"
18 #include "AliPHOSGeometry.h"
19 #include "AliPHOSReconstructioner.h"
20 #include "AliPHOSTrackSegmentMaker.h"
21 #include "AliPHOSPID.h"
22 #include "AliPHOSCPVModule.h"
23 #include "AliPHOSCPVHit.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) ; 
41   Int_t          Digitize(Float_t Energy);
42   virtual void   Hit2Digit(Int_t event) ;
43   virtual Int_t  IsVersion(void) const {
44     // Gives the version number 
45     return 1 ; 
46   }
47   virtual void   MakeBranch(Option_t* opt) ;
48   void           Reconstruction(AliPHOSReconstructioner * Reconstructioner) ;
49   void           ResetClusters(){} ;
50   virtual void   ResetHits() ; 
51   virtual void   ResetReconstruction() ; // Reset reconstructed objects
52   void           SetReconstructioner(AliPHOSReconstructioner& Reconstructioner) {
53     // sets the reconstructionner object to be used
54     fReconstructioner = &Reconstructioner ;
55   }  
56   void           SetDigitThreshold(Float_t th) { fDigitThreshold = th ; } 
57   virtual void   SetTreeAddress(); 
58   virtual void   StepManager(void) ;                              
59   virtual TString Version(void){ 
60     // returns the version number 
61     return TString("v1") ; 
62   }
63
64   AliPHOSv1 & operator = (const AliPHOSv1 & rvalue)  {
65     // assignement operator requested by coding convention but not needed
66     assert(0==1) ;
67     return *this ; 
68   }
69
70   AliPHOSCPVModule &GetEMCModule(int n) { return *(AliPHOSCPVModule*)fEMCModules->operator[](n); }
71   AliPHOSCPVModule &GetCPVModule(int n) { return *(AliPHOSCPVModule*)fCPVModules->operator[](n); }
72
73   void       CPVDigitize (TLorentzVector p, Float_t *xy, Int_t moduleNumber, TClonesArray *digits) ;
74   Float_t    CPVPadResponseFunction(Float_t qhit, Float_t zg, Float_t xg) ;
75   Double_t   CPVCumulPadResponse(Double_t x, Double_t y) ;
76
77 protected:
78
79   Float_t fDigitThreshold ;                       // Threshold for the digit registration 
80   Float_t fPinElectronicNoise  ;                  // Electronic Noise in the PIN
81   AliPHOSReconstructioner  * fReconstructioner ;  // Reconstrutioner of the PHOS event: Clusterization and subtracking procedures
82   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Reconstructioner of the PHOS track segment: 2 x PPSD + 1 x EMC
83   TClonesArray             * fEMCModules;         // Array of EMC modules
84   TClonesArray             * fCPVModules;         // Array of CPV modules for the IHEP's version of CPV
85
86   ClassDef(AliPHOSv1,1)  // Implementation of PHOS manager class for layout EMC+PPSD
87
88 };
89
90 #endif // AliPHOSV1_H