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
 
int getMaxDepth (const int type) const
 
int getMaxDepth (const int itype, const int ieta) const
 
int getNEta () const
 
int getNoff (const int i) 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)
 
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< 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 DebugLog
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 DebugLog
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 570 of file HcalDDDRecConstants.cc.

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

Referenced by HcalTopology::HcalTopology().

570  {
571  std::vector<HcalParameters::LayerItem>::const_iterator last = hpar->layerGroupEtaRec.begin();
572  for( std::vector<HcalParameters::LayerItem>::const_iterator it = hpar->layerGroupEtaRec.begin(); it != hpar->layerGroupEtaRec.end(); ++it ) {
573  if( it->layer == i + 1 )
574  return it->layerGroup;
575  if( it->layer > i + 1 )
576  return last->layerGroup;
577  last = it;
578  }
579  return last->layerGroup;
580 }
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  for (unsigned int l=0; l<lymx0; ++l) {
48  if ((int)layerGroup( ieta-1, l) == dep) {
49  if (lmin == 0) lmin = l + 1;
50  lmax = l + 1;
51  } else if ((int)layerGroup( ieta-1, l ) > dep) {
52  if (dstart < 0) dstart = dep;
53  if (type == 1 && ieta+1 == hpar->noff[1] && dep > hcons.getDepthEta29(0)) {
54  etabin0.layer.push_back(std::pair<int,int>(lmin,lmax));
55  } else {
56  etabin.layer.push_back(std::pair<int,int>(lmin,lmax));
57  }
58  lmin = (l + 1);
59  lmax = l;
60  dep = layerGroup(ieta-1, l);
61  }
62  if (type == 0 && ieta == iEtaMax[type] && dep > hcons.getDepthEta16(0)) break;
63  if (type == 1 && ieta == hpar->noff[1] && dep > hcons.getDepthEta29(0)){
64  lmax = lymx0;
65  break;
66  }
67  }
68  if (lmax >= lmin) {
69  if (ieta+1 == hpar->noff[1]) {
70  etabin0.layer.push_back(std::pair<int,int>(lmin,lmax));
71  bins.push_back(etabin0);
72  } else if (ieta == hpar->noff[1]) {
73  } else {
74  etabin.layer.push_back(std::pair<int,int>(lmin,lmax));
75  if (dstart < 0) dstart = dep;
76  }
77  }
78  }
79  etabin.depthStart = dstart;
80  bins.push_back(etabin);
81  }
82 #ifdef DebugLog
83  std::cout << "Prepares " << bins.size() << " eta bins for type " << type
84  << std::endl;
85  for (unsigned int i=0; i<bins.size(); ++i) {
86  std::cout << "Bin[" << i << "]: Eta = (" << bins[i].ieta << ":"
87  << bins[i].etaMin << ":" << bins[i].etaMax << ") Phi = ("
88  << bins[i].nPhi << ":" << bins[i].phi0 << ":" << bins[i].dphi
89  << ") and " << bins[i].layer.size() << " depths (start) "
90  << bins[i].depthStart << " :";
91  for (unsigned int k=0; k<bins[i].layer.size(); ++k)
92  std::cout << " [" << k << "] " << bins[i].layer[k].first << ":"
93  << bins[i].layer[k].second;
94  std::cout << std::endl;
95  }
96 #endif
97  return bins;
98 }
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 101 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, eta, etaTable, HcalParameters::etaTableHF, HcalBarrel, HcalEndcap, HcalOuter, hpar, iEtaMax, iEtaMin, M_PI, phi, phibin, HcalParameters::phioff, HcalParameters::phitable, and csvLumiCalc::unit.

Referenced by HGCalSimHitValidation::analyzeHits().

101  {
102  int ietaAbs = (ieta > 0) ? ieta : -ieta;
103  const double fiveDegInRad = 2*M_PI/72;
104  double eta(0), phi(0);
105  if ((subdet == static_cast<int>(HcalBarrel)) ||
106  (subdet == static_cast<int>(HcalEndcap)) ||
107  (subdet == static_cast<int>(HcalOuter))) { // Use Eta Table
108  int unit = (int)(phibin[ietaAbs-1]/fiveDegInRad+0.5);
109  int kphi = (unit == 2) ? ((iphi-1)/2 + 1) : iphi;
110  double foff = (ietaAbs <= iEtaMax[0]) ? hpar->phioff[0] : hpar->phioff[1];
111  eta = 0.5*(etaTable[ietaAbs-1]+etaTable[ietaAbs]);
112  phi = foff + (kphi-0.5)*phibin[ietaAbs-1];
113  } else {
114  ietaAbs -= iEtaMin[2];
115  int unit = (int)(hpar->phitable[ietaAbs-1]/fiveDegInRad+0.5);
116  int kphi = (unit == 4) ? ((iphi-3)/4 + 1) : ((iphi-1)/2 + 1);
117  double foff = (unit > 2) ? hpar->phioff[4] : hpar->phioff[2];
118  eta = 0.5*(hpar->etaTableHF[ietaAbs-1]+hpar->etaTableHF[ietaAbs]);
119  phi = foff + (kphi-0.5)*hpar->phitable[ietaAbs-1];
120  }
121  if (ieta < 0) eta = -eta;
122  if (phi > M_PI) phi -= (2*M_PI);
123 #ifdef DebugLog
124  std::cout << "getEtaPhi: subdet|ieta|iphi " << subdet << "|" << ieta << "|"
125  << iphi << " eta|phi " << eta << "|" << phi << std::endl;
126 #endif
127  return std::pair<double,double>(eta,phi);
128 }
std::vector< int > iEtaMin
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
tuple cout
Definition: gather_cfg.py:145
std::pair<int,int> HcalDDDRecConstants::getEtaRange ( const int  i) const
inline

Definition at line 66 of file HcalDDDRecConstants.h.

References i, iEtaMax, and iEtaMin.

Referenced by SimHitsValidationHcal::getLimits(), and HcalTopology::HcalTopology().

67  {return std::pair<int,int>(iEtaMin[i],iEtaMax[i]);}
int i
Definition: DBlmapReader.cc:9
std::vector< int > iEtaMin
std::vector< int > iEtaMax
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 131 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, HLT_25ns10e33_v2_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(), HGCalSimHitValidation::analyze(), and HcalHitRelabeller::relabel().

132  {
133 
134  int eta(ieta), phi(iphi), depth(idepth);
135  if ((subdet == static_cast<int>(HcalOuter)) ||
136  ((subdet == static_cast<int>(HcalBarrel)) && (lay > 17))) {
137  subdet= static_cast<int>(HcalOuter);
138  depth = 4;
139  } else if (subdet == static_cast<int>(HcalBarrel) ||
140  subdet == static_cast<int>(HcalEndcap)) {
141  eta = ietaMap[ieta-1];
142  int unit = phiUnitS[ieta-1];
143  int phi0 = (iphi-1)/(hpar->phigroup[eta-1]);
144  if (unit == 2) {
145  phi0 = (iphi+1)/2;
146  phi0 = (phi0-1)/(hpar->phigroup[eta-1]);
147  } else if (unit == 4) {
148  phi0 = (iphi+5)/4;
149  phi0 = (phi0-1)/(hpar->phigroup[eta-1]);
150  }
151  ++phi0;
152  unit = hcons.unitPhi(phibin[eta-1]);
153  phi = hcons.phiNumber(phi0,unit);
154  depth = layerGroup( eta-1, lay-1 );
155  if (eta == iEtaMin[1]) {
156  if (subdet == static_cast<int>(HcalBarrel)) {
158  } else {
160  }
161  } else if (eta == hpar->noff[0] && lay > 1) {
162  int kphi = phi + int((hpar->phioff[3]+0.1)/phibin[eta-1]);
163  kphi = (kphi-1)%4 + 1;
164  if (kphi == 2 || kphi == 3) depth = layerGroup( eta-1, lay-2 );
165  } else if (eta == hpar->noff[1] && depth > 2) {
166  eta = hpar->noff[1]-1;
167  }
168  }
169 #ifdef DebugLog
170  std::cout << "getHCID: input " << subdet << ":" << ieta << ":" << iphi
171  << ":" << idepth << ":" << lay << " output " << eta << ":" << phi
172  << ":" << depth << std::endl;
173 #endif
174  return HcalDDDRecConstants::HcalID(subdet,eta,phi,depth);
175 }
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 178 of file HcalDDDRecConstants.cc.

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

Referenced by HcalFlexiHardcodeGeometryLoader::makeHFCells().

178  {
179 
180  std::vector<HcalDDDRecConstants::HFCellParameters> cells;
181  unsigned int nEta = hcons.getPhiTableHF().size();
182  if (maxDepth[2] > 0) {
183  for (unsigned int k=0; k<nEta; ++k) {
184  int ieta = iEtaMin[2] + k;
185  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k]/(5.0*CLHEP::deg));
186  int iphi = (dphi == 4) ? 3 : 1;
187  int nphi = 72/dphi;
188  double rMin = hcons.getRTableHF()[nEta-k-1]/CLHEP::cm;
189  double rMax = hcons.getRTableHF()[nEta-k]/CLHEP::cm;
190  HcalDDDRecConstants::HFCellParameters cell1( ieta,1,iphi,dphi,nphi,rMin,rMax);
191  cells.push_back(cell1);
192  HcalDDDRecConstants::HFCellParameters cell2(-ieta,1,iphi,dphi,nphi,rMin,rMax);
193  cells.push_back(cell2);
194  }
195  }
196  if (maxDepth[2] > 2) {
197  if (hcons.getIdHF2QIE().size() > 0) {
198  for (unsigned int k=0; k<hcons.getIdHF2QIE().size(); ++k) {
199  int ieta = hcons.getIdHF2QIE()[k].ieta();
200  int ind = std::abs(ieta) - iEtaMin[2];
201  int dphi = (int)(0.001 + hcons.getPhiTableHF()[ind]/(5.0*CLHEP::deg));
202  int iphi = hcons.getIdHF2QIE()[k].iphi();
203  double rMin = hcons.getRTableHF()[nEta-ind-1]/CLHEP::cm;
204  double rMax = hcons.getRTableHF()[nEta-ind]/CLHEP::cm;
205  HcalDDDRecConstants::HFCellParameters cell1( ieta,3,iphi,dphi,1,rMin,rMax);
206  cells.push_back(cell1);
207  }
208  } else {
209  for (unsigned int k=0; k<nEta; ++k) {
210  int ieta = iEtaMin[2] + k;
211  int dphi = (int)(0.001 + hcons.getPhiTableHF()[k]/(5.0*CLHEP::deg));
212  int iphi = (dphi == 4) ? 3 : 1;
213  int nphi = 72/dphi;
214  double rMin = hcons.getRTableHF()[nEta-k-1]/CLHEP::cm;
215  double rMax = hcons.getRTableHF()[nEta-k]/CLHEP::cm;
216  HcalDDDRecConstants::HFCellParameters cell1( ieta,3,iphi,dphi,nphi,rMin,rMax);
217  cells.push_back(cell1);
218  HcalDDDRecConstants::HFCellParameters cell2(-ieta,3,iphi,dphi,nphi,rMin,rMax);
219  cells.push_back(cell2);
220  }
221  }
222  }
223 #ifdef DebugLog
224  std::cout << "HcalDDDRecConstants returns " << cells.size()
225  << " HF cell parameters" << std::endl;
226  for (unsigned int k=0; k<cells.size(); ++k)
227  std::cout << "Cell[" << k <<"] : (" << cells[k].ieta <<", "<< cells[k].depth
228  << ", " << cells[k].firstPhi << ", " << cells[k].stepPhi << ", "
229  << cells[k].nPhi << ", " << cells[k].rMin << ", "
230  << cells[k].rMax << ")" << std::endl;
231 #endif
232  return cells;
233 }
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
int HcalDDDRecConstants::getMaxDepth ( const int  type) const
inline
int HcalDDDRecConstants::getMaxDepth ( const int  itype,
const int  ieta 
) const

Definition at line 235 of file HcalDDDRecConstants.cc.

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

235  {
236 
237  int lmax(0);
238  unsigned int type = (itype == 0) ? 0 : 1;
239  unsigned int lymax = (type == 0) ? 17 : 19;
240  if (layerGroupSize(ieta-1) > 0) {
241  if (layerGroupSize(ieta-1) < lymax) lymax = layerGroupSize(ieta-1);
242  lmax = (int)(layerGroup(ieta-1, lymax-1));
243  if (type == 0 && ieta == iEtaMax[type]) lmax = hcons.getDepthEta16(0);
244  if (type == 1 && ieta >= hpar->noff[1]) lmax = hcons.getDepthEta29(0);
245  }
246  return lmax;
247 }
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::getNEta ( ) const
inline

Definition at line 77 of file HcalDDDRecConstants.h.

References HcalParameters::etagroup, and hpar.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 78 of file HcalDDDRecConstants.h.

References hpar, i, and HcalParameters::noff.

Referenced by HcalTopology::validRaw().

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

Definition at line 79 of file HcalDDDRecConstants.h.

References i, and phibin.

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

Definition at line 80 of file HcalDDDRecConstants.h.

References hpar, i, and HcalParameters::phioff.

80 {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 81 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::phioff.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 82 of file HcalDDDRecConstants.h.

References phibin.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 83 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::phitable.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 249 of file HcalDDDRecConstants.cc.

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

Referenced by HGCalSimHitValidation::analyzeHits().

249  {
250 
251  int ietaAbs = (ieta > 0) ? ieta : -ieta;
252  double rz(0);
253 #ifdef DebugLog
254  int lay(0);
255 #endif
256  if (ietaAbs < hpar->etaMax[1]) {
257  for (unsigned int k=0; k< layerGroupSize( ietaAbs-1 ); ++k) {
258  if (depth == (int)layerGroup( ietaAbs-1, k )) {
259  rz = ((subdet == static_cast<int>(HcalBarrel)) ? (gconsHB[k].first) :
260  (gconsHE[k].first));
261  if (rz > 10.) {
262 #ifdef DebugLog
263  lay = k;
264 #endif
265  break;
266  }
267  }
268  }
269  }
270 #ifdef DebugLog
271  std::cout << "getRZ: subdet|ieta|depth " << subdet << "|" << ieta << "|"
272  << depth << " lay|rz " << lay << "|" << rz << std::endl;
273 #endif
274  return rz;
275 }
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 278 of file HcalDDDRecConstants.cc.

References funct::cos(), gather_cfg::cout, HcalDDDRecConstants::HcalActiveLength::depth, HLT_25ns10e33_v2_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(), theta(), and HcalDDDRecConstants::HcalActiveLength::thick.

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

278  {
279 
280  std::vector<HcalDDDRecConstants::HcalActiveLength> actives;
281  std::vector<HcalDDDRecConstants::HcalEtaBin> bins = getEtaBins(type);
282 #ifdef DebugLog
283  unsigned int kount(0);
284 #endif
285  for (unsigned int k=0; k<bins.size(); ++k) {
286  int ieta = bins[k].ieta;
287  double eta = 0.5*(bins[k].etaMin+bins[k].etaMax);
288  double theta = 2*atan(exp(-eta));
289  double scale = 1.0/((type == 0) ? sin(theta) : cos(theta));
290  int depth = bins[k].depthStart;
291  for (unsigned int i = 0; i < bins[k].layer.size(); ++i) {
292  double thick(0);
293  for (int j = bins[k].layer[i].first; j <= bins[k].layer[i].second; ++j) {
294  if (type == 0 || j > 1)
295  thick += ((type == 0) ? gconsHB[j-1].second : gconsHE[j-1].second);
296  }
297  thick *= (2.*scale);
298  HcalDDDRecConstants::HcalActiveLength active(ieta,depth,eta,thick);
299  actives.push_back(active);
300  ++depth;
301 #ifdef DebugLog
302  kount++;
303  std::cout << "getThickActive: [" << kount << "] eta:" << active.ieta
304  << ":" << active.eta << " depth " << active.depth << " thick "
305  << active.thick << std::endl;
306 #endif
307  }
308  }
309  return actives;
310 }
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 86 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::topologyMode.

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

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

Definition at line 87 of file HcalDDDRecConstants.h.

References hpar, and HcalParameters::topologyMode.

Referenced by HcalTopology::HcalTopology().

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

Definition at line 313 of file HcalDDDRecConstants.cc.

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

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

313  {
314 
315  if (subdet == HcalBarrel || subdet == HcalEndcap) {
316  std::vector<HcalCellType> cells;
317  int isub = (subdet == HcalBarrel) ? 0 : 1;
318  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
319  for (unsigned int bin=0; bin<etabins.size(); ++bin) {
320  std::vector<HcalCellType> temp;
321  std::vector<int> count;
322  std::vector<double> dmin, dmax;
323  for (unsigned int il=0; il<etabins[bin].layer.size(); ++il) {
324  HcalCellType cell(subdet, 0, 0, 0, HcalCellType::HcalCell());
325  temp.push_back(cell);
326  count.push_back(0);
327  dmin.push_back(0);
328  dmax.push_back(0);
329  }
330  int ieta = etabins[bin].ieta;
331  for (int keta=etaSimValu[ieta-1].first; keta<=etaSimValu[ieta-1].second;
332  ++keta) {
333  std::vector<HcalCellType> cells = hcons.HcalCellTypes(subdet,keta,-1);
334  for (unsigned int ic=0; ic<cells.size(); ++ic) {
335  for (unsigned int il=0; il<etabins[bin].layer.size(); ++il) {
336  if (cells[ic].depthSegment() >= etabins[bin].layer[il].first &&
337  cells[ic].depthSegment() <= etabins[bin].layer[il].second) {
338  if (count[il] == 0) {
339  temp[il] = cells[ic];
340  dmin[il] = cells[ic].depthMin();
341  dmax[il] = cells[ic].depthMax();
342  }
343  ++count[il];
344  if (cells[ic].depthMin() < dmin[il]) dmin[il] = cells[ic].depthMin();
345  if (cells[ic].depthMax() > dmax[il]) dmax[il] = cells[ic].depthMax();
346  break;
347  }
348  }
349  }
350  }
351  int unit = hcons.unitPhi(etabins[bin].dphi);
352  for (unsigned int il=0; il<etabins[bin].layer.size(); ++il) {
353  int depth = etabins[bin].depthStart + (int)(il);
354  temp[il].setEta(ieta,etabins[bin].etaMin,etabins[bin].etaMax);
355  temp[il].setPhi(etabins[bin].nPhi,unit,etabins[bin].dphi/CLHEP::deg,
356  hpar->phioff[isub]/CLHEP::deg);
357  temp[il].setDepth(depth,dmin[il],dmax[il]);
358  cells.push_back(temp[il]);
359  }
360  }
361 #ifdef DebugLog
362  std::cout << "HcalDDDRecConstants: found " << cells.size() << " cells for sub-detector type " << isub << std::endl;
363  for (unsigned int ic=0; ic<cells.size(); ++ic)
364  std::cout << "Cell[" << ic << "] " << cells[ic] << std::endl;
365 #endif
366  return cells;
367  } else {
368  return hcons.HcalCellTypes(subdet,-1,-1);
369  }
370 }
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 417 of file HcalDDDRecConstants.cc.

References gather_cfg::cout, HcalParameters::drHB, HcalParameters::dzHE, HcalParameters::etagroup, HcalParameters::etaMax, HLT_25ns10e33_v2_cff::etaMax, HcalParameters::etaMin, HLT_25ns10e33_v2_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_25ns10e33_v2_cff::nEta, nHalves, nModule, HcalParameters::phibin, phibin, HcalParameters::phigroup, HcalParameters::phitable, phiUnitS, HcalParameters::rHB, edm::second(), csvLumiCalc::unit, HcalDDDSimConstants::unitPhi(), and HcalParameters::zHE.

Referenced by HcalDDDRecConstants().

417  {
418 
419  //Eta grouping
420  int nEta = (int)(hpar->etagroup.size());
421  if (nEta != (int)(hpar->phigroup.size())) {
422  edm::LogError("HCalGeom") << "HcalDDDRecConstants: sizes of the vectors "
423  << " etaGroup (" << nEta << ") and phiGroup ("
424  << hpar->phigroup.size() << ") do not match";
425  throw cms::Exception("DDException") << "HcalDDDRecConstants: inconsistent array sizes" << nEta << ":" << hpar->phigroup.size();
426  }
427 
428  // First eta table
429  iEtaMin = hpar->etaMin;
430  iEtaMax = hpar->etaMax;
431  etaTable.clear(); ietaMap.clear(); etaSimValu.clear();
432  int ieta(0), ietaHB(0), ietaHE(0);
433  etaTable.push_back(hpar->etaTable[ieta]);
434  for (int i=0; i<nEta; ++i) {
435  int ef = ieta+1;
436  ieta += (hpar->etagroup[i]);
437  if (ieta >= (int)(hpar->etaTable.size())) {
438  edm::LogError("HCalGeom") << "Going beyond the array boundary "
439  << hpar->etaTable.size() << " at index " << i
440  << " of etaTable from SimConstant";
441  throw cms::Exception("DDException") << "Going beyond the array boundary "
442  << hpar->etaTable.size()
443  << " at index " << i
444  << " of etaTable from SimConstant";
445  } else {
446  etaTable.push_back(hpar->etaTable[ieta]);
447  etaSimValu.push_back(std::pair<int,int>(ef,ieta));
448  }
449  for (int k=0; k<(hpar->etagroup[i]); ++k) ietaMap.push_back(i+1);
450  if (ieta <= hpar->etaMax[0]) ietaHB = i+1;
451  if (ieta <= hpar->etaMin[1]) ietaHE = i+1;
452  }
453  iEtaMin[1] = ietaHE;
454  iEtaMax[0] = ietaHB;
455 
456  // Then Phi bins
457  ieta = 0;
458  phibin.clear(); phiUnitS.clear();
459  for (int i=0; i<nEta; ++i) {
460  double dphi = (hpar->phigroup[i])*(hpar->phibin[ieta]);
461  phibin.push_back(dphi);
462  ieta += (hpar->etagroup[i]);
463  }
464  for (unsigned int i=1; i<hpar->etaTable.size(); ++i) {
465  int unit = hcons.unitPhi(hpar->phibin[i-1]);
466  phiUnitS.push_back(unit);
467  }
468 
469 #ifdef DebugLog
470  std::cout << "Modified eta/deltaphi table for " << nEta << " bins" << std::endl;
471  for (int i=0; i<nEta; ++i)
472  std::cout << "Eta[" << i << "] = " << etaTable[i] << ":" << etaTable[i+1]
473  << ":" << etaSimValu[i].first << ":" << etaSimValu[i].second
474  << " PhiBin[" << i << "] = " << phibin[i]/CLHEP::deg <<std::endl;
475  std::cout << "PhiUnitS";
476  for (unsigned int i=0; i<phiUnitS.size(); ++i)
477  std::cout << " [" << i << "] = " << phiUnitS[i];
478  std::cout << std::endl;
479  std::cout << "EtaTableHF";
480  for (unsigned int i=0; i<hpar->etaTableHF.size(); ++i)
481  std::cout << " [" << i << "] = " << hpar->etaTableHF[i];
482  std::cout << std::endl;
483  std::cout << "PhiBinHF";
484  for (unsigned int i=0; i<hpar->phitable.size(); ++i)
485  std::cout << " [" << i << "] = " << hpar->phitable[i];
486  std::cout << std::endl;
487 #endif
488 
489  //Now the depths
491  maxDepth[0] = maxDepth[1] = 0;
492  for (int i=0; i<nEta; ++i) {
493  unsigned int imx = layerGroupSize(i);
494  int laymax = (imx > 0) ? layerGroup(i,imx-1) : 0;
495  if (i < iEtaMax[0]) {
496  int laymax0 = (imx > 16) ? layerGroup(i,16) : laymax;
497  if (i+1 == iEtaMax[0]) laymax0 = hcons.getDepthEta16(0);
498 #ifdef DebugLog
499  std::cout << "HB " << i << " " << imx << " " << laymax << " " << laymax0 << std::endl;
500 #endif
501  if (maxDepth[0] < laymax0) maxDepth[0] = laymax0;
502  }
503  if (i >= iEtaMin[1]-1 && i < iEtaMax[1]) {
504 #ifdef DebugLog
505  std::cout << "HE " << i << " " << imx << " " << laymax << std::endl;
506 #endif
507  if (maxDepth[1] < laymax) maxDepth[1] = laymax;
508  }
509  }
510 #ifdef DebugLog
511  for (int i=0; i<4; ++i)
512  std::cout << "Detector Type[" << i << "] iEta " << iEtaMin[i] << ":"
513  << iEtaMax[i] << " MaxDepth " << maxDepth[i] << std::endl;
514 #endif
515 
516  //Now the geometry constants
517  nModule[0] = hpar->modHB[0];
518  nHalves[0] = hpar->modHB[1];
519  for (unsigned int i=0; i<hpar->rHB.size(); ++i) {
520  gconsHB.push_back(std::pair<double,double>(hpar->rHB[i]/CLHEP::cm,
521  hpar->drHB[i]/CLHEP::cm));
522  }
523 #ifdef DebugLog
524  std::cout << "HB with " << nModule[0] << " modules and " << nHalves[0]
525  <<" halves and " << gconsHB.size() << " layers" << std::endl;
526  for (unsigned int i=0; i<gconsHB.size(); ++i)
527  std::cout << "rHB[" << i << "] = " << gconsHB[i].first << " +- "
528  << gconsHB[i].second << std::endl;
529 #endif
530  nModule[1] = hpar->modHE[0];
531  nHalves[1] = hpar->modHE[1];
532  for (unsigned int i=0; i<hpar->zHE.size(); ++i) {
533  gconsHE.push_back(std::pair<double,double>(hpar->zHE[i]/CLHEP::cm,
534  hpar->dzHE[i]/CLHEP::cm));
535  }
536 #ifdef DebugLog
537  std::cout << "HE with " << nModule[1] << " modules and " << nHalves[1]
538  <<" halves and " << gconsHE.size() << " layers" << std::endl;
539  for (unsigned int i=0; i<gconsHE.size(); ++i)
540  std::cout << "zHE[" << i << "] = " << gconsHE[i].first << " +- "
541  << gconsHE[i].second << std::endl;
542 #endif
543 }
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 > 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
unsigned int HcalDDDRecConstants::layerGroup ( unsigned int  eta,
unsigned int  i 
) const
private

Definition at line 557 of file HcalDDDRecConstants.cc.

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

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

558  {
559  unsigned int k = 0;
560  for( auto const & it : hpar->layerGroupEtaRec ) {
561  if( it.layer == eta + 1 ) {
562  return it.layerGroup.at( i );
563  }
564  if( it.layer > eta + 1 ) break;
565  k = it.layerGroup.at( i );
566  }
567  return k;
568 }
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 545 of file HcalDDDRecConstants.cc.

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

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

545  {
546  unsigned int k = 0;
547  for( auto const & it : hpar->layerGroupEtaRec ) {
548  if( it.layer == eta + 1 ) {
549  return it.layerGroup.size();
550  }
551  if( it.layer > eta + 1 ) break;
552  k = it.layerGroup.size();
553  }
554  return k;
555 }
const HcalParameters * hpar
std::vector< LayerItem > layerGroupEtaRec
int HcalDDDRecConstants::maxHFDepth ( int  ieta,
int  iphi 
) const
inline

Definition at line 89 of file HcalDDDRecConstants.h.

References hcons, and HcalDDDSimConstants::maxHFDepth().

Referenced by HcalTopology::validRaw().

89 {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 394 of file HcalDDDRecConstants.cc.

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

394  {
395 
396  if (subdet == HcalBarrel || subdet == HcalEndcap) {
397  int isub = (subdet == HcalBarrel) ? 0 : 1;
398  std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = getEtaBins(isub);
399  unsigned int ncell(0);
400  for (unsigned int i=0; i<etabins.size(); ++i) {
401  ncell += (((unsigned int)(etabins[i].nPhi))*(etabins[i].layer.size()));
402  }
403  return ncell;
404  } else if (subdet == HcalOuter) {
405  return kHOSizePreLS1;
406  } else if (subdet == HcalForward) {
407  return (unsigned int)(hcons.numberOfCells(subdet));
408  } else {
409  return 0;
410  }
411 }
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 372 of file HcalDDDRecConstants.cc.

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

Referenced by HcalDDDGeometryLoader::load().

372  {
373 
374  if (subdet == HcalBarrel || subdet == HcalEndcap) {
375  unsigned int num = 0;
376  std::vector<HcalCellType> cellTypes = HcalCellTypes(subdet);
377  for (unsigned int i=0; i<cellTypes.size(); i++) {
378  num += (unsigned int)(cellTypes[i].nPhiBins());
379  if (cellTypes[i].nHalves() > 1)
380  num += (unsigned int)(cellTypes[i].nPhiBins());
381  num -= (unsigned int)(cellTypes[i].nPhiMissingBins());
382  }
383 #ifdef DebugLog
384  edm::LogInfo ("HCalGeom") << "HcalDDDRecConstants:numberOfCells "
385  << cellTypes.size() << " " << num
386  << " for subdetector " << subdet;
387 #endif
388  return num;
389  } else {
390  return hcons.numberOfCells(subdet);
391  }
392 }
int i
Definition: DBlmapReader.cc:9
unsigned int numberOfCells(HcalSubdetector) const
std::vector< HcalCellType > HcalCellTypes(HcalSubdetector) const
const HcalDDDSimConstants & hcons

Member Data Documentation

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

Definition at line 101 of file HcalDDDRecConstants.h.

Referenced by HcalCellTypes(), and initialize().

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

Definition at line 102 of file HcalDDDRecConstants.h.

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

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

Definition at line 108 of file HcalDDDRecConstants.h.

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

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

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

Referenced by getHCID(), and initialize().

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

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

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

int HcalDDDRecConstants::nHalves[2]
private

Definition at line 110 of file HcalDDDRecConstants.h.

Referenced by initialize(), and numberOfCells().

int HcalDDDRecConstants::nModule[2]
private

Definition at line 110 of file HcalDDDRecConstants.h.

Referenced by getEtaBins(), and initialize().

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

Definition at line 107 of file HcalDDDRecConstants.h.

Referenced by getHCID(), and initialize().