9 minBX_ =
gemRecHit.getParameter<
int>(
"minBX");
10 maxBX_ =
gemRecHit.getParameter<
int>(
"maxBX");
11 verbose_ =
gemRecHit.getParameter<
int>(
"verbose");
20 gemDigiMatcher_->init(
iEvent, iSetup);
22 iEvent.getByToken(gemRecHitToken_, gemRecHitH_);
25 if (gem_geom_.isValid()) {
26 gemGeometry_ = &*gem_geom_;
28 std::cout <<
"+++ Info: GEM geometry is unavailable. +++\n";
35 gemDigiMatcher_->match(
t,
v);
46 const auto& det_ids = gemDigiMatcher_->detIdsDigi();
49 for (
auto id : det_ids) {
51 const auto& hit_digis = gemDigiMatcher_->stripNumbersInDetId(
id);
53 cout <<
"hit_digis_fat ";
54 copy(hit_digis.begin(), hit_digis.end(), ostream_iterator<int>(
cout,
" "));
59 const auto& rechits_in_det =
rechits.get(p_id);
61 for (
auto d = rechits_in_det.first;
d != rechits_in_det.second; ++
d) {
63 cout <<
"recHit " << p_id <<
" " << *
d << endl;
66 if (
d->BunchX() < minBX_ ||
d->BunchX() > maxBX_)
69 int firstStrip =
d->firstClusterStrip();
70 int cls =
d->clusterSize();
71 bool stripFound =
false;
74 for (
int i = firstStrip;
i < (firstStrip + cls);
i++) {
75 if (hit_digis.find(
i) != hit_digis.end())
83 cout <<
"oki" << endl;
85 recHits_.push_back(*
d);
86 detid_to_recHits_[
id].push_back(*
d);
94 std::set<unsigned int>
result;
95 for (
const auto&
p : detid_to_recHits_)
101 std::set<unsigned int>
result;
102 for (
const auto&
p : chamber_to_recHits_)
108 std::set<unsigned int>
result;
109 for (
const auto&
p : superchamber_to_recHits_)
115 if (detid_to_recHits_.find(detid) == detid_to_recHits_.end())
117 return detid_to_recHits_.at(detid);
121 if (chamber_to_recHits_.find(detid) == chamber_to_recHits_.end())
123 return chamber_to_recHits_.at(detid);
127 if (superchamber_to_recHits_.find(detid) == superchamber_to_recHits_.end())
129 return superchamber_to_recHits_.at(detid);
134 for (
const auto&
d : recHitsInSuperChamber(detid)) {
135 layers.insert(
d.gemId().layer());
142 for (
const auto&
d : recHitsInDetId(detid)) {
144 for (
int iStrip =
d.firstClusterStrip(); iStrip <
d.firstClusterStrip() +
d.clusterSize(); ++iStrip) {
154 for (
auto id : detIds()) {
164 return gemGeometry_->idToDet(idd)->surface().toGlobal(lp);
172 float sumx, sumy, sumz;
173 sumx = sumy = sumz = 0.f;
175 for (
const auto&
d : rechit) {
177 if (
gp == point_zero)
192 for (
const auto& thisRH :
c)
193 if (areGEMRecHitSame(thisRH, rh))
199 return recHitInContainer(thisRh,
recHits());
203 return l.localPosition() ==
r.localPosition() and
l.BunchX() ==
r.BunchX();