#ifndef ALIPHOSDigitizer_H #define ALIPHOSDigitizer_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 PHOS // Class performs digitization of Summable digits (in the PHOS case this is just // sum of contributions of all primary particles into given cell). // In addition it performs mixing of summable digits from different events. // //*-- Author: Dmitri Peressounko(SUBATECH & KI) // --- ROOT system --- #include "TTask.h" #include "TObjString.h" class TArrayI ; // --- Standard library --- // --- AliRoot header files --- #include "AliDigitizer.h" class AliPHOSSDigitizer ; class AliRunDigitizer ; class AliPHOSDigitizer: public TTask { public: AliPHOSDigitizer() ; // ctor AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ; AliPHOSDigitizer(AliRunDigitizer * ard) ; AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;} virtual ~AliPHOSDigitizer() ; void Digitize(const Int_t event) ; // Make Digits from SDigits void Exec(Option_t *option); // Supervising method const Float_t GetCPVNoise() const { return fCPVNoise ;} const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;} const Int_t GetDigitsInRun() const { return fDigitsInRun ;} const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;} const Float_t GetPedestal() const { return fPedestal; } const Float_t GetPinNoise() const { return fPinNoise;} const Float_t GetSlope() const { return fSlope; } const Float_t GetTimeResolution() const { return fTimeResolution ; } void MixWith(const char* HeaderFile) ; // Add another one file to mix void Print(Option_t* option)const ; void Reset() ; //restarts starts event processing from 0 event(s) void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;} void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;} void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;} void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} void SetSDigitsBranch(const char* file) ; AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) { // assignement operator requested by coding convention but not needed abort() ; return *this ; } private: Bool_t Init() ; void PrintDigits(Option_t * option) ; void WriteDigits(Int_t evt) ; // Writes Digits for particular event Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise Float_t FrontEdgeTime(TArrayF *energies, TArrayF * times) ; Int_t DigitizeEnergy(Int_t amp, Int_t absId) ; //Calculate the time of crossing of the threshold by front edge private: Float_t fPedestal ; // Calibration parameters read from SDigitizer Float_t fSlope ; // (nothing common with real digitization parameters) AliRunDigitizer * fARD ; //! Pointer to the Digitization Manager class Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry Float_t fPinNoise ; // Electronics noise in EMC Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC Float_t fCPVNoise ; // Noise in CPV Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV Int_t fDigitsInRun ; //! Total number of digits in one run Float_t fTimeResolution ; // Time resolution of FEE electronics Float_t fTimeThreshold ; // Threshold to start timing for given crystall Float_t fTimeSignalLength ; // Length of the timing signal Int_t fNADCbitsEmc ; Float_t fADCpedestalEmc ; Int_t fNADCbitsCPV ; Float_t fADCperestalCPV ; ClassDef(AliPHOSDigitizer,1) // description }; #endif // AliPHOSDigitizer_H