CMS 3D CMS Logo

DTSimHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_MuonHits_DTSimHitMatcher_h
2 #define Validation_MuonHits_DTSimHitMatcher_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(int type = MuonHitHelper::DT_ALL) const;
32 
33  // chamber detIds with SimHits
34  std::set<unsigned int> chamberIds(int type = MuonHitHelper::DT_ALL) const;
35 
36  // DT station detIds with SimHits
37  std::set<unsigned int> chamberIdsStation(int station) const;
38 
39  // DT layer detIds with SimHits
40  std::set<unsigned int> layerIds() const;
41 
42  // DT super layer detIds with SimHits
43  std::set<unsigned int> superlayerIds() const;
44 
45  // was there a hit in a particular DT/CSC station?
46  bool hitStation(int, int, int) const;
47 
48  // number of stations with hits in at least X layers
49  int nStations(int nsl = 1, int nl = 3) const;
50 
51  // access to DT hits
52  int nCellsWithHitsInLayer(unsigned int) const;
53  int nLayersWithHitsInSuperLayer(unsigned int) const;
54  int nSuperLayersWithHitsInChamber(unsigned int) const;
55  int nLayersWithHitsInChamber(unsigned int) const;
56  const edm::PSimHitContainer& hitsInLayer(unsigned int) const;
57  const edm::PSimHitContainer& hitsInSuperLayer(unsigned int) const;
58  const edm::PSimHitContainer& hitsInChamber(unsigned int) const;
59 
60  // calculate average wg number for a provided collection of simhits
61  float simHitsMeanWire(const edm::PSimHitContainer& sim_hits) const;
62 
63  // calculate the average position at the second station
65 
66  std::set<unsigned int> hitWiresInDTLayerId(unsigned int, int margin_n_wires = 0) const; // DT
67  std::set<unsigned int> hitWiresInDTSuperLayerId(unsigned int, int margin_n_wires = 0) const; // DT
68  std::set<unsigned int> hitWiresInDTChamberId(unsigned int, int margin_n_wires = 0) const; // DT
69 
70  void dtChamberIdsToString(const std::set<unsigned int>&) const;
71 
72 private:
74 
75  std::map<unsigned int, edm::PSimHitContainer> layer_to_hits_;
76  std::map<unsigned int, edm::PSimHitContainer> superlayer_to_hits_;
77 
79 };
80 
81 #endif
std::set< unsigned int > hitWiresInDTChamberId(unsigned int, int margin_n_wires=0) const
const edm::PSimHitContainer & hitsInLayer(unsigned int) const
void dtChamberIdsToString(const std::set< unsigned int > &) const
std::set< unsigned int > layerIds() const
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
void matchSimHitsToSimTrack()
int nLayersWithHitsInChamber(unsigned int) const
float simHitsMeanWire(const edm::PSimHitContainer &sim_hits) const
int nStations(int nsl=1, int nl=3) const
DTSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
int nSuperLayersWithHitsInChamber(unsigned int) const
GlobalPoint simHitsMeanPositionStation(int n) const
int nLayersWithHitsInSuperLayer(unsigned int) const
std::set< unsigned int > chamberIds(int type=MuonHitHelper::DT_ALL) const
std::set< unsigned int > detIds(int type=MuonHitHelper::DT_ALL) const
void match(const SimTrack &t, const SimVertex &v)
do the matching
std::set< unsigned int > hitWiresInDTLayerId(unsigned int, int margin_n_wires=0) const
bool hitStation(int, int, int) const
int nCellsWithHitsInLayer(unsigned int) const
std::set< unsigned int > superlayerIds() const
std::map< unsigned int, edm::PSimHitContainer > superlayer_to_hits_
const edm::PSimHitContainer & hitsInSuperLayer(unsigned int) const
std::vector< PSimHit > PSimHitContainer
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
std::set< unsigned int > hitWiresInDTSuperLayerId(unsigned int, int margin_n_wires=0) const
std::set< unsigned int > chamberIdsStation(int station) const
edm::ESGetToken< DTGeometry, MuonGeometryRecord > geomToken_
std::map< unsigned int, edm::PSimHitContainer > layer_to_hits_