#95494: Change AliLog message in AliAltroRawStreamV3.cxx (additional reduction of...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSimParam.cxx
CommitLineData
33a52e55 1/**************************************************************************
2 * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17 //
18 // Base class for the EMCAL simulation parameters.
19 //
20 //
21 */
22
23// --- Root header files ---
24#include "TMath.h"
25// --- AliRoot header files ---
26#include "AliEMCALSimParam.h"
27#include "AliLog.h"
28
29
30ClassImp(AliEMCALSimParam)
31
32AliEMCALSimParam * AliEMCALSimParam::fgSimParam = 0 ;
33//-----------------------------------------------------------------------------
34AliEMCALSimParam::AliEMCALSimParam() :
35TNamed(),
36fDigitThreshold(0),
37fMeanPhotonElectron(0),
5fb45456 38fGainFluctuations(0),
33a52e55 39fPinNoise(0),
df5cea6b 40fTimeNoise(0),
f0a6dc6f 41fTimeDelay(0),
a2f8e711 42fTimeResolutionPar0(0),
43fTimeResolutionPar1(0),
33a52e55 44fNADCEC(0),//Digitizer
45fA(0.),
46fB(0.),
47fECPrimThreshold(0.) //SDigitizer
48{
e42f0a9d 49 //Constructor
50
51 //Parameters in Digitizer
52 fMeanPhotonElectron = 4400; // electrons per GeV
5fb45456 53 fGainFluctuations = 15.; // obtained empiricaly to match beam test, from Paraskevi Ganoti
e42f0a9d 54 fPinNoise = 0.012; // APD noise in GeV from analysis test beam data
55 fDigitThreshold = 3; // 3 ADC counts not anymore cut in energy: //fPinNoise * 3; // 3 * sigma
df5cea6b 56 fTimeNoise = 1.28e-5; // time noise in s
e42f0a9d 57 fTimeResolutionPar0 = 0.26666; // From F. Blanco: 0.51639^2
58 fTimeResolutionPar1 = 1.45861; // From F. Blanco: 1.20773^2
59 fTimeDelay = 600e-9 ; // 600 ns
f0a6dc6f 60
e42f0a9d 61 fNADCEC = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC - 65536
33a52e55 62
e42f0a9d 63 //SDigitizer
64 fA = 0;
65 fB = 1.e+6; // Dynamic range now 2 TeV
66 fECPrimThreshold = 0.05; // GeV // threshold for deposit energy of hit
33a52e55 67
68}
69
70
71//-----------------------------------------------------------------------------
72AliEMCALSimParam::AliEMCALSimParam(const AliEMCALSimParam& ):
73TNamed(),
74fDigitThreshold(0),
75fMeanPhotonElectron(0),
5fb45456 76fGainFluctuations(0),
33a52e55 77fPinNoise(0),
df5cea6b 78fTimeNoise(0),
f0a6dc6f 79fTimeDelay(0),
a2f8e711 80fTimeResolutionPar0(0),
81fTimeResolutionPar1(0),
33a52e55 82fNADCEC(0),
83fA(0.),
84fB(0.),
85fECPrimThreshold(0.)//SDigitizer
86{
87 //Copy constructor.
88 AliError("Should not use copy constructor for singleton") ;
89
90 fgSimParam = this ;
91
92}
93
94//-----------------------------------------------------------------------------
95AliEMCALSimParam * AliEMCALSimParam::GetInstance(){
96// Get Instance
97
e42f0a9d 98 if(!fgSimParam){
99 fgSimParam = new AliEMCALSimParam() ;
100 }
101
102 return fgSimParam ;
33a52e55 103
104}
105
106//-----------------------------------------------------------------------------
107AliEMCALSimParam& AliEMCALSimParam::operator = (const AliEMCALSimParam& simParam)
108{
109 //Assignment operator.
110
111 if(this != &simParam) {
112 AliError("Should not use operator= for singleton\n") ;
113 }
114
115 return *this;
116}
117
118//-----------------------------------------------------------------------------
119void AliEMCALSimParam::Print(Option_t *) const
120{
e42f0a9d 121 // Print simulation parameters to stdout
122
123 printf("=== Parameters in Digitizer === \n");
124 printf("\t Electronics noise in EMC (fPinNoise) = %f, (fTimeNoise) = %e\n", fPinNoise, fTimeNoise) ;
125 printf("\t Threshold in EMC (fDigitThreshold) = %d\n", fDigitThreshold) ;
126 printf("\t Time Resolution (fTimeResolutionPar0) = %g\n", fTimeResolutionPar0) ;
127 printf("\t Time Resolution (fTimeResolutionPar1) = %g\n", fTimeResolutionPar1) ;
128 printf("\t Time Delay (fTimeDelay) = %g\n", fTimeDelay) ;
5fb45456 129 printf("\t Mean Photon-Electron (fMeanPhotonElectron) = %d, Gain Fluc. (fGainFluctuations) %2.1f\n", fMeanPhotonElectron,fGainFluctuations) ;
e42f0a9d 130 printf("\t N channels in EC section ADC (fNADCEC) = %d\n", fNADCEC) ;
131
132 printf("\n");
133
134 printf("=== Parameters in SDigitizer === \n");
135 printf("\t sdigitization parameters A = %f\n", fA);
136 printf("\t B = %f\n", fB);
137 printf("\t Threshold for EC Primary assignment = %f\n", fECPrimThreshold);
33a52e55 138
139}
140