Mostly minor style modifications to be ready for cloning with EMCAL
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSDigitizer.h
CommitLineData
61e0abb5 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 */
5
6/* $Id$ */
7
8//_________________________________________________________________________
9// Task Class for making SDigits in EMCAL
10//
ffa6d63b 11//*-- Author: Sahal Yacoob (LBL)
12// based on : AliPHOSSDigitizer
13//_________________________________________________________________________
61e0abb5 14
15
16// --- ROOT system ---
17#include "TTask.h"
18#include "TString.h"
19// --- Standard library ---
20
21// --- AliRoot header files ---
22
23class AliEMCALSDigitizer: public TTask {
24
25public:
26 AliEMCALSDigitizer() ; // ctor
ffa6d63b 27 AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ;
61e0abb5 28 virtual ~AliEMCALSDigitizer() ; // dtor
29
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); }
229f77c4 32
89e103bd 33 // void TestTowerID(void) ;
61e0abb5 34 virtual void Exec(Option_t *option);
35
36 Float_t GetPedestalParameter()const {return fA;}
37 Float_t GetCalibrationParameter()const{return fB;}
38 char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();}
36657114 39 void SetSplitFile(const TString splitFileName = "EMCAL.SDigits.root" ) ;
61e0abb5 40 virtual void Print(Option_t* option) const ;
41
42 void SetPedestalParameter(Float_t A){fA = A ;}
43 void SetSlopeParameter(Float_t B){fB = B ;}
44 void SetSDigitsBranch(const char * title ) ;
45
46 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
f063936c 47 Int_t Segment2TowerID(Int_t SegmentID){
48 return Layer2TowerID(SegmentID,kFALSE);
49}
61e0abb5 50
51private:
52 void Init() ;
839828a6 53 void InitParameters() ;
61e0abb5 54 void PrintSDigits(Option_t * option) ;
814ad4bf 55 Int_t Layer2TowerID(Int_t,Bool_t) ;
106fc2fa 56
61e0abb5 57private:
58 Float_t fA ; //Pedestal parameter
59 Float_t fB ; //Slope Digitizition parameters
89e103bd 60 Float_t fPhotonElectronFactor ; // number of photon electrons per GeV
61 // should be calculated independently for each layer as :
62 // LightYield*LightCollectionEfficiency*LightAttenuation*APDPhotoElectronEfficiency*APDGain
e1f60236 63
92f521a9 64 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
61e0abb5 65 Int_t fNevents ; // Number of events to digitize
89e103bd 66 Float_t fTowerPrimThreshold ; // To store primary in Tower if Elos > threshold
67 Float_t fPreShowerPrimThreshold ; // To store primary if Pre Shower Elos > threshold
61e0abb5 68 TString fSDigitsTitle ; // title of SDigits branch
69 TString fHeadersFile ; //input file
70 Bool_t fIsInitialized ;
71 TClonesArray * fSDigits ; //! list of SDigits
ffa6d63b 72 TClonesArray * fHits ; //!
36657114 73 TFile * fSplitFile ; //! file in which SDigits will eventually be stored
61e0abb5 74
0e9fbd47 75 ClassDef(AliEMCALSDigitizer,2) // description
61e0abb5 76
77};
78
79#endif // AliEMCALSDigitizer_H