25 std::vector<int>
const& iphi,
26 std::vector<int>
const& ieta,
27 std::vector<int>
const&
layer,
28 std::vector<int>
const&
depth) {
34 iphi_.insert(
iphi_.end(), iphi.begin(), iphi.end());
40 for (
unsigned int k = 0;
k < ieta.size(); ++
k) {
49 for (
unsigned int k1 = 0; k1 < ieta.size(); ++k1) {
50 int ietaMin = ieta[k1];
52 int layMin = layer[k1];
53 int layMax = (k1 + 1 < ieta.size()) ? (layer[k1 + 1] - 1) :
maxLayers_;
54 for (
unsigned int k2 = k1 + 1;
k2 < ieta.size(); ++
k2) {
55 if (ieta[
k2] > ieta[k1]) {
56 ietaMax = ieta[
k2] - 1;
62 for (
int eta = ietaMin;
eta <= ietaMax; ++
eta) {
65 for (
int lay = layMin; lay <= layMax; ++lay)
70 int dmin(99), dmax(-1);
72 if ((itr.first).first ==
eta) {
73 if ((itr.second) < dmin)
75 if ((itr.second) > dmax)
91 for (
unsigned int k = 0;
k <
iphi_.size(); ++
k)
95 std::cout <<
"iEta " << (itr->first).first <<
" Layer " << (itr->first).
second <<
" Depth " << itr->second
99 std::cout <<
"iEta " << (itr->first).first <<
" Depth " << (itr->first).
second <<
" Layer " << itr->second
103 std::cout <<
"iEta " << (itr->first).first <<
" Depth " << (itr->first).
second <<
" Layer " << itr->second
106 for (std::map<
int, std::pair<int, int> >::iterator itr =
depthsEta_.begin(); itr !=
depthsEta_.end(); ++itr)
107 std::cout <<
"iEta " << itr->first <<
" Depths " << (itr->second).first <<
":" << (itr->second).
second << std::endl;
112 const int subdet,
const int ieta,
const int iphi,
const int zside,
const int layer)
const {
114 if (
isValid(subdet, iphi, zside)) {
115 std::map<std::pair<int, int>,
int>::const_iterator itr =
layer2Depth_.find(std::pair<int, int>(ieta, layer));
120 std::cout <<
"getDepth::Input " << subdet <<
":" << ieta <<
":" << iphi <<
":" << zside <<
":" << layer <<
" Output "
121 << depth << std::endl;
128 if (
isValid(subdet, iphi, zside))
131 std::cout <<
"getDepth16::Input " << subdet <<
":" << iphi <<
":" << zside <<
" Output " << depth << std::endl;
139 std::cout <<
"getDepthMin::Input " << subdet <<
":" << iphi <<
":" << zside <<
" Output " << depth << std::endl;
147 std::cout <<
"getDepthMax::Input " << subdet <<
":" << iphi <<
":" << zside <<
" Output " << depth << std::endl;
155 std::cout <<
"getDepthMax::Input " << subdet <<
":" << iphi <<
":" << zside <<
" Output " << depth << std::endl;
161 std::map<int, std::pair<int, int> >::const_iterator itr =
depthsEta_.find(eta);
163 return std::pair<int, int>(-1, -1);
169 const int subdet,
const int ieta,
const int iphi,
const int zside,
const int depth)
const {
171 if (
isValid(subdet, iphi, zside)) {
172 std::map<std::pair<int, int>,
int>::const_iterator itr =
depth2LayerF_.find(std::pair<int, int>(ieta, depth));
177 std::cout <<
"getLayerFront::Input " << subdet <<
":" << ieta <<
":" << iphi <<
":" << zside <<
":" << depth
178 <<
" Output " << layer << std::endl;
184 const int subdet,
const int ieta,
const int iphi,
const int zside,
const int depth)
const {
186 if (
isValid(subdet, iphi, zside)) {
187 std::map<std::pair<int, int>,
int>::const_iterator itr =
depth2LayerB_.find(std::pair<int, int>(ieta, depth));
192 std::cout <<
"getLayerBack::Input " << subdet <<
":" << ieta <<
":" << iphi <<
":" << zside <<
":" << depth
193 <<
" Output " << layer << std::endl;
199 const int subdet,
const int eta,
const int phi,
const int zside, std::map<int, int>&
layers)
const {
201 if (
isValid(subdet, phi, zside)) {
203 if ((itr.first).first == eta) {
204 layers[((itr.first).
second) + 1] = (itr.second);
209 std::cout <<
"getLayerDepth::Input " << subdet <<
":" << eta <<
":" << phi <<
":" << zside <<
" Output "
210 << layers.size() <<
" entries\n";
211 for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
212 std::cout <<
" [" << itr->first <<
"] " << itr->second;
221 if ((itr.first).first == eta) {
222 layers[((itr.first).
second) + 1] = (itr.second);
227 std::cout <<
"getLayerDepth::Input " << eta <<
" Output " << layers.size() <<
" entries\n";
228 for (std::map<int, int>::iterator itr = layers.begin(); itr != layers.end(); ++itr)
229 std::cout <<
" [" << itr->first <<
"] " << itr->second;
237 std::cout <<
"getMaxDepthLastHE::Input " << subdet <<
":" << iphi <<
":" << zside <<
" Output " << depth << std::endl;
245 std::cout <<
"getLayer0Wt::Input " << subdet <<
":" << iphi <<
":" << zside <<
" Output " << wt << std::endl;
252 int kphi = (zside > 0) ? iphi : -iphi;
259 phi.insert(phi.end(),
iphi_.begin(),
iphi_.end());
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