X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALSDigitizer.h;h=d2a791d23d82092a8fd5aa8049d7e94d577b6af3;hb=b85ea106fc895e812397f1f3bab3ce9d20798225;hp=465bd4dbecfb3d2c22ae454285c18a15941ab9c1;hpb=89e103bd5247d5a6cfbde66013c498b4374655ef;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALSDigitizer.h b/EMCAL/AliEMCALSDigitizer.h index 465bd4dbecf..d2a791d23d8 100644 --- a/EMCAL/AliEMCALSDigitizer.h +++ b/EMCAL/AliEMCALSDigitizer.h @@ -2,71 +2,70 @@ #define ALIEMCALSDigitizer_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ - /* $Id$ */ - //_________________________________________________________________________ // Task Class for making SDigits in EMCAL // //*-- Author: Sahal Yacoob (LBL) // based on : AliPHOSSDigitizer //_________________________________________________________________________ - - +// +// Modif: +// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction +// July 2003 Yves Schutz: new IO (à la PHOS) + // --- ROOT system --- #include "TTask.h" -#include "TString.h" +class TBrowser; + // --- Standard library --- // --- AliRoot header files --- +#include "AliConfig.h" class AliEMCALSDigitizer: public TTask { public: AliEMCALSDigitizer() ; // ctor - AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ; - virtual ~AliEMCALSDigitizer() ; // dtor + AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ; + AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ; + virtual ~AliEMCALSDigitizer(); // dtor - Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; } - Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); } - - // void TestTowerID(void) ; - virtual void Exec(Option_t *option); - - Float_t GetPedestalParameter()const {return fA;} - Float_t GetCalibrationParameter()const{return fB;} - char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();} + Int_t Digitize(Float_t energy)const; //convert energy in GeV to int amplitude + Float_t Calibrate(Int_t amp)const; //opposite of Digitize() - virtual void Print(Option_t* option) const ; + virtual void Exec(Option_t *option); + Int_t GetSDigitsInRun() const {return fSDigitsInRun ;} + virtual void Print(Option_t *option="") const; + void Print1(Option_t *option="all"); // *MENU* + void SetEventFolderName(TString name) { fEventFolderName = name ; } + void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } - void SetPedestalParameter(Float_t A){fA = A ;} - void SetSlopeParameter(Float_t B){fB = B ;} - void SetSDigitsBranch(const char * title ) ; + Bool_t operator == (const AliEMCALSDigitizer & sd) const ; + const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;} - Bool_t operator == (const AliEMCALSDigitizer & sd) const ; + virtual void Browse(TBrowser* b); private: void Init() ; + void InitParameters() ; void PrintSDigits(Option_t * option) ; - Int_t Layer2TowerID(Int_t,Bool_t) ; -private: - Float_t fA ; //Pedestal parameter - Float_t fB ; //Slope Digitizition parameters - Float_t fPhotonElectronFactor ; // number of photon electrons per GeV - // should be calculated independently for each layer as : - // LightYield*LightCollectionEfficiency*LightAttenuation*APDPhotoElectronEfficiency*APDGain - - Int_t fNevents ; // Number of events to digitize - Float_t fTowerPrimThreshold ; // To store primary in Tower if Elos > threshold - Float_t fPreShowerPrimThreshold ; // To store primary if Pre Shower Elos > threshold - TString fSDigitsTitle ; // title of SDigits branch - TString fHeadersFile ; //input file - Bool_t fIsInitialized ; - TClonesArray * fSDigits ; //! list of SDigits - TClonesArray * fHits ; //! - - ClassDef(AliEMCALSDigitizer,1) // description + void Unload() const ; +private: + Float_t fA ; // Pedestal parameter + Float_t fB ; // Slope Digitizition parameters + Float_t fECPrimThreshold ; // To store primary if EC Shower Elos > threshold + Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) + TString fEventFolderName; // event folder name + Bool_t fInit ; //! tells if initialisation went OK, will revent exec if not + Int_t fSDigitsInRun ; //! Total number of sdigits in one run + Int_t fFirstEvent; // first event to process + Int_t fLastEvent; // last event to process + Float_t fSampling; // See AliEMCALGeometry + + ClassDef(AliEMCALSDigitizer,6) // description }; #endif // AliEMCALSDigitizer_H +