CMS 3D CMS Logo

MuonSimHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_MuonHits_MuonSimHitMatcher_h
2 #define Validation_MuonHits_MuonSimHitMatcher_h
3 
27 
28 #include <map>
29 #include <set>
30 #include <vector>
31 
33 public:
34  // constructor
36 
37  // destructor
39 
40  // initialize the event
41  void init(const edm::Event& e, const edm::EventSetup& eventSetup);
42 
43  // do the matching
44  void match(const SimTrack& t, const SimVertex& v);
45 
46  // access to all the Muon SimHits (use MuonSubdetId::SubSystem)
47  const edm::PSimHitContainer& simHits(int) const;
48 
49  // partitions' detIds with SimHits
50  std::set<unsigned int> detIds(int type = 0) const;
51 
52  // chamber detIds with SimHits
53  std::set<unsigned int> chamberIds(int type = 0) const;
54 
55  // simhits from a particular partition, chamber
56  const edm::PSimHitContainer& hitsInDetId(unsigned int) const;
57  const edm::PSimHitContainer& hitsInChamber(unsigned int) const;
58 
59  // calculate Global average position for a provided collection of simhits
61 
62  // calculate Global average momentum for a provided collection of simhits in
63  // CSC
65 
66  // calculate the average position at the second station
68 
69  const TrackingGeometry* geometry() { return geometry_; }
70 
71 protected:
72  std::vector<unsigned int> getIdsOfSimTrackShower(unsigned trk_id,
75 
76  void clear();
77 
79  bool simMuOnly_;
81  bool verbose_;
83 
85 
89 
93 
96  // input collection
98 
99  std::vector<unsigned> track_ids_;
100  std::map<unsigned int, unsigned int> trkid_to_index_;
101 
103 
104  // selected hits
106  std::map<unsigned int, edm::PSimHitContainer> detid_to_hits_;
107  std::map<unsigned int, edm::PSimHitContainer> chamber_to_hits_;
108 
110 };
111 
112 #endif
Vector3DBase
Definition: Vector3DBase.h:8
MuonSimHitMatcher::simHitsMeanMomentum
GlobalVector simHitsMeanMomentum(const edm::PSimHitContainer &sim_hits) const
Definition: MuonSimHitMatcher.cc:119
MuonSimHitMatcher::clear
void clear()
Definition: MuonSimHitMatcher.cc:139
MuonSimHitMatcher::simVerticesH_
edm::Handle< edm::SimVertexContainer > simVerticesH_
Definition: MuonSimHitMatcher.h:91
SimVertex
Definition: SimVertex.h:5
MessageLogger.h
MuonSimHitMatcher::geometry
const TrackingGeometry * geometry()
Definition: MuonSimHitMatcher.h:69
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
TrackingGeometry
Definition: TrackingGeometry.h:26
MuonSimHitMatcher::geometry_
const TrackingGeometry * geometry_
Definition: MuonSimHitMatcher.h:84
deltaPhi.h
edm::EDGetTokenT< edm::SimVertexContainer >
MuonSimHitMatcher::verbose_
bool verbose_
Definition: MuonSimHitMatcher.h:81
PSimHitContainer.h
MuonSimHitMatcher::detid_to_hits_
std::map< unsigned int, edm::PSimHitContainer > detid_to_hits_
Definition: MuonSimHitMatcher.h:106
MuonSimHitMatcher::~MuonSimHitMatcher
~MuonSimHitMatcher()
Definition: MuonSimHitMatcher.h:38
MuonSimHitMatcher::simHitsMeanPosition
GlobalPoint simHitsMeanPosition(const edm::PSimHitContainer &sim_hits) const
Definition: MuonSimHitMatcher.cc:99
MuonSimHitMatcher::simTracks_
edm::SimTrackContainer simTracks_
Definition: MuonSimHitMatcher.h:94
TrackCandidateProducer_cfi.simTracks
simTracks
Definition: TrackCandidateProducer_cfi.py:15
TrackingGeometry.h
findQualityFiles.v
v
Definition: findQualityFiles.py:179
MuonSimHitMatcher::detIds
std::set< unsigned int > detIds(int type=0) const
edm::Handle< edm::SimTrackContainer >
MuonSimHitMatcher::chamberIds
std::set< unsigned int > chamberIds(int type=0) const
MuonSimHitMatcher::simHits_
edm::PSimHitContainer simHits_
Definition: MuonSimHitMatcher.h:97
MuonSimHitMatcher::simVertices_
edm::SimVertexContainer simVertices_
Definition: MuonSimHitMatcher.h:95
MuonSimHitMatcher::simVertexInput_
edm::EDGetTokenT< edm::SimVertexContainer > simVertexInput_
Definition: MuonSimHitMatcher.h:86
MuonSimHitMatcher::simHitsMeanPositionStation
GlobalPoint simHitsMeanPositionStation(int n) const
MuonSimHitMatcher::simHitPSet_
edm::ParameterSet simHitPSet_
Definition: MuonSimHitMatcher.h:109
MuonSimHitMatcher::simHits
const edm::PSimHitContainer & simHits(int) const
Definition: MuonSimHitMatcher.cc:85
MuonSimHitMatcher::trkid_to_index_
std::map< unsigned int, unsigned int > trkid_to_index_
Definition: MuonSimHitMatcher.h:100
Point3DBase< float, GlobalTag >
MuonSimHitMatcher::track_ids_
std::vector< unsigned > track_ids_
Definition: MuonSimHitMatcher.h:99
MuonSimHitMatcher::no_hits_
edm::PSimHitContainer no_hits_
Definition: MuonSimHitMatcher.h:102
MuonSimHitMatcher::discardEleHits_
bool discardEleHits_
Definition: MuonSimHitMatcher.h:80
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:32
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
MuonSimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: MuonSimHitMatcher.cc:26
MuonSimHitMatcher::hasGeometry_
bool hasGeometry_
Definition: MuonSimHitMatcher.h:82
MuonSimHitMatcher::chamber_to_hits_
std::map< unsigned int, edm::PSimHitContainer > chamber_to_hits_
Definition: MuonSimHitMatcher.h:107
edm::EventSetup
Definition: EventSetup.h:57
MuonSimHitMatcher::verboseSimTrack_
bool verboseSimTrack_
Definition: MuonSimHitMatcher.h:78
MuonSimHitMatcher::simHitInput_
edm::EDGetTokenT< edm::PSimHitContainer > simHitInput_
Definition: MuonSimHitMatcher.h:88
InputTag.h
MuonSimHitMatcher::hitsInDetId
const edm::PSimHitContainer & hitsInDetId(unsigned int) const
Definition: MuonSimHitMatcher.cc:87
MuonSimHitMatcher::simTracksH_
edm::Handle< edm::SimTrackContainer > simTracksH_
Definition: MuonSimHitMatcher.h:90
TrapezoidalStripTopology.h
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
SimTrack
Definition: SimTrack.h:6
Frameworkfwd.h
MuonSimHitMatcher::getIdsOfSimTrackShower
std::vector< unsigned int > getIdsOfSimTrackShower(unsigned trk_id, const edm::SimTrackContainer &simTracks, const edm::SimVertexContainer &simVertices)
Definition: MuonSimHitMatcher.cc:47
EventSetup.h
MuonSimHitMatcher::simMuOnly_
bool simMuOnly_
Definition: MuonSimHitMatcher.h:79
MuonSimHitMatcher::simHitsH_
edm::Handle< edm::PSimHitContainer > simHitsH_
Definition: MuonSimHitMatcher.h:92
MuonSimHitMatcher::hitsInChamber
const edm::PSimHitContainer & hitsInChamber(unsigned int) const
Definition: MuonSimHitMatcher.cc:93
MuonSimHitMatcher::simTrackInput_
edm::EDGetTokenT< edm::SimTrackContainer > simTrackInput_
Definition: MuonSimHitMatcher.h:87
ConsumesCollector.h
HGCalValidator_cfi.simVertices
simVertices
Definition: HGCalValidator_cfi.py:43
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
ParameterSet.h
MuonGeometryRecord.h
MuonHitHelper.h
MuonSimHitMatcher::hits_
edm::PSimHitContainer hits_
Definition: MuonSimHitMatcher.h:105
edm::Event
Definition: Event.h:73
MuonSimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: MuonSimHitMatcher.cc:17
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
GlobalPoint.h
SimTrackContainer.h
edm::SimVertexContainer
std::vector< SimVertex > SimVertexContainer
Definition: SimVertexContainer.h:12
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
SimVertexContainer.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
MuonSimHitMatcher::MuonSimHitMatcher
MuonSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: MuonSimHitMatcher.cc:7