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 36 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_.

10  :simhit_matcher_(sh),gem_geo_(geom)
11 {
12  minBXGEM_ = cfg.getUntrackedParameter<int>("minBXGEM", -1);
13  maxBXGEM_ = cfg.getUntrackedParameter<int>("maxBXGEM", 1);
14 
15  matchDeltaStrip_ = cfg.getUntrackedParameter<int>("matchDeltaStripGEM", 1);
16 
17  //setVerbose(cfg.getUntrackedParameter<int>("verboseGEMDigi", 0));
18  verbose_=false;
19 
20  e.getByToken(gem_digiToken, gem_digis_);
21  e.getByToken(gem_padToken, gem_pads_);
22  e.getByToken(gem_copadToken, gem_co_pads_);
23  if ( !gem_digis_.isValid() ) return ;
24 
25  init(e);
26 }
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:579
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 28 of file GEMDigiMatcher.cc.

28 {}

Member Function Documentation

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

Definition at line 158 of file GEMDigiMatcher.cc.

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

Referenced by GEMDigiTrackMatch::analyze().

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

Definition at line 165 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_) result.insert(p.first);
169  return result;
170 }
std::map< unsigned int, DigiContainer > chamber_to_pads_
std::set< int > GEMDigiMatcher::coPadNumbersInDetId ( unsigned int  detid) const

Definition at line 340 of file GEMDigiMatcher.cc.

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

341 {
342  set<int> result;
343  auto digis = coPadsInDetId(detid);
344  for (auto& d: digis)
345  {
346  result.insert( digi_channel(d) );
347  }
348  return result;
349 }
const DigiContainer & coPadsInDetId(unsigned int) const
int digi_channel(const Digi &d)
Definition: GenericDigi.h:47
const matching::DigiContainer & GEMDigiMatcher::coPadsInDetId ( unsigned int  detid) const

Definition at line 247 of file GEMDigiMatcher.cc.

References detid_to_copads_, and no_digis_.

Referenced by coPadNumbersInDetId().

248 {
249  if (detid_to_copads_.find(detid) == detid_to_copads_.end()) return no_digis_;
250  return detid_to_copads_.at(detid);
251 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > detid_to_copads_
const matching::DigiContainer & GEMDigiMatcher::coPadsInSuperChamber ( unsigned int  detid) const

Definition at line 254 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_copads_.

Referenced by nCoPads().

255 {
256  if (superchamber_to_copads_.find(detid) == superchamber_to_copads_.end()) return no_digis_;
257  return superchamber_to_copads_.at(detid);
258 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > superchamber_to_copads_
std::set< unsigned int > GEMDigiMatcher::detIds ( void  ) const

Definition at line 149 of file GEMDigiMatcher.cc.

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

Referenced by partitionNumbers().

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

Definition at line 193 of file GEMDigiMatcher.cc.

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

Referenced by partitionNumbersWithCoPads().

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

Definition at line 211 of file GEMDigiMatcher.cc.

References chamber_to_digis_, and no_digis_.

212 {
213  if (chamber_to_digis_.find(detid) == chamber_to_digis_.end()) return no_digis_;
214  return chamber_to_digis_.at(detid);
215 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > chamber_to_digis_
const matching::DigiContainer & GEMDigiMatcher::digisInDetId ( unsigned int  detid) const

Definition at line 204 of file GEMDigiMatcher.cc.

References detid_to_digis_, and no_digis_.

Referenced by stripNumbersInDetId().

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

Definition at line 218 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_digis_.

Referenced by nLayersWithDigisInSuperChamber().

219 {
220  if (superchamber_to_digis_.find(detid) == superchamber_to_digis_.end()) return no_digis_;
221  return superchamber_to_digis_.at(detid);
222 }
const DigiContainer no_digis_
std::map< unsigned int, DigiContainer > superchamber_to_digis_
void GEMDigiMatcher::init ( const edm::Event e)
private

Definition at line 32 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().

33 {
37 }
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:81
edm::Handle< GEMCoPadDigiCollection > gem_co_pads_
void matchCoPadsToSimTrack(const GEMCoPadDigiCollection &co_pads)
void GEMDigiMatcher::matchCoPadsToSimTrack ( const GEMCoPadDigiCollection co_pads)
private

Definition at line 119 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().

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

Definition at line 41 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().

42 {
43  auto det_ids = simhit_matcher_.detIdsGEM();
44  for (auto id: det_ids)
45  {
46  GEMDetId p_id(id);
47  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
48 
49  auto hit_strips = simhit_matcher_.hitStripsInDetId(id, matchDeltaStrip_);
50  if (verbose_)
51  {
52  cout<<"hit_strips_fat ";
53  copy(hit_strips.begin(), hit_strips.end(), ostream_iterator<int>(cout, " "));
54  cout<<endl;
55  }
56 
57  auto digis_in_det = digis.get(GEMDetId(id));
58 
59  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d)
60  {
61  if (verbose_) cout<<"gdigi "<<p_id<<" "<<*d<<endl;
62  // check that the digi is within BX range
63  if (d->bx() < minBXGEM_ || d->bx() > maxBXGEM_) continue;
64  // check that it matches a strip that was hit by SimHits from our track
65  if (hit_strips.find(d->strip()) == hit_strips.end()) continue;
66  if (verbose_) cout<<"oki"<<endl;
67 
68  auto mydigi = make_digi(id, d->strip(), d->bx(), GEM_STRIP);
69  detid_to_digis_[id].push_back(mydigi);
70  chamber_to_digis_[ p_id.chamberId().rawId() ].push_back(mydigi);
71  superchamber_to_digis_[ superch_id() ].push_back(mydigi);
72 
73  //int pad_num = 1 + static_cast<int>( roll->padOfStrip(d->strip()) ); // d->strip() is int
74  //digi_map[ make_pair(pad_num, d->bx()) ].push_back( d->strip() );
75  }
76  }
77 }
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:36
void GEMDigiMatcher::matchPadsToSimTrack ( const GEMPadDigiCollection pads)
private

Definition at line 81 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().

82 {
83  auto det_ids = simhit_matcher_.detIdsGEM();
84  for (auto id: det_ids)
85  {
86  GEMDetId p_id(id);
87  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
88 
89  auto hit_pads = simhit_matcher_.hitPadsInDetId(id);
90  auto pads_in_det = pads.get(p_id);
91 
92  if (verbose_)
93  {
94  cout<<"checkpads "<<hit_pads.size()<<" "<<std::distance(pads_in_det.first, pads_in_det.second)<<" hit_pads: ";
95  copy(hit_pads.begin(), hit_pads.end(), ostream_iterator<int>(cout," "));
96  cout<<endl;
97  }
98 
99  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad)
100  {
101  if (verbose_) cout<<"chp "<<*pad<<endl;
102  // check that the pad BX is within the range
103  if (pad->bx() < minBXGEM_ || pad->bx() > maxBXGEM_) continue;
104  if (verbose_) cout<<"chp1"<<endl;
105  // check that it matches a pad that was hit by SimHits from our track
106  if (hit_pads.find(pad->pad()) == hit_pads.end()) continue;
107  if (verbose_) cout<<"chp2"<<endl;
108 
109  auto mydigi = make_digi(id, pad->pad(), pad->bx(), GEM_PAD);
110  detid_to_pads_[id].push_back(mydigi);
111  chamber_to_pads_[ p_id.chamberId().rawId() ].push_back(mydigi);
112  superchamber_to_pads_[ superch_id() ].push_back(mydigi);
113  }
114  }
115 }
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:36
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 290 of file GEMDigiMatcher.cc.

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

291 {
292  int n = 0;
293  auto ids = superChamberIdsWithCoPads();
294  for (auto id: ids)
295  {
296  n += coPadsInSuperChamber(id).size();
297  }
298  return n;
299 }
const DigiContainer & coPadsInSuperChamber(unsigned int) const
std::set< unsigned int > superChamberIdsWithCoPads() const
int GEMDigiMatcher::nLayersWithDigisInSuperChamber ( unsigned int  detid) const

Definition at line 262 of file GEMDigiMatcher.cc.

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

263 {
264  set<int> layers;
265  auto digis = digisInSuperChamber(detid);
266  for (auto& d: digis)
267  {
268  GEMDetId idd(digi_id(d));
269  layers.insert(idd.layer());
270  }
271  return layers.size();
272 }
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:46
int GEMDigiMatcher::nLayersWithPadsInSuperChamber ( unsigned int  detid) const

Definition at line 276 of file GEMDigiMatcher.cc.

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

277 {
278  set<int> layers;
279  auto digis = padsInSuperChamber(detid);
280  for (auto& d: digis)
281  {
282  GEMDetId idd(digi_id(d));
283  layers.insert(idd.layer());
284  }
285  return layers.size();
286 }
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:46
int GEMDigiMatcher::nPads ( ) const

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

Definition at line 303 of file GEMDigiMatcher.cc.

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

304 {
305  int n = 0;
306  auto ids = superChamberIdsWithPads();
307  for (auto id: ids)
308  {
309  n += padsInSuperChamber(id).size();
310  }
311  return n;
312 }
std::set< unsigned int > superChamberIdsWithPads() const
const DigiContainer & padsInSuperChamber(unsigned int) const
std::set< int > GEMDigiMatcher::padNumbersInDetId ( unsigned int  detid) const

Definition at line 328 of file GEMDigiMatcher.cc.

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

329 {
330  set<int> result;
331  auto digis = padsInDetId(detid);
332  for (auto& d: digis)
333  {
334  result.insert( digi_channel(d) );
335  }
336  return result;
337 }
const DigiContainer & padsInDetId(unsigned int) const
int digi_channel(const Digi &d)
Definition: GenericDigi.h:47
const matching::DigiContainer & GEMDigiMatcher::padsInChamber ( unsigned int  detid) const

Definition at line 232 of file GEMDigiMatcher.cc.

References chamber_to_pads_, and no_digis_.

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

Definition at line 225 of file GEMDigiMatcher.cc.

References detid_to_pads_, and no_digis_.

Referenced by padNumbersInDetId().

226 {
227  if (detid_to_pads_.find(detid) == detid_to_pads_.end()) return no_digis_;
228  return detid_to_pads_.at(detid);
229 }
std::map< unsigned int, DigiContainer > detid_to_pads_
const DigiContainer no_digis_
const matching::DigiContainer & GEMDigiMatcher::padsInSuperChamber ( unsigned int  detid) const

Definition at line 239 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_pads_.

Referenced by nLayersWithPadsInSuperChamber(), and nPads().

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

Definition at line 352 of file GEMDigiMatcher.cc.

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

353 {
354  std::set<int> result;
355 
356  auto detids = detIds();
357  for (auto id: detids)
358  {
359  GEMDetId idd(id);
360  result.insert( idd.roll() );
361  }
362  return result;
363 }
std::set< unsigned int > detIds() const
std::set< int > GEMDigiMatcher::partitionNumbersWithCoPads ( ) const

Definition at line 366 of file GEMDigiMatcher.cc.

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

367 {
368  std::set<int> result;
369 
370  auto detids = detIdsWithCoPads();
371  for (auto id: detids)
372  {
373  GEMDetId idd(id);
374  result.insert( idd.roll() );
375  }
376  return result;
377 }
std::set< unsigned int > detIdsWithCoPads() const
std::set< int > GEMDigiMatcher::stripNumbersInDetId ( unsigned int  detid) const

Definition at line 316 of file GEMDigiMatcher.cc.

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

317 {
318  set<int> result;
319  auto digis = digisInDetId(detid);
320  for (auto& d: digis)
321  {
322  result.insert( digi_channel(d) );
323  }
324  return result;
325 }
const DigiContainer & digisInDetId(unsigned int) const
int digi_channel(const Digi &d)
Definition: GenericDigi.h:47
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_.

173 {
174  std::set<unsigned int> result;
175  for (auto& p: superchamber_to_digis_) 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 186 of file GEMDigiMatcher.cc.

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

Referenced by nCoPads().

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

Definition at line 179 of file GEMDigiMatcher.cc.

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

Referenced by nPads().

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

Member Data Documentation

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

Definition at line 123 of file GEMDigiMatcher.h.

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

Definition at line 115 of file GEMDigiMatcher.h.

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

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

Definition at line 119 of file GEMDigiMatcher.h.

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

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

Definition at line 122 of file GEMDigiMatcher.h.

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

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

Definition at line 114 of file GEMDigiMatcher.h.

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

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

Definition at line 118 of file GEMDigiMatcher.h.

Referenced by matchPadsToSimTrack(), and padsInDetId().

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

Definition at line 104 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and init().

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

Definition at line 102 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and init().

const GEMGeometry& GEMDigiMatcher::gem_geo_
private

Definition at line 107 of file GEMDigiMatcher.h.

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

Definition at line 103 of file GEMDigiMatcher.h.

Referenced by GEMDigiMatcher(), and init().

int GEMDigiMatcher::matchDeltaStrip_
private

Definition at line 112 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 116 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 110 of file GEMDigiMatcher.h.

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