CMS 3D CMS Logo

GEMRecHitMatcher.h
Go to the documentation of this file.
1 #ifndef GEMValidation_GEMRecHitMatcher_h
2 #define GEMValidation_GEMRecHitMatcher_h
3 
15 
16 
17 
23 
27 
30 
35 
36 #include <vector>
37 #include <map>
38 #include <set>
39 
40 class SimHitMatcher;
41 class GEMGeometry;
43 {
44 public:
45 
48 
50 
52 
53  // partition GEM detIds with rechits
54  std::set<unsigned int> detIds() const;
55 
56  // chamber detIds with rechits
57  std::set<unsigned int> chamberIds() const;
58 
59  // superchamber detIds with rechits
60  std::set<unsigned int> superChamberIds() const;
61 
62  // GEM recHits from a particular partition, chamber or superchamber
63  const RecHitContainer& recHitsInDetId(unsigned int) const;
64  const RecHitContainer& recHitsInChamber(unsigned int) const;
65  const RecHitContainer& recHitsInSuperChamber(unsigned int) const;
66 
67  // #layers with recHits from this simtrack
68  int nLayersWithRecHitsInSuperChamber(unsigned int) const;
69 
71  int nRecHits() const;
72 
73  std::set<int> stripNumbersInDetId(unsigned int) const;
74 
75  // what unique partitions numbers with recHits from this simtrack?
76  std::set<int> partitionNumbers() const;
77 
78  // verbose value
79  bool verbose() const { return verbose_; }
80 
81  GlobalPoint recHitPosition(const RecHit& rechit) const;
82  GlobalPoint recHitMeanPosition(const RecHitContainer& rechits) const;
83 
84 private:
85 
86  void init(const edm::Event& );
87 
88  void matchRecHitsToSimTrack(const GEMRecHitCollection& recHits);
89 
91 
94 
96  bool verbose_;
97 
99 
100  std::map<unsigned int, RecHitContainer> detid_to_recHits_;
101  std::map<unsigned int, RecHitContainer> chamber_to_recHits_;
102  std::map<unsigned int, RecHitContainer> superchamber_to_recHits_;
103 
104  const RecHitContainer no_recHits_;
105 
106 
107 };
108 
109 #endif
const RecHitContainer & recHitsInDetId(unsigned int) const
const RecHitContainer & recHitsInSuperChamber(unsigned int) const
std::set< int > stripNumbersInDetId(unsigned int) const
std::set< unsigned int > chamberIds() const
std::map< unsigned int, RecHitContainer > detid_to_recHits_
std::vector< Digi > DigiContainer
Definition: GenericDigi.h:33
const RecHitContainer no_recHits_
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
Definition: GenericDigi.h:30
std::set< unsigned int > detIds() const
std::map< unsigned int, RecHitContainer > superchamber_to_recHits_
std::set< unsigned int > superChamberIds() const
const SimHitMatcher & simhit_matcher_
void matchRecHitsToSimTrack(const GEMRecHitCollection &recHits)
int nRecHits() const
How many recHits in GEM did this simtrack get in total?
GlobalPoint recHitMeanPosition(const RecHitContainer &rechits) const
int nLayersWithRecHitsInSuperChamber(unsigned int) const
std::map< unsigned int, RecHitContainer > chamber_to_recHits_
void init(const edm::Event &)
bool verbose() const
matching::Digi RecHit
edm::Handle< GEMRecHitCollection > gem_rechits_
GlobalPoint recHitPosition(const RecHit &rechit) const
const GEMGeometry & gem_geo_
matching::DigiContainer RecHitContainer
GEMRecHitMatcher(const SimHitMatcher &sh, const edm::Event &, const GEMGeometry &geom, const edm::ParameterSet &cfg, edm::EDGetToken &)
const RecHitContainer & recHitsInChamber(unsigned int) const
std::set< int > partitionNumbers() const