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