test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HcalFlexiHardcodeGeometryLoader Class Reference

#include <HcalFlexiHardcodeGeometryLoader.h>

Classes

struct  HBHOCellParameters
 
struct  HECellParameters
 
struct  HFCellParameters
 

Public Member Functions

 HcalFlexiHardcodeGeometryLoader (const edm::ParameterSet &)
 
CaloSubdetectorGeometryload (const HcalTopology &fTopology, const HcalDDDRecConstants &hcons)
 

Private Member Functions

void fillHBHO (CaloSubdetectorGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
 
void fillHE (CaloSubdetectorGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
 
void fillHF (CaloSubdetectorGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
 
std::vector< HBHOCellParametersmakeHBCells (const HcalDDDRecConstants &hcons)
 
std::vector< HECellParametersmakeHECells (const HcalDDDRecConstants &hcons)
 
std::vector< HECellParametersmakeHECells_H2 ()
 
std::vector< HFCellParametersmakeHFCells ()
 
std::vector< HBHOCellParametersmakeHOCells ()
 

Private Attributes

double DEGREE2RAD
 
int MAX_HCAL_PHI
 

Detailed Description

Author
F.Ratnikov, UMd

Definition at line 17 of file HcalFlexiHardcodeGeometryLoader.h.

Constructor & Destructor Documentation

HcalFlexiHardcodeGeometryLoader::HcalFlexiHardcodeGeometryLoader ( const edm::ParameterSet )

Definition at line 16 of file HcalFlexiHardcodeGeometryLoader.cc.

References DEGREE2RAD, M_PI, and MAX_HCAL_PHI.

Member Function Documentation

void HcalFlexiHardcodeGeometryLoader::fillHBHO ( CaloSubdetectorGeometry fGeometry,
const std::vector< HBHOCellParameters > &  fCells,
bool  fHB 
)
private

Definition at line 111 of file HcalFlexiHardcodeGeometryLoader.cc.

References funct::cos(), gather_cfg::cout, TauDecayModes::dec, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::depth, HcalDetId::depth(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::dphi, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::eta, PV3DBase< T, PVType, FrameType >::eta(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::etaMax, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::etaMin, CaloCellGeometry::getParmPtr(), HcalBarrel, HcalOuter, HcalDetId::ieta(), HcalDetId::iphi(), CaloSubdetectorGeometry::newCell(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::nPhi, CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::phiFirst, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::phiStart, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::phiStep, DetId::rawId(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::rMax, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::rMin, funct::sin(), x, y, z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by load().

111  {
112 
113  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
114  const HcalFlexiHardcodeGeometryLoader::HBHOCellParameters& param = fCells[iCell];
115  for (int iPhi = param.phiFirst; iPhi <= param.nPhi; iPhi += param.phiStep) {
116  for (int iside = -1; iside <= 1; iside += 2) { // both detector sides are identical
117  HcalDetId hid (fHB ? HcalBarrel : HcalOuter, param.eta*iside, iPhi, param.depth);
118  float phiCenter = param.phiStart+(iPhi-0.5)*param.dphi; // middle of the cell
119  float etaCenter = 0.5*(param.etaMin + param.etaMax);
120  float x = param.rMin* cos (phiCenter);
121  float y = param.rMin* sin (phiCenter);
122  float z = iside * param.rMin * sinh(etaCenter);
123  // make cell geometry
124  GlobalPoint refPoint (x,y,z); // center of the cell's face
125  std::vector<CCGFloat> cellParams;
126  cellParams.reserve (5);
127  cellParams.push_back (0.5 * (param.etaMax - param.etaMin)); // deta_half
128  cellParams.push_back (0.5 * param.dphi); // dphi_half
129  cellParams.push_back (0.5 * (param.rMax - param.rMin) * cosh (etaCenter)); // dr_half
130  cellParams.push_back ( fabs( refPoint.eta() ) ) ;
131  cellParams.push_back ( fabs( refPoint.z() ) ) ;
132 #ifdef DebugLog
133  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHBHO-> " << hid << " " << hid.rawId() << " " << std::hex << hid.rawId() << std::dec << " " << hid.ieta() << '/' << hid.iphi() << '/' << hid.depth() << refPoint << '/' << cellParams [0] << '/' << cellParams [1] << '/' << cellParams [2] << std::endl;
134 #endif
135  fGeometry->newCell(refPoint, refPoint, refPoint,
136  CaloCellGeometry::getParmPtr(cellParams,
137  fGeometry->parMgr(),
138  fGeometry->parVecVec()),
139  hid ) ;
140  }
141  }
142  }
143 }
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)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
tuple cout
Definition: gather_cfg.py:121
void HcalFlexiHardcodeGeometryLoader::fillHE ( CaloSubdetectorGeometry fGeometry,
const std::vector< HECellParameters > &  fCells 
)
private

Definition at line 292 of file HcalFlexiHardcodeGeometryLoader.cc.

References funct::cos(), gather_cfg::cout, TauDecayModes::dec, HcalFlexiHardcodeGeometryLoader::HECellParameters::depth, HcalDetId::depth(), HcalFlexiHardcodeGeometryLoader::HECellParameters::dphi, HcalFlexiHardcodeGeometryLoader::HECellParameters::eta, PV3DBase< T, PVType, FrameType >::eta(), HcalFlexiHardcodeGeometryLoader::HECellParameters::etaMax, HcalFlexiHardcodeGeometryLoader::HECellParameters::etaMin, CaloCellGeometry::getParmPtr(), HcalEndcap, HcalDetId::ieta(), HcalDetId::iphi(), JetComb::kPhi, CaloSubdetectorGeometry::newCell(), HcalFlexiHardcodeGeometryLoader::HECellParameters::nPhi, CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), perp(), HcalFlexiHardcodeGeometryLoader::HECellParameters::phiFirst, HcalFlexiHardcodeGeometryLoader::HECellParameters::phiStart, HcalFlexiHardcodeGeometryLoader::HECellParameters::phiStep, DetId::rawId(), funct::sin(), x, y, z, PV3DBase< T, PVType, FrameType >::z(), HcalFlexiHardcodeGeometryLoader::HECellParameters::zMax, and HcalFlexiHardcodeGeometryLoader::HECellParameters::zMin.

Referenced by load().

292  {
293 
294  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
295  const HcalFlexiHardcodeGeometryLoader::HECellParameters& param = fCells[iCell];
296  int kPhi(param.phiFirst);
297  for (int iPhi = param.phiFirst; iPhi <= param.nPhi; iPhi += param.phiStep, ++kPhi) {
298  for (int iside = -1; iside <= 1; iside += 2) { // both detector sides are identical
299  HcalDetId hid (HcalEndcap, param.eta*iside, iPhi, param.depth);
300  float phiCenter = param.phiStart + (kPhi-0.5)*param.dphi; // middle of the cell
301  float etaCenter = 0.5 * (param.etaMin + param.etaMax);
302 
303  float perp = param.zMin / sinh (etaCenter);
304  float x = perp * cos (phiCenter);
305  float y = perp * sin (phiCenter);
306  float z = iside * param.zMin;
307  // make cell geometry
308  GlobalPoint refPoint (x,y,z); // center of the cell's face
309  std::vector<CCGFloat> cellParams;
310  cellParams.reserve (5);
311  cellParams.push_back (0.5 * (param.etaMax - param.etaMin)); //deta_half
312  cellParams.push_back (0.5 * param.dphi); // dphi_half
313  cellParams.push_back (-0.5 * (param.zMax - param.zMin) / tanh (etaCenter)); // dz_half, "-" means edges in Z
314  cellParams.push_back ( fabs( refPoint.eta() ) ) ;
315  cellParams.push_back ( fabs( refPoint.z() ) ) ;
316 #ifdef DebugLog
317  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHE-> " << hid << " " << hid.rawId() << " " << std::hex << hid.rawId() << std::dec << " " << hid.ieta() << '/' << hid.iphi() << '/' << hid.depth() << refPoint << '/' << cellParams [0] << '/' << cellParams [1] << '/' << cellParams [2] << std::endl;
318 #endif
319  fGeometry->newCell(refPoint, refPoint, refPoint,
320  CaloCellGeometry::getParmPtr(cellParams,
321  fGeometry->parMgr(),
322  fGeometry->parVecVec()),
323  hid ) ;
324  }
325  }
326  }
327 }
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)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
T perp() const
Magnitude of transverse component.
tuple cout
Definition: gather_cfg.py:121
void HcalFlexiHardcodeGeometryLoader::fillHF ( CaloSubdetectorGeometry fGeometry,
const std::vector< HFCellParameters > &  fCells 
)
private

Definition at line 329 of file HcalFlexiHardcodeGeometryLoader.cc.

References funct::cos(), gather_cfg::cout, TauDecayModes::dec, DEGREE2RAD, HcalDetId::depth(), HcalFlexiHardcodeGeometryLoader::HFCellParameters::depth, HcalFlexiHardcodeGeometryLoader::HFCellParameters::dphi, HcalFlexiHardcodeGeometryLoader::HFCellParameters::eta, PV3DBase< T, PVType, FrameType >::eta(), CaloCellGeometry::getParmPtr(), HcalForward, HcalDetId::ieta(), SurfaceOrientation::inner, HcalDetId::iphi(), MAX_HCAL_PHI, CaloSubdetectorGeometry::newCell(), SurfaceOrientation::outer, CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), perp(), HcalFlexiHardcodeGeometryLoader::HFCellParameters::phiFirst, HcalFlexiHardcodeGeometryLoader::HFCellParameters::phiStep, DetId::rawId(), HcalFlexiHardcodeGeometryLoader::HFCellParameters::rMax, HcalFlexiHardcodeGeometryLoader::HFCellParameters::rMin, funct::sin(), x, y, z, PV3DBase< T, PVType, FrameType >::z(), HcalFlexiHardcodeGeometryLoader::HFCellParameters::zMax, and HcalFlexiHardcodeGeometryLoader::HFCellParameters::zMin.

Referenced by load().

329  {
330 
331  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
332  const HcalFlexiHardcodeGeometryLoader::HFCellParameters& param = fCells[iCell];
333 // int kPhi(0);
334  for (int iPhi = param.phiFirst; iPhi <= MAX_HCAL_PHI; iPhi += param.phiStep) {
335  for (int iside = -1; iside <= 1; iside += 2) { // both detector sides are identical
336  HcalDetId hid (HcalForward, param.eta*iside, iPhi, param.depth);
337  // middle of the cell
338 // float phiCenter = ((kPhi + 0.5) * param.dphi) * DEGREE2RAD;
339  float phiCenter = ((iPhi-1)*360./MAX_HCAL_PHI + 0.5*param.dphi) * DEGREE2RAD;
340  GlobalPoint inner (param.rMin, 0, param.zMin);
341  GlobalPoint outer (param.rMax, 0, param.zMin);
342  float iEta = inner.eta();
343  float oEta = outer.eta();
344  float etaCenter = 0.5 * ( iEta + oEta );
345 
346  float perp = param.zMin / sinh (etaCenter);
347  float x = perp * cos (phiCenter);
348  float y = perp * sin (phiCenter);
349  float z = iside * param.zMin;
350  // make cell geometry
351  GlobalPoint refPoint (x,y,z); // center of the cell's face
352  std::vector<CCGFloat> cellParams;
353  cellParams.reserve (5);
354  cellParams.push_back (0.5 * ( iEta - oEta )); // deta_half
355  cellParams.push_back (0.5 * param.dphi * DEGREE2RAD); // dphi_half
356  cellParams.push_back (0.5 * (param.zMax - param.zMin)); // dz_half
357  cellParams.push_back ( fabs( refPoint.eta()));
358  cellParams.push_back ( fabs( refPoint.z() ) ) ;
359 #ifdef DebugLog
360  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHF-> " << hid << " " << hid.rawId() << " " << std::hex << hid.rawId() << std::dec << " " << hid.ieta() << '/' << hid.iphi() << '/' << hid.depth() << refPoint << '/' << cellParams [0] << '/' << cellParams [1] << '/' << cellParams [2] << std::endl;
361 #endif
362  fGeometry->newCell(refPoint, refPoint, refPoint,
363  CaloCellGeometry::getParmPtr(cellParams,
364  fGeometry->parMgr(),
365  fGeometry->parVecVec()),
366  hid ) ;
367  }
368  }
369  }
370 }
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)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
T perp() const
Magnitude of transverse component.
tuple cout
Definition: gather_cfg.py:121
CaloSubdetectorGeometry * HcalFlexiHardcodeGeometryLoader::load ( const HcalTopology fTopology,
const HcalDDDRecConstants hcons 
)

Definition at line 22 of file HcalFlexiHardcodeGeometryLoader.cc.

References CaloSubdetectorGeometry::allocateCorners(), CaloSubdetectorGeometry::allocatePar(), CaloSubdetectorGeometry::cornersMgr(), fillHBHO(), fillHE(), fillHF(), HcalTopologyMode::H2, HcalGeometry::k_NumberOfParametersPerShape, makeHBCells(), makeHECells(), makeHECells_H2(), makeHFCells(), makeHOCells(), HcalTopology::mode(), HcalTopology::ncells(), CaloSubdetectorGeometry::numberOfShapes(), and CaloSubdetectorGeometry::parMgr().

Referenced by HcalHardcodeGeometryEP::produceIdeal().

22  {
23  CaloSubdetectorGeometry* hcalGeometry = new HcalGeometry (fTopology);
24  if( 0 == hcalGeometry->cornersMgr() ) hcalGeometry->allocateCorners ( fTopology.ncells() );
25  if( 0 == hcalGeometry->parMgr() ) hcalGeometry->allocatePar (hcalGeometry->numberOfShapes(),
27  if (fTopology.mode() == HcalTopologyMode::H2) { // TB geometry
28  fillHBHO (hcalGeometry, makeHBCells(hcons), true);
29  fillHBHO (hcalGeometry, makeHOCells(), false);
30  fillHE (hcalGeometry, makeHECells_H2());
31  } else { // regular geometry
32  fillHBHO (hcalGeometry, makeHBCells(hcons), true);
33  fillHBHO (hcalGeometry, makeHOCells(), false);
34  fillHF (hcalGeometry, makeHFCells());
35  fillHE (hcalGeometry, makeHECells(hcons));
36  }
37  return hcalGeometry;
38 }
std::vector< HFCellParameters > makeHFCells()
void fillHBHO(CaloSubdetectorGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
std::vector< HECellParameters > makeHECells_H2()
void allocatePar(ParVec::size_type n, unsigned int m)
std::vector< HBHOCellParameters > makeHBCells(const HcalDDDRecConstants &hcons)
HcalTopologyMode::Mode mode() const
Definition: HcalTopology.h:32
virtual unsigned int numberOfShapes() const
std::vector< HBHOCellParameters > makeHOCells()
void fillHE(CaloSubdetectorGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
std::vector< HECellParameters > makeHECells(const HcalDDDRecConstants &hcons)
void fillHF(CaloSubdetectorGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
CaloCellGeometry::CornersMgr * cornersMgr()
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
std::vector< HcalFlexiHardcodeGeometryLoader::HBHOCellParameters > HcalFlexiHardcodeGeometryLoader::makeHBCells ( const HcalDDDRecConstants hcons)
private

Definition at line 42 of file HcalFlexiHardcodeGeometryLoader.cc.

References gather_cfg::cout, HLT_25ns14e33_v1_cff::depth, HLT_25ns14e33_v1_cff::etaMax, HLT_25ns14e33_v1_cff::etaMin, plotBeamSpotDB::first, HcalDDDRecConstants::getConstHBHE(), HcalDDDRecConstants::getEtaBins(), i, relval_steps::k, query::result, and edm::second().

Referenced by load().

42  {
43 
44  std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters> result;
45  std::vector<std::pair<double,double> > gconsHB = hcons.getConstHBHE(0);
46  std::vector<double> layerDepths;
47  layerDepths.push_back(gconsHB[0].first-gconsHB[0].second);
48  for (int i=0; i<17; ++i)
49  layerDepths.push_back(gconsHB[i].first+gconsHB[i].second);
50  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.getEtaBins(0);
51 
52 #ifdef DebugLog
53  std::cout << "FlexiGeometryLoader called for " << etabins.size()
54  << " Eta Bins" << std::endl;
55  for (unsigned int k=0; k<gconsHB.size(); ++k) {
56  std::cout << "gconsHB[" << k << "] = " << gconsHB[k].first << ":"
57  << gconsHB[k].second << " LayerDepth[" << k << "] = "
58  << layerDepths[k] << std::endl;
59  }
60 #endif
61  for (unsigned int i=0; i<etabins.size(); ++i) {
62  int iring = etabins[i].ieta;
63  int nphi = etabins[i].nPhi;
64  int depth = etabins[i].depthStart;
65  for (unsigned int k=0; k<etabins[i].layer.size(); ++k) {
66  double rmin = layerDepths[etabins[i].layer[k].first-1];
67  double rmax = layerDepths[etabins[i].layer[k].second];
68 #ifdef DebugLog
69  std::cout << "HBRing " << iring << " eta " << etabins[i].etaMin << ":"
70  << etabins[i].etaMax << " depth " << depth << " R " << rmin
71  << ":" << rmax << " Phi 1:" << nphi << ":" << etabins[i].phi0
72  << ":" << etabins[i].dphi << " layer[" << k << "]: "
73  << etabins[i].layer[k].first-1 << ":"
74  << etabins[i].layer[k].second << std::endl;
75 #endif
76  result.push_back (HcalFlexiHardcodeGeometryLoader::HBHOCellParameters(iring, depth, 1, nphi, 1, etabins[i].phi0, etabins[i].dphi, rmin, rmax, etabins[i].etaMin, etabins[i].etaMax));
77  depth++;
78  }
79  }
80  return result;
81 }
int i
Definition: DBlmapReader.cc:9
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
tuple result
Definition: query.py:137
tuple cout
Definition: gather_cfg.py:121
std::vector< HcalEtaBin > getEtaBins(const int itype) const
std::vector< HcalFlexiHardcodeGeometryLoader::HECellParameters > HcalFlexiHardcodeGeometryLoader::makeHECells ( const HcalDDDRecConstants hcons)
private

Definition at line 147 of file HcalFlexiHardcodeGeometryLoader.cc.

References gather_cfg::cout, HLT_25ns14e33_v1_cff::depth, HLT_25ns14e33_v1_cff::etaMax, HLT_25ns14e33_v1_cff::etaMin, plotBeamSpotDB::first, HcalDDDRecConstants::getConstHBHE(), HcalDDDRecConstants::getEtaBins(), i, relval_steps::k, relval_steps::k2, M_PI, query::result, edm::second(), units(), SiStripMonitorClusterAlca_cfi::zmax, and SiStripMonitorClusterAlca_cfi::zmin.

Referenced by load().

147  {
148 
149  std::vector<HcalFlexiHardcodeGeometryLoader::HECellParameters> result;
150  std::vector<std::pair<double,double> > gconsHE = hcons.getConstHBHE(1);
151  std::vector<double> layerDepths;
152 #ifdef DebugLog
153  std::cout << "HcalFlexiHardcodeGeometryLoader:HE with " << gconsHE.size() << " cells" << std::endl;
154 #endif
155  if (gconsHE.size() > 0) {
156  unsigned int istart = 1;
157  layerDepths.push_back(gconsHE[istart].first-gconsHE[istart].second);
158  for (unsigned int i=istart; i<gconsHE.size(); ++i)
159  layerDepths.push_back(gconsHE[i].first+gconsHE[i].second);
160  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.getEtaBins(1);
161 
162 #ifdef DebugLog
163  std::cout << "FlexiGeometryLoader called for HE with " << etabins.size()
164  << " Eta Bins and " << layerDepths.size() << " depths"
165  << std::endl;
166  for (unsigned int i=0; i<layerDepths.size(); ++i)
167  std::cout << " Depth[" << i << "] = " << layerDepths[i];
168  std::cout << std::endl;
169 #endif
170  for (unsigned int i=0; i<etabins.size(); ++i) {
171  int iring = etabins[i].ieta;
172  int nphi = etabins[i].nPhi;
173  int depth = etabins[i].depthStart;
174  double dphi = etabins[i].dphi;
175  int units = int(((dphi*72)/(2*M_PI))+0.5);
176  int fioff = (units == 4) ? 3 : 1;
177  nphi *= units;
178  for (unsigned int k=0; k<etabins[i].layer.size(); ++k) {
179  int layf = etabins[i].layer[k].first-1;
180  int layl = etabins[i].layer[k].second-1;
181  double zmin = layerDepths[layf];
182  double zmax = layerDepths[layl];
183  if (zmin < 1.0) {
184  for (int k2=layf; k2<=layl; ++k2) {
185  if (layerDepths[k2] > 10) {
186  zmin = layerDepths[k2];
187  break;
188  }
189  }
190  }
191  if (zmin >= zmax) zmax = zmin+10.;
192 #ifdef DebugLog
193  std::cout << "HERing " << iring << " eta " << etabins[i].etaMin << ":"
194  << etabins[i].etaMax << " depth " << depth << " Z " << zmin
195  << ":" << zmax << " Phi 1:" << nphi << ":" << etabins[i].phi0
196  << ":" << dphi << ":" << units << ":" << fioff << " layer["
197  << k << "]: " << etabins[i].layer[k].first-1 << ":"
198  << etabins[i].layer[k].second-1 << std::endl;
199 #endif
200  result.push_back(HcalFlexiHardcodeGeometryLoader::HECellParameters(iring, depth, fioff, nphi, units, etabins[i].phi0, dphi, zmin, zmax, etabins[i].etaMin, etabins[i].etaMax));
201  depth++;
202  }
203  }
204  }
205  return result;
206 }
int i
Definition: DBlmapReader.cc:9
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
tuple result
Definition: query.py:137
#define M_PI
TString units(TString variable, Char_t axis)
tuple cout
Definition: gather_cfg.py:121
std::vector< HcalEtaBin > getEtaBins(const int itype) const
std::vector< HcalFlexiHardcodeGeometryLoader::HECellParameters > HcalFlexiHardcodeGeometryLoader::makeHECells_H2 ( )
private

Definition at line 210 of file HcalFlexiHardcodeGeometryLoader.cc.

References DEGREE2RAD, i, and query::result.

Referenced by load().

210  {
211 
212  const double HEZMIN_H2 = 400.715;
213  const double HEZMID_H2 = 436.285;
214  const double HEZMAX_H2 = 541.885;
215  const double dphi1 = 5*DEGREE2RAD;
216  const double dphi2 = 2*dphi1;
217 
219  // eta, depth, firstPhi, nPhi, stepPhi, phiStart, deltaPhi, zMin, zMax, etaMin, etaMax
220  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 16, 3, 1, 8, 1, 0, dphi1, 409.885, 462.685, 1.305, 1.373),
221  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 17, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, 427.485, 1.373, 1.444),
222  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 17, 2, 1, 8, 1, 0, dphi1, 427.485, 506.685, 1.373, 1.444),
223  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 18, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.444, 1.521),
224  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 18, 2, 1, 8, 1, 0, dphi1, HEZMID_H2, 524.285, 1.444, 1.521),
225  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 19, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.521, 1.603),
226  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 19, 2, 1, 8, 1, 0, dphi1, HEZMID_H2, HEZMAX_H2, 1.521, 1.603),
227  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 20, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.603, 1.693),
228  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 20, 2, 1, 8, 1, 0, dphi1, HEZMID_H2, HEZMAX_H2, 1.603, 1.693),
229  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 21, 1, 1, 8, 2, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.693, 1.79),
230  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 21, 2, 1, 8, 2, 0, dphi1, HEZMID_H2, HEZMAX_H2, 1.693, 1.79),
231  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 22, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, HEZMID_H2, 1.79, 1.88),
232  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 22, 2, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 1.79, 1.88),
233  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 23, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, HEZMID_H2, 1.88, 1.98),
234  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 23, 2, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 1.88, 1.98),
235  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 24, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, 418.685, 1.98, 2.09),
236  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 24, 2, 1, 8, 2, 0, dphi2, 418.685, HEZMID_H2, 1.98, 2.09),
237  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 24, 3, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 1.98, 2.09),
238  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 25, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, 418.685, 2.09, 2.21),
239  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 25, 2, 1, 8, 2, 0, dphi2, 418.685, HEZMID_H2, 2.09, 2.21),
240  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 25, 3, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 2.09, 2.21)
241  };
242  int nCells = sizeof(cells)/sizeof(HcalFlexiHardcodeGeometryLoader::HECellParameters);
243  std::vector <HcalFlexiHardcodeGeometryLoader::HECellParameters> result;
244  result.reserve (nCells);
245  for (int i = 0; i < nCells; ++i) result.push_back (cells[i]);
246  return result;
247 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
std::vector< HcalFlexiHardcodeGeometryLoader::HFCellParameters > HcalFlexiHardcodeGeometryLoader::makeHFCells ( )
private

Definition at line 250 of file HcalFlexiHardcodeGeometryLoader.cc.

References i, and query::result.

Referenced by load().

250  {
251 
252  const float HFZMIN1 = 1115.;
253  const float HFZMIN2 = 1137.;
254  const float HFZMAX = 1280.1;
255 
257  // eta, depth, firstPhi, stepPhi, deltaPhi, zMin, zMax, rMin, rMax
258  HcalFlexiHardcodeGeometryLoader::HFCellParameters (29, 1, 1, 2, 10, HFZMIN1, HFZMAX,116.2,130.0),
259  HcalFlexiHardcodeGeometryLoader::HFCellParameters (29, 2, 1, 2, 10, HFZMIN2, HFZMAX,116.2,130.0),
260  HcalFlexiHardcodeGeometryLoader::HFCellParameters (30, 1, 1, 2, 10, HFZMIN1, HFZMAX, 97.5,116.2),
261  HcalFlexiHardcodeGeometryLoader::HFCellParameters (30, 2, 1, 2, 10, HFZMIN2, HFZMAX, 97.5,116.2),
262  HcalFlexiHardcodeGeometryLoader::HFCellParameters (31, 1, 1, 2, 10, HFZMIN1, HFZMAX, 81.8, 97.5),
263  HcalFlexiHardcodeGeometryLoader::HFCellParameters (31, 2, 1, 2, 10, HFZMIN2, HFZMAX, 81.8, 97.5),
264  HcalFlexiHardcodeGeometryLoader::HFCellParameters (32, 1, 1, 2, 10, HFZMIN1, HFZMAX, 68.6, 81.8),
265  HcalFlexiHardcodeGeometryLoader::HFCellParameters (32, 2, 1, 2, 10, HFZMIN2, HFZMAX, 68.6, 81.8),
266  HcalFlexiHardcodeGeometryLoader::HFCellParameters (33, 1, 1, 2, 10, HFZMIN1, HFZMAX, 57.6, 68.6),
267  HcalFlexiHardcodeGeometryLoader::HFCellParameters (33, 2, 1, 2, 10, HFZMIN2, HFZMAX, 57.6, 68.6),
268  HcalFlexiHardcodeGeometryLoader::HFCellParameters (34, 1, 1, 2, 10, HFZMIN1, HFZMAX, 48.3, 57.6),
269  HcalFlexiHardcodeGeometryLoader::HFCellParameters (34, 2, 1, 2, 10, HFZMIN2, HFZMAX, 48.3, 57.6),
270  HcalFlexiHardcodeGeometryLoader::HFCellParameters (35, 1, 1, 2, 10, HFZMIN1, HFZMAX, 40.6, 48.3),
271  HcalFlexiHardcodeGeometryLoader::HFCellParameters (35, 2, 1, 2, 10, HFZMIN2, HFZMAX, 40.6, 48.3),
272  HcalFlexiHardcodeGeometryLoader::HFCellParameters (36, 1, 1, 2, 10, HFZMIN1, HFZMAX, 34.0, 40.6),
273  HcalFlexiHardcodeGeometryLoader::HFCellParameters (36, 2, 1, 2, 10, HFZMIN2, HFZMAX, 34.0, 40.6),
274  HcalFlexiHardcodeGeometryLoader::HFCellParameters (37, 1, 1, 2, 10, HFZMIN1, HFZMAX, 28.6, 34.0),
275  HcalFlexiHardcodeGeometryLoader::HFCellParameters (37, 2, 1, 2, 10, HFZMIN2, HFZMAX, 28.6, 34.0),
276  HcalFlexiHardcodeGeometryLoader::HFCellParameters (38, 1, 1, 2, 10, HFZMIN1, HFZMAX, 24.0, 28.6),
277  HcalFlexiHardcodeGeometryLoader::HFCellParameters (38, 2, 1, 2, 10, HFZMIN2, HFZMAX, 24.0, 28.6),
278  HcalFlexiHardcodeGeometryLoader::HFCellParameters (39, 1, 1, 2, 10, HFZMIN1, HFZMAX, 20.1, 24.0),
279  HcalFlexiHardcodeGeometryLoader::HFCellParameters (39, 2, 1, 2, 10, HFZMIN2, HFZMAX, 20.1, 24.0),
280  HcalFlexiHardcodeGeometryLoader::HFCellParameters (40, 1, 3, 4, 20, HFZMIN1, HFZMAX, 16.9, 20.1),
281  HcalFlexiHardcodeGeometryLoader::HFCellParameters (40, 2, 3, 4, 20, HFZMIN2, HFZMAX, 16.9, 20.1),
282  HcalFlexiHardcodeGeometryLoader::HFCellParameters (41, 1, 3, 4, 20, HFZMIN1, HFZMAX, 12.5, 16.9),
283  HcalFlexiHardcodeGeometryLoader::HFCellParameters (41, 2, 3, 4, 20, HFZMIN2, HFZMAX, 12.5, 16.9)
284  };
285  int nCells = sizeof(cells)/sizeof(HcalFlexiHardcodeGeometryLoader::HFCellParameters);
286  std::vector <HcalFlexiHardcodeGeometryLoader::HFCellParameters> result;
287  result.reserve (nCells);
288  for (int i = 0; i < nCells; ++i) result.push_back (cells[i]);
289  return result;
290 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
std::vector< HcalFlexiHardcodeGeometryLoader::HBHOCellParameters > HcalFlexiHardcodeGeometryLoader::makeHOCells ( )
private

Definition at line 85 of file HcalFlexiHardcodeGeometryLoader.cc.

References DEGREE2RAD, i, and query::result.

Referenced by load().

85  {
86  const double HORMIN0 = 390.0;
87  const double HORMIN1 = 412.6;
88  const double HORMAX = 413.6;
89  const int nCells = 15;
90  const double etamin[nCells] = {0.000,0.087,0.174, 0.261, 0.3395,0.435,0.522,
91  0.609,0.696,0.783, 0.873, 0.957, 1.044,1.131,
92  1.218};
93  const double etamax[nCells] = {0.087,0.174,0.261, 0.3075,0.435, 0.522,0.609,
94  0.696,0.783,0.8494,0.957, 1.044, 1.131,1.218,
95  1.305};
96  std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters> result;
97  result.reserve (nCells);
98  double dphi = 5*DEGREE2RAD;
99  for (int i = 0; i < nCells; ++i) {
100  double rmin = ((i < 4) ? HORMIN0 : HORMIN1);
101  // eta, depth, firstPhi, stepPhi, deltaPhi, rMin, rMax, etaMin, etaMax
102  result.push_back (HcalFlexiHardcodeGeometryLoader::HBHOCellParameters(i+1, 4, 1, 72, 1, 0, dphi, rmin, HORMAX, etamin[i], etamax[i]));
103  }
104  return result;
105 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137

Member Data Documentation

double HcalFlexiHardcodeGeometryLoader::DEGREE2RAD
private
int HcalFlexiHardcodeGeometryLoader::MAX_HCAL_PHI
private

Definition at line 88 of file HcalFlexiHardcodeGeometryLoader.h.

Referenced by fillHF(), and HcalFlexiHardcodeGeometryLoader().