new design: singleton to be used instead od AliPHOS object during analysis; contains...
[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
25 AliPHOSSDigitizer(char* HeaderFile,char *SdigitsFile = 0) ;
26
27 virtual ~AliPHOSSDigitizer() ; // dtor
28 Float_t Calibrate(Int_t amp){return (amp - fA)/fB ; }
29 Int_t Digitize(Float_t Energy){ return (Int_t ) ( fA + Energy*fB); }
30
31 Float_t GetPedestalParameter(){return fA;}
32 Float_t GetCalibrationParameter(){return fB;}
33 char *GetSDigitsFile()const{return (char*) fSDigitsFile.Data();}
34 virtual void Exec(Option_t *option);
35 void SetNEvents(Int_t Nevents){fNevents = Nevents;}
36 void SetPedestalParameter(Float_t A){fA = A ;}
37 void SetSlopeParameter(Float_t B){fB = B ;}
38 void SetSDigitsFile(char * file ) ;
39 virtual void Print(Option_t* option) const ;
40 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
41
42private:
43 Float_t fA ; //Pedestal parameter
44 Float_t fB ; //Slope Digitizition parameters
45 Int_t fNevents ; // Number of events to digitize
46 Float_t fPrimThreshold ; // To store primari if Elos > threshold
47 TString fSDigitsFile ; //output file
48 TString fHeadersFile ; //input file
49
50
51 ClassDef(AliPHOSSDigitizer,1) // description
52
53};
54
55#endif // AliPHOSSDigitizer_H