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() || !gem_pads_.isValid() ) return ;
24  // CoPad can be missing when we use only digi data.
25  if ( !gem_co_pads_.isValid() ) {
26  edm::LogError("GEMDigiMatcher")<<"Copad is missing from collections.Pass copad.";
27  }
28  init(e);
29 }
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:508
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 31 of file GEMDigiMatcher.cc.

31 {}

Member Function Documentation

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

Definition at line 161 of file GEMDigiMatcher.cc.

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

Referenced by GEMDigiTrackMatch::analyze().

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

Definition at line 168 of file GEMDigiMatcher.cc.

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

Referenced by GEMDigiTrackMatch::analyze().

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

Definition at line 343 of file GEMDigiMatcher.cc.

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

344 {
345  set<int> result;
346  auto digis = coPadsInDetId(detid);
347  for (auto& d: digis)
348  {
349  result.insert( digi_channel(d) );
350  }
351  return result;
352 }
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 250 of file GEMDigiMatcher.cc.

References detid_to_copads_, and no_digis_.

Referenced by coPadNumbersInDetId().

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

Definition at line 257 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_copads_.

Referenced by nCoPads().

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

Definition at line 152 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_) result.insert(p.first);
156  return result;
157 }
std::map< unsigned int, DigiContainer > detid_to_digis_
std::set< unsigned int > GEMDigiMatcher::detIdsWithCoPads ( ) const

Definition at line 196 of file GEMDigiMatcher.cc.

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

Referenced by partitionNumbersWithCoPads().

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

Definition at line 214 of file GEMDigiMatcher.cc.

References chamber_to_digis_, and no_digis_.

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

Definition at line 207 of file GEMDigiMatcher.cc.

References detid_to_digis_, and no_digis_.

Referenced by stripNumbersInDetId().

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

Definition at line 221 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_digis_.

Referenced by nLayersWithDigisInSuperChamber().

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

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

36 {
40 }
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 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().

123 {
124  auto det_ids = simhit_matcher_.detIdsGEMCoincidences();
125  for (auto id: det_ids)
126  {
127  GEMDetId p_id(id);
128  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
129 
130  auto hit_co_pads = simhit_matcher_.hitCoPadsInDetId(id);
131  auto co_pads_in_det = co_pads.get(p_id);
132 
133  for (auto pad = co_pads_in_det.first; pad != co_pads_in_det.second; ++pad)
134  {
135  // check that the pad BX is within the range
136  if (pad->bx(1) < minBXGEM_ || pad->bx(1) > maxBXGEM_) continue;
137  if (pad->bx(2) < minBXGEM_ || pad->bx(2) > maxBXGEM_) continue;
138  // check that it matches a coincidence pad that was hit by SimHits from our track
139  if (hit_co_pads.find(pad->pad(1)) == hit_co_pads.end()) continue;
140  if (hit_co_pads.find(pad->pad(2)) == hit_co_pads.end()) continue;
141 
142  auto mydigi = make_digi(id, pad->pad(1), pad->bx(1), GEM_COPAD);
143  //auto mydigi = make_digi(id, pad->pad(2), pad->bx(2), GEM_COPAD); // FIXIT : Solve duplicate problem.
144  detid_to_copads_[id].push_back(mydigi);
145  superchamber_to_copads_[ superch_id() ].push_back(mydigi);
146  }
147  }
148 }
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 44 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  {
49  GEMDetId p_id(id);
50  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
51 
52  auto hit_strips = simhit_matcher_.hitStripsInDetId(id, matchDeltaStrip_);
53  if (verbose_)
54  {
55  cout<<"hit_strips_fat ";
56  copy(hit_strips.begin(), hit_strips.end(), ostream_iterator<int>(cout, " "));
57  cout<<endl;
58  }
59 
60  auto digis_in_det = digis.get(GEMDetId(id));
61 
62  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d)
63  {
64  if (verbose_) cout<<"gdigi "<<p_id<<" "<<*d<<endl;
65  // check that the digi is within BX range
66  if (d->bx() < minBXGEM_ || d->bx() > maxBXGEM_) continue;
67  // check that it matches a strip that was hit by SimHits from our track
68  if (hit_strips.find(d->strip()) == hit_strips.end()) continue;
69  if (verbose_) cout<<"oki"<<endl;
70 
71  auto mydigi = make_digi(id, d->strip(), d->bx(), GEM_STRIP);
72  detid_to_digis_[id].push_back(mydigi);
73  chamber_to_digis_[ p_id.chamberId().rawId() ].push_back(mydigi);
74  superchamber_to_digis_[ superch_id() ].push_back(mydigi);
75 
76  //int pad_num = 1 + static_cast<int>( roll->padOfStrip(d->strip()) ); // d->strip() is int
77  //digi_map[ make_pair(pad_num, d->bx()) ].push_back( d->strip() );
78  }
79  }
80 }
std::set< unsigned int > detIdsGEM() const
GEM partitions&#39; detIds with SimHits.
const SimHitMatcher & simhit_matcher_
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 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().

85 {
86  auto det_ids = simhit_matcher_.detIdsGEM();
87  for (auto id: det_ids)
88  {
89  GEMDetId p_id(id);
90  GEMDetId superch_id(p_id.region(), p_id.ring(), p_id.station(), 1, p_id.chamber(), 0);
91 
92  auto hit_pads = simhit_matcher_.hitPadsInDetId(id);
93  auto pads_in_det = pads.get(p_id);
94 
95  if (verbose_)
96  {
97  cout<<"checkpads "<<hit_pads.size()<<" "<<std::distance(pads_in_det.first, pads_in_det.second)<<" hit_pads: ";
98  copy(hit_pads.begin(), hit_pads.end(), ostream_iterator<int>(cout," "));
99  cout<<endl;
100  }
101 
102  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad)
103  {
104  if (verbose_) cout<<"chp "<<*pad<<endl;
105  // check that the pad BX is within the range
106  if (pad->bx() < minBXGEM_ || pad->bx() > maxBXGEM_) continue;
107  if (verbose_) 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()) continue;
110  if (verbose_) cout<<"chp2"<<endl;
111 
112  auto mydigi = make_digi(id, pad->pad(), pad->bx(), GEM_PAD);
113  detid_to_pads_[id].push_back(mydigi);
114  chamber_to_pads_[ p_id.chamberId().rawId() ].push_back(mydigi);
115  superchamber_to_pads_[ superch_id() ].push_back(mydigi);
116  }
117  }
118 }
std::set< unsigned int > detIdsGEM() const
GEM partitions&#39; detIds with SimHits.
std::map< unsigned int, DigiContainer > detid_to_pads_
const SimHitMatcher & simhit_matcher_
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 293 of file GEMDigiMatcher.cc.

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

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

Definition at line 265 of file GEMDigiMatcher.cc.

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

266 {
267  set<int> layers;
268  auto digis = digisInSuperChamber(detid);
269  for (auto& d: digis)
270  {
271  GEMDetId idd(digi_id(d));
272  layers.insert(idd.layer());
273  }
274  return layers.size();
275 }
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 279 of file GEMDigiMatcher.cc.

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

280 {
281  set<int> layers;
282  auto digis = padsInSuperChamber(detid);
283  for (auto& d: digis)
284  {
285  GEMDetId idd(digi_id(d));
286  layers.insert(idd.layer());
287  }
288  return layers.size();
289 }
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 306 of file GEMDigiMatcher.cc.

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

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

Definition at line 331 of file GEMDigiMatcher.cc.

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

332 {
333  set<int> result;
334  auto digis = padsInDetId(detid);
335  for (auto& d: digis)
336  {
337  result.insert( digi_channel(d) );
338  }
339  return result;
340 }
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 235 of file GEMDigiMatcher.cc.

References chamber_to_pads_, and no_digis_.

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

Definition at line 228 of file GEMDigiMatcher.cc.

References detid_to_pads_, and no_digis_.

Referenced by padNumbersInDetId().

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

Definition at line 242 of file GEMDigiMatcher.cc.

References no_digis_, and superchamber_to_pads_.

Referenced by nLayersWithPadsInSuperChamber(), and nPads().

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

Definition at line 355 of file GEMDigiMatcher.cc.

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

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

Definition at line 369 of file GEMDigiMatcher.cc.

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

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

Definition at line 319 of file GEMDigiMatcher.cc.

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

320 {
321  set<int> result;
322  auto digis = digisInDetId(detid);
323  for (auto& d: digis)
324  {
325  result.insert( digi_channel(d) );
326  }
327  return result;
328 }
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 175 of file GEMDigiMatcher.cc.

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

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

Definition at line 189 of file GEMDigiMatcher.cc.

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

Referenced by nCoPads().

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

Definition at line 182 of file GEMDigiMatcher.cc.

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

Referenced by nPads().

183 {
184  std::set<unsigned int> result;
185  for (auto& p: superchamber_to_pads_) result.insert(p.first);
186  return result;
187 }
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().