]>
Commit | Line | Data |
---|---|---|
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 | ||
30 | ClassImp(AliEMCALSimParam) | |
31 | ||
32 | AliEMCALSimParam * AliEMCALSimParam::fgSimParam = 0 ; | |
33 | //----------------------------------------------------------------------------- | |
34 | AliEMCALSimParam::AliEMCALSimParam() : | |
35 | TNamed(), | |
36 | fDigitThreshold(0), | |
37 | fMeanPhotonElectron(0), | |
5fb45456 | 38 | fGainFluctuations(0), |
33a52e55 | 39 | fPinNoise(0), |
df5cea6b | 40 | fTimeNoise(0), |
f0a6dc6f | 41 | fTimeDelay(0), |
a2f8e711 | 42 | fTimeResolutionPar0(0), |
43 | fTimeResolutionPar1(0), | |
33a52e55 | 44 | fNADCEC(0),//Digitizer |
45 | fA(0.), | |
46 | fB(0.), | |
47 | fECPrimThreshold(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 | //----------------------------------------------------------------------------- | |
72 | AliEMCALSimParam::AliEMCALSimParam(const AliEMCALSimParam& ): | |
73 | TNamed(), | |
74 | fDigitThreshold(0), | |
75 | fMeanPhotonElectron(0), | |
5fb45456 | 76 | fGainFluctuations(0), |
33a52e55 | 77 | fPinNoise(0), |
df5cea6b | 78 | fTimeNoise(0), |
f0a6dc6f | 79 | fTimeDelay(0), |
a2f8e711 | 80 | fTimeResolutionPar0(0), |
81 | fTimeResolutionPar1(0), | |
33a52e55 | 82 | fNADCEC(0), |
83 | fA(0.), | |
84 | fB(0.), | |
85 | fECPrimThreshold(0.)//SDigitizer | |
86 | { | |
87 | //Copy constructor. | |
88 | AliError("Should not use copy constructor for singleton") ; | |
89 | ||
90 | fgSimParam = this ; | |
91 | ||
92 | } | |
93 | ||
94 | //----------------------------------------------------------------------------- | |
95 | AliEMCALSimParam * AliEMCALSimParam::GetInstance(){ | |
96 | // Get Instance | |
97 | ||
e42f0a9d | 98 | if(!fgSimParam){ |
99 | fgSimParam = new AliEMCALSimParam() ; | |
100 | } | |
101 | ||
102 | return fgSimParam ; | |
33a52e55 | 103 | |
104 | } | |
105 | ||
106 | //----------------------------------------------------------------------------- | |
107 | AliEMCALSimParam& 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 | //----------------------------------------------------------------------------- | |
119 | void 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 |