]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALSimParam.cxx
more realistic time resolution as a function of energy (fit and parameters from Franc...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSimParam.cxx
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),
38 fPinNoise(0),
39 fTimeDelay(0),
40 fTimeResolutionPar0(0),
41 fTimeResolutionPar1(0),
42 fNADCEC(0),//Digitizer
43 fA(0.),
44 fB(0.),
45 fECPrimThreshold(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 
52         fDigitThreshold     = 3; // 3 ADC counts not anymore cut in energy: //fPinNoise * 3; // 3 * sigma
53         fTimeResolutionPar0 = 0.26666; // From F. Blanco: 0.51639^2
54         fTimeResolutionPar1 = 1.45861; // From F. Blanco: 1.20773^2
55         fTimeDelay          = 600e-9 ; // 600 ns
56
57         fNADCEC             = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC - 65536
58         
59         //SDigitizer
60         fA                  = 0;
61         fB                  = 1.e+6; // Dynamic range now 2 TeV
62         fECPrimThreshold    = 0.05;  // GeV     // threshold for deposit energy of hit
63         
64 }
65
66
67 //-----------------------------------------------------------------------------
68 AliEMCALSimParam::AliEMCALSimParam(const AliEMCALSimParam& ):
69 TNamed(),
70 fDigitThreshold(0),
71 fMeanPhotonElectron(0),
72 fPinNoise(0),
73 fTimeDelay(0),
74 fTimeResolutionPar0(0),
75 fTimeResolutionPar1(0),
76 fNADCEC(0),
77 fA(0.),
78 fB(0.),
79 fECPrimThreshold(0.)//SDigitizer
80 {
81   //Copy constructor.
82   AliError("Should not use copy constructor for singleton") ;
83
84   fgSimParam = this ;
85         
86 }
87
88 //-----------------------------------------------------------------------------                                                            
89 AliEMCALSimParam * AliEMCALSimParam::GetInstance(){
90 // Get Instance
91
92         if(!fgSimParam){
93                 fgSimParam = new AliEMCALSimParam() ;
94         }
95         
96         return fgSimParam ;
97         
98 }
99
100 //-----------------------------------------------------------------------------
101 AliEMCALSimParam& AliEMCALSimParam::operator = (const AliEMCALSimParam& simParam)
102 {
103   //Assignment operator.
104
105   if(this != &simParam) {
106     AliError("Should not use operator= for singleton\n") ;
107   }
108
109   return *this;
110 }
111
112 //-----------------------------------------------------------------------------
113 void AliEMCALSimParam::Print(Option_t *) const
114 {
115         // Print simulation parameters to stdout
116         
117         printf("=== Parameters in Digitizer === \n");
118         printf("\t Electronics noise in EMC (fPinNoise)       = %f\n", fPinNoise) ;
119         printf("\t Threshold  in EMC  (fDigitThreshold)       = %d\n", fDigitThreshold)  ;
120         printf("\t Time Resolution (fTimeResolutionPar0)          = %g\n", fTimeResolutionPar0) ;
121         printf("\t Time Resolution (fTimeResolutionPar1)          = %g\n", fTimeResolutionPar1) ;
122         printf("\t Time Delay (fTimeDelay)                    = %g\n", fTimeDelay) ;
123         printf("\t Mean Photon-Electron (fMeanPhotonElectron) = %d\n", fMeanPhotonElectron)  ;
124         printf("\t N channels in EC section ADC (fNADCEC)     = %d\n", fNADCEC) ;
125
126         printf("\n");
127         
128         printf("=== Parameters in SDigitizer === \n");
129         printf("\t sdigitization parameters       A = %f\n",     fA);
130         printf("\t                                B = %f\n",     fB);
131         printf("\t Threshold for EC Primary assignment  = %f\n", fECPrimThreshold);
132         
133 }
134