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
DTSimHitMatcher::hitsInSuperLayer
const edm::PSimHitContainer & hitsInSuperLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:118
DTSimHitMatcher::hitWiresInDTSuperLayerId
std::set< unsigned int > hitWiresInDTSuperLayerId(unsigned int, int margin_n_wires=0) const
Definition: DTSimHitMatcher.cc:257
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:101
DTSimHitMatcher::nLayersWithHitsInChamber
int nLayersWithHitsInChamber(unsigned int) const
Definition: DTSimHitMatcher.cc:200
SimVertex
Definition: SimVertex.h:5
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DTSimHitMatcher
Definition: DTSimHitMatcher.h:16
DTSimHitMatcher::dtChamberIdsToString
void dtChamberIdsToString(const std::set< unsigned int > &) const
Definition: DTSimHitMatcher.cc:281
DTSimHitMatcher::layer_to_hits_
std::map< unsigned int, edm::PSimHitContainer > layer_to_hits_
Definition: DTSimHitMatcher.h:75
DTSimHitMatcher::layerIds
std::set< unsigned int > layerIds() const
Definition: DTSimHitMatcher.cc:94
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTSimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: DTSimHitMatcher.cc:23
findQualityFiles.v
v
Definition: findQualityFiles.py:179
DTSimHitMatcher::hitsInLayer
const edm::PSimHitContainer & hitsInLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:108
ESGetToken.h
MuonSimHitMatcher.h
DTSimHitMatcher::nStations
int nStations(int nsl=1, int nl=3) const
Definition: DTSimHitMatcher.cc:159
DTSimHitMatcher::simHitsMeanWire
float simHitsMeanWire(const edm::PSimHitContainer &sim_hits) const
Definition: DTSimHitMatcher.cc:208
DTSimHitMatcher::nCellsWithHitsInLayer
int nCellsWithHitsInLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:164
DTSimHitMatcher::nSuperLayersWithHitsInChamber
int nSuperLayersWithHitsInChamber(unsigned int) const
Definition: DTSimHitMatcher.cc:188
DTSimHitMatcher::chamberIdsStation
std::set< unsigned int > chamberIdsStation(int station) const
Definition: DTSimHitMatcher.cc:288
Point3DBase< float, GlobalTag >
DTSimHitMatcher::chamberIds
std::set< unsigned int > chamberIds(int type=MuonHitHelper::DT_ALL) const
Definition: DTSimHitMatcher.cc:80
DTGeometry.h
DTSimHitMatcher::~DTSimHitMatcher
~DTSimHitMatcher()
Definition: DTSimHitMatcher.h:22
edm::ParameterSet
Definition: ParameterSet.h:47
DTSimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: DTSimHitMatcher.cc:44
DTSimHitMatcher::simHitsMeanPositionStation
GlobalPoint simHitsMeanPositionStation(int n) const
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:32
DTSimHitMatcher::detIds
std::set< unsigned int > detIds(int type=MuonHitHelper::DT_ALL) const
Definition: DTSimHitMatcher.cc:66
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
DTSimHitMatcher::nLayersWithHitsInSuperLayer
int nLayersWithHitsInSuperLayer(unsigned int) const
Definition: DTSimHitMatcher.cc:176
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< DTGeometry, MuonGeometryRecord >
DTSimHitMatcher::geomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > geomToken_
Definition: DTSimHitMatcher.h:78
DTSimHitMatcher::hitWiresInDTLayerId
std::set< unsigned int > hitWiresInDTLayerId(unsigned int, int margin_n_wires=0) const
Definition: DTSimHitMatcher.cc:231
SimTrack
Definition: SimTrack.h:9
MuonHitHelper::DT_ALL
Definition: MuonHitHelper.h:69
DTSimHitMatcher::superlayer_to_hits_
std::map< unsigned int, edm::PSimHitContainer > superlayer_to_hits_
Definition: DTSimHitMatcher.h:76
DTSimHitMatcher::hitStation
bool hitStation(int, int, int) const
Definition: DTSimHitMatcher.cc:138
DTSimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: DTSimHitMatcher.cc:17
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
MuonGeometryRecord.h
DTSimHitMatcher::hitsInChamber
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
Definition: DTSimHitMatcher.cc:128
edm::Event
Definition: Event.h:73
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
DTSimHitMatcher::hitWiresInDTChamberId
std::set< unsigned int > hitWiresInDTChamberId(unsigned int, int margin_n_wires=0) const
Definition: DTSimHitMatcher.cc:269
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37