26 std::vector<int>
const& iphi,
27 std::vector<int>
const& ieta,
28 std::vector<int>
const&
layer,
29 std::vector<int>
const&
depth) {
35 iphi_.insert(
iphi_.end(), iphi.begin(), iphi.end());
41 for (
unsigned int k = 0;
k < ieta.size(); ++
k) {
50 for (
unsigned int k1 = 0; k1 < ieta.size(); ++k1) {
51 int ietaMin = ieta[k1];
53 int layMin = layer[k1];
54 int layMax = (k1 + 1 < ieta.size()) ? (layer[k1 + 1] - 1) :
maxLayers_;
55 for (
unsigned int k2 = k1 + 1;
k2 < ieta.size(); ++
k2) {
56 if (ieta[
k2] > ieta[k1]) {
57 ietaMax = ieta[
k2] - 1;
63 for (
int eta = ietaMin;
eta <= ietaMax; ++
eta) {
66 for (
int lay = layMin; lay <= layMax; ++lay)
71 int dmin(99), dmax(-1);
73 if ((itr.first).first ==
eta) {
74 if ((itr.second) < dmin)
76 if ((itr.second) > dmax)
89 std::ostringstream st1;
93 for (
unsigned int k = 0;
k <
iphi_.size(); ++
k)
98 edm::LogVerbatim(
"HCalGeom") <<
"iEta " << (itr->first).
first <<
" Layer " << (itr->first).second <<
" Depth "
102 edm::LogVerbatim(
"HCalGeom") <<
"iEta " << (itr->first).
first <<
" Depth " << (itr->first).second <<
" Layer "
106 edm::LogVerbatim(
"HCalGeom") <<
"iEta " << (itr->first).
first <<
" Depth " << (itr->first).second <<
" Layer "
109 for (std::map<
int, std::pair<int, int> >::iterator itr =
depthsEta_.begin(); itr !=
depthsEta_.end(); ++itr)
111 << (itr->second).second;
116 const int subdet,
const int ieta,
const int iphi,
const int zside,
const int layer)
const {
118 if (
isValid(subdet, iphi, zside)) {
119 std::map<std::pair<int, int>,
int>::const_iterator itr =
layer2Depth_.find(std::pair<int, int>(ieta, layer));
124 edm::LogVerbatim(
"HCalGeom") <<
"Debug Info -- getDepth::Input " << subdet <<
":" << ieta <<
":" << iphi <<
":"
125 << zside <<
":" << layer <<
" Output " <<
depth;
132 if (
isValid(subdet, iphi, zside))
135 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getDepth16::Input " << subdet <<
":" << iphi <<
":" << zside
136 <<
" Output " <<
depth;
144 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getDepthMin::Input " << subdet <<
":" << iphi <<
":" << zside
145 <<
" Output " <<
depth;
153 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getDepthMax::Input " << subdet <<
":" << iphi <<
":" << zside
154 <<
" Output " <<
depth;
162 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getDepthMax::Input " << subdet <<
":" << iphi <<
":" << zside
163 <<
" Output " <<
depth;
169 std::map<int, std::pair<int, int> >::const_iterator itr =
depthsEta_.find(eta);
171 return std::pair<int, int>(-1, -1);
177 const int subdet,
const int ieta,
const int iphi,
const int zside,
const int depth)
const {
179 if (
isValid(subdet, iphi, zside)) {
180 std::map<std::pair<int, int>,
int>::const_iterator itr =
depth2LayerF_.find(std::pair<int, int>(ieta, depth));
185 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getLayerFront::Input " << subdet <<
":" << ieta <<
":" << iphi <<
":"
186 << zside <<
":" << depth <<
" Output " <<
layer;
192 const int subdet,
const int ieta,
const int iphi,
const int zside,
const int depth)
const {
194 if (
isValid(subdet, iphi, zside)) {
195 std::map<std::pair<int, int>,
int>::const_iterator itr =
depth2LayerB_.find(std::pair<int, int>(ieta, depth));
200 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getLayerBack::Input " << subdet <<
":" << ieta <<
":" << iphi <<
":"
201 << zside <<
":" << depth <<
" Output " <<
layer;
207 const int subdet,
const int eta,
const int phi,
const int zside, std::map<int, int>&
layers)
const {
209 if (
isValid(subdet, phi, zside)) {
211 if ((itr.first).first == eta) {
212 layers[((itr.first).
second) + 1] = (itr.second);
217 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getLayerDepth::Input " << subdet <<
":" << eta <<
":" << phi <<
":"
218 << zside <<
" Output " << layers.size() <<
" entries";
219 std::ostringstream st1;
220 for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
221 st1 <<
" [" << itr->first <<
"] " << itr->second;
230 if ((itr.first).first == eta) {
231 layers[((itr.first).
second) + 1] = (itr.second);
236 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getLayerDepth::Input " << eta <<
" Output " << layers.size()
238 std::ostringstream st1;
239 for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
240 st1 <<
" [" << itr->first <<
"] " << itr->second;
248 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getMaxDepthLastHE::Input " << subdet <<
":" << iphi <<
":" << zside
249 <<
" Output " <<
depth;
257 edm::LogVerbatim(
"HCalGeom") <<
"Debug info -- getLayer0Wt::Input " << subdet <<
":" << iphi <<
":" << zside
265 int kphi = (zside > 0) ? iphi : -iphi;
272 phi.insert(phi.end(),
iphi_.begin(),
iphi_.end());
Log< level::Info, true > LogVerbatim
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
void getLayerDepth(const int subdet, const int ieta, const int iphi, const int zside, std::map< int, int > &layers) const
void initialize(const int subdet, const int ietaMax, const int dep16C, const int dep29C, const double wtl0C, std::vector< int > const &iphi, std::vector< int > const &ieta, std::vector< int > const &layer, std::vector< int > const &depth)
bool isValid(const int det, const int phi, const int zside) const
std::map< std::pair< int, int >, int > depth2LayerB_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::map< std::pair< int, int >, int > layer2Depth_
int getLayerBack(const int subdet, const int ieta, const int iphi, const int zside, const int depth) const
constexpr std::array< uint8_t, layerIndexSize > layer
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)
std::pair< int, int > getDepths(const int eta) const
int validDet(std::vector< int > &phis) const
std::map< int, std::pair< int, int > > depthsEta_
int getMaxDepthLastHE(const int subdet, const int iphi, const int zside) const
int getDepth(const int subdet, const int ieta, const int iphi, const int zside, const int layer) const
std::map< std::pair< int, int >, int > depth2LayerF_
int getDepthMin(const int subdet, const int iphi, const int zside) const
double getLayer0Wt(const int subdet, const int iphi, const int zside) const
int getDepth16(const int subdet, const int iphi, const int zside) const
static const int maxLayers_
int getDepthMax(const int subdet, const int iphi, const int zside) const