Adding the array of the recosntruction parameters (Marian)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSSimParam.h
CommitLineData
f898e0f3 1#ifndef ALIPHOSSIMPARAM_H
2#define ALIPHOSSIMPARAM_H
3/* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliPHOSSimParam.h 23530 2008-01-25 06:46:13Z prsnko $ */
7
8// Base class for the PHOS simulation parameters.
9// Do not use in the reconstruction; use derivative classes instead.
10
11#include "TNamed.h"
12#include "TMath.h"
13
14class AliPHOSSimParam : public TNamed {
15
16public:
17
18 AliPHOSSimParam();
19 AliPHOSSimParam(const AliPHOSSimParam& recoParam);
20 AliPHOSSimParam& operator = (const AliPHOSSimParam& recoParam);
21 virtual ~AliPHOSSimParam() {}
22
23 static AliPHOSSimParam * GetInstance() ;
24
25 //Parameters used in conversion of deposited energy to APD response [see AliPHOSv1 for details]
26 void SetMeanLightYield(Float_t ly=47000.){fLightYieldMean=ly; //recalculate now dependencies
27 fLightFactor = fLightYieldMean * fIntrinsicAPDEfficiency ;
28 fAPDFactor = (13.418/fLightYieldMean/100.) * 300. ; }
29 void SetAPDEfficiency(Float_t eff=0.02655){fIntrinsicAPDEfficiency=eff;
30 fLightFactor = fLightYieldMean * fIntrinsicAPDEfficiency ;}
31 Float_t GetLightFactor(void) const { return fLightFactor ;}
32 Float_t GetAPDFactor(void) const { return fAPDFactor ;}
33
34 //Parameters use in EMC noise calculation [see AliPHOSDigitizer for details]
35 Float_t GetAPDNoise() const { return fAPDNoise; } //RMS of APD noise
36 void SetAPDNoise(Float_t noise=0.012){fAPDNoise = noise; }
37
38 Float_t GetEmcDigitsThreshold() const { return fEMCDigitThreshold ; } //Minimal energy to keep digit
39 void SetEMCDigitsThreshold(Float_t thresh=0.01){fEMCDigitThreshold=thresh;}
40
41 //Parameters for energy digitization [see AliPHOSDigitizer for details]
42 void SetADCchannelW(Float_t width=0.005){fEMCADCchannel=width ;} //EMC channel width
43 Float_t GetADCchannelW(void) const {return fEMCADCchannel; }
44
45 void SetEDigitizationOn(Bool_t on=kTRUE){fDigitizeE=on ;} //Use digitization in simulation or left it
46 Bool_t IsEDigitizationOn(void)const {return fDigitizeE ;} //for Digits2Raw->Digits procedure
47
48 //Parameters for EMC TOF resolution [see AliPHOSDigitizer::TimeResolution()]
49 Float_t GetTOFa()const{return fTOFa ;} //constant term
50 Float_t GetTOFb()const{return fTOFb ;} //stohastic term
51 void SetTOFparameters(Float_t a=0.5e-9, Float_t b=1.5e-9){fTOFa=a; fTOFb=b; }
52
167d2780 53 //Parameter to simulate (random) decalibration
54 Float_t GetFastDecalibration(void)const {return fFastDecalibration;}
55 void SetFastDecalibration(Float_t res=0.01) { fFastDecalibration=res;}
56
f898e0f3 57 //Parameters for CPV noise and digitization [see AliPHOSDigitizer for details]
58 Float_t GetCPVNoise() const {return fCPVNoise ;} //RMS of CPV noise in
59 void SetCPVNoise(Float_t noise=0.01){ fCPVNoise = noise ;} //CPV popugais
60
61 Float_t GetCpvDigitsThreshold() const {return fCPVDigitThreshold ;} //Minimal energy to keep digit in
62 void SetCpvDigitsThreshold(Float_t thresh=0.09){fCPVDigitThreshold = thresh;} //CPV popugais
63
64 Float_t GetADCpedestalCpv() const {return fADCpedestalCpv ;} //CPV pedestal value
65 void SetADCpedestalCpv(Float_t ped=0.012){ fADCpedestalCpv=ped ;} //in CPV popugais
66
67 Float_t GetADCchanelCpv() const {return fADCchanelCpv;} //Price of one ADC channel
68 void SetADCchanelCpv(Float_t w=0.0012) {fADCchanelCpv=w; } //for CPV
69
70 Int_t GetNADCcpv() const {return fNADCcpv ;} //Max number of channels
71 void SettNADCcpv(Int_t n=12) { fNADCcpv=(Int_t)TMath::Power(2,n) ; } //in CPV ADC
72
73 //Mark streams for mixing as streams contaning Digits (true) or SDigits (false)
74 //Streamt numbering the same as in StreamManager
75 void SetStreamDigits(Int_t i){if(i<10)fDStream[i]=kTRUE;}
76 Bool_t IsStreamDigits(Int_t i){return fDStream[i]; }
77
78private:
79
80 AliPHOSSimParam(Int_t i); //True constructor which should be called by GetInstance()
81
82private:
83
84 //Parameters used in conversion of deposited energy to APD response (AliPHOSv1)
85 Float_t fLightYieldMean ; //Average number of photoelectrons per GeV
86 Float_t fIntrinsicAPDEfficiency; //APD efficiency including geometric coverage
87 Float_t fLightFactor ; //Average number of photons collected by APD per GeV deposited energy
88 Float_t fAPDFactor ; //factor relating light yield and APD response
89
90 //Parameters used in electronic noise calculation and thresholds for EMC (AliPHOSDigitizer)
91 Float_t fAPDNoise; //RMS of APD noise
92 Float_t fEMCDigitThreshold ; //minimal energy to keep digit
93 Float_t fEMCADCchannel ; //width of ADC channel in GeV
94 Float_t fTOFa ; //constant term of TOF resolution
95 Float_t fTOFb ; //stohastic term of TOF resolution
167d2780 96 Float_t fFastDecalibration; //Parameter to describe decalibration
f898e0f3 97
98 //CPV parameters
99 Float_t fADCpedestalCpv ; //Pedestal value
100 Float_t fADCchanelCpv ; //ADC channel width
101 Float_t fCPVNoise ; //RMS of CPV noise
102 Float_t fCPVDigitThreshold ; //Minimal energy to keep digit
103 Int_t fNADCcpv ; //Max number of channels in CPV ADC
104
105 Bool_t fDStream[10] ; //Mark mixing stream contains digits or SDigits
106 Bool_t fDigitizeE ; //Use energy digitization in simulation or left to Digits2Raw()
107
108 static AliPHOSSimParam * fgSimParam ; // pointer to the unique instance of the class
109
110 ClassDef(AliPHOSSimParam,1)
111};
112
113#endif