X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALDigitizer.h;h=3284d0d712e742f1febaeb914cd8808be70c99b3;hb=0f7547f17c20abb826b907a88a51513512283ad1;hp=4c176701c644206c2a5ce95e4788a280f882e7d0;hpb=33a52e5553fb3380f2e3b3a1f66f0e8416850e24;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALDigitizer.h b/EMCAL/AliEMCALDigitizer.h index 4c176701c64..3284d0d712e 100644 --- a/EMCAL/AliEMCALDigitizer.h +++ b/EMCAL/AliEMCALDigitizer.h @@ -12,15 +12,16 @@ // // For each event two branches are created in TreeD: // "EMCAL" - list of digits +// "EMCALTRG" - list of trigger digits // "AliEMCALDigitizer" - AliEMCALDigitizer with all parameters used in digitization // -// Note, that one cset title for new digits branch, and repeat digitization with -// another set of parameters. -// //*-- Author: Sahal Yacoob (LBL) // based on : AliPHOSDigit // July 2003 Yves Schutz : NewIO // November 2003 Aleksei Pavlinov : Shish-Kebab geometry +// +// July 2011 GCB: Digitizer modified to accomodate embedding. +// Time calibration added. Decalibration possibility of energy and time added //_________________________________________________________________________ @@ -40,84 +41,91 @@ class AliRunDigitizer ; class AliEMCALDigitizer: public AliDigitizer { public: - AliEMCALDigitizer() ; // ctor - AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; + AliEMCALDigitizer() ; // ctor + AliEMCALDigitizer(TString alirunFileNameFile, + TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ; AliEMCALDigitizer(AliRunDigitizer * manager) ; virtual ~AliEMCALDigitizer() ; - void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits - void Exec(Option_t *option); // Supervising method - - Float_t GetDigitThreshold() const { return fDigitThreshold;} - //Float_t GetPedestal() const { return fPedestal; } - Float_t GetPinNoise() const { return fPinNoise;} - //Float_t GetSlope() const { return fSlope; } - Float_t GetTimeResolution() const { return fTimeResolution ; } - Float_t GetECAchannel() const { return fADCchannelEC ; } - Float_t GetECApedestal() const { return fADCpedestalEC ; } - void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; } - void SetDigitThreshold(Float_t EMCThreshold) {fDigitThreshold = EMCThreshold;} - void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} + void Digitize(Int_t event); // Make Digits from SDigits stored in fSDigits + void Exec(Option_t *option); // Supervising method + + Int_t GetDigitThreshold() const { return fDigitThreshold ; } + Float_t GetPinNoise() const { return fPinNoise ; } + Float_t GetTimeNoise() const { return fTimeNoise ; } + Float_t GetTimeResolution(const Float_t energy) const; + Double_t GetTimeResolutionPar0() const { return fTimeResolutionPar0 ; } + Double_t GetTimeResolutionPar1() const { return fTimeResolutionPar1 ; } + Double_t GetTimeDelay() const { return fTimeDelay ; } + Float_t GetECAchannel() const { return fADCchannelEC ; } + Float_t GetECApedestal() const { return fADCpedestalEC ; } + + void SetEventRange(Int_t first=0, Int_t last=-1) { fFirstEvent = first ; + fLastEvent = last ; } + void SetDigitThreshold(Int_t EMCThreshold) { fDigitThreshold = EMCThreshold ; } + void SetPinNoise(Float_t pinNoise ) { fPinNoise = pinNoise ; } + void SetTimeNoise(Float_t timeNoise ) { fTimeNoise = timeNoise ; } //General - Int_t GetDigitsInRun() const { return fDigitsInRun; } - void MixWith(TString alirunFileName, - TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix - void Print(Option_t* option="") const ; - void Print1(Option_t * option); // *MENU* - + Int_t GetDigitsInRun() const { return fDigitsInRun; } + void Print (Option_t * option = "") const ; + void Print1(Option_t * option) ; // *MENU* + + AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/) { // assignement operator requested by coding convention but not needed Fatal("operator =", "not implemented") ; return *this ; } - virtual void Browse(TBrowser* b); - private: - Bool_t Init(); - void InitParameters() ; - void PrintDigits(Option_t * option) ; - void Unload() ; - void WriteDigits() ; // Writes Digits the current event - Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise + Bool_t Init(); + void InitParameters() ; + void PrintDigits(Option_t * option) ; + void Unload() ; + void WriteDigits() ; // Writes Digits the current event + void WriteDigits(TClonesArray* digits, const char* branchName = "EMTRG"); // + Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise + + void CalibrateADCTime (Float_t & adc , Float_t & time, const Int_t AbsId) ; + void DigitizeEnergyTime(Float_t & energy, Float_t & time, const Int_t AbsId) ; - //Calculate the time of crossing of the threshold by front edge - //Float_t FrontEdgeTime(TClonesArray * ticks) ; + void Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG); + void DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples); - Int_t DigitizeEnergy(Float_t energy, Int_t AbsId) ; - private: - Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) - Int_t fDigitsInRun ; //! Total number of digits in one run - Bool_t fInit ; //! To avoid overwriting existing files - - Int_t fInput ; // Number of files to merge - TString * fInputFileNames ; //[fInput] List of file names to merge - TString * fEventNames ; //[fInput] List of event names to merge - - Float_t fDigitThreshold ; // Threshold for storing digits in EMC - Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy - //Float_t fPedestal ; // Calibration parameters //Not used, remove? - //Float_t fSlope ; // read from SDigitizer //Not used, remove? - Float_t fPinNoise ; // Electronics noise in EMC - Float_t fTimeResolution ; // Time resolution of FEE electronics - //Float_t fTimeThreshold ; // Threshold to start timing for given crystall //Not used, remove? - //Float_t fTimeSignalLength ; // Length of the timing signal //Not used, remove? - Float_t fADCchannelEC ; // width of one ADC channel in EC section (GeV) - Float_t fADCpedestalEC ; // pedestal for one ADC channel - Int_t fNADCEC ; // number of channels in EC section ADC - - TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode - Int_t fFirstEvent; // first event to process - Int_t fLastEvent; // last event to process - + Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized) + Int_t fDigitsInRun ; //! Total number of digits in one run + Bool_t fInit ; //! To avoid overwriting existing files + + Int_t fInput ; // Number of files to merge + TString *fInputFileNames ; //[fInput] List of file names to merge + TString *fEventNames ; //[fInput] List of event names to merge + + Int_t fDigitThreshold ; // Threshold for storing digits in EMC, ACD units + Int_t fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy + Float_t fPinNoise ; // Electronics noise in EMC, APD + Double_t fTimeNoise; // Electronics noise in EMC, time + Double_t fTimeDelay; // Time delay to reproduce data delay + Double_t fTimeResolutionPar0 ; // Time resolution of FEE electronics + Double_t fTimeResolutionPar1 ; // Time resolution of FEE electronics + Float_t fADCchannelEC ; // calibration width of one ADC channel in EC section (GeV) + Float_t fADCpedestalEC ; // calibration pedestal for one ADC channel + Float_t fADCchannelECDecal ; // decalibration width of one ADC channel in EC section (GeV) + Float_t fTimeChannel ; // calibration time width for one channel + Float_t fTimeChannelDecal ; // calibration time width for one channel + Int_t fNADCEC ; // number of channels in EC section ADC + + TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode + Int_t fFirstEvent; // first event to process + Int_t fLastEvent; // last event to process + AliEMCALCalibData * fCalibData; //Calibration data pointer - ClassDef(AliEMCALDigitizer,8) // description + ClassDef(AliEMCALDigitizer,11) // description };