CMS 3D CMS Logo

ME0SimHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_MuonHits_ME0SimHitMatcher_h
2 #define Validation_MuonHits_ME0SimHitMatcher_h
3 
13 
15  public:
16  // constructor
18 
19  // destructor
21 
22  // initialize the event
23  void init(const edm::Event& e, const edm::EventSetup& eventSetup);
24 
25  // do the matching
26  void match(const SimTrack& t, const SimVertex& v);
27 
28  // partitions' detIds with SimHits
29  std::set<unsigned int> detIds() const;
30 
31  // chamber detIds with SimHits
32  std::set<unsigned int> chamberIds() const;
33 
34  // ME0 superchamber detIds with SimHits
35  std::set<unsigned int> superChamberIds() const;
36 
37  // simhits from a particular partition, chamber
38  const edm::PSimHitContainer& hitsInSuperChamber(unsigned int) const;
39 
40  // #layers with hits
41  int nLayersWithHitsInSuperChamber(unsigned int) const;
42 
43  // ME0 superchamber detIds with SimHits >=4 layers of coincidence pads
44  std::set<unsigned int> superChamberIdsCoincidences(
45  int min_n_layers = 4) const;
46 
47  // How many ME0 chambers with minimum number of layer with simhits did this
48  // simtrack get?
49  int nCoincidenceChambers(int min_n_layers = 4) const;
50 
51  // calculate average strip for a provided collection of simhits
52  float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
53 
54  std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
55  std::set<int> hitPadsInDetId(unsigned int) const;
56 
57  // what unique partitions numbers were hit by this simtrack?
58  std::set<int> hitPartitions() const;
59 
60  // How many pads with simhits in ME0 did this simtrack get?
61  int nPadsWithHits() const;
62 
63  private:
65 
67 
68  // detids with hits in pads
69  std::map<unsigned int, std::set<int> > detids_to_pads_;
70 
71  // detids with hits in 2-layer pad coincidences
72  std::map<unsigned int, std::set<int> > detids_to_copads_;
73 
74  std::map<unsigned int, edm::PSimHitContainer> superChamber_to_hits_;
75 };
76 
77 #endif
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
std::set< int > hitPartitions() const
std::set< unsigned int > chamberIds() const
std::set< int > hitPadsInDetId(unsigned int) const
std::set< unsigned int > superChamberIdsCoincidences(int min_n_layers=4) const
std::map< unsigned int, std::set< int > > detids_to_pads_
edm::ESHandle< ME0Geometry > me0_geom_
int nPadsWithHits() const
int nCoincidenceChambers(int min_n_layers=4) const
std::set< unsigned int > detIds() const
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
std::map< unsigned int, std::set< int > > detids_to_copads_
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
ME0SimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
int nLayersWithHitsInSuperChamber(unsigned int) const
void match(const SimTrack &t, const SimVertex &v)
do the matching
std::set< unsigned int > superChamberIds() const
std::vector< PSimHit > PSimHitContainer
std::map< unsigned int, edm::PSimHitContainer > superChamber_to_hits_
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const