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 <map>
29 #include <set>
30 #include <vector>
31 
32 class SimHitMatcher;
33 class GEMGeometry;
36 
37 public:
38  GEMDigiMatcher(const SimHitMatcher &sh,
39  const edm::Event &,
40  const GEMGeometry &geom,
41  const edm::ParameterSet &cfg,
44  edm::EDGetToken &);
45 
47 
48  // partition GEM detIds with digis
49  std::set<unsigned int> detIds() const;
50 
51  // chamber detIds with digis
52  std::set<unsigned int> chamberIds() const;
53  // chamber detIds with pads
54  std::set<unsigned int> chamberIdsWithPads() const;
55  // superchamber detIds with coincidence pads
56  std::set<unsigned int> superChamberIdsWithCoPads() const;
57 
58  // superchamber detIds with digis
59  std::set<unsigned int> superChamberIds() const;
60  std::set<unsigned int> superChamberIdsWithPads() const;
61 
62  // partition detIds with coincidence pads
63  std::set<unsigned int> detIdsWithCoPads() const;
64 
65  // GEM digis from a particular partition, chamber or superchamber
66  const DigiContainer &digisInDetId(unsigned int) const;
67  const DigiContainer &digisInChamber(unsigned int) const;
68  const DigiContainer &digisInSuperChamber(unsigned int) const;
69 
70  // GEM pads from a particular partition, chamber or superchamber
71  const DigiContainer &padsInDetId(unsigned int) const;
72  const DigiContainer &padsInChamber(unsigned int) const;
73  const DigiContainer &padsInSuperChamber(unsigned int) const;
74 
75  // GEM co-pads from a particular partition or superchamber
76  const DigiContainer &coPadsInDetId(unsigned int) const;
77  const DigiContainer &coPadsInSuperChamber(unsigned int) const;
78 
79  // #layers with digis from this simtrack
80  int nLayersWithDigisInSuperChamber(unsigned int) const;
81  int nLayersWithPadsInSuperChamber(unsigned int) const;
82 
84  int nPads() const;
85 
87  int nCoPads() const;
88 
89  std::set<int> stripNumbersInDetId(unsigned int) const;
90  std::set<int> padNumbersInDetId(unsigned int) const;
91  std::set<int> coPadNumbersInDetId(unsigned int) const;
92 
93  // what unique partitions numbers with digis from this simtrack?
94  std::set<int> partitionNumbers() const;
95  std::set<int> partitionNumbersWithCoPads() const;
96 
97 private:
98  void init(const edm::Event &);
99 
100  void matchDigisToSimTrack(const GEMDigiCollection &digis);
101  void matchPadsToSimTrack(const GEMPadDigiCollection &pads);
102  void matchCoPadsToSimTrack(const GEMCoPadDigiCollection &co_pads);
103 
107 
110 
112  bool verbose_;
113 
115 
116  std::map<unsigned int, DigiContainer> detid_to_digis_;
117  std::map<unsigned int, DigiContainer> chamber_to_digis_;
118  std::map<unsigned int, DigiContainer> superchamber_to_digis_;
119 
120  std::map<unsigned int, DigiContainer> detid_to_pads_;
121  std::map<unsigned int, DigiContainer> chamber_to_pads_;
122  std::map<unsigned int, DigiContainer> superchamber_to_pads_;
123 
124  std::map<unsigned int, DigiContainer> detid_to_copads_;
125  std::map<unsigned int, DigiContainer> chamber_to_copads_;
126  std::map<unsigned int, DigiContainer> superchamber_to_copads_;
127 
129 };
130 
131 #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:43
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?