1 /**************************************************************************
2 * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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
20 // --- AliRoot header files ---
21 #include "AliPHOSSimParam.h"
24 ClassImp(AliPHOSSimParam)
26 AliPHOSSimParam * AliPHOSSimParam::fgSimParam = 0 ;
27 //-----------------------------------------------------------------------------
28 AliPHOSSimParam::AliPHOSSimParam() :
30 fLightYieldMean(0.),fIntrinsicAPDEfficiency(0.),
31 fLightFactor(0.),fAPDFactor(0.),
32 fAPDNoise(0.),fEMCDigitThreshold(0.),
33 fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.),
34 fFastDecalibration(0.),
35 fADCpedestalCpv(0.),fADCchanelCpv(0.),
36 fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0),
39 //Default constructor.
40 for(Int_t i=0; i<10; i++) fDStream[i] = 0 ;
43 //-----------------------------------------------------------------------------
44 AliPHOSSimParam::AliPHOSSimParam(Int_t) :
46 fLightYieldMean(0.),fIntrinsicAPDEfficiency(0.),
47 fLightFactor(0.),fAPDFactor(0.),
48 fAPDNoise(0.),fEMCDigitThreshold(0.),
49 fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.),
50 fFastDecalibration(0.),
51 fADCpedestalCpv(0.),fADCchanelCpv(0.),
52 fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0),
55 //Real (private) constructor
56 //Set default parameters
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 ;
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
87 fFastDecalibration = 0. ; //Relative decalibration. By default there is no decalibration
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) ;
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++){
102 //-----------------------------------------------------------------------------
103 AliPHOSSimParam::AliPHOSSimParam(const AliPHOSSimParam& ):
105 fLightYieldMean(0.),fIntrinsicAPDEfficiency(0.),
106 fLightFactor(0.),fAPDFactor(0.),
107 fAPDNoise(0.),fEMCDigitThreshold(0.),
108 fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.),
109 fFastDecalibration(0.),
110 fADCpedestalCpv(0.),fADCchanelCpv(0.),
111 fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0),
115 AliError("Should not use copy constructor for singleton") ;
116 for(Int_t i=0; i<10; i++){
121 //-----------------------------------------------------------------------------
122 AliPHOSSimParam * AliPHOSSimParam::GetInstance(){
125 new AliPHOSSimParam(0) ;
128 //-----------------------------------------------------------------------------
129 AliPHOSSimParam& AliPHOSSimParam::operator = (const AliPHOSSimParam& simParam)
131 //Assignment operator.
133 if(this != &simParam) {
134 AliError("Should not use operator= for singleton\n") ;