CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HcalDDDRecConstants Class Reference

#include <HcalDDDRecConstants.h>

Classes

struct  HcalActiveLength
 
struct  HcalEtaBin
 
struct  HcalID
 
struct  HFCellParameters
 

Public Member Functions

std::vector< std::pair< double,
double > > 
getConstHBHE (const int type) const
 
const std::vector< int > & getDepth (const unsigned int i) const
 
int getDepthEta16 (int i) const
 
std::vector< HcalEtaBingetEtaBins (const int itype) const
 
std::pair< double, double > getEtaLimit (const int i) const
 
std::pair< double, double > getEtaPhi (int subdet, int ieta, 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 (int det, int phi, int zside) const
 
int getMaxDepth (const int type) const
 
int getMaxDepth (const int itype, const int ieta) const
 
int getMinDepth (const int itype, const int ieta) 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
 
const std::vector< double > & getPhiTable () const
 
const std::vector< double > & getPhiTableHF () const
 
double getRZ (int subdet, int ieta, int depth) 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)
 
bool isBH () const
 
int maxHFDepth (int ieta, int iphi) const
 
unsigned int nCells (HcalSubdetector) const
 
unsigned int nCells () const
 
unsigned int numberOfCells (HcalSubdetector) const
 
 ~HcalDDDRecConstants ()
 

Private Member Functions

void initialize (void)
 
unsigned int layerGroup (unsigned int eta, unsigned int i) const
 
unsigned int layerGroupSize (unsigned int eta) const
 

Private Attributes

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
 

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 22 of file HcalDDDRecConstants.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, and initialize().

14  :
15  hpar(hp), hcons(hc) {
16 
17 #ifdef EDM_ML_DEBUG
18  std::cout << "HcalDDDRecConstants::HcalDDDRecConstants (const HcalParameters* hp) constructor" << std::endl;
19 #endif
20  initialize();
21 }
const HcalParameters * hpar
const HcalDDDSimConstants & hcons
tuple cout
Definition: gather_cfg.py:145
HcalDDDRecConstants::~HcalDDDRecConstants ( )

Definition at line 23 of file HcalDDDRecConstants.cc.

References gather_cfg::cout.

23  {
24 #ifdef EDM_ML_DEBUG
25  std::cout << "HcalDDDRecConstants::destructed!!!" << std::endl;
26 #endif
27 }
tuple cout
Definition: gather_cfg.py:145

Member Function Documentation

std::vector<std::pair<double,double> > HcalDDDRecConstants::getConstHBHE ( const int  type) const
inline

Definition at line 57 of file HcalDDDRecConstants.h.

References gconsHB, and gconsHE.

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

57  {
58  if (type == 0) return gconsHB;
59  else if (type == 1) return gconsHE;
60  else {std::vector<std::pair<double,double> > gcons; return gcons;}
61  }
type
Definition: HCALResponse.h:21
std::vector< std::pair< double, double > > gconsHE
std::vector< std::pair< double, double > > gconsHB
const std::vector< int > & HcalDDDRecConstants::getDepth ( const unsigned int  i) const

Definition at line 614 of file HcalDDDRecConstants.cc.

References hpar, plotBeamSpotDB::last, and HcalParameters::layerGroupEtaRec.

Referenced by HcalTopology::HcalTopology().

614  {
615  std::vector<HcalParameters::LayerItem>::const_iterator last = hpar->layerGroupEtaRec.begin();
616  for( std::vector<HcalParameters::LayerItem>::const_iterator it = hpar->layerGroupEtaRec.begin(); it != hpar->layerGroupEtaRec.end(); ++it ) {
617  if( it->layer == i + 1 )
618  return it->layerGroup;
619  if( it->layer > i + 1 )
620  return last->layerGroup;
621  last = it;
622  }
623  return last->layerGroup;
624 }
int i
Definition: DBlmapReader.cc:9
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
int HcalDDDRecConstants::getDepthEta16 ( int  i) const
inline

Definition at line 63 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getDepthEta16(), and hcons.

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

63 {return hcons.getDepthEta16(i);}
int i
Definition: DBlmapReader.cc:9
int getDepthEta16(int i) const
const HcalDDDSimConstants & hcons
std::vector< HcalDDDRecConstants::HcalEtaBin > HcalDDDRecConstants::getEtaBins ( const int  itype) const

Definition at line 30 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, HcalDDDRecConstants::HcalEtaBin::depthStart, etaTable, plotBeamSpotDB::first, HcalDDDSimConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta29(), hcons, hpar, i, iEtaMax, iEtaMin, relval_2017::k, cmsLHEtoEOSManager::l, HcalDDDRecConstants::HcalEtaBin::layer, layerGroup(), layerGroupSize(), gen::n, nModule, HcalParameters::noff, phibin, HcalParameters::phioff, and edm::second().

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

30  {
31 
32  std::vector<HcalDDDRecConstants::HcalEtaBin> bins;
33  unsigned int type = (itype == 0) ? 0 : 1;
34  unsigned int lymax = (type == 0) ? 17 : 19;
35  for (int ieta = iEtaMin[type]; ieta <= iEtaMax[type]; ++ieta) {
36  int nfi = (int)((20.001*nModule[itype]*CLHEP::deg)/phibin[ieta-1]);
37  HcalDDDRecConstants::HcalEtaBin etabin = HcalDDDRecConstants::HcalEtaBin(ieta, etaTable[ieta-1], etaTable[ieta], nfi, hpar->phioff[type], phibin[ieta-1]);
38  int n = (ieta == iEtaMax[type]) ? 0 : 1;
39  HcalDDDRecConstants::HcalEtaBin etabin0= HcalDDDRecConstants::HcalEtaBin(ieta, etaTable[ieta-1], etaTable[ieta+n], nfi, hpar->phioff[type], phibin[ieta-1]);
40  etabin0.depthStart = hcons.getDepthEta29(0)+1;
41  int dstart = -1;
42  if (layerGroupSize(ieta-1) > 0) {
43  int lmin(0), lmax(0);
44  int dep = layerGroup(ieta-1, 0);
45  if (type == 1 && ieta == iEtaMin[1]) dep = hcons.getDepthEta16(1);
46  unsigned lymx0 = (layerGroupSize(ieta-1) > lymax) ? lymax : layerGroupSize(ieta-1);
47 #ifdef EDM_ML_DEBUG
48  std::cout << "Eta " << ieta << ":" << hpar->noff[1] << " lymax " << lymx0
49  << ":" << lymax << " Depth " << dep;
50  for (unsigned int l=0; l<lymax; ++l)
51  std::cout << " [" << l << "] " << layerGroup(ieta-1, l);
52  std::cout << std::endl;
53 #endif
54  for (unsigned int l=0; l<lymx0; ++l) {
55  if ((int)layerGroup(ieta-1, l) == dep) {
56  if (lmin == 0) lmin = l + 1;
57  lmax = l + 1;
58  } else if ((int)layerGroup(ieta-1, l) > dep) {
59  if (dstart < 0) dstart = dep;
60  int lmax0 = (lmax >= lmin) ? lmax : lmin;
61  if (type == 1 && ieta+1 == hpar->noff[1] && dep > hcons.getDepthEta29(0)) {
62  etabin0.layer.push_back(std::pair<int,int>(lmin,lmax0));
63  } else {
64  etabin.layer.push_back(std::pair<int,int>(lmin,lmax0));
65  }
66  lmin = (l + 1);
67  lmax = l;
68  dep = layerGroup(ieta-1, l);
69  }
70  if (type == 0 && ieta == iEtaMax[type] && dep > hcons.getDepthEta16(0)) break;
71  if (type == 1 && ieta == hpar->noff[1] && dep > hcons.getDepthEta29(0)){
72  lmax = lymx0;
73  break;
74  }
75  if (l+1 == lymx0) lmax = lymx0;
76  }
77  if (lmax >= lmin) {
78  if (ieta+1 == hpar->noff[1]) {
79  etabin0.layer.push_back(std::pair<int,int>(lmin,lmax));
80  bins.push_back(etabin0);
81  } else if (ieta == hpar->noff[1]) {
82  } else {
83  etabin.layer.push_back(std::pair<int,int>(lmin,lmax));
84  if (dstart < 0) dstart = dep;
85  }
86  }
87  }
88  etabin.depthStart = dstart;
89  bins.push_back(etabin);
90  }
91 #ifdef EDM_ML_DEBUG
92  std::cout << "Prepares " << bins.size() << " eta bins for type " << type
93  << std::endl;
94  for (unsigned int i=0; i<bins.size(); ++i) {
95  std::cout << "Bin[" << i << "]: Eta = (" << bins[i].ieta << ":"
96  << bins[i].etaMin << ":" << bins[i].etaMax << ") Phi = ("
97  << bins[i].nPhi << ":" << bins[i].phi0 << ":" << bins[i].dphi
98  << ") and " << bins[i].layer.size() << " depths (start) "
99  << bins[i].depthStart << " :";
100  for (unsigned int k=0; k<bins[i].layer.size(); ++k)
101  std::cout << " [" << k << "] " << bins[i].layer[k].first << ":"
102  << bins[i].layer[k].second;
103  std::cout << std::endl;
104  }
105 #endif
106  return bins;
107 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::vector< int > iEtaMin
int getDepthEta16(int i) const
U second(std::pair< T, U > const &p)
const HcalParameters * hpar
std::vector< double > phibin
unsigned int layerGroup(unsigned int eta, unsigned int i) const
std::vector< int > iEtaMax
std::vector< std::pair< int, int > > layer
unsigned int layerGroupSize(unsigned int eta) const
std::vector< double > phioff
int getDepthEta29(int i) const
std::vector< double > etaTable
const HcalDDDSimConstants & hcons
std::vector< int > noff
tuple cout
Definition: gather_cfg.py:145
std::pair<double,double> HcalDDDRecConstants::getEtaLimit ( const int  i) const
inline

Definition at line 70 of file HcalDDDRecConstants.h.

References etaTable, and i.

71  {return std::pair<double,double>(etaTable[i],etaTable[i+1]);}
int i
Definition: DBlmapReader.cc:9
std::vector< double > etaTable
std::pair< double, double > HcalDDDRecConstants::getEtaPhi ( int  subdet,
int  ieta,
int  iphi 
) const

Definition at line 110 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, 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().

110  {
111  int ietaAbs = (ieta > 0) ? ieta : -ieta;
112  double eta(0), phi(0);
113  if ((subdet == static_cast<int>(HcalBarrel)) ||
114  (subdet == static_cast<int>(HcalEndcap)) ||
115  (subdet == static_cast<int>(HcalOuter))) { // Use Eta Table
116  int unit = hcons.unitPhi(phibin[ietaAbs-1]);
117  int kphi = (unit == 2) ? ((iphi-1)/2 + 1) : iphi;
118  double foff = (ietaAbs <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
119  eta = 0.5*(etaTable[ietaAbs-1]+etaTable[ietaAbs]);
120  phi = foff + (kphi-0.5)*phibin[ietaAbs-1];
121  } else {
122  ietaAbs -= iEtaMin[2];
123  int unit = hcons.unitPhi(hpar->phitable[ietaAbs-1]);
124  int kphi = (unit == 4) ? ((iphi-3)/4 + 1) : ((iphi-1)/2 + 1);
125  double foff = (unit > 2) ? hpar->phioff[4] : hpar->phioff[2];
126  eta = 0.5*(hpar->etaTableHF[ietaAbs-1]+hpar->etaTableHF[ietaAbs]);
127  phi = foff + (kphi-0.5)*hpar->phitable[ietaAbs-1];
128  }
129  if (ieta < 0) eta = -eta;
130  if (phi > M_PI) phi -= (2*M_PI);
131 #ifdef EDM_ML_DEBUG
132  std::cout << "getEtaPhi: subdet|ieta|iphi " << subdet << "|" << ieta << "|"
133  << iphi << " eta|phi " << eta << "|" << phi << std::endl;
134 #endif
135  return std::pair<double,double>(eta,phi);
136 }
std::vector< int > iEtaMin
int unitPhi(int det, int etaR) const
std::vector< double > etaTableHF
const HcalParameters * hpar
std::vector< double > phibin
string unit
Definition: csvLumiCalc.py:46
std::vector< int > iEtaMax
#define M_PI
std::vector< double > phioff
std::vector< double > etaTable
std::vector< double > phitable
const HcalDDDSimConstants & hcons
tuple cout
Definition: gather_cfg.py:145
std::pair<int,int> HcalDDDRecConstants::getEtaRange ( const int  i) const
inline
const std::vector<double>& HcalDDDRecConstants::getEtaTable ( ) const
inline

Definition at line 68 of file HcalDDDRecConstants.h.

References etaTable.

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

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

Definition at line 69 of file HcalDDDRecConstants.h.

References HcalParameters::etaTableHF, and hpar.

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

69 {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 139 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, HLT_FULL_cff::depth, eta, HcalDDDSimConstants::getDepthEta16(), HcalBarrel, HcalEndcap, HcalOuter, hcons, hpar, ietaMap, iEtaMin, layerGroup(), HcalParameters::noff, phi, phibin, HcalParameters::phigroup, HcalDDDSimConstants::phiNumber(), HcalParameters::phioff, phiUnitS, csvLumiCalc::unit, and HcalDDDSimConstants::unitPhi().

Referenced by SimHitsValidationHcal::analyze(), HGCalHitValidation::analyze(), HGCalSimHitValidation::analyze(), GlobalHitsAnalyzer::fillHCal(), CaloTruthAccumulator::fillSimHits(), HcalDigisValidation::reco(), and HcalHitRelabeller::relabel().

140  {
141 
142  int eta(ieta), phi(iphi), depth(idepth);
143  if ((subdet == static_cast<int>(HcalOuter)) ||
144  ((subdet == static_cast<int>(HcalBarrel)) && (lay > 17))) {
145  subdet= static_cast<int>(HcalOuter);
146  depth = 4;
147  } else if (subdet == static_cast<int>(HcalBarrel) ||
148  subdet == static_cast<int>(HcalEndcap)) {
149  eta = ietaMap[ieta-1];
150  int unit = phiUnitS[ieta-1];
151  int phi0 = (iphi-1)/(hpar->phigroup[eta-1]);
152  if (unit == 2) {
153  phi0 = (iphi+1)/2;
154  phi0 = (phi0-1)/(hpar->phigroup[eta-1]);
155  } else if (unit == 4) {
156  phi0 = (iphi+1)/4;
157  phi0 = (phi0-1)/(hpar->phigroup[eta-1]);
158  }
159  ++phi0;
160  unit = hcons.unitPhi(phibin[eta-1]);
161  phi = hcons.phiNumber(phi0,unit);
162  depth = layerGroup(eta-1, lay-1);
163  if (eta == iEtaMin[1]) {
164  if (subdet == static_cast<int>(HcalBarrel)) {
166  } else {
168  }
169  } else if (eta == hpar->noff[0] && lay > 1) {
170  int kphi = phi + int((hpar->phioff[3]+0.1)/phibin[eta-1]);
171  kphi = (kphi-1)%4 + 1;
172  if (kphi == 2 || kphi == 3) depth = layerGroup(eta-1, lay-2);
173  } else if (eta == hpar->noff[1] && depth > 2) {
174  eta = hpar->noff[1]-1;
175  }
176  }
177 #ifdef EDM_ML_DEBUG
178  std::cout << "getHCID: input " << subdet << ":" << ieta << ":" << iphi
179  << ":" << idepth << ":" << lay << " output " << eta << ":" << phi
180  << ":" << depth << std::endl;
181 #endif
182  return HcalDDDRecConstants::HcalID(subdet,eta,phi,depth);
183 }
std::vector< int > iEtaMin
int unitPhi(int det, int etaR) const
int getDepthEta16(int i) const
std::vector< int > phiUnitS
const HcalParameters * hpar
std::vector< double > phibin
unsigned int layerGroup(unsigned int eta, unsigned int i) const
string unit
Definition: csvLumiCalc.py:46
std::vector< int > ietaMap
std::vector< double > phioff
int phiNumber(int phi, int unit) const
const HcalDDDSimConstants & hcons
std::vector< int > noff
tuple cout
Definition: gather_cfg.py:145
std::vector< int > phigroup
std::vector< HcalDDDRecConstants::HFCellParameters > HcalDDDRecConstants::getHFCellParameters ( ) const

Definition at line 186 of file HcalDDDRecConstants.cc.

References funct::abs(), gather_cfg::cout, HLT_FULL_cff::depth, HcalDDDSimConstants::getIdHF2QIE(), HcalDDDSimConstants::getPhiTableHF(), HcalDDDSimConstants::getRTableHF(), hcons, iEtaMin, relval_2017::k, maxDepth, HLT_FULL_cff::nEta, and HLT_FULL_cff::nPhi.

Referenced by HcalFlexiHardcodeGeometryLoader::makeHFCells().

186  {
187 
188  std::vector<HcalDDDRecConstants::HFCellParameters> cells;
189  unsigned int nEta = hcons.getPhiTableHF().size();
190  if (maxDepth[2] > 0) {
191  for (unsigned int k=0; k<nEta; ++k) {
192  int ieta = iEtaMin[2] + k;
193  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k]/(5.0*CLHEP::deg));
194  int iphi = (dphi == 4) ? 3 : 1;
195  int nphi = 72/dphi;
196  double rMin = hcons.getRTableHF()[nEta-k-1]/CLHEP::cm;
197  double rMax = hcons.getRTableHF()[nEta-k]/CLHEP::cm;
198  HcalDDDRecConstants::HFCellParameters cell1( ieta,1,iphi,dphi,nphi,rMin,rMax);
199  cells.push_back(cell1);
200  HcalDDDRecConstants::HFCellParameters cell2(-ieta,1,iphi,dphi,nphi,rMin,rMax);
201  cells.push_back(cell2);
202  }
203  }
204  if (maxDepth[2] > 2) {
205  if (hcons.getIdHF2QIE().size() > 0) {
206  for (unsigned int k=0; k<hcons.getIdHF2QIE().size(); ++k) {
207  int ieta = hcons.getIdHF2QIE()[k].ieta();
208  int ind = std::abs(ieta) - iEtaMin[2];
209  int dphi = (int)(0.001 + hcons.getPhiTableHF()[ind]/(5.0*CLHEP::deg));
210  int iphi = hcons.getIdHF2QIE()[k].iphi();
211  double rMin = hcons.getRTableHF()[nEta-ind-1]/CLHEP::cm;
212  double rMax = hcons.getRTableHF()[nEta-ind]/CLHEP::cm;
213  HcalDDDRecConstants::HFCellParameters cell1( ieta,3,iphi,dphi,1,rMin,rMax);
214  cells.push_back(cell1);
215  }
216  } else {
217  for (unsigned int k=0; k<nEta; ++k) {
218  int ieta = iEtaMin[2] + k;
219  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k]/(5.0*CLHEP::deg));
220  int iphi = (dphi == 4) ? 3 : 1;
221  int nphi = 72/dphi;
222  double rMin = hcons.getRTableHF()[nEta-k-1]/CLHEP::cm;
223  double rMax = hcons.getRTableHF()[nEta-k]/CLHEP::cm;
224  HcalDDDRecConstants::HFCellParameters cell1( ieta,3,iphi,dphi,nphi,rMin,rMax);
225  cells.push_back(cell1);
226  HcalDDDRecConstants::HFCellParameters cell2(-ieta,3,iphi,dphi,nphi,rMin,rMax);
227  cells.push_back(cell2);
228  }
229  }
230  }
231 #ifdef EDM_ML_DEBUG
232  std::cout << "HcalDDDRecConstants returns " << cells.size()
233  << " HF cell parameters" << std::endl;
234  for (unsigned int k=0; k<cells.size(); ++k)
235  std::cout << "Cell[" << k <<"] : (" << cells[k].ieta <<", "<< cells[k].depth
236  << ", " << cells[k].firstPhi << ", " << cells[k].stepPhi << ", "
237  << cells[k].nPhi << ", " << cells[k].rMin << ", "
238  << cells[k].rMax << ")" << std::endl;
239 #endif
240  return cells;
241 }
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
const HcalDDDSimConstants & hcons
tuple cout
Definition: gather_cfg.py:145
const std::vector< HcalDetId > & getIdHF2QIE() const
double HcalDDDRecConstants::getLayer0Wt ( int  det,
int  phi,
int  zside 
) const
inline

Definition at line 75 of file HcalDDDRecConstants.h.

References HcalDDDSimConstants::getLayer0Wt(), and hcons.

Referenced by HcalHitRelabeller::energyWt().

75 {return hcons.getLayer0Wt(det,phi,zside);}
double getLayer0Wt(int det, int phi, int zside) const
int zside(DetId const &)
const HcalDDDSimConstants & hcons
int HcalDDDRecConstants::getMaxDepth ( const int  type) const
inline
int HcalDDDRecConstants::getMaxDepth ( const int  itype,
const int  ieta 
) const

Definition at line 243 of file HcalDDDRecConstants.cc.

References HcalDDDSimConstants::getDepthEta16(), HcalDDDSimConstants::getDepthEta29(), hcons, hpar, iEtaMax, layerGroup(), layerGroupSize(), and HcalParameters::noff.

243  {
244 
245  int lmax(0);
246  unsigned int type = (itype == 0) ? 0 : 1;
247  unsigned int lymax = (type == 0) ? 17 : 19;
248  if (layerGroupSize(ieta-1) > 0) {
249  if (layerGroupSize(ieta-1) < lymax) lymax = layerGroupSize(ieta-1);
250  lmax = (int)(layerGroup(ieta-1, lymax-1));
251  if (type == 0 && ieta == iEtaMax[type]) lmax = hcons.getDepthEta16(0);
252  if (type == 1 && ieta >= hpar->noff[1]) lmax = hcons.getDepthEta29(0);
253  }
254  return lmax;
255 }
type
Definition: HCALResponse.h:21
int getDepthEta16(int i) const
const HcalParameters * hpar
unsigned int layerGroup(unsigned int eta, unsigned int i) const
std::vector< int > iEtaMax
unsigned int layerGroupSize(unsigned int eta) const
int getDepthEta29(int i) const
const HcalDDDSimConstants & hcons
std::vector< int > noff
int HcalDDDRecConstants::getMinDepth ( const int  itype,
const int  ieta 
) const

Definition at line 257 of file HcalDDDRecConstants.cc.

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

Referenced by HcalTopology::depthBinInformation().

257  {
258 
259  int lmin(1);
260  if (itype == 2) { // HF
261  } else if (itype == 3) { //HO
262  lmin = maxDepth[3];
263  } else {
264  unsigned int type = (itype == 0) ? 0 : 1;
265  if (layerGroupSize(ieta-1) > 0) {
266  lmin = (int)(layerGroup(ieta-1, 0));
267  if (type == 1 && ieta == iEtaMin[type]) lmin = hcons.getDepthEta16(1);
268  }
269  }
270  return lmin;
271 }
type
Definition: HCALResponse.h:21
std::vector< int > iEtaMin
std::vector< int > maxDepth
int getDepthEta16(int i) const
unsigned int layerGroup(unsigned int eta, unsigned int i) const
unsigned int layerGroupSize(unsigned int eta) const
const HcalDDDSimConstants & hcons
int HcalDDDRecConstants::getNEta ( ) const
inline

Definition at line 79 of file HcalDDDRecConstants.h.

References HcalParameters::etagroup, and hpar.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 80 of file HcalDDDRecConstants.h.

References hpar, i, and HcalParameters::noff.

Referenced by HcalTopology::validRaw().

80 {return hpar->noff[i];}
int i
Definition: DBlmapReader.cc:9
const HcalParameters * hpar
std::vector< int > noff
int HcalDDDRecConstants::getNPhi ( const int  type) const
inline
double HcalDDDRecConstants::getPhiBin ( const int  i) const
inline

Definition at line 82 of file HcalDDDRecConstants.h.

References i, and phibin.

82 {return phibin[i];}
int i
Definition: DBlmapReader.cc:9
std::vector< double > phibin
double HcalDDDRecConstants::getPhiOff ( const int  i) const
inline

Definition at line 83 of file HcalDDDRecConstants.h.

References hpar, i, and HcalParameters::phioff.

83 {return hpar->phioff[i];}
int i
Definition: DBlmapReader.cc:9
const HcalParameters * hpar
std::vector< double > phioff
const std::vector<double>& HcalDDDRecConstants::getPhiOffs ( ) const
inline

Definition at line 84 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::phioff.

Referenced by HcalTopology::HcalTopology().

84 {return hpar->phioff;}
const HcalParameters * hpar
std::vector< double > phioff
const std::vector<double>& HcalDDDRecConstants::getPhiTable ( ) const
inline

Definition at line 85 of file HcalDDDRecConstants.h.

References phibin.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 86 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::phitable.

Referenced by HcalTopology::HcalTopology().

86 {return hpar->phitable;}
const HcalParameters * hpar
std::vector< double > phitable
double HcalDDDRecConstants::getRZ ( int  subdet,
int  ieta,
int  depth 
) const

Definition at line 273 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, TrackCollections2monitor_cff::etaMax, plotBeamSpotDB::first, gconsHB, gconsHE, HcalBarrel, relval_2017::k, layerGroup(), and layerGroupSize().

Referenced by HGCalSimHitValidation::analyzeHits().

273  {
274 
275  int ietaAbs = (ieta > 0) ? ieta : -ieta;
276  double rz(0);
277 #ifdef EDM_ML_DEBUG
278  int lay(0);
279 #endif
280  if (ietaAbs < hpar->etaMax[1]) {
281  for (unsigned int k=0; k< layerGroupSize(ietaAbs-1); ++k) {
282  if (depth == (int)layerGroup(ietaAbs-1, k)) {
283  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[k].first) :
284  (gconsHE[k].first));
285  if (rz > 10.) {
286 #ifdef EDM_ML_DEBUG
287  lay = k;
288 #endif
289  break;
290  }
291  }
292  }
293  }
294 #ifdef EDM_ML_DEBUG
295  std::cout << "getRZ: subdet|ieta|depth " << subdet << "|" << ieta << "|"
296  << depth << " lay|rz " << lay << "|" << rz << std::endl;
297 #endif
298  return rz;
299 }
std::vector< std::pair< double, double > > gconsHE
unsigned int layerGroup(unsigned int eta, unsigned int i) const
unsigned int layerGroupSize(unsigned int eta) const
tuple cout
Definition: gather_cfg.py:145
std::vector< std::pair< double, double > > gconsHB
std::vector< HcalDDDRecConstants::HcalActiveLength > HcalDDDRecConstants::getThickActive ( const int  type) const

Definition at line 302 of file HcalDDDRecConstants.cc.

References funct::cos(), gather_cfg::cout, HcalDDDRecConstants::HcalActiveLength::depth, HLT_FULL_cff::depth, eta, HcalDDDRecConstants::HcalActiveLength::eta, create_public_lumi_plots::exp, plotBeamSpotDB::first, gconsHB, gconsHE, getEtaBins(), i, HcalDDDRecConstants::HcalActiveLength::ieta, j, relval_2017::k, pileupReCalc_HLTpaths::scale, edm::second(), funct::sin(), t, theta(), and HcalDDDRecConstants::HcalActiveLength::thick.

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

302  {
303 
304  std::vector<HcalDDDRecConstants::HcalActiveLength> actives;
305  std::vector<HcalDDDRecConstants::HcalEtaBin> bins = getEtaBins(type);
306 #ifdef EDM_ML_DEBUG
307  unsigned int kount(0);
308 #endif
309  for (unsigned int k=0; k<bins.size(); ++k) {
310  int ieta = bins[k].ieta;
311  double eta = 0.5*(bins[k].etaMin+bins[k].etaMax);
312  double theta = 2*atan(exp(-eta));
313  double scale = 1.0/((type == 0) ? sin(theta) : cos(theta));
314  int depth = bins[k].depthStart;
315  for (unsigned int i = 0; i < bins[k].layer.size(); ++i) {
316  double thick(0);
317  for (int j = bins[k].layer[i].first; j <= bins[k].layer[i].second; ++j) {
318  if (type == 0 || j > 1) {
319  double t = ((type == 0) ? gconsHB[j-1].second : gconsHE[j-1].second);
320  if (t > 0) thick += t;
321  }
322  }
323  thick *= (2.*scale);
324  HcalDDDRecConstants::HcalActiveLength active(ieta,depth,eta,thick);
325  actives.push_back(active);
326  ++depth;
327 #ifdef EDM_ML_DEBUG
328  kount++;
329  std::cout << "getThickActive: [" << kount << "] eta:" << active.ieta
330  << ":" << active.eta << " depth " << active.depth << " thick "
331  << active.thick << std::endl;
332 #endif
333  }
334  }
335  return actives;
336 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > gconsHE
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
int j
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:145
std::vector< std::pair< double, double > > gconsHB
std::vector< HcalEtaBin > getEtaBins(const int itype) const
int HcalDDDRecConstants::getTopoMode ( ) const
inline

Definition at line 89 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::topologyMode.

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

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

Definition at line 90 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::topologyMode.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 339 of file HcalDDDRecConstants.cc.

References newFWLiteAna::bin, KineDebug3::count(), gather_cfg::cout, HLT_FULL_cff::depth, TrackCollections2monitor_cff::etaMax, TrackCollections2monitor_cff::etaMin, etaSimValu, plotBeamSpotDB::first, getEtaBins(), HcalBarrel, HcalDDDSimConstants::HcalCellTypes(), HcalEndcap, hcons, hpar, HLT_FULL_cff::nPhi, HcalParameters::phioff, groupFilesInBlocks::temp, csvLumiCalc::unit, and HcalDDDSimConstants::unitPhi().

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

339  {
340 
341  if (subdet == HcalBarrel || subdet == HcalEndcap) {
342  std::vector<HcalCellType> cells;
343  int isub = (subdet == HcalBarrel) ? 0 : 1;
344  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
345  for (unsigned int bin=0; bin<etabins.size(); ++bin) {
346  std::vector<HcalCellType> temp;
347  std::vector<int> count;
348  std::vector<double> dmin, dmax;
349  for (unsigned int il=0; il<etabins[bin].layer.size(); ++il) {
350  HcalCellType cell(subdet, 0, 0, 0, HcalCellType::HcalCell());
351  temp.push_back(cell);
352  count.push_back(0);
353  dmin.push_back(0);
354  dmax.push_back(0);
355  }
356  int ieta = etabins[bin].ieta;
357  for (int keta=etaSimValu[ieta-1].first; keta<=etaSimValu[ieta-1].second;
358  ++keta) {
359  std::vector<HcalCellType> cells = hcons.HcalCellTypes(subdet,keta,-1);
360  for (unsigned int ic=0; ic<cells.size(); ++ic) {
361  for (unsigned int il=0; il<etabins[bin].layer.size(); ++il) {
362  if (cells[ic].depthSegment() >= etabins[bin].layer[il].first &&
363  cells[ic].depthSegment() <= etabins[bin].layer[il].second) {
364  if (count[il] == 0) {
365  temp[il] = cells[ic];
366  dmin[il] = cells[ic].depthMin();
367  dmax[il] = cells[ic].depthMax();
368  }
369  ++count[il];
370  if (cells[ic].depthMin() < dmin[il]) dmin[il] = cells[ic].depthMin();
371  if (cells[ic].depthMax() > dmax[il]) dmax[il] = cells[ic].depthMax();
372  break;
373  }
374  }
375  }
376  }
377  int unit = hcons.unitPhi(etabins[bin].dphi);
378  for (unsigned int il=0; il<etabins[bin].layer.size(); ++il) {
379  int depth = etabins[bin].depthStart + (int)(il);
380  temp[il].setEta(ieta,etabins[bin].etaMin,etabins[bin].etaMax);
381  temp[il].setPhi(etabins[bin].nPhi,unit,etabins[bin].dphi/CLHEP::deg,
382  hpar->phioff[isub]/CLHEP::deg);
383  temp[il].setDepth(depth,dmin[il],dmax[il]);
384  cells.push_back(temp[il]);
385  }
386  }
387 #ifdef EDM_ML_DEBUG
388  std::cout << "HcalDDDRecConstants: found " << cells.size() << " cells for sub-detector type " << isub << std::endl;
389  for (unsigned int ic=0; ic<cells.size(); ++ic)
390  std::cout << "Cell[" << ic << "] " << cells[ic] << std::endl;
391 #endif
392  return cells;
393  } else {
394  return hcons.HcalCellTypes(subdet,-1,-1);
395  }
396 }
int unitPhi(int det, int etaR) const
std::vector< std::pair< int, int > > etaSimValu
const HcalParameters * hpar
string unit
Definition: csvLumiCalc.py:46
std::vector< HcalCellType > HcalCellTypes() const
std::vector< double > phioff
const HcalDDDSimConstants & hcons
tuple cout
Definition: gather_cfg.py:145
std::vector< HcalEtaBin > getEtaBins(const int itype) const
void HcalDDDRecConstants::initialize ( void  )
private

Definition at line 443 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, HcalParameters::drHB, HcalParameters::dzHE, HcalParameters::etagroup, HcalParameters::etaMax, TrackCollections2monitor_cff::etaMax, HcalParameters::etaMin, TrackCollections2monitor_cff::etaMin, etaSimValu, HcalParameters::etaTable, etaTable, HcalParameters::etaTableHF, Exception, plotBeamSpotDB::first, citk::for(), gconsHB, gconsHE, HcalDDDSimConstants::getDepthEta16(), hcons, hpar, i, ietaMap, iEtaMax, iEtaMin, relval_2017::k, layerGroup(), layerGroupSize(), HcalParameters::maxDepth, maxDepth, HcalParameters::modHB, HcalParameters::modHE, HLT_FULL_cff::nEta, nHalves, nModule, nPhiBins, HcalParameters::phibin, phibin, HcalParameters::phigroup, HcalParameters::phitable, phiUnitS, HcalParameters::rHB, edm::second(), csvLumiCalc::unit, HcalDDDSimConstants::unitPhi(), and HcalParameters::zHE.

Referenced by HcalDDDRecConstants().

443  {
444 
445  //Eta grouping
446  int nEta = (int)(hpar->etagroup.size());
447  if (nEta != (int)(hpar->phigroup.size())) {
448  edm::LogError("HCalGeom") << "HcalDDDRecConstants: sizes of the vectors "
449  << " etaGroup (" << nEta << ") and phiGroup ("
450  << hpar->phigroup.size() << ") do not match";
451  throw cms::Exception("DDException") << "HcalDDDRecConstants: inconsistent array sizes" << nEta << ":" << hpar->phigroup.size();
452  }
453 
454  // First eta table
455  iEtaMin = hpar->etaMin;
456  iEtaMax = hpar->etaMax;
457  etaTable.clear(); ietaMap.clear(); etaSimValu.clear();
458  int ieta(0), ietaHB(0), ietaHE(0), ietaHEM(0);
459  etaTable.push_back(hpar->etaTable[ieta]);
460  for (int i=0; i<nEta; ++i) {
461  int ef = ieta+1;
462  ieta += (hpar->etagroup[i]);
463  if (ieta >= (int)(hpar->etaTable.size())) {
464  edm::LogError("HCalGeom") << "Going beyond the array boundary "
465  << hpar->etaTable.size() << " at index " << i
466  << " of etaTable from SimConstant";
467  throw cms::Exception("DDException") << "Going beyond the array boundary "
468  << hpar->etaTable.size()
469  << " at index " << i
470  << " of etaTable from SimConstant";
471  } else {
472  etaTable.push_back(hpar->etaTable[ieta]);
473  etaSimValu.push_back(std::pair<int,int>(ef,ieta));
474  }
475  for (int k=0; k<(hpar->etagroup[i]); ++k) ietaMap.push_back(i+1);
476  if (ieta <= hpar->etaMax[0]) ietaHB = i+1;
477  if (ieta <= hpar->etaMin[1]) ietaHE = i+1;
478  if (ieta <= hpar->etaMax[1]) ietaHEM= i+1;
479  }
480  iEtaMin[1] = ietaHE;
481  iEtaMax[0] = ietaHB;
482  iEtaMax[1] = ietaHEM;
483 
484  // Then Phi bins
485  nPhiBins.clear();
486  for (unsigned int k=0; k<4; ++k) nPhiBins.push_back(0);
487  ieta = 0;
488  phibin.clear(); phiUnitS.clear();
489  for (int i=0; i<nEta; ++i) {
490  double dphi = (hpar->phigroup[i])*(hpar->phibin[ieta]);
491  phibin.push_back(dphi);
492  int nphi = (int)((CLHEP::twopi + 0.001)/dphi);
493  if (ieta <= iEtaMax[0]) {
494  if (nphi > nPhiBins[0]) nPhiBins[3] = nPhiBins[0] = nphi;
495  }
496  if (ieta >= iEtaMin[1]) {
497  if (nphi > nPhiBins[1]) nPhiBins[1] = nphi;
498  }
499  ieta += (hpar->etagroup[i]);
500  }
501  for (unsigned int i=1; i<hpar->etaTable.size(); ++i) {
502  int unit = hcons.unitPhi(hpar->phibin[i-1]);
503  phiUnitS.push_back(unit);
504  }
505  for (unsigned int i=0; i<hpar->phitable.size(); ++i) {
506  int nphi = (int)((CLHEP::twopi + 0.001)/hpar->phitable[i]);
507  if (nphi > nPhiBins[2]) nPhiBins[2] = nphi;
508  }
509 #ifdef EDM_ML_DEBUG
510  std::cout << "Modified eta/deltaphi table for " << nEta << " bins" << std::endl;
511  for (int i=0; i<nEta; ++i)
512  std::cout << "Eta[" << i << "] = " << etaTable[i] << ":" << etaTable[i+1]
513  << ":" << etaSimValu[i].first << ":" << etaSimValu[i].second
514  << " PhiBin[" << i << "] = " << phibin[i]/CLHEP::deg <<std::endl;
515  std::cout << "PhiUnitS";
516  for (unsigned int i=0; i<phiUnitS.size(); ++i)
517  std::cout << " [" << i << "] = " << phiUnitS[i];
518  std::cout << std::endl;
519  std::cout << "nPhiBins";
520  for (unsigned int i=0; i<nPhiBins.size(); ++i)
521  std::cout << " [" << i << "] = " << nPhiBins[i];
522  std::cout << std::endl;
523  std::cout << "EtaTableHF";
524  for (unsigned int i=0; i<hpar->etaTableHF.size(); ++i)
525  std::cout << " [" << i << "] = " << hpar->etaTableHF[i];
526  std::cout << std::endl;
527  std::cout << "PhiBinHF";
528  for (unsigned int i=0; i<hpar->phitable.size(); ++i)
529  std::cout << " [" << i << "] = " << hpar->phitable[i];
530  std::cout << std::endl;
531 #endif
532 
533  //Now the depths
535  maxDepth[0] = maxDepth[1] = 0;
536  for (int i=0; i<nEta; ++i) {
537  unsigned int imx = layerGroupSize(i);
538  int laymax = (imx > 0) ? layerGroup(i,imx-1) : 0;
539  if (i < iEtaMax[0]) {
540  int laymax0 = (imx > 16) ? layerGroup(i,16) : laymax;
541  if (i+1 == iEtaMax[0]) laymax0 = hcons.getDepthEta16(0);
542 #ifdef EDM_ML_DEBUG
543  std::cout << "HB " << i << " " << imx << " " << laymax << " " << laymax0 << std::endl;
544 #endif
545  if (maxDepth[0] < laymax0) maxDepth[0] = laymax0;
546  }
547  if (i >= iEtaMin[1]-1 && i < iEtaMax[1]) {
548 #ifdef EDM_ML_DEBUG
549  std::cout << "HE " << i << " " << imx << " " << laymax << std::endl;
550 #endif
551  if (maxDepth[1] < laymax) maxDepth[1] = laymax;
552  }
553  }
554 #ifdef EDM_ML_DEBUG
555  for (int i=0; i<4; ++i)
556  std::cout << "Detector Type[" << i << "] iEta " << iEtaMin[i] << ":"
557  << iEtaMax[i] << " MaxDepth " << maxDepth[i] << std::endl;
558 #endif
559 
560  //Now the geometry constants
561  nModule[0] = hpar->modHB[0];
562  nHalves[0] = hpar->modHB[1];
563  for (unsigned int i=0; i<hpar->rHB.size(); ++i) {
564  gconsHB.push_back(std::pair<double,double>(hpar->rHB[i]/CLHEP::cm,
565  hpar->drHB[i]/CLHEP::cm));
566  }
567 #ifdef EDM_ML_DEBUG
568  std::cout << "HB with " << nModule[0] << " modules and " << nHalves[0]
569  <<" halves and " << gconsHB.size() << " layers" << std::endl;
570  for (unsigned int i=0; i<gconsHB.size(); ++i)
571  std::cout << "rHB[" << i << "] = " << gconsHB[i].first << " +- "
572  << gconsHB[i].second << std::endl;
573 #endif
574  nModule[1] = hpar->modHE[0];
575  nHalves[1] = hpar->modHE[1];
576  for (unsigned int i=0; i<hpar->zHE.size(); ++i) {
577  gconsHE.push_back(std::pair<double,double>(hpar->zHE[i]/CLHEP::cm,
578  hpar->dzHE[i]/CLHEP::cm));
579  }
580 #ifdef EDM_ML_DEBUG
581  std::cout << "HE with " << nModule[1] << " modules and " << nHalves[1]
582  <<" halves and " << gconsHE.size() << " layers" << std::endl;
583  for (unsigned int i=0; i<gconsHE.size(); ++i)
584  std::cout << "zHE[" << i << "] = " << gconsHE[i].first << " +- "
585  << gconsHE[i].second << std::endl;
586 #endif
587 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > etaTable
std::vector< int > iEtaMin
std::vector< int > etagroup
int unitPhi(int det, int etaR) const
std::vector< double > rHB
std::vector< std::pair< int, int > > etaSimValu
std::vector< int > maxDepth
std::vector< double > etaTableHF
std::vector< int > etaMax
int getDepthEta16(int i) const
std::vector< int > phiUnitS
std::vector< int > modHB
U second(std::pair< T, U > const &p)
const HcalParameters * hpar
std::vector< std::pair< double, double > > gconsHE
std::vector< double > zHE
std::vector< double > phibin
unsigned int layerGroup(unsigned int eta, unsigned int i) const
string unit
Definition: csvLumiCalc.py:46
std::vector< double > dzHE
std::vector< int > iEtaMax
std::vector< int > ietaMap
std::vector< int > nPhiBins
std::vector< int > modHE
unsigned int layerGroupSize(unsigned int eta) const
std::vector< double > etaTable
std::vector< double > phitable
std::vector< double > phibin
std::vector< double > drHB
const HcalDDDSimConstants & hcons
tuple cout
Definition: gather_cfg.py:145
std::vector< std::pair< double, double > > gconsHB
std::vector< int > maxDepth
std::vector< int > phigroup
for(const auto &isodef:isoDefs)
std::vector< int > etaMin
bool HcalDDDRecConstants::isBH ( ) const
inline
unsigned int HcalDDDRecConstants::layerGroup ( unsigned int  eta,
unsigned int  i 
) const
private

Definition at line 601 of file HcalDDDRecConstants.cc.

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

Referenced by getEtaBins(), getHCID(), getMaxDepth(), getMinDepth(), getRZ(), and initialize().

602  {
603  unsigned int k = 0;
604  for( auto const & it : hpar->layerGroupEtaRec ) {
605  if( it.layer == eta + 1 ) {
606  return it.layerGroup.at( i );
607  }
608  if( it.layer > eta + 1 ) break;
609  k = it.layerGroup.at( i );
610  }
611  return k;
612 }
int i
Definition: DBlmapReader.cc:9
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
unsigned int HcalDDDRecConstants::layerGroupSize ( unsigned int  eta) const
private

Definition at line 589 of file HcalDDDRecConstants.cc.

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

Referenced by getEtaBins(), getMaxDepth(), getMinDepth(), getRZ(), and initialize().

589  {
590  unsigned int k = 0;
591  for( auto const & it : hpar->layerGroupEtaRec ) {
592  if( it.layer == eta + 1 ) {
593  return it.layerGroup.size();
594  }
595  if( it.layer > eta + 1 ) break;
596  k = it.layerGroup.size();
597  }
598  return k;
599 }
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
int HcalDDDRecConstants::maxHFDepth ( int  ieta,
int  iphi 
) const
inline

Definition at line 93 of file HcalDDDRecConstants.h.

References hcons, and HcalDDDSimConstants::maxHFDepth().

Referenced by HcalTopology::validRaw().

93 {return hcons.maxHFDepth(ieta,iphi);}
const HcalDDDSimConstants & hcons
int maxHFDepth(int ieta, int iphi) const
unsigned int HcalDDDRecConstants::nCells ( HcalSubdetector  subdet) const

Definition at line 420 of file HcalDDDRecConstants.cc.

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

420  {
421 
422  if (subdet == HcalBarrel || subdet == HcalEndcap) {
423  int isub = (subdet == HcalBarrel) ? 0 : 1;
424  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
425  unsigned int ncell(0);
426  for (unsigned int i=0; i<etabins.size(); ++i) {
427  ncell += (((unsigned int)(etabins[i].nPhi))*(etabins[i].layer.size()));
428  }
429  return ncell;
430  } else if (subdet == HcalOuter) {
431  return kHOSizePreLS1;
432  } else if (subdet == HcalForward) {
433  return (unsigned int)(hcons.numberOfCells(subdet));
434  } else {
435  return 0;
436  }
437 }
int i
Definition: DBlmapReader.cc:9
unsigned int numberOfCells(HcalSubdetector) const
const HcalDDDSimConstants & hcons
std::vector< HcalEtaBin > getEtaBins(const int itype) const
unsigned int HcalDDDRecConstants::nCells ( ) const
unsigned int HcalDDDRecConstants::numberOfCells ( HcalSubdetector  subdet) const

Definition at line 398 of file HcalDDDRecConstants.cc.

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

Referenced by HcalDDDGeometryLoader::load().

398  {
399 
400  if (subdet == HcalBarrel || subdet == HcalEndcap) {
401  unsigned int num = 0;
402  std::vector<HcalCellType> cellTypes = HcalCellTypes(subdet);
403  for (unsigned int i=0; i<cellTypes.size(); i++) {
404  num += (unsigned int)(cellTypes[i].nPhiBins());
405  if (cellTypes[i].nHalves() > 1)
406  num += (unsigned int)(cellTypes[i].nPhiBins());
407  num -= (unsigned int)(cellTypes[i].nPhiMissingBins());
408  }
409 #ifdef EDM_ML_DEBUG
410  edm::LogInfo ("HCalGeom") << "HcalDDDRecConstants:numberOfCells "
411  << cellTypes.size() << " " << num
412  << " for subdetector " << subdet;
413 #endif
414  return num;
415  } else {
416  return hcons.numberOfCells(subdet);
417  }
418 }
int i
Definition: DBlmapReader.cc:9
unsigned int numberOfCells(HcalSubdetector) const
std::vector< int > nPhiBins
std::vector< HcalCellType > HcalCellTypes(HcalSubdetector) const
const HcalDDDSimConstants & hcons

Member Data Documentation

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

Definition at line 105 of file HcalDDDRecConstants.h.

Referenced by HcalCellTypes(), and initialize().

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

Definition at line 106 of file HcalDDDRecConstants.h.

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

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

Definition at line 113 of file HcalDDDRecConstants.h.

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

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

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

Referenced by getHCID(), and initialize().

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

Definition at line 108 of file HcalDDDRecConstants.h.

Referenced by getEtaBins(), getEtaPhi(), getEtaRange(), getMaxDepth(), and initialize().

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

Definition at line 109 of file HcalDDDRecConstants.h.

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

int HcalDDDRecConstants::nHalves[2]
private

Definition at line 115 of file HcalDDDRecConstants.h.

Referenced by initialize(), and numberOfCells().

int HcalDDDRecConstants::nModule[2]
private

Definition at line 115 of file HcalDDDRecConstants.h.

Referenced by getEtaBins(), and initialize().

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

Definition at line 110 of file HcalDDDRecConstants.h.

Referenced by getNPhi(), initialize(), and numberOfCells().

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

Definition at line 112 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().