3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //_________________________________________________________________________
7 // Implementation version v1 of PHOS Manager class
8 // Layout EMC + PPSD has name GPS2
9 // Layout EMC + CPV has name IHEP
11 //*-- Author: Yves Schutz (SUBATECH)
13 // --- ROOT system ---
14 #include "TClonesArray.h"
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"
28 class AliPHOSv1 : public AliPHOSv0 {
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
40 virtual ~AliPHOSv1(void) ;
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
57 virtual void ResetReconstruction() ; // Reset reconstructed objects
58 void SetReconstructioner(AliPHOSReconstructioner& Reconstructioner) {
59 // sets the reconstructionner object to be used
60 fReconstructioner = &Reconstructioner ;
62 void SetDigitThreshold(Float_t th) { fDigitThreshold = th ; }
63 void SetPpsdEnergyThreshold(Float_t enth) { fPpsdEnergyThreshold = enth ; }
64 void SetCpvEnergyThreshold(Float_t enth) { fCpvEnergyThreshold = enth ; }
66 virtual void SetTreeAddress();
67 virtual void StepManager(void) ;
68 virtual TString Version(void){
69 // returns the version number
70 return TString("v1") ;
73 AliPHOSv1 & operator = (const AliPHOSv1 & rvalue) {
74 // assignement operator requested by coding convention but not needed
79 // IHEP's CPV specific functions
81 // AliPHOSCPVModule &GetEMCModule(int n) { return *(AliPHOSCPVModule*)fEMCModules->operator[](n); }
82 // AliPHOSCPVModule &GetCPVModule(int n) { return *(AliPHOSCPVModule*)fCPVModules->operator[](n); }
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) ;
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
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
102 ClassDef(AliPHOSv1,1) // Implementation of PHOS manager class for layout EMC+PPSD
106 #endif // AliPHOSV1_H