1 #ifndef ALIEMCALSDigitizer_H
2 #define ALIEMCALSDigitizer_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
9 // Task Class for making SDigits in EMCAL
11 //*-- Author: Sahal Yacoob (LBL)
12 // based on : AliPHOSSDigitizer
13 //_________________________________________________________________________
16 // --- ROOT system ---
19 // --- Standard library ---
21 // --- AliRoot header files ---
23 class AliEMCALSDigitizer: public TTask {
26 AliEMCALSDigitizer() ; // ctor
27 AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ;
28 virtual ~AliEMCALSDigitizer() ; // dtor
30 Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
31 Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
33 void TestTowerID(void) ;
34 virtual void Exec(Option_t *option);
36 Float_t GetPedestalParameter()const {return fA;}
37 Float_t GetCalibrationParameter()const{return fB;}
38 char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();}
40 virtual void Print(Option_t* option) const ;
42 void SetPedestalParameter(Float_t A){fA = A ;}
43 void SetSlopeParameter(Float_t B){fB = B ;}
44 void SetSDigitsBranch(const char * title ) ;
46 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
50 void PrintSDigits(Option_t * option) ;
51 Int_t Layer2TowerID(Int_t,Bool_t) ;
53 Float_t fA ; //Pedestal parameter
54 Float_t fB ; //Slope Digitizition parameters
55 Float_t fLayerRatio ; //Factor that takes into account difference in light collection between 2 first layers and rest of layers
57 Int_t fNevents ; // Number of events to digitize
58 Float_t fPrimThreshold ; // To store primary if Elos > threshold
59 TString fSDigitsTitle ; // title of SDigits branch
60 TString fHeadersFile ; //input file
61 Bool_t fIsInitialized ;
62 TClonesArray * fSDigits ; //! list of SDigits
63 TClonesArray * fHits ; //!
65 ClassDef(AliEMCALSDigitizer,1) // description
69 #endif // AliEMCALSDigitizer_H