CMS 3D CMS Logo

GEMRecHitMatcher.h
Go to the documentation of this file.
1 #ifndef GEMValidation_GEMRecHitMatcher_h
2 #define GEMValidation_GEMRecHitMatcher_h
3 
14 
20 
24 
27 
32 
33 #include <map>
34 #include <set>
35 #include <vector>
36 
37 class SimHitMatcher;
38 class GEMGeometry;
40 public:
43 
45  const edm::Event &,
46  const GEMGeometry &geom,
47  const edm::ParameterSet &cfg,
48  edm::EDGetToken &);
49 
51 
52  // partition GEM detIds with rechits
53  std::set<unsigned int> detIds() const;
54 
55  // chamber detIds with rechits
56  std::set<unsigned int> chamberIds() const;
57 
58  // superchamber detIds with rechits
59  std::set<unsigned int> superChamberIds() const;
60 
61  // GEM recHits from a particular partition, chamber or superchamber
62  const RecHitContainer &recHitsInDetId(unsigned int) const;
63  const RecHitContainer &recHitsInChamber(unsigned int) const;
64  const RecHitContainer &recHitsInSuperChamber(unsigned int) const;
65 
66  // #layers with recHits from this simtrack
67  int nLayersWithRecHitsInSuperChamber(unsigned int) const;
68 
70  int nRecHits() const;
71 
72  std::set<int> stripNumbersInDetId(unsigned int) const;
73 
74  // what unique partitions numbers with recHits from this simtrack?
75  std::set<int> partitionNumbers() const;
76 
77  // verbose value
78  bool verbose() const { return verbose_; }
79 
80  GlobalPoint recHitPosition(const RecHit &rechit) const;
81  GlobalPoint recHitMeanPosition(const RecHitContainer &rechits) const;
82 
83 private:
84  void init(const edm::Event &);
85 
86  void matchRecHitsToSimTrack(const GEMRecHitCollection &recHits);
87 
89 
92 
94  bool verbose_;
95 
97 
98  std::map<unsigned int, RecHitContainer> detid_to_recHits_;
99  std::map<unsigned int, RecHitContainer> chamber_to_recHits_;
100  std::map<unsigned int, RecHitContainer> superchamber_to_recHits_;
101 
102  const RecHitContainer no_recHits_;
103 };
104 
105 #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:43
const RecHitContainer no_recHits_
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
Definition: GenericDigi.h:40
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