//_________________________________________________________________________
// Task Class for making SDigits in PHOS
-//
+// A Summable Digits is the sum of all hits originating
+// from one primary in one active cell
+//*--
//*-- Author: Dmitri Peressounko(SUBATECH & KI)
// --- ROOT system ---
#include "TTask.h"
#include "TString.h"
+class TFile ;
+
// --- Standard library ---
// --- AliRoot header files ---
public:
AliPHOSSDigitizer() ; // ctor
- AliPHOSSDigitizer(char* HeaderFile,char *SdigitsFile = 0) ;
-
+ AliPHOSSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ;
virtual ~AliPHOSSDigitizer() ; // dtor
- Float_t Calibrate(Int_t amp){return (amp - fA)/fB ; }
- Int_t Digitize(Float_t Energy){ return (Int_t ) ( fA + Energy*fB); }
- Float_t GetPedestalParameter(){return fA;}
- Float_t GetCalibrationParameter(){return fB;}
- char *GetSDigitsFile()const{return (char*) fSDigitsFile.Data();}
+ Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
+ Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
virtual void Exec(Option_t *option);
- void SetNEvents(Int_t Nevents){fNevents = Nevents;}
- void SetPedestalParameter(Float_t A){fA = A ;}
- void SetSlopeParameter(Float_t B){fB = B ;}
- void SetSDigitsFile(char * file ) ;
+ const char * GetSDigitsBranch()const{return GetName();}
+ const Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
virtual void Print(Option_t* option) const ;
+ void SetSDigitsBranch(const char * title ) ;
+ void SetSplitFile(const TString splitFileName = "PHOS.SDigits.root") ;
+ void UseHitsFrom(const char * filename) ;
Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
private:
- Float_t fA ; //Pedestal parameter
- Float_t fB ; //Slope Digitizition parameters
- Int_t fNevents ; // Number of events to digitize
- Float_t fPrimThreshold ; // To store primari if Elos > threshold
- TString fSDigitsFile ; //output file
- TString fHeadersFile ; //input file
+ void Init() ;
+ void InitParameters() ;
+ void PrintSDigits(Option_t * option) ;
+private:
+
+ Float_t fA ; // Pedestal parameter
+ Float_t fB ; // Slope Digitizition parameters
+ Float_t fPrimThreshold ; // To store primari if Elos > threshold
+ Int_t fSDigitsInRun ; //! Total number of sdigits in one run
+ TFile * fSplitFile ; //! file in which SDigits will eventually be stored
ClassDef(AliPHOSSDigitizer,1) // description