new design: derived from TTask
[u/mrichter/AliRoot.git] / PHOS / AliPHOSSDigitizer.h
CommitLineData
990119d6 1#ifndef ALIPHOSSDigitizer_H
2#define ALIPHOSSDigitizer_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//_________________________________________________________________________
9// Task Class for making SDigits in PHOS
10//
11//*-- Author: Dmitri Peressounko(SUBATECH & KI)
12
13
14// --- ROOT system ---
15#include "TTask.h"
16#include "TString.h"
17// --- Standard library ---
18
19// --- AliRoot header files ---
20
21class AliPHOSSDigitizer: public TTask {
22
23public:
24 AliPHOSSDigitizer() ; // ctor
7acf6008 25 AliPHOSSDigitizer(const char* HeaderFile,const char *SdigitsTitle = 0) ;
990119d6 26 virtual ~AliPHOSSDigitizer() ; // dtor
990119d6 27
7acf6008 28 Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
29 Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
30
990119d6 31 virtual void Exec(Option_t *option);
7acf6008 32
33 Float_t GetPedestalParameter()const {return fA;}
34 Float_t GetCalibrationParameter()const{return fB;}
35 char * GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();}
36
990119d6 37 virtual void Print(Option_t* option) const ;
7acf6008 38
39 void SetPedestalParameter(Float_t A){fA = A ;}
40 void SetSlopeParameter(Float_t B){fB = B ;}
41 void SetSDigitsBranch(const char * title ) ;
42
43 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
44
45private:
46 void Init() ;
47 void PrintSDigits(Option_t * option) ;
990119d6 48
49private:
50 Float_t fA ; //Pedestal parameter
51 Float_t fB ; //Slope Digitizition parameters
52 Int_t fNevents ; // Number of events to digitize
53 Float_t fPrimThreshold ; // To store primari if Elos > threshold
7acf6008 54 TString fSDigitsTitle ; // title of SDigits branch
990119d6 55 TString fHeadersFile ; //input file
7acf6008 56 Bool_t fIsInitialized ;
57 TClonesArray * fSDigits ; //! list of SDigits
58 TClonesArray * fHits ; //!
990119d6 59
60
61 ClassDef(AliPHOSSDigitizer,1) // description
62
63};
64
65#endif // AliPHOSSDigitizer_H