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