CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 16 of file HcalDDDRecConstants.cc.

References initialize().

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

Definition at line 24 of file HcalDDDRecConstants.cc.

24  {
25 #ifdef EDM_ML_DEBUG
26  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants::destructed!!!";
27 #endif
28 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

const HcalDDDSimConstants* HcalDDDRecConstants::dddConstants ( ) const
inline

Definition at line 126 of file HcalDDDRecConstants.h.

References hcons.

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 gconsHB, and gconsHE.

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  }
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 53 of file HcalDDDRecConstants.cc.

References HcalLayerDepthMap::getLayerDepth(), hcons, LayerTriplets::layers(), and HcalDDDSimConstants::ldMap().

Referenced by HcalTopology::HcalTopology().

56  {
57  std::map<int, int> layers;
58  hcons.ldMap()->getLayerDepth(det, eta + 1, phi, zside, layers);
59  if (layers.empty()) {
60  return getDepth(eta, false);
61  } else {
62  std::vector<int> depths;
63  for (unsigned int lay = 0; lay < layers.size(); ++lay)
64  depths.emplace_back(layers[lay + 1]);
65  return depths;
66  }
67 }
std::vector< int > getDepth(const int &det, const int &phi, const int &zside, const unsigned int &eta) const
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
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 30 of file HcalDDDRecConstants.cc.

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

30  {
31  if (!extra) {
32  std::vector<HcalParameters::LayerItem>::const_iterator last = hpar->layerGroupEtaRec.begin();
33  for (std::vector<HcalParameters::LayerItem>::const_iterator it = hpar->layerGroupEtaRec.begin();
34  it != hpar->layerGroupEtaRec.end();
35  ++it) {
36  if (it->layer == eta + 1)
37  return it->layerGroup;
38  if (it->layer > eta + 1)
39  return last->layerGroup;
40  last = it;
41  }
42  return last->layerGroup;
43  } else {
44  std::map<int, int> layers;
45  hcons.ldMap()->getLayerDepth(eta + 1, layers);
46  std::vector<int> depths;
47  for (unsigned int lay = 0; lay < layers.size(); ++lay)
48  depths.emplace_back(layers[lay + 1]);
49  return depths;
50  }
51 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
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
tuple last
Definition: dqmdumpme.py:56
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(), and hcons.

Referenced by HcalTopology::decrementDepth().

69  {
70  return hcons.getDepthEta29(iphi, zside, type);
71  }
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 69 of file HcalDDDRecConstants.cc.

References spr::find(), first, HcalLayerDepthMap::getLayerDepth(), getLayerDepth(), getOneEtaBin(), getPhis(), hcons, mps_fire::i, iEtaMax, iEtaMin, isotrackApplyRegressor::k, LayerTriplets::layers(), HcalDDDSimConstants::ldMap(), phi, HcalLayerDepthMap::validDet(), and ecaldqm::zside().

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

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

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 133 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 HcalGeomCheck::analyze().

133  {
134  int ietaAbs = (ieta > 0) ? ieta : -ieta;
135  double eta(0), phi(0);
136  if ((subdet == static_cast<int>(HcalBarrel)) || (subdet == static_cast<int>(HcalEndcap)) ||
137  (subdet == static_cast<int>(HcalOuter))) { // Use Eta Table
138  int unit = hcons.unitPhi(phibin[ietaAbs - 1]);
139  int kphi = (unit == 2) ? ((iphi - 1) / 2 + 1) : iphi;
140  double foff = (ietaAbs <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
141  eta = 0.5 * (etaTable[ietaAbs - 1] + etaTable[ietaAbs]);
142  phi = foff + (kphi - 0.5) * phibin[ietaAbs - 1];
143  } else {
144  ietaAbs -= iEtaMin[2];
145  int unit = hcons.unitPhi(hpar->phitable[ietaAbs - 1]);
146  int kphi = (unit == 4) ? ((iphi - 3) / 4 + 1) : ((iphi - 1) / 2 + 1);
147  double foff = (unit > 2) ? hpar->phioff[4] : hpar->phioff[2];
148  eta = 0.5 * (hpar->etaTableHF[ietaAbs - 1] + hpar->etaTableHF[ietaAbs]);
149  phi = foff + (kphi - 0.5) * hpar->phitable[ietaAbs - 1];
150  }
151  if (ieta < 0)
152  eta = -eta;
153  if (phi > M_PI)
154  phi -= (2 * M_PI);
155 #ifdef EDM_ML_DEBUG
156  edm::LogVerbatim("HcalGeom") << "getEtaPhi: subdet|ieta|iphi " << subdet << "|" << ieta << "|" << iphi << " eta|phi "
157  << eta << "|" << phi;
158 #endif
159  return std::pair<double, double>(eta, phi);
160 }
Log< level::Info, true > LogVerbatim
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 162 of file HcalDDDRecConstants.cc.

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

Referenced by HcalGeometry::getBackPosition(), HcalGeometry::getPosition(), and HcalHitRelabeller::relabel().

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

References funct::abs(), cells, HcalDDDSimConstants::getIdHF2QIE(), HcalDDDSimConstants::getPhiTableHF(), HcalDDDSimConstants::getRTableHF(), hcons, iEtaMin, isotrackApplyRegressor::k, maxDepth, HLT_FULL_cff::nEta, and nphi.

Referenced by HcalFlexiHardcodeGeometryLoader::makeHFCells().

211  {
212  std::vector<HcalDDDRecConstants::HFCellParameters> cells;
213  unsigned int nEta = hcons.getPhiTableHF().size();
214  if (maxDepth[2] > 0) {
215  for (unsigned int k = 0; k < nEta; ++k) {
216  int ieta = iEtaMin[2] + k;
217  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k] / (5._deg));
218  int iphi = (dphi == 4) ? 3 : 1;
219  int nphi = 72 / dphi;
220  double rMin = hcons.getRTableHF()[nEta - k - 1] / CLHEP::cm;
221  double rMax = hcons.getRTableHF()[nEta - k] / CLHEP::cm;
222  HcalDDDRecConstants::HFCellParameters cell1(ieta, 1, iphi, dphi, nphi, rMin, rMax);
223  cells.emplace_back(cell1);
224  HcalDDDRecConstants::HFCellParameters cell2(-ieta, 1, iphi, dphi, nphi, rMin, rMax);
225  cells.emplace_back(cell2);
226  }
227  }
228  if (maxDepth[2] > 2) {
229  if (!hcons.getIdHF2QIE().empty()) {
230  for (unsigned int k = 0; k < hcons.getIdHF2QIE().size(); ++k) {
231  int ieta = hcons.getIdHF2QIE()[k].ieta();
232  int ind = std::abs(ieta) - iEtaMin[2];
233  int dphi = (int)(0.001 + hcons.getPhiTableHF()[ind] / (5._deg));
234  int iphi = hcons.getIdHF2QIE()[k].iphi();
235  double rMin = hcons.getRTableHF()[nEta - ind - 1] / CLHEP::cm;
236  double rMax = hcons.getRTableHF()[nEta - ind] / CLHEP::cm;
237  HcalDDDRecConstants::HFCellParameters cell1(ieta, 3, iphi, dphi, 1, rMin, rMax);
238  cells.emplace_back(cell1);
239  }
240  } else {
241  for (unsigned int k = 0; k < nEta; ++k) {
242  int ieta = iEtaMin[2] + k;
243  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k] / (5._deg));
244  int iphi = (dphi == 4) ? 3 : 1;
245  int nphi = 72 / dphi;
246  double rMin = hcons.getRTableHF()[nEta - k - 1] / CLHEP::cm;
247  double rMax = hcons.getRTableHF()[nEta - k] / CLHEP::cm;
248  HcalDDDRecConstants::HFCellParameters cell1(ieta, 3, iphi, dphi, nphi, rMin, rMax);
249  cells.emplace_back(cell1);
250  HcalDDDRecConstants::HFCellParameters cell2(-ieta, 3, iphi, dphi, nphi, rMin, rMax);
251  cells.emplace_back(cell2);
252  }
253  }
254  }
255 #ifdef EDM_ML_DEBUG
256  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants returns " << cells.size() << " HF cell parameters";
257  for (unsigned int k = 0; k < cells.size(); ++k)
258  edm::LogVerbatim("HcalGeom") << "Cell[" << k << "] : (" << cells[k].ieta << ", " << cells[k].depth << ", "
259  << cells[k].firstPhi << ", " << cells[k].stepPhi << ", " << cells[k].nPhi << ", "
260  << cells[k].rMin << ", " << cells[k].rMax << ")";
261 #endif
262  return cells;
263 }
Log< level::Info, true > LogVerbatim
const int nphi
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
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
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 278 of file HcalDDDRecConstants.cc.

References PVValHelper::eta, Puppi_cff::etaMax, HcalDDDSimConstants::getLastLayer(), HcalLayerDepthMap::getLayerBack(), hcons, isotrackApplyRegressor::k, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), and ecaldqm::zside().

Referenced by getRZ().

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

Definition at line 265 of file HcalDDDRecConstants.cc.

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

Referenced by getEtaBins().

265  {
266  layers.clear();
267  for (unsigned int l = 0; l < layerGroupSize(ieta - 1); ++l) {
268  int lay = l + 1;
269  layers[lay] = layerGroup(ieta - 1, l);
270  }
271 #ifdef EDM_ML_DEBUG
272  edm::LogVerbatim("HcalGeom") << "getLayerDepth::Input " << ieta << " Output " << layers.size() << " entries";
273  for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
274  edm::LogVerbatim("HcalGeom") << " [" << itr->first << "] " << itr->second;
275 #endif
276 }
Log< level::Info, true > LogVerbatim
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
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 301 of file HcalDDDRecConstants.cc.

References PVValHelper::eta, Puppi_cff::etaMax, HcalDDDSimConstants::getFrontLayer(), HcalLayerDepthMap::getLayerFront(), HcalEndcap, hcons, isotrackApplyRegressor::k, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), and ecaldqm::zside().

Referenced by getRZ(), and getThickActive().

301  {
302  int subdet = (idet == 1) ? 1 : 2;
303  int zside = (ieta > 0) ? 1 : -1;
304  int eta = zside * ieta;
305  int layFront = hcons.ldMap()->getLayerFront(subdet, eta, iphi, zside, depth);
306  int laymin = hcons.getFrontLayer(subdet, ieta);
307  if ((layFront < 0) || ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16))) {
308  if ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16)) {
309  layFront = laymin;
310  } else if (eta <= hpar->etaMax[1]) {
311  for (unsigned int k = 0; k < layerGroupSize(eta - 1); ++k) {
312  if (depth == (int)layerGroup(eta - 1, k)) {
313  if ((int)(k) >= laymin) {
314  layFront = k;
315  break;
316  }
317  }
318  }
319  }
320  } else {
321  if (layFront < laymin)
322  layFront = laymin;
323  }
324 #ifdef EDM_ML_DEBUG
325  edm::LogVerbatim("HcalGeom") << "getLayerFront::Input " << idet << ":" << ieta << ":" << iphi << ":" << depth
326  << " Output " << layFront;
327 #endif
328  return layFront;
329 }
Log< level::Info, true > LogVerbatim
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
tuple etaMax
Definition: Puppi_cff.py:46
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 331 of file HcalDDDRecConstants.cc.

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

331  {
332  unsigned int type = (itype == 0) ? 0 : 1;
333  int lmax = hcons.getMaxDepth(type + 1, ieta, iphi, zside, true);
334  if (lmax < 0) {
335  unsigned int lymax = (type == 0) ? maxLayerHB_ + 1 : maxLayer_ + 1;
336  lmax = 0;
337  if (layerGroupSize(ieta - 1) > 0) {
338  if (layerGroupSize(ieta - 1) < lymax)
339  lymax = layerGroupSize(ieta - 1);
340  lmax = (int)(layerGroup(ieta - 1, lymax - 1));
341  if (type == 0 && ieta == iEtaMax[type])
342  lmax = hcons.getDepthEta16M(1);
343  if (type == 1 && ieta >= hpar->noff[1])
344  lmax = hcons.getDepthEta29M(0, false);
345  }
346  }
347 #ifdef EDM_ML_DEBUG
348  edm::LogVerbatim("HcalGeom") << "getMaxDepth::Input " << itype << ":" << ieta << ":" << iphi << ":" << zside
349  << " Output " << lmax;
350 #endif
351  return lmax;
352 }
Log< level::Info, true > LogVerbatim
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 354 of file HcalDDDRecConstants.cc.

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

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

354  {
355  int lmin = hcons.getMinDepth(itype + 1, ieta, iphi, zside, true);
356  if (lmin < 0) {
357  if (itype == 2) { // HFn
358  lmin = 1;
359  } else if (itype == 3) { //HO
360  lmin = maxDepth[3];
361  } else {
362  unsigned int type = (itype == 0) ? 0 : 1;
363  if (layerGroupSize(ieta - 1) > 0) {
364  if (type == 1 && ieta == iEtaMin[type])
365  lmin = hcons.getDepthEta16M(2);
366  else
367  lmin = (int)(layerGroup(ieta - 1, 0));
368  }
369  }
370  }
371  return lmin;
372 }
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 708 of file HcalDDDRecConstants.cc.

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

Referenced by getEtaBins().

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

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

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

374  {
375  std::vector<std::pair<int, double>> phis;
376  int ietaAbs = (ieta > 0) ? ieta : -ieta;
377  int keta = (subdet != HcalForward) ? etaSimValu[ietaAbs - 1].first : ietaAbs;
378  std::pair<double, double> ficons = hcons.getPhiCons(subdet, keta);
379  double fioff = ficons.first;
380  double dphi = (subdet != HcalForward) ? phibin[ietaAbs - 1] : ficons.second;
381  int nphi = int((2._pi + 0.1 * dphi) / dphi);
382  int units = hcons.unitPhi(subdet, keta);
383  for (int ifi = 0; ifi < nphi; ++ifi) {
384  double phi = -fioff + (ifi + 0.5) * dphi;
385  int iphi = hcons.phiNumber(ifi + 1, units);
386  phis.emplace_back(std::pair<int, double>(iphi, phi));
387  }
388 #ifdef EDM_ML_DEBUG
389  edm::LogVerbatim("HcalGeom") << "getEtaPhi: subdet|ieta|iphi " << subdet << "|" << ieta << " with " << phis.size()
390  << " phi bins";
391  for (unsigned int k = 0; k < phis.size(); ++k)
392  edm::LogVerbatim("HcalGeom") << "[" << k << "] iphi " << phis[k].first << " phi "
393  << convertRadToDeg(phis[k].second);
394 #endif
395  return phis;
396 }
Log< level::Info, true > LogVerbatim
const int nphi
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 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 398 of file HcalDDDRecConstants.cc.

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

Referenced by HcalTopology::getPhiZOne().

398  {
399  phiz.clear();
400  int subdet = hcons.ldMap()->getSubdet();
401  if (subdet > 0) {
402  std::vector<int> phis = hcons.ldMap()->getPhis();
403  for (int k : phis) {
404  int zside = (k > 0) ? 1 : -1;
405  int phi = (k > 0) ? k : -k;
406  phiz.emplace_back(std::pair<int, int>(phi, zside));
407  }
408  }
409 #ifdef EDM_ML_DEBUG
410  edm::LogVerbatim("HcalGeom") << "Special RBX for detector " << subdet << " with " << phiz.size() << " phi/z bins";
411  for (unsigned int k = 0; k < phiz.size(); ++k)
412  edm::LogVerbatim("HcalGeom") << " [" << k << "] " << phiz[k].first << ":" << phiz[k].second;
413 #endif
414  return subdet;
415 }
Log< level::Info, true > LogVerbatim
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

Definition at line 417 of file HcalDDDRecConstants.cc.

Referenced by HcalGeomCheck::analyze(), HcalHBHEMuonAnalyzer::goodCell(), HcalHBHEMuonHighEtaAnalyzer::goodCell(), and AlCaHcalHBHEMuonProducer::goodCell().

417  {
418  return getRZ(subdet, ieta, 1, depth);
419 }
double 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 421 of file HcalDDDRecConstants.cc.

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

421  {
422  int layf = getLayerFront(subdet, ieta, iphi, depth);
423  double rz =
424  (layf < 0) ? 0.0 : ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layf].first) : (gconsHE[layf].first));
425 #ifdef EDM_ML_DEBUG
426  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet << "|" << ieta << "|" << iphi << "|"
427  << depth << " lay|rz " << layf << "|" << rz;
428 #endif
429  return rz;
430 }
Log< level::Info, true > LogVerbatim
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 432 of file HcalDDDRecConstants.cc.

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

432  {
433  double rz(0);
434  if (layer > 0 && layer <= (int)(layerGroupSize(0)))
435  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layer - 1].first) : (gconsHE[layer - 1].first));
436 #ifdef EDM_ML_DEBUG
437  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|layer " << subdet << "|" << layer << " rz " << rz;
438 #endif
439  return rz;
440 }
Log< level::Info, true > LogVerbatim
constexpr std::array< uint8_t, layerIndexSize > layer
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 442 of file HcalDDDRecConstants.cc.

References HLT_FULL_cff::depth, first, gconsHB, gconsHE, getLayerBack(), getLayerFront(), HcalBarrel, edm::second(), and ecaldqm::zside().

442  {
443  int subdet = id.subdetId();
444  int ieta = id.ieta();
445  int iphi = id.iphi();
446  int depth = id.depth();
447  int zside = (subdet == static_cast<int>(HcalBarrel)) ? 1 : id.zside();
448  int layf = getLayerFront(subdet, ieta, iphi, depth);
449  double rzf = (layf < 0)
450  ? 0.0
451  : ((subdet == static_cast<int>(HcalBarrel)) ? zside * (gconsHB[layf].first - gconsHB[layf].second)
452  : zside * (gconsHE[layf].first - gconsHE[layf].second));
453  int layb = getLayerBack(subdet, ieta, iphi, depth);
454  double rzb = (layb < 0)
455  ? 0.0
456  : ((subdet == static_cast<int>(HcalBarrel)) ? zside * (gconsHB[layb].first + gconsHB[layb].second)
457  : zside * (gconsHE[layb].first + gconsHE[layb].second));
458 #ifdef EDM_ML_DEBUG
459  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet << "|" << ieta << "|" << iphi << "|"
460  << depth << " lay|rz (front) " << layf << "|" << rzf << " lay|rz (back) " << layb << "|"
461  << rzb;
462 #endif
463  return std::pair<double, double>(rzf, rzb);
464 }
Log< level::Info, true > LogVerbatim
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 466 of file HcalDDDRecConstants.cc.

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

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

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

References cells, submitPVResolutionJobs::count, HLT_FULL_cff::depth, defaults_cfi::etabins, etaSimValu, first, getEtaBins(), HcalBarrel, HcalDDDSimConstants::HcalCellTypes(), HcalEndcap, hcons, hpar, iEtaMax, HcalParameters::phioff, groupFilesInBlocks::temp, unit(), and HcalDDDSimConstants::unitPhi().

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

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

Definition at line 664 of file HcalDDDRecConstants.cc.

References detIdSpR_.

Referenced by HcalTopology::idBack().

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

Definition at line 656 of file HcalDDDRecConstants.cc.

References HLT_FULL_cff::depth, and detIdSpR_.

Referenced by HcalTopology::idFront().

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

Definition at line 802 of file HcalDDDRecConstants.cc.

References angle_units::operators::convertRadToDeg(), submitPVResolutionJobs::count, HLT_FULL_cff::depth, depthMaxDf_, depthMaxSp_, detIdSp_, detIdSpR_, HcalParameters::drHB, HcalParameters::dzHE, PVValHelper::eta, HcalParameters::etagroup, Puppi_cff::etaMax, HcalParameters::etaMax, Puppi_cff::etaMin, HcalParameters::etaMin, EnergyCorrector::etas, etaSimValu, HcalParameters::etaTable, etaTable, HcalParameters::etaTableHF, Exception, gconsHB, gconsHE, HcalDDDSimConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getDepthEta29M(), HcalLayerDepthMap::getDepths(), HcalLayerDepthMap::getLayerBack(), HcalLayerDepthMap::getLayerFront(), HcalDDDSimConstants::getMaxDepthDet(), HcalBarrel, HcalEndcap, hcons, hpar, mps_fire::i, ietaMap, iEtaMax, iEtaMin, isotrackApplyRegressor::k, GetRecoTauVFromDQM_MC_cff::kk, cmsLHEtoEOSManager::l, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), HcalParameters::maxDepth, maxDepth, maxLayer_, maxLayerHB_, HcalParameters::modHB, HcalParameters::modHE, ndepth, HLT_FULL_cff::nEta, nHalves, nModule, HcalParameters::noff, nphi, 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 HcalDDDRecConstants().

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

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

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

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

Definition at line 1067 of file HcalDDDRecConstants.cc.

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

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

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

Definition at line 111 of file HcalDDDRecConstants.h.

References hcons, and HcalDDDSimConstants::maxHFDepth().

Referenced by HcalTopology::validRaw().

111 { return hcons.maxHFDepth(ieta, iphi); }
const HcalDDDSimConstants & hcons
int maxHFDepth(const int &ieta, const int &iphi) const
HcalDetId HcalDDDRecConstants::mergedDepthDetId ( const HcalDetId id) const
bool HcalDDDRecConstants::mergedDepthList29 ( int  ieta,
int  iphi,
int  depth 
) const

Definition at line 581 of file HcalDDDRecConstants.cc.

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

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

581  {
582  int eta = std::abs(ieta);
583  int zside = (ieta > 0) ? 1 : -1;
584  int etamin = iEtaMax[1] - hcons.getDepthEta29(iphi, zside, 1);
585  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
586  int depthMax = getMaxDepth(1, etamin, iphi, zside);
587  int depthMin = hcons.getDepthEta29(iphi, zside, 0) + 1;
588  if (depth >= depthMin && depth <= depthMax)
589  return true;
590  }
591  return false;
592 }
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 594 of file HcalDDDRecConstants.cc.

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

594  {
595  std::vector<int> depths;
596  int eta = std::abs(ieta);
597  int zside = (ieta > 0) ? 1 : -1;
598  int etamin = iEtaMax[1] - hcons.getDepthEta29(iphi, zside, 1);
599  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
600  int depthMax = getMaxDepth(1, etamin, iphi, zside);
601  int depthMin = hcons.getDepthEta29(iphi, zside, 0) + 1;
602  depths.reserve(depthMax - depthMin + 1);
603  for (int depth = depthMin; depth <= depthMax; ++depth)
604  depths.emplace_back(depth);
605  }
606  return depths;
607 }
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 626 of file HcalDDDRecConstants.cc.

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

626  {
627  if (subdet == HcalBarrel || subdet == HcalEndcap) {
628  int isub = (subdet == HcalBarrel) ? 0 : 1;
629  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
630  unsigned int ncell(0);
631  for (auto& etabin : etabins) {
632  ncell += ((etabin.phis.size()) * (etabin.layer.size()));
633  }
634  return ncell;
635  } else if (subdet == HcalOuter) {
636  return kHOSizePreLS1;
637  } else if (subdet == HcalForward) {
638  return (unsigned int)(hcons.numberOfCells(subdet));
639  } else {
640  return 0;
641  }
642 }
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 644 of file HcalDDDRecConstants.cc.

References HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 609 of file HcalDDDRecConstants.cc.

References HcalBarrel, HcalCellTypes(), HcalEndcap, hcons, pileupDistInMC::num, and HcalDDDSimConstants::numberOfCells().

Referenced by HcalDDDGeometryLoader::load().

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

Definition at line 685 of file HcalDDDRecConstants.cc.

References detIdSp_, and isotrackApplyRegressor::k.

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

Definition at line 695 of file HcalDDDRecConstants.cc.

References detIdSp_, and detIdSpR_.

695  {
696  if (tobemerged) {
697  std::map<HcalDetId, HcalDetId>::const_iterator itr;
698  for (itr = detIdSp_.begin(); itr != detIdSp_.end(); ++itr)
699  ids.emplace_back(itr->first);
700  } else {
701  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr;
702  for (itr = detIdSpR_.begin(); itr != detIdSpR_.end(); ++itr)
703  ids.emplace_back(itr->first);
704  }
705  return (!ids.empty());
706 }
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 672 of file HcalDDDRecConstants.cc.

References detIdSpR_, and isotrackApplyRegressor::k.

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

672  {
673  ids.clear();
674  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
675  if (itr == detIdSpR_.end()) {
676  ids.emplace_back(id);
677  } else {
678  for (auto k : itr->second) {
679  HcalDetId hid(id.subdet(), id.ieta(), id.iphi(), k.depth());
680  ids.emplace_back(hid);
681  }
682  }
683 }
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().