24 for (
int i=0;
i<29;
i++) {
26 snprintf(name,10,
"Eta%d",
i+1);
66 const float HBRMIN = 181.1;
67 const float HBRMAX = 288.8;
69 float normalDepths[2] = {HBRMIN, HBRMAX};
70 float ring15Depths[3] = {HBRMIN, 258.4, HBRMAX};
71 float ring16Depths[3] = {HBRMIN, 190.4, 232.6};
72 float layerDepths[18] = {HBRMIN, 188.7, 194.7, 200.7, 206.7, 212.7, 218.7,
73 224.7, 230.7, 236.7, 242.7, 249.3, 255.9, 262.5,
74 269.1, 275.7, 282.3, HBRMAX};
75 float slhcDepths[4] = {HBRMIN, 214., 239., HBRMAX};
79 std::vector <HcalFlexiHardcodeGeometryLoader::HBHOCellParameters>
result;
80 for(
int iring = 1; iring <= 16; ++iring) {
81 std::vector<float> depths;
84 for (
int i=0;
i<3; ++
i) depths.push_back(ring15Depths[
i]);
85 }
else if (iring == 16) {
86 for (
int i=0;
i<3; ++
i) depths.push_back(ring16Depths[
i]);
88 for (
int i=0;
i<2; ++
i) depths.push_back(normalDepths[
i]);
93 depths.push_back(layerDepths[depth]);
99 if (iring != 16 || depth < 3)
100 depths.push_back(layerDepths[depth]);
104 if (layer <= 17) depths.push_back(HBRMAX);
106 for (
int i=0;
i<4; ++
i) {
107 if (iring != 16 ||
i < 3) {
108 depths.push_back(slhcDepths[
i]);
113 unsigned int ndepth=depths.size()-1;
114 unsigned int startingDepth=1;
115 float etaMin=(iring-1)*0.087;
119 std::cout <<
"HBRing " << iring <<
" eta " << etaMin <<
":" << etaMax <<
" depths " << ndepth <<
":" << startingDepth;
120 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
123 for (
unsigned int idepth = startingDepth; idepth <= ndepth; ++idepth) {
124 float rmin = depths[idepth-1];
125 float rmax = depths[idepth];
127 std::cout <<
"HB " << idepth <<
" R " << rmin <<
":" << rmax <<
"\n";
139 const float HORMIN0 = 390.0;
140 const float HORMIN1 = 412.6;
141 const float HORMAX = 413.6;
162 std::vector <HcalFlexiHardcodeGeometryLoader::HBHOCellParameters>
result;
163 result.reserve (nCells);
164 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
174 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
177 for (
int iside = -1; iside <= 1; iside += 2) {
181 float x = param.
rMin*
cos (phiCenter);
182 float y = param.
rMin*
sin (phiCenter);
183 float z = iside * param.
rMin * sinh(etaCenter);
186 std::vector<CCGFloat> cellParams;
187 cellParams.reserve (5);
188 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
190 cellParams.push_back (0.5 * (param.
rMax - param.
rMin) * cosh (etaCenter));
191 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
192 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
194 std::cout <<
"HcalFlexiHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/' << hid.
iphi() <<
'/' << hid.
depth() << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
196 fGeometry->
newCell(refPoint, refPoint, refPoint,
210 std::vector <HcalFlexiHardcodeGeometryLoader::HECellParameters>
result;
211 const float HEZMIN = 400.458;
212 const float HEZMID = 436.168;
213 const float HEZMAX = 549.268;
214 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
215 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
216 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
217 float ring16Depths[2] = {418.768,470.968};
218 float ring16slhcDepths[3] = {418.768, 450., 470.968};
219 float ring17Depths[2] = {409.698,514.468};
220 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
221 float ring18Depths[3] = {391.883,427.468,540.568};
222 float ring18slhcDepths[5] = {391.883, 439., 467., 504. , 540.568};
223 float etaBounds[] = {0.087*15, 0.087*16, 0.087*17, 0.087*18, 0.087*19,
224 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.500,
225 2.650, 2.868, 3.000};
226 float layerDepths[19] = {HEZMIN, 408.718, 416.978, 425.248, 433.508, 441.768,
227 450.038,458.298, 466.558, 474.828, 483.088, 491.348,
228 499.618,507.878, 516.138, 524.398, 532.668, 540.928,
232 for(
int iringm16=0; iringm16 <= 13; ++iringm16) {
233 int iring = iringm16 + 16;
234 std::vector<float> depths;
235 unsigned int startingDepth = 1;
238 {
for (
int i=0;
i<2; ++
i) depths.push_back(ring16Depths[
i]); startingDepth = 3;}
239 else if (iring == 17)
240 for (
int i=0;
i<2; ++
i) depths.push_back(ring17Depths[
i]);
241 else if (iring == 18)
242 for (
int i=0; i<3; ++
i) depths.push_back(ring18Depths[i]);
244 for (
int i=0; i<3; ++
i) depths.push_back(tripleDepths[i]);
246 for (
int i=0; i<4; ++
i) depths.push_back(tripleDepths[i]);
248 for (
int i=0; i<3; ++
i) depths.push_back(normalDepths[i]);
252 if (iring == 16) depths.push_back(ring16Depths[0]);
253 else if (iring == 17) depths.push_back(ring17Depths[0]);
254 else if (iring == 18) depths.push_back(ring18Depths[0]);
255 else depths.push_back(layerDepths[depth]);
257 float lastDepth = depths[0];
262 if (layerDepths[depth] > lastDepth && (iring != 16 || depth > 3)) {
263 depths.push_back(layerDepths[depth]);
264 lastDepth = layerDepths[
depth];
268 if (layer <= 17) depths.push_back(HEZMAX);
269 if (iring == 16) startingDepth = 3;
271 if (iring == 16) {
for (
int i=0;
i<3; ++
i) depths.push_back(ring16slhcDepths[
i]); startingDepth = 3;}
272 else if (iring == 17)
for (
int i=0;
i<5; ++
i) depths.push_back(ring17slhcDepths[
i]);
273 else if (iring == 18)
for (
int i=0; i<5; ++
i) depths.push_back(ring18slhcDepths[i]);
274 else for (
int i=0; i<5; ++
i) depths.push_back(slhcDepths[i]);
277 float etamin = etaBounds[iringm16];
278 float etamax = etaBounds[iringm16+1];
279 unsigned int ndepth = depths.size()-1;
282 std::cout <<
"HERing " << iring <<
" eta " << etamin <<
":" << etamax <<
" depths " << ndepth <<
":" << startingDepth;
283 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
286 for (
unsigned int idepth = 0; idepth < ndepth; ++idepth) {
287 int depthIndex = (int)(idepth + startingDepth);
288 float zmin = depths[idepth];
289 float zmax = depths[idepth+1];
290 if (depthIndex <= 7) {
292 std::cout <<
"HE Depth " << idepth <<
":" << depthIndex <<
" Z " << zmin <<
":" << zmax <<
"\n";
297 iring == topology.
lastHERing()-1 && idepth == ndepth-1) {
299 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etaBounds[iringm16+2] << std::endl;
304 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etamax << std::endl;
319 const float HEZMIN_H2 = 400.715;
320 const float HEZMID_H2 = 436.285;
321 const float HEZMAX_H2 = 541.885;
348 std::vector <HcalFlexiHardcodeGeometryLoader::HECellParameters>
result;
349 result.reserve (nCells);
350 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
357 const float HFZMIN1 = 1115.;
358 const float HFZMIN2 = 1137.;
359 const float HFZMAX = 1280.1;
391 std::vector <HcalFlexiHardcodeGeometryLoader::HFCellParameters>
result;
392 result.reserve (nCells);
393 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
399 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
402 for (
int iside = -1; iside <= 1; iside += 2) {
407 float perp = param.
zMin / sinh (etaCenter);
408 float x = perp *
cos (phiCenter);
409 float y = perp *
sin (phiCenter);
410 float z = iside * param.
zMin;
413 std::vector<CCGFloat> cellParams;
414 cellParams.reserve (5);
415 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
417 cellParams.push_back (-0.5 * (param.
zMax - param.
zMin) / tanh (etaCenter));
418 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
419 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
421 std::cout <<
"HcalFlexiHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
423 fGeometry->
newCell(refPoint, refPoint, refPoint,
435 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
438 for (
int iside = -1; iside <= 1; iside += 2) {
443 float iEta = inner.
eta();
444 float oEta = outer.
eta();
445 float etaCenter = 0.5 * ( iEta + oEta );
447 float perp = param.
zMin / sinh (etaCenter);
448 float x = perp *
cos (phiCenter);
449 float y = perp *
sin (phiCenter);
450 float z = iside * param.
zMin;
453 std::vector<CCGFloat> cellParams;
454 cellParams.reserve (5);
455 cellParams.push_back (0.5 * ( iEta - oEta ));
457 cellParams.push_back (0.5 * (param.
zMax - param.
zMin));
458 cellParams.push_back ( fabs( refPoint.
eta()));
459 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
461 std::cout <<
"HcalFlexiHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
463 fGeometry->
newCell(refPoint, refPoint, refPoint,
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
CaloTopology const * topology(0)
std::vector< std::vector< int > > m_segmentation
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
Sin< T >::type sin(const T &t)
std::vector< HFCellParameters > makeHFCells()
void fillHBHO(CaloSubdetectorGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
std::vector< HECellParameters > makeHECells_H2()
HcalFlexiHardcodeGeometryLoader(const edm::ParameterSet &)
void allocatePar(ParVec::size_type n, unsigned int m)
HcalTopologyMode::Mode mode() const
int depth() const
get the tower depth
virtual unsigned int numberOfShapes() const
std::vector< HBHOCellParameters > makeHOCells()
std::vector< HBHOCellParameters > makeHBCells(const HcalTopology &topology)
int firstHETripleDepthRing() const
Cos< T >::type cos(const T &t)
int ieta() const
get the cell ieta
CaloSubdetectorGeometry * load(const HcalTopology &fTopology)
CaloCellGeometry::CCGFloat CCGFloat
void fillHE(CaloSubdetectorGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
int firstHEDoublePhiRing() const
int iphi() const
get the cell iphi
void fillHF(CaloSubdetectorGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
std::vector< HECellParameters > makeHECells(const HcalTopology &topology)
CaloCellGeometry::CornersMgr * cornersMgr()
T perp() const
Magnitude of transverse component.
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)