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(unsigned int, int margin_n_wires = 0) const; // DT
65  std::set<unsigned int> hitWiresInDTSuperLayerId(unsigned int, int margin_n_wires = 0) const; // DT
66  std::set<unsigned int> hitWiresInDTChamberId(unsigned int, int margin_n_wires = 0) const; // DT
67 
68  void dtChamberIdsToString(const std::set<unsigned int>&) const;
69 
70 private:
72 
73  std::map<unsigned int, edm::PSimHitContainer> layer_to_hits_;
74  std::map<unsigned int, edm::PSimHitContainer> superlayer_to_hits_;
75 
77 };
78 
79 #endif
DTSimHitMatcher::hitsInSuperLayer
const edm::PSimHitContainer & hitsInSuperLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:126
DTSimHitMatcher::dt_geom_
edm::ESHandle< DTGeometry > dt_geom_
Definition: DTSimHitMatcher.h:76
DTSimHitMatcher::hitWiresInDTSuperLayerId
std::set< unsigned int > hitWiresInDTSuperLayerId(unsigned int, int margin_n_wires=0) const
Definition: DTSimHitMatcher.cc:265
DTSimHitMatcher::DTSimHitMatcher
DTSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: DTSimHitMatcher.cc:5
DTSimHitMatcher::superlayerIds
std::set< unsigned int > superlayerIds() const
Definition: DTSimHitMatcher.cc:109
DTSimHitMatcher::nLayersWithHitsInChamber
int nLayersWithHitsInChamber(unsigned int) const
Definition: DTSimHitMatcher.cc:208
SimVertex
Definition: SimVertex.h:5
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DTSimHitMatcher
Definition: DTSimHitMatcher.h:14
DTSimHitMatcher::dtChamberIdsToString
void dtChamberIdsToString(const std::set< unsigned int > &) const
Definition: DTSimHitMatcher.cc:289
DTSimHitMatcher::layer_to_hits_
std::map< unsigned int, edm::PSimHitContainer > layer_to_hits_
Definition: DTSimHitMatcher.h:73
DTSimHitMatcher::layerIds
std::set< unsigned int > layerIds() const
Definition: DTSimHitMatcher.cc:102
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTSimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: DTSimHitMatcher.cc:28
findQualityFiles.v
v
Definition: findQualityFiles.py:179
DTSimHitMatcher::hitsInLayer
const edm::PSimHitContainer & hitsInLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:116
MuonSimHitMatcher.h
DTSimHitMatcher::nStations
int nStations(int nsl=1, int nl=3) const
Definition: DTSimHitMatcher.cc:167
DTSimHitMatcher::simHitsMeanWire
float simHitsMeanWire(const edm::PSimHitContainer &sim_hits) const
Definition: DTSimHitMatcher.cc:216
DTSimHitMatcher::nCellsWithHitsInLayer
int nCellsWithHitsInLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:172
DTSimHitMatcher::nSuperLayersWithHitsInChamber
int nSuperLayersWithHitsInChamber(unsigned int) const
Definition: DTSimHitMatcher.cc:196
DTSimHitMatcher::chamberIdsStation
std::set< unsigned int > chamberIdsStation(int station) const
Definition: DTSimHitMatcher.cc:296
edm::ESHandle< DTGeometry >
Point3DBase< float, GlobalTag >
OrderedSet.t
t
Definition: OrderedSet.py:90
DTSimHitMatcher::chamberIds
std::set< unsigned int > chamberIds(int type=MuonHitHelper::DT_ALL) const
Definition: DTSimHitMatcher.cc:88
DTGeometry.h
DTSimHitMatcher::~DTSimHitMatcher
~DTSimHitMatcher()
Definition: DTSimHitMatcher.h:20
edm::ParameterSet
Definition: ParameterSet.h:36
DTSimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: DTSimHitMatcher.cc:52
DTSimHitMatcher::simHitsMeanPositionStation
GlobalPoint simHitsMeanPositionStation(int n) const
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:33
DTSimHitMatcher::detIds
std::set< unsigned int > detIds(int type=MuonHitHelper::DT_ALL) const
Definition: DTSimHitMatcher.cc:74
DTSimHitMatcher::nLayersWithHitsInSuperLayer
int nLayersWithHitsInSuperLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:184
edm::EventSetup
Definition: EventSetup.h:57
DTSimHitMatcher::hitWiresInDTLayerId
std::set< unsigned int > hitWiresInDTLayerId(unsigned int, int margin_n_wires=0) const
Definition: DTSimHitMatcher.cc:239
type
type
Definition: HCALResponse.h:21
SimTrack
Definition: SimTrack.h:6
MuonHitHelper::DT_ALL
Definition: MuonHitHelper.h:69
options_cfi.eventSetup
eventSetup
Definition: options_cfi.py:12
DTSimHitMatcher::superlayer_to_hits_
std::map< unsigned int, edm::PSimHitContainer > superlayer_to_hits_
Definition: DTSimHitMatcher.h:74
DTSimHitMatcher::hitStation
bool hitStation(int, int, int) const
Definition: DTSimHitMatcher.cc:146
DTSimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: DTSimHitMatcher.cc:16
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
DTSimHitMatcher::hitsInChamber
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
Definition: DTSimHitMatcher.cc:136
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
DTSimHitMatcher::hitWiresInDTChamberId
std::set< unsigned int > hitWiresInDTChamberId(unsigned int, int margin_n_wires=0) const
Definition: DTSimHitMatcher.cc:277
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37