New version of the EMCAL code: bug fixes, new digitisation classes (B.Nilsen)
[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//
11//*-- Author: Dmitri Peressounko(SUBATECH & KI)
12
13
14// --- ROOT system ---
15#include "TTask.h"
16#include "TString.h"
17// --- Standard library ---
18
19// --- AliRoot header files ---
20
21class AliEMCALSDigitizer: public TTask {
22
23public:
24 AliEMCALSDigitizer() ; // ctor
25 AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = 0) ;
26 virtual ~AliEMCALSDigitizer() ; // dtor
27
28 Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
29 Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
30
31 virtual void Exec(Option_t *option);
32
33 Float_t GetPedestalParameter()const {return fA;}
34 Float_t GetCalibrationParameter()const{return fB;}
35 char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();}
36
37 virtual void Print(Option_t* option) const ;
38
39 void SetPedestalParameter(Float_t A){fA = A ;}
40 void SetSlopeParameter(Float_t B){fB = B ;}
41 void SetSDigitsBranch(const char * title ) ;
42
43 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
44
45private:
46 void Init() ;
47 void PrintSDigits(Option_t * option) ;
48
49private:
50 Float_t fA ; //Pedestal parameter
51 Float_t fB ; //Slope Digitizition parameters
52 Int_t fNevents ; // Number of events to digitize
53 Float_t fPrimThreshold ; // To store primari if Elos > threshold
54 TString fSDigitsTitle ; // title of SDigits branch
55 TString fHeadersFile ; //input file
56 Bool_t fIsInitialized ;
57 TClonesArray * fSDigits ; //! list of SDigits
58 TClonesArray * fHits ; //!
59
60 ClassDef(AliEMCALSDigitizer,1) // description
61
62};
63
64#endif // AliEMCALSDigitizer_H