]>
Commit | Line | Data |
---|---|---|
f898e0f3 | 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 | // Base class for the PHOS simulation parameters. | |
17 | // Do not use in the simulation; use derivative classes instead. | |
18 | // Author: Dmitri Peressounko, RRC KI | |
19 | ||
20 | // --- AliRoot header files --- | |
21 | #include "AliPHOSSimParam.h" | |
22 | #include "AliLog.h" | |
23 | ||
24 | ClassImp(AliPHOSSimParam) | |
25 | ||
26 | AliPHOSSimParam * AliPHOSSimParam::fgSimParam = 0 ; | |
27 | //----------------------------------------------------------------------------- | |
28 | AliPHOSSimParam::AliPHOSSimParam() : | |
29 | TNamed(), | |
30 | fLightYieldMean(0.),fIntrinsicAPDEfficiency(0.), | |
31 | fLightFactor(0.),fAPDFactor(0.), | |
32 | fAPDNoise(0.),fEMCDigitThreshold(0.), | |
33 | fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.), | |
34 | fADCpedestalCpv(0.),fADCchanelCpv(0.), | |
35 | fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0), | |
36 | fDigitizeE(0) | |
37 | { | |
38 | //Default constructor. | |
39 | for(Int_t i=0; i<10; i++) fDStream[i] = 0 ; | |
40 | } | |
41 | ||
42 | //----------------------------------------------------------------------------- | |
43 | AliPHOSSimParam::AliPHOSSimParam(Int_t) : | |
44 | TNamed(), | |
45 | fLightYieldMean(0.),fIntrinsicAPDEfficiency(0.), | |
46 | fLightFactor(0.),fAPDFactor(0.), | |
47 | fAPDNoise(0.),fEMCDigitThreshold(0.), | |
48 | fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.), | |
49 | fADCpedestalCpv(0.),fADCchanelCpv(0.), | |
50 | fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0), | |
51 | fDigitizeE(0) | |
52 | { | |
53 | //Real (private) constructor | |
54 | //Set default parameters | |
55 | ||
56 | //Parameters describing energy deposition and light collection by APD, used in AliPHOSv1 | |
57 | //Photoelectron statistics: | |
58 | // The light yield is a poissonian distribution of the number of | |
59 | // photons created in the PbWo4 crystal, calculated using following formula | |
60 | // NumberOfPhotons = EnergyLost * LightYieldMean* APDEfficiency | |
61 | // LightYieldMean is parameter calculated to be over 47000 photons per GeV | |
62 | // APDEfficiency is 0.02655 | |
63 | // k_0 is 0.0045 from Valery Antonenko | |
64 | // The number of electrons created in the APD is | |
65 | // NumberOfElectrons = APDGain * LightYield | |
66 | // The APD Gain is 300 | |
67 | fLightYieldMean = 47000; //Average number of photoelectrons per GeV | |
68 | fIntrinsicAPDEfficiency = 0.02655 ; //APD efficiency including geometric coverage | |
69 | // fLightYieldAttenuation = 0.0045 ; //light attenuation in PWO. Last analysis shows no z-position dependence | |
70 | // //so we removed this dependence from simulations | |
71 | fLightFactor = fLightYieldMean * fIntrinsicAPDEfficiency ; //Average number of photons collected by | |
72 | //APD per GeV deposited energy | |
73 | fAPDFactor = (13.418/fLightYieldMean/100.) * 300. ; //factor relating light yield and APD response | |
74 | //evaluated as (13.418/fLightYieldMean/100) * APDGain ; | |
75 | ||
76 | ||
77 | //Parameters defining electronic noise calculation and Digits noise thresholds | |
78 | //used in AliPHOSDigitizer | |
79 | fAPDNoise = 0.004 ; // [GeV] | |
80 | fEMCDigitThreshold = 0.012 ; // [GeV] | |
81 | fEMCADCchannel = 0.005 ; // [GeV] | |
82 | fTOFa = 0.5e-9 ; // [sec] constant term | |
83 | fTOFb = 1.e-9 ; // [sec/sqrt(GeV)]] stohastic term | |
84 | ||
85 | fADCpedestalCpv = 0.012 ; // [aux units] | |
86 | fADCchanelCpv = 0.0012; // [aux units] | |
87 | fCPVNoise = 0.01; // [aux units] | |
88 | fCPVDigitThreshold = 0.09 ; // [aux units] | |
89 | fNADCcpv = (Int_t)TMath::Power(2,12) ; | |
90 | ||
91 | //Imput streams for merging. If true => this stream contains digits (and thus noise) and not SDigits. | |
92 | for(Int_t i=0; i<10; i++){ | |
93 | fDStream[i] = 0 ; | |
94 | } | |
95 | fgSimParam = this ; | |
96 | } | |
97 | ||
98 | //----------------------------------------------------------------------------- | |
99 | AliPHOSSimParam::AliPHOSSimParam(const AliPHOSSimParam& ): | |
100 | TNamed(), | |
101 | fLightYieldMean(0.),fIntrinsicAPDEfficiency(0.), | |
102 | fLightFactor(0.),fAPDFactor(0.), | |
103 | fAPDNoise(0.),fEMCDigitThreshold(0.), | |
104 | fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.), | |
105 | fADCpedestalCpv(0.),fADCchanelCpv(0.), | |
106 | fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0), | |
107 | fDigitizeE(0) | |
108 | { | |
109 | //Copy constructor. | |
110 | AliError("Should not use copy constructor for singleton") ; | |
111 | for(Int_t i=0; i<10; i++){ | |
112 | fDStream[i] = 0 ; | |
113 | } | |
114 | fgSimParam = this ; | |
115 | } | |
116 | //----------------------------------------------------------------------------- | |
117 | AliPHOSSimParam * AliPHOSSimParam::GetInstance(){ | |
118 | ||
119 | if(!fgSimParam) | |
120 | new AliPHOSSimParam(0) ; | |
121 | return fgSimParam ; | |
122 | } | |
123 | //----------------------------------------------------------------------------- | |
124 | AliPHOSSimParam& AliPHOSSimParam::operator = (const AliPHOSSimParam& simParam) | |
125 | { | |
126 | //Assignment operator. | |
127 | ||
128 | if(this != &simParam) { | |
129 | AliError("Should not use operator= for singleton\n") ; | |
130 | } | |
131 | ||
132 | return *this; | |
133 | } | |
134 |