17 << dets.size() <<
" cells";
23 for (
unsigned int i1 = 0;
i1 < vdetS.size();
i1++) {
24 if (
std::count(vdetN.begin(), vdetN.end(), vdetS[
i1]) == 0)
25 vdetN.push_back(vdetS[
i1]);
31 edm::LogVerbatim(
"IsoTrack") <<
"matrixHCALIds::Total number of cells found is " << vdetS.size();
46 std::vector<DetId> dets, vdetx;
48 int ietaphi = (
int)(
dR / 15.0) + 1;
50 for (
unsigned int i = 0;
i < vdets.size(); ++
i) {
54 vdetx.push_back(vdets[
i]);
59 edm::LogVerbatim(
"IsoTrack") <<
"matrixHCALIds::Final List of cells for dR " <<
dR <<
" is with " << vdetx.size()
60 <<
" from original list of " << vdets.size() <<
" cells";
75 edm::LogVerbatim(
"IsoTrack") <<
"matrixHCALIds::Add " << ietaE <<
"|" << ietaW <<
" rows and " << iphiN <<
"|" 76 << iphiS <<
" columns of cells for " << dets.size() <<
" cells";
80 std::vector<DetId> vdetN =
spr::newHCALIdNS(dets, 0, topology,
true, ietaE, ietaW, iphiN, iphiS,
debug);
81 std::vector<DetId> vdetS =
spr::newHCALIdNS(dets, 0, topology,
false, ietaE, ietaW, iphiN, iphiS,
debug);
82 for (
unsigned int i1 = 0;
i1 < vdetS.size();
i1++) {
83 if (
std::count(vdetN.begin(), vdetN.end(), vdetS[
i1]) == 0)
84 vdetN.push_back(vdetS[
i1]);
90 edm::LogVerbatim(
"IsoTrack") <<
"matrixHCALIds::Total number of cells found is " << vdetS.size();
104 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::Add " <<
iphi <<
" columns of cells along " << shiftNorth <<
" for " 105 << (dets.size() -
last) <<
" cells";
109 std::vector<DetId> vdets;
110 vdets.insert(vdets.end(), dets.begin(), dets.end());
111 std::vector<DetId> vdetE, vdetW;
115 for (
unsigned int i1 = 0;
i1 < vdetW.size();
i1++) {
116 if (
std::count(vdets.begin(), vdets.end(), vdetW[
i1]) == 0)
117 vdets.push_back(vdetW[
i1]);
119 for (
unsigned int i1 = 0;
i1 < vdetE.size();
i1++) {
120 if (
std::count(vdets.begin(), vdets.end(), vdetE[
i1]) == 0)
121 vdets.push_back(vdetE[
i1]);
125 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::With Added cells along E/W results a set of " 126 << (vdets.size() - dets.size()) <<
" new cells";
130 unsigned int last0 = vdets.size();
132 std::vector<DetId> vdetnew;
133 for (
unsigned int i1 =
last;
i1 < dets.size();
i1++) {
134 std::vector<DetId> vdet;
136 vdet = topology->
north(dets[
i1]);
138 vdet = topology->
south(dets[
i1]);
139 for (
unsigned int i2 = 0;
i2 < vdet.size();
i2++) {
140 if (
std::count(vdets.begin(), vdets.end(), vdet[
i2]) == 0)
141 vdetnew.push_back(vdet[
i2]);
147 for (
unsigned int i2 = 0;
i2 < vdetW.size();
i2++) {
148 if (
std::count(vdets.begin(), vdets.end(), vdetW[
i2]) == 0 &&
149 std::count(vdetnew.begin(), vdetnew.end(), vdetW[
i2]) == 0)
150 vdets.push_back(vdetW[
i2]);
152 for (
unsigned int i2 = 0;
i2 < vdetE.size();
i2++) {
153 if (
std::count(vdets.begin(), vdets.end(), vdetE[
i2]) == 0 &&
154 std::count(vdetnew.begin(), vdetnew.end(), vdetE[
i2]) == 0)
155 vdets.push_back(vdetE[
i2]);
158 vdets.insert(vdets.end(), vdetnew.begin(), vdetnew.end());
161 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::Addition results a set of " << (vdets.size() - last0)
173 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::Final list consists of " << vdets.size() <<
" cells";
190 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::Add " << iphiN <<
"|" << iphiS <<
" columns of cells along " 191 << shiftNorth <<
" for " << (dets.size() -
last) <<
" cells";
195 std::vector<DetId> vdets;
196 vdets.insert(vdets.end(), dets.begin(), dets.end());
197 std::vector<DetId> vdetE, vdetW;
201 for (
unsigned int i1 = 0;
i1 < vdetW.size();
i1++) {
202 if (
std::count(vdets.begin(), vdets.end(), vdetW[
i1]) == 0)
203 vdets.push_back(vdetW[
i1]);
205 for (
unsigned int i1 = 0;
i1 < vdetE.size();
i1++) {
206 if (
std::count(vdets.begin(), vdets.end(), vdetE[
i1]) == 0)
207 vdets.push_back(vdetE[
i1]);
211 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::With Added cells along E/W results a set of " 212 << (vdets.size() - dets.size()) <<
" new cells";
216 unsigned int last0 = vdets.size();
221 std::vector<DetId> vdetnew;
222 for (
unsigned int i1 =
last;
i1 < dets.size();
i1++) {
223 std::vector<DetId> vdet;
225 vdet = topology->
north(dets[
i1]);
227 vdet = topology->
south(dets[
i1]);
228 for (
unsigned int i2 = 0;
i2 < vdet.size();
i2++) {
229 if (
std::count(vdets.begin(), vdets.end(), vdet[
i2]) == 0)
230 vdetnew.push_back(vdet[
i2]);
236 for (
unsigned int i2 = 0;
i2 < vdetW.size();
i2++) {
237 if (
std::count(vdets.begin(), vdets.end(), vdetW[
i2]) == 0 &&
238 std::count(vdetnew.begin(), vdetnew.end(), vdetW[
i2]) == 0)
239 vdets.push_back(vdetW[
i2]);
241 for (
unsigned int i2 = 0;
i2 < vdetE.size();
i2++) {
242 if (
std::count(vdets.begin(), vdets.end(), vdetE[
i2]) == 0 &&
243 std::count(vdetnew.begin(), vdetnew.end(), vdetE[
i2]) == 0)
244 vdets.push_back(vdetE[
i2]);
247 vdets.insert(vdets.end(), vdetnew.begin(), vdetnew.end());
250 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::Addition results a set of " << (vdets.size() - last0)
266 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdNS::Final list consists of " << vdets.size() <<
" cells";
276 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdEW::Add " <<
ieta <<
" rows of cells along " << shiftEast <<
" for " 277 << (dets.size() -
last) <<
" cells";
281 std::vector<DetId> vdets;
282 vdets.insert(vdets.end(), dets.begin(), dets.end());
284 for (
unsigned int i1 =
last;
i1 < dets.size();
i1++) {
285 std::vector<DetId> vdet;
287 vdet = topology->
east(dets[
i1]);
289 vdet = topology->
west(dets[
i1]);
290 for (
unsigned int i2 = 0;
i2 < vdet.size();
i2++) {
291 if (
std::count(vdets.begin(), vdets.end(), vdet[
i2]) == 0)
292 vdets.push_back(vdet[
i2]);
299 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdEW::Addition results a set of " << (vdets.size() - dets.size())
308 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdEW::Final list (EW) consists of " << vdets.size() <<
" cells";
323 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdEW::Add " << ietaE <<
"|" << ietaW <<
" rows of cells along " 324 << shiftEast <<
" for " << (dets.size() -
last) <<
" cells";
331 std::vector<DetId> vdets;
332 vdets.insert(vdets.end(), dets.begin(), dets.end());
334 for (
unsigned int i1 =
last;
i1 < dets.size();
i1++) {
335 std::vector<DetId> vdet;
337 vdet = topology->
east(dets[
i1]);
339 vdet = topology->
west(dets[
i1]);
340 for (
unsigned int i2 = 0;
i2 < vdet.size();
i2++) {
341 if (
std::count(vdets.begin(), vdets.end(), vdet[
i2]) == 0)
342 vdets.push_back(vdet[
i2]);
353 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdEW::Addition results a set of " << (vdets.size() - dets.size())
363 edm::LogVerbatim(
"IsoTrack") <<
"newHCALIdEW::Final list (EW) consists of " << vdets.size() <<
" cells";
375 edm::LogVerbatim(
"IsoTrack") <<
"matrixHCALIdsDepth::Add cells with higher depths with HO" 376 <<
"Flag set to " << includeHO <<
" to existing " << dets.size() <<
" cells";
379 std::vector<DetId> vdets(dets);
380 for (
unsigned int i1 = 0;
i1 < dets.size();
i1++) {
382 for (
int idepth = 0; idepth < 3; idepth++) {
383 std::vector<DetId> vUpDetId = topology->
up(vdet);
384 if (!vUpDetId.empty()) {
385 if (includeHO || vUpDetId[0].subdetId() != (
int)(
HcalOuter)) {
386 int n =
std::count(vdets.begin(), vdets.end(), vUpDetId[0]);
390 <<
"matrixHCALIdsDepth:: Depth " << idepth <<
" " << vdet <<
" " << (
HcalDetId)vUpDetId[0];
391 vdets.push_back(vUpDetId[0]);
400 edm::LogVerbatim(
"IsoTrack") <<
"matrixHCALIdsDepth::Final list contains " << vdets.size() <<
" cells";
std::vector< DetId > newHCALIdNS(std::vector< DetId > &dets, unsigned int last, const HcalTopology *topology, bool shiftNorth, int ieta, int iphi, bool debug=false)
Log< level::Info, true > LogVerbatim
double getDistInPlaneTrackDir(const GlobalPoint &caloPoint, const GlobalVector &caloVector, const GlobalPoint &rechitPoint, bool debug=false)
std::vector< DetId > south(const DetId &id) const override
void debugHcalDets(unsigned int, std::vector< DetId > &)
std::vector< DetId > up(const DetId &id) const override
std::vector< DetId > east(const DetId &id) const override
std::vector< DetId > north(const DetId &id) const override
std::vector< DetId > matrixHCALIdsDepth(std::vector< DetId > &dets, const HcalTopology *topology, bool includeHO=false, bool debug=false)
std::vector< DetId > matrixHCALIds(std::vector< DetId > &dets, const HcalTopology *topology, int ieta, int iphi, bool includeHO=false, bool debug=false)
std::vector< DetId > west(const DetId &id) const override
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
std::vector< DetId > newHCALIdEW(std::vector< DetId > &dets, unsigned int last, const HcalTopology *topology, bool shiftEast, int ieta, bool debug=false)