CMS 3D CMS Logo

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 (HcalGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
 
void fillHE (HcalGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
 
void fillHF (HcalGeometry *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 18 of file HcalFlexiHardcodeGeometryLoader.h.

Constructor & Destructor Documentation

HcalFlexiHardcodeGeometryLoader::HcalFlexiHardcodeGeometryLoader ( const edm::ParameterSet )

Member Function Documentation

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

Definition at line 131 of file HcalFlexiHardcodeGeometryLoader.cc.

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

Referenced by load().

131  {
132 
133  fGeometry->increaseReserve(fCells.size());
134  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
135  const HcalFlexiHardcodeGeometryLoader::HBHOCellParameters& param = fCells[iCell];
136  HcalDetId hid (fHB ? HcalBarrel : HcalOuter, param.ieta, param.iphi, param.depth);
137  float phiCenter = param.phi; // middle of the cell
138  float etaCenter = 0.5*(param.etaMin + param.etaMax);
139  float x = param.rMin* cos (phiCenter);
140  float y = param.rMin* sin (phiCenter);
141  float z = (param.ieta < 0) ? -(param.rMin*sinh(etaCenter)) : (param.rMin*sinh(etaCenter));
142  // make cell geometry
143  GlobalPoint refPoint (x,y,z); // center of the cell's face
144  std::vector<CCGFloat> cellParams;
145  cellParams.reserve (5);
146  cellParams.push_back (0.5 * (param.etaMax - param.etaMin)); // deta_half
147  cellParams.push_back (0.5 * param.dphi); // dphi_half
148  cellParams.push_back (0.5 * (param.rMax - param.rMin) * cosh (etaCenter)); // dr_half
149  cellParams.push_back ( fabs( refPoint.eta() ) ) ;
150  cellParams.push_back ( fabs( refPoint.z() ) ) ;
151 #ifdef EDM_ML_DEBUG
152  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHBHO-> " << hid
153  << " " << hid.rawId() << " " << std::hex << hid.rawId()
154  << std::dec << " " << hid << " " << refPoint << '/'
155  << cellParams [0] << '/' << cellParams [1] << '/'
156  << cellParams [2] << std::endl;
157 #endif
158  fGeometry->newCellFast(refPoint, refPoint, refPoint,
159  CaloCellGeometry::getParmPtr(cellParams,
160  fGeometry->parMgr(),
161  fGeometry->parVecVec()),
162  hid ) ;
163  }
164 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
void increaseReserve(unsigned int extra)
void HcalFlexiHardcodeGeometryLoader::fillHE ( HcalGeometry 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, HcalFlexiHardcodeGeometryLoader::HECellParameters::dphi, PV3DBase< T, PVType, FrameType >::eta(), HcalFlexiHardcodeGeometryLoader::HECellParameters::etaMax, HcalFlexiHardcodeGeometryLoader::HECellParameters::etaMin, CaloCellGeometry::getParmPtr(), HcalEndcap, HcalFlexiHardcodeGeometryLoader::HECellParameters::ieta, HcalGeometry::increaseReserve(), HcalFlexiHardcodeGeometryLoader::HECellParameters::iphi, isBH_, HcalGeometry::newCellFast(), CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), perp(), HcalFlexiHardcodeGeometryLoader::HECellParameters::phi, 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  fGeometry->increaseReserve(fCells.size());
295  for (size_t iCell = 0; iCell < fCells.size(); ++iCell) {
296  const HcalFlexiHardcodeGeometryLoader::HECellParameters& param = fCells[iCell];
297  HcalDetId hid (HcalEndcap, param.ieta, param.iphi, param.depth);
298  float phiCenter = param.phi; // middle of the cell
299  float etaCenter = 0.5 * (param.etaMin + param.etaMax);
300  int iside = (param.ieta >= 0) ? 1 : -1;
301  float perp = param.zMin / sinh (etaCenter);
302  float x = perp * cos (phiCenter);
303  float y = perp * sin (phiCenter);
304  float z = (isBH_) ? (iside*0.5*(param.zMin+param.zMax)) : (iside*param.zMin);
305  // make cell geometry
306  GlobalPoint refPoint (x,y,z); // center of the cell's face
307  std::vector<CCGFloat> cellParams;
308  cellParams.reserve (5);
309  cellParams.push_back (0.5 * (param.etaMax - param.etaMin)); //deta_half
310  cellParams.push_back (0.5 * param.dphi); // dphi_half
311  cellParams.push_back (-0.5 * (param.zMax - param.zMin) / tanh (etaCenter)); // dz_half, "-" means edges in Z
312  cellParams.push_back ( fabs( refPoint.eta() ) ) ;
313  cellParams.push_back ( fabs( refPoint.z() ) ) ;
314 #ifdef EDM_ML_DEBUG
315  std::cout << "HcalFlexiHardcodeGeometryLoader::fillHE-> " << hid << " "
316  << hid.rawId() << " " << std::hex << hid.rawId() << std::dec
317  << " " << hid << refPoint << '/' << cellParams [0] << '/'
318  << cellParams [1] << '/' << cellParams [2] << std::endl;
319 #endif
320  fGeometry->newCellFast(refPoint, refPoint, refPoint,
321  CaloCellGeometry::getParmPtr(cellParams,
322  fGeometry->parMgr(),
323  fGeometry->parVecVec()),
324  hid ) ;
325  }
326 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
void increaseReserve(unsigned int extra)
T perp() const
Magnitude of transverse component.
void HcalFlexiHardcodeGeometryLoader::fillHF ( HcalGeometry fGeometry,
const std::vector< HFCellParameters > &  fCells 
)
private

Definition at line 328 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, HcalGeometry::increaseReserve(), SurfaceOrientation::inner, JetComb::kPhi, MAX_HCAL_PHI, HcalGeometry::newCellFast(), 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().

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

Definition at line 25 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(), HcalGeometry::numberOfShapes(), CaloSubdetectorGeometry::parMgr(), and HcalGeometry::sortValidIds().

Referenced by HcalHardcodeGeometryEP::produceIdeal().

25  {
26  HcalGeometry* hcalGeometry = new HcalGeometry (fTopology);
27  if( 0 == hcalGeometry->cornersMgr() ) hcalGeometry->allocateCorners ( fTopology.ncells()+fTopology.getHFSize() );
28  if( 0 == hcalGeometry->parMgr() ) hcalGeometry->allocatePar (hcalGeometry->numberOfShapes(),
30  isBH_ = hcons.isBH();
31 #ifdef EDM_ML_DEBUG
32  std::cout << "FlexiGeometryLoader initialize with ncells "
33  << fTopology.ncells() << " and shapes "
34  << hcalGeometry->numberOfShapes() << ":"
36  << " with BH Flag " << isBH_ << std::endl;
37 #endif
38  if (fTopology.mode() == HcalTopologyMode::H2) { // TB geometry
39  fillHBHO (hcalGeometry, makeHBCells(hcons), true);
40  fillHBHO (hcalGeometry, makeHOCells(), false);
41  fillHE (hcalGeometry, makeHECells_H2());
42  } else { // regular geometry
43  fillHBHO (hcalGeometry, makeHBCells(hcons), true);
44  fillHBHO (hcalGeometry, makeHOCells(), false);
45  fillHF (hcalGeometry, makeHFCells(hcons));
46  fillHE (hcalGeometry, makeHECells(hcons));
47  }
48  //fast insertion of valid ids requires sort at end
49  hcalGeometry->sortValidIds();
50  return hcalGeometry;
51 }
unsigned int getHFSize() const
Definition: HcalTopology.h:135
std::vector< HFCellParameters > makeHFCells(const HcalDDDRecConstants &hcons)
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
std::vector< HBHOCellParameters > makeHOCells()
void sortValidIds()
void fillHE(HcalGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
std::vector< HECellParameters > makeHECells(const HcalDDDRecConstants &hcons)
CaloCellGeometry::CornersMgr * cornersMgr()
virtual unsigned int numberOfShapes() const
Definition: HcalGeometry.h:43
void fillHBHO(HcalGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
void fillHF(HcalGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
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 55 of file HcalFlexiHardcodeGeometryLoader.cc.

References gather_cfg::cout, particleFlowClusterECALTimeSelected_cfi::depth, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, plotBeamSpotDB::first, HcalDDDRecConstants::getConstHBHE(), HcalDDDRecConstants::getEtaBins(), mps_fire::i, gen::k, M_PI, MAX_HCAL_PHI, mps_fire::result, and edm::second().

Referenced by load().

55  {
56 
57  std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters> result;
58  std::vector<std::pair<double,double> > gconsHB = hcons.getConstHBHE(0);
59  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.getEtaBins(0);
60 
61 #ifdef EDM_ML_DEBUG
62  std::cout << "FlexiGeometryLoader called for " << etabins.size()
63  << " Eta Bins" << std::endl;
64  for (unsigned int k=0; k<gconsHB.size(); ++k) {
65  std::cout << "gconsHB[" << k << "] = " << gconsHB[k].first << " +- "
66  << gconsHB[k].second << std::endl;
67  }
68 #endif
69  for (unsigned int i=0; i<etabins.size(); ++i) {
70  int iring = (etabins[i].zside >= 0) ? etabins[i].ieta : -etabins[i].ieta;
71  int depth = etabins[i].depthStart;
72  double dphi = (etabins[i].phis.size() > 1) ?
73  (etabins[i].phis[1].second-etabins[i].phis[0].second) :
74  ((2.0*M_PI)/MAX_HCAL_PHI);
75  for (unsigned int k=0; k<etabins[i].layer.size(); ++k) {
76  int layf = etabins[i].layer[k].first-1;
77  int layl = etabins[i].layer[k].second-1;
78  double rmin = gconsHB[layf].first-gconsHB[layf].second;
79  double rmax = gconsHB[layl].first+gconsHB[layl].second;
80  for (unsigned int j=0; j<etabins[i].phis.size(); ++j) {
81 #ifdef EDM_ML_DEBUG
82  std::cout << "HBRing " << iring << " eta " << etabins[i].etaMin << ":"
83  << etabins[i].etaMax << " depth " << depth << " R " << rmin
84  << ":" << rmax << " Phi " << etabins[i].phis[j].first << ":"
85  << etabins[i].phis[j].second << ":" << dphi << " layer[" << k
86  << "]: " << etabins[i].layer[k].first-1 << ":"
87  << etabins[i].layer[k].second << std::endl;
88 #endif
89  result.push_back (HcalFlexiHardcodeGeometryLoader::HBHOCellParameters(iring, depth, etabins[i].phis[j].first, etabins[i].phis[j].second, dphi, rmin, rmax, etabins[i].etaMin, etabins[i].etaMax));
90  }
91  depth++;
92  }
93  }
94  return result;
95 }
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
#define M_PI
int k[5][pyjets_maxn]
std::vector< HcalEtaBin > getEtaBins(const int itype) const
std::vector< HcalFlexiHardcodeGeometryLoader::HECellParameters > HcalFlexiHardcodeGeometryLoader::makeHECells ( const HcalDDDRecConstants hcons)
private

Definition at line 168 of file HcalFlexiHardcodeGeometryLoader.cc.

References gather_cfg::cout, particleFlowClusterECALTimeSelected_cfi::depth, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, plotBeamSpotDB::first, HcalDDDRecConstants::getConstHBHE(), HcalDDDRecConstants::getEtaBins(), mps_fire::i, gen::k, M_PI, MAX_HCAL_PHI, mps_fire::result, edm::second(), and units().

Referenced by load().

168  {
169 
170  std::vector<HcalFlexiHardcodeGeometryLoader::HECellParameters> result;
171  std::vector<std::pair<double,double> > gconsHE = hcons.getConstHBHE(1);
172 #ifdef EDM_ML_DEBUG
173  std::cout << "HcalFlexiHardcodeGeometryLoader:HE with " << gconsHE.size()
174  << " cells" << std::endl;
175 #endif
176  if (gconsHE.size() > 0) {
177  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.getEtaBins(1);
178 
179 #ifdef EDM_ML_DEBUG
180  std::cout << "FlexiGeometryLoader called for HE with " << etabins.size()
181  << " Eta Bins and " << gconsHE.size() << " depths"
182  << std::endl;
183  for (unsigned int i=0; i<gconsHE.size(); ++i)
184  std::cout << " Depth[" << i << "] = " << gconsHE[i].first << " +- "
185  << gconsHE[i].second;
186  std::cout << std::endl;
187 #endif
188  for (unsigned int i=0; i<etabins.size(); ++i) {
189  int iring = (etabins[i].zside >= 0) ? etabins[i].ieta : -etabins[i].ieta;
190  int depth = etabins[i].depthStart;
191  double dphi = (etabins[i].phis.size() > 1) ?
192  (etabins[i].phis[1].second-etabins[i].phis[0].second) :
193  ((2.0*M_PI)/MAX_HCAL_PHI);
194 #ifdef EDM_ML_DEBUG
195  std::cout << "FlexiGeometryLoader::Ring " << iring << " nphi " << nphi
196  << " dstart " << depth << " dphi " << dphi << " units "
197  << units << " fioff " << fioff << " layers "
198  << etabins[i].layer.size() << std::endl;
199 #endif
200  for (unsigned int k=0; k<etabins[i].layer.size(); ++k) {
201  int layf = etabins[i].layer[k].first-1;
202  int layl = etabins[i].layer[k].second-1;
203  double zmin = gconsHE[layf].first-gconsHE[layf].second;
204  double zmax = gconsHE[layl].first+gconsHE[layl].second;
205  if (zmin < 1.0) {
206  for (int k2=layf; k2<=layl; ++k2) {
207  if (gconsHE[k2].first > 10) {
208  zmin = gconsHE[k2].first-gconsHE[k2].second;
209  break;
210  }
211  }
212  }
213  if (zmin >= zmax) zmax = zmin+10.;
214  for (unsigned int j=0; j<etabins[i].phis.size(); ++j) {
215 #ifdef EDM_ML_DEBUG
216  std::cout << "HERing " << iring << " eta " << etabins[i].etaMin << ":"
217  << etabins[i].etaMax << " depth " << depth << " Z " << zmin
218  << ":" << zmax << " Phi :" << etabins[i].phis[j].first
219  << ":" << etabins[i].phis[j].second << ":" << dphi
220  << " layer[" << k << "]: " << etabins[i].layer[k].first-1
221  << ":" << etabins[i].layer[k].second-1 << std::endl;
222 #endif
223  result.push_back(HcalFlexiHardcodeGeometryLoader::HECellParameters(iring, depth, etabins[i].phis[j].first, etabins[i].phis[j].second, dphi, zmin, zmax, etabins[i].etaMin, etabins[i].etaMax));
224  }
225  depth++;
226  }
227  }
228  }
229  return result;
230 }
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
#define M_PI
int k[5][pyjets_maxn]
TString units(TString variable, Char_t axis)
std::vector< HcalEtaBin > getEtaBins(const int itype) const
std::vector< HcalFlexiHardcodeGeometryLoader::HECellParameters > HcalFlexiHardcodeGeometryLoader::makeHECells_H2 ( )
private

Definition at line 234 of file HcalFlexiHardcodeGeometryLoader.cc.

References DEGREE2RAD, particleFlowClusterECALTimeSelected_cfi::depth, EnergyCorrector::etas, mps_fire::i, gen::k, and mps_fire::result.

Referenced by load().

234  {
235 
236  const double HEZMIN_H2 = 400.715;
237  const double HEZMID_H2 = 436.285;
238  const double HEZMAX_H2 = 541.885;
239  const int nEtas = 10;
240  const int nDepth[nEtas] = {1,2,2,2,2,2,2,2,3,3};
241  const int dStart[nEtas] = {3,1,1,1,1,1,1,1,1,1};
242  const int nPhis[nEtas] = {8,8,8,8,8,8,4,4,4,4};
243  const double etas[nEtas+1] = {1.305,1.373,1.444,1.521,1.603,1.693,1.790,
244  1.880,1.980,2.090,2.210};
245  const double zval[4*nEtas] = {409.885,462.685,0.,0.,
246  HEZMIN_H2,427.485,506.685,0.0,
247  HEZMIN_H2,HEZMID_H2,524.285,0.,
248  HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
249  HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
250  HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
251  HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
252  HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
253  HEZMIN_H2,418.685,HEZMID_H2,HEZMAX_H2,
254  HEZMIN_H2,418.685,HEZMID_H2,HEZMAX_H2};
255  std::vector<HcalFlexiHardcodeGeometryLoader::HECellParameters> result;
256 
257  for (int i = 0; i < nEtas; ++i) {
258  int ieta = 16+i;
259  for (int k=0; k<nDepth[i]; ++k) {
260  int depth = dStart[i]+k;
261  for (int j=0; j < nPhis[i]; ++j) {
262  int iphi = (nPhis[i] == 8) ? (j+1) : (2*j+1);
263  double dphi = (40.0*DEGREE2RAD)/nPhis[i];
264  double phi0 = (j+0.5)*dphi;
265  // ieta, depth, iphi, phi0, deltaPhi, zMin, zMax, etaMin, etaMax
266  result.push_back (HcalFlexiHardcodeGeometryLoader::HECellParameters(ieta, depth, iphi, phi0, dphi, zval[4*i+k+1], zval[4*i+k+2], etas[i], etas[i+1]));
267  }
268  }
269  }
270  return result;
271 }
int k[5][pyjets_maxn]
std::vector< HcalFlexiHardcodeGeometryLoader::HFCellParameters > HcalFlexiHardcodeGeometryLoader::makeHFCells ( const HcalDDDRecConstants hcons)
private

Definition at line 274 of file HcalFlexiHardcodeGeometryLoader.cc.

References particleFlowClusterECALTimeSelected_cfi::depth, HcalDDDRecConstants::getHFCellParameters(), mps_fire::i, DetIdAssociatorESProducer_cff::nPhi, mps_fire::result, conversionPostprocessing_cfi::rMax, and conversionPostprocessing_cfi::rMin.

Referenced by load().

274  {
275 
276  const float HFZMIN1 = 1115.;
277  const float HFZMIN2 = 1137.;
278  const float HFZMAX = 1280.1;
279  std::vector<HcalDDDRecConstants::HFCellParameters> cells = hcons.getHFCellParameters();
280  unsigned int nCells = cells.size();
281  std::vector <HcalFlexiHardcodeGeometryLoader::HFCellParameters> result;
282  result.reserve (nCells);
283  for (unsigned int i = 0; i < nCells; ++i) {
284  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);
285  result.push_back (cell1);
286  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);
287  result.push_back (cell2);
288  }
289  return result;
290 }
std::vector< HFCellParameters > getHFCellParameters() const
std::vector< HcalFlexiHardcodeGeometryLoader::HBHOCellParameters > HcalFlexiHardcodeGeometryLoader::makeHOCells ( )
private

Definition at line 99 of file HcalFlexiHardcodeGeometryLoader.cc.

References mps_fire::i, M_PI, DetIdAssociatorESProducer_cff::nPhi, phi, and mps_fire::result.

Referenced by load().

99  {
100  const double HORMIN0 = 390.0;
101  const double HORMIN1 = 412.6;
102  const double HORMAX = 413.6;
103  const int nCells = 15;
104  const int nPhi = 72;
105  const double etamin[nCells] = {0.000,0.087,0.174, 0.261, 0.3395,0.435,0.522,
106  0.609,0.696,0.783, 0.873, 0.957, 1.044,1.131,
107  1.218};
108  const double etamax[nCells] = {0.087,0.174,0.261, 0.3075,0.435, 0.522,0.609,
109  0.696,0.783,0.8494,0.957, 1.044, 1.131,1.218,
110  1.305};
111  std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters> result;
112  result.reserve (nCells*nPhi);
113  double dphi = ((2.0*M_PI)/nPhi);
114  for (int i = 0; i < nCells; ++i) {
115  double rmin = ((i < 4) ? HORMIN0 : HORMIN1);
116  for (int iside = -1; iside <= 1; iside += 2) {
117  for (int j=0; j < nPhi; ++j) {
118  double phi = (j+0.5)*dphi;
119  // eta, depth, phi, phi0, deltaPhi, rMin, rMax, etaMin, etaMax
120  result.push_back (HcalFlexiHardcodeGeometryLoader::HBHOCellParameters(iside*(i+1), 4, j+1, phi, dphi, rmin, HORMAX, etamin[i], etamax[i]));
121  }
122  }
123  }
124  return result;
125 }
#define M_PI

Member Data Documentation

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

Definition at line 88 of file HcalFlexiHardcodeGeometryLoader.h.

Referenced by fillHE(), and load().

int HcalFlexiHardcodeGeometryLoader::MAX_HCAL_PHI
private