19 std::cout <<
"Instantiate HcalHardCodeGeometryLoader" << std::endl;
58 const float HBRMIN = 181.1;
59 const float HBRMAX = 288.8;
61 float normalDepths[2] = {HBRMIN, HBRMAX};
62 float ring15Depths[3] = {HBRMIN, 258.4, HBRMAX};
63 float ring16Depths[3] = {HBRMIN, 190.4, 232.6};
64 float layerDepths[18] = {HBRMIN, 188.7, 194.7, 200.7, 206.7, 212.7, 218.7,
65 224.7, 230.7, 236.7, 242.7, 249.3, 255.9, 262.5,
66 269.1, 275.7, 282.3, HBRMAX};
67 float slhcDepths[4] = {HBRMIN, 214., 239., HBRMAX};
71 std::vector <HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
72 for(
int iring = 1; iring <= 16; ++iring) {
73 std::vector<float> depths;
76 for (
int i=0;
i<3; ++
i) depths.push_back(ring15Depths[
i]);
77 }
else if (iring == 16) {
78 for (
int i=0;
i<3; ++
i) depths.push_back(ring16Depths[
i]);
80 for (
int i=0;
i<2; ++
i) depths.push_back(normalDepths[
i]);
85 depths.push_back(layerDepths[depth]);
91 if (iring != 16 || depth < 3)
92 depths.push_back(layerDepths[depth]);
96 if (layer <= 17) depths.push_back(HBRMAX);
98 for (
int i=0;
i<4; ++
i) {
99 if (iring != 16 ||
i < 3) {
100 depths.push_back(slhcDepths[
i]);
105 unsigned int ndepth=depths.size()-1;
106 unsigned int startingDepth=1;
107 float etaMin=(iring-1)*0.087;
111 std::cout <<
"HBRing " << iring <<
" eta " << etaMin <<
":" << etaMax <<
" depths " << ndepth <<
":" << startingDepth;
112 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
115 for (
unsigned int idepth = startingDepth; idepth <= ndepth; ++idepth) {
116 float rmin = depths[idepth-1];
117 float rmax = depths[idepth];
119 std::cout <<
"HB " << idepth <<
" R " << rmin <<
":" << rmax <<
"\n";
131 const float HORMIN0 = 390.0;
132 const float HORMIN1 = 412.6;
133 const float HORMAX = 413.6;
154 std::vector <HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
155 result.reserve (nCells);
156 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
166 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
169 for (
int iside = -1; iside <= 1; iside += 2) {
173 float x = param.
rMin*
cos (phiCenter);
174 float y = param.
rMin*
sin (phiCenter);
175 float z = iside * param.
rMin * sinh(etaCenter);
178 std::vector<CCGFloat> cellParams;
179 cellParams.reserve (5);
180 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
182 cellParams.push_back (0.5 * (param.
rMax - param.
rMin) * cosh (etaCenter));
183 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
184 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
186 std::cout <<
"HcalHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/' << hid.
iphi() <<
'/' << hid.
depth() << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
188 fGeometry->
newCell(refPoint, refPoint, refPoint,
202 std::vector <HcalHardcodeGeometryLoader::HECellParameters>
result;
203 const float HEZMIN = 400.458;
204 const float HEZMID = 436.168;
205 const float HEZMAX = 549.268;
206 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
207 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
208 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
209 float ring16Depths[2] = {418.768,470.968};
210 float ring16slhcDepths[3] = {418.768, 450., 470.968};
211 float ring17Depths[2] = {409.698,514.468};
212 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
213 float ring18Depths[3] = {391.883,427.468,540.568};
214 float ring18slhcDepths[5] = {391.883, 439., 467., 504. , 540.568};
215 float etaBounds[] = {0.087*15, 0.087*16, 0.087*17, 0.087*18, 0.087*19,
216 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.500,
217 2.650, 2.868, 3.000};
218 float layerDepths[19] = {HEZMIN, 408.718, 416.978, 425.248, 433.508, 441.768,
219 450.038,458.298, 466.558, 474.828, 483.088, 491.348,
220 499.618,507.878, 516.138, 524.398, 532.668, 540.928,
224 for(
int iringm16=0; iringm16 <= 13; ++iringm16) {
225 int iring = iringm16 + 16;
226 std::vector<float> depths;
227 unsigned int startingDepth = 1;
230 {
for (
int i=0;
i<2; ++
i) depths.push_back(ring16Depths[
i]); startingDepth = 3;}
231 else if (iring == 17)
232 for (
int i=0;
i<2; ++
i) depths.push_back(ring17Depths[
i]);
233 else if (iring == 18)
234 for (
int i=0; i<3; ++
i) depths.push_back(ring18Depths[i]);
236 for (
int i=0; i<3; ++
i) depths.push_back(tripleDepths[i]);
238 for (
int i=0; i<4; ++
i) depths.push_back(tripleDepths[i]);
240 for (
int i=0; i<3; ++
i) depths.push_back(normalDepths[i]);
244 if (iring == 16) depths.push_back(ring16Depths[0]);
245 else if (iring == 17) depths.push_back(ring17Depths[0]);
246 else if (iring == 18) depths.push_back(ring18Depths[0]);
247 else depths.push_back(layerDepths[depth]);
249 float lastDepth = depths[0];
254 if (layerDepths[depth] > lastDepth && (iring != 16 || depth > 3)) {
255 depths.push_back(layerDepths[depth]);
256 lastDepth = layerDepths[
depth];
260 if (layer <= 17) depths.push_back(HEZMAX);
261 if (iring == 16) startingDepth = 3;
263 if (iring == 16) {
for (
int i=0;
i<3; ++
i) depths.push_back(ring16slhcDepths[
i]); startingDepth = 3;}
264 else if (iring == 17)
for (
int i=0;
i<5; ++
i) depths.push_back(ring17slhcDepths[
i]);
265 else if (iring == 18)
for (
int i=0; i<5; ++
i) depths.push_back(ring18slhcDepths[i]);
266 else for (
int i=0; i<5; ++
i) depths.push_back(slhcDepths[i]);
269 float etamin = etaBounds[iringm16];
270 float etamax = etaBounds[iringm16+1];
271 unsigned int ndepth = depths.size()-1;
274 std::cout <<
"HERing " << iring <<
" eta " << etamin <<
":" << etamax <<
" depths " << ndepth <<
":" << startingDepth;
275 for (
unsigned int i=0;
i<depths.size(); ++
i)
std::cout <<
":" << depths[
i];
278 for (
unsigned int idepth = 0; idepth < ndepth; ++idepth) {
279 int depthIndex = (
int)(idepth + startingDepth);
280 float zmin = depths[idepth];
281 float zmax = depths[idepth+1];
282 if (depthIndex <= 7) {
284 std::cout <<
"HE Depth " << idepth <<
":" << depthIndex <<
" Z " << zmin <<
":" << zmax <<
"\n";
289 iring == topology.
lastHERing()-1 && idepth == ndepth-1) {
291 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etaBounds[iringm16+2] << std::endl;
296 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":" << etamax << std::endl;
311 const float HEZMIN_H2 = 400.715;
312 const float HEZMID_H2 = 436.285;
313 const float HEZMAX_H2 = 541.885;
340 std::vector <HcalHardcodeGeometryLoader::HECellParameters>
result;
341 result.reserve (nCells);
342 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
349 const float HFZMIN1 = 1115.;
350 const float HFZMIN2 = 1137.;
351 const float HFZMAX = 1280.1;
383 std::vector <HcalHardcodeGeometryLoader::HFCellParameters>
result;
384 result.reserve (nCells);
385 for (
int i = 0;
i < nCells; ++
i) result.push_back (cells[
i]);
391 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
394 for (
int iside = -1; iside <= 1; iside += 2) {
399 float perp = param.
zMin / sinh (etaCenter);
400 float x = perp *
cos (phiCenter);
401 float y = perp *
sin (phiCenter);
402 float z = iside * param.
zMin;
405 std::vector<CCGFloat> cellParams;
406 cellParams.reserve (5);
407 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
409 cellParams.push_back (-0.5 * (param.
zMax - param.
zMin) / tanh (etaCenter));
410 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
411 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
413 std::cout <<
"HcalHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
415 fGeometry->
newCell(refPoint, refPoint, refPoint,
427 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
430 for (
int iside = -1; iside <= 1; iside += 2) {
435 float iEta = inner.
eta();
436 float oEta = outer.
eta();
437 float etaCenter = 0.5 * ( iEta + oEta );
439 float perp = param.
zMin / sinh (etaCenter);
440 float x = perp *
cos (phiCenter);
441 float y = perp *
sin (phiCenter);
442 float z = iside * param.
zMin;
445 std::vector<CCGFloat> cellParams;
446 cellParams.reserve (5);
447 cellParams.push_back (0.5 * ( iEta - oEta ));
449 cellParams.push_back (0.5 * (param.
zMax - param.
zMin));
450 cellParams.push_back ( fabs( refPoint.
eta()));
451 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
453 std::cout <<
"HcalHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/' << cellParams [0] <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
455 fGeometry->
newCell(refPoint, refPoint, refPoint,
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()
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)
void fillHBHO(CaloSubdetectorGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
void fillHE(CaloSubdetectorGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
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
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
T perp() const
Magnitude of transverse component.
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
std::vector< HBHOCellParameters > makeHBCells(const HcalTopology &topology)
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
HcalHardcodeGeometryLoader(const edm::ParameterSet &)
std::vector< HECellParameters > makeHECells_H2()
void fillHF(CaloSubdetectorGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)