001
002
003
004
005
006
007 #include "CaloUtils/PseudoH1WeightToolCSC11.h"
008 #include "CaloEvent/CaloCell.h"
009 #include "CaloEvent/CaloSampling.h"
010
011 #include "CLHEP/Units/SystemOfUnits.h"
012 #include "GaudiKernel/Service.h"
013 #include "GaudiKernel/MsgStream.h"
014
015 #include <math.h>
016 #include <string>
017
018
019
020
021
022 PseudoH1WeightToolCSC11::PseudoH1WeightToolCSC11(const std::string& name,
023 const std::string& type,
024 const IInterface* parent)
025 : AlgTool(name,type,parent)
026 {
027 declareInterface<IHadronicCalibrationTool>(this);
028 }
029
030 PseudoH1WeightToolCSC11::~PseudoH1WeightToolCSC11()
031 { }
032
033
034 double PseudoH1WeightToolCSC11::etCell(const CaloCell* thisCell, double weight)
035 {
036
037 double etcell = weight * thisCell->et() * wtCell(thisCell);
038 return etcell;
039
040 }
041
042
043 double PseudoH1WeightToolCSC11::wtCell(const CaloCell* thisCell)
044 {
045 static const double wtEMB0[2] = {1.884047, 0.827115};
046 static const double wtEME0[2] = {0.992908, 1.045776};
047
048 static const double wtEMB1[16] = { 2.990942, 2.990942, 2.164312, 1.773775, 1.548397, 1.402421, 1.300461, 1.225343, 1.167758, 1.122235,
049 1.085355, 1.054873, 1.029257, 1.007426, 0.988596, 0.972184 };
050
051 static const double wtEMB2[16] = { 2.465592, 2.465592, 1.881758, 1.594131, 1.423277, 1.310205, 1.229888, 1.169910, 1.123421, 1.086329, 1.056047, 1.030855, 1.009567, 0.991337, 0.975551, 0.961744 };
052
053 static const double wtEME1[16] = { 3.012807, 3.012807, 2.139186, 1.742671, 1.520182, 1.379120, 1.282252, 1.211876, 1.158556, 1.116827, 1.083313, 1.055823, 1.032877, 1.013438, 0.996761, 0.982297 };
054
055 static const double wtEME2[16] = { 3.884981, 3.884981, 2.665687, 2.094130, 1.766082, 1.554483, 1.407168, 1.298924, 1.216130, 1.150802, 1.097962, 1.054352, 1.017748, 0.986586, 0.959733, 0.936350 };
056
057 static const double wtTile1[16] = { 1.436854, 1.373254, 1.348860, 1.335710, 1.327442, 1.321763, 1.317630, 1.314498, 1.312052, 1.310098, 1.308509, 1.307197, 1.306103,1.305180, 1.304397, 1.303728 };
058
059 static const double wtTile2[16] = { 1.689199, 1.525829, 1.462485, 1.428163, 1.406536, 1.391668, 1.380855, 1.372672, 1.366297, 1.361221, 1.357108, 1.353731, 1.350927,1.348580, 1.346602, 1.344925 };
060
061 static const double wtHec1[16] = { 2.111414, 1.686256, 1.525245, 1.438976, 1.384914, 1.347828, 1.320839, 1.300366, 1.284351, 1.271522, 1.261054, 1.252382, 1.245109, 1.238948, 1.233683, 1.229152 };
062
063 static const double wtHec2[16] = { 1.907849, 1.625031, 1.509779, 1.446235, 1.406145, 1.378863, 1.359401, 1.345084, 1.334340, 1.326182, 1.319954, 1.315205, 1.311611, 1.308938, 1.307007, 1.305683 };
064
065 static const double wtFCal1[16] = { 1.372870, 1.369255, 1.364385, 1.358260, 1.350881, 1.342246, 1.332357, 1.321213, 1.308815, 1.295162, 1.280254, 1.264091, 1.246674,1.228002, 1.208075, 1.186893 };
066
067 static const double wtFCal2[16] = { 2.389511, 2.347667, 2.295952, 2.234367, 2.162911, 2.081585, 1.990388, 1.889321, 1.778383, 1.657574, 1.526895, 1.386346, 1.235925,1.075635, 0.905473, 0.725441 };
068
069
070
071 static const double wtGap = 1.171186;
072
073 static const double mm3 = millimeter*millimeter*millimeter;
074 static const double log2 = 0.69314718056;
075 static const int dim = 16;
076
077
078
079 double ecell = thisCell->energy();
080 double etaa = fabs( thisCell->eta() );
081 double vol = thisCell->caloDDE()->volume();
082 const CaloSampling::CaloSample s = CaloSampling::getSampling( *thisCell );
083
084 int iET=0;
085 if( fabs(ecell) > 0 && vol > 0 ) {
086 iET=static_cast<int>(log(fabs(ecell/GeV)/fabs(vol/mm3))/log2+26);
087 if(iET<0) iET=0;
088 if(iET >= dim) iET = dim-1;
089 } else {
090 iET=-1;
091 }
092
093 double wt = 0;
094
095 switch ( s ) {
096
097
098 case CaloSampling::PreSamplerB:
099 wt = wtEMB0[0];
100 break;
101
102 case CaloSampling::PreSamplerE:
103 wt = wtEME0[0];
104 break;
105
106
107
108 case CaloSampling::EMB1:
109 wt = wtEMB0[1];
110 break;
111
112 case CaloSampling::EME1:
113 wt = wtEME0[1];
114 break;
115
116
117
118 case CaloSampling::EMB2:
119 case CaloSampling::EMB3:
120 if(iET >= 0 && etaa < 0.8) wt = wtEMB1[iET];
121 if(iET >= 0 && etaa >= 0.8) wt = wtEMB2[iET];
122 break;
123
124
125 case CaloSampling::EME2:
126 case CaloSampling::EME3:
127 if(iET >= 0 && etaa < 2.5) wt = wtEME1[iET];
128 if(iET >= 0 && etaa >= 2.5) wt = wtEME2[iET];
129 break;
130
131
132 case CaloSampling::TileBar0:
133 case CaloSampling::TileBar1:
134 case CaloSampling::TileBar2:
135 if(iET >= 0) wt = wtTile1[iET];
136 break;
137
138 case CaloSampling::TileExt0:
139 case CaloSampling::TileExt1:
140 case CaloSampling::TileExt2:
141 if(iET >= 0) wt = wtTile2[iET];
142 break;
143
144 case CaloSampling::HEC0:
145 case CaloSampling::HEC1:
146 case CaloSampling::HEC2:
147 case CaloSampling::HEC3:
148 if(iET>=0 && etaa<2.5) wt = wtHec1[iET];
149 if(iET>=0 && etaa>=2.5) wt = wtHec2[iET];
150 break;
151
152
153 case CaloSampling::FCAL0:
154 if(iET >= 0) wt = wtFCal1[iET];
155 break;
156
157 case CaloSampling::FCAL1:
158 case CaloSampling::FCAL2:
159 if(iET >= 0) wt = wtFCal2[iET];
160 break;
161
162
163 case CaloSampling::TileGap1:
164 case CaloSampling::TileGap2:
165 case CaloSampling::TileGap3:
166 wt = wtGap;
167 break;
168
169 case CaloSampling::Unknown:
170 break;
171
172 }
173
174 return wt;
175
176 }
177
178
179
180
181
182
183
184 double PseudoH1WeightToolCSC11::etCryo(double etAccb3, double etTile1)
185 {
186
187 if( etAccb3*etTile1 > 0 ) {
188 return wtCryo() * sqrt( etAccb3*etTile1 );
189 } else {
190 return 0;
191 }
192
193 }
194
195
196 double PseudoH1WeightToolCSC11::wtCryo()
197 {
198
199 static const double wtCryoVal = 1.170853;
200 return wtCryoVal;
201
202 }
Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
This page was automatically generated by the
LXR engine.
|
|