20 std::cout <<
"Instantiate HcalHardCodeGeometryLoader" << std::endl;
61 const float HBRMIN = 181.1;
62 const float HBRMAX = 288.8;
64 float normalDepths[2] = {HBRMIN, HBRMAX};
65 float ring15Depths[3] = {HBRMIN, 258.4, HBRMAX};
66 float ring16Depths[3] = {HBRMIN, 190.4, 232.6};
67 float layerDepths[18] = {HBRMIN, 188.7, 194.7, 200.7, 206.7, 212.7, 218.7,
68 224.7, 230.7, 236.7, 242.7, 249.3, 255.9, 262.5,
69 269.1, 275.7, 282.3, HBRMAX};
70 float slhcDepths[4] = {HBRMIN, 214., 239., HBRMAX};
74 std::vector <HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
75 for(
int iring = 1; iring <= 16; ++iring) {
76 std::vector<float> depths;
79 for (
int i=0;
i<3; ++
i) depths.push_back(ring15Depths[
i]);
80 }
else if (iring == 16) {
81 for (
int i=0;
i<3; ++
i) depths.push_back(ring16Depths[
i]);
83 for (
int i=0;
i<2; ++
i) depths.push_back(normalDepths[
i]);
88 depths.push_back(layerDepths[depth]);
94 if (iring != 16 || depth < 3)
95 depths.push_back(layerDepths[depth]);
99 if (layer <= 17) depths.push_back(HBRMAX);
101 for (
int i=0;
i<4; ++
i) {
102 if (iring != 16 ||
i < 3) {
103 depths.push_back(slhcDepths[
i]);
108 unsigned int ndepth=depths.size()-1;
109 unsigned int startingDepth=1;
110 float etaMin=(iring-1)*0.087;
114 std::cout <<
"HBRing " << iring <<
" eta " << etaMin <<
":" << etaMax <<
" depths " << ndepth <<
":" << startingDepth;
115 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
118 for (
unsigned int idepth = startingDepth; idepth <= ndepth; ++idepth) {
119 float rmin = depths[idepth-1];
120 float rmax = depths[idepth];
122 std::cout <<
"HB " << idepth <<
" R " << rmin <<
":" << rmax <<
"\n";
134 const float HORMIN0 = 390.0;
135 const float HORMIN1 = 412.6;
136 const float HORMAX = 413.6;
157 std::vector <HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
158 result.reserve (nCells);
159 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
170 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
173 for (
int iside = -1; iside <= 1; iside += 2) {
177 float x = param.
rMin*
cos (phiCenter);
178 float y = param.
rMin*
sin (phiCenter);
179 float z = iside * param.
rMin * sinh(etaCenter);
182 std::vector<CCGFloat> cellParams;
183 cellParams.reserve (5);
184 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
186 cellParams.push_back (0.5 * (param.
rMax - param.
rMin) * cosh (etaCenter));
187 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
188 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
190 std::cout <<
"HcalHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/' << hid.
iphi() <<
'/' << hid.
depth() << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
192 fGeometry->
newCellFast(refPoint, refPoint, refPoint,
206 std::vector <HcalHardcodeGeometryLoader::HECellParameters>
result;
207 const float HEZMIN = 400.458;
208 const float HEZMID = 436.168;
209 const float HEZMAX = 549.268;
210 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
211 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
212 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
213 float ring16Depths[2] = {418.768,470.968};
214 float ring16slhcDepths[3] = {418.768, 450., 470.968};
215 float ring17Depths[2] = {409.698,514.468};
216 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
217 float ring18Depths[3] = {391.883,427.468,540.568};
218 float ring18slhcDepths[5] = {391.883, 439., 467., 504. , 540.568};
219 float etaBounds[] = {0.087*15, 0.087*16, 0.087*17, 0.087*18, 0.087*19,
220 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.500,
221 2.650, 2.868, 3.000};
222 float layerDepths[19] = {HEZMIN, 408.718, 416.978, 425.248, 433.508, 441.768,
223 450.038,458.298, 466.558, 474.828, 483.088, 491.348,
224 499.618,507.878, 516.138, 524.398, 532.668, 540.928,
228 for(
int iringm16=0; iringm16 <= 13; ++iringm16) {
229 int iring = iringm16 + 16;
230 std::vector<float> depths;
231 unsigned int startingDepth = 1;
234 {
for (
int i=0;
i<2; ++
i) depths.push_back(ring16Depths[
i]); startingDepth = 3;}
235 else if (iring == 17)
236 for (
int i=0;
i<2; ++
i) depths.push_back(ring17Depths[
i]);
237 else if (iring == 18)
238 for (
int i=0; i<3; ++
i) depths.push_back(ring18Depths[i]);
240 for (
int i=0; i<3; ++
i) depths.push_back(tripleDepths[i]);
242 for (
int i=0; i<4; ++
i) depths.push_back(tripleDepths[i]);
244 for (
int i=0; i<3; ++
i) depths.push_back(normalDepths[i]);
248 if (iring == 16) depths.push_back(ring16Depths[0]);
249 else if (iring == 17) depths.push_back(ring17Depths[0]);
250 else if (iring == 18) depths.push_back(ring18Depths[0]);
251 else depths.push_back(layerDepths[depth]);
253 float lastDepth = depths[0];
258 if (layerDepths[depth] > lastDepth && (iring != 16 || depth > 3)) {
259 depths.push_back(layerDepths[depth]);
260 lastDepth = layerDepths[
depth];
264 if (layer <= 17) depths.push_back(HEZMAX);
265 if (iring == 16) startingDepth = 3;
267 if (iring == 16) {
for (
int i=0;
i<3; ++
i) depths.push_back(ring16slhcDepths[
i]); startingDepth = 3;}
268 else if (iring == 17)
for (
int i=0;
i<5; ++
i) depths.push_back(ring17slhcDepths[
i]);
269 else if (iring == 18)
for (
int i=0; i<5; ++
i) depths.push_back(ring18slhcDepths[i]);
270 else for (
int i=0; i<5; ++
i) depths.push_back(slhcDepths[i]);
273 float etamin = etaBounds[iringm16];
274 float etamax = etaBounds[iringm16+1];
275 unsigned int ndepth = depths.size()-1;
278 std::cout <<
"HERing " << iring <<
" eta " << etamin <<
":" << etamax <<
" depths " << ndepth <<
":" << startingDepth;
279 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
282 for (
unsigned int idepth = 0; idepth < ndepth; ++idepth) {
283 int depthIndex = (
int)(idepth + startingDepth);
284 float zmin = depths[idepth];
285 float zmax = depths[idepth+1];
286 if (depthIndex <= 7) {
288 std::cout <<
"HE Depth " << idepth <<
":" << depthIndex <<
" Z " << zmin <<
":" << zmax <<
"\n";
293 iring == topology.
lastHERing()-1 && idepth == ndepth-1) {
295 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etaBounds[iringm16+2] << std::endl;
300 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etamax << std::endl;
315 const float HEZMIN_H2 = 400.715;
316 const float HEZMID_H2 = 436.285;
317 const float HEZMAX_H2 = 541.885;
344 std::vector <HcalHardcodeGeometryLoader::HECellParameters>
result;
345 result.reserve (nCells);
346 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
353 const float HFZMIN1 = 1115.;
354 const float HFZMIN2 = 1137.;
355 const float HFZMAX = 1280.1;
387 std::vector <HcalHardcodeGeometryLoader::HFCellParameters>
result;
388 result.reserve (nCells);
389 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
396 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
399 for (
int iside = -1; iside <= 1; iside += 2) {
404 float perp = param.
zMin / sinh (etaCenter);
405 float x = perp *
cos (phiCenter);
406 float y = perp *
sin (phiCenter);
407 float z = iside * param.
zMin;
410 std::vector<CCGFloat> cellParams;
411 cellParams.reserve (5);
412 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
414 cellParams.push_back (-0.5 * (param.
zMax - param.
zMin) / tanh (etaCenter));
415 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
416 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
418 std::cout <<
"HcalHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
420 fGeometry->
newCellFast(refPoint, refPoint, refPoint,
433 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
436 for (
int iside = -1; iside <= 1; iside += 2) {
441 float iEta = inner.
eta();
442 float oEta = outer.
eta();
443 float etaCenter = 0.5 * ( iEta + oEta );
445 float perp = param.
zMin / sinh (etaCenter);
446 float x = perp *
cos (phiCenter);
447 float y = perp *
sin (phiCenter);
448 float z = iside * param.
zMin;
451 std::vector<CCGFloat> cellParams;
452 cellParams.reserve (5);
453 cellParams.push_back (0.5 * ( iEta - oEta ));
455 cellParams.push_back (0.5 * (param.
zMax - param.
zMin));
456 cellParams.push_back ( fabs( refPoint.
eta()));
457 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
459 std::cout <<
"HcalHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
461 fGeometry->
newCellFast(refPoint, refPoint, refPoint,
void fillHBHO(HcalGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
unsigned int getHFSize() const
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
std::vector< HFCellParameters > makeHFCells()
CaloTopology const * topology(0)
std::vector< HBHOCellParameters > makeHOCells()
Sin< T >::type sin(const T &t)
void fillHF(HcalGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
void allocatePar(ParVec::size_type n, unsigned int m)
HcalTopologyMode::Mode mode() const
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
int depth() const
get the tower depth
CaloCellGeometry::CCGFloat CCGFloat
int firstHETripleDepthRing() const
Cos< T >::type cos(const T &t)
int ieta() const
get the cell ieta
CaloSubdetectorGeometry * load(const HcalTopology &fTopology)
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
int firstHEDoublePhiRing() const
int iphi() const
get the cell iphi
std::vector< HECellParameters > makeHECells(const HcalTopology &topology)
CaloCellGeometry::CornersMgr * cornersMgr()
std::vector< std::vector< int > > m_segmentation
void increaseReserve(unsigned int extra)
virtual unsigned int numberOfShapes() const
T perp() const
Magnitude of transverse component.
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
std::vector< HBHOCellParameters > makeHBCells(const HcalTopology &topology)
void fillHE(HcalGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
HcalHardcodeGeometryLoader(const edm::ParameterSet &)
std::vector< HECellParameters > makeHECells_H2()