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

References initialize().

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

Definition at line 24 of file HcalDDDRecConstants.cc.

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

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

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

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

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

Definition at line 30 of file HcalDDDRecConstants.cc.

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

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

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

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

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

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

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

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

Referenced by getEtaBins(), and getEtaLimit().

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

References detIdSpR_.

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

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

Definition at line 707 of file HcalDDDRecConstants.cc.

References egammaForCoreTracking_cff::depth, and detIdSpR_.

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

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

Definition at line 862 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, photons_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().

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

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

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

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

Definition at line 1133 of file HcalDDDRecConstants.cc.

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

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

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

References detIdSp_.

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

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

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

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

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

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

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

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

References HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

Referenced by maxHFDepth().

unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 658 of file HcalDDDRecConstants.cc.

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

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

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

References detIdSp_, and gen::k.

Referenced by maxHFDepth().

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

Definition at line 749 of file HcalDDDRecConstants.cc.

References detIdSp_, and detIdSpR_.

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

References detIdSpR_, and gen::k.

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

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