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 (const HcalDDDRecConstants &hcons)
 
std::vector< HBHOCellParametersmakeHOCells ()
 

Private Attributes

double DEGREE2RAD
 
bool isBH_
 
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 )

Member Function Documentation

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

Definition at line 118 of file HcalFlexiHardcodeGeometryLoader.cc.

References funct::cos(), gather_cfg::cout, TauDecayModes::dec, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::depth, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::dphi, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::eta, PV3DBase< T, PVType, FrameType >::eta(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::etaMax, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters::etaMin, CaloCellGeometry::getParmPtr(), HcalBarrel, HcalOuter, 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().

118  {
119 
120  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
121  const HcalFlexiHardcodeGeometryLoader::HBHOCellParameters& param = fCells[iCell];
122  for (int iPhi = param.phiFirst; iPhi <= param.nPhi; iPhi += param.phiStep) {
123  for (int iside = -1; iside <= 1; iside += 2) { // both detector sides are identical
124  HcalDetId hid (fHB ? HcalBarrel : HcalOuter, param.eta*iside, iPhi, param.depth);
125  float phiCenter = param.phiStart+(iPhi-0.5)*param.dphi; // middle of the cell
126  float etaCenter = 0.5*(param.etaMin + param.etaMax);
127  float x = param.rMin* cos (phiCenter);
128  float y = param.rMin* sin (phiCenter);
129  float z = iside * param.rMin * sinh(etaCenter);
130  // make cell geometry
131  GlobalPoint refPoint (x,y,z); // center of the cell's face
132  std::vector<CCGFloat> cellParams;
133  cellParams.reserve (5);
134  cellParams.push_back (0.5 * (param.etaMax - param.etaMin)); // deta_half
135  cellParams.push_back (0.5 * param.dphi); // dphi_half
136  cellParams.push_back (0.5 * (param.rMax - param.rMin) * cosh (etaCenter)); // dr_half
137  cellParams.push_back ( fabs( refPoint.eta() ) ) ;
138  cellParams.push_back ( fabs( refPoint.z() ) ) ;
139 #ifdef DebugLog
140  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHBHO-> " << hid
141  << " " << hid.rawId() << " " << std::hex << hid.rawId()
142  << std::dec << " " << hid << " " << refPoint << '/'
143  << cellParams [0] << '/' << cellParams [1] << '/'
144  << cellParams [2] << std::endl;
145 #endif
146  fGeometry->newCell(refPoint, refPoint, refPoint,
147  CaloCellGeometry::getParmPtr(cellParams,
148  fGeometry->parMgr(),
149  fGeometry->parVecVec()),
150  hid ) ;
151  }
152  }
153  }
154 }
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:145
void HcalFlexiHardcodeGeometryLoader::fillHE ( CaloSubdetectorGeometry fGeometry,
const std::vector< HECellParameters > &  fCells 
)
private

Definition at line 283 of file HcalFlexiHardcodeGeometryLoader.cc.

References funct::cos(), gather_cfg::cout, TauDecayModes::dec, HcalFlexiHardcodeGeometryLoader::HECellParameters::depth, HcalFlexiHardcodeGeometryLoader::HECellParameters::dphi, HcalFlexiHardcodeGeometryLoader::HECellParameters::eta, PV3DBase< T, PVType, FrameType >::eta(), HcalFlexiHardcodeGeometryLoader::HECellParameters::etaMax, HcalFlexiHardcodeGeometryLoader::HECellParameters::etaMin, CaloCellGeometry::getParmPtr(), HcalEndcap, isBH_, 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().

283  {
284 
285  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
286  const HcalFlexiHardcodeGeometryLoader::HECellParameters& param = fCells[iCell];
287  int kPhi(param.phiFirst);
288  for (int iPhi = param.phiFirst; iPhi <= param.nPhi; iPhi += param.phiStep, ++kPhi) {
289  for (int iside = -1; iside <= 1; iside += 2) { // both detector sides are identical
290  HcalDetId hid (HcalEndcap, param.eta*iside, iPhi, param.depth);
291  float phiCenter = param.phiStart + (kPhi-0.5)*param.dphi; // middle of the cell
292  float etaCenter = 0.5 * (param.etaMin + param.etaMax);
293 
294  float perp = param.zMin / sinh (etaCenter);
295  float x = perp * cos (phiCenter);
296  float y = perp * sin (phiCenter);
297  float z = (isBH_) ? (iside*0.5*(param.zMin+param.zMax)) : (iside*param.zMin);
298  // make cell geometry
299  GlobalPoint refPoint (x,y,z); // center of the cell's face
300  std::vector<CCGFloat> cellParams;
301  cellParams.reserve (5);
302  cellParams.push_back (0.5 * (param.etaMax - param.etaMin)); //deta_half
303  cellParams.push_back (0.5 * param.dphi); // dphi_half
304  cellParams.push_back (-0.5 * (param.zMax - param.zMin) / tanh (etaCenter)); // dz_half, "-" means edges in Z
305  cellParams.push_back ( fabs( refPoint.eta() ) ) ;
306  cellParams.push_back ( fabs( refPoint.z() ) ) ;
307 #ifdef DebugLog
308  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHE-> " << hid << " "
309  << hid.rawId() << " " << std::hex << hid.rawId() << std::dec
310  << " " << hid << refPoint << '/' << cellParams [0] << '/'
311  << cellParams [1] << '/' << cellParams [2] << std::endl;
312 #endif
313  fGeometry->newCell(refPoint, refPoint, refPoint,
314  CaloCellGeometry::getParmPtr(cellParams,
315  fGeometry->parMgr(),
316  fGeometry->parVecVec()),
317  hid ) ;
318  }
319  }
320  }
321 }
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:145
void HcalFlexiHardcodeGeometryLoader::fillHF ( CaloSubdetectorGeometry fGeometry,
const std::vector< HFCellParameters > &  fCells 
)
private

Definition at line 323 of file HcalFlexiHardcodeGeometryLoader.cc.

References funct::cos(), gather_cfg::cout, TauDecayModes::dec, DEGREE2RAD, HcalFlexiHardcodeGeometryLoader::HFCellParameters::depth, HcalFlexiHardcodeGeometryLoader::HFCellParameters::dphi, HcalFlexiHardcodeGeometryLoader::HFCellParameters::eta, PV3DBase< T, PVType, FrameType >::eta(), CaloCellGeometry::getParmPtr(), HcalForward, SurfaceOrientation::inner, JetComb::kPhi, MAX_HCAL_PHI, CaloSubdetectorGeometry::newCell(), HcalFlexiHardcodeGeometryLoader::HFCellParameters::nPhi, 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, HcalFlexiHardcodeGeometryLoader::HFCellParameters::zMax, and HcalFlexiHardcodeGeometryLoader::HFCellParameters::zMin.

Referenced by load().

323  {
324 
325  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
326  const HcalFlexiHardcodeGeometryLoader::HFCellParameters& param = fCells[iCell];
327  for (int kPhi = 0; kPhi < param.nPhi; ++kPhi) {
328  int iPhi = param.phiFirst + kPhi*param.phiStep;
329  HcalDetId hid (HcalForward, param.eta, iPhi, param.depth);
330  // middle of the cell
331  float phiCenter = ((iPhi-1)*360./MAX_HCAL_PHI + 0.5*param.dphi) * DEGREE2RAD;
332  GlobalPoint inner (param.rMin, 0, param.zMin);
333  GlobalPoint outer (param.rMax, 0, param.zMin);
334  float iEta = inner.eta();
335  float oEta = outer.eta();
336  float etaCenter = 0.5 * ( iEta + oEta );
337 
338  float perp = param.zMin / sinh (etaCenter);
339  float x = perp * cos (phiCenter);
340  float y = perp * sin (phiCenter);
341  float z = (param.eta > 0) ? param.zMin : -param.zMin;
342  // make cell geometry
343  GlobalPoint refPoint (x,y,z); // center of the cell's face
344  std::vector<CCGFloat> cellParams;
345  cellParams.reserve (5);
346  cellParams.push_back (0.5 * ( iEta - oEta )); // deta_half
347  cellParams.push_back (0.5 * param.dphi * DEGREE2RAD); // dphi_half
348  cellParams.push_back (0.5 * (param.zMax - param.zMin)); // dz_half
349  cellParams.push_back ( fabs( refPoint.eta()));
350  cellParams.push_back ( fabs( refPoint.z() ) ) ;
351 #ifdef DebugLog
352  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHF-> " << hid << " "
353  << hid.rawId() << " " << std::hex << hid.rawId() << std::dec
354  << " " << hid << " " << refPoint << '/' << cellParams [0]
355  << '/' << cellParams [1] << '/' << cellParams [2] << std::endl;
356 #endif
357  fGeometry->newCell(refPoint, refPoint, refPoint,
358  CaloCellGeometry::getParmPtr(cellParams,
359  fGeometry->parMgr(),
360  fGeometry->parVecVec()),
361  hid ) ;
362  }
363  }
364 }
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:145
CaloSubdetectorGeometry * HcalFlexiHardcodeGeometryLoader::load ( const HcalTopology fTopology,
const HcalDDDRecConstants hcons 
)

Definition at line 24 of file HcalFlexiHardcodeGeometryLoader.cc.

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

Referenced by HcalHardcodeGeometryEP::produceIdeal().

24  {
25  CaloSubdetectorGeometry* hcalGeometry = new HcalGeometry (fTopology);
26  if( 0 == hcalGeometry->cornersMgr() ) hcalGeometry->allocateCorners ( fTopology.ncells()+fTopology.getHFSize() );
27  if( 0 == hcalGeometry->parMgr() ) hcalGeometry->allocatePar (hcalGeometry->numberOfShapes(),
29  isBH_ = hcons.isBH();
30 #ifdef DebugLog
31  std::cout << "FlexiGeometryLoader initialize with ncells "
32  << fTopology.ncells() << " and shapes "
33  << hcalGeometry->numberOfShapes() << ":"
35  << " with BH Flag " << isBH_ << std::endl;
36 #endif
37  if (fTopology.mode() == HcalTopologyMode::H2) { // TB geometry
38  fillHBHO (hcalGeometry, makeHBCells(hcons), true);
39  fillHBHO (hcalGeometry, makeHOCells(), false);
40  fillHE (hcalGeometry, makeHECells_H2());
41  } else { // regular geometry
42  fillHBHO (hcalGeometry, makeHBCells(hcons), true);
43  fillHBHO (hcalGeometry, makeHOCells(), false);
44  fillHF (hcalGeometry, makeHFCells(hcons));
45  fillHE (hcalGeometry, makeHECells(hcons));
46  }
47  return hcalGeometry;
48 }
unsigned int getHFSize() const
Definition: HcalTopology.h:124
std::vector< HFCellParameters > makeHFCells(const HcalDDDRecConstants &hcons)
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:31
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)
tuple cout
Definition: gather_cfg.py:145
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 52 of file HcalFlexiHardcodeGeometryLoader.cc.

References gather_cfg::cout, HLT_FULL_cff::depth, TrackCollections2monitor_cff::etaMax, TrackCollections2monitor_cff::etaMin, HcalDDDRecConstants::getConstHBHE(), HcalDDDRecConstants::getEtaBins(), i, relval_2017::k, and mps_fire::result.

Referenced by load().

52  {
53 
54  std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters> result;
55  std::vector<std::pair<double,double> > gconsHB = hcons.getConstHBHE(0);
56  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.getEtaBins(0);
57 
58 #ifdef DebugLog
59  std::cout << "FlexiGeometryLoader called for " << etabins.size()
60  << " Eta Bins" << std::endl;
61  for (unsigned int k=0; k<gconsHB.size(); ++k) {
62  std::cout << "gconsHB[" << k << "] = " << gconsHB[k].first << " +- "
63  << gconsHB[k].second << std::endl;
64  }
65 #endif
66  for (unsigned int i=0; i<etabins.size(); ++i) {
67  int iring = etabins[i].ieta;
68  int nphi = etabins[i].nPhi;
69  int depth = etabins[i].depthStart;
70  for (unsigned int k=0; k<etabins[i].layer.size(); ++k) {
71  int layf = etabins[i].layer[k].first-1;
72  int layl = etabins[i].layer[k].second-1;
73  double rmin = gconsHB[layf].first-gconsHB[layf].second;
74  double rmax = gconsHB[layl].first+gconsHB[layl].second;
75 #ifdef DebugLog
76  std::cout << "HBRing " << iring << " eta " << etabins[i].etaMin << ":"
77  << etabins[i].etaMax << " depth " << depth << " R " << rmin
78  << ":" << rmax << " Phi 1:" << nphi << ":" << etabins[i].phi0
79  << ":" << etabins[i].dphi << " layer[" << k << "]: "
80  << etabins[i].layer[k].first-1 << ":"
81  << etabins[i].layer[k].second << std::endl;
82 #endif
83  result.push_back (HcalFlexiHardcodeGeometryLoader::HBHOCellParameters(iring, depth, 1, nphi, 1, etabins[i].phi0, etabins[i].dphi, rmin, rmax, etabins[i].etaMin, etabins[i].etaMax));
84  depth++;
85  }
86  }
87  return result;
88 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
tuple cout
Definition: gather_cfg.py:145
std::vector< HcalEtaBin > getEtaBins(const int itype) const
std::vector< HcalFlexiHardcodeGeometryLoader::HECellParameters > HcalFlexiHardcodeGeometryLoader::makeHECells ( const HcalDDDRecConstants hcons)
private

Definition at line 158 of file HcalFlexiHardcodeGeometryLoader.cc.

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

Referenced by load().

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

Definition at line 225 of file HcalFlexiHardcodeGeometryLoader.cc.

References DEGREE2RAD, i, and mps_fire::result.

Referenced by load().

225  {
226 
227  const double HEZMIN_H2 = 400.715;
228  const double HEZMID_H2 = 436.285;
229  const double HEZMAX_H2 = 541.885;
230  const double dphi1 = 5*DEGREE2RAD;
231  const double dphi2 = 2*dphi1;
232 
234  // eta, depth, firstPhi, nPhi, stepPhi, phiStart, deltaPhi, zMin, zMax, etaMin, etaMax
235  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 16, 3, 1, 8, 1, 0, dphi1, 409.885, 462.685, 1.305, 1.373),
236  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 17, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, 427.485, 1.373, 1.444),
237  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 17, 2, 1, 8, 1, 0, dphi1, 427.485, 506.685, 1.373, 1.444),
238  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 18, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.444, 1.521),
239  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 18, 2, 1, 8, 1, 0, dphi1, HEZMID_H2, 524.285, 1.444, 1.521),
240  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 19, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.521, 1.603),
241  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 19, 2, 1, 8, 1, 0, dphi1, HEZMID_H2, HEZMAX_H2, 1.521, 1.603),
242  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 20, 1, 1, 8, 1, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.603, 1.693),
243  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 20, 2, 1, 8, 1, 0, dphi1, HEZMID_H2, HEZMAX_H2, 1.603, 1.693),
244  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 21, 1, 1, 8, 2, 0, dphi1, HEZMIN_H2, HEZMID_H2, 1.693, 1.79),
245  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 21, 2, 1, 8, 2, 0, dphi1, HEZMID_H2, HEZMAX_H2, 1.693, 1.79),
246  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 22, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, HEZMID_H2, 1.79, 1.88),
247  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 22, 2, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 1.79, 1.88),
248  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 23, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, HEZMID_H2, 1.88, 1.98),
249  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 23, 2, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 1.88, 1.98),
250  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 24, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, 418.685, 1.98, 2.09),
251  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 24, 2, 1, 8, 2, 0, dphi2, 418.685, HEZMID_H2, 1.98, 2.09),
252  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 24, 3, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 1.98, 2.09),
253  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 25, 1, 1, 8, 2, 0, dphi2, HEZMIN_H2, 418.685, 2.09, 2.21),
254  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 25, 2, 1, 8, 2, 0, dphi2, 418.685, HEZMID_H2, 2.09, 2.21),
255  HcalFlexiHardcodeGeometryLoader::HECellParameters ( 25, 3, 1, 8, 2, 0, dphi2, HEZMID_H2, HEZMAX_H2, 2.09, 2.21)
256  };
257  int nCells = sizeof(cells)/sizeof(HcalFlexiHardcodeGeometryLoader::HECellParameters);
258  std::vector <HcalFlexiHardcodeGeometryLoader::HECellParameters> result;
259  result.reserve (nCells);
260  for (int i = 0; i < nCells; ++i) result.push_back (cells[i]);
261  return result;
262 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
std::vector< HcalFlexiHardcodeGeometryLoader::HFCellParameters > HcalFlexiHardcodeGeometryLoader::makeHFCells ( const HcalDDDRecConstants hcons)
private

Definition at line 265 of file HcalFlexiHardcodeGeometryLoader.cc.

References HLT_FULL_cff::depth, HcalDDDRecConstants::getHFCellParameters(), i, HLT_FULL_cff::nPhi, and mps_fire::result.

Referenced by load().

265  {
266 
267  const float HFZMIN1 = 1115.;
268  const float HFZMIN2 = 1137.;
269  const float HFZMAX = 1280.1;
270  std::vector<HcalDDDRecConstants::HFCellParameters> cells = hcons.getHFCellParameters();
271  unsigned int nCells = cells.size();
272  std::vector <HcalFlexiHardcodeGeometryLoader::HFCellParameters> result;
273  result.reserve (nCells);
274  for (unsigned int i = 0; i < nCells; ++i) {
275  HcalFlexiHardcodeGeometryLoader::HFCellParameters cell1(cells[i].ieta,cells[i].depth,cells[i].firstPhi,cells[i].stepPhi,cells[i].nPhi,5*cells[i].stepPhi,HFZMIN1,HFZMAX,cells[i].rMin,cells[i].rMax);
276  result.push_back (cell1);
277  HcalFlexiHardcodeGeometryLoader::HFCellParameters cell2(cells[i].ieta,1+cells[i].depth,cells[i].firstPhi,cells[i].stepPhi,cells[i].nPhi,5*cells[i].stepPhi,HFZMIN2,HFZMAX,cells[i].rMin,cells[i].rMax);
278  result.push_back (cell2);
279  }
280  return result;
281 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
std::vector< HFCellParameters > getHFCellParameters() const
std::vector< HcalFlexiHardcodeGeometryLoader::HBHOCellParameters > HcalFlexiHardcodeGeometryLoader::makeHOCells ( )
private

Definition at line 92 of file HcalFlexiHardcodeGeometryLoader.cc.

References DEGREE2RAD, i, and mps_fire::result.

Referenced by load().

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

Member Data Documentation

double HcalFlexiHardcodeGeometryLoader::DEGREE2RAD
private
bool HcalFlexiHardcodeGeometryLoader::isBH_
private

Definition at line 91 of file HcalFlexiHardcodeGeometryLoader.h.

Referenced by fillHE(), and load().

int HcalFlexiHardcodeGeometryLoader::MAX_HCAL_PHI
private

Definition at line 89 of file HcalFlexiHardcodeGeometryLoader.h.

Referenced by fillHF(), and HcalFlexiHardcodeGeometryLoader().