CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HcalDDDRecConstants Class Reference

#include <HcalDDDRecConstants.h>

Classes

struct  HcalActiveLength
 
struct  HcalEtaBin
 
struct  HcalID
 
struct  HFCellParameters
 

Public Member Functions

const HcalDDDSimConstantsdddConstants () const
 
std::vector< std::pair< double, double > > getConstHBHE (const int &type) const
 
std::vector< int > getDepth (const int &det, const int &phi, const int &zside, const unsigned int &eta) const
 
std::vector< int > getDepth (const unsigned int &eta, const bool &extra) const
 
int getDepthEta16 (const int &det, const int &iphi, const int &zside) const
 
int getDepthEta29 (const int &iphi, const int &zside, const int &type) const
 
std::vector< HcalEtaBingetEtaBins (const int &itype) const
 
std::pair< double, double > getEtaLimit (const int &i) const
 
std::pair< double, double > getEtaPhi (const int &subdet, const int &ieta, const int &iphi) const
 
std::pair< int, int > getEtaRange (const int &i) const
 
const std::vector< double > & getEtaTable () const
 
const std::vector< double > & getEtaTableHF () const
 
HcalID getHCID (int subdet, int ieta, int iphi, int lay, int idepth) const
 
std::vector< HFCellParametersgetHFCellParameters () const
 
double getLayer0Wt (const int &det, const int &phi, const int &zside) const
 
int getLayerBack (const int &det, const int &eta, const int &phi, const int &depth) const
 
void getLayerDepth (const int &ieta, std::map< int, int > &layers) const
 
int getLayerFront (const int &det, const int &eta, const int &phi, const int &depth) const
 
int getMaxDepth (const int &type) const
 
int getMaxDepth (const int &itype, const int &ieta, const int &iphi, const int &zside) const
 
int getMinDepth (const int &itype, const int &ieta, const int &iphi, const int &zside) const
 
int getNEta () const
 
int getNoff (const int &i) const
 
int getNPhi (const int &type) const
 
double getPhiBin (const int &i) const
 
double getPhiOff (const int &i) const
 
const std::vector< double > & getPhiOffs () const
 
std::vector< std::pair< int, double > > getPhis (const int &subdet, const int &ieta) const
 
const std::vector< double > & getPhiTable () const
 
const std::vector< double > & getPhiTableHF () const
 
int getPhiZOne (std::vector< std::pair< int, int >> &phiz) const
 
double getRZ (const int &subdet, const int &ieta, const int &depth) const
 
double getRZ (const int &subdet, const int &ieta, const int &iphi, const int &depth) const
 
double getRZ (const int &subdet, const int &layer) const
 
std::pair< double, double > getRZ (const HcalDetId &id) const
 
std::vector< HcalActiveLengthgetThickActive (const int &type) const
 
int getTopoMode () const
 
int getTriggerMode () const
 
std::vector< HcalCellTypeHcalCellTypes (HcalSubdetector) const
 
 HcalDDDRecConstants (const HcalParameters *hp, const HcalDDDSimConstants &hc)
 
HcalDetId idBack (const HcalDetId &id) const
 
HcalDetId idFront (const HcalDetId &id) const
 
bool isBH () const
 
bool isPlan1 (const HcalDetId &id) const
 
bool isPlan1MergedId (const HcalDetId &id) const
 
bool isPlan1ToBeMergedId (const HcalDetId &id) const
 
int maxHFDepth (int ieta, int iphi) const
 
HcalDetId mergedDepthDetId (const HcalDetId &id) const
 
bool mergedDepthList29 (int ieta, int iphi, int depth) const
 
std::vector< int > mergedDepthList29 (int ieta, int iphi) const
 
unsigned int nCells (HcalSubdetector) const
 
unsigned int nCells () const
 
unsigned int numberOfCells (HcalSubdetector) const
 
void specialRBXHBHE (const std::vector< HcalDetId > &, std::vector< HcalDetId > &) const
 
bool specialRBXHBHE (bool flag, std::vector< HcalDetId > &) const
 
void unmergeDepthDetId (const HcalDetId &id, std::vector< HcalDetId > &ids) const
 
bool withSpecialRBXHBHE () const
 
 ~HcalDDDRecConstants ()
 

Private Member Functions

void getOneEtaBin (HcalSubdetector subdet, int ieta, int zside, std::vector< std::pair< int, double >> &phis, std::map< int, int > &layers, bool planOne, std::vector< HcalDDDRecConstants::HcalEtaBin > &bins) const
 
void initialize (void)
 
unsigned int layerGroup (int eta, int i) const
 
unsigned int layerGroupSize (int eta) const
 

Private Attributes

std::pair< int, int > depthMaxDf_
 
std::pair< int, int > depthMaxSp_
 
std::map< HcalDetId, HcalDetIddetIdSp_
 
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
 
std::vector< std::pair< int, int > > etaSimValu
 
std::vector< double > etaTable
 
std::vector< std::pair< double, double > > gconsHB
 
std::vector< std::pair< double, double > > gconsHE
 
const HcalDDDSimConstantshcons
 
const HcalParametershpar
 
std::vector< int > ietaMap
 
std::vector< int > iEtaMax
 
std::vector< int > iEtaMin
 
std::vector< int > maxDepth
 
int nHalves [2]
 
int nModule [2]
 
std::vector< int > nPhiBins
 
std::vector< double > phibin
 
std::vector< int > phiUnitS
 

Static Private Attributes

static const int maxLayer_ = 18
 
static const int maxLayerHB_ = 16
 

Detailed Description

this class reads the constant section of the hcal-sim-numbering xml-file

Author
Sunanda Banerjee, SINP sunan.nosp@m.da.b.nosp@m.anerj.nosp@m.ee@c.nosp@m.ern.c.nosp@m.h

Definition at line 23 of file HcalDDDRecConstants.h.

Constructor & Destructor Documentation

HcalDDDRecConstants::HcalDDDRecConstants ( const HcalParameters hp,
const HcalDDDSimConstants hc 
)

Definition at line 15 of file HcalDDDRecConstants.cc.

References initialize().

16  : hpar(hp), hcons(hc) {
17 #ifdef EDM_ML_DEBUG
18  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants::HcalDDDRecConstants (const HcalParameters* hp) constructor";
19 #endif
20  initialize();
21 }
const HcalParameters * hpar
const HcalDDDSimConstants & hcons
HcalDDDRecConstants::~HcalDDDRecConstants ( )

Definition at line 23 of file HcalDDDRecConstants.cc.

23  {
24 #ifdef EDM_ML_DEBUG
25  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants::destructed!!!";
26 #endif
27 }

Member Function Documentation

const HcalDDDSimConstants* HcalDDDRecConstants::dddConstants ( ) const
inline

Definition at line 126 of file HcalDDDRecConstants.h.

References trigObjTnPSource_cfi::bins, getOneEtaBin(), hcons, mps_fire::i, initialize(), layerGroup(), and layerGroupSize().

126 { return &hcons; }
const HcalDDDSimConstants & hcons
std::vector<std::pair<double, double> > HcalDDDRecConstants::getConstHBHE ( const int &  type) const
inline

Definition at line 54 of file HcalDDDRecConstants.h.

References HcalDDDRecConstants::HcalID::eta, gconsHB, gconsHE, getDepth(), HcalDDDRecConstants::HcalID::phi, and ecaldqm::zside().

Referenced by HcalFlexiHardcodeGeometryLoader::makeHBCells(), and HcalFlexiHardcodeGeometryLoader::makeHECells().

54  {
55  if (type == 0)
56  return gconsHB;
57  else if (type == 1)
58  return gconsHE;
59  else {
60  std::vector<std::pair<double, double>> gcons;
61  return gcons;
62  }
63  }
type
Definition: HCALResponse.h:21
std::vector< std::pair< double, double > > gconsHE
std::vector< std::pair< double, double > > gconsHB
std::vector< int > HcalDDDRecConstants::getDepth ( const int &  det,
const int &  phi,
const int &  zside,
const unsigned int &  eta 
) const

Definition at line 52 of file HcalDDDRecConstants.cc.

References customizeHLTforCMSSW::depths, HcalLayerDepthMap::getLayerDepth(), hcons, hgcalTopologyTester_cfi::layers, and HcalDDDSimConstants::ldMap().

Referenced by getConstHBHE(), and HcalTopology::HcalTopology().

55  {
56  std::map<int, int> layers;
57  hcons.ldMap()->getLayerDepth(det, eta + 1, phi, zside, layers);
58  if (layers.empty()) {
59  return getDepth(eta, false);
60  } else {
61  std::vector<int> depths;
62  for (unsigned int lay = 0; lay < layers.size(); ++lay)
63  depths.emplace_back(layers[lay + 1]);
64  return depths;
65  }
66 }
std::vector< int > getDepth(const int &det, const int &phi, const int &zside, const unsigned int &eta) const
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const
int zside(DetId const &)
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
std::vector< int > HcalDDDRecConstants::getDepth ( const unsigned int &  eta,
const bool &  extra 
) const

Definition at line 29 of file HcalDDDRecConstants.cc.

References customizeHLTforCMSSW::depths, HcalLayerDepthMap::getLayerDepth(), hcons, hpar, dqmdumpme::last, HcalParameters::layerGroupEtaRec, hgcalTopologyTester_cfi::layers, and HcalDDDSimConstants::ldMap().

29  {
30  if (!extra) {
31  std::vector<HcalParameters::LayerItem>::const_iterator last = hpar->layerGroupEtaRec.begin();
32  for (std::vector<HcalParameters::LayerItem>::const_iterator it = hpar->layerGroupEtaRec.begin();
33  it != hpar->layerGroupEtaRec.end();
34  ++it) {
35  if (it->layer == eta + 1)
36  return it->layerGroup;
37  if (it->layer > eta + 1)
38  return last->layerGroup;
39  last = it;
40  }
41  return last->layerGroup;
42  } else {
43  std::map<int, int> layers;
44  hcons.ldMap()->getLayerDepth(eta + 1, layers);
45  std::vector<int> depths;
46  for (unsigned int lay = 0; lay < layers.size(); ++lay)
47  depths.emplace_back(layers[lay + 1]);
48  return depths;
49  }
50 }
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
int HcalDDDRecConstants::getDepthEta16 ( const int &  det,
const int &  iphi,
const int &  zside 
) const
inline

Definition at line 66 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getDepthEta16(), and hcons.

Referenced by HcalTopology::depthBinInformation(), HcalTopology::incrementDepth(), and HcalTopology::validRaw().

66  {
67  return hcons.getDepthEta16(det, iphi, zside);
68  }
int zside(DetId const &)
const HcalDDDSimConstants & hcons
int getDepthEta16(const int &det, const int &phi, const int &zside) const
int HcalDDDRecConstants::getDepthEta29 ( const int &  iphi,
const int &  zside,
const int &  type 
) const
inline

Definition at line 69 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getDepthEta29(), getEtaBins(), getEtaPhi(), hcons, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, and HcalDDDRecConstants::HcalID::subdet.

Referenced by HcalTopology::decrementDepth().

69  {
70  return hcons.getDepthEta29(iphi, zside, type);
71  }
type
Definition: HCALResponse.h:21
int zside(DetId const &)
int getDepthEta29(const int &phi, const int &zside, const int &i) const
const HcalDDDSimConstants & hcons
std::vector< HcalDDDRecConstants::HcalEtaBin > HcalDDDRecConstants::getEtaBins ( const int &  itype) const

Definition at line 68 of file HcalDDDRecConstants.cc.

References trigObjTnPSource_cfi::bins, spr::find(), dqmdumpme::first, HcalLayerDepthMap::getLayerDepth(), getLayerDepth(), getOneEtaBin(), getPhis(), hcons, mps_fire::i, LEDCalibrationChannels::ieta, iEtaMax, iEtaMin, dqmdumpme::k, hgcalTopologyTester_cfi::layers, HcalDDDSimConstants::ldMap(), phi, HcalLayerDepthMap::validDet(), and ecaldqm::zside().

Referenced by getDepthEta29(), getThickActive(), HcalCellTypes(), HcalTopology::HcalTopology(), HcalFlexiHardcodeGeometryLoader::makeHBCells(), HcalFlexiHardcodeGeometryLoader::makeHECells(), and nCells().

68  {
69  std::vector<HcalDDDRecConstants::HcalEtaBin> bins;
70  unsigned int type = (itype == 0) ? 0 : 1;
71  HcalSubdetector subdet = HcalSubdetector(type + 1);
72  std::vector<int> phiSp;
73  HcalSubdetector subdetSp = HcalSubdetector(hcons.ldMap()->validDet(phiSp));
74  std::map<int, int> layers;
75  for (int iz = 0; iz < 2; ++iz) {
76  int zside = 2 * iz - 1;
77  for (int ieta = iEtaMin[type]; ieta <= iEtaMax[type]; ++ieta) {
78  std::vector<std::pair<int, double>> phis = getPhis(subdet, ieta);
79  std::vector<std::pair<int, double>> phiUse;
80  getLayerDepth(ieta, layers);
81  if (subdet == subdetSp) {
82  for (auto& phi : phis) {
83  if (std::find(phiSp.begin(), phiSp.end(), (zside * phi.first)) == phiSp.end()) {
84  phiUse.emplace_back(phi);
85  }
86  }
87  } else {
88  phiUse.insert(phiUse.end(), phis.begin(), phis.end());
89  }
90  if (!phiUse.empty())
91  getOneEtaBin(subdet, ieta, zside, phiUse, layers, false, bins);
92  }
93  }
94  if (subdetSp == subdet) {
95  for (int ieta = iEtaMin[type]; ieta <= iEtaMax[type]; ++ieta) {
96  std::vector<std::pair<int, double>> phis = getPhis(subdet, ieta);
97  for (int iz = 0; iz < 2; ++iz) {
98  int zside = 2 * iz - 1;
99  std::vector<std::pair<int, double>> phiUse;
100  for (int i : phiSp) {
101  for (auto& phi : phis) {
102  if (i == zside * phi.first) {
103  phiUse.emplace_back(phi);
104  break;
105  }
106  }
107  }
108  if (!phiUse.empty()) {
109  hcons.ldMap()->getLayerDepth(subdet, ieta, phiUse[0].first, zside, layers);
110  getOneEtaBin(subdet, ieta, zside, phiUse, layers, true, bins);
111  }
112  }
113  }
114  }
115 #ifdef EDM_ML_DEBUG
116  edm::LogVerbatim("HcalGeom") << "Prepares " << bins.size() << " eta bins for type " << type;
117  for (unsigned int i = 0; i < bins.size(); ++i) {
118  edm::LogVerbatim("HcalGeom") << "Bin[" << i << "]: Eta = (" << bins[i].ieta << ":" << bins[i].etaMin << ":"
119  << bins[i].etaMax << "), Zside = " << bins[i].zside << ", phis = ("
120  << bins[i].phis.size() << ":" << bins[i].dphi << ") and " << bins[i].layer.size()
121  << " depths (start) " << bins[i].depthStart;
122  for (unsigned int k = 0; k < bins[i].layer.size(); ++k)
123  edm::LogVerbatim("HcalGeom") << " [" << k << "] " << bins[i].layer[k].first << ":" << bins[i].layer[k].second;
124  edm::LogVerbatim("HcalGeom") << "Phi sets";
125  for (unsigned int k = 0; k < bins[i].phis.size(); ++k)
126  edm::LogVerbatim("HcalGeom") << "[" << k << "] " << bins[i].phis[k].first << ":" << bins[i].phis[k].second;
127  }
128 #endif
129  return bins;
130 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const
void getOneEtaBin(HcalSubdetector subdet, int ieta, int zside, std::vector< std::pair< int, double >> &phis, std::map< int, int > &layers, bool planOne, std::vector< HcalDDDRecConstants::HcalEtaBin > &bins) const
int zside(DetId const &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
int validDet(std::vector< int > &phis) const
std::vector< int > iEtaMax
HcalSubdetector
Definition: HcalAssistant.h:31
void getLayerDepth(const int &ieta, std::map< int, int > &layers) const
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
std::pair<double, double> HcalDDDRecConstants::getEtaLimit ( const int &  i) const
inline

Definition at line 77 of file HcalDDDRecConstants.h.

References HcalDDDRecConstants::HcalID::depth, etaTable, getHCID(), getHFCellParameters(), getLayerBack(), getLayerDepth(), getLayerFront(), mps_fire::i, and hgcalTopologyTester_cfi::layers.

77  {
78  return std::pair<double, double>(etaTable[i], etaTable[i + 1]);
79  }
std::vector< double > etaTable
std::pair< double, double > HcalDDDRecConstants::getEtaPhi ( const int &  subdet,
const int &  ieta,
const int &  iphi 
) const

Definition at line 132 of file HcalDDDRecConstants.cc.

References PVValHelper::eta, etaTable, HcalParameters::etaTableHF, HcalBarrel, HcalEndcap, HcalOuter, hcons, hpar, iEtaMax, iEtaMin, M_PI, phi, phibin, HcalParameters::phioff, HcalParameters::phitable, unit(), and HcalDDDSimConstants::unitPhi().

Referenced by HGCalSimHitStudy::analyzeHits(), HGCalSimHitValidation::analyzeHits(), and getDepthEta29().

132  {
133  int ietaAbs = (ieta > 0) ? ieta : -ieta;
134  double eta(0), phi(0);
135  if ((subdet == static_cast<int>(HcalBarrel)) || (subdet == static_cast<int>(HcalEndcap)) ||
136  (subdet == static_cast<int>(HcalOuter))) { // Use Eta Table
137  int unit = hcons.unitPhi(phibin[ietaAbs - 1]);
138  int kphi = (unit == 2) ? ((iphi - 1) / 2 + 1) : iphi;
139  double foff = (ietaAbs <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
140  eta = 0.5 * (etaTable[ietaAbs - 1] + etaTable[ietaAbs]);
141  phi = foff + (kphi - 0.5) * phibin[ietaAbs - 1];
142  } else {
143  ietaAbs -= iEtaMin[2];
144  int unit = hcons.unitPhi(hpar->phitable[ietaAbs - 1]);
145  int kphi = (unit == 4) ? ((iphi - 3) / 4 + 1) : ((iphi - 1) / 2 + 1);
146  double foff = (unit > 2) ? hpar->phioff[4] : hpar->phioff[2];
147  eta = 0.5 * (hpar->etaTableHF[ietaAbs - 1] + hpar->etaTableHF[ietaAbs]);
148  phi = foff + (kphi - 0.5) * hpar->phitable[ietaAbs - 1];
149  }
150  if (ieta < 0)
151  eta = -eta;
152  if (phi > M_PI)
153  phi -= (2 * M_PI);
154 #ifdef EDM_ML_DEBUG
155  edm::LogVerbatim("HcalGeom") << "getEtaPhi: subdet|ieta|iphi " << subdet << "|" << ieta << "|" << iphi << " eta|phi "
156  << eta << "|" << phi;
157 #endif
158  return std::pair<double, double>(eta, phi);
159 }
std::vector< int > iEtaMin
std::vector< double > etaTableHF
const HcalParameters * hpar
std::vector< double > phibin
int unitPhi(const int &det, const int &etaR) const
std::vector< int > iEtaMax
#define M_PI
std::vector< double > phioff
std::vector< double > etaTable
std::vector< double > phitable
const HcalDDDSimConstants & hcons
Basic3DVector unit() const
std::pair<int, int> HcalDDDRecConstants::getEtaRange ( const int &  i) const
inline
const std::vector<double>& HcalDDDRecConstants::getEtaTable ( ) const
inline

Definition at line 75 of file HcalDDDRecConstants.h.

References etaTable.

Referenced by HcalTopology::HcalTopology(), and CaloTowerHardcodeGeometryLoader::load().

75 { return etaTable; }
std::vector< double > etaTable
const std::vector<double>& HcalDDDRecConstants::getEtaTableHF ( ) const
inline

Definition at line 76 of file HcalDDDRecConstants.h.

References HcalParameters::etaTableHF, and hpar.

Referenced by HcalTopology::HcalTopology(), and CaloTowerHardcodeGeometryLoader::load().

76 { return hpar->etaTableHF; }
std::vector< double > etaTableHF
const HcalParameters * hpar
HcalDDDRecConstants::HcalID HcalDDDRecConstants::getHCID ( int  subdet,
int  ieta,
int  iphi,
int  lay,
int  idepth 
) const

Definition at line 161 of file HcalDDDRecConstants.cc.

References LEDCalibrationChannels::depth, PVValHelper::eta, HcalDDDSimConstants::findDepth(), HcalDDDSimConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta29(), HcalBarrel, HcalEndcap, HcalOuter, hcons, hpar, LEDCalibrationChannels::ieta, ietaMap, iEtaMin, createfilelist::int, layerGroup(), maxLayerHB_, HcalParameters::noff, phi, phibin, HcalParameters::phigroup, HcalDDDSimConstants::phiNumber(), HcalParameters::phioff, phiUnitS, unit(), HcalDDDSimConstants::unitPhi(), and ecaldqm::zside().

Referenced by HGCalHitValidation::analyze(), getEtaLimit(), and HcalHitRelabeller::relabel().

161  {
162  int ieta = (keta > 0) ? keta : -keta;
163  int zside = (keta > 0) ? 1 : -1;
164  int eta(ieta), phi(iphi), depth(idepth);
165  if ((subdet == static_cast<int>(HcalOuter)) ||
166  ((subdet == static_cast<int>(HcalBarrel)) && (lay > maxLayerHB_ + 1))) {
167  subdet = static_cast<int>(HcalOuter);
168  depth = 4;
169  } else if (subdet == static_cast<int>(HcalBarrel) || subdet == static_cast<int>(HcalEndcap)) {
170  eta = ietaMap[ieta - 1];
171  int unit = phiUnitS[ieta - 1];
172  int phi0 = (iphi - 1) / (hpar->phigroup[eta - 1]);
173  if (unit == 2) {
174  phi0 = (iphi + 1) / 2;
175  phi0 = (phi0 - 1) / (hpar->phigroup[eta - 1]);
176  } else if (unit == 4) {
177  phi0 = (iphi + 1) / 4;
178  phi0 = (phi0 - 1) / (hpar->phigroup[eta - 1]);
179  }
180  ++phi0;
181  unit = hcons.unitPhi(phibin[eta - 1]);
182  phi = hcons.phiNumber(phi0, unit);
183  depth = hcons.findDepth(subdet, eta, phi, zside, lay - 1);
184  if (depth <= 0)
185  depth = layerGroup(eta - 1, lay - 1);
186  if (eta == iEtaMin[1]) {
187  if (subdet == static_cast<int>(HcalBarrel)) {
188  if (depth > hcons.getDepthEta16(subdet, phi, zside))
189  depth = hcons.getDepthEta16(subdet, phi, zside);
190  } else {
191  if (depth < hcons.getDepthEta16(subdet, phi, zside))
192  depth = hcons.getDepthEta16(subdet, phi, zside);
193  }
194  } else if (eta == hpar->noff[0] && lay > 1) {
195  int kphi = phi + int((hpar->phioff[3] + 0.1) / phibin[eta - 1]);
196  kphi = (kphi - 1) % 4 + 1;
197  if (kphi == 2 || kphi == 3)
198  depth = layerGroup(eta - 1, lay - 2);
199  } else if (eta == hpar->noff[1] && depth > hcons.getDepthEta29(phi, zside, 0)) {
200  eta -= hcons.getDepthEta29(phi, zside, 1);
201  }
202  }
203 #ifdef EDM_ML_DEBUG
204  edm::LogVerbatim("HcalGeom") << "getHCID: input " << subdet << ":" << ieta << ":" << iphi << ":" << idepth << ":"
205  << lay << " output " << eta << ":" << phi << ":" << depth;
206 #endif
207  return HcalDDDRecConstants::HcalID(subdet, eta, phi, depth);
208 }
std::vector< int > iEtaMin
int findDepth(const int &det, const int &eta, const int &phi, const int &zside, const int &lay) const
unsigned int layerGroup(int eta, int i) const
int phiNumber(const int &phi, const int &unit) const
int zside(DetId const &)
std::vector< int > phiUnitS
const HcalParameters * hpar
std::vector< double > phibin
int getDepthEta29(const int &phi, const int &zside, const int &i) const
int unitPhi(const int &det, const int &etaR) const
std::vector< int > ietaMap
std::vector< double > phioff
const HcalDDDSimConstants & hcons
std::vector< int > noff
std::vector< int > phigroup
static const int maxLayerHB_
Basic3DVector unit() const
int getDepthEta16(const int &det, const int &phi, const int &zside) const
std::vector< HcalDDDRecConstants::HFCellParameters > HcalDDDRecConstants::getHFCellParameters ( ) const

Definition at line 210 of file HcalDDDRecConstants.cc.

References funct::abs(), hgcalTopologyTester_cfi::cell1, hgcalTopologyTester_cfi::cell2, postprocess-scan-build::cells, HcalDDDSimConstants::getIdHF2QIE(), HcalDDDSimConstants::getPhiTableHF(), HcalDDDSimConstants::getRTableHF(), hcons, LEDCalibrationChannels::ieta, iEtaMin, createfilelist::int, LEDCalibrationChannels::iphi, dqmdumpme::k, maxDepth, HLT_2018_cff::nEta, photonAnalyzer_cfi::rMax, and photonAnalyzer_cfi::rMin.

Referenced by getEtaLimit(), and HcalFlexiHardcodeGeometryLoader::makeHFCells().

210  {
211  std::vector<HcalDDDRecConstants::HFCellParameters> cells;
212  unsigned int nEta = hcons.getPhiTableHF().size();
213  if (maxDepth[2] > 0) {
214  for (unsigned int k = 0; k < nEta; ++k) {
215  int ieta = iEtaMin[2] + k;
216  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k] / (5._deg));
217  int iphi = (dphi == 4) ? 3 : 1;
218  int nphi = 72 / dphi;
219  double rMin = hcons.getRTableHF()[nEta - k - 1] / CLHEP::cm;
220  double rMax = hcons.getRTableHF()[nEta - k] / CLHEP::cm;
221  HcalDDDRecConstants::HFCellParameters cell1(ieta, 1, iphi, dphi, nphi, rMin, rMax);
222  cells.emplace_back(cell1);
223  HcalDDDRecConstants::HFCellParameters cell2(-ieta, 1, iphi, dphi, nphi, rMin, rMax);
224  cells.emplace_back(cell2);
225  }
226  }
227  if (maxDepth[2] > 2) {
228  if (!hcons.getIdHF2QIE().empty()) {
229  for (unsigned int k = 0; k < hcons.getIdHF2QIE().size(); ++k) {
230  int ieta = hcons.getIdHF2QIE()[k].ieta();
231  int ind = std::abs(ieta) - iEtaMin[2];
232  int dphi = (int)(0.001 + hcons.getPhiTableHF()[ind] / (5._deg));
233  int iphi = hcons.getIdHF2QIE()[k].iphi();
234  double rMin = hcons.getRTableHF()[nEta - ind - 1] / CLHEP::cm;
235  double rMax = hcons.getRTableHF()[nEta - ind] / CLHEP::cm;
236  HcalDDDRecConstants::HFCellParameters cell1(ieta, 3, iphi, dphi, 1, rMin, rMax);
237  cells.emplace_back(cell1);
238  }
239  } else {
240  for (unsigned int k = 0; k < nEta; ++k) {
241  int ieta = iEtaMin[2] + k;
242  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k] / (5._deg));
243  int iphi = (dphi == 4) ? 3 : 1;
244  int nphi = 72 / dphi;
245  double rMin = hcons.getRTableHF()[nEta - k - 1] / CLHEP::cm;
246  double rMax = hcons.getRTableHF()[nEta - k] / CLHEP::cm;
247  HcalDDDRecConstants::HFCellParameters cell1(ieta, 3, iphi, dphi, nphi, rMin, rMax);
248  cells.emplace_back(cell1);
249  HcalDDDRecConstants::HFCellParameters cell2(-ieta, 3, iphi, dphi, nphi, rMin, rMax);
250  cells.emplace_back(cell2);
251  }
252  }
253  }
254 #ifdef EDM_ML_DEBUG
255  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants returns " << cells.size() << " HF cell parameters";
256  for (unsigned int k = 0; k < cells.size(); ++k)
257  edm::LogVerbatim("HcalGeom") << "Cell[" << k << "] : (" << cells[k].ieta << ", " << cells[k].depth << ", "
258  << cells[k].firstPhi << ", " << cells[k].stepPhi << ", " << cells[k].nPhi << ", "
259  << cells[k].rMin << ", " << cells[k].rMax << ")";
260 #endif
261  return cells;
262 }
std::vector< int > iEtaMin
std::vector< int > maxDepth
const std::vector< double > & getRTableHF() const
const std::vector< double > & getPhiTableHF() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HcalDDDSimConstants & hcons
const std::vector< HcalDetId > & getIdHF2QIE() const
double HcalDDDRecConstants::getLayer0Wt ( const int &  det,
const int &  phi,
const int &  zside 
) const
inline

Definition at line 85 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getLayer0Wt(), and hcons.

Referenced by HcalHitRelabeller::energyWt().

85  {
86  return hcons.getLayer0Wt(det, phi, zside);
87  }
int zside(DetId const &)
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
const HcalDDDSimConstants & hcons
int HcalDDDRecConstants::getLayerBack ( const int &  det,
const int &  eta,
const int &  phi,
const int &  depth 
) const

Definition at line 277 of file HcalDDDRecConstants.cc.

References PVValHelper::eta, ALCARECOTkAlBeamHalo_cff::etaMax, HcalDDDSimConstants::getLastLayer(), HcalLayerDepthMap::getLayerBack(), hcons, LEDCalibrationChannels::ieta, dqmdumpme::k, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), and ecaldqm::zside().

Referenced by getEtaLimit(), and getRZ().

277  {
278  int subdet = (idet == 1) ? 1 : 2;
279  int zside = (ieta > 0) ? 1 : -1;
280  int eta = zside * ieta;
281  int layBack = hcons.ldMap()->getLayerBack(subdet, eta, iphi, zside, depth);
282  int laymax = hcons.getLastLayer(subdet, ieta);
283  if (layBack < 0 && eta <= hpar->etaMax[1]) {
284  for (unsigned int k = 0; k < layerGroupSize(eta - 1); ++k) {
285  if (depth + 1 == (int)layerGroup(eta - 1, k)) {
286  layBack = k - 1;
287  break;
288  }
289  }
290  }
291  if (layBack < 0 || layBack > laymax)
292  layBack = laymax;
293 #ifdef EDM_ML_DEBUG
294  edm::LogVerbatim("HcalGeom") << "getLayerBack::Input " << idet << ":" << ieta << ":" << iphi << ":" << depth
295  << " Output " << layBack;
296 #endif
297  return layBack;
298 }
unsigned int layerGroup(int eta, int i) const
int zside(DetId const &)
int getLayerBack(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
int getLastLayer(const int &det, const int &eta) const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
void HcalDDDRecConstants::getLayerDepth ( const int &  ieta,
std::map< int, int > &  layers 
) const

Definition at line 264 of file HcalDDDRecConstants.cc.

References cmsLHEtoEOSManager::l, layerGroup(), and layerGroupSize().

Referenced by getEtaBins(), and getEtaLimit().

264  {
265  layers.clear();
266  for (unsigned int l = 0; l < layerGroupSize(ieta - 1); ++l) {
267  int lay = l + 1;
268  layers[lay] = layerGroup(ieta - 1, l);
269  }
270 #ifdef EDM_ML_DEBUG
271  edm::LogVerbatim("HcalGeom") << "getLayerDepth::Input " << ieta << " Output " << layers.size() << " entries";
272  for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
273  edm::LogVerbatim("HcalGeom") << " [" << itr->first << "] " << itr->second;
274 #endif
275 }
unsigned int layerGroup(int eta, int i) const
unsigned int layerGroupSize(int eta) const
int HcalDDDRecConstants::getLayerFront ( const int &  det,
const int &  eta,
const int &  phi,
const int &  depth 
) const

Definition at line 300 of file HcalDDDRecConstants.cc.

References PVValHelper::eta, ALCARECOTkAlBeamHalo_cff::etaMax, HcalDDDSimConstants::getFrontLayer(), HcalLayerDepthMap::getLayerFront(), HcalEndcap, hcons, LEDCalibrationChannels::ieta, dqmdumpme::k, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), and ecaldqm::zside().

Referenced by getEtaLimit(), getRZ(), and getThickActive().

300  {
301  int subdet = (idet == 1) ? 1 : 2;
302  int zside = (ieta > 0) ? 1 : -1;
303  int eta = zside * ieta;
304  int layFront = hcons.ldMap()->getLayerFront(subdet, eta, iphi, zside, depth);
305  int laymin = hcons.getFrontLayer(subdet, ieta);
306  if ((layFront < 0) || ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16))) {
307  if ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16)) {
308  layFront = laymin;
309  } else if (eta <= hpar->etaMax[1]) {
310  for (unsigned int k = 0; k < layerGroupSize(eta - 1); ++k) {
311  if (depth == (int)layerGroup(eta - 1, k)) {
312  if ((int)(k) >= laymin) {
313  layFront = k;
314  break;
315  }
316  }
317  }
318  }
319  } else {
320  if (layFront < laymin)
321  layFront = laymin;
322  }
323 #ifdef EDM_ML_DEBUG
324  edm::LogVerbatim("HcalGeom") << "getLayerFront::Input " << idet << ":" << ieta << ":" << iphi << ":" << depth
325  << " Output " << layFront;
326 #endif
327  return layFront;
328 }
int getFrontLayer(const int &det, const int &eta) const
unsigned int layerGroup(int eta, int i) const
int zside(DetId const &)
int getLayerFront(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
int HcalDDDRecConstants::getMaxDepth ( const int &  type) const
inline
int HcalDDDRecConstants::getMaxDepth ( const int &  itype,
const int &  ieta,
const int &  iphi,
const int &  zside 
) const

Definition at line 330 of file HcalDDDRecConstants.cc.

References HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getDepthEta29M(), HcalDDDSimConstants::getMaxDepth(), hcons, hpar, iEtaMax, createfilelist::int, layerGroup(), layerGroupSize(), maxLayer_, maxLayerHB_, and HcalParameters::noff.

330  {
331  unsigned int type = (itype == 0) ? 0 : 1;
332  int lmax = hcons.getMaxDepth(type + 1, ieta, iphi, zside, true);
333  if (lmax < 0) {
334  unsigned int lymax = (type == 0) ? maxLayerHB_ + 1 : maxLayer_ + 1;
335  lmax = 0;
336  if (layerGroupSize(ieta - 1) > 0) {
337  if (layerGroupSize(ieta - 1) < lymax)
338  lymax = layerGroupSize(ieta - 1);
339  lmax = (int)(layerGroup(ieta - 1, lymax - 1));
340  if (type == 0 && ieta == iEtaMax[type])
341  lmax = hcons.getDepthEta16M(1);
342  if (type == 1 && ieta >= hpar->noff[1])
343  lmax = hcons.getDepthEta29M(0, false);
344  }
345  }
346 #ifdef EDM_ML_DEBUG
347  edm::LogVerbatim("HcalGeom") << "getMaxDepth::Input " << itype << ":" << ieta << ":" << iphi << ":" << zside
348  << " Output " << lmax;
349 #endif
350  return lmax;
351 }
type
Definition: HCALResponse.h:21
unsigned int layerGroup(int eta, int i) const
static const int maxLayer_
int zside(DetId const &)
const HcalParameters * hpar
int getMaxDepth(const int &type) const
std::vector< int > iEtaMax
int getDepthEta16M(const int &det) const
int getDepthEta29M(const int &i, const bool &planOne) const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
std::vector< int > noff
static const int maxLayerHB_
int HcalDDDRecConstants::getMinDepth ( const int &  itype,
const int &  ieta,
const int &  iphi,
const int &  zside 
) const

Definition at line 353 of file HcalDDDRecConstants.cc.

References HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getMinDepth(), hcons, iEtaMin, createfilelist::int, layerGroup(), layerGroupSize(), and maxDepth.

Referenced by HcalHBHEMuonSimAnalyzer::analyze(), HcalRaddamMuon::analyze(), HcalHBHEMuonAnalyzer::depth16HE(), HcalHBHEMuonHighEtaAnalyzer::depth16HE(), HcalTopology::depthBinInformation(), HcalGeometry::getClosestCell(), and getMaxDepth().

353  {
354  int lmin = hcons.getMinDepth(itype + 1, ieta, iphi, zside, true);
355  if (lmin < 0) {
356  if (itype == 2) { // HFn
357  lmin = 1;
358  } else if (itype == 3) { //HO
359  lmin = maxDepth[3];
360  } else {
361  unsigned int type = (itype == 0) ? 0 : 1;
362  if (layerGroupSize(ieta - 1) > 0) {
363  if (type == 1 && ieta == iEtaMin[type])
364  lmin = hcons.getDepthEta16M(2);
365  else
366  lmin = (int)(layerGroup(ieta - 1, 0));
367  }
368  }
369  }
370  return lmin;
371 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
int getMinDepth(const int &det, const int &eta, const int &phi, const int &zside, const bool &partialOnly) const
unsigned int layerGroup(int eta, int i) const
std::vector< int > maxDepth
int zside(DetId const &)
int getDepthEta16M(const int &det) const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
int HcalDDDRecConstants::getNEta ( ) const
inline

Definition at line 91 of file HcalDDDRecConstants.h.

References HcalParameters::etagroup, and hpar.

Referenced by HcalTopology::HcalTopology().

91 { return hpar->etagroup.size(); }
std::vector< int > etagroup
const HcalParameters * hpar
int HcalDDDRecConstants::getNoff ( const int &  i) const
inline

Definition at line 92 of file HcalDDDRecConstants.h.

References hpar, mps_fire::i, and HcalParameters::noff.

Referenced by HcalTopology::validRaw().

92 { return hpar->noff[i]; }
const HcalParameters * hpar
std::vector< int > noff
int HcalDDDRecConstants::getNPhi ( const int &  type) const
inline
void HcalDDDRecConstants::getOneEtaBin ( HcalSubdetector  subdet,
int  ieta,
int  zside,
std::vector< std::pair< int, double >> &  phis,
std::map< int, int > &  layers,
bool  planOne,
std::vector< HcalDDDRecConstants::HcalEtaBin > &  bins 
) const
private

Definition at line 707 of file HcalDDDRecConstants.cc.

References angle_units::operators::convertRadToDeg(), HcalDDDRecConstants::HcalEtaBin::depthStart, etaTable, dqmdumpme::first, HcalDDDSimConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getDepthEta29(), HcalDDDSimConstants::getDepthEta29M(), HcalBarrel, HcalEndcap, hcons, hpar, iEtaMax, iEtaMin, dqmdumpme::k, cmsLHEtoEOSManager::l, HcalDDDRecConstants::HcalEtaBin::layer, maxLayer_, maxLayerHB_, dqmiodumpmetadata::n, HcalParameters::noff, phibin, HcalDDDRecConstants::HcalEtaBin::phis, and edm::second().

Referenced by dddConstants(), and getEtaBins().

713  {
714  unsigned int lymax = (subdet == HcalBarrel) ? maxLayerHB_ + 1 : maxLayer_ + 1;
715  int type = (subdet == HcalBarrel) ? 0 : 1;
716  double dphi = phibin[ieta - 1];
719  etabin.phis.insert(etabin.phis.end(), phis.begin(), phis.end());
720  int n = (ieta == iEtaMax[type]) ? 0 : 1;
723  etabin0.depthStart = hcons.getDepthEta29(phis[0].first, zside, 0) + 1;
724  int dstart = -1;
725  int lmin(0), lmax(0);
726 
727  std::map<int, int>::iterator itr = layers.begin();
728  if (!layers.empty()) {
729  int dep = itr->second;
730  if (subdet == HcalEndcap && ieta == iEtaMin[type])
731  dep = hcons.getDepthEta16(subdet, phis[0].first, zside);
732  unsigned lymx0 = (layers.size() > lymax) ? lymax : layers.size();
733 #ifdef EDM_ML_DEBUG
734  edm::LogVerbatim("HcalGeom") << "Eta " << ieta << ":" << hpar->noff[1] << " zside " << zside << " lymax " << lymx0
735  << ":" << lymax << " Depth " << dep << ":" << itr->second;
736  unsigned int l(0);
737  for (itr = layers.begin(); itr != layers.end(); ++itr, ++l)
738  edm::LogVerbatim("HcalGeom") << "Layer [" << l << "] " << itr->first << ":" << itr->second;
739  edm::LogVerbatim("HcalGeom") << "With " << phis.size() << " phis";
740  for (unsigned int l = 0; l < phis.size(); ++l)
741  edm::LogVerbatim("HcalGeom") << "[" << l << "] " << phis[l].first << ":" << convertRadToDeg(phis[l].second);
742 #endif
743  for (itr = layers.begin(); itr != layers.end(); ++itr) {
744  if (itr->first <= (int)(lymx0)) {
745  if (itr->second == dep) {
746  if (lmin == 0)
747  lmin = itr->first;
748  lmax = itr->first;
749  } else if (itr->second > dep) {
750  if (dstart < 0)
751  dstart = dep;
752  int lmax0 = (lmax >= lmin) ? lmax : lmin;
753  if (subdet == HcalEndcap && ieta + 1 == hpar->noff[1] && dep > hcons.getDepthEta29(phis[0].first, zside, 0)) {
754  etabin0.layer.emplace_back(std::pair<int, int>(lmin, lmax0));
755  } else {
756  etabin.layer.emplace_back(std::pair<int, int>(lmin, lmax0));
757  }
758  lmin = itr->first;
759  lmax = lmin - 1;
760  dep = itr->second;
761  }
762  if (subdet == HcalBarrel && ieta == iEtaMax[type] && dep > hcons.getDepthEta16M(1))
763  break;
764  if (subdet == HcalEndcap && ieta == hpar->noff[1] && dep > hcons.getDepthEta29M(0, planOne)) {
765  lmax = lymx0;
766  break;
767  }
768  if (itr->first == (int)(lymx0))
769  lmax = lymx0;
770  }
771  }
772  if (lmax >= lmin) {
773  if (ieta + 1 == hpar->noff[1]) {
774  etabin0.layer.emplace_back(std::pair<int, int>(lmin, lmax));
775  etabin0.phis.insert(etabin0.phis.end(), phis.begin(), phis.end());
776  bins.emplace_back(etabin0);
777 #ifdef EDM_ML_DEBUG
778  edm::LogVerbatim("HcalGeom") << "etabin0: dStatrt " << etabin0.depthStart << " layers " << etabin0.layer.size()
779  << ":" << lmin << ":" << lmax << " phis " << phis.size();
780  for (unsigned int k = 0; k < etabin0.layer.size(); ++k)
781  edm::LogVerbatim("HcalGeom") << " [" << k << "] " << etabin0.layer[k].first << ":" << etabin0.layer[k].second;
782 #endif
783  } else if (ieta == hpar->noff[1]) {
784  } else {
785  etabin.layer.emplace_back(std::pair<int, int>(lmin, lmax));
786  if (dstart < 0)
787  dstart = dep;
788  }
789  }
790  }
791  etabin.depthStart = dstart;
792  bins.emplace_back(etabin);
793 #ifdef EDM_ML_DEBUG
794  edm::LogVerbatim("HcalGeom") << "etabin: dStatrt " << etabin.depthStart << " layers " << etabin.layer.size() << ":"
795  << lmin << ":" << lmax << " phis " << etabin.phis.size();
796  for (unsigned int k = 0; k < etabin.layer.size(); ++k)
797  edm::LogVerbatim("HcalGeom") << "[" << k << "] " << etabin.layer[k].first << ":" << etabin.layer[k].second;
798 #endif
799 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
static const int maxLayer_
int zside(DetId const &)
U second(std::pair< T, U > const &p)
const HcalParameters * hpar
std::vector< double > phibin
int getDepthEta29(const int &phi, const int &zside, const int &i) const
std::vector< int > iEtaMax
std::vector< std::pair< int, int > > layer
int getDepthEta16M(const int &det) const
int getDepthEta29M(const int &i, const bool &planOne) const
std::vector< double > etaTable
const HcalDDDSimConstants & hcons
std::vector< int > noff
std::vector< std::pair< int, double > > phis
static const int maxLayerHB_
int getDepthEta16(const int &det, const int &phi, const int &zside) const
double HcalDDDRecConstants::getPhiBin ( const int &  i) const
inline

Definition at line 94 of file HcalDDDRecConstants.h.

References mps_fire::i, and phibin.

94 { return phibin[i]; }
std::vector< double > phibin
double HcalDDDRecConstants::getPhiOff ( const int &  i) const
inline

Definition at line 95 of file HcalDDDRecConstants.h.

References hpar, mps_fire::i, and HcalParameters::phioff.

95 { return hpar->phioff[i]; }
const HcalParameters * hpar
std::vector< double > phioff
const std::vector<double>& HcalDDDRecConstants::getPhiOffs ( ) const
inline

Definition at line 96 of file HcalDDDRecConstants.h.

References getPhis(), hpar, and HcalParameters::phioff.

Referenced by HcalTopology::HcalTopology().

96 { return hpar->phioff; }
const HcalParameters * hpar
std::vector< double > phioff
std::vector< std::pair< int, double > > HcalDDDRecConstants::getPhis ( const int &  subdet,
const int &  ieta 
) const

Definition at line 373 of file HcalDDDRecConstants.cc.

References angle_units::operators::convertRadToDeg(), etaSimValu, dqmdumpme::first, HcalDDDSimConstants::getPhiCons(), HcalForward, hcons, LEDCalibrationChannels::iphi, dqmdumpme::k, phi, phibin, HcalDDDSimConstants::phiNumber(), edm::second(), HcalDDDSimConstants::unitPhi(), and units().

Referenced by HcalTestNumberingTester::analyze(), getEtaBins(), and getPhiOffs().

373  {
374  std::vector<std::pair<int, double>> phis;
375  int ietaAbs = (ieta > 0) ? ieta : -ieta;
376  int keta = (subdet != HcalForward) ? etaSimValu[ietaAbs - 1].first : ietaAbs;
377  std::pair<double, double> ficons = hcons.getPhiCons(subdet, keta);
378  double fioff = ficons.first;
379  double dphi = (subdet != HcalForward) ? phibin[ietaAbs - 1] : ficons.second;
380  int nphi = int((2._pi + 0.1 * dphi) / dphi);
381  int units = hcons.unitPhi(subdet, keta);
382  for (int ifi = 0; ifi < nphi; ++ifi) {
383  double phi = -fioff + (ifi + 0.5) * dphi;
384  int iphi = hcons.phiNumber(ifi + 1, units);
385  phis.emplace_back(std::pair<int, double>(iphi, phi));
386  }
387 #ifdef EDM_ML_DEBUG
388  edm::LogVerbatim("HcalGeom") << "getEtaPhi: subdet|ieta|iphi " << subdet << "|" << ieta << " with " << phis.size()
389  << " phi bins";
390  for (unsigned int k = 0; k < phis.size(); ++k)
391  edm::LogVerbatim("HcalGeom") << "[" << k << "] iphi " << phis[k].first << " phi "
392  << convertRadToDeg(phis[k].second);
393 #endif
394  return phis;
395 }
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
int phiNumber(const int &phi, const int &unit) const
U second(std::pair< T, U > const &p)
std::vector< double > phibin
int unitPhi(const int &det, const int &etaR) const
std::vector< std::pair< int, int > > etaSimValu
TString units(TString variable, Char_t axis)
const HcalDDDSimConstants & hcons
std::pair< double, double > getPhiCons(const int &det, const int &ieta) const
const std::vector<double>& HcalDDDRecConstants::getPhiTable ( ) const
inline

Definition at line 98 of file HcalDDDRecConstants.h.

References phibin.

Referenced by HcalTopology::HcalTopology().

98 { return phibin; }
std::vector< double > phibin
const std::vector<double>& HcalDDDRecConstants::getPhiTableHF ( ) const
inline

Definition at line 99 of file HcalDDDRecConstants.h.

References getPhiZOne(), getRZ(), getThickActive(), hpar, and HcalParameters::phitable.

Referenced by HcalTopology::HcalTopology().

99 { return hpar->phitable; }
const HcalParameters * hpar
std::vector< double > phitable
int HcalDDDRecConstants::getPhiZOne ( std::vector< std::pair< int, int >> &  phiz) const

Definition at line 397 of file HcalDDDRecConstants.cc.

References HcalLayerDepthMap::getPhis(), HcalLayerDepthMap::getSubdet(), hcons, dqmdumpme::k, HcalDDDSimConstants::ldMap(), phi, and ecaldqm::zside().

Referenced by getPhiTableHF(), and HcalTopology::getPhiZOne().

397  {
398  phiz.clear();
399  int subdet = hcons.ldMap()->getSubdet();
400  if (subdet > 0) {
401  std::vector<int> phis = hcons.ldMap()->getPhis();
402  for (int k : phis) {
403  int zside = (k > 0) ? 1 : -1;
404  int phi = (k > 0) ? k : -k;
405  phiz.emplace_back(std::pair<int, int>(phi, zside));
406  }
407  }
408 #ifdef EDM_ML_DEBUG
409  edm::LogVerbatim("HcalGeom") << "Special RBX for detector " << subdet << " with " << phiz.size() << " phi/z bins";
410  for (unsigned int k = 0; k < phiz.size(); ++k)
411  edm::LogVerbatim("HcalGeom") << " [" << k << "] " << phiz[k].first << ":" << phiz[k].second;
412 #endif
413  return subdet;
414 }
int getSubdet() const
int zside(DetId const &)
const std::vector< int > & getPhis() const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  ieta,
const int &  depth 
) const
double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  ieta,
const int &  iphi,
const int &  depth 
) const

Definition at line 420 of file HcalDDDRecConstants.cc.

References dqmdumpme::first, gconsHB, gconsHE, getLayerFront(), and HcalBarrel.

420  {
421  int layf = getLayerFront(subdet, ieta, iphi, depth);
422  double rz =
423  (layf < 0) ? 0.0 : ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layf].first) : (gconsHE[layf].first));
424 #ifdef EDM_ML_DEBUG
425  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet << "|" << ieta << "|" << iphi << "|"
426  << depth << " lay|rz " << layf << "|" << rz;
427 #endif
428  return rz;
429 }
std::vector< std::pair< double, double > > gconsHE
int getLayerFront(const int &det, const int &eta, const int &phi, const int &depth) const
std::vector< std::pair< double, double > > gconsHB
double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  layer 
) const

Definition at line 431 of file HcalDDDRecConstants.cc.

References dqmdumpme::first, gconsHB, gconsHE, HcalBarrel, and layerGroupSize().

431  {
432  double rz(0);
433  if (layer > 0 && layer <= (int)(layerGroupSize(0)))
434  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layer - 1].first) : (gconsHE[layer - 1].first));
435 #ifdef EDM_ML_DEBUG
436  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|layer " << subdet << "|" << layer << " rz " << rz;
437 #endif
438  return rz;
439 }
std::vector< std::pair< double, double > > gconsHE
std::vector< std::pair< double, double > > gconsHB
unsigned int layerGroupSize(int eta) const
std::pair< double, double > HcalDDDRecConstants::getRZ ( const HcalDetId id) const

Definition at line 441 of file HcalDDDRecConstants.cc.

References LEDCalibrationChannels::depth, dqmdumpme::first, gconsHB, gconsHE, getLayerBack(), getLayerFront(), HcalBarrel, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, edm::second(), and ecaldqm::zside().

441  {
442  int subdet = id.subdetId();
443  int ieta = id.ieta();
444  int iphi = id.iphi();
445  int depth = id.depth();
446  int zside = (subdet == static_cast<int>(HcalBarrel)) ? 1 : id.zside();
447  int layf = getLayerFront(subdet, ieta, iphi, depth);
448  double rzf = (layf < 0)
449  ? 0.0
450  : ((subdet == static_cast<int>(HcalBarrel)) ? zside * (gconsHB[layf].first - gconsHB[layf].second)
451  : zside * (gconsHE[layf].first - gconsHE[layf].second));
452  int layb = getLayerBack(subdet, ieta, iphi, depth);
453  double rzb = (layb < 0)
454  ? 0.0
455  : ((subdet == static_cast<int>(HcalBarrel)) ? zside * (gconsHB[layb].first + gconsHB[layb].second)
456  : zside * (gconsHE[layb].first + gconsHE[layb].second));
457 #ifdef EDM_ML_DEBUG
458  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet << "|" << ieta << "|" << iphi << "|"
459  << depth << " lay|rz (front) " << layf << "|" << rzf << " lay|rz (back) " << layb << "|"
460  << rzb;
461 #endif
462  return std::pair<double, double>(rzf, rzb);
463 }
int zside(DetId const &)
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > gconsHE
int getLayerFront(const int &det, const int &eta, const int &phi, const int &depth) const
std::vector< std::pair< double, double > > gconsHB
int getLayerBack(const int &det, const int &eta, const int &phi, const int &depth) const
std::vector< HcalDDDRecConstants::HcalActiveLength > HcalDDDRecConstants::getThickActive ( const int &  type) const

Definition at line 465 of file HcalDDDRecConstants.cc.

References newFWLiteAna::bin, trigObjTnPSource_cfi::bins, angle_units::operators::convertRadToDeg(), funct::cos(), HcalDDDRecConstants::HcalActiveLength::depth, LEDCalibrationChannels::depth, HcalDDDRecConstants::HcalActiveLength::eta, PVValHelper::eta, JetChargeProducer_cfi::exp, gconsHB, gconsHE, getEtaBins(), HcalDDDSimConstants::getLastLayer(), getLayerFront(), hcons, mps_fire::i, HcalDDDRecConstants::HcalActiveLength::ieta, LEDCalibrationChannels::ieta, iEtaMin, HcalDDDRecConstants::HcalActiveLength::iphis, dqmiolumiharvest::j, SiStripPI::max, min(), phi, Scenarios_cff::scale, edm::second(), funct::sin(), HcalDDDRecConstants::HcalActiveLength::stype, OrderedSet::t, theta(), HcalDDDRecConstants::HcalActiveLength::thick, HcalDDDRecConstants::HcalActiveLength::zside, and ecaldqm::zside().

Referenced by HcalHBHEMuonSimAnalyzer::beginRun(), HcalRaddamMuon::beginRun(), HcalHBHEMuonAnalyzer::beginRun(), HcalHBHEMuonHighEtaAnalyzer::beginRun(), and getPhiTableHF().

465  {
466  std::vector<HcalDDDRecConstants::HcalActiveLength> actives;
467  std::vector<HcalDDDRecConstants::HcalEtaBin> bins = getEtaBins(type);
468 #ifdef EDM_ML_DEBUG
469  unsigned int kount(0);
470 #endif
471  for (auto& bin : bins) {
472  int ieta = bin.ieta;
473  int zside = bin.zside;
474  int stype = (bin.phis.size() > 4) ? 0 : 1;
475  int layf = getLayerFront(type + 1, zside * ieta, bin.phis[0].first, bin.depthStart) + 1;
476  int layl = hcons.getLastLayer(type + 1, zside * ieta) + 1;
477  double eta = 0.5 * (bin.etaMin + bin.etaMax);
478  double theta = 2 * atan(exp(-eta));
479  double scale = 1.0 / ((type == 0) ? sin(theta) : cos(theta));
480  int depth = bin.depthStart;
481 #ifdef EDM_ML_DEBUG
482  edm::LogVerbatim("HcalGeom") << "Eta " << ieta << " zside " << zside << " depth " << depth << " Layers " << layf
483  << ":" << layl << ":" << bin.layer.size();
484  for (auto ll : bin.layer)
485  edm::LogVerbatim("HcalGeom") << "Layer " << ll.first << ":" << ll.second;
486  for (auto phi : bin.phis)
487  edm::LogVerbatim("HcalGeom") << "Phi " << phi.first << ":" << convertRadToDeg(phi.second);
488 #endif
489  for (unsigned int i = 0; i < bin.layer.size(); ++i) {
490  double thick(0);
491  int lmin = (type == 1 && ieta == iEtaMin[1]) ? layf : std::max(bin.layer[i].first, layf);
492  int lmax = std::min(bin.layer[i].second, layl);
493  for (int j = lmin; j <= lmax; ++j) {
494  double t = ((type == 0) ? gconsHB[j - 1].second : gconsHE[j - 1].second);
495  if ((type == 1) && (ieta <= 18))
496  t = gconsHE[j].second;
497  if (t > 0)
498  thick += t;
499  }
500 #ifdef EDM_ML_DEBUG
501  edm::LogVerbatim("HcalGeom") << "Type " << type << " L " << lmin << ":" << lmax << " T " << thick;
502 #endif
503  thick *= (2. * scale);
504  HcalDDDRecConstants::HcalActiveLength active(ieta, depth, zside, stype, zside * eta, thick);
505  for (auto phi : bin.phis)
506  active.iphis.emplace_back(phi.first);
507  actives.emplace_back(active);
508  ++depth;
509 #ifdef EDM_ML_DEBUG
510  kount++;
511  edm::LogVerbatim("HcalGeom") << "getThickActive: [" << kount << "] eta:" << active.ieta << ":" << active.eta
512  << " zside " << active.zside << " depth " << active.depth << " type " << active.stype
513  << " thick " << active.thick;
514 #endif
515  }
516  }
517  return actives;
518 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
int zside(DetId const &)
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > gconsHE
std::vector< HcalEtaBin > getEtaBins(const int &itype) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
T min(T a, T b)
Definition: MathUtil.h:58
int getLastLayer(const int &det, const int &eta) const
int getLayerFront(const int &det, const int &eta, const int &phi, const int &depth) const
std::vector< std::pair< double, double > > gconsHB
const HcalDDDSimConstants & hcons
int HcalDDDRecConstants::getTopoMode ( ) const
inline

Definition at line 106 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::topologyMode.

Referenced by HcalTopology::HcalTopology(), and HcalTopologyIdealEP::produce().

106 { return ((hpar->topologyMode) & 0xFF); }
const HcalParameters * hpar
int HcalDDDRecConstants::getTriggerMode ( ) const
inline

Definition at line 107 of file HcalDDDRecConstants.h.

References HcalCellTypes(), hpar, and HcalParameters::topologyMode.

Referenced by HcalTopology::HcalTopology().

107 { return (((hpar->topologyMode) >> 8) & 0xFF); }
const HcalParameters * hpar
std::vector< HcalCellType > HcalDDDRecConstants::HcalCellTypes ( HcalSubdetector  subdet) const

Definition at line 520 of file HcalDDDRecConstants.cc.

References postprocess-scan-build::cells, KineDebug3::count(), LEDCalibrationChannels::depth, defaults_cfi::etabins, etaSimValu, dqmdumpme::first, getEtaBins(), HcalBarrel, HcalDDDSimConstants::HcalCellTypes(), HcalEndcap, hcons, hpar, LEDCalibrationChannels::ieta, iEtaMax, createfilelist::int, HcalParameters::phioff, groupFilesInBlocks::temp, unit(), and HcalDDDSimConstants::unitPhi().

Referenced by HcalDDDGeometryLoader::fill(), getTriggerMode(), and numberOfCells().

520  {
521  if (subdet == HcalBarrel || subdet == HcalEndcap) {
522  std::vector<HcalCellType> cells;
523  int isub = (subdet == HcalBarrel) ? 0 : 1;
524  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
525  std::vector<int> missPhi;
526  for (const auto& etabin : etabins) {
527  std::vector<HcalCellType> temp;
528  std::vector<int> count;
529  std::vector<double> dmin, dmax;
530  for (unsigned int il = 0; il < etabin.layer.size(); ++il) {
531  HcalCellType cell(subdet, etabin.ieta, etabin.zside, 0, HcalCellType::HcalCell());
532  temp.emplace_back(cell);
533  count.emplace_back(0);
534  dmin.emplace_back(0);
535  dmax.emplace_back(0);
536  }
537  int ieta = etabin.ieta;
538  for (int keta = etaSimValu[ieta - 1].first; keta <= etaSimValu[ieta - 1].second; ++keta) {
539  std::vector<HcalCellType> cellsm = hcons.HcalCellTypes(subdet, keta, -1);
540  for (unsigned int il = 0; il < etabin.layer.size(); ++il) {
541  for (auto& ic : cellsm) {
542  if (ic.depthSegment() >= etabin.layer[il].first && ic.depthSegment() <= etabin.layer[il].second &&
543  ic.etaBin() == temp[il].etaBin() && ic.zside() == temp[il].zside()) {
544  if (count[il] == 0) {
545  temp[il] = ic;
546  dmin[il] = ic.depthMin();
547  dmax[il] = ic.depthMax();
548  }
549  ++count[il];
550  if (ic.depthMin() < dmin[il])
551  dmin[il] = ic.depthMin();
552  if (ic.depthMax() > dmax[il])
553  dmax[il] = ic.depthMax();
554  }
555  }
556  }
557  }
558  for (unsigned int il = 0; il < etabin.layer.size(); ++il) {
559  int depth = etabin.depthStart + (int)(il);
560  temp[il].setEta(ieta, etabin.etaMin, etabin.etaMax);
561  temp[il].setDepth(depth, dmin[il], dmax[il]);
562  double foff = (etabin.ieta <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
563  int unit = hcons.unitPhi(etabin.dphi);
564  temp[il].setPhi(etabin.phis, missPhi, foff, etabin.dphi, unit);
565  cells.emplace_back(temp[il]);
566  }
567  }
568 #ifdef EDM_ML_DEBUG
569  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants: found " << cells.size() << " cells for sub-detector type "
570  << isub;
571  for (unsigned int ic = 0; ic < cells.size(); ++ic)
572  edm::LogVerbatim("HcalGeom") << "Cell[" << ic << "] " << cells[ic];
573 #endif
574  return cells;
575  } else {
576  return hcons.HcalCellTypes(subdet, -1, -1);
577  }
578 }
const HcalParameters * hpar
std::vector< HcalEtaBin > getEtaBins(const int &itype) const
int unitPhi(const int &det, const int &etaR) const
std::vector< int > iEtaMax
std::vector< HcalCellType > HcalCellTypes() const
std::vector< std::pair< int, int > > etaSimValu
std::vector< double > phioff
const HcalDDDSimConstants & hcons
Basic3DVector unit() const
HcalDetId HcalDDDRecConstants::idBack ( const HcalDetId id) const

Definition at line 663 of file HcalDDDRecConstants.cc.

References detIdSpR_.

Referenced by HcalTopology::idBack(), and maxHFDepth().

663  {
664  HcalDetId hid(id);
665  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
666  if (itr != detIdSpR_.end())
667  hid = HcalDetId(id.subdet(), id.ieta(), id.iphi(), (itr->second).back().depth());
668  return hid;
669 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
HcalDetId HcalDDDRecConstants::idFront ( const HcalDetId id) const

Definition at line 655 of file HcalDDDRecConstants.cc.

References LEDCalibrationChannels::depth, and detIdSpR_.

Referenced by HcalTopology::idFront(), and maxHFDepth().

655  {
656  HcalDetId hid(id);
657  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
658  if (itr != detIdSpR_.end())
659  hid = HcalDetId(id.subdet(), id.ieta(), id.iphi(), (itr->second)[0].depth());
660  return hid;
661 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
void HcalDDDRecConstants::initialize ( void  )
private

Definition at line 801 of file HcalDDDRecConstants.cc.

References angle_units::operators::convertRadToDeg(), KineDebug3::count(), LEDCalibrationChannels::depth, depthMaxDf_, depthMaxSp_, customizeHLTforCMSSW::depths, detIdSp_, detIdSpR_, HcalParameters::drHB, HcalParameters::dzHE, PVValHelper::eta, HcalParameters::etagroup, ALCARECOTkAlBeamHalo_cff::etaMax, HcalParameters::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, HcalParameters::etaMin, EnergyCorrector::etas, etaSimValu, HcalParameters::etaTable, etaTable, HcalParameters::etaTableHF, Exception, RemoveAddSevLevel::flag, gconsHB, gconsHE, HcalDDDSimConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getDepthEta29M(), HcalLayerDepthMap::getDepths(), HcalLayerDepthMap::getLayerBack(), HcalLayerDepthMap::getLayerFront(), HcalDDDSimConstants::getMaxDepthDet(), HcalBarrel, HcalEndcap, hcons, hpar, mps_fire::i, photons_cff::ids, LEDCalibrationChannels::ieta, ietaMap, iEtaMax, iEtaMin, createfilelist::int, dqmdumpme::k, GetRecoTauVFromDQM_MC_cff::kk, cmsLHEtoEOSManager::l, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), genParticles_cff::map, HcalParameters::maxDepth, maxDepth, maxLayer_, maxLayerHB_, HcalParameters::modHB, HcalParameters::modHE, HLT_2018_cff::nEta, nHalves, nModule, HcalParameters::noff, nPhiBins, phi, HcalParameters::phibin, phibin, HcalParameters::phigroup, HcalParameters::phitable, phiUnitS, HcalParameters::rHB, edm::second(), unit(), HcalDDDSimConstants::unitPhi(), HcalLayerDepthMap::validDet(), HcalLayerDepthMap::validEta(), HcalParameters::zHE, and ecaldqm::zside().

Referenced by dddConstants(), and HcalDDDRecConstants().

801  {
802  //Eta grouping
803  int nEta = (int)(hpar->etagroup.size());
804  if (nEta != (int)(hpar->phigroup.size())) {
805  edm::LogError("HCalGeom") << "HcalDDDRecConstants: sizes of the vectors "
806  << " etaGroup (" << nEta << ") and phiGroup (" << hpar->phigroup.size()
807  << ") do not match";
808  throw cms::Exception("DDException") << "HcalDDDRecConstants: inconsistent array sizes" << nEta << ":"
809  << hpar->phigroup.size();
810  }
811 
812  // First eta table
813  iEtaMin = hpar->etaMin;
814  iEtaMax = hpar->etaMax;
815  etaTable.clear();
816  ietaMap.clear();
817  etaSimValu.clear();
818  int ieta(0), ietaHB(0), ietaHE(0), ietaHEM(0);
819  etaTable.emplace_back(hpar->etaTable[ieta]);
820  for (int i = 0; i < nEta; ++i) {
821  int ef = ieta + 1;
822  ieta += (hpar->etagroup[i]);
823  if (ieta >= (int)(hpar->etaTable.size())) {
824  edm::LogError("HCalGeom") << "HcalDDDRecConstants: Going beyond the array boundary " << hpar->etaTable.size()
825  << " at index " << i << " of etaTable from SimConstant";
826  throw cms::Exception("DDException")
827  << "HcalDDDRecConstants: Going beyond the array boundary " << hpar->etaTable.size() << " at index " << i
828  << " of etaTable from SimConstant";
829  } else {
830  etaTable.emplace_back(hpar->etaTable[ieta]);
831  etaSimValu.emplace_back(std::pair<int, int>(ef, ieta));
832  }
833  for (int k = 0; k < (hpar->etagroup[i]); ++k)
834  ietaMap.emplace_back(i + 1);
835  if (ieta <= hpar->etaMax[0])
836  ietaHB = i + 1;
837  if (ieta <= hpar->etaMin[1])
838  ietaHE = i + 1;
839  if (ieta <= hpar->etaMax[1])
840  ietaHEM = i + 1;
841  }
842  iEtaMin[1] = ietaHE;
843  iEtaMax[0] = ietaHB;
844  iEtaMax[1] = ietaHEM;
845 
846  // Then Phi bins
847  nPhiBins.clear();
848  for (unsigned int k = 0; k < 4; ++k)
849  nPhiBins.emplace_back(0);
850  ieta = 0;
851  phibin.clear();
852  phiUnitS.clear();
853  for (int i = 0; i < nEta; ++i) {
854  double dphi = (hpar->phigroup[i]) * (hpar->phibin[ieta]);
855  phibin.emplace_back(dphi);
856  int nphi = (int)((2._pi + 0.001) / dphi);
857  if (ieta <= iEtaMax[0]) {
858  if (nphi > nPhiBins[0])
859  nPhiBins[3] = nPhiBins[0] = nphi;
860  }
861  if (ieta >= iEtaMin[1]) {
862  if (nphi > nPhiBins[1])
863  nPhiBins[1] = nphi;
864  }
865  ieta += (hpar->etagroup[i]);
866  }
867  for (unsigned int i = 1; i < hpar->etaTable.size(); ++i) {
868  int unit = hcons.unitPhi(hpar->phibin[i - 1]);
869  phiUnitS.emplace_back(unit);
870  }
871  for (double i : hpar->phitable) {
872  int nphi = (int)((2._pi + 0.001) / i);
873  if (nphi > nPhiBins[2])
874  nPhiBins[2] = nphi;
875  }
876 #ifdef EDM_ML_DEBUG
877  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants: Modified eta/deltaphi table for " << nEta << " bins";
878  for (int i = 0; i < nEta; ++i)
879  edm::LogVerbatim("HcalGeom") << "Eta[" << i << "] = " << etaTable[i] << ":" << etaTable[i + 1] << ":"
880  << etaSimValu[i].first << ":" << etaSimValu[i].second << " PhiBin[" << i
881  << "] = " << convertRadToDeg(phibin[i]);
882  for (unsigned int i = 0; i < phiUnitS.size(); ++i)
883  edm::LogVerbatim("HcalGeom") << " PhiUnitS[" << i << "] = " << phiUnitS[i];
884  for (unsigned int i = 0; i < nPhiBins.size(); ++i)
885  edm::LogVerbatim("HcalGeom") << " nPhiBins[" << i << "] = " << nPhiBins[i];
886  for (unsigned int i = 0; i < hpar->etaTableHF.size(); ++i)
887  edm::LogVerbatim("HcalGeom") << " EtaTableHF[" << i << "] = " << hpar->etaTableHF[i];
888  for (unsigned int i = 0; i < hpar->phitable.size(); ++i)
889  edm::LogVerbatim("HcalGeom") << " PhiBinHF[" << i << "] = " << hpar->phitable[i];
890 #endif
891 
892  //Now the depths
894  maxDepth[0] = maxDepth[1] = 0;
895  for (int i = 0; i < nEta; ++i) {
896  unsigned int imx = layerGroupSize(i);
897  int laymax = (imx > 0) ? layerGroup(i, imx - 1) : 0;
898  if (i < iEtaMax[0]) {
899  int laymax0 = (imx > 16) ? layerGroup(i, 16) : laymax;
900  if (i + 1 == iEtaMax[0])
901  laymax0 = hcons.getDepthEta16M(1);
902 #ifdef EDM_ML_DEBUG
903  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:HB " << i << " " << imx << " " << laymax << " " << laymax0;
904 #endif
905  if (maxDepth[0] < laymax0)
906  maxDepth[0] = laymax0;
907  }
908  if (i >= iEtaMin[1] - 1 && i < iEtaMax[1]) {
909 #ifdef EDM_ML_DEBUG
910  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:HE " << i << " " << imx << " " << laymax;
911 #endif
912  if (maxDepth[1] < laymax)
913  maxDepth[1] = laymax;
914  }
915  }
916 #ifdef EDM_ML_DEBUG
917  for (int i = 0; i < 4; ++i)
918  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:Detector Type[" << i << "] iEta " << iEtaMin[i] << ":"
919  << iEtaMax[i] << " MaxDepth " << maxDepth[i];
920 #endif
921 
922  //Now the geometry constants
923  nModule[0] = hpar->modHB[0];
924  nHalves[0] = hpar->modHB[1];
925  for (unsigned int i = 0; i < hpar->rHB.size(); ++i) {
926  gconsHB.emplace_back(std::pair<double, double>(hpar->rHB[i] / CLHEP::cm, hpar->drHB[i] / CLHEP::cm));
927  }
928 #ifdef EDM_ML_DEBUG
929  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:HB with " << nModule[0] << " modules and " << nHalves[0]
930  << " halves and " << gconsHB.size() << " layers";
931  for (unsigned int i = 0; i < gconsHB.size(); ++i)
932  edm::LogVerbatim("HcalGeom") << "rHB[" << i << "] = " << gconsHB[i].first << " +- " << gconsHB[i].second;
933 #endif
934  nModule[1] = hpar->modHE[0];
935  nHalves[1] = hpar->modHE[1];
936  for (unsigned int i = 0; i < hpar->zHE.size(); ++i) {
937  gconsHE.emplace_back(std::pair<double, double>(hpar->zHE[i] / CLHEP::cm, hpar->dzHE[i] / CLHEP::cm));
938  }
939 #ifdef EDM_ML_DEBUG
940  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:HE with " << nModule[1] << " modules and " << nHalves[1]
941  << " halves and " << gconsHE.size() << " layers";
942  for (unsigned int i = 0; i < gconsHE.size(); ++i)
943  edm::LogVerbatim("HcalGeom") << "zHE[" << i << "] = " << gconsHE[i].first << " +- " << gconsHE[i].second;
944 #endif
945 
946  //Special RBX
948  if (depthMaxSp_.first == 0) {
949  depthMaxSp_ = depthMaxDf_ = std::pair<int, int>(2, maxDepth[1]);
950  } else if (depthMaxSp_.first == 1) {
951  depthMaxDf_ = std::pair<int, int>(1, maxDepth[0]);
952  if (depthMaxSp_.second > maxDepth[0])
953  maxDepth[0] = depthMaxSp_.second;
954  } else {
955  depthMaxDf_ = std::pair<int, int>(2, maxDepth[1]);
956  if (depthMaxSp_.second > maxDepth[1])
957  maxDepth[1] = depthMaxSp_.second;
958  }
959 #ifdef EDM_ML_DEBUG
960  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:Detector type and maximum depth for all RBX "
961  << depthMaxDf_.first << ":" << depthMaxDf_.second << " and for special RBX "
962  << depthMaxSp_.first << ":" << depthMaxSp_.second;
963 #endif
964 
965  //Map of special DetId's
966  std::vector<int> phis;
968  detIdSp_.clear();
969  detIdSpR_.clear();
970  if ((subdet == HcalBarrel) || (subdet == HcalEndcap)) {
971  int phi = (phis[0] > 0) ? phis[0] : -phis[0];
972  int zside = (phis[0] > 0) ? 1 : -1;
973  int lymax = (subdet == HcalBarrel) ? maxLayerHB_ + 1 : maxLayer_ + 1;
974  std::pair<int, int> etas = hcons.ldMap()->validEta();
975  for (int eta = etas.first; eta <= etas.second; ++eta) {
976  std::map<int, std::pair<int, int>> oldDep;
977  int depth(0);
978  int lmin = layerGroup(eta - 1, 0);
979  for (int lay = 0; lay < lymax; ++lay) {
980  int depc = layerGroup(eta - 1, lay);
981  if (depth != depc) {
982  if (depth != 0)
983  oldDep[depth] = std::pair<int, int>(lmin, lay - 1);
984  depth = depc;
985  lmin = lay;
986  }
987  }
988  if (depth != 0)
989  oldDep[depth] = std::pair<int, int>(lmin, lymax - 1);
990 #ifdef EDM_ML_DEBUG
991  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:Eta|Phi|Zside " << eta << ":" << phi << ":" << zside
992  << " with " << oldDep.size() << " old Depths";
993  unsigned int kk(0);
994  for (std::map<int, std::pair<int, int>>::const_iterator itr = oldDep.begin(); itr != oldDep.end(); ++itr, ++kk)
995  edm::LogVerbatim("HcalGeom") << "[" << kk << "] " << itr->first << " --> " << itr->second.first << ":"
996  << itr->second.second;
997 #endif
998  std::pair<int, int> depths = hcons.ldMap()->getDepths(eta);
999  for (int ndepth = depths.first; ndepth <= depths.second; ++ndepth) {
1000  bool flag = ((subdet == HcalBarrel && eta == iEtaMax[0] && ndepth > hcons.getDepthEta16(subdet, phi, zside)) ||
1001  (subdet == HcalEndcap && eta == iEtaMin[1] && ndepth < hcons.getDepthEta16(subdet, phi, zside)));
1002  if (!flag) {
1003  std::vector<int> count(oldDep.size(), 0);
1004  int layFront = hcons.ldMap()->getLayerFront(subdet, eta, phi, zside, ndepth);
1005  int layBack = hcons.ldMap()->getLayerBack(subdet, eta, phi, zside, ndepth);
1006  for (int lay = layFront; lay <= layBack; ++lay) {
1007  unsigned int l(0);
1008  for (std::map<int, std::pair<int, int>>::iterator itr = oldDep.begin(); itr != oldDep.end(); ++itr, ++l) {
1009  if (lay >= (itr->second).first && lay <= (itr->second).second) {
1010  ++count[l];
1011  break;
1012  }
1013  }
1014  }
1015  int odepth(0), maxlay(0);
1016  unsigned int l(0);
1017  for (std::map<int, std::pair<int, int>>::iterator itr = oldDep.begin(); itr != oldDep.end(); ++itr, ++l) {
1018  if (count[l] > maxlay) {
1019  odepth = itr->first;
1020  maxlay = count[l];
1021  }
1022  }
1023 #ifdef EDM_ML_DEBUG
1024  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:New Depth " << ndepth << " old Depth " << odepth
1025  << " max " << maxlay;
1026 #endif
1027  for (int k : phis) {
1028  zside = (k > 0) ? 1 : -1;
1029  phi = (k > 0) ? k : -k;
1030  if (subdet == HcalEndcap && eta == hpar->noff[1] && ndepth > hcons.getDepthEta29M(0, true))
1031  break;
1032  HcalDetId newId(subdet, zside * eta, phi, ndepth);
1033  HcalDetId oldId(subdet, zside * eta, phi, odepth);
1034  detIdSp_[newId] = oldId;
1035  std::vector<HcalDetId> ids;
1036  std::map<HcalDetId, std::vector<HcalDetId>>::iterator itr = detIdSpR_.find(oldId);
1037  if (itr != detIdSpR_.end())
1038  ids = itr->second;
1039  ids.emplace_back(newId);
1040  detIdSpR_[oldId] = ids;
1041  }
1042  }
1043  }
1044  }
1045 #ifdef EDM_ML_DEBUG
1046  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:Map for merging new channels to old channel"
1047  << " IDs with " << detIdSp_.size() << " entries";
1048  int l(0);
1049  for (auto itr : detIdSp_) {
1050  edm::LogVerbatim("HcalGeom") << "[" << l << "] Special " << itr.first << " Standard " << itr.second;
1051  ++l;
1052  }
1053  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants:Reverse Map for mapping old to new IDs with "
1054  << detIdSpR_.size() << " entries";
1055  l = 0;
1056  for (auto itr : detIdSpR_) {
1057  edm::LogVerbatim("HcalGeom") << "[" << l << "] Standard " << itr.first << " Special";
1058  for (auto itr1 : itr.second)
1059  edm::LogVerbatim("HcalGeom") << "ID " << (itr1);
1060  ++l;
1061  }
1062 #endif
1063  }
1064 }
std::map< HcalDetId, HcalDetId > detIdSp_
std::vector< double > etaTable
std::vector< int > iEtaMin
std::vector< int > etagroup
std::pair< int, int > depthMaxSp_
std::vector< double > rHB
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
unsigned int layerGroup(int eta, int i) const
static const int maxLayer_
std::vector< int > maxDepth
int zside(DetId const &)
std::vector< double > etaTableHF
int getLayerBack(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
std::vector< int > etaMax
std::vector< int > phiUnitS
std::vector< int > modHB
std::pair< int, int > getMaxDepthDet(const int &i) const
int getLayerFront(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > gconsHE
const HcalParameters * hpar
std::pair< int, int > getDepths(const int eta) const
int validDet(std::vector< int > &phis) const
std::pair< int, int > depthMaxDf_
std::vector< double > zHE
std::vector< double > phibin
int unitPhi(const int &det, const int &etaR) const
std::vector< double > dzHE
std::vector< int > iEtaMax
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< int > ietaMap
std::vector< int > nPhiBins
std::vector< int > modHE
std::vector< std::pair< int, int > > etaSimValu
std::vector< std::pair< double, double > > gconsHB
int getDepthEta16M(const int &det) const
int getDepthEta29M(const int &i, const bool &planOne) const
std::pair< int, int > validEta() const
unsigned int layerGroupSize(int eta) const
std::vector< double > etaTable
std::vector< double > phitable
std::vector< double > phibin
std::vector< double > drHB
const HcalDDDSimConstants & hcons
std::vector< int > noff
std::vector< int > maxDepth
std::vector< int > phigroup
static const int maxLayerHB_
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
std::vector< int > etaMin
Basic3DVector unit() const
int getDepthEta16(const int &det, const int &phi, const int &zside) const
const HcalLayerDepthMap * ldMap() const
bool HcalDDDRecConstants::isBH ( ) const
inline
bool HcalDDDRecConstants::isPlan1 ( const HcalDetId id) const
inline

Definition at line 110 of file HcalDDDRecConstants.h.

References detIdSp_.

Referenced by CaloTPGTranscoderULUT::setup(), and HcaluLUTTPGCoder::update().

110 { return detIdSp_.find(id) != detIdSp_.end(); };
std::map< HcalDetId, HcalDetId > detIdSp_
bool HcalDDDRecConstants::isPlan1MergedId ( const HcalDetId id) const
inline

Definition at line 125 of file HcalDDDRecConstants.h.

References detIdSpR_.

Referenced by HcalTopology::validHcal().

125 { return detIdSpR_.find(id) != detIdSpR_.end(); };
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
bool HcalDDDRecConstants::isPlan1ToBeMergedId ( const HcalDetId id) const
inline

Definition at line 124 of file HcalDDDRecConstants.h.

References detIdSp_.

Referenced by HcalTopology::validHcal().

124 { return detIdSp_.find(id) != detIdSp_.end(); };
std::map< HcalDetId, HcalDetId > detIdSp_
unsigned int HcalDDDRecConstants::layerGroup ( int  eta,
int  i 
) const
private

Definition at line 1079 of file HcalDDDRecConstants.cc.

References hpar, dqmdumpme::k, and HcalParameters::layerGroupEtaRec.

Referenced by dddConstants(), getHCID(), getLayerBack(), getLayerDepth(), getLayerFront(), getMaxDepth(), getMinDepth(), and initialize().

1079  {
1080  unsigned int k = 0;
1081  for (auto const& it : hpar->layerGroupEtaRec) {
1082  if (it.layer == (unsigned int)(eta + 1)) {
1083  return it.layerGroup.at(i);
1084  }
1085  if (it.layer > (unsigned int)(eta + 1))
1086  break;
1087  k = it.layerGroup.at(i);
1088  }
1089  return k;
1090 }
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
unsigned int HcalDDDRecConstants::layerGroupSize ( int  eta) const
private

Definition at line 1066 of file HcalDDDRecConstants.cc.

References hpar, dqmdumpme::k, and HcalParameters::layerGroupEtaRec.

Referenced by dddConstants(), getLayerBack(), getLayerDepth(), getLayerFront(), getMaxDepth(), getMinDepth(), getRZ(), and initialize().

1066  {
1067  unsigned int k = 0;
1068  for (auto const& it : hpar->layerGroupEtaRec) {
1069  if (it.layer == (unsigned int)(eta + 1)) {
1070  return it.layerGroup.size();
1071  }
1072  if (it.layer > (unsigned int)(eta + 1))
1073  break;
1074  k = it.layerGroup.size();
1075  }
1076  return k;
1077 }
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
int HcalDDDRecConstants::maxHFDepth ( int  ieta,
int  iphi 
) const
inline
HcalDetId HcalDDDRecConstants::mergedDepthDetId ( const HcalDetId id) const

Definition at line 647 of file HcalDDDRecConstants.cc.

References detIdSp_.

Referenced by HcalHBHEMuonAnalyzer::analyze(), HcalHBHEMuonHighEtaAnalyzer::analyzeTracks(), HcalHBHEMuonAnalyzer::beginRun(), HcalHBHEMuonHighEtaAnalyzer::beginRun(), maxHFDepth(), HcalTopology::mergedDepthDetId(), and HcalIsoTrkAnalyzer::storeEnergy().

647  {
648  std::map<HcalDetId, HcalDetId>::const_iterator itr = detIdSp_.find(id);
649  if (itr == detIdSp_.end())
650  return id;
651  else
652  return itr->second;
653 }
std::map< HcalDetId, HcalDetId > detIdSp_
bool HcalDDDRecConstants::mergedDepthList29 ( int  ieta,
int  iphi,
int  depth 
) const

Definition at line 580 of file HcalDDDRecConstants.cc.

References funct::abs(), PVValHelper::eta, muonTiming_cfi::etamin, HcalDDDSimConstants::getDepthEta29(), getMaxDepth(), hcons, iEtaMax, and ecaldqm::zside().

Referenced by maxHFDepth(), HcalTopology::mergedDepth29(), and HcalTopology::mergedDepthList29().

580  {
581  int eta = std::abs(ieta);
582  int zside = (ieta > 0) ? 1 : -1;
583  int etamin = iEtaMax[1] - hcons.getDepthEta29(iphi, zside, 1);
584  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
585  int depthMax = getMaxDepth(1, etamin, iphi, zside);
586  int depthMin = hcons.getDepthEta29(iphi, zside, 0) + 1;
587  if (depth >= depthMin && depth <= depthMax)
588  return true;
589  }
590  return false;
591 }
int zside(DetId const &)
int getDepthEta29(const int &phi, const int &zside, const int &i) const
std::vector< int > iEtaMax
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int getMaxDepth(const int &type) const
const HcalDDDSimConstants & hcons
std::vector< int > HcalDDDRecConstants::mergedDepthList29 ( int  ieta,
int  iphi 
) const

Definition at line 593 of file HcalDDDRecConstants.cc.

References funct::abs(), LEDCalibrationChannels::depth, customizeHLTforCMSSW::depths, PVValHelper::eta, muonTiming_cfi::etamin, HcalDDDSimConstants::getDepthEta29(), getMaxDepth(), hcons, iEtaMax, and ecaldqm::zside().

593  {
594  std::vector<int> depths;
595  int eta = std::abs(ieta);
596  int zside = (ieta > 0) ? 1 : -1;
597  int etamin = iEtaMax[1] - hcons.getDepthEta29(iphi, zside, 1);
598  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
599  int depthMax = getMaxDepth(1, etamin, iphi, zside);
600  int depthMin = hcons.getDepthEta29(iphi, zside, 0) + 1;
601  depths.reserve(depthMax - depthMin + 1);
602  for (int depth = depthMin; depth <= depthMax; ++depth)
603  depths.emplace_back(depth);
604  }
605  return depths;
606 }
int zside(DetId const &)
int getDepthEta29(const int &phi, const int &zside, const int &i) const
std::vector< int > iEtaMax
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int getMaxDepth(const int &type) const
const HcalDDDSimConstants & hcons
unsigned int HcalDDDRecConstants::nCells ( HcalSubdetector  subdet) const

Definition at line 625 of file HcalDDDRecConstants.cc.

References defaults_cfi::etabins, getEtaBins(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons, kHOSizePreLS1, and HcalDDDSimConstants::numberOfCells().

625  {
626  if (subdet == HcalBarrel || subdet == HcalEndcap) {
627  int isub = (subdet == HcalBarrel) ? 0 : 1;
628  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
629  unsigned int ncell(0);
630  for (auto& etabin : etabins) {
631  ncell += ((etabin.phis.size()) * (etabin.layer.size()));
632  }
633  return ncell;
634  } else if (subdet == HcalOuter) {
635  return kHOSizePreLS1;
636  } else if (subdet == HcalForward) {
637  return (unsigned int)(hcons.numberOfCells(subdet));
638  } else {
639  return 0;
640  }
641 }
std::vector< HcalEtaBin > getEtaBins(const int &itype) const
unsigned int numberOfCells(const HcalSubdetector &) const
const HcalDDDSimConstants & hcons
unsigned int HcalDDDRecConstants::nCells ( ) const

Definition at line 643 of file HcalDDDRecConstants.cc.

References HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

Referenced by maxHFDepth().

unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 608 of file HcalDDDRecConstants.cc.

References HcalBarrel, HcalCellTypes(), HcalEndcap, hcons, createfilelist::int, EgammaValidation_cff::num, and HcalDDDSimConstants::numberOfCells().

Referenced by HcalDDDGeometryLoader::load(), and maxHFDepth().

608  {
609  if (subdet == HcalBarrel || subdet == HcalEndcap) {
610  unsigned int num = 0;
611  std::vector<HcalCellType> cellTypes = HcalCellTypes(subdet);
612  for (auto& cellType : cellTypes) {
613  num += (unsigned int)(cellType.nPhiBins());
614  }
615 #ifdef EDM_ML_DEBUG
616  edm::LogInfo("HCalGeom") << "HcalDDDRecConstants:numberOfCells " << cellTypes.size() << " " << num
617  << " for subdetector " << subdet;
618 #endif
619  return num;
620  } else {
621  return hcons.numberOfCells(subdet);
622  }
623 }
std::vector< HcalCellType > HcalCellTypes(HcalSubdetector) const
unsigned int numberOfCells(const HcalSubdetector &) const
const HcalDDDSimConstants & hcons
void HcalDDDRecConstants::specialRBXHBHE ( const std::vector< HcalDetId > &  idsOld,
std::vector< HcalDetId > &  idsNew 
) const

Definition at line 684 of file HcalDDDRecConstants.cc.

References detIdSp_, and dqmdumpme::k.

Referenced by maxHFDepth().

684  {
685  for (auto k : idsOld) {
686  std::map<HcalDetId, HcalDetId>::const_iterator itr = detIdSp_.find(k);
687  if (itr == detIdSp_.end())
688  idsNew.emplace_back(k);
689  else
690  idsNew.emplace_back(itr->second);
691  }
692 }
std::map< HcalDetId, HcalDetId > detIdSp_
bool HcalDDDRecConstants::specialRBXHBHE ( bool  flag,
std::vector< HcalDetId > &  ids 
) const

Definition at line 694 of file HcalDDDRecConstants.cc.

References detIdSp_, and detIdSpR_.

694  {
695  if (tobemerged) {
696  std::map<HcalDetId, HcalDetId>::const_iterator itr;
697  for (itr = detIdSp_.begin(); itr != detIdSp_.end(); ++itr)
698  ids.emplace_back(itr->first);
699  } else {
700  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr;
701  for (itr = detIdSpR_.begin(); itr != detIdSpR_.end(); ++itr)
702  ids.emplace_back(itr->first);
703  }
704  return (!ids.empty());
705 }
std::map< HcalDetId, HcalDetId > detIdSp_
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
void HcalDDDRecConstants::unmergeDepthDetId ( const HcalDetId id,
std::vector< HcalDetId > &  ids 
) const

Definition at line 671 of file HcalDDDRecConstants.cc.

References detIdSpR_, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, and dqmdumpme::k.

Referenced by HcalHBHEMuonAnalyzer::activeLength(), HcalHBHEMuonHighEtaAnalyzer::activeLength(), maxHFDepth(), and HcalTopology::unmergeDepthDetId().

671  {
672  ids.clear();
673  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
674  if (itr == detIdSpR_.end()) {
675  ids.emplace_back(id);
676  } else {
677  for (auto k : itr->second) {
678  HcalDetId hid(id.subdet(), id.ieta(), id.iphi(), k.depth());
679  ids.emplace_back(hid);
680  }
681  }
682 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
bool HcalDDDRecConstants::withSpecialRBXHBHE ( ) const
inline

Definition at line 123 of file HcalDDDRecConstants.h.

References HcalLayerDepthMap::getSubdet(), hcons, and HcalDDDSimConstants::ldMap().

Referenced by HcalTopology::withSpecialRBXHBHE().

123 { return (hcons.ldMap()->getSubdet() != 0); }
int getSubdet() const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const

Member Data Documentation

std::pair<int, int> HcalDDDRecConstants::depthMaxDf_
private

Definition at line 155 of file HcalDDDRecConstants.h.

Referenced by initialize().

std::pair<int, int> HcalDDDRecConstants::depthMaxSp_
private

Definition at line 155 of file HcalDDDRecConstants.h.

Referenced by initialize().

std::map<HcalDetId, HcalDetId> HcalDDDRecConstants::detIdSp_
private
std::map<HcalDetId, std::vector<HcalDetId> > HcalDDDRecConstants::detIdSpR_
private
std::vector<std::pair<int, int> > HcalDDDRecConstants::etaSimValu
private

Definition at line 144 of file HcalDDDRecConstants.h.

Referenced by getPhis(), HcalCellTypes(), and initialize().

std::vector<double> HcalDDDRecConstants::etaTable
private

Definition at line 145 of file HcalDDDRecConstants.h.

Referenced by getEtaLimit(), getEtaPhi(), getEtaTable(), getOneEtaBin(), and initialize().

std::vector<std::pair<double, double> > HcalDDDRecConstants::gconsHB
private

Definition at line 152 of file HcalDDDRecConstants.h.

Referenced by getConstHBHE(), getRZ(), getThickActive(), and initialize().

std::vector<std::pair<double, double> > HcalDDDRecConstants::gconsHE
private

Definition at line 153 of file HcalDDDRecConstants.h.

Referenced by getConstHBHE(), getRZ(), getThickActive(), and initialize().

const HcalDDDSimConstants& HcalDDDRecConstants::hcons
private
const HcalParameters* HcalDDDRecConstants::hpar
private
std::vector<int> HcalDDDRecConstants::ietaMap
private

Definition at line 146 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().

std::vector<int> HcalDDDRecConstants::iEtaMax
private
std::vector<int> HcalDDDRecConstants::iEtaMin
private
std::vector<int> HcalDDDRecConstants::maxDepth
private

Definition at line 148 of file HcalDDDRecConstants.h.

Referenced by getHFCellParameters(), getMaxDepth(), getMinDepth(), and initialize().

const int HcalDDDRecConstants::maxLayer_ = 18
staticprivate

Definition at line 140 of file HcalDDDRecConstants.h.

Referenced by getMaxDepth(), getOneEtaBin(), and initialize().

const int HcalDDDRecConstants::maxLayerHB_ = 16
staticprivate

Definition at line 141 of file HcalDDDRecConstants.h.

Referenced by getHCID(), getMaxDepth(), getOneEtaBin(), and initialize().

int HcalDDDRecConstants::nHalves[2]
private

Definition at line 154 of file HcalDDDRecConstants.h.

Referenced by initialize().

int HcalDDDRecConstants::nModule[2]
private

Definition at line 154 of file HcalDDDRecConstants.h.

Referenced by initialize().

std::vector<int> HcalDDDRecConstants::nPhiBins
private

Definition at line 149 of file HcalDDDRecConstants.h.

Referenced by getNPhi(), and initialize().

std::vector<double> HcalDDDRecConstants::phibin
private
std::vector<int> HcalDDDRecConstants::phiUnitS
private

Definition at line 151 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().