CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
GEMDigiMatcher Class Reference

#include <GEMDigiMatcher.h>

Public Member Functions

std::set< unsigned int > chamberIds () const
 
std::set< unsigned int > chamberIdsWithPads () const
 
std::set< int > coPadNumbersInDetId (unsigned int) const
 
const DigiContainercoPadsInDetId (unsigned int) const
 
const DigiContainercoPadsInSuperChamber (unsigned int) const
 
std::set< unsigned int > detIds () const
 
std::set< unsigned int > detIdsWithCoPads () const
 
const DigiContainerdigisInChamber (unsigned int) const
 
const DigiContainerdigisInDetId (unsigned int) const
 
const DigiContainerdigisInSuperChamber (unsigned int) const
 
 GEMDigiMatcher (const SimHitMatcher &sh, const edm::Event &, const GEMGeometry &geom, const edm::ParameterSet &cfg, edm::EDGetToken &, edm::EDGetToken &, edm::EDGetToken &)
 
int nCoPads () const
 How many coincidence pads in GEM did this simtrack get in total? More...
 
int nLayersWithDigisInSuperChamber (unsigned int) const
 
int nLayersWithPadsInSuperChamber (unsigned int) const
 
int nPads () const
 How many pads in GEM did this simtrack get in total? More...
 
std::set< int > padNumbersInDetId (unsigned int) const
 
const DigiContainerpadsInChamber (unsigned int) const
 
const DigiContainerpadsInDetId (unsigned int) const
 
const DigiContainerpadsInSuperChamber (unsigned int) const
 
std::set< int > partitionNumbers () const
 
std::set< int > partitionNumbersWithCoPads () const
 
std::set< int > stripNumbersInDetId (unsigned int) const
 
std::set< unsigned int > superChamberIds () const
 
std::set< unsigned int > superChamberIdsWithCoPads () const
 
std::set< unsigned int > superChamberIdsWithPads () const
 
 ~GEMDigiMatcher ()
 

Private Types

using DigiContainer = matching::DigiContainer
 

Private Member Functions

void init (const edm::Event &)
 
void matchCoPadsToSimTrack (const GEMCoPadDigiCollection &co_pads)
 
void matchDigisToSimTrack (const GEMDigiCollection &digis)
 
void matchPadsToSimTrack (const GEMPadDigiCollection &pads)
 

Private Attributes

std::map< unsigned int, DigiContainerchamber_to_copads_
 
std::map< unsigned int, DigiContainerchamber_to_digis_
 
std::map< unsigned int, DigiContainerchamber_to_pads_
 
std::map< unsigned int, DigiContainerdetid_to_copads_
 
std::map< unsigned int, DigiContainerdetid_to_digis_
 
std::map< unsigned int, DigiContainerdetid_to_pads_
 
edm::Handle< GEMCoPadDigiCollectiongem_co_pads_
 
edm::Handle< GEMDigiCollectiongem_digis_
 
const GEMGeometrygem_geo_
 
edm::Handle< GEMPadDigiCollectiongem_pads_
 
int matchDeltaStrip_
 
int maxBXGEM_
 
int minBXGEM_
 
const DigiContainer no_digis_
 
const SimHitMatchersimhit_matcher_
 
std::map< unsigned int, DigiContainersuperchamber_to_copads_
 
std::map< unsigned int, DigiContainersuperchamber_to_digis_
 
std::map< unsigned int, DigiContainersuperchamber_to_pads_
 
bool verbose_
 

Detailed Description

Definition at line 34 of file GEMDigiMatcher.h.

Member Typedef Documentation

Definition at line 35 of file GEMDigiMatcher.h.

Constructor & Destructor Documentation

GEMDigiMatcher::GEMDigiMatcher ( const SimHitMatcher sh,
const edm::Event e,
const GEMGeometry geom,
const edm::ParameterSet cfg,
edm::EDGetToken gem_digiToken,
edm::EDGetToken gem_padToken,
edm::EDGetToken gem_copadToken 
)

Definition at line 10 of file GEMDigiMatcher.cc.

References gem_co_pads_, gem_digis_, gem_pads_, edm::Event::getByToken(), edm::ParameterSet::getUntrackedParameter(), init(), edm::HandleBase::isValid(), matchDeltaStrip_, maxBXGEM_, minBXGEM_, and verbose_.

17  : simhit_matcher_(sh), gem_geo_(geom) {
18  minBXGEM_ = cfg.getUntrackedParameter<int>("minBXGEM", -1);
19  maxBXGEM_ = cfg.getUntrackedParameter<int>("maxBXGEM", 1);
20 
21  matchDeltaStrip_ = cfg.getUntrackedParameter<int>("matchDeltaStripGEM", 1);
22 
23  // setVerbose(cfg.getUntrackedParameter<int>("verboseGEMDigi", 0));
24  verbose_ = false;
25 
26  e.getByToken(gem_digiToken, gem_digis_);
27  e.getByToken(gem_padToken, gem_pads_);
28  e.getByToken(gem_copadToken, gem_co_pads_);
29  if (!gem_digis_.isValid())
30  return;
31 
32  init(e);
33 }
T getUntrackedParameter(std::string const &, T const &) const
const SimHitMatcher & simhit_matcher_
edm::Handle< GEMPadDigiCollection > gem_pads_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::Handle< GEMDigiCollection > gem_digis_
const GEMGeometry & gem_geo_
bool isValid() const
Definition: HandleBase.h:74
edm::Handle< GEMCoPadDigiCollection > gem_co_pads_
void init(const edm::Event &)
GEMDigiMatcher::~GEMDigiMatcher ( )

Definition at line 35 of file GEMDigiMatcher.cc.

35 {}

Member Function Documentation

std::set< unsigned int > GEMDigiMatcher::chamberIds ( ) const

Definition at line 160 of file GEMDigiMatcher.cc.

References chamber_to_digis_, AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

Referenced by GEMDigiTrackMatch::analyze().

160  {
161  std::set<unsigned int> result;
162  for (auto &p : chamber_to_digis_)
163  result.insert(p.first);
164  return result;
165 }
std::map< unsigned int, DigiContainer > chamber_to_digis_
std::set< unsigned int > GEMDigiMatcher::chamberIdsWithPads ( ) const

Definition at line 166 of file GEMDigiMatcher.cc.

References chamber_to_pads_, AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

Referenced by GEMDigiTrackMatch::analyze().

166  {
167  std::set<unsigned int> result;
168  for (auto &p : chamber_to_pads_)
169  result.insert(p.first);
170  return result;
171 }
std::map< unsigned int, DigiContainer > chamber_to_pads_
std::set< int > GEMDigiMatcher::coPadNumbersInDetId ( unsigned int  detid) const

Definition at line 301 of file GEMDigiMatcher.cc.

References coPadsInDetId(), edmIntegrityCheck::d, matching::digi_channel(), and mps_fire::result.

301  {
302  set<int> result;
303  auto digis = coPadsInDetId(detid);
304  for (auto &d : digis) {
305  result.insert(digi_channel(d));
306  }
307  return result;
308 }
const DigiContainer & coPadsInDetId(unsigned int) const
int digi_channel(const Digi &d)
Definition: GenericDigi.h:67
const matching::DigiContainer & GEMDigiMatcher::coPadsInDetId ( unsigned int  detid) const

Definition at line 233 of file GEMDigiMatcher.cc.

References detid_to_copads_, and no_digis_.

Referenced by coPadNumbersInDetId().

233  {
234  if (detid_to_copads_.find(detid) == detid_to_copads_.end())
235  return no_digis_;
236  return detid_to_copads_.at(detid);
237 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > detid_to_copads_
const matching::DigiContainer & GEMDigiMatcher::coPadsInSuperChamber ( unsigned int  detid) const

Definition at line 239 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_copads_.

Referenced by nCoPads().

239  {
240  if (superchamber_to_copads_.find(detid) == superchamber_to_copads_.end())
241  return no_digis_;
242  return superchamber_to_copads_.at(detid);
243 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > superchamber_to_copads_
std::set< unsigned int > GEMDigiMatcher::detIds ( void  ) const

Definition at line 153 of file GEMDigiMatcher.cc.

References detid_to_digis_, AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

Referenced by partitionNumbers().

153  {
154  std::set<unsigned int> result;
155  for (auto &p : detid_to_digis_)
156  result.insert(p.first);
157  return result;
158 }
std::map< unsigned int, DigiContainer > detid_to_digis_
std::set< unsigned int > GEMDigiMatcher::detIdsWithCoPads ( ) const

Definition at line 190 of file GEMDigiMatcher.cc.

References detid_to_copads_, AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

Referenced by partitionNumbersWithCoPads().

190  {
191  std::set<unsigned int> result;
192  for (auto &p : detid_to_copads_)
193  result.insert(p.first);
194  return result;
195 }
std::map< unsigned int, DigiContainer > detid_to_copads_
const matching::DigiContainer & GEMDigiMatcher::digisInChamber ( unsigned int  detid) const

Definition at line 203 of file GEMDigiMatcher.cc.

References chamber_to_digis_, and no_digis_.

203  {
204  if (chamber_to_digis_.find(detid) == chamber_to_digis_.end())
205  return no_digis_;
206  return chamber_to_digis_.at(detid);
207 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > chamber_to_digis_
const matching::DigiContainer & GEMDigiMatcher::digisInDetId ( unsigned int  detid) const

Definition at line 197 of file GEMDigiMatcher.cc.

References detid_to_digis_, and no_digis_.

Referenced by stripNumbersInDetId().

197  {
198  if (detid_to_digis_.find(detid) == detid_to_digis_.end())
199  return no_digis_;
200  return detid_to_digis_.at(detid);
201 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > detid_to_digis_
const matching::DigiContainer & GEMDigiMatcher::digisInSuperChamber ( unsigned int  detid) const

Definition at line 209 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_digis_.

Referenced by nLayersWithDigisInSuperChamber().

209  {
210  if (superchamber_to_digis_.find(detid) == superchamber_to_digis_.end())
211  return no_digis_;
212  return superchamber_to_digis_.at(detid);
213 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > superchamber_to_digis_
void GEMDigiMatcher::init ( const edm::Event e)
private

Definition at line 37 of file GEMDigiMatcher.cc.

References gem_co_pads_, gem_digis_, gem_pads_, edm::HandleBase::isValid(), matchCoPadsToSimTrack(), matchDigisToSimTrack(), matchPadsToSimTrack(), and edm::Handle< T >::product().

Referenced by GEMDigiMatcher().

37  {
39  if (gem_pads_.isValid())
41  if (gem_co_pads_.isValid())
43 }
edm::Handle< GEMPadDigiCollection > gem_pads_
void matchPadsToSimTrack(const GEMPadDigiCollection &pads)
edm::Handle< GEMDigiCollection > gem_digis_
void matchDigisToSimTrack(const GEMDigiCollection &digis)
bool isValid() const
Definition: HandleBase.h:74
T const * product() const
Definition: Handle.h:74
edm::Handle< GEMCoPadDigiCollection > gem_co_pads_
void matchCoPadsToSimTrack(const GEMCoPadDigiCollection &co_pads)
void GEMDigiMatcher::matchCoPadsToSimTrack ( const GEMCoPadDigiCollection co_pads)
private

Definition at line 122 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), detid_to_copads_, SimHitMatcher::detIdsGEMCoincidences(), matching::GEM_COPAD, SimHitMatcher::hitCoPadsInDetId(), triggerObjects_cff::id, matching::make_digi(), maxBXGEM_, minBXGEM_, GEMDetId::region(), GEMDetId::ring(), simhit_matcher_, GEMDetId::station(), and superchamber_to_copads_.

Referenced by init().

122  {
123  auto det_ids = simhit_matcher_.detIdsGEMCoincidences();
124  for (auto id : det_ids) {
125  GEMDetId p_id(id);
126  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
127 
128  auto hit_co_pads = simhit_matcher_.hitCoPadsInDetId(id);
129  auto co_pads_in_det = co_pads.get(p_id);
130 
131  for (auto pad = co_pads_in_det.first; pad != co_pads_in_det.second; ++pad) {
132  // check that the pad BX is within the range
133  if (pad->bx(1) < minBXGEM_ || pad->bx(1) > maxBXGEM_)
134  continue;
135  if (pad->bx(2) < minBXGEM_ || pad->bx(2) > maxBXGEM_)
136  continue;
137  // check that it matches a coincidence pad that was hit by SimHits from
138  // our track
139  if (hit_co_pads.find(pad->pad(1)) == hit_co_pads.end())
140  continue;
141  if (hit_co_pads.find(pad->pad(2)) == hit_co_pads.end())
142  continue;
143 
144  auto mydigi = make_digi(id, pad->pad(1), pad->bx(1), GEM_COPAD);
145  // auto mydigi = make_digi(id, pad->pad(2), pad->bx(2), GEM_COPAD); //
146  // FIXIT : Solve duplicate problem.
147  detid_to_copads_[id].push_back(mydigi);
148  superchamber_to_copads_[superch_id()].push_back(mydigi);
149  }
150  }
151 }
const SimHitMatcher & simhit_matcher_
std::map< unsigned int, DigiContainer > superchamber_to_copads_
std::set< unsigned int > detIdsGEMCoincidences() const
std::map< unsigned int, DigiContainer > detid_to_copads_
Digi make_digi()
Definition: GenericDigi.h:46
std::set< int > hitCoPadsInDetId(unsigned int) const
void GEMDigiMatcher::matchDigisToSimTrack ( const GEMDigiCollection digis)
private

Definition at line 45 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), chamber_to_digis_, GEMDetId::chamberId(), popcon2dropbox::copy(), gather_cfg::cout, edmIntegrityCheck::d, detid_to_digis_, SimHitMatcher::detIdsGEM(), matching::GEM_STRIP, SimHitMatcher::hitStripsInDetId(), triggerObjects_cff::id, matching::make_digi(), matchDeltaStrip_, maxBXGEM_, minBXGEM_, DetId::rawId(), GEMDetId::region(), GEMDetId::ring(), simhit_matcher_, GEMDetId::station(), superchamber_to_digis_, and verbose_.

Referenced by init().

45  {
46  auto det_ids = simhit_matcher_.detIdsGEM();
47  for (auto id : det_ids) {
48  GEMDetId p_id(id);
49  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
50 
51  auto hit_strips = simhit_matcher_.hitStripsInDetId(id, matchDeltaStrip_);
52  if (verbose_) {
53  cout << "hit_strips_fat ";
54  copy(hit_strips.begin(), hit_strips.end(), ostream_iterator<int>(cout, " "));
55  cout << endl;
56  }
57 
58  auto digis_in_det = digis.get(GEMDetId(id));
59 
60  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d) {
61  if (verbose_)
62  cout << "gdigi " << p_id << " " << *d << endl;
63  // check that the digi is within BX range
64  if (d->bx() < minBXGEM_ || d->bx() > maxBXGEM_)
65  continue;
66  // check that it matches a strip that was hit by SimHits from our track
67  if (hit_strips.find(d->strip()) == hit_strips.end())
68  continue;
69  if (verbose_)
70  cout << "oki" << endl;
71 
72  auto mydigi = make_digi(id, d->strip(), d->bx(), GEM_STRIP);
73  detid_to_digis_[id].push_back(mydigi);
74  chamber_to_digis_[p_id.chamberId().rawId()].push_back(mydigi);
75  superchamber_to_digis_[superch_id()].push_back(mydigi);
76 
77  // int pad_num = 1 + static_cast<int>( roll->padOfStrip(d->strip()) ); //
78  // d->strip() is int digi_map[ make_pair(pad_num, d->bx()) ].push_back(
79  // d->strip() );
80  }
81  }
82 }
std::set< unsigned int > detIdsGEM() const
GEM partitions&#39; detIds with SimHits.
const SimHitMatcher & simhit_matcher_
def copy(args, dbName)
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
std::map< unsigned int, DigiContainer > chamber_to_digis_
std::map< unsigned int, DigiContainer > detid_to_digis_
std::map< unsigned int, DigiContainer > superchamber_to_digis_
Digi make_digi()
Definition: GenericDigi.h:46
void GEMDigiMatcher::matchPadsToSimTrack ( const GEMPadDigiCollection pads)
private

Definition at line 84 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), chamber_to_pads_, GEMDetId::chamberId(), popcon2dropbox::copy(), gather_cfg::cout, detid_to_pads_, SimHitMatcher::detIdsGEM(), SoftLeptonByDistance_cfi::distance, matching::GEM_PAD, SimHitMatcher::hitPadsInDetId(), triggerObjects_cff::id, matching::make_digi(), maxBXGEM_, minBXGEM_, DetId::rawId(), GEMDetId::region(), GEMDetId::ring(), simhit_matcher_, GEMDetId::station(), superchamber_to_pads_, and verbose_.

Referenced by init().

84  {
85  auto det_ids = simhit_matcher_.detIdsGEM();
86  for (auto id : det_ids) {
87  GEMDetId p_id(id);
88  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
89 
90  auto hit_pads = simhit_matcher_.hitPadsInDetId(id);
91  auto pads_in_det = pads.get(p_id);
92 
93  if (verbose_) {
94  cout << "checkpads " << hit_pads.size() << " " << std::distance(pads_in_det.first, pads_in_det.second)
95  << " hit_pads: ";
96  copy(hit_pads.begin(), hit_pads.end(), ostream_iterator<int>(cout, " "));
97  cout << endl;
98  }
99 
100  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
101  if (verbose_)
102  cout << "chp " << *pad << endl;
103  // check that the pad BX is within the range
104  if (pad->bx() < minBXGEM_ || pad->bx() > maxBXGEM_)
105  continue;
106  if (verbose_)
107  cout << "chp1" << endl;
108  // check that it matches a pad that was hit by SimHits from our track
109  if (hit_pads.find(pad->pad()) == hit_pads.end())
110  continue;
111  if (verbose_)
112  cout << "chp2" << endl;
113 
114  auto mydigi = make_digi(id, pad->pad(), pad->bx(), GEM_PAD);
115  detid_to_pads_[id].push_back(mydigi);
116  chamber_to_pads_[p_id.chamberId().rawId()].push_back(mydigi);
117  superchamber_to_pads_[superch_id()].push_back(mydigi);
118  }
119  }
120 }
std::set< unsigned int > detIdsGEM() const
GEM partitions&#39; detIds with SimHits.
std::map< unsigned int, DigiContainer > detid_to_pads_
const SimHitMatcher & simhit_matcher_
def copy(args, dbName)
std::set< int > hitPadsInDetId(unsigned int) const
std::map< unsigned int, DigiContainer > superchamber_to_pads_
Digi make_digi()
Definition: GenericDigi.h:46
std::map< unsigned int, DigiContainer > chamber_to_pads_
int GEMDigiMatcher::nCoPads ( ) const

How many coincidence pads in GEM did this simtrack get in total?

Definition at line 265 of file GEMDigiMatcher.cc.

References coPadsInSuperChamber(), gen::n, and superChamberIdsWithCoPads().

265  {
266  int n = 0;
267  auto ids = superChamberIdsWithCoPads();
268  for (auto id : ids) {
269  n += coPadsInSuperChamber(id).size();
270  }
271  return n;
272 }
const DigiContainer & coPadsInSuperChamber(unsigned int) const
std::set< unsigned int > superChamberIdsWithCoPads() const
int GEMDigiMatcher::nLayersWithDigisInSuperChamber ( unsigned int  detid) const

Definition at line 245 of file GEMDigiMatcher.cc.

References edmIntegrityCheck::d, matching::digi_id(), digisInSuperChamber(), GEMDetId::layer(), and LayerTriplets::layers().

245  {
246  set<int> layers;
247  auto digis = digisInSuperChamber(detid);
248  for (auto &d : digis) {
249  GEMDetId idd(digi_id(d));
250  layers.insert(idd.layer());
251  }
252  return layers.size();
253 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const DigiContainer & digisInSuperChamber(unsigned int) const
unsigned int digi_id(const Digi &d)
Definition: GenericDigi.h:66
int GEMDigiMatcher::nLayersWithPadsInSuperChamber ( unsigned int  detid) const

Definition at line 255 of file GEMDigiMatcher.cc.

References edmIntegrityCheck::d, matching::digi_id(), GEMDetId::layer(), LayerTriplets::layers(), and padsInSuperChamber().

255  {
256  set<int> layers;
257  auto digis = padsInSuperChamber(detid);
258  for (auto &d : digis) {
259  GEMDetId idd(digi_id(d));
260  layers.insert(idd.layer());
261  }
262  return layers.size();
263 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const DigiContainer & padsInSuperChamber(unsigned int) const
unsigned int digi_id(const Digi &d)
Definition: GenericDigi.h:66
int GEMDigiMatcher::nPads ( ) const

How many pads in GEM did this simtrack get in total?

Definition at line 274 of file GEMDigiMatcher.cc.

References gen::n, padsInSuperChamber(), and superChamberIdsWithPads().

274  {
275  int n = 0;
276  auto ids = superChamberIdsWithPads();
277  for (auto id : ids) {
278  n += padsInSuperChamber(id).size();
279  }
280  return n;
281 }
std::set< unsigned int > superChamberIdsWithPads() const
const DigiContainer & padsInSuperChamber(unsigned int) const
std::set< int > GEMDigiMatcher::padNumbersInDetId ( unsigned int  detid) const

Definition at line 292 of file GEMDigiMatcher.cc.

References edmIntegrityCheck::d, matching::digi_channel(), padsInDetId(), and mps_fire::result.

292  {
293  set<int> result;
294  auto digis = padsInDetId(detid);
295  for (auto &d : digis) {
296  result.insert(digi_channel(d));
297  }
298  return result;
299 }
const DigiContainer & padsInDetId(unsigned int) const
int digi_channel(const Digi &d)
Definition: GenericDigi.h:67
const matching::DigiContainer & GEMDigiMatcher::padsInChamber ( unsigned int  detid) const

Definition at line 221 of file GEMDigiMatcher.cc.

References chamber_to_pads_, and no_digis_.

221  {
222  if (chamber_to_pads_.find(detid) == chamber_to_pads_.end())
223  return no_digis_;
224  return chamber_to_pads_.at(detid);
225 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > chamber_to_pads_
const matching::DigiContainer & GEMDigiMatcher::padsInDetId ( unsigned int  detid) const

Definition at line 215 of file GEMDigiMatcher.cc.

References detid_to_pads_, and no_digis_.

Referenced by padNumbersInDetId().

215  {
216  if (detid_to_pads_.find(detid) == detid_to_pads_.end())
217  return no_digis_;
218  return detid_to_pads_.at(detid);
219 }
std::map< unsigned int, DigiContainer > detid_to_pads_
const DigiContainer no_digis_
const matching::DigiContainer & GEMDigiMatcher::padsInSuperChamber ( unsigned int  detid) const

Definition at line 227 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_pads_.

Referenced by nLayersWithPadsInSuperChamber(), and nPads().

227  {
228  if (superchamber_to_pads_.find(detid) == superchamber_to_pads_.end())
229  return no_digis_;
230  return superchamber_to_pads_.at(detid);
231 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > superchamber_to_pads_
std::set< int > GEMDigiMatcher::partitionNumbers ( ) const

Definition at line 310 of file GEMDigiMatcher.cc.

References detIds(), mps_fire::result, and GEMDetId::roll().

310  {
311  std::set<int> result;
312 
313  auto detids = detIds();
314  for (auto id : detids) {
315  GEMDetId idd(id);
316  result.insert(idd.roll());
317  }
318  return result;
319 }
std::set< unsigned int > detIds() const
std::set< int > GEMDigiMatcher::partitionNumbersWithCoPads ( ) const

Definition at line 321 of file GEMDigiMatcher.cc.

References detIdsWithCoPads(), mps_fire::result, and GEMDetId::roll().

321  {
322  std::set<int> result;
323 
324  auto detids = detIdsWithCoPads();
325  for (auto id : detids) {
326  GEMDetId idd(id);
327  result.insert(idd.roll());
328  }
329  return result;
330 }
std::set< unsigned int > detIdsWithCoPads() const
std::set< int > GEMDigiMatcher::stripNumbersInDetId ( unsigned int  detid) const

Definition at line 283 of file GEMDigiMatcher.cc.

References edmIntegrityCheck::d, matching::digi_channel(), digisInDetId(), and mps_fire::result.

283  {
284  set<int> result;
285  auto digis = digisInDetId(detid);
286  for (auto &d : digis) {
287  result.insert(digi_channel(d));
288  }
289  return result;
290 }
const DigiContainer & digisInDetId(unsigned int) const
int digi_channel(const Digi &d)
Definition: GenericDigi.h:67
std::set< unsigned int > GEMDigiMatcher::superChamberIds ( ) const

Definition at line 172 of file GEMDigiMatcher.cc.

References AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and superchamber_to_digis_.

172  {
173  std::set<unsigned int> result;
174  for (auto &p : superchamber_to_digis_)
175  result.insert(p.first);
176  return result;
177 }
std::map< unsigned int, DigiContainer > superchamber_to_digis_
std::set< unsigned int > GEMDigiMatcher::superChamberIdsWithCoPads ( ) const

Definition at line 184 of file GEMDigiMatcher.cc.

References AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and superchamber_to_copads_.

Referenced by nCoPads().

184  {
185  std::set<unsigned int> result;
186  for (auto &p : superchamber_to_copads_)
187  result.insert(p.first);
188  return result;
189 }
std::map< unsigned int, DigiContainer > superchamber_to_copads_
std::set< unsigned int > GEMDigiMatcher::superChamberIdsWithPads ( ) const

Definition at line 178 of file GEMDigiMatcher.cc.

References AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and superchamber_to_pads_.

Referenced by nPads().

178  {
179  std::set<unsigned int> result;
180  for (auto &p : superchamber_to_pads_)
181  result.insert(p.first);
182  return result;
183 }
std::map< unsigned int, DigiContainer > superchamber_to_pads_

Member Data Documentation

std::map<unsigned int, DigiContainer> GEMDigiMatcher::chamber_to_copads_
private

Definition at line 125 of file GEMDigiMatcher.h.

std::map<unsigned int, DigiContainer> GEMDigiMatcher::chamber_to_digis_
private

Definition at line 117 of file GEMDigiMatcher.h.

Referenced by chamberIds(), digisInChamber(), and matchDigisToSimTrack().

std::map<unsigned int, DigiContainer> GEMDigiMatcher::chamber_to_pads_
private

Definition at line 121 of file GEMDigiMatcher.h.

Referenced by chamberIdsWithPads(), matchPadsToSimTrack(), and padsInChamber().

std::map<unsigned int, DigiContainer> GEMDigiMatcher::detid_to_copads_
private

Definition at line 124 of file GEMDigiMatcher.h.

Referenced by coPadsInDetId(), detIdsWithCoPads(), and matchCoPadsToSimTrack().

std::map<unsigned int, DigiContainer> GEMDigiMatcher::detid_to_digis_
private

Definition at line 116 of file GEMDigiMatcher.h.

Referenced by detIds(), digisInDetId(), and matchDigisToSimTrack().

std::map<unsigned int, DigiContainer> GEMDigiMatcher::detid_to_pads_
private

Definition at line 120 of file GEMDigiMatcher.h.

Referenced by matchPadsToSimTrack(), and padsInDetId().

edm::Handle<GEMCoPadDigiCollection> GEMDigiMatcher::gem_co_pads_
private

Definition at line 106 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and init().

edm::Handle<GEMDigiCollection> GEMDigiMatcher::gem_digis_
private

Definition at line 104 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and init().

const GEMGeometry& GEMDigiMatcher::gem_geo_
private

Definition at line 109 of file GEMDigiMatcher.h.

edm::Handle<GEMPadDigiCollection> GEMDigiMatcher::gem_pads_
private

Definition at line 105 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and init().

int GEMDigiMatcher::matchDeltaStrip_
private

Definition at line 114 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and matchDigisToSimTrack().

int GEMDigiMatcher::maxBXGEM_
private
int GEMDigiMatcher::minBXGEM_
private
const DigiContainer GEMDigiMatcher::no_digis_
private
const SimHitMatcher& GEMDigiMatcher::simhit_matcher_
private
std::map<unsigned int, DigiContainer> GEMDigiMatcher::superchamber_to_copads_
private
std::map<unsigned int, DigiContainer> GEMDigiMatcher::superchamber_to_digis_
private

Definition at line 118 of file GEMDigiMatcher.h.

Referenced by digisInSuperChamber(), matchDigisToSimTrack(), and superChamberIds().

std::map<unsigned int, DigiContainer> GEMDigiMatcher::superchamber_to_pads_
private
bool GEMDigiMatcher::verbose_
private

Definition at line 112 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), matchDigisToSimTrack(), and matchPadsToSimTrack().