A lot of changes here:
[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
baef0810 10// A Summable Digits is the sum of all hits originating
11// from one primary in one active cell
12//*--
990119d6 13//*-- Author: Dmitri Peressounko(SUBATECH & KI)
14
15
16// --- ROOT system ---
17#include "TTask.h"
18#include "TString.h"
19// --- Standard library ---
20
21// --- AliRoot header files ---
22
23class AliPHOSSDigitizer: public TTask {
24
25public:
26 AliPHOSSDigitizer() ; // ctor
7b7c1533 27 AliPHOSSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "No Name") ;
28 virtual ~AliPHOSSDigitizer(){} // dtor
990119d6 29
7acf6008 30 Float_t Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
31 Int_t Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
32
990119d6 33 virtual void Exec(Option_t *option);
7acf6008 34
7b7c1533 35 const Float_t GetPedestalParameter()const {return fA;}
36 const Float_t GetCalibrationParameter()const{return fB;}
37 const char * GetSDigitsBranch()const{return GetName();}
7acf6008 38
990119d6 39 virtual void Print(Option_t* option) const ;
7acf6008 40
41 void SetPedestalParameter(Float_t A){fA = A ;}
42 void SetSlopeParameter(Float_t B){fB = B ;}
43 void SetSDigitsBranch(const char * title ) ;
44
7b7c1533 45 void UseHitsFrom(const char * filename) ;
46
7acf6008 47 Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
48
49private:
50 void Init() ;
51 void PrintSDigits(Option_t * option) ;
990119d6 52
53private:
7b7c1533 54
55 Float_t fA ; // Pedestal parameter
56 Float_t fB ; // Slope Digitizition parameters
990119d6 57 Float_t fPrimThreshold ; // To store primari if Elos > threshold
990119d6 58
59
60 ClassDef(AliPHOSSDigitizer,1) // description
61
62};
63
64#endif // AliPHOSSDigitizer_H