CMS 3D CMS Logo

GEMSimHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_MuonHits_GEMSimHitMatcher_h
2 #define Validation_MuonHits_GEMSimHitMatcher_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(int gem_type = MuonHitHelper::GEM_ALL) const;
30 
31  // chamber detIds with SimHits
32  std::set<unsigned int> chamberIds(int gem_type = MuonHitHelper::GEM_ALL) const;
33 
34  // GEM detid's with hits in 2 layers of coincidence pads
35  // those are layer==1 only detid's
36  std::set<unsigned int> detIdsCoincidences() const;
37 
38  // GEM superchamber detIds with SimHits
39  std::set<unsigned int> superChamberIds() const;
40 
41  // GEM superchamber detIds with SimHits 2 layers of coincidence pads
42  std::set<unsigned int> superChamberIdsCoincidences() const;
43 
44  // simhits from a particular superchamber
45  const edm::PSimHitContainer& hitsInSuperChamber(unsigned int) const;
46 
47  // was there a hit in a particular station?
48  bool hitStation(int, int) const;
49 
50  // number of stations with hits in at least X layers
51  int nStations(int nl = 2) const;
52 
53  // #layers with hits
54  int nLayersWithHitsInSuperChamber(unsigned int) const;
55 
56  // How many pads with simhits in GEM did this simtrack get?
57  int nPadsWithHits() const;
58 
59  // How many coincidence pads with simhits in GEM did this simtrack get?
60  int nCoincidencePadsWithHits() const;
61 
62  // transverse position in GEM
63  float simHitsGEMCentralPosition(const edm::PSimHitContainer& sim_hits) const;
64 
65  // calculate average strip number for a provided collection of simhits
66  float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
67 
68  std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
69  std::set<int> hitPadsInDetId(unsigned int) const;
70  std::set<int> hitCoPadsInDetId(unsigned int) const;
71 
72  // what unique partitions numbers were hit by this simtrack?
73  std::set<int> hitPartitions() const;
74 
75 private:
77 
79 
80  std::map<unsigned int, edm::PSimHitContainer> superchamber_to_hits_;
81 
82  // detids with hits in pads
83  std::map<unsigned int, std::set<int> > detids_to_pads_;
84 
85  // detids with hits in 2-layer pad coincidences
86  std::map<unsigned int, std::set<int> > detids_to_copads_;
87 };
88 
89 #endif
SimVertex
Definition: SimVertex.h:5
GEMSimHitMatcher::nLayersWithHitsInSuperChamber
int nLayersWithHitsInSuperChamber(unsigned int) const
Definition: GEMSimHitMatcher.cc:222
GEMSimHitMatcher::superChamberIdsCoincidences
std::set< unsigned int > superChamberIdsCoincidences() const
Definition: GEMSimHitMatcher.cc:202
GEMSimHitMatcher::detIdsCoincidences
std::set< unsigned int > detIdsCoincidences() const
Definition: GEMSimHitMatcher.cc:174
GEMSimHitMatcher::gem_geom_
edm::ESHandle< GEMGeometry > gem_geom_
Definition: GEMSimHitMatcher.h:78
GEMSimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: GEMSimHitMatcher.cc:16
findQualityFiles.v
v
Definition: findQualityFiles.py:179
GEMSimHitMatcher::nCoincidencePadsWithHits
int nCoincidencePadsWithHits() const
Definition: GEMSimHitMatcher.cc:340
MuonSimHitMatcher.h
GEMSimHitMatcher::hitStation
bool hitStation(int, int) const
Definition: GEMSimHitMatcher.cc:232
GEMSimHitMatcher::superChamberIds
std::set< unsigned int > superChamberIds() const
Definition: GEMSimHitMatcher.cc:195
GEMSimHitMatcher::hitCoPadsInDetId
std::set< int > hitCoPadsInDetId(unsigned int) const
Definition: GEMSimHitMatcher.cc:313
GEMSimHitMatcher::hitPartitions
std::set< int > hitPartitions() const
Definition: GEMSimHitMatcher.cc:320
GEMSimHitMatcher::GEMSimHitMatcher
GEMSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: GEMSimHitMatcher.cc:5
edm::ESHandle< GEMGeometry >
GEMSimHitMatcher::nStations
int nStations(int nl=2) const
Definition: GEMSimHitMatcher.cc:247
OrderedSet.t
t
Definition: OrderedSet.py:90
GEMSimHitMatcher::detIds
std::set< unsigned int > detIds(int gem_type=MuonHitHelper::GEM_ALL) const
Definition: GEMSimHitMatcher.cc:160
edm::ParameterSet
Definition: ParameterSet.h:36
GEMSimHitMatcher::simHitsMeanStrip
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
Definition: GEMSimHitMatcher.cc:270
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:33
GEMSimHitMatcher
Definition: GEMSimHitMatcher.h:14
edm::EventSetup
Definition: EventSetup.h:57
GEMSimHitMatcher::superchamber_to_hits_
std::map< unsigned int, edm::PSimHitContainer > superchamber_to_hits_
Definition: GEMSimHitMatcher.h:80
GEMGeometry.h
SimTrack
Definition: SimTrack.h:6
GEMSimHitMatcher::detids_to_copads_
std::map< unsigned int, std::set< int > > detids_to_copads_
Definition: GEMSimHitMatcher.h:86
GEMSimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: GEMSimHitMatcher.cc:65
GEMSimHitMatcher::simHitsGEMCentralPosition
float simHitsGEMCentralPosition(const edm::PSimHitContainer &sim_hits) const
Definition: GEMSimHitMatcher.cc:249
GEMSimHitMatcher::hitPadsInDetId
std::set< int > hitPadsInDetId(unsigned int) const
Definition: GEMSimHitMatcher.cc:306
MuonHitHelper::GEM_ALL
Definition: MuonHitHelper.h:30
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
GEMSimHitMatcher::chamberIds
std::set< unsigned int > chamberIds(int gem_type=MuonHitHelper::GEM_ALL) const
Definition: GEMSimHitMatcher.cc:181
GEMSimHitMatcher::hitsInSuperChamber
const edm::PSimHitContainer & hitsInSuperChamber(unsigned int) const
Definition: GEMSimHitMatcher.cc:211
edm::Event
Definition: Event.h:73
GEMSimHitMatcher::hitStripsInDetId
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
Definition: GEMSimHitMatcher.cc:287
GEMSimHitMatcher::nPadsWithHits
int nPadsWithHits() const
Definition: GEMSimHitMatcher.cc:331
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
GEMSimHitMatcher::detids_to_pads_
std::map< unsigned int, std::set< int > > detids_to_pads_
Definition: GEMSimHitMatcher.h:83
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
GEMSimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: GEMSimHitMatcher.cc:28
GEMSimHitMatcher::~GEMSimHitMatcher
~GEMSimHitMatcher()
Definition: GEMSimHitMatcher.h:20