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 
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
ME0SimHitMatcher::simHitsMeanStrip
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
Definition: ME0SimHitMatcher.cc:137
ME0SimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: ME0SimHitMatcher.cc:17
SimVertex
Definition: SimVertex.h:5
ME0SimHitMatcher
Definition: ME0SimHitMatcher.h:16
ME0SimHitMatcher::superChamberIdsCoincidences
std::set< unsigned int > superChamberIdsCoincidences(int min_n_layers=4) const
Definition: ME0SimHitMatcher.cc:122
ME0SimHitMatcher::detids_to_copads_
std::map< unsigned int, std::set< int > > detids_to_copads_
Definition: ME0SimHitMatcher.h:73
ME0SimHitMatcher::ME0SimHitMatcher
ME0SimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: ME0SimHitMatcher.cc:5
ME0SimHitMatcher::~ME0SimHitMatcher
~ME0SimHitMatcher()
Definition: ME0SimHitMatcher.h:22
ME0SimHitMatcher::nCoincidenceChambers
int nCoincidenceChambers(int min_n_layers=4) const
Definition: ME0SimHitMatcher.cc:133
findQualityFiles.v
v
Definition: findQualityFiles.py:179
ME0SimHitMatcher::superChamberIds
std::set< unsigned int > superChamberIds() const
Definition: ME0SimHitMatcher.cc:99
ESGetToken.h
MuonSimHitMatcher.h
ME0SimHitMatcher::hitStripsInDetId
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
Definition: ME0SimHitMatcher.cc:156
ME0SimHitMatcher::hitPartitions
std::set< int > hitPartitions() const
Definition: ME0SimHitMatcher.cc:182
ME0SimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: ME0SimHitMatcher.cc:23
ME0SimHitMatcher::chamberIds
std::set< unsigned int > chamberIds() const
Definition: ME0SimHitMatcher.cc:92
ME0SimHitMatcher::hitsInSuperChamber
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const
Definition: ME0SimHitMatcher.cc:106
ME0SimHitMatcher::superChamber_to_hits_
std::map< unsigned int, edm::PSimHitContainer > superChamber_to_hits_
Definition: ME0SimHitMatcher.h:75
ME0SimHitMatcher::geomToken_
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > geomToken_
Definition: ME0SimHitMatcher.h:67
edm::ParameterSet
Definition: ParameterSet.h:47
ME0SimHitMatcher::hitPadsInDetId
std::set< int > hitPadsInDetId(unsigned int) const
Definition: ME0SimHitMatcher.cc:175
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:32
edm::EventSetup
Definition: EventSetup.h:57
edm::ESGetToken< ME0Geometry, MuonGeometryRecord >
ME0Geometry.h
SimTrack
Definition: SimTrack.h:6
ME0SimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: ME0SimHitMatcher.cc:49
ME0SimHitMatcher::nLayersWithHitsInSuperChamber
int nLayersWithHitsInSuperChamber(unsigned int) const
Definition: ME0SimHitMatcher.cc:112
ME0SimHitMatcher::detids_to_pads_
std::map< unsigned int, std::set< int > > detids_to_pads_
Definition: ME0SimHitMatcher.h:70
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
MuonGeometryRecord.h
ME0SimHitMatcher::nPadsWithHits
int nPadsWithHits() const
Definition: ME0SimHitMatcher.cc:193
edm::Event
Definition: Event.h:73
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
ME0SimHitMatcher::detIds
std::set< unsigned int > detIds() const
Definition: ME0SimHitMatcher.cc:85
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37