]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALSDigitizer.h
fix coverity #23091 #23092, remove very old code
[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//_________________________________________________________________________
f21fc003 7// This is a class that makes SDigits out of Hits
d804d556 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 ---
f21fc003 23#include "TNamed.h"
1963b290 24class TBrowser;
88cb7938 25
61e0abb5 26// --- Standard library ---
27
28// --- AliRoot header files ---
88cb7938 29#include "AliConfig.h"
61e0abb5 30
f21fc003 31class AliEMCALSDigitizer: public TNamed {
61e0abb5 32
33public:
34 AliEMCALSDigitizer() ; // ctor
e191bb57 35 AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
88cb7938 36 AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
f1d9131f 37 AliEMCALSDigitizer& operator = (const AliEMCALSDigitizer& source) ;
797e311f 38 virtual ~AliEMCALSDigitizer(); // dtor
61e0abb5 39
829ba234 40 Float_t Digitize(Float_t energy)const; //convert energy in GeV to int amplitude
41 Float_t Calibrate(Float_t amp)const; //opposite of Digitize()
ab6a174f 42
f21fc003 43 virtual void Digitize(Option_t *option="");
88cb7938 44 Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
5dee926e 45 virtual void Print(Option_t *option="") const;
1963b290 46 void Print1(Option_t *option="all"); // *MENU*
88cb7938 47 void SetEventFolderName(TString name) { fEventFolderName = name ; }
5082063d 48 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
88cb7938 49
05a92d59 50 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
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
f21fc003 64 Bool_t fDefaultInit; //! Says if the object 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
f21fc003 73 ClassDef(AliEMCALSDigitizer,8) // description
61e0abb5 74};
75
d804d556 76#endif // AliEMCALSDIGITIZER_H
173558f2 77