CMS 3D CMS Logo

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