]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSSDigitizer.h
fWSN->Eval(0.001) to avoid fpe.
[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
88cb7938 6
990119d6 7/* $Id$ */
8
9//_________________________________________________________________________
10// Task Class for making SDigits in PHOS
baef0810 11// A Summable Digits is the sum of all hits originating
12// from one primary in one active cell
13//*--
990119d6 14//*-- Author: Dmitri Peressounko(SUBATECH & KI)
15
16
17// --- ROOT system ---
18#include "TTask.h"
bdc147a9 19class TFile ;
3e357865 20
990119d6 21// --- Standard library ---
22
23// --- AliRoot header files ---
88cb7938 24#include "AliConfig.h"
990119d6 25
26class AliPHOSSDigitizer: public TTask {
27
28public:
29 AliPHOSSDigitizer() ; // ctor
88cb7938 30 AliPHOSSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::fgkDefaultEventFolderName) ;
bdc147a9 31 AliPHOSSDigitizer(const AliPHOSSDigitizer & sd) ; // cpy ctor
88cb7938 32 virtual ~AliPHOSSDigitizer() {;} // dtor
990119d6 33
88cb7938 34 Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
35 Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
fbf811ec 36 virtual void Exec(Option_t *option);
2b60655b 37 const Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
88cb7938 38 virtual void Print() const ;
39 void SetEventFolderName(TString name) { fEventFolderName = name ; }
40
106fc2fa 41 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
8c140292 42 AliPHOSSDigitizer & operator = (const AliPHOSSDigitizer & /*sd*/) {return *this ;}
bdc147a9 43
7acf6008 44private:
45 void Init() ;
8d0f3f77 46 void InitParameters() ;
7acf6008 47 void PrintSDigits(Option_t * option) ;
88cb7938 48 void Unload() const ;
49
990119d6 50
51private:
7b7c1533 52 Float_t fA ; // Pedestal parameter
53 Float_t fB ; // Slope Digitizition parameters
990119d6 54 Float_t fPrimThreshold ; // To store primari if Elos > threshold
fbf811ec 55 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
88cb7938 56 TString fEventFolderName; // event folder name
57 Bool_t fInit ; //! tells if initialisation wennt OK, will revent exec if not
fbf811ec 58 Int_t fSDigitsInRun ; //! Total number of sdigits in one run
990119d6 59
88cb7938 60 ClassDef(AliPHOSSDigitizer,2) // description
990119d6 61
62};
63
64#endif // AliPHOSSDigitizer_H