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(int min_n_layers = 4) const;
45 
46  // How many ME0 chambers with minimum number of layer with simhits did this
47  // simtrack get?
48  int nCoincidenceChambers(int min_n_layers = 4) const;
49 
50  // calculate average strip for a provided collection of simhits
51  float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
52 
53  std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
54  std::set<int> hitPadsInDetId(unsigned int) const;
55 
56  // what unique partitions numbers were hit by this simtrack?
57  std::set<int> hitPartitions() const;
58 
59  // How many pads with simhits in ME0 did this simtrack get?
60  int nPadsWithHits() const;
61 
62 private:
64 
66 
67  // detids with hits in pads
68  std::map<unsigned int, std::set<int> > detids_to_pads_;
69 
70  // detids with hits in 2-layer pad coincidences
71  std::map<unsigned int, std::set<int> > detids_to_copads_;
72 
73  std::map<unsigned int, edm::PSimHitContainer> superChamber_to_hits_;
74 };
75 
76 #endif
ME0SimHitMatcher::simHitsMeanStrip
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
Definition: ME0SimHitMatcher.cc:145
ME0SimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: ME0SimHitMatcher.cc:16
SimVertex
Definition: SimVertex.h:5
ME0SimHitMatcher
Definition: ME0SimHitMatcher.h:14
ME0SimHitMatcher::superChamberIdsCoincidences
std::set< unsigned int > superChamberIdsCoincidences(int min_n_layers=4) const
Definition: ME0SimHitMatcher.cc:130
ME0SimHitMatcher::detids_to_copads_
std::map< unsigned int, std::set< int > > detids_to_copads_
Definition: ME0SimHitMatcher.h:71
ME0SimHitMatcher::ME0SimHitMatcher
ME0SimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: ME0SimHitMatcher.cc:5
ME0SimHitMatcher::~ME0SimHitMatcher
~ME0SimHitMatcher()
Definition: ME0SimHitMatcher.h:20
ME0SimHitMatcher::nCoincidenceChambers
int nCoincidenceChambers(int min_n_layers=4) const
Definition: ME0SimHitMatcher.cc:141
findQualityFiles.v
v
Definition: findQualityFiles.py:179
ME0SimHitMatcher::superChamberIds
std::set< unsigned int > superChamberIds() const
Definition: ME0SimHitMatcher.cc:107
MuonSimHitMatcher.h
ME0SimHitMatcher::hitStripsInDetId
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
Definition: ME0SimHitMatcher.cc:164
ME0SimHitMatcher::hitPartitions
std::set< int > hitPartitions() const
Definition: ME0SimHitMatcher.cc:190
ME0SimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: ME0SimHitMatcher.cc:28
ME0SimHitMatcher::chamberIds
std::set< unsigned int > chamberIds() const
Definition: ME0SimHitMatcher.cc:100
edm::ESHandle< ME0Geometry >
ME0SimHitMatcher::hitsInSuperChamber
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const
Definition: ME0SimHitMatcher.cc:114
OrderedSet.t
t
Definition: OrderedSet.py:90
ME0SimHitMatcher::superChamber_to_hits_
std::map< unsigned int, edm::PSimHitContainer > superChamber_to_hits_
Definition: ME0SimHitMatcher.h:73
edm::ParameterSet
Definition: ParameterSet.h:36
ME0SimHitMatcher::hitPadsInDetId
std::set< int > hitPadsInDetId(unsigned int) const
Definition: ME0SimHitMatcher.cc:183
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:33
edm::EventSetup
Definition: EventSetup.h:57
ME0Geometry.h
ME0SimHitMatcher::me0_geom_
edm::ESHandle< ME0Geometry > me0_geom_
Definition: ME0SimHitMatcher.h:65
SimTrack
Definition: SimTrack.h:6
ME0SimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: ME0SimHitMatcher.cc:57
ME0SimHitMatcher::nLayersWithHitsInSuperChamber
int nLayersWithHitsInSuperChamber(unsigned int) const
Definition: ME0SimHitMatcher.cc:120
ME0SimHitMatcher::detids_to_pads_
std::map< unsigned int, std::set< int > > detids_to_pads_
Definition: ME0SimHitMatcher.h:68
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
ME0SimHitMatcher::nPadsWithHits
int nPadsWithHits() const
Definition: ME0SimHitMatcher.cc:201
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
ME0SimHitMatcher::detIds
std::set< unsigned int > detIds() const
Definition: ME0SimHitMatcher.cc:93
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37