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) {
79 for (
float ring15Depth : ring15Depths) depths.emplace_back(ring15Depth);
80 }
else if (iring == 16) {
81 for (
float ring16Depth : ring16Depths) depths.emplace_back(ring16Depth);
83 for (
float normalDepth : normalDepths) depths.emplace_back(normalDepth);
88 depths.emplace_back(layerDepths[depth]);
94 if (iring != 16 || depth < 3)
95 depths.emplace_back(layerDepths[depth]);
99 if (layer <= 17) depths.emplace_back(HBRMAX);
101 for (
int i=0;
i<4; ++
i) {
102 if (iring != 16 ||
i < 3) {
103 depths.emplace_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.emplace_back (cells[
i]);
170 for (
const auto & param : fCells) {
171 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
172 for (
int iside = -1; iside <= 1; iside += 2) {
175 float etaCenter = 0.5*(param.etaMin + param.etaMax);
176 float x = param.rMin*
cos (phiCenter);
177 float y = param.rMin*
sin (phiCenter);
178 float z = iside * param.rMin * sinh(etaCenter);
181 std::vector<CCGFloat> cellParams;
182 cellParams.reserve (5);
183 cellParams.emplace_back (0.5 * (param.etaMax - param.etaMin));
184 cellParams.emplace_back (0.5 * param.dphi *
DEGREE2RAD);
185 cellParams.emplace_back (0.5 * (param.rMax - param.rMin) * cosh (etaCenter));
186 cellParams.emplace_back ( fabs( refPoint.
eta() ) ) ;
187 cellParams.emplace_back ( fabs( refPoint.
z() ) ) ;
189 std::cout <<
"HcalHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/' << hid.
iphi() <<
'/' << hid.
depth() << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
191 fGeometry->
newCellFast(refPoint, refPoint, refPoint,
205 std::vector <HcalHardcodeGeometryLoader::HECellParameters>
result;
206 const float HEZMIN = 400.458;
207 const float HEZMID = 436.168;
208 const float HEZMAX = 549.268;
209 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
210 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
211 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
212 float ring16Depths[2] = {418.768,470.968};
213 float ring16slhcDepths[3] = {418.768, 450., 470.968};
214 float ring17Depths[2] = {409.698,514.468};
215 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
216 float ring18Depths[3] = {391.883,427.468,540.568};
217 float ring18slhcDepths[5] = {391.883, 439., 467., 504. , 540.568};
218 float etaBounds[] = {0.087*15, 0.087*16, 0.087*17, 0.087*18, 0.087*19,
219 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.500,
220 2.650, 2.868, 3.000};
221 float layerDepths[19] = {HEZMIN, 408.718, 416.978, 425.248, 433.508, 441.768,
222 450.038,458.298, 466.558, 474.828, 483.088, 491.348,
223 499.618,507.878, 516.138, 524.398, 532.668, 540.928,
227 for(
int iringm16=0; iringm16 <= 13; ++iringm16) {
228 int iring = iringm16 + 16;
229 std::vector<float>
depths;
230 unsigned int startingDepth = 1;
233 {
for (
float ring16Depth : ring16Depths) depths.emplace_back(ring16Depth); startingDepth = 3;}
234 else if (iring == 17)
235 for (
float ring17Depth : ring17Depths) depths.emplace_back(ring17Depth);
236 else if (iring == 18)
237 for (
float ring18Depth : ring18Depths) depths.emplace_back(ring18Depth);
239 for (
int i=0;
i<3; ++
i) depths.emplace_back(tripleDepths[
i]);
241 for (
float tripleDepth : tripleDepths) depths.emplace_back(tripleDepth);
243 for (
float normalDepth : normalDepths) depths.emplace_back(normalDepth);
247 if (iring == 16) depths.emplace_back(ring16Depths[0]);
248 else if (iring == 17) depths.emplace_back(ring17Depths[0]);
249 else if (iring == 18) depths.emplace_back(ring18Depths[0]);
250 else depths.emplace_back(layerDepths[depth]);
252 float lastDepth = depths[0];
257 if (layerDepths[depth] > lastDepth && (iring != 16 || depth > 3)) {
258 depths.emplace_back(layerDepths[depth]);
259 lastDepth = layerDepths[
depth];
263 if (layer <= 17) depths.emplace_back(HEZMAX);
264 if (iring == 16) startingDepth = 3;
266 if (iring == 16) {
for (
float ring16slhcDepth : ring16slhcDepths) depths.emplace_back(ring16slhcDepth); startingDepth = 3;}
267 else if (iring == 17)
for (
float ring17slhcDepth : ring17slhcDepths) depths.emplace_back(ring17slhcDepth);
268 else if (iring == 18)
for (
float ring18slhcDepth : ring18slhcDepths) depths.emplace_back(ring18slhcDepth);
269 else for (
float slhcDepth : slhcDepths) depths.emplace_back(slhcDepth);
272 float etamin = etaBounds[iringm16];
273 float etamax = etaBounds[iringm16+1];
274 unsigned int ndepth = depths.size()-1;
277 std::cout <<
"HERing " << iring <<
" eta " << etamin <<
":" << etamax <<
" depths " << ndepth <<
":" << startingDepth;
278 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
281 for (
unsigned int idepth = 0; idepth < ndepth; ++idepth) {
282 int depthIndex = (
int)(idepth + startingDepth);
283 float zmin = depths[idepth];
284 float zmax = depths[idepth+1];
285 if (depthIndex <= 7) {
287 std::cout <<
"HE Depth " << idepth <<
":" << depthIndex <<
" Z " << zmin <<
":" << zmax <<
"\n";
292 iring == topology.
lastHERing()-1 && idepth == ndepth-1) {
294 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etaBounds[iringm16+2] << std::endl;
299 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etamax << std::endl;
314 const float HEZMIN_H2 = 400.715;
315 const float HEZMID_H2 = 436.285;
316 const float HEZMAX_H2 = 541.885;
343 std::vector <HcalHardcodeGeometryLoader::HECellParameters>
result;
344 result.reserve (nCells);
345 for (
int i = 0;
i < nCells; ++
i) result.emplace_back (cells[
i]);
352 const float HFZMIN1 = 1115.;
353 const float HFZMIN2 = 1137.;
354 const float HFZMAX = 1280.1;
386 std::vector <HcalHardcodeGeometryLoader::HFCellParameters>
result;
387 result.reserve (nCells);
388 for (
int i = 0;
i < nCells; ++
i) result.emplace_back (cells[
i]);
395 for (
const auto & param : fCells) {
396 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
397 for (
int iside = -1; iside <= 1; iside += 2) {
400 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
402 float perp = param.zMin / sinh (etaCenter);
403 float x = perp *
cos (phiCenter);
404 float y = perp *
sin (phiCenter);
405 float z = iside * param.zMin;
408 std::vector<CCGFloat> cellParams;
409 cellParams.reserve (5);
410 cellParams.emplace_back (0.5 * (param.etaMax - param.etaMin));
411 cellParams.emplace_back (0.5 * param.dphi *
DEGREE2RAD);
412 cellParams.emplace_back (-0.5 * (param.zMax - param.zMin) / tanh (etaCenter));
413 cellParams.emplace_back ( fabs( refPoint.
eta() ) ) ;
414 cellParams.emplace_back ( fabs( refPoint.
z() ) ) ;
416 std::cout <<
"HcalHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
418 fGeometry->
newCellFast(refPoint, refPoint, refPoint,
431 for (
const auto & param : fCells) {
432 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
433 for (
int iside = -1; iside <= 1; iside += 2) {
438 float iEta = inner.
eta();
439 float oEta = outer.
eta();
440 float etaCenter = 0.5 * ( iEta + oEta );
442 float perp = param.zMin / sinh (etaCenter);
443 float x = perp *
cos (phiCenter);
444 float y = perp *
sin (phiCenter);
445 float z = iside * param.zMin;
448 std::vector<CCGFloat> cellParams;
449 cellParams.reserve (5);
450 cellParams.emplace_back (0.5 * ( iEta - oEta ));
451 cellParams.emplace_back (0.5 * param.dphi *
DEGREE2RAD);
452 cellParams.emplace_back (0.5 * (param.zMax - param.zMin));
453 cellParams.emplace_back ( fabs( refPoint.
eta()));
454 cellParams.emplace_back ( fabs( refPoint.
z() ) ) ;
456 std::cout <<
"HcalHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
458 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)
unsigned int numberOfShapes() const override
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
int firstHETripleDepthRing() const
Cos< T >::type cos(const T &t)
int ieta() const
get the cell ieta
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry * load(const HcalTopology &fTopology)
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
int firstHEDoublePhiRing() const
HcalHardcodeGeometryLoader()
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)
T perp() const
Magnitude of transverse component.
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
std::vector< HBHOCellParameters > makeHBCells(const HcalTopology &topology)
void fillHE(HcalGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
std::vector< HECellParameters > makeHECells_H2()