]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALSDigitizer.h
EMCAL_FIRSTYEARV1 added to the valid name of geometry
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSDigitizer.h
CommitLineData
d804d556 1#ifndef ALIEMCALSDIGITIZER_H
2#define ALIEMCALSDIGITIZER_H
61e0abb5 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//_________________________________________________________________________
d804d556 7// This is a TTask that makes SDigits out of Hits
8// A Summable Digits is the sum of all hits originating
9// from one in one tower of the EMCAL
10// A threshold for assignment of the primary to SDigit is applied
11//
12// SDigits need to hold the energy sum of the hits, but AliEMCALDigit
13// can (should) only store amplitude. Therefore, the SDigit energy is
14// "digitized" before being stored and must be "calibrated" back to an
15// energy before SDigits are summed to form true Digits
16//
17//
ffa6d63b 18//*-- Author: Sahal Yacoob (LBL)
19// based on : AliPHOSSDigitizer
20//_________________________________________________________________________
05a92d59 21
61e0abb5 22// --- ROOT system ---
23#include "TTask.h"
1963b290 24class TBrowser;
88cb7938 25
61e0abb5 26// --- Standard library ---
27
28// --- AliRoot header files ---
88cb7938 29#include "AliConfig.h"
61e0abb5 30
31class AliEMCALSDigitizer: public TTask {
32
33public:
34 AliEMCALSDigitizer() ; // ctor
e191bb57 35 AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
88cb7938 36 AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
797e311f 37 virtual ~AliEMCALSDigitizer(); // dtor
61e0abb5 38
829ba234 39 Float_t Digitize(Float_t energy)const; //convert energy in GeV to int amplitude
40 Float_t Calibrate(Float_t amp)const; //opposite of Digitize()
ab6a174f 41
61e0abb5 42 virtual void Exec(Option_t *option);
88cb7938 43 Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
5dee926e 44 virtual void Print(Option_t *option="") const;
1963b290 45 void Print1(Option_t *option="all"); // *MENU*
88cb7938 46 void SetEventFolderName(TString name) { fEventFolderName = name ; }
5082063d 47 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
88cb7938 48
05a92d59 49 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
d64c959b 50 const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
88cb7938 51
1963b290 52 virtual void Browse(TBrowser* b);
61e0abb5 53
54private:
55 void Init() ;
839828a6 56 void InitParameters() ;
61e0abb5 57 void PrintSDigits(Option_t * option) ;
88cb7938 58 void Unload() const ;
106fc2fa 59
61e0abb5 60private:
05a92d59 61 Float_t fA ; // Pedestal parameter
62 Float_t fB ; // Slope Digitizition parameters
62741b41 63 Float_t fECPrimThreshold ; // To store primary if EC Shower Elos > threshold
62741b41 64 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
88cb7938 65 TString fEventFolderName; // event folder name
1963b290 66 Bool_t fInit ; //! tells if initialisation went OK, will revent exec if not
05a92d59 67 Int_t fSDigitsInRun ; //! Total number of sdigits in one run
5082063d 68 Int_t fFirstEvent; // first event to process
69 Int_t fLastEvent; // last event to process
1963b290 70 Float_t fSampling; // See AliEMCALGeometry
e44d51bd 71 TClonesArray* fHits; //-> Temporal array with hits
72
73 ClassDef(AliEMCALSDigitizer,7) // description
61e0abb5 74};
75
d804d556 76#endif // AliEMCALSDIGITIZER_H
173558f2 77