Change digitization threshold to >=3 ACD units, now cut on ADC value of digit after...
[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),
38fPinNoise(0),
39fTimeResolution(0),
40//fTimeThreshold(0),
41//fTimeSignalLength(0),
42fNADCEC(0),//Digitizer
43fA(0.),
44fB(0.),
45fECPrimThreshold(0.) //SDigitizer
46{
47 //Constructor
48
49 //Parameters in Digitizer
50 fMeanPhotonElectron = 4400; // electrons per GeV
51 fPinNoise = 0.012; // pin noise in GeV from analysis test beam data
4354827d 52 fDigitThreshold = 3; // 3 ADC counts not anymore cut in energy: //fPinNoise * 3; // 3 * sigma
33a52e55 53 fTimeResolution = 0.6e-9 ; // 600 psc
54 //fTimeSignalLength = 1.0e-9 ;
55 fNADCEC = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC - 65536
56 //fTimeThreshold = 0.001*10000000 ; // Means 1 MeV in terms of SDigits amplitude ??
57
58 //SDigitizer
59 fA = 0;
60 fB = 1.e+6; // Dynamic range now 2 TeV
61 fECPrimThreshold = 0.05; // GeV // threshold for deposit energy of hit
62
63}
64
65
66//-----------------------------------------------------------------------------
67AliEMCALSimParam::AliEMCALSimParam(const AliEMCALSimParam& ):
68TNamed(),
69fDigitThreshold(0),
70fMeanPhotonElectron(0),
71fPinNoise(0),
72fTimeResolution(0),
73//fTimeThreshold(0),
74//fTimeSignalLength(0),//Digitizer
75fNADCEC(0),
76fA(0.),
77fB(0.),
78fECPrimThreshold(0.)//SDigitizer
79{
80 //Copy constructor.
81 AliError("Should not use copy constructor for singleton") ;
82
83 fgSimParam = this ;
84
85}
86
87//-----------------------------------------------------------------------------
88AliEMCALSimParam * AliEMCALSimParam::GetInstance(){
89// Get Instance
90
91 if(!fgSimParam){
92 fgSimParam = new AliEMCALSimParam() ;
93 }
94
95 return fgSimParam ;
96
97}
98
99//-----------------------------------------------------------------------------
100AliEMCALSimParam& AliEMCALSimParam::operator = (const AliEMCALSimParam& simParam)
101{
102 //Assignment operator.
103
104 if(this != &simParam) {
105 AliError("Should not use operator= for singleton\n") ;
106 }
107
108 return *this;
109}
110
111//-----------------------------------------------------------------------------
112void AliEMCALSimParam::Print(Option_t *) const
113{
114 // Print simulation parameters to stdout
115
116 printf("=== Parameters in Digitizer === \n");
117 printf("\t Electronics noise in EMC (fPinNoise) = %f\n", fPinNoise) ;
4354827d 118 printf("\t Threshold in EMC (fDigitThreshold) = %d\n", fDigitThreshold) ;
33a52e55 119 printf("\t Time Resolution (fTimeResolution) = %g\n", fTimeResolution) ;
4354827d 120 printf("\t Mean Photon-Electron (fMeanPhotonElectron) = %d\n", fMeanPhotonElectron) ;
33a52e55 121 printf("\t N channels in EC section ADC (fNADCEC) = %d\n", fNADCEC) ;
122
123 printf("\n");
124
125 printf("=== Parameters in SDigitizer === \n");
126 printf("\t sdigitization parameters A = %f\n", fA);
127 printf("\t B = %f\n", fB);
128 printf("\t Threshold for EC Primary assignment = %f\n", fECPrimThreshold);
129
130}
131