CMS 3D CMS Logo

GEMDigiMatcher.h
Go to the documentation of this file.
1 #ifndef GEMValidation_GEMDigiMatcher_h
2 #define GEMValidation_GEMDigiMatcher_h
3 
11 #include "GenericDigi.h"
12 
19 
24 
27 
28 #include <vector>
29 #include <map>
30 #include <set>
31 
32 class SimHitMatcher;
33 class GEMGeometry;
35 {
37 public:
38 
40 
42 
43  // partition GEM detIds with digis
44  std::set<unsigned int> detIds() const;
45 
46  // chamber detIds with digis
47  std::set<unsigned int> chamberIds() const;
48  // chamber detIds with pads
49  std::set<unsigned int> chamberIdsWithPads() const;
50  // superchamber detIds with coincidence pads
51  std::set<unsigned int> superChamberIdsWithCoPads() const;
52 
53  // superchamber detIds with digis
54  std::set<unsigned int> superChamberIds() const;
55  std::set<unsigned int> superChamberIdsWithPads() const;
56 
57  // partition detIds with coincidence pads
58  std::set<unsigned int> detIdsWithCoPads() const;
59 
60 
61 
62  // GEM digis from a particular partition, chamber or superchamber
63  const DigiContainer& digisInDetId(unsigned int) const;
64  const DigiContainer& digisInChamber(unsigned int) const;
65  const DigiContainer& digisInSuperChamber(unsigned int) const;
66 
67  // GEM pads from a particular partition, chamber or superchamber
68  const DigiContainer& padsInDetId(unsigned int) const;
69  const DigiContainer& padsInChamber(unsigned int) const;
70  const DigiContainer& padsInSuperChamber(unsigned int) const;
71 
72  // GEM co-pads from a particular partition or superchamber
73  const DigiContainer& coPadsInDetId(unsigned int) const;
74  const DigiContainer& coPadsInSuperChamber(unsigned int) const;
75 
76  // #layers with digis from this simtrack
77  int nLayersWithDigisInSuperChamber(unsigned int) const;
78  int nLayersWithPadsInSuperChamber(unsigned int) const;
79 
81  int nPads() const;
82 
84  int nCoPads() const;
85 
86  std::set<int> stripNumbersInDetId(unsigned int) const;
87  std::set<int> padNumbersInDetId(unsigned int) const;
88  std::set<int> coPadNumbersInDetId(unsigned int) const;
89 
90  // what unique partitions numbers with digis from this simtrack?
91  std::set<int> partitionNumbers() const;
92  std::set<int> partitionNumbersWithCoPads() const;
93 
94 private:
95 
96  void init(const edm::Event& );
97 
98  void matchDigisToSimTrack(const GEMDigiCollection& digis);
99  void matchPadsToSimTrack(const GEMPadDigiCollection& pads);
100  void matchCoPadsToSimTrack(const GEMCoPadDigiCollection& co_pads);
101 
105 
108 
110  bool verbose_;
111 
113 
114  std::map<unsigned int, DigiContainer> detid_to_digis_;
115  std::map<unsigned int, DigiContainer> chamber_to_digis_;
116  std::map<unsigned int, DigiContainer> superchamber_to_digis_;
117 
118  std::map<unsigned int, DigiContainer> detid_to_pads_;
119  std::map<unsigned int, DigiContainer> chamber_to_pads_;
120  std::map<unsigned int, DigiContainer> superchamber_to_pads_;
121 
122  std::map<unsigned int, DigiContainer> detid_to_copads_;
123  std::map<unsigned int, DigiContainer> chamber_to_copads_;
124  std::map<unsigned int, DigiContainer> superchamber_to_copads_;
125 
127 };
128 
129 #endif
const DigiContainer & digisInChamber(unsigned int) const
std::set< int > padNumbersInDetId(unsigned int) const
std::map< unsigned int, DigiContainer > detid_to_pads_
std::set< unsigned int > superChamberIdsWithPads() const
std::set< unsigned int > detIds() const
const DigiContainer no_digis_
const SimHitMatcher & simhit_matcher_
edm::Handle< GEMPadDigiCollection > gem_pads_
std::set< int > stripNumbersInDetId(unsigned int) const
std::set< int > partitionNumbers() const
const DigiContainer & padsInDetId(unsigned int) const
void matchPadsToSimTrack(const GEMPadDigiCollection &pads)
edm::Handle< GEMDigiCollection > gem_digis_
std::vector< Digi > DigiContainer
Definition: GenericDigi.h:33
std::map< unsigned int, DigiContainer > superchamber_to_copads_
std::map< unsigned int, DigiContainer > chamber_to_digis_
std::set< unsigned int > superChamberIds() const
void matchDigisToSimTrack(const GEMDigiCollection &digis)
const DigiContainer & digisInSuperChamber(unsigned int) const
std::map< unsigned int, DigiContainer > detid_to_digis_
const DigiContainer & padsInSuperChamber(unsigned int) const
const DigiContainer & digisInDetId(unsigned int) const
std::set< int > partitionNumbersWithCoPads() const
const GEMGeometry & gem_geo_
std::map< unsigned int, DigiContainer > superchamber_to_pads_
const DigiContainer & coPadsInSuperChamber(unsigned int) const
int nLayersWithDigisInSuperChamber(unsigned int) const
const DigiContainer & coPadsInDetId(unsigned int) const
std::map< unsigned int, DigiContainer > superchamber_to_digis_
matching::DigiContainer DigiContainer
std::set< unsigned int > superChamberIdsWithCoPads() const
std::map< unsigned int, DigiContainer > chamber_to_copads_
std::map< unsigned int, DigiContainer > detid_to_copads_
const DigiContainer & padsInChamber(unsigned int) const
GEMDigiMatcher(const SimHitMatcher &sh, const edm::Event &, const GEMGeometry &geom, const edm::ParameterSet &cfg, edm::EDGetToken &, edm::EDGetToken &, edm::EDGetToken &)
std::set< unsigned int > detIdsWithCoPads() const
std::set< unsigned int > chamberIdsWithPads() const
int nLayersWithPadsInSuperChamber(unsigned int) const
std::set< unsigned int > chamberIds() const
edm::Handle< GEMCoPadDigiCollection > gem_co_pads_
std::map< unsigned int, DigiContainer > chamber_to_pads_
int nPads() const
How many pads in GEM did this simtrack get in total?
void matchCoPadsToSimTrack(const GEMCoPadDigiCollection &co_pads)
std::set< int > coPadNumbersInDetId(unsigned int) const
void init(const edm::Event &)
int nCoPads() const
How many coincidence pads in GEM did this simtrack get in total?