First version of Raw Data reconstruction. Added appropriate Reconstruct method to...
[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 */
61e0abb5 5/* $Id$ */
61e0abb5 6//_________________________________________________________________________
7// Task Class for making SDigits in EMCAL
8//
ffa6d63b 9//*-- Author: Sahal Yacoob (LBL)
10// based on : AliPHOSSDigitizer
11//_________________________________________________________________________
05a92d59 12//
13// Modif:
14// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
88cb7938 15// July 2003 Yves Schutz: new IO (à la PHOS)
05a92d59 16
61e0abb5 17// --- ROOT system ---
18#include "TTask.h"
88cb7938 19class TFile ;
1963b290 20class TList;
21class TBrowser;
22//class TBrowser;
88cb7938 23
61e0abb5 24// --- Standard library ---
25
26// --- AliRoot header files ---
88cb7938 27#include "AliConfig.h"
61e0abb5 28
29class AliEMCALSDigitizer: public TTask {
30
31public:
32 AliEMCALSDigitizer() ; // ctor
e191bb57 33 AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
88cb7938 34 AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
797e311f 35 virtual ~AliEMCALSDigitizer(); // dtor
61e0abb5 36
88cb7938 37 Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
bda7cf56 38 Int_t Digitize(Float_t energy)const;
61e0abb5 39 virtual void Exec(Option_t *option);
88cb7938 40 Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
5dee926e 41 virtual void Print(Option_t *option="") const;
1963b290 42 void Print1(Option_t *option="all"); // *MENU*
88cb7938 43 void SetEventFolderName(TString name) { fEventFolderName = name ; }
5082063d 44 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
88cb7938 45
05a92d59 46 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
d64c959b 47 const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
88cb7938 48
1963b290 49 virtual void Browse(TBrowser* b);
50 // hists
eb0b1051 51 void SetControlHists(Int_t var=0) {fControlHists=var;}
1963b290 52 Int_t GetControlHist() const {return fControlHists;}
53 TList *GetListOfHists() {return fHists;}
eb0b1051 54 TList* BookControlHists(int var=0);
1963b290 55 void SaveHists(const char* name="RF/TRD1/Digitizations/SDigiVar?",
56 Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU*
61e0abb5 57
58private:
59 void Init() ;
839828a6 60 void InitParameters() ;
61e0abb5 61 void PrintSDigits(Option_t * option) ;
88cb7938 62 void Unload() const ;
106fc2fa 63
61e0abb5 64private:
05a92d59 65 Float_t fA ; // Pedestal parameter
66 Float_t fB ; // Slope Digitizition parameters
62741b41 67 Float_t fECPrimThreshold ; // To store primary if EC Shower Elos > threshold
62741b41 68 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
88cb7938 69 TString fEventFolderName; // event folder name
1963b290 70 Bool_t fInit ; //! tells if initialisation went OK, will revent exec if not
05a92d59 71 Int_t fSDigitsInRun ; //! Total number of sdigits in one run
5082063d 72 Int_t fFirstEvent; // first event to process
73 Int_t fLastEvent; // last event to process
1963b290 74 Float_t fSampling; // See AliEMCALGeometry
75 // Control hists
76 Int_t fControlHists; //!
77 TList *fHists; //!
61e0abb5 78
88cb7938 79 ClassDef(AliEMCALSDigitizer,5) // description
61e0abb5 80};
81
82#endif // AliEMCALSDigitizer_H
173558f2 83