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

References initialize().

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

Definition at line 23 of file HcalDDDRecConstants.cc.

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

Member Function Documentation

const HcalDDDSimConstants* HcalDDDRecConstants::dddConstants ( ) const
inline

Definition at line 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 50 of file HcalDDDRecConstants.cc.

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

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

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

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

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

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

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

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

References funct::abs(), HcalDDDSimConstants::getIdHF2QIE(), HcalDDDSimConstants::getPhiTableHF(), HcalDDDSimConstants::getRTableHF(), hcons, iEtaMin, createfilelist::int, gen::k, maxDepth, DetIdAssociatorESProducer_cff::nEta, conversionPostprocessing_cfi::rMax, and conversionPostprocessing_cfi::rMin.

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

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

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

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

Referenced by getEtaBins(), and getEtaLimit().

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

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

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

352  {
353 
354  unsigned int type = (itype == 0) ? 0 : 1;
355  int lmax = hcons.getMaxDepth(type+1, ieta, iphi, zside, true);
356  if (lmax < 0) {
357  unsigned int lymax = (type == 0) ? maxLayerHB_+1 : maxLayer_+1;
358  lmax = 0;
359  if (layerGroupSize(ieta-1) > 0) {
360  if (layerGroupSize(ieta-1) < lymax) lymax = layerGroupSize(ieta-1);
361  lmax = (int)(layerGroup(ieta-1, lymax-1));
362  if (type == 0 && ieta == iEtaMax[type]) lmax = hcons.getDepthEta16M(1);
363  if (type == 1 && ieta >= hpar->noff[1]) lmax = hcons.getDepthEta29M(0,false);
364  }
365  }
366 #ifdef EDM_ML_DEBUG
367  edm::LogVerbatim("HcalGeom") << "getMaxDepth::Input " << itype << ":" << ieta
368  << ":" << iphi << ":" << zside << " Output "
369  << lmax;
370 #endif
371  return lmax;
372 }
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 374 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().

375  {
376 
377  int lmin = hcons.getMinDepth(itype+1, ieta, iphi, zside, true);
378  if (lmin < 0) {
379  if (itype == 2) { // HFn
380  lmin = 1;
381  } else if (itype == 3) { //HO
382  lmin = maxDepth[3];
383  } else {
384  unsigned int type = (itype == 0) ? 0 : 1;
385  if (layerGroupSize(ieta-1) > 0) {
386  if (type == 1 && ieta == iEtaMin[type])
387  lmin = hcons.getDepthEta16M(2);
388  else
389  lmin = (int)(layerGroup(ieta-1, 0));
390  }
391  }
392  }
393  return lmin;
394 }
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 762 of file HcalDDDRecConstants.cc.

References 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, and HcalDDDRecConstants::HcalEtaBin::phis.

Referenced by dddConstants(), and getEtaBins().

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

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

Referenced by getEtaBins(), and getPhiOffs().

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

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

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

422  {
423 
424  phiz.clear();
425  int subdet = hcons.ldMap()->getSubdet();
426  if (subdet > 0) {
427  std::vector<int> phis = hcons.ldMap()->getPhis();
428  for (int k : phis) {
429  int zside = (k > 0) ? 1 : -1;
430  int phi = (k > 0) ? k : -k;
431  phiz.emplace_back(std::pair<int,int>(phi,zside));
432  }
433  }
434 #ifdef EDM_ML_DEBUG
435  edm::LogVerbatim("HcalGeom") << "Special RBX for detector " << subdet
436  << " with " << phiz.size() << " phi/z bins";
437  for (unsigned int k=0; k<phiz.size(); ++k)
438  edm::LogVerbatim("HcalGeom") << " [" << k << "] " << phiz[k].first << ":"
439  << phiz[k].second;
440 #endif
441  return subdet;
442 }
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 444 of file HcalDDDRecConstants.cc.

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

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

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

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

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

464  {
465 
466  double rz(0);
467  if (layer > 0 && layer <= (int)(layerGroupSize(0)))
468  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[layer-1].first) :
469  (gconsHE[layer-1].first));
470 #ifdef EDM_ML_DEBUG
471  edm::LogVerbatim("HcalGeom") << "getRZ: subdet|layer " << subdet << "|"
472  << layer << " rz " << rz;
473 #endif
474  return rz;
475 }
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 477 of file HcalDDDRecConstants.cc.

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

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

References stringResolutionProvider_cfi::bin, create_public_pileup_plots::bins, 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().

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

References 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().

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

References detIdSpR_.

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

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

Definition at line 706 of file HcalDDDRecConstants.cc.

References egammaForCoreTracking_cff::depth, and detIdSpR_.

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

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

Definition at line 861 of file HcalDDDRecConstants.cc.

References 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, electrons_cff::ids, 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().

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

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

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

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

Definition at line 1132 of file HcalDDDRecConstants.cc.

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

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

1132  {
1133  unsigned int k = 0;
1134  for (auto const & it : hpar->layerGroupEtaRec) {
1135  if (it.layer == (unsigned int)(eta + 1)) {
1136  return it.layerGroup.size();
1137  }
1138  if (it.layer > (unsigned int)(eta + 1)) break;
1139  k = it.layerGroup.size();
1140  }
1141  return k;
1142 }
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 699 of file HcalDDDRecConstants.cc.

References detIdSp_.

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

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

Definition at line 629 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().

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

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

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

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

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

References HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

Referenced by maxHFDepth().

unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 657 of file HcalDDDRecConstants.cc.

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

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

657  {
658 
659  if (subdet == HcalBarrel || subdet == HcalEndcap) {
660  unsigned int num = 0;
661  std::vector<HcalCellType> cellTypes = HcalCellTypes(subdet);
662  for (auto & cellType : cellTypes) {
663  num += (unsigned int)(cellType.nPhiBins());
664  }
665 #ifdef EDM_ML_DEBUG
666  edm::LogInfo ("HCalGeom") << "HcalDDDRecConstants:numberOfCells "
667  << cellTypes.size() << " " << num
668  << " for subdetector " << subdet;
669 #endif
670  return num;
671  } else {
672  return hcons.numberOfCells(subdet);
673  }
674 }
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 739 of file HcalDDDRecConstants.cc.

References detIdSp_, and gen::k.

Referenced by maxHFDepth().

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

Definition at line 748 of file HcalDDDRecConstants.cc.

References detIdSp_, and detIdSpR_.

749  {
750  if (tobemerged) {
751  std::map<HcalDetId,HcalDetId>::const_iterator itr;
752  for (itr = detIdSp_.begin(); itr != detIdSp_.end(); ++itr)
753  ids.emplace_back(itr->first);
754  } else{
755  std::map<HcalDetId,std::vector<HcalDetId>>::const_iterator itr;
756  for (itr = detIdSpR_.begin(); itr != detIdSpR_.end(); ++itr)
757  ids.emplace_back(itr->first);
758  }
759  return (!ids.empty());
760 }
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 724 of file HcalDDDRecConstants.cc.

References detIdSpR_, and gen::k.

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

725  {
726 
727  ids.clear();
728  std::map<HcalDetId,std::vector<HcalDetId>>::const_iterator itr = detIdSpR_.find(id);
729  if (itr == detIdSpR_.end()) {
730  ids.emplace_back(id);
731  } else {
732  for (auto k : itr->second) {
733  HcalDetId hid(id.subdet(),id.ieta(),id.iphi(),k.depth());
734  ids.emplace_back(hid);
735  }
736  }
737 }
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().