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 isHE () 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::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::~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

◆ dddConstants()

const HcalDDDSimConstants* HcalDDDRecConstants::dddConstants ( ) const
inline

Definition at line 127 of file HcalDDDRecConstants.h.

References hcons.

127 { return &hcons; }
const HcalDDDSimConstants & hcons

◆ getConstHBHE()

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

◆ getDepth() [1/2]

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 HLT_2022v15_cff::depths, PVValHelper::eta, HcalLayerDepthMap::getLayerDepth(), hcons, hgcalTBTopologyTester_cfi::layers, HcalDDDSimConstants::ldMap(), phi, and ecaldqm::zside().

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 }
int zside(DetId const &)
const HcalLayerDepthMap * ldMap() const
const HcalDDDSimConstants & hcons
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const
std::vector< int > getDepth(const int &det, const int &phi, const int &zside, const unsigned int &eta) const

◆ getDepth() [2/2]

std::vector< int > HcalDDDRecConstants::getDepth ( const unsigned int &  eta,
const bool &  extra 
) const

Definition at line 30 of file HcalDDDRecConstants.cc.

References HLT_2022v15_cff::depths, PVValHelper::eta, HcalLayerDepthMap::getLayerDepth(), hcons, hpar, dqmdumpme::last, HcalParameters::layerGroupEtaRec, hgcalTBTopologyTester_cfi::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;
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 }
const HcalParameters * hpar
const HcalLayerDepthMap * ldMap() const
std::vector< LayerItem > layerGroupEtaRec
const HcalDDDSimConstants & hcons
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const

◆ getDepthEta16()

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(), hcons, LEDCalibrationChannels::iphi, and ecaldqm::zside().

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

◆ getDepthEta29()

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(), hcons, LEDCalibrationChannels::iphi, and ecaldqm::zside().

Referenced by HcalTopology::decrementDepth().

69  {
70  return hcons.getDepthEta29(iphi, zside, type);
71  }
int getDepthEta29(const int &phi, const int &zside, const int &i) const
int zside(DetId const &)
const HcalDDDSimConstants & hcons

◆ getEtaBins()

std::vector< HcalDDDRecConstants::HcalEtaBin > HcalDDDRecConstants::getEtaBins ( const int &  itype) const

Definition at line 69 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, hgcalTBTopologyTester_cfi::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;
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
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
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) 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
std::vector< int > iEtaMax
HcalSubdetector
Definition: HcalAssistant.h:31
const HcalLayerDepthMap * ldMap() const
void getLayerDepth(const int &ieta, std::map< int, int > &layers) const
const HcalDDDSimConstants & hcons
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const
int validDet(std::vector< int > &phis) const

◆ getEtaLimit()

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

◆ getEtaPhi()

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, LEDCalibrationChannels::ieta, iEtaMax, iEtaMin, LEDCalibrationChannels::iphi, 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
std::vector< int > iEtaMax
Basic3DVector unit() const
int unitPhi(const int &det, const int &etaR) const
#define M_PI
std::vector< double > phioff
std::vector< double > etaTable
std::vector< double > phitable
const HcalDDDSimConstants & hcons

◆ getEtaRange()

std::pair<int, int> HcalDDDRecConstants::getEtaRange ( const int &  i) const
inline

◆ getEtaTable()

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

◆ getEtaTableHF()

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

◆ getHCID()

HcalDDDRecConstants::HcalID HcalDDDRecConstants::getHCID ( int  subdet,
int  ieta,
int  iphi,
int  lay,
int  idepth 
) const

Definition at line 162 of file HcalDDDRecConstants.cc.

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

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

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

◆ getHFCellParameters()

std::vector< HcalDDDRecConstants::HFCellParameters > HcalDDDRecConstants::getHFCellParameters ( ) const

Definition at line 216 of file HcalDDDRecConstants.cc.

References funct::abs(), hgcalTopologyTester_cfi::cell1, hgcalTopologyTester_cfi::cell2, hgcalTBTopologyTester_cfi::cells, HcalDDDSimConstants::getIdHF2QIE(), HcalDDDSimConstants::getPhiTableHF(), HcalDDDSimConstants::getRTableHF(), hcons, LEDCalibrationChannels::ieta, iEtaMin, createfilelist::int, LEDCalibrationChannels::iphi, dqmdumpme::k, maxDepth, HLT_2022v15_cff::nEta, nphi, photonAnalyzer_cfi::rMax, and photonAnalyzer_cfi::rMin.

Referenced by HcalFlexiHardcodeGeometryLoader::makeHFCells().

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

◆ getLayer0Wt()

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(), hcons, phi, and ecaldqm::zside().

Referenced by HcalHitRelabeller::energyWt().

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

◆ getLayerBack()

int HcalDDDRecConstants::getLayerBack ( const int &  det,
const int &  eta,
const int &  phi,
const int &  depth 
) const

Definition at line 283 of file HcalDDDRecConstants.cc.

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

Referenced by getRZ().

283  {
284  int subdet = (idet == 1) ? 1 : 2;
285  int zside = (ieta > 0) ? 1 : -1;
286  int eta = zside * ieta;
287  int layBack = hcons.ldMap()->getLayerBack(subdet, eta, iphi, zside, depth);
288  int laymax = hcons.getLastLayer(subdet, ieta);
289  if (layBack < 0 && eta <= hpar->etaMax[1]) {
290  for (unsigned int k = 0; k < layerGroupSize(eta - 1); ++k) {
291  if (depth + 1 == (int)layerGroup(eta - 1, k)) {
292  layBack = k - 1;
293  break;
294  }
295  }
296  }
297  if (layBack < 0 || layBack > laymax)
298  layBack = laymax;
299 #ifdef EDM_ML_DEBUG
300  edm::LogVerbatim("HCalGeom") << "getLayerBack::Input " << idet << ":" << ieta << ":" << iphi << ":" << depth
301  << " Output " << layBack;
302 #endif
303  return layBack;
304 }
Log< level::Info, true > LogVerbatim
int zside(DetId const &)
const HcalLayerDepthMap * ldMap() const
unsigned int layerGroupSize(int eta) const
int getLayerBack(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
const HcalDDDSimConstants & hcons
unsigned int layerGroup(int eta, int i) const
int getLastLayer(const int &det, const int &eta) const

◆ getLayerDepth()

void HcalDDDRecConstants::getLayerDepth ( const int &  ieta,
std::map< int, int > &  layers 
) const

Definition at line 270 of file HcalDDDRecConstants.cc.

References LEDCalibrationChannels::ieta, cmsLHEtoEOSManager::l, layerGroup(), layerGroupSize(), and hgcalTBTopologyTester_cfi::layers.

Referenced by getEtaBins().

270  {
271  layers.clear();
272  for (unsigned int l = 0; l < layerGroupSize(ieta - 1); ++l) {
273  int lay = l + 1;
274  layers[lay] = layerGroup(ieta - 1, l);
275  }
276 #ifdef EDM_ML_DEBUG
277  edm::LogVerbatim("HCalGeom") << "getLayerDepth::Input " << ieta << " Output " << layers.size() << " entries";
278  for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
279  edm::LogVerbatim("HCalGeom") << " [" << itr->first << "] " << itr->second;
280 #endif
281 }
Log< level::Info, true > LogVerbatim
unsigned int layerGroupSize(int eta) const
unsigned int layerGroup(int eta, int i) const

◆ getLayerFront()

int HcalDDDRecConstants::getLayerFront ( const int &  det,
const int &  eta,
const int &  phi,
const int &  depth 
) const

Definition at line 306 of file HcalDDDRecConstants.cc.

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

Referenced by getRZ(), and getThickActive().

306  {
307  int subdet = (idet == 1) ? 1 : 2;
308  int zside = (ieta > 0) ? 1 : -1;
309  int eta = zside * ieta;
310  int layFront = hcons.ldMap()->getLayerFront(subdet, eta, iphi, zside, depth);
311  int laymin = hcons.getFrontLayer(subdet, ieta);
312  if ((layFront < 0) || ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16))) {
313  if ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16)) {
314  layFront = laymin;
315  } else if (eta <= hpar->etaMax[1]) {
316  for (unsigned int k = 0; k < layerGroupSize(eta - 1); ++k) {
317  if (depth == (int)layerGroup(eta - 1, k)) {
318  if ((int)(k) >= laymin) {
319  layFront = k;
320  break;
321  }
322  }
323  }
324  }
325  } else {
326  if (layFront < laymin)
327  layFront = laymin;
328  }
329 #ifdef EDM_ML_DEBUG
330  edm::LogVerbatim("HCalGeom") << "getLayerFront::Input " << idet << ":" << ieta << ":" << iphi << ":" << depth
331  << " Output " << layFront;
332 #endif
333  return layFront;
334 }
Log< level::Info, true > LogVerbatim
int getFrontLayer(const int &det, const int &eta) const
int getLayerFront(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
int zside(DetId const &)
const HcalLayerDepthMap * ldMap() const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
unsigned int layerGroup(int eta, int i) const

◆ getMaxDepth() [1/2]

int HcalDDDRecConstants::getMaxDepth ( const int &  type) const
inline

◆ getMaxDepth() [2/2]

int HcalDDDRecConstants::getMaxDepth ( const int &  itype,
const int &  ieta,
const int &  iphi,
const int &  zside 
) const

Definition at line 336 of file HcalDDDRecConstants.cc.

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

336  {
337  unsigned int type = (itype == 0) ? 0 : 1;
338  int lmax = hcons.getMaxDepth(type + 1, ieta, iphi, zside, true);
339  if (lmax < 0) {
340  unsigned int lymax = (type == 0) ? maxLayerHB_ + 1 : maxLayer_ + 1;
341  lmax = 0;
342  if (layerGroupSize(ieta - 1) > 0) {
343  if (layerGroupSize(ieta - 1) < lymax)
344  lymax = layerGroupSize(ieta - 1);
345  lmax = (int)(layerGroup(ieta - 1, lymax - 1));
346  if (type == 0 && ieta == iEtaMax[type])
347  lmax = hcons.getDepthEta16M(1);
348  if (type == 1 && ieta >= hpar->noff[1])
349  lmax = hcons.getDepthEta29M(0, false);
350  }
351  }
352 #ifdef EDM_ML_DEBUG
353  edm::LogVerbatim("HCalGeom") << "getMaxDepth::Input " << itype << ":" << ieta << ":" << iphi << ":" << zside
354  << " Output " << lmax;
355 #endif
356  return lmax;
357 }
Log< level::Info, true > LogVerbatim
int getDepthEta29M(const int &i, const bool &planOne) const
static const int maxLayer_
int zside(DetId const &)
int getDepthEta16M(const int &det) const
const HcalParameters * hpar
std::vector< int > iEtaMax
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
unsigned int layerGroup(int eta, int i) const
std::vector< int > noff
int getMaxDepth(const int &type) const
static const int maxLayerHB_

◆ getMinDepth()

int HcalDDDRecConstants::getMinDepth ( const int &  itype,
const int &  ieta,
const int &  iphi,
const int &  zside 
) const

Definition at line 359 of file HcalDDDRecConstants.cc.

References HcalDDDSimConstants::getDepthEta16M(), HcalDDDSimConstants::getMinDepth(), hcons, LEDCalibrationChannels::ieta, iEtaMin, createfilelist::int, LEDCalibrationChannels::iphi, layerGroup(), layerGroupSize(), maxDepth, and ecaldqm::zside().

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

359  {
360  int lmin = hcons.getMinDepth(itype + 1, ieta, iphi, zside, true);
361  if (lmin < 0) {
362  if (itype == 2) { // HFn
363  lmin = 1;
364  } else if (itype == 3) { //HO
365  lmin = maxDepth[3];
366  } else {
367  unsigned int type = (itype == 0) ? 0 : 1;
368  if (layerGroupSize(ieta - 1) > 0) {
369  if (type == 1 && ieta == iEtaMin[type])
370  lmin = hcons.getDepthEta16M(2);
371  else
372  lmin = (int)(layerGroup(ieta - 1, 0));
373  }
374  }
375  }
376  return lmin;
377 }
std::vector< int > iEtaMin
std::vector< int > maxDepth
int zside(DetId const &)
int getDepthEta16M(const int &det) const
unsigned int layerGroupSize(int eta) const
int getMinDepth(const int &det, const int &eta, const int &phi, const int &zside, const bool &partialOnly) const
const HcalDDDSimConstants & hcons
unsigned int layerGroup(int eta, int i) const

◆ getNEta()

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

◆ getNoff()

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

◆ getNPhi()

int HcalDDDRecConstants::getNPhi ( const int &  type) const
inline

◆ getOneEtaBin()

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

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

Referenced by getEtaBins().

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

◆ getPhiBin()

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

◆ getPhiOff()

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

◆ getPhiOffs()

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

◆ getPhis()

std::vector< std::pair< int, double > > HcalDDDRecConstants::getPhis ( const int &  subdet,
const int &  ieta 
) const

Definition at line 379 of file HcalDDDRecConstants.cc.

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

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

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

◆ getPhiTable()

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

◆ getPhiTableHF()

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

◆ getPhiZOne()

int HcalDDDRecConstants::getPhiZOne ( std::vector< std::pair< int, int >> &  phiz) const

Definition at line 403 of file HcalDDDRecConstants.cc.

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

Referenced by HcalTopology::getPhiZOne().

403  {
404  phiz.clear();
405  int subdet = hcons.ldMap()->getSubdet();
406  if (subdet > 0) {
407  std::vector<int> phis = hcons.ldMap()->getPhis();
408  for (int k : phis) {
409  int zside = (k > 0) ? 1 : -1;
410  int phi = (k > 0) ? k : -k;
411  phiz.emplace_back(std::pair<int, int>(phi, zside));
412  }
413  }
414 #ifdef EDM_ML_DEBUG
415  edm::LogVerbatim("HCalGeom") << "Special RBX for detector " << subdet << " with " << phiz.size() << " phi/z bins";
416  for (unsigned int k = 0; k < phiz.size(); ++k)
417  edm::LogVerbatim("HCalGeom") << " [" << k << "] " << phiz[k].first << ":" << phiz[k].second;
418 #endif
419  return subdet;
420 }
Log< level::Info, true > LogVerbatim
int zside(DetId const &)
const std::vector< int > & getPhis() const
const HcalLayerDepthMap * ldMap() const
const HcalDDDSimConstants & hcons

◆ getRZ() [1/4]

double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  ieta,
const int &  depth 
) const

◆ getRZ() [2/4]

double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  ieta,
const int &  iphi,
const int &  depth 
) const

Definition at line 426 of file HcalDDDRecConstants.cc.

References LEDCalibrationChannels::depth, dqmdumpme::first, gconsHB, gconsHE, getLayerFront(), HcalBarrel, LEDCalibrationChannels::ieta, and LEDCalibrationChannels::iphi.

426  {
427  int layf = getLayerFront(subdet, ieta, iphi, depth);
428  double rz =
429  (layf < 0) ? 0.0 : ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layf].first) : (gconsHE[layf].first));
430 #ifdef EDM_ML_DEBUG
431  edm::LogVerbatim("HCalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet << "|" << ieta << "|" << iphi << "|"
432  << depth << " lay|rz " << layf << "|" << rz;
433 #endif
434  return rz;
435 }
Log< level::Info, true > LogVerbatim
std::vector< std::pair< double, double > > gconsHE
std::vector< std::pair< double, double > > gconsHB
int getLayerFront(const int &det, const int &eta, const int &phi, const int &depth) const

◆ getRZ() [3/4]

double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  layer 
) const

Definition at line 437 of file HcalDDDRecConstants.cc.

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

437  {
438  double rz(0);
439  if (layer > 0 && layer <= (int)(layerGroupSize(0)))
440  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layer - 1].first) : (gconsHE[layer - 1].first));
441 #ifdef EDM_ML_DEBUG
442  edm::LogVerbatim("HCalGeom") << "getRZ: subdet|layer " << subdet << "|" << layer << " rz " << rz;
443 #endif
444  return rz;
445 }
Log< level::Info, true > LogVerbatim
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
std::vector< std::pair< double, double > > gconsHE
unsigned int layerGroupSize(int eta) const
std::vector< std::pair< double, double > > gconsHB

◆ getRZ() [4/4]

std::pair< double, double > HcalDDDRecConstants::getRZ ( const HcalDetId id) const

Definition at line 447 of file HcalDDDRecConstants.cc.

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

447  {
448  int subdet = id.subdetId();
449  int ieta = id.ieta();
450  int iphi = id.iphi();
451  int depth = id.depth();
452  int zside = (subdet == static_cast<int>(HcalBarrel)) ? 1 : id.zside();
453  int layf = getLayerFront(subdet, ieta, iphi, depth);
454  double rzf = (layf < 0)
455  ? 0.0
456  : ((subdet == static_cast<int>(HcalBarrel)) ? zside * (gconsHB[layf].first - gconsHB[layf].second)
457  : zside * (gconsHE[layf].first - gconsHE[layf].second));
458  int layb = getLayerBack(subdet, ieta, iphi, depth);
459  double rzb = (layb < 0)
460  ? 0.0
461  : ((subdet == static_cast<int>(HcalBarrel)) ? zside * (gconsHB[layb].first + gconsHB[layb].second)
462  : zside * (gconsHE[layb].first + gconsHE[layb].second));
463 #ifdef EDM_ML_DEBUG
464  edm::LogVerbatim("HCalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet << "|" << ieta << "|" << iphi << "|"
465  << depth << " lay|rz (front) " << layf << "|" << rzf << " lay|rz (back) " << layb << "|"
466  << rzb;
467 #endif
468  return std::pair<double, double>(rzf, rzb);
469 }
Log< level::Info, true > LogVerbatim
int zside(DetId const &)
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > gconsHE
std::vector< std::pair< double, double > > gconsHB
int getLayerFront(const int &det, const int &eta, const int &phi, const int &depth) const
int getLayerBack(const int &det, const int &eta, const int &phi, const int &depth) const

◆ getThickActive()

std::vector< HcalDDDRecConstants::HcalActiveLength > HcalDDDRecConstants::getThickActive ( const int &  type) const

Definition at line 471 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, SiStripPI::min, phi, L1EGammaClusterEmuProducer_cfi::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().

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

◆ getTopoMode()

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

◆ getTriggerMode()

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

◆ HcalCellTypes()

std::vector< HcalCellType > HcalDDDRecConstants::HcalCellTypes ( HcalSubdetector  subdet) const

Definition at line 526 of file HcalDDDRecConstants.cc.

References hgcalTBTopologyTester_cfi::cells, submitPVResolutionJobs::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(), and numberOfCells().

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

◆ idBack()

HcalDetId HcalDDDRecConstants::idBack ( const HcalDetId id) const

Definition at line 669 of file HcalDDDRecConstants.cc.

References detIdSpR_.

Referenced by HcalTopology::idBack().

669  {
670  HcalDetId hid(id);
671  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
672  if (itr != detIdSpR_.end())
673  hid = HcalDetId(id.subdet(), id.ieta(), id.iphi(), (itr->second).back().depth());
674  return hid;
675 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_

◆ idFront()

HcalDetId HcalDDDRecConstants::idFront ( const HcalDetId id) const

Definition at line 661 of file HcalDDDRecConstants.cc.

References LEDCalibrationChannels::depth, and detIdSpR_.

Referenced by HcalTopology::idFront().

661  {
662  HcalDetId hid(id);
663  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
664  if (itr != detIdSpR_.end())
665  hid = HcalDetId(id.subdet(), id.ieta(), id.iphi(), (itr->second)[0].depth());
666  return hid;
667 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_

◆ initialize()

void HcalDDDRecConstants::initialize ( void  )
private

Definition at line 807 of file HcalDDDRecConstants.cc.

References angle_units::operators::convertRadToDeg(), submitPVResolutionJobs::count, LEDCalibrationChannels::depth, depthMaxDf_, depthMaxSp_, HLT_2022v15_cff::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, 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, ndepth, HLT_2022v15_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().

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

◆ isBH()

bool HcalDDDRecConstants::isBH ( ) const
inline

◆ isHE()

bool HcalDDDRecConstants::isHE ( ) const
inline

Definition at line 110 of file HcalDDDRecConstants.h.

References hcons, and HcalDDDSimConstants::isHE().

110 { return hcons.isHE(); }
const HcalDDDSimConstants & hcons

◆ isPlan1()

bool HcalDDDRecConstants::isPlan1 ( const HcalDetId id) const
inline

Definition at line 111 of file HcalDDDRecConstants.h.

References detIdSp_.

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

111 { return detIdSp_.find(id) != detIdSp_.end(); };
std::map< HcalDetId, HcalDetId > detIdSp_

◆ isPlan1MergedId()

bool HcalDDDRecConstants::isPlan1MergedId ( const HcalDetId id) const
inline

Definition at line 126 of file HcalDDDRecConstants.h.

References detIdSpR_.

Referenced by HcalTopology::validHcal().

126 { return detIdSpR_.find(id) != detIdSpR_.end(); };
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_

◆ isPlan1ToBeMergedId()

bool HcalDDDRecConstants::isPlan1ToBeMergedId ( const HcalDetId id) const
inline

Definition at line 125 of file HcalDDDRecConstants.h.

References detIdSp_.

Referenced by HcalTopology::validHcal().

125 { return detIdSp_.find(id) != detIdSp_.end(); };
std::map< HcalDetId, HcalDetId > detIdSp_

◆ layerGroup()

unsigned int HcalDDDRecConstants::layerGroup ( int  eta,
int  i 
) const
private

Definition at line 1085 of file HcalDDDRecConstants.cc.

References PVValHelper::eta, hpar, mps_fire::i, dqmdumpme::k, and HcalParameters::layerGroupEtaRec.

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

1085  {
1086  unsigned int k = 0;
1087  for (auto const& it : hpar->layerGroupEtaRec) {
1088  if (it.layer == (unsigned int)(eta + 1)) {
1089  return it.layerGroup.at(i);
1090  }
1091  if (it.layer > (unsigned int)(eta + 1))
1092  break;
1093  k = it.layerGroup.at(i);
1094  }
1095  return k;
1096 }
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec

◆ layerGroupSize()

unsigned int HcalDDDRecConstants::layerGroupSize ( int  eta) const
private

Definition at line 1072 of file HcalDDDRecConstants.cc.

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

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

1072  {
1073  unsigned int k = 0;
1074  for (auto const& it : hpar->layerGroupEtaRec) {
1075  if (it.layer == (unsigned int)(eta + 1)) {
1076  return it.layerGroup.size();
1077  }
1078  if (it.layer > (unsigned int)(eta + 1))
1079  break;
1080  k = it.layerGroup.size();
1081  }
1082  return k;
1083 }
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec

◆ maxHFDepth()

int HcalDDDRecConstants::maxHFDepth ( int  ieta,
int  iphi 
) const
inline

◆ mergedDepthDetId()

HcalDetId HcalDDDRecConstants::mergedDepthDetId ( const HcalDetId id) const

◆ mergedDepthList29() [1/2]

bool HcalDDDRecConstants::mergedDepthList29 ( int  ieta,
int  iphi,
int  depth 
) const

Definition at line 586 of file HcalDDDRecConstants.cc.

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

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

586  {
587  int eta = std::abs(ieta);
588  int zside = (ieta > 0) ? 1 : -1;
589  int etamin = iEtaMax[1] - hcons.getDepthEta29(iphi, zside, 1);
590  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
591  int depthMax = getMaxDepth(1, etamin, iphi, zside);
592  int depthMin = hcons.getDepthEta29(iphi, zside, 0) + 1;
593  if (depth >= depthMin && depth <= depthMax)
594  return true;
595  }
596  return false;
597 }
int getDepthEta29(const int &phi, const int &zside, const int &i) const
int zside(DetId 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

◆ mergedDepthList29() [2/2]

std::vector< int > HcalDDDRecConstants::mergedDepthList29 ( int  ieta,
int  iphi 
) const

Definition at line 599 of file HcalDDDRecConstants.cc.

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

599  {
600  std::vector<int> depths;
601  int eta = std::abs(ieta);
602  int zside = (ieta > 0) ? 1 : -1;
603  int etamin = iEtaMax[1] - hcons.getDepthEta29(iphi, zside, 1);
604  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
605  int depthMax = getMaxDepth(1, etamin, iphi, zside);
606  int depthMin = hcons.getDepthEta29(iphi, zside, 0) + 1;
607  depths.reserve(depthMax - depthMin + 1);
608  for (int depth = depthMin; depth <= depthMax; ++depth)
609  depths.emplace_back(depth);
610  }
611  return depths;
612 }
int getDepthEta29(const int &phi, const int &zside, const int &i) const
int zside(DetId 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

◆ nCells() [1/2]

unsigned int HcalDDDRecConstants::nCells ( HcalSubdetector  subdet) const

Definition at line 631 of file HcalDDDRecConstants.cc.

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

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

◆ nCells() [2/2]

unsigned int HcalDDDRecConstants::nCells ( ) const

◆ numberOfCells()

unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 614 of file HcalDDDRecConstants.cc.

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

Referenced by HcalDDDGeometryLoader::load().

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

◆ specialRBXHBHE() [1/2]

void HcalDDDRecConstants::specialRBXHBHE ( const std::vector< HcalDetId > &  idsOld,
std::vector< HcalDetId > &  idsNew 
) const

Definition at line 690 of file HcalDDDRecConstants.cc.

References detIdSp_, and dqmdumpme::k.

690  {
691  for (auto k : idsOld) {
692  std::map<HcalDetId, HcalDetId>::const_iterator itr = detIdSp_.find(k);
693  if (itr == detIdSp_.end())
694  idsNew.emplace_back(k);
695  else
696  idsNew.emplace_back(itr->second);
697  }
698 }
std::map< HcalDetId, HcalDetId > detIdSp_

◆ specialRBXHBHE() [2/2]

bool HcalDDDRecConstants::specialRBXHBHE ( bool  flag,
std::vector< HcalDetId > &  ids 
) const

Definition at line 700 of file HcalDDDRecConstants.cc.

References detIdSp_, and detIdSpR_.

700  {
701  if (tobemerged) {
702  std::map<HcalDetId, HcalDetId>::const_iterator itr;
703  for (itr = detIdSp_.begin(); itr != detIdSp_.end(); ++itr)
704  ids.emplace_back(itr->first);
705  } else {
706  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr;
707  for (itr = detIdSpR_.begin(); itr != detIdSpR_.end(); ++itr)
708  ids.emplace_back(itr->first);
709  }
710  return (!ids.empty());
711 }
std::map< HcalDetId, HcalDetId > detIdSp_
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_

◆ unmergeDepthDetId()

void HcalDDDRecConstants::unmergeDepthDetId ( const HcalDetId id,
std::vector< HcalDetId > &  ids 
) const

Definition at line 677 of file HcalDDDRecConstants.cc.

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

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

677  {
678  ids.clear();
679  std::map<HcalDetId, std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
680  if (itr == detIdSpR_.end()) {
681  ids.emplace_back(id);
682  } else {
683  for (auto k : itr->second) {
684  HcalDetId hid(id.subdet(), id.ieta(), id.iphi(), k.depth());
685  ids.emplace_back(hid);
686  }
687  }
688 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_

◆ withSpecialRBXHBHE()

bool HcalDDDRecConstants::withSpecialRBXHBHE ( ) const
inline

Definition at line 124 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::withSpecialRBXHBHE().

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

Member Data Documentation

◆ depthMaxDf_

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

Definition at line 156 of file HcalDDDRecConstants.h.

Referenced by initialize().

◆ depthMaxSp_

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

Definition at line 156 of file HcalDDDRecConstants.h.

Referenced by initialize().

◆ detIdSp_

std::map<HcalDetId, HcalDetId> HcalDDDRecConstants::detIdSp_
private

◆ detIdSpR_

std::map<HcalDetId, std::vector<HcalDetId> > HcalDDDRecConstants::detIdSpR_
private

◆ etaSimValu

std::vector<std::pair<int, int> > HcalDDDRecConstants::etaSimValu
private

Definition at line 145 of file HcalDDDRecConstants.h.

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

◆ etaTable

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

Definition at line 146 of file HcalDDDRecConstants.h.

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

◆ gconsHB

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

Definition at line 153 of file HcalDDDRecConstants.h.

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

◆ gconsHE

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

Definition at line 154 of file HcalDDDRecConstants.h.

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

◆ hcons

const HcalDDDSimConstants& HcalDDDRecConstants::hcons
private

◆ hpar

const HcalParameters* HcalDDDRecConstants::hpar
private

◆ ietaMap

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

Definition at line 147 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().

◆ iEtaMax

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

◆ iEtaMin

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

◆ maxDepth

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

Definition at line 149 of file HcalDDDRecConstants.h.

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

◆ maxLayer_

const int HcalDDDRecConstants::maxLayer_ = 18
staticprivate

Definition at line 141 of file HcalDDDRecConstants.h.

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

◆ maxLayerHB_

const int HcalDDDRecConstants::maxLayerHB_ = 16
staticprivate

Definition at line 142 of file HcalDDDRecConstants.h.

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

◆ nHalves

int HcalDDDRecConstants::nHalves[2]
private

Definition at line 155 of file HcalDDDRecConstants.h.

Referenced by initialize().

◆ nModule

int HcalDDDRecConstants::nModule[2]
private

Definition at line 155 of file HcalDDDRecConstants.h.

Referenced by initialize().

◆ nPhiBins

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

Definition at line 150 of file HcalDDDRecConstants.h.

Referenced by getNPhi(), and initialize().

◆ phibin

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

◆ phiUnitS

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

Definition at line 152 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().