CMS 3D CMS Logo

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

#include <HcalDDDRecConstants.h>

Classes

struct  HcalActiveLength
 
struct  HcalEtaBin
 
struct  HcalID
 
struct  HFCellParameters
 

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Static Private Attributes

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

Detailed Description

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

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

Definition at line 23 of file HcalDDDRecConstants.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file HcalDDDRecConstants.cc.

References initialize().

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

Definition at line 25 of file HcalDDDRecConstants.cc.

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

Member Function Documentation

const HcalDDDSimConstants* HcalDDDRecConstants::dddConstants ( ) const
inline

Definition at line 134 of file HcalDDDRecConstants.h.

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

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

Definition at line 61 of file HcalDDDRecConstants.h.

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

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

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

Definition at line 52 of file HcalDDDRecConstants.cc.

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

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

53  {
54  std::map<int,int> layers;
55  hcons.ldMap()->getLayerDepth(det, eta+1, phi, zside, layers);
56  if (layers.empty()) {
57  return getDepth(eta, false);
58  } else {
59  std::vector<int> depths;
60  for (unsigned int lay=0; lay < layers.size(); ++lay)
61  depths.emplace_back(layers[lay+1]);
62  return depths;
63  }
64 }
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 31 of file HcalDDDRecConstants.cc.

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

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

Definition at line 69 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getDepthEta16(), and hcons.

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

70  {return hcons.getDepthEta16(det,iphi,zside);}
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 71 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::decrementDepth().

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

Definition at line 67 of file HcalDDDRecConstants.cc.

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

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

67  {
68 
69  std::vector<HcalDDDRecConstants::HcalEtaBin> bins;
70  unsigned int type = (itype == 0) ? 0 : 1;
71  HcalSubdetector subdet = HcalSubdetector(type+1);
72  std::vector<int> phiSp;
73  HcalSubdetector subdetSp = HcalSubdetector(hcons.ldMap()->validDet(phiSp));
74  std::map<int,int> layers;
75  for (int iz=0; iz<2; ++iz) {
76  int zside = 2*iz - 1;
77  for (int ieta = iEtaMin[type]; ieta <= iEtaMax[type]; ++ieta) {
78  std::vector<std::pair<int,double> > phis = getPhis(subdet,ieta);
79  std::vector<std::pair<int,double> > phiUse;
80  getLayerDepth(ieta,layers);
81  if (subdet == subdetSp) {
82  for (auto & phi : phis) {
83  if (std::find(phiSp.begin(),phiSp.end(),(zside*phi.first)) ==
84  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()
118  << " eta bins for type " << type;
119  for (unsigned int i=0; i<bins.size(); ++i) {
120  edm::LogVerbatim("HcalGeom") << "Bin[" << i << "]: Eta = (" << bins[i].ieta
121  << ":" << bins[i].etaMin << ":"
122  << bins[i].etaMax << "), Zside = "
123  << bins[i].zside << ", phis = ("
124  << bins[i].phis.size() << ":" << bins[i].dphi
125  << ") and " << bins[i].layer.size()
126  << " depths (start) " << bins[i].depthStart;
127  for (unsigned int k=0; k<bins[i].layer.size(); ++k)
128  edm::LogVerbatim("HcalGeom") << " [" << k << "] "<< bins[i].layer[k].first
129  << ":" << bins[i].layer[k].second;
130  edm::LogVerbatim("HcalGeom") << "Phi sets";
131  for (unsigned int k=0; k<bins[i].phis.size(); ++k)
132  edm::LogVerbatim("HcalGeom") << "[" << k << "] " << bins[i].phis[k].first
133  << ":" <<bins[i].phis[k].second;
134  }
135 #endif
136  return bins;
137 }
type
Definition: HCALResponse.h:21
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:20
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
int k[5][pyjets_maxn]
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
std::pair<double,double> HcalDDDRecConstants::getEtaLimit ( const int &  i) const
inline

Definition at line 79 of file HcalDDDRecConstants.h.

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

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

Definition at line 140 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, csvLumiCalc::unit, and HcalDDDSimConstants::unitPhi().

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

140  {
141  int ietaAbs = (ieta > 0) ? ieta : -ieta;
142  double eta(0), phi(0);
143  if ((subdet == static_cast<int>(HcalBarrel)) ||
144  (subdet == static_cast<int>(HcalEndcap)) ||
145  (subdet == static_cast<int>(HcalOuter))) { // Use Eta Table
146  int unit = hcons.unitPhi(phibin[ietaAbs-1]);
147  int kphi = (unit == 2) ? ((iphi-1)/2 + 1) : iphi;
148  double foff = (ietaAbs <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
149  eta = 0.5*(etaTable[ietaAbs-1]+etaTable[ietaAbs]);
150  phi = foff + (kphi-0.5)*phibin[ietaAbs-1];
151  } else {
152  ietaAbs -= iEtaMin[2];
153  int unit = hcons.unitPhi(hpar->phitable[ietaAbs-1]);
154  int kphi = (unit == 4) ? ((iphi-3)/4 + 1) : ((iphi-1)/2 + 1);
155  double foff = (unit > 2) ? hpar->phioff[4] : hpar->phioff[2];
156  eta = 0.5*(hpar->etaTableHF[ietaAbs-1]+hpar->etaTableHF[ietaAbs]);
157  phi = foff + (kphi-0.5)*hpar->phitable[ietaAbs-1];
158  }
159  if (ieta < 0) eta = -eta;
160  if (phi > M_PI) phi -= (2*M_PI);
161 #ifdef EDM_ML_DEBUG
162  edm::LogVerbatim("HcalGeom") << "getEtaPhi: subdet|ieta|iphi " << subdet << "|"
163  << ieta << "|" << iphi << " eta|phi " << eta
164  << "|" << phi;
165 #endif
166  return std::pair<double,double>(eta,phi);
167 }
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
std::pair<int,int> HcalDDDRecConstants::getEtaRange ( const int &  i) const
inline
const std::vector<double>& HcalDDDRecConstants::getEtaTable ( ) const
inline

Definition at line 77 of file HcalDDDRecConstants.h.

References etaTable.

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

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

Definition at line 78 of file HcalDDDRecConstants.h.

References HcalParameters::etaTableHF, and hpar.

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

78 {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 170 of file HcalDDDRecConstants.cc.

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

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

171  {
172 
173  int ieta = (keta > 0) ? keta : -keta;
174  int zside= (keta > 0) ? 1 : -1;
175  int eta(ieta), phi(iphi), depth(idepth);
176  if ((subdet == static_cast<int>(HcalOuter)) ||
177  ((subdet == static_cast<int>(HcalBarrel)) && (lay > maxLayerHB_+1))) {
178  subdet= static_cast<int>(HcalOuter);
179  depth = 4;
180  } else if (subdet == static_cast<int>(HcalBarrel) ||
181  subdet == static_cast<int>(HcalEndcap)) {
182  eta = ietaMap[ieta-1];
183  int unit = phiUnitS[ieta-1];
184  int phi0 = (iphi-1)/(hpar->phigroup[eta-1]);
185  if (unit == 2) {
186  phi0 = (iphi+1)/2;
187  phi0 = (phi0-1)/(hpar->phigroup[eta-1]);
188  } else if (unit == 4) {
189  phi0 = (iphi+1)/4;
190  phi0 = (phi0-1)/(hpar->phigroup[eta-1]);
191  }
192  ++phi0;
193  unit = hcons.unitPhi(phibin[eta-1]);
194  phi = hcons.phiNumber(phi0,unit);
195  depth = hcons.findDepth(subdet,eta,phi,zside,lay-1);
196  if (depth <= 0) depth = layerGroup(eta-1, lay-1);
197  if (eta == iEtaMin[1]) {
198  if (subdet == static_cast<int>(HcalBarrel)) {
199  if (depth > hcons.getDepthEta16(subdet,phi,zside))
200  depth = hcons.getDepthEta16(subdet,phi,zside);
201  } else {
202  if (depth < hcons.getDepthEta16(subdet,phi,zside))
203  depth = hcons.getDepthEta16(subdet,phi,zside);
204  }
205  } else if (eta == hpar->noff[0] && lay > 1) {
206  int kphi = phi + int((hpar->phioff[3]+0.1)/phibin[eta-1]);
207  kphi = (kphi-1)%4 + 1;
208  if (kphi == 2 || kphi == 3) depth = layerGroup(eta-1, lay-2);
209  } else if (eta == hpar->noff[1] &&
210  depth > hcons.getDepthEta29(phi,zside,0)) {
211  eta -= hcons.getDepthEta29(phi,zside,1);
212  }
213  }
214 #ifdef EDM_ML_DEBUG
215  edm::LogVerbatim("HcalGeom") << "getHCID: input " << subdet << ":" << ieta
216  << ":" << iphi << ":" << idepth << ":" << lay
217  << " output " << eta << ":" << phi << ":" <<depth;
218 #endif
219  return HcalDDDRecConstants::HcalID(subdet,eta,phi,depth);
220 }
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_
int getDepthEta16(const int &det, const int &phi, const int &zside) const
std::vector< HcalDDDRecConstants::HFCellParameters > HcalDDDRecConstants::getHFCellParameters ( ) const

Definition at line 223 of file HcalDDDRecConstants.cc.

References funct::abs(), postprocess-scan-build::cells, HcalDDDSimConstants::getIdHF2QIE(), HcalDDDSimConstants::getPhiTableHF(), HcalDDDSimConstants::getRTableHF(), hcons, iEtaMin, createfilelist::int, gen::k, maxDepth, DetIdAssociatorESProducer_cff::nEta, hfnoseDigiStudy_cfi::rMax, and hfnoseDigiStudy_cfi::rMin.

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

223  {
224 
225  std::vector<HcalDDDRecConstants::HFCellParameters> cells;
226  unsigned int nEta = hcons.getPhiTableHF().size();
227  if (maxDepth[2] > 0) {
228  for (unsigned int k=0; k<nEta; ++k) {
229  int ieta = iEtaMin[2] + k;
230  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k]/(5._deg));
231  int iphi = (dphi == 4) ? 3 : 1;
232  int nphi = 72/dphi;
233  double rMin = hcons.getRTableHF()[nEta-k-1]/CLHEP::cm;
234  double rMax = hcons.getRTableHF()[nEta-k]/CLHEP::cm;
235  HcalDDDRecConstants::HFCellParameters cell1( ieta,1,iphi,dphi,nphi,rMin,rMax);
236  cells.emplace_back(cell1);
237  HcalDDDRecConstants::HFCellParameters cell2(-ieta,1,iphi,dphi,nphi,rMin,rMax);
238  cells.emplace_back(cell2);
239  }
240  }
241  if (maxDepth[2] > 2) {
242  if (!hcons.getIdHF2QIE().empty()) {
243  for (unsigned int k=0; k<hcons.getIdHF2QIE().size(); ++k) {
244  int ieta = hcons.getIdHF2QIE()[k].ieta();
245  int ind = std::abs(ieta) - iEtaMin[2];
246  int dphi = (int)(0.001 + hcons.getPhiTableHF()[ind]/(5._deg));
247  int iphi = hcons.getIdHF2QIE()[k].iphi();
248  double rMin = hcons.getRTableHF()[nEta-ind-1]/CLHEP::cm;
249  double rMax = hcons.getRTableHF()[nEta-ind]/CLHEP::cm;
250  HcalDDDRecConstants::HFCellParameters cell1( ieta,3,iphi,dphi,1,rMin,rMax);
251  cells.emplace_back(cell1);
252  }
253  } else {
254  for (unsigned int k=0; k<nEta; ++k) {
255  int ieta = iEtaMin[2] + k;
256  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k]/(5._deg));
257  int iphi = (dphi == 4) ? 3 : 1;
258  int nphi = 72/dphi;
259  double rMin = hcons.getRTableHF()[nEta-k-1]/CLHEP::cm;
260  double rMax = hcons.getRTableHF()[nEta-k]/CLHEP::cm;
261  HcalDDDRecConstants::HFCellParameters cell1( ieta,3,iphi,dphi,nphi,rMin,rMax);
262  cells.emplace_back(cell1);
263  HcalDDDRecConstants::HFCellParameters cell2(-ieta,3,iphi,dphi,nphi,rMin,rMax);
264  cells.emplace_back(cell2);
265  }
266  }
267  }
268 #ifdef EDM_ML_DEBUG
269  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants returns " << cells.size()
270  << " HF cell parameters";
271  for (unsigned int k=0; k<cells.size(); ++k)
272  edm::LogVerbatim("HcalGeom") << "Cell[" << k <<"] : (" << cells[k].ieta
273  << ", " << cells[k].depth << ", "
274  << cells[k].firstPhi << ", " << cells[k].stepPhi
275  << ", " << cells[k].nPhi << ", " <<cells[k].rMin
276  << ", " << cells[k].rMax << ")";
277 #endif
278  return cells;
279 }
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
int k[5][pyjets_maxn]
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 88 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getLayer0Wt(), and hcons.

Referenced by HcalHitRelabeller::energyWt().

89  {return hcons.getLayer0Wt(det,phi,zside);}
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 297 of file HcalDDDRecConstants.cc.

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

Referenced by getEtaLimit(), and getRZ().

298  {
299  int subdet = (idet == 1) ? 1 : 2;
300  int zside = (ieta > 0) ? 1 : -1;
301  int eta = zside*ieta;
302  int layBack = hcons.ldMap()->getLayerBack(subdet,eta,iphi,zside,depth);
303  int laymax = hcons.getLastLayer(subdet, ieta);
304  if (layBack < 0 && eta <= hpar->etaMax[1]) {
305  for (unsigned int k=0; k<layerGroupSize(eta-1); ++k) {
306  if (depth+1 == (int)layerGroup(eta-1, k)) {
307  layBack = k - 1;
308  break;
309  }
310  }
311  }
312  if (layBack < 0 || layBack > laymax) layBack = laymax;
313 #ifdef EDM_ML_DEBUG
314  edm::LogVerbatim("HcalGeom") << "getLayerBack::Input " << idet << ":" << ieta
315  << ":" << iphi << ":" << depth << " Output "
316  << layBack;
317 #endif
318  return layBack;
319 }
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
int k[5][pyjets_maxn]
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
void HcalDDDRecConstants::getLayerDepth ( const int &  ieta,
std::map< int, int > &  layers 
) const

Definition at line 281 of file HcalDDDRecConstants.cc.

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

Referenced by getEtaBins(), and getEtaLimit().

281  {
282 
283  layers.clear();
284  for (unsigned int l=0; l<layerGroupSize(ieta-1); ++l) {
285  int lay = l + 1;
286  layers[lay] = layerGroup(ieta-1,l);
287  }
288 #ifdef EDM_ML_DEBUG
289  edm::LogVerbatim("HcalGeom") << "getLayerDepth::Input " << ieta << " Output "
290  << layers.size() << " entries";
291  for (std::map<int,int>::iterator itr=layers.begin(); itr != layers.end();
292  ++itr)
293  edm::LogVerbatim("HcalGeom") << " [" << itr->first << "] " << itr->second;
294 #endif
295 }
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 321 of file HcalDDDRecConstants.cc.

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

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

322  {
323  int subdet = (idet == 1) ? 1 : 2;
324  int zside = (ieta > 0) ? 1 : -1;
325  int eta = zside*ieta;
326  int layFront = hcons.ldMap()->getLayerFront(subdet,eta,iphi,zside,depth);
327  int laymin = hcons.getFrontLayer(subdet, ieta);
328  if ((layFront < 0) ||
329  ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16))) {
330  if ((subdet == static_cast<int>(HcalEndcap)) && (eta == 16)) {
331  layFront = laymin;
332  } else if (eta <= hpar->etaMax[1]) {
333  for (unsigned int k=0; k<layerGroupSize(eta-1); ++k) {
334  if (depth == (int)layerGroup(eta-1, k)) {
335  if ((int)(k) >= laymin) {
336  layFront = k;
337  break;
338  }
339  }
340  }
341  }
342  } else {
343  if (layFront < laymin) layFront = laymin;
344  }
345 #ifdef EDM_ML_DEBUG
346  edm::LogVerbatim("HcalGeom") << "getLayerFront::Input " << idet << ":" << ieta
347  << ":" << iphi << ":" << depth << " Output "
348  << layFront;
349 #endif
350  return layFront;
351 }
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
int k[5][pyjets_maxn]
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
int HcalDDDRecConstants::getMaxDepth ( const int &  type) const
inline
int HcalDDDRecConstants::getMaxDepth ( const int &  itype,
const int &  ieta,
const int &  iphi,
const int &  zside 
) const

Definition at line 353 of file HcalDDDRecConstants.cc.

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

354  {
355 
356  unsigned int type = (itype == 0) ? 0 : 1;
357  int lmax = hcons.getMaxDepth(type+1, ieta, iphi, zside, true);
358  if (lmax < 0) {
359  unsigned int lymax = (type == 0) ? maxLayerHB_+1 : maxLayer_+1;
360  lmax = 0;
361  if (layerGroupSize(ieta-1) > 0) {
362  if (layerGroupSize(ieta-1) < lymax) lymax = layerGroupSize(ieta-1);
363  lmax = (int)(layerGroup(ieta-1, lymax-1));
364  if (type == 0 && ieta == iEtaMax[type]) lmax = hcons.getDepthEta16M(1);
365  if (type == 1 && ieta >= hpar->noff[1]) lmax = hcons.getDepthEta29M(0,false);
366  }
367  }
368 #ifdef EDM_ML_DEBUG
369  edm::LogVerbatim("HcalGeom") << "getMaxDepth::Input " << itype << ":" << ieta
370  << ":" << iphi << ":" << zside << " Output "
371  << lmax;
372 #endif
373  return lmax;
374 }
type
Definition: HCALResponse.h:21
unsigned int layerGroup(int eta, int i) const
static const int maxLayer_
int zside(DetId const &)
const HcalParameters * hpar
int getMaxDepth(const int &type) const
std::vector< int > iEtaMax
int getDepthEta16M(const int &det) const
int getDepthEta29M(const int &i, const bool &planOne) const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
std::vector< int > noff
static const int maxLayerHB_
int HcalDDDRecConstants::getMinDepth ( const int &  itype,
const int &  ieta,
const int &  iphi,
const int &  zside 
) const

Definition at line 376 of file HcalDDDRecConstants.cc.

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

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

377  {
378 
379  int lmin = hcons.getMinDepth(itype+1, ieta, iphi, zside, true);
380  if (lmin < 0) {
381  if (itype == 2) { // HFn
382  lmin = 1;
383  } else if (itype == 3) { //HO
384  lmin = maxDepth[3];
385  } else {
386  unsigned int type = (itype == 0) ? 0 : 1;
387  if (layerGroupSize(ieta-1) > 0) {
388  if (type == 1 && ieta == iEtaMin[type])
389  lmin = hcons.getDepthEta16M(2);
390  else
391  lmin = (int)(layerGroup(ieta-1, 0));
392  }
393  }
394  }
395  return lmin;
396 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
int getMinDepth(const int &det, const int &eta, const int &phi, const int &zside, const bool &partialOnly) const
unsigned int layerGroup(int eta, int i) const
std::vector< int > maxDepth
int zside(DetId const &)
int getDepthEta16M(const int &det) const
unsigned int layerGroupSize(int eta) const
const HcalDDDSimConstants & hcons
int HcalDDDRecConstants::getNEta ( ) const
inline

Definition at line 95 of file HcalDDDRecConstants.h.

References HcalParameters::etagroup, and hpar.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 96 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::validRaw().

96 {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 764 of file HcalDDDRecConstants.cc.

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

Referenced by dddConstants(), and getEtaBins().

767  {
768 
769  unsigned int lymax = (subdet == HcalBarrel) ? maxLayerHB_+1 : maxLayer_+1;
770  int type = (subdet == HcalBarrel) ? 0 : 1;
771  double dphi = phibin[ieta-1];
773  etabin.phis.insert(etabin.phis.end(),phis.begin(),phis.end());
774  int n = (ieta == iEtaMax[type]) ? 0 : 1;
776  etabin0.depthStart = hcons.getDepthEta29(phis[0].first,zside,0)+1;
777  int dstart = -1;
778  int lmin(0), lmax(0);
779 
780  std::map<int,int>::iterator itr=layers.begin();
781  if (!layers.empty()) {
782  int dep = itr->second;
783  if (subdet == HcalEndcap && ieta == iEtaMin[type])
784  dep = hcons.getDepthEta16(subdet,phis[0].first,zside);
785  unsigned lymx0 = (layers.size() > lymax) ? lymax : layers.size();
786 #ifdef EDM_ML_DEBUG
787  edm::LogVerbatim("HcalGeom") << "Eta " << ieta << ":" << hpar->noff[1]
788  << " zside " << zside << " lymax " << lymx0
789  << ":" << lymax << " Depth " << dep << ":"
790  << itr->second;
791  unsigned int l(0);
792  for (itr = layers.begin(); itr != layers.end(); ++itr,++l)
793  edm::LogVerbatim("HcalGeom") << "Layer [" << l << "] " << itr->first
794  << ":" << itr->second;
795  edm::LogVerbatim("HcalGeom") << "With " << phis.size() << " phis";
796  for (unsigned int l=0; l<phis.size(); ++l)
797  edm::LogVerbatim("HcalGeom") << "[" << l << "] " << phis[l].first << ":"
798  << convertRadToDeg(phis[l].second);
799 #endif
800  for (itr = layers.begin(); itr != layers.end(); ++itr) {
801  if (itr->first <= (int)(lymx0)) {
802  if (itr->second == dep) {
803  if (lmin == 0) lmin = itr->first;
804  lmax = itr->first;
805  } else if (itr->second > dep) {
806  if (dstart < 0) dstart = dep;
807  int lmax0 = (lmax >= lmin) ? lmax : lmin;
808  if (subdet == HcalEndcap && ieta+1 == hpar->noff[1] &&
809  dep > hcons.getDepthEta29(phis[0].first,zside,0)) {
810  etabin0.layer.emplace_back(std::pair<int,int>(lmin,lmax0));
811  } else {
812  etabin.layer.emplace_back(std::pair<int,int>(lmin,lmax0));
813  }
814  lmin = itr->first;
815  lmax = lmin-1;
816  dep = itr->second;
817  }
818  if (subdet == HcalBarrel && ieta == iEtaMax[type] &&
819  dep > hcons.getDepthEta16M(1)) break;
820  if (subdet == HcalEndcap && ieta == hpar->noff[1] &&
821  dep > hcons.getDepthEta29M(0,planOne)) {
822  lmax = lymx0;
823  break;
824  }
825  if (itr->first == (int)(lymx0)) lmax = lymx0;
826  }
827  }
828  if (lmax >= lmin) {
829  if (ieta+1 == hpar->noff[1]) {
830  etabin0.layer.emplace_back(std::pair<int,int>(lmin,lmax));
831  etabin0.phis.insert(etabin0.phis.end(),phis.begin(),phis.end());
832  bins.emplace_back(etabin0);
833 #ifdef EDM_ML_DEBUG
834  edm::LogVerbatim("HcalGeom") << "etabin0: dStatrt " << etabin0.depthStart
835  << " layers " << etabin0.layer.size() << ":"
836  << lmin << ":" << lmax << " phis "
837  << phis.size();
838  for (unsigned int k=0; k<etabin0.layer.size(); ++k)
839  edm::LogVerbatim("HcalGeom") << " [" << k << "] "
840  << etabin0.layer[k].first << ":"
841  << etabin0.layer[k].second;
842 #endif
843  } else if (ieta == hpar->noff[1]) {
844  } else {
845  etabin.layer.emplace_back(std::pair<int,int>(lmin,lmax));
846  if (dstart < 0) dstart = dep;
847  }
848  }
849  }
850  etabin.depthStart = dstart;
851  bins.emplace_back(etabin);
852 #ifdef EDM_ML_DEBUG
853  edm::LogVerbatim("HcalGeom") << "etabin: dStatrt " << etabin.depthStart
854  << " layers " << etabin.layer.size() << ":"
855  << lmin << ":" << lmax << " phis "
856  << etabin.phis.size();
857  for (unsigned int k=0; k<etabin.layer.size(); ++k)
858  edm::LogVerbatim("HcalGeom") << "[" << k << "] " << etabin.layer[k].first
859  << ":" << etabin.layer[k].second;
860 #endif
861 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
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
int k[5][pyjets_maxn]
std::vector< double > etaTable
const HcalDDDSimConstants & hcons
std::vector< int > noff
static const int maxLayerHB_
std::vector< std::pair< int, double > > phis
int getDepthEta16(const int &det, const int &phi, const int &zside) const
double HcalDDDRecConstants::getPhiBin ( const int &  i) const
inline

Definition at line 98 of file HcalDDDRecConstants.h.

References mps_fire::i, and phibin.

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

Definition at line 99 of file HcalDDDRecConstants.h.

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

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

Definition at line 100 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::HcalTopology().

100 {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 399 of file HcalDDDRecConstants.cc.

References geant_units::operators::convertRadToDeg(), etaSimValu, plotBeamSpotDB::first, HcalDDDSimConstants::getPhiCons(), HcalForward, hcons, gen::k, phi, phibin, HcalDDDSimConstants::phiNumber(), edm::second(), HcalDDDSimConstants::unitPhi(), and units().

Referenced by getEtaBins(), and getPhiOffs().

399  {
400 
401  std::vector<std::pair<int,double> > phis;
402  int ietaAbs = (ieta > 0) ? ieta : -ieta;
403  int keta = (subdet != HcalForward) ? etaSimValu[ietaAbs-1].first : ietaAbs;
404  std::pair<double,double> ficons = hcons.getPhiCons(subdet, keta);
405  double fioff = ficons.first;
406  double dphi = (subdet != HcalForward) ? phibin[ietaAbs-1] : ficons.second;
407  int nphi = int((2._pi+0.1*dphi)/dphi);
408  int units = hcons.unitPhi(subdet, keta);
409  for (int ifi = 0; ifi < nphi; ++ifi) {
410  double phi =-fioff + (ifi+0.5)*dphi;
411  int iphi = hcons.phiNumber(ifi+1,units);
412  phis.emplace_back(std::pair<int,double>(iphi,phi));
413  }
414 #ifdef EDM_ML_DEBUG
415  edm::LogVerbatim("HcalGeom") << "getEtaPhi: subdet|ieta|iphi " << subdet << "|"
416  << ieta << " with " << phis.size() << " phi bins";
417  for (unsigned int k=0; k<phis.size(); ++k)
418  edm::LogVerbatim("HcalGeom") << "[" << k << "] iphi " << phis[k].first
419  << " phi " << convertRadToDeg(phis[k].second);
420 #endif
421  return phis;
422 }
std::vector< std::pair< int, int > > etaSimValu
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
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
int k[5][pyjets_maxn]
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 102 of file HcalDDDRecConstants.h.

References phibin.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 103 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::HcalTopology().

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

Definition at line 424 of file HcalDDDRecConstants.cc.

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

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

424  {
425 
426  phiz.clear();
427  int subdet = hcons.ldMap()->getSubdet();
428  if (subdet > 0) {
429  std::vector<int> phis = hcons.ldMap()->getPhis();
430  for (int k : phis) {
431  int zside = (k > 0) ? 1 : -1;
432  int phi = (k > 0) ? k : -k;
433  phiz.emplace_back(std::pair<int,int>(phi,zside));
434  }
435  }
436 #ifdef EDM_ML_DEBUG
437  edm::LogVerbatim("HcalGeom") << "Special RBX for detector " << subdet
438  << " with " << phiz.size() << " phi/z bins";
439  for (unsigned int k=0; k<phiz.size(); ++k)
440  edm::LogVerbatim("HcalGeom") << " [" << k << "] " << phiz[k].first << ":"
441  << phiz[k].second;
442 #endif
443  return subdet;
444 }
int getSubdet() const
int zside(DetId const &)
const std::vector< int > & getPhis() const
int k[5][pyjets_maxn]
const HcalDDDSimConstants & hcons
const HcalLayerDepthMap * ldMap() const
double HcalDDDRecConstants::getRZ ( const int &  subdet,
const int &  ieta,
const int &  depth 
) const

Definition at line 446 of file HcalDDDRecConstants.cc.

Referenced by HGCalSimHitValidation::analyzeHits(), HGCalTriggerTools::getLayerZ(), getPhiTableHF(), and HcalHBHEMuonAnalyzer::goodCell().

447  {
448 
449  return getRZ(subdet, ieta, 1, depth);
450 }
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 452 of file HcalDDDRecConstants.cc.

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

453  {
454  int layf = getLayerFront(subdet,ieta,iphi,depth);
455  double rz = (layf < 0) ? 0.0 :
456  ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layf].first) :
457  (gconsHE[layf].first));
458 #ifdef EDM_ML_DEBUG
459  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet
460  << "|" << ieta << "|" << iphi << "|" << depth
461  << " lay|rz " << layf << "|" << rz;
462 #endif
463  return rz;
464 }
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 466 of file HcalDDDRecConstants.cc.

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

466  {
467 
468  double rz(0);
469  if (layer > 0 && layer <= (int)(layerGroupSize(0)))
470  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layer-1].first) :
471  (gconsHE[layer-1].first));
472 #ifdef EDM_ML_DEBUG
473  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|layer " << subdet << "|"
474  << layer << " rz " << rz;
475 #endif
476  return rz;
477 }
std::vector< std::pair< double, double > > gconsHE
unsigned int layerGroupSize(int eta) const
std::vector< std::pair< double, double > > gconsHB
std::pair< double, double > HcalDDDRecConstants::getRZ ( const HcalDetId id) const

Definition at line 479 of file HcalDDDRecConstants.cc.

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

479  {
480  int subdet = id.subdetId();
481  int ieta = id.ieta();
482  int iphi = id.iphi();
483  int depth = id.depth();
484  int zside = (subdet == static_cast<int>(HcalBarrel)) ? 1 : id.zside();
485  int layf = getLayerFront(subdet,ieta,iphi,depth);
486  double rzf = (layf < 0) ? 0.0 :
487  ((subdet == static_cast<int>(HcalBarrel)) ?
488  zside*(gconsHB[layf].first-gconsHB[layf].second) :
489  zside*(gconsHE[layf].first-gconsHE[layf].second));
490  int layb = getLayerBack(subdet,ieta,iphi,depth);
491  double rzb = (layb < 0) ? 0.0 :
492  ((subdet == static_cast<int>(HcalBarrel)) ?
493  zside*(gconsHB[layb].first+gconsHB[layb].second) :
494  zside*(gconsHE[layb].first+gconsHE[layb].second));
495 #ifdef EDM_ML_DEBUG
496  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|ieta|ipho|depth " << subdet
497  << "|" << ieta << "|" << iphi << "|" << depth
498  << " lay|rz (front) " << layf << "|" << rzf
499  << " lay|rz (back) " << layb << "|" << rzb;
500 #endif
501  return std::pair<double,double>(rzf,rzb);
502 }
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 505 of file HcalDDDRecConstants.cc.

References stringResolutionProvider_cfi::bin, create_public_pileup_plots::bins, geant_units::operators::convertRadToDeg(), funct::cos(), egammaForCoreTracking_cff::depth, HcalDDDRecConstants::HcalActiveLength::depth, HcalDDDRecConstants::HcalActiveLength::eta, PVValHelper::eta, JetChargeProducer_cfi::exp, gconsHB, gconsHE, getEtaBins(), HcalDDDSimConstants::getLastLayer(), getLayerFront(), hcons, mps_fire::i, HcalDDDRecConstants::HcalActiveLength::ieta, iEtaMin, HcalDDDRecConstants::HcalActiveLength::iphis, SiStripPI::max, min(), phi, Scenarios_cff::scale, edm::second(), funct::sin(), HcalDDDRecConstants::HcalActiveLength::stype, lumiQTWidget::t, theta(), HcalDDDRecConstants::HcalActiveLength::thick, HcalDDDRecConstants::HcalActiveLength::zside, and ecaldqm::zside().

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

505  {
506 
507  std::vector<HcalDDDRecConstants::HcalActiveLength> actives;
508  std::vector<HcalDDDRecConstants::HcalEtaBin> bins = getEtaBins(type);
509 #ifdef EDM_ML_DEBUG
510  unsigned int kount(0);
511 #endif
512  for (auto & bin : bins) {
513  int ieta = bin.ieta;
514  int zside = bin.zside;
515  int stype = (bin.phis.size() > 4) ? 0 : 1;
516  int layf = getLayerFront(type+1,zside*ieta,bin.phis[0].first,bin.depthStart) + 1;
517  int layl = hcons.getLastLayer(type+1,zside*ieta) + 1;
518  double eta = 0.5*(bin.etaMin+bin.etaMax);
519  double theta = 2*atan(exp(-eta));
520  double scale = 1.0/((type == 0) ? sin(theta) : cos(theta));
521  int depth = bin.depthStart;
522 #ifdef EDM_ML_DEBUG
523  edm::LogVerbatim("HcalGeom") << "Eta " << ieta << " zside " << zside
524  << " depth " << depth << " Layers " << layf
525  << ":" << layl << ":" << bin.layer.size();
526  for (auto ll : bin.layer)
527  edm::LogVerbatim("HcalGeom") << "Layer " << ll.first << ":" << ll.second;
528  for (auto phi : bin.phis)
529  edm::LogVerbatim("HcalGeom") << "Phi " << phi.first << ":"
530  << convertRadToDeg(phi.second);
531 #endif
532  for (unsigned int i = 0; i < bin.layer.size(); ++i) {
533  double thick(0);
534  int lmin = (type == 1 && ieta == iEtaMin[1]) ? layf :
535  std::max(bin.layer[i].first,layf);
536  int lmax = std::min(bin.layer[i].second,layl);
537  for (int j = lmin; j <= lmax; ++j) {
538  double t = ((type == 0) ? gconsHB[j-1].second : gconsHE[j-1].second);
539  if ((type == 1) && (ieta <= 18)) t = gconsHE[j].second;
540  if (t > 0) thick += t;
541  }
542 #ifdef EDM_ML_DEBUG
543  edm::LogVerbatim("HcalGeom") << "Type " << type << " L " << lmin << ":"
544  << lmax << " T " << thick;
545 #endif
546  thick *= (2.*scale);
547  HcalDDDRecConstants::HcalActiveLength active(ieta,depth,zside,stype,zside*eta,thick);
548  for (auto phi : bin.phis)
549  active.iphis.emplace_back(phi.first);
550  actives.emplace_back(active);
551  ++depth;
552 #ifdef EDM_ML_DEBUG
553  kount++;
554  edm::LogVerbatim("HcalGeom") << "getThickActive: [" << kount << "] eta:"
555  << active.ieta << ":" << active.eta
556  << " zside " << active.zside << " depth "
557  << active.depth << " type " << active.stype
558  << " thick " << active.thick;
559 #endif
560  }
561  }
562  return actives;
563 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
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
bin
set the eta bin as selection string.
const HcalDDDSimConstants & hcons
std::vector< std::pair< double, double > > gconsHB
int HcalDDDRecConstants::getTopoMode ( ) const
inline

Definition at line 111 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::topologyMode.

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

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

Definition at line 112 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::HcalTopology().

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

Definition at line 566 of file HcalDDDRecConstants.cc.

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

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

566  {
567 
568  if (subdet == HcalBarrel || subdet == HcalEndcap) {
569  std::vector<HcalCellType> cells;
570  int isub = (subdet == HcalBarrel) ? 0 : 1;
571  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
572  std::vector<int> missPhi;
573  for (const auto& etabin : etabins) {
574  std::vector<HcalCellType> temp;
575  std::vector<int> count;
576  std::vector<double> dmin, dmax;
577  for (unsigned int il=0; il<etabin.layer.size(); ++il) {
578  HcalCellType cell(subdet, etabin.ieta, etabin.zside, 0,
580  temp.emplace_back(cell);
581  count.emplace_back(0);
582  dmin.emplace_back(0);
583  dmax.emplace_back(0);
584  }
585  int ieta = etabin.ieta;
586  for (int keta=etaSimValu[ieta-1].first; keta<=etaSimValu[ieta-1].second;
587  ++keta) {
588  std::vector<HcalCellType> cellsm = hcons.HcalCellTypes(subdet,keta,-1);
589  for (unsigned int il=0; il<etabin.layer.size(); ++il) {
590  for (auto & ic : cellsm) {
591  if (ic.depthSegment() >= etabin.layer[il].first &&
592  ic.depthSegment() <= etabin.layer[il].second &&
593  ic.etaBin() == temp[il].etaBin() &&
594  ic.zside() == temp[il].zside()) {
595  if (count[il] == 0) {
596  temp[il] = ic;
597  dmin[il] = ic.depthMin();
598  dmax[il] = ic.depthMax();
599  }
600  ++count[il];
601  if (ic.depthMin() < dmin[il])
602  dmin[il] = ic.depthMin();
603  if (ic.depthMax() > dmax[il])
604  dmax[il] = ic.depthMax();
605  }
606  }
607  }
608  }
609  for (unsigned int il=0; il<etabin.layer.size(); ++il) {
610  int depth = etabin.depthStart + (int)(il);
611  temp[il].setEta(ieta,etabin.etaMin,etabin.etaMax);
612  temp[il].setDepth(depth,dmin[il],dmax[il]);
613  double foff = (etabin.ieta <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
614  int unit = hcons.unitPhi(etabin.dphi);
615  temp[il].setPhi(etabin.phis, missPhi, foff, etabin.dphi, unit);
616  cells.emplace_back(temp[il]);
617  }
618  }
619 #ifdef EDM_ML_DEBUG
620  edm::LogVerbatim("HcalGeom") << "HcalDDDRecConstants: found " << cells.size()
621  << " cells for sub-detector type " << isub;
622  for (unsigned int ic=0; ic<cells.size(); ++ic)
623  edm::LogVerbatim("HcalGeom") << "Cell[" << ic << "] " << cells[ic];
624 #endif
625  return cells;
626  } else {
627  return hcons.HcalCellTypes(subdet,-1,-1);
628  }
629 }
std::vector< std::pair< int, int > > etaSimValu
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< double > phioff
const HcalDDDSimConstants & hcons
HcalDetId HcalDDDRecConstants::idBack ( const HcalDetId id) const

Definition at line 717 of file HcalDDDRecConstants.cc.

References detIdSpR_.

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

717  {
718 
719  HcalDetId hid(id);
720  std::map<HcalDetId,std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
721  if (itr != detIdSpR_.end())
722  hid = HcalDetId(id.subdet(),id.ieta(),id.iphi(),(itr->second).back().depth());
723  return hid;
724 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
HcalDetId HcalDDDRecConstants::idFront ( const HcalDetId id) const

Definition at line 708 of file HcalDDDRecConstants.cc.

References egammaForCoreTracking_cff::depth, and detIdSpR_.

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

708  {
709 
710  HcalDetId hid(id);
711  std::map<HcalDetId,std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
712  if (itr != detIdSpR_.end())
713  hid = HcalDetId(id.subdet(),id.ieta(),id.iphi(),(itr->second)[0].depth());
714  return hid;
715 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
void HcalDDDRecConstants::initialize ( void  )
private

Definition at line 863 of file HcalDDDRecConstants.cc.

References geant_units::operators::convertRadToDeg(), KineDebug3::count(), egammaForCoreTracking_cff::depth, depthMaxDf_, depthMaxSp_, particleFlowClusterHBHE_cfi::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, ietaMap, iEtaMax, iEtaMin, createfilelist::int, gen::k, GetRecoTauVFromDQM_MC_cff::kk, checklumidiff::l, layerGroup(), layerGroupSize(), HcalDDDSimConstants::ldMap(), genParticles_cff::map, HcalParameters::maxDepth, maxDepth, maxLayer_, maxLayerHB_, HcalParameters::modHB, HcalParameters::modHE, DetIdAssociatorESProducer_cff::nEta, nHalves, nModule, HcalParameters::noff, nPhiBins, phi, HcalParameters::phibin, phibin, HcalParameters::phigroup, HcalParameters::phitable, phiUnitS, HcalParameters::rHB, edm::second(), csvLumiCalc::unit, HcalDDDSimConstants::unitPhi(), HcalLayerDepthMap::validDet(), HcalLayerDepthMap::validEta(), HcalParameters::zHE, and ecaldqm::zside().

Referenced by dddConstants(), and HcalDDDRecConstants().

863  {
864 
865  //Eta grouping
866  int nEta = (int)(hpar->etagroup.size());
867  if (nEta != (int)(hpar->phigroup.size())) {
868  edm::LogError("HCalGeom") << "HcalDDDRecConstants: sizes of the vectors "
869  << " etaGroup (" << nEta << ") and phiGroup ("
870  << hpar->phigroup.size() << ") do not match";
871  throw cms::Exception("DDException") << "HcalDDDRecConstants: inconsistent array sizes" << nEta << ":" << hpar->phigroup.size();
872  }
873 
874  // First eta table
875  iEtaMin = hpar->etaMin;
876  iEtaMax = hpar->etaMax;
877  etaTable.clear(); ietaMap.clear(); etaSimValu.clear();
878  int ieta(0), ietaHB(0), ietaHE(0), ietaHEM(0);
879  etaTable.emplace_back(hpar->etaTable[ieta]);
880  for (int i=0; i<nEta; ++i) {
881  int ef = ieta+1;
882  ieta += (hpar->etagroup[i]);
883  if (ieta >= (int)(hpar->etaTable.size())) {
884  edm::LogError("HCalGeom")
885  << "HcalDDDRecConstants: Going beyond the array boundary "
886  << hpar->etaTable.size() << " at index " << i
887  << " of etaTable from SimConstant";
888  throw cms::Exception("DDException")
889  << "HcalDDDRecConstants: Going beyond the array boundary "
890  << hpar->etaTable.size() << " at index " << i
891  << " of etaTable from SimConstant";
892  } else {
893  etaTable.emplace_back(hpar->etaTable[ieta]);
894  etaSimValu.emplace_back(std::pair<int,int>(ef,ieta));
895  }
896  for (int k=0; k<(hpar->etagroup[i]); ++k) ietaMap.emplace_back(i+1);
897  if (ieta <= hpar->etaMax[0]) ietaHB = i+1;
898  if (ieta <= hpar->etaMin[1]) ietaHE = i+1;
899  if (ieta <= hpar->etaMax[1]) ietaHEM= i+1;
900  }
901  iEtaMin[1] = ietaHE;
902  iEtaMax[0] = ietaHB;
903  iEtaMax[1] = ietaHEM;
904 
905  // Then Phi bins
906  nPhiBins.clear();
907  for (unsigned int k=0; k<4; ++k) nPhiBins.emplace_back(0);
908  ieta = 0;
909  phibin.clear(); phiUnitS.clear();
910  for (int i=0; i<nEta; ++i) {
911  double dphi = (hpar->phigroup[i])*(hpar->phibin[ieta]);
912  phibin.emplace_back(dphi);
913  int nphi = (int)((2._pi + 0.001)/dphi);
914  if (ieta <= iEtaMax[0]) {
915  if (nphi > nPhiBins[0]) nPhiBins[3] = nPhiBins[0] = nphi;
916  }
917  if (ieta >= iEtaMin[1]) {
918  if (nphi > nPhiBins[1]) nPhiBins[1] = nphi;
919  }
920  ieta += (hpar->etagroup[i]);
921  }
922  for (unsigned int i=1; i<hpar->etaTable.size(); ++i) {
923  int unit = hcons.unitPhi(hpar->phibin[i-1]);
924  phiUnitS.emplace_back(unit);
925  }
926  for (double i : hpar->phitable) {
927  int nphi = (int)((2._pi + 0.001)/i);
928  if (nphi > nPhiBins[2]) nPhiBins[2] = nphi;
929  }
930 #ifdef EDM_ML_DEBUG
931  edm::LogVerbatim("HcalGeom")
932  << "HcalDDDRecConstants: Modified eta/deltaphi table for " << nEta
933  << " bins";
934  for (int i=0; i<nEta; ++i)
935  edm::LogVerbatim("HcalGeom")
936  << "Eta[" << i << "] = " << etaTable[i] << ":" << etaTable[i+1] << ":"
937  << etaSimValu[i].first << ":" << etaSimValu[i].second << " PhiBin[" << i
938  << "] = " << convertRadToDeg(phibin[i]);
939  for (unsigned int i=0; i<phiUnitS.size(); ++i)
940  edm::LogVerbatim("HcalGeom") << " PhiUnitS[" << i << "] = " << phiUnitS[i];
941  for (unsigned int i=0; i<nPhiBins.size(); ++i)
942  edm::LogVerbatim("HcalGeom") << " nPhiBins[" << i << "] = " << nPhiBins[i];
943  for (unsigned int i=0; i<hpar->etaTableHF.size(); ++i)
944  edm::LogVerbatim("HcalGeom") << " EtaTableHF[" << i << "] = " << hpar->etaTableHF[i];
945  for (unsigned int i=0; i<hpar->phitable.size(); ++i)
946  edm::LogVerbatim("HcalGeom") << " PhiBinHF[" << i << "] = " << hpar->phitable[i];
947 #endif
948 
949  //Now the depths
951  maxDepth[0] = maxDepth[1] = 0;
952  for (int i=0; i<nEta; ++i) {
953  unsigned int imx = layerGroupSize(i);
954  int laymax = (imx > 0) ? layerGroup(i,imx-1) : 0;
955  if (i < iEtaMax[0]) {
956  int laymax0 = (imx > 16) ? layerGroup(i,16) : laymax;
957  if (i+1 == iEtaMax[0]) laymax0 = hcons.getDepthEta16M(1);
958 #ifdef EDM_ML_DEBUG
959  edm::LogVerbatim("HcalGeom")
960  << "HcalDDDRecConstants:HB " << i << " " << imx << " " << laymax
961  << " " << laymax0;
962 #endif
963  if (maxDepth[0] < laymax0) maxDepth[0] = laymax0;
964  }
965  if (i >= iEtaMin[1]-1 && i < iEtaMax[1]) {
966 #ifdef EDM_ML_DEBUG
967  edm::LogVerbatim("HcalGeom")
968  << "HcalDDDRecConstants:HE " << i << " " << imx << " " << laymax;
969 #endif
970  if (maxDepth[1] < laymax) maxDepth[1] = laymax;
971  }
972  }
973 #ifdef EDM_ML_DEBUG
974  for (int i=0; i<4; ++i)
975  edm::LogVerbatim("HcalGeom")
976  << "HcalDDDRecConstants:Detector Type[" << i << "] iEta "
977  << iEtaMin[i] << ":" << iEtaMax[i] << " MaxDepth " << maxDepth[i];
978 #endif
979 
980  //Now the geometry constants
981  nModule[0] = hpar->modHB[0];
982  nHalves[0] = hpar->modHB[1];
983  for (unsigned int i=0; i<hpar->rHB.size(); ++i) {
984  gconsHB.emplace_back(std::pair<double,double>(hpar->rHB[i]/CLHEP::cm,
985  hpar->drHB[i]/CLHEP::cm));
986  }
987 #ifdef EDM_ML_DEBUG
988  edm::LogVerbatim("HcalGeom")
989  << "HcalDDDRecConstants:HB with " << nModule[0] << " modules and "
990  << nHalves[0] <<" halves and " << gconsHB.size() << " layers";
991  for (unsigned int i=0; i<gconsHB.size(); ++i)
992  edm::LogVerbatim("HcalGeom") << "rHB[" << i << "] = " << gconsHB[i].first
993  << " +- " << gconsHB[i].second;
994 #endif
995  nModule[1] = hpar->modHE[0];
996  nHalves[1] = hpar->modHE[1];
997  for (unsigned int i=0; i<hpar->zHE.size(); ++i) {
998  gconsHE.emplace_back(std::pair<double,double>(hpar->zHE[i]/CLHEP::cm,
999  hpar->dzHE[i]/CLHEP::cm));
1000  }
1001 #ifdef EDM_ML_DEBUG
1002  edm::LogVerbatim("HcalGeom")
1003  << "HcalDDDRecConstants:HE with " << nModule[1] << " modules and "
1004  << nHalves[1] <<" halves and " << gconsHE.size()
1005  << " layers";
1006  for (unsigned int i=0; i<gconsHE.size(); ++i)
1007  edm::LogVerbatim("HcalGeom") << "zHE[" << i << "] = " << gconsHE[i].first
1008  << " +- " << gconsHE[i].second;
1009 #endif
1010 
1011  //Special RBX
1013  if (depthMaxSp_.first == 0) {
1014  depthMaxSp_ = depthMaxDf_ = std::pair<int,int>(2,maxDepth[1]);
1015  } else if (depthMaxSp_.first == 1) {
1016  depthMaxDf_ = std::pair<int,int>(1,maxDepth[0]);
1017  if (depthMaxSp_.second > maxDepth[0]) maxDepth[0] = depthMaxSp_.second;
1018  } else {
1019  depthMaxDf_ = std::pair<int,int>(2,maxDepth[1]);
1020  if (depthMaxSp_.second > maxDepth[1]) maxDepth[1] = depthMaxSp_.second;
1021  }
1022 #ifdef EDM_ML_DEBUG
1023  edm::LogVerbatim("HcalGeom")
1024  << "HcalDDDRecConstants:Detector type and maximum depth for all RBX "
1025  << depthMaxDf_.first << ":" << depthMaxDf_.second
1026  << " and for special RBX " << depthMaxSp_.first
1027  << ":" << depthMaxSp_.second;
1028 #endif
1029 
1030  //Map of special DetId's
1031  std::vector<int> phis;
1032  HcalSubdetector subdet = HcalSubdetector(hcons.ldMap()->validDet(phis));
1033  detIdSp_.clear(); detIdSpR_.clear();
1034  if ((subdet == HcalBarrel) || (subdet == HcalEndcap)) {
1035  int phi = (phis[0] > 0) ? phis[0] : -phis[0];
1036  int zside = (phis[0] > 0) ? 1 : -1;
1037  int lymax = (subdet == HcalBarrel) ? maxLayerHB_+1 : maxLayer_+1;
1038  std::pair<int,int>etas = hcons.ldMap()->validEta();
1039  for (int eta=etas.first; eta<=etas.second; ++eta) {
1040  std::map<int,std::pair<int,int> > oldDep;
1041  int depth(0);
1042  int lmin = layerGroup(eta-1,0);
1043  for (int lay=0; lay<lymax; ++lay) {
1044  int depc = layerGroup(eta-1,lay);
1045  if (depth != depc) {
1046  if (depth != 0) oldDep[depth] = std::pair<int,int>(lmin,lay-1);
1047  depth = depc;
1048  lmin = lay;
1049  }
1050  }
1051  if (depth != 0) oldDep[depth] = std::pair<int,int>(lmin,lymax-1);
1052 #ifdef EDM_ML_DEBUG
1053  edm::LogVerbatim("HcalGeom")
1054  << "HcalDDDRecConstants:Eta|Phi|Zside " << eta << ":" << phi
1055  << ":" << zside << " with " << oldDep.size() << " old Depths";
1056  unsigned int kk(0);
1057  for (std::map<int,std::pair<int,int> >::const_iterator itr=oldDep.begin(); itr != oldDep.end(); ++itr,++kk)
1058  edm::LogVerbatim("HcalGeom")
1059  << "[" << kk << "] " << itr->first <<" --> "
1060  << itr->second.first << ":" << itr->second.second;
1061 #endif
1062  std::pair<int,int> depths = hcons.ldMap()->getDepths(eta);
1063  for (int ndepth=depths.first; ndepth<=depths.second; ++ndepth) {
1064  bool flag = ((subdet == HcalBarrel && eta == iEtaMax[0] &&
1065  ndepth > hcons.getDepthEta16(subdet,phi,zside)) ||
1066  (subdet == HcalEndcap && eta == iEtaMin[1] &&
1067  ndepth < hcons.getDepthEta16(subdet,phi,zside)));
1068  if (!flag) {
1069  std::vector<int> count(oldDep.size(),0);
1070  int layFront = hcons.ldMap()->getLayerFront(subdet,eta,phi,zside,ndepth);
1071  int layBack = hcons.ldMap()->getLayerBack(subdet,eta,phi,zside,ndepth);
1072  for (int lay=layFront; lay<=layBack; ++lay) {
1073  unsigned int l(0);
1074  for (std::map<int,std::pair<int,int> >::iterator itr=oldDep.begin();
1075  itr != oldDep.end(); ++itr,++l) {
1076  if (lay >= (itr->second).first && lay <= (itr->second).second) {
1077  ++count[l]; break;
1078  }
1079  }
1080  }
1081  int odepth(0), maxlay(0);
1082  unsigned int l(0);
1083  for (std::map<int,std::pair<int,int> >::iterator itr=oldDep.begin();
1084  itr != oldDep.end(); ++itr,++l) {
1085  if (count[l] > maxlay) {
1086  odepth = itr->first;
1087  maxlay = count[l];
1088  }
1089  }
1090 #ifdef EDM_ML_DEBUG
1091  edm::LogVerbatim("HcalGeom")
1092  << "HcalDDDRecConstants:New Depth " << ndepth << " old Depth "
1093  << odepth << " max " << maxlay;
1094 #endif
1095  for (int k : phis) {
1096  zside = (k > 0) ? 1 : -1;
1097  phi = (k > 0) ? k : -k;
1098  if (subdet == HcalEndcap && eta == hpar->noff[1] &&
1099  ndepth > hcons.getDepthEta29M(0,true)) break;
1100  HcalDetId newId(subdet,zside*eta,phi,ndepth);
1101  HcalDetId oldId(subdet,zside*eta,phi,odepth);
1102  detIdSp_[newId] = oldId;
1103  std::vector<HcalDetId> ids;
1104  std::map<HcalDetId,std::vector<HcalDetId>>::iterator itr = detIdSpR_.find(oldId);
1105  if (itr != detIdSpR_.end()) ids = itr->second;
1106  ids.emplace_back(newId);
1107  detIdSpR_[oldId] = ids;
1108  }
1109  }
1110  }
1111  }
1112 #ifdef EDM_ML_DEBUG
1113  edm::LogVerbatim("HcalGeom")
1114  << "HcalDDDRecConstants:Map for merging new channels to old channel"
1115  << " IDs with " << detIdSp_.size() <<" entries";
1116  int l(0);
1117  for (auto itr : detIdSp_) {
1118  edm::LogVerbatim("HcalGeom") << "[" << l << "] Special " << itr.first
1119  << " Standard " << itr.second;
1120  ++l;
1121  }
1122  edm::LogVerbatim("HcalGeom")
1123  << "HcalDDDRecConstants:Reverse Map for mapping old to new IDs with "
1124  << detIdSpR_.size() << " entries";
1125  l = 0;
1126  for (auto itr : detIdSpR_) {
1127  edm::LogVerbatim("HcalGeom") << "[" << l << "] Standard " << itr.first
1128  << " Special";
1129  for (auto itr1 : itr.second)
1130  edm::LogVerbatim("HcalGeom") << "ID " << (itr1);
1131  ++l;
1132  }
1133 #endif
1134  }
1135 
1136 }
std::vector< double > etaTable
std::vector< int > iEtaMin
std::vector< int > etagroup
std::pair< int, int > depthMaxSp_
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
std::vector< double > rHB
std::vector< std::pair< int, int > > etaSimValu
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
unsigned int layerGroup(int eta, int i) const
static const int maxLayer_
std::vector< int > maxDepth
int zside(DetId const &)
std::vector< double > etaTableHF
int getLayerBack(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
std::vector< int > etaMax
std::vector< int > phiUnitS
std::vector< int > modHB
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)
const HcalParameters * hpar
std::pair< int, int > getDepths(const int eta) const
int validDet(std::vector< int > &phis) const
std::vector< std::pair< double, double > > gconsHE
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::map< HcalDetId, HcalDetId > detIdSp_
std::vector< int > ietaMap
std::vector< int > nPhiBins
std::vector< int > modHE
std::pair< int, int > validEta() const
int getDepthEta16M(const int &det) const
int getDepthEta29M(const int &i, const bool &planOne) const
int k[5][pyjets_maxn]
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::pair< int, int > depthMaxDf_
std::vector< int > noff
std::pair< int, int > getMaxDepthDet(const int &i) const
std::vector< std::pair< double, double > > gconsHB
std::vector< int > maxDepth
std::vector< int > phigroup
static const int maxLayerHB_
std::vector< int > etaMin
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 115 of file HcalDDDRecConstants.h.

References detIdSp_.

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

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

Definition at line 133 of file HcalDDDRecConstants.h.

References detIdSpR_.

Referenced by HcalTopology::validHcal().

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

Definition at line 132 of file HcalDDDRecConstants.h.

References detIdSp_.

Referenced by HcalTopology::validHcal().

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

Definition at line 1150 of file HcalDDDRecConstants.cc.

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

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

1150  {
1151  unsigned int k = 0;
1152  for (auto const & it : hpar->layerGroupEtaRec) {
1153  if (it.layer == (unsigned int)(eta + 1)) {
1154  return it.layerGroup.at(i);
1155  }
1156  if (it.layer > (unsigned int)(eta + 1)) break;
1157  k = it.layerGroup.at(i);
1158  }
1159  return k;
1160 }
const HcalParameters * hpar
int k[5][pyjets_maxn]
std::vector< LayerItem > layerGroupEtaRec
unsigned int HcalDDDRecConstants::layerGroupSize ( int  eta) const
private

Definition at line 1138 of file HcalDDDRecConstants.cc.

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

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

1138  {
1139  unsigned int k = 0;
1140  for (auto const & it : hpar->layerGroupEtaRec) {
1141  if (it.layer == (unsigned int)(eta + 1)) {
1142  return it.layerGroup.size();
1143  }
1144  if (it.layer > (unsigned int)(eta + 1)) break;
1145  k = it.layerGroup.size();
1146  }
1147  return k;
1148 }
const HcalParameters * hpar
int k[5][pyjets_maxn]
std::vector< LayerItem > layerGroupEtaRec
int HcalDDDRecConstants::maxHFDepth ( int  ieta,
int  iphi 
) const
inline
HcalDetId HcalDDDRecConstants::mergedDepthDetId ( const HcalDetId id) const

Definition at line 701 of file HcalDDDRecConstants.cc.

References detIdSp_.

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

701  {
702 
703  std::map<HcalDetId,HcalDetId>::const_iterator itr = detIdSp_.find(id);
704  if (itr == detIdSp_.end()) return id;
705  else return itr->second;
706 }
std::map< HcalDetId, HcalDetId > detIdSp_
bool HcalDDDRecConstants::mergedDepthList29 ( int  ieta,
int  iphi,
int  depth 
) const

Definition at line 631 of file HcalDDDRecConstants.cc.

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

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

631  {
632  int eta = std::abs(ieta);
633  int zside = (ieta > 0) ? 1 : -1;
634  int etamin= iEtaMax[1]-hcons.getDepthEta29(iphi,zside,1);
635  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
636  int depthMax = getMaxDepth(1, etamin, iphi, zside);
637  int depthMin = hcons.getDepthEta29(iphi,zside,0) + 1;
638  if (depth >= depthMin && depth <= depthMax) return true;
639  }
640  return false;
641 }
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 643 of file HcalDDDRecConstants.cc.

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

643  {
644  std::vector<int> depths;
645  int eta = std::abs(ieta);
646  int zside = (ieta > 0) ? 1 : -1;
647  int etamin= iEtaMax[1]-hcons.getDepthEta29(iphi,zside,1);
648  if ((eta >= etamin) && (eta <= iEtaMax[1])) {
649  int depthMax = getMaxDepth(1, etamin, iphi, zside);
650  int depthMin = hcons.getDepthEta29(iphi,zside,0) + 1;
651  depths.reserve(depthMax-depthMin+1);
652  for (int depth=depthMin; depth <= depthMax; ++depth)
653  depths.emplace_back(depth);
654  }
655  return depths;
656 }
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 678 of file HcalDDDRecConstants.cc.

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

678  {
679 
680  if (subdet == HcalBarrel || subdet == HcalEndcap) {
681  int isub = (subdet == HcalBarrel) ? 0 : 1;
682  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
683  unsigned int ncell(0);
684  for (auto & etabin : etabins) {
685  ncell += ((etabin.phis.size())*(etabin.layer.size()));
686  }
687  return ncell;
688  } else if (subdet == HcalOuter) {
689  return kHOSizePreLS1;
690  } else if (subdet == HcalForward) {
691  return (unsigned int)(hcons.numberOfCells(subdet));
692  } else {
693  return 0;
694  }
695 }
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 697 of file HcalDDDRecConstants.cc.

References HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

Referenced by maxHFDepth().

unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 659 of file HcalDDDRecConstants.cc.

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

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

659  {
660 
661  if (subdet == HcalBarrel || subdet == HcalEndcap) {
662  unsigned int num = 0;
663  std::vector<HcalCellType> cellTypes = HcalCellTypes(subdet);
664  for (auto & cellType : cellTypes) {
665  num += (unsigned int)(cellType.nPhiBins());
666  }
667 #ifdef EDM_ML_DEBUG
668  edm::LogInfo ("HCalGeom") << "HcalDDDRecConstants:numberOfCells "
669  << cellTypes.size() << " " << num
670  << " for subdetector " << subdet;
671 #endif
672  return num;
673  } else {
674  return hcons.numberOfCells(subdet);
675  }
676 }
std::vector< HcalCellType > HcalCellTypes(HcalSubdetector) const
unsigned int numberOfCells(const HcalSubdetector &) const
const HcalDDDSimConstants & hcons
void HcalDDDRecConstants::specialRBXHBHE ( const std::vector< HcalDetId > &  idsOld,
std::vector< HcalDetId > &  idsNew 
) const

Definition at line 741 of file HcalDDDRecConstants.cc.

References detIdSp_, and gen::k.

Referenced by maxHFDepth().

742  {
743  for (auto k : idsOld) {
744  std::map<HcalDetId,HcalDetId>::const_iterator itr = detIdSp_.find(k);
745  if (itr == detIdSp_.end()) idsNew.emplace_back(k);
746  else idsNew.emplace_back(itr->second);
747  }
748 }
std::map< HcalDetId, HcalDetId > detIdSp_
int k[5][pyjets_maxn]
bool HcalDDDRecConstants::specialRBXHBHE ( bool  flag,
std::vector< HcalDetId > &  ids 
) const

Definition at line 750 of file HcalDDDRecConstants.cc.

References detIdSp_, and detIdSpR_.

751  {
752  if (tobemerged) {
753  std::map<HcalDetId,HcalDetId>::const_iterator itr;
754  for (itr = detIdSp_.begin(); itr != detIdSp_.end(); ++itr)
755  ids.emplace_back(itr->first);
756  } else{
757  std::map<HcalDetId,std::vector<HcalDetId>>::const_iterator itr;
758  for (itr = detIdSpR_.begin(); itr != detIdSpR_.end(); ++itr)
759  ids.emplace_back(itr->first);
760  }
761  return (!ids.empty());
762 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
std::map< HcalDetId, HcalDetId > detIdSp_
void HcalDDDRecConstants::unmergeDepthDetId ( const HcalDetId id,
std::vector< HcalDetId > &  ids 
) const

Definition at line 726 of file HcalDDDRecConstants.cc.

References detIdSpR_, and gen::k.

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

727  {
728 
729  ids.clear();
730  std::map<HcalDetId,std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
731  if (itr == detIdSpR_.end()) {
732  ids.emplace_back(id);
733  } else {
734  for (auto k : itr->second) {
735  HcalDetId hid(id.subdet(),id.ieta(),id.iphi(),k.depth());
736  ids.emplace_back(hid);
737  }
738  }
739 }
std::map< HcalDetId, std::vector< HcalDetId > > detIdSpR_
int k[5][pyjets_maxn]
bool HcalDDDRecConstants::withSpecialRBXHBHE ( ) const
inline

Definition at line 131 of file HcalDDDRecConstants.h.

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

Referenced by HcalTopology::withSpecialRBXHBHE().

131 {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 161 of file HcalDDDRecConstants.h.

Referenced by initialize().

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

Definition at line 161 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 150 of file HcalDDDRecConstants.h.

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

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

Definition at line 151 of file HcalDDDRecConstants.h.

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

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

Definition at line 158 of file HcalDDDRecConstants.h.

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

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

Definition at line 159 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 152 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 154 of file HcalDDDRecConstants.h.

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

const int HcalDDDRecConstants::maxLayer_ =18
staticprivate

Definition at line 146 of file HcalDDDRecConstants.h.

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

const int HcalDDDRecConstants::maxLayerHB_ =16
staticprivate

Definition at line 147 of file HcalDDDRecConstants.h.

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

int HcalDDDRecConstants::nHalves[2]
private

Definition at line 160 of file HcalDDDRecConstants.h.

Referenced by initialize().

int HcalDDDRecConstants::nModule[2]
private

Definition at line 160 of file HcalDDDRecConstants.h.

Referenced by initialize().

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

Definition at line 155 of file HcalDDDRecConstants.h.

Referenced by getNPhi(), and initialize().

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

Definition at line 157 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().