52 int previousLinkStrip;
54 std::vector<StripCompactDigiSimLinks::key_type> thisStripSignals;
55 std::vector<StripCompactDigiSimLinks::key_type> previousStripSignals;
57 for (
auto const &det : *src) {
58 DEBUG(
std::cerr <<
"\n\nProcessing detset " << det.detId() <<
", size = " << det.size() << std::endl;)
61 previousLinkStrip = -2;
63 thisStripSignals.clear();
64 previousStripSignals.clear();
66 DEBUG(
std::cerr <<
" processing digiSimLink on strip " << it->channel() <<
" left by particle " 67 << it->SimTrackId() <<
", event " << it->eventId().rawId() << std::endl;)
68 if (
int(it->channel()) != previousLinkStrip) {
69 previousStrip = previousLinkStrip;
71 swap(thisStripSignals, previousStripSignals);
72 thisStripSignals.clear();
74 DEBUG(
std::cerr <<
" previous strip " << previousStrip <<
", previous link strip " << previousLinkStrip
83 bool alreadyClusterized =
false;
84 if (
int(it->channel()) == previousStrip + 1) {
86 if (
std::find(previousStripSignals.begin(), previousStripSignals.end(),
key) != previousStripSignals.end()) {
87 alreadyClusterized =
true;
91 if (!alreadyClusterized) {
93 unsigned int size = 1;
94 int myLastStrip = it->channel();
96 DEBUG(
std::cerr <<
" digiSimLink on strip " << it2->channel() <<
" left by particle " << it2->SimTrackId()
97 <<
", event " << it2->eventId().rawId() << std::endl;)
99 DEBUG(
std::cerr <<
" found hole of size " << (it2->channel() - myLastStrip) <<
", stopping." 103 if ((it2->eventId() ==
key.first) && (it2->SimTrackId() ==
key.second)) {
106 myLastStrip = it2->channel();
111 if (
int(it->channel()) != previousLinkStrip) {
112 previousLinkStrip = it->channel();
114 thisStripSignals.push_back(
key);
115 DEBUG(
std::cerr <<
" ending state " << previousStrip <<
", previous link strip " << previousLinkStrip
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::pair< EncodedEventId, unsigned int > key_type
void insert(const key_type &key, const HitRecord &record)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void swap(Association< C > &lhs, Association< C > &rhs)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const