CMS 3D CMS Logo

GEMEfficiencyAnalyzer.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Muon_GEMEfficiencyAnalyzer_h
2 #define DQMOffline_Muon_GEMEfficiencyAnalyzer_h
3 
27 
29 public:
30  explicit GEMEfficiencyAnalyzer(const edm::ParameterSet &);
31  ~GEMEfficiencyAnalyzer() override;
33 
34 protected:
35  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
36  void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override;
37 
38 private:
39  struct GEMLayerData {
40  GEMLayerData(Disk::DiskPointer disk, std::vector<const GEMChamber *> chambers, int region, int station, int layer)
43  std::vector<const GEMChamber *> chambers;
45  };
46 
51 
54 
61 
62  inline bool isInsideOut(const reco::Track &);
63 
64  std::vector<GEMLayerData> buildGEMLayers(const edm::ESHandle<GEMGeometry> &);
65  const reco::Track *getTrack(const reco::Muon &);
66  std::pair<TrajectoryStateOnSurface, DetId> getStartingState(const reco::TransientTrack &,
67  const GEMLayerData &,
69  std::pair<TrajectoryStateOnSurface, DetId> findStartingState(const reco::TransientTrack &,
70  const GEMLayerData &,
72  bool isME11(const DetId &);
73  bool skipLayer(const reco::Track *, const GEMLayerData &);
74  bool checkBounds(const GlobalPoint &, const Plane &);
75  const GEMEtaPartition *findEtaPartition(const GlobalPoint &, const std::vector<const GEMChamber *> &);
76  std::pair<const GEMRecHit *, float> findClosetHit(const GlobalPoint &,
78  const GEMEtaPartition *);
79 
80  // data members
81 
82  // parameters
96  std::vector<double> pt_bins_;
98  double eta_low_;
99  double eta_up_;
100 
101  // data mebers derived from parameters
105 
106  // MonitorElement
107  // efficiency
108  MEMap me_muon_pt_; // 1D, region-station
110  MEMap me_muon_eta_; // 1D, region-station
112  MEMap me_muon_phi_; // 1D, region-station
114  MEMap me_chamber_; // 2D, region-station-layer
116  MEMap me_ieta_; // 1D, region-station-layer
118  MEMap me_detector_; // 2D, region-station-layer
120  // resolution
124  // MEs for optimizing cut values
129 
130  // const
131  const std::string kLogCategory_ = "GEMEfficiencyAnalyzer";
132 };
133 
135  return track.innerPosition().mag2() > track.outerPosition().mag2();
136 }
137 
138 #endif // DQMOffline_Muon_GEMEfficiencyAnalyzer_h
ConfigurationDescriptions.h
GEMEfficiencyAnalyzer::me_chamber_
MEMap me_chamber_
Definition: GEMEfficiencyAnalyzer.h:114
GEMEfficiencyAnalyzer::skipLayer
bool skipLayer(const reco::Track *, const GEMLayerData &)
Definition: GEMEfficiencyAnalyzer.cc:685
GEMEfficiencyAnalyzer::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: GEMEfficiencyAnalyzer.cc:353
GEMEfficiencyAnalyzer::use_prop_r_error_cut_
bool use_prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:92
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
GEMEfficiencyAnalyzer::me_ieta_matched_
MEMap me_ieta_matched_
Definition: GEMEfficiencyAnalyzer.h:117
ESHandle.h
edm::Run
Definition: Run.h:45
GEMEfficiencyAnalyzer::me_prop_r_err_
MonitorElement * me_prop_r_err_
Definition: GEMEfficiencyAnalyzer.h:125
GEMEfficiencyAnalyzer::GEMLayerData::station
int station
Definition: GEMEfficiencyAnalyzer.h:44
GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
MonitorElement * me_all_abs_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:127
GEMEfficiencyAnalyzer::getTrack
const reco::Track * getTrack(const reco::Muon &)
Definition: GEMEfficiencyAnalyzer.cc:593
edm::EDGetTokenT< GEMRecHitCollection >
GEMEfficiencyAnalyzer::bookNumerator2D
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:135
GEMEfficiencyAnalyzer::me_muon_pt_matched_
MEMap me_muon_pt_matched_
Definition: GEMEfficiencyAnalyzer.h:109
Muon.h
GEMEfficiencyAnalyzer::me_prop_phi_err_
MonitorElement * me_prop_phi_err_
Definition: GEMEfficiencyAnalyzer.h:126
GEMEtaPartition
Definition: GEMEtaPartition.h:12
GEMOfflineDQMBase
Definition: GEMOfflineDQMBase.h:11
GEMEfficiencyAnalyzer::bookEfficiencyDetector
void bookEfficiencyDetector(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:246
GEMEfficiencyAnalyzer::GEMLayerData::layer
int layer
Definition: GEMEfficiencyAnalyzer.h:44
GEMEfficiencyAnalyzer::me_residual_y_
MEMap me_residual_y_
Definition: GEMEfficiencyAnalyzer.h:122
GEMEfficiencyAnalyzer::bookMisc
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:325
GEMEfficiencyAnalyzer::prop_phi_error_cut_
double prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:95
GEMEfficiencyAnalyzer::bookResolution
void bookResolution(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:285
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
ReferenceCountingPointer< Disk >
TransientTrack.h
GEMEfficiencyAnalyzer::folder_
std::string folder_
Definition: GEMEfficiencyAnalyzer.h:84
GEMEfficiencyAnalyzer::use_global_muon_
bool use_global_muon_
Definition: GEMEfficiencyAnalyzer.h:88
GEMEfficiencyAnalyzer::GEMLayerData
Definition: GEMEfficiencyAnalyzer.h:39
GEMEfficiencyAnalyzer
Definition: GEMEfficiencyAnalyzer.h:28
reco::Muon
Definition: Muon.h:27
DetId
Definition: DetId.h:17
GEMEfficiencyAnalyzer::trasientTrackToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trasientTrackToken_
Definition: GEMEfficiencyAnalyzer.h:50
GEMEfficiencyAnalyzer::~GEMEfficiencyAnalyzer
~GEMEfficiencyAnalyzer() override
Definition: GEMEfficiencyAnalyzer.cc:50
GEMEfficiencyAnalyzer::GEMLayerData::region
int region
Definition: GEMEfficiencyAnalyzer.h:44
GEMEfficiencyAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: GEMEfficiencyAnalyzer.cc:110
GEMEfficiencyAnalyzer::me_muon_phi_matched_
MEMap me_muon_phi_matched_
Definition: GEMEfficiencyAnalyzer.h:113
MuonSelectors.h
GEMEfficiencyAnalyzer::residual_rphi_cut_
float residual_rphi_cut_
Definition: GEMEfficiencyAnalyzer.h:91
reco::Track
Definition: Track.h:27
edm::ESHandle< GEMGeometry >
GEMEfficiencyAnalyzer::gemToken1_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken1_
Definition: GEMEfficiencyAnalyzer.h:47
Point3DBase< float, GlobalTag >
GEMEfficiencyAnalyzer::rechit_token_
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
Definition: GEMEfficiencyAnalyzer.h:85
GEMEfficiencyAnalyzer::checkBounds
bool checkBounds(const GlobalPoint &, const Plane &)
Definition: GEMEfficiencyAnalyzer.cc:706
EDGetToken.h
GlobalTrackingGeometryRecord.h
GEMEfficiencyAnalyzer::me_pull_y_
MEMap me_pull_y_
Definition: GEMEfficiencyAnalyzer.h:123
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
GEMEfficiencyAnalyzer::buildGEMLayers
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:540
GEMOfflineDQMBase::MEMap
std::map< GEMDetId, dqm::impl::MonitorElement * > MEMap
Definition: GEMOfflineDQMBase.h:13
TransientTrackBuilder.h
edm::ParameterSet
Definition: ParameterSet.h:47
GEMEfficiencyAnalyzer::findClosetHit
std::pair< const GEMRecHit *, float > findClosetHit(const GlobalPoint &, const GEMRecHitCollection::range &, const GEMEtaPartition *)
Definition: GEMEfficiencyAnalyzer.cc:730
GEMEfficiencyAnalyzer::GEMLayerData::GEMLayerData
GEMLayerData(Disk::DiskPointer disk, std::vector< const GEMChamber * > chambers, int region, int station, int layer)
Definition: GEMEfficiencyAnalyzer.h:40
GEMEfficiencyAnalyzer::bookEfficiencyChamber
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:176
GEMEfficiencyAnalyzer::name_
std::string name_
Definition: GEMEfficiencyAnalyzer.h:83
GEMEfficiencyAnalyzer::pt_clamp_max_
double pt_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:103
GEMEfficiencyAnalyzer::pt_bins_
std::vector< double > pt_bins_
Definition: GEMEfficiencyAnalyzer.h:96
GEMEfficiencyAnalyzer::getStartingState
std::pair< TrajectoryStateOnSurface, DetId > getStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:612
GEMEfficiencyAnalyzer::use_only_me11_
bool use_only_me11_
Definition: GEMEfficiencyAnalyzer.h:90
GEMEfficiencyAnalyzer::globalGeomToken_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globalGeomToken_
Definition: GEMEfficiencyAnalyzer.h:49
GEMRecHitCollection.h
GEMEfficiencyAnalyzer::is_cosmics_
bool is_cosmics_
Definition: GEMEfficiencyAnalyzer.h:87
edm::EventSetup
Definition: EventSetup.h:58
GEMEfficiencyAnalyzer::eta_up_
double eta_up_
Definition: GEMEfficiencyAnalyzer.h:99
TransientTrackRecord.h
GEMEfficiencyAnalyzer::me_ieta_
MEMap me_ieta_
Definition: GEMEfficiencyAnalyzer.h:116
GEMEfficiencyAnalyzer::GEMLayerData::disk
Disk::DiskPointer disk
Definition: GEMEfficiencyAnalyzer.h:42
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< GEMGeometry, MuonGeometryRecord >
GEMEfficiencyAnalyzer::muon_token_
edm::EDGetTokenT< edm::View< reco::Muon > > muon_token_
Definition: GEMEfficiencyAnalyzer.h:86
GEMOfflineDQMBase.h
GlobalTrackingGeometry.h
GEMEfficiencyAnalyzer::isME11
bool isME11(const DetId &)
Definition: GEMEfficiencyAnalyzer.cc:678
GEMEfficiencyAnalyzer::GEMEfficiencyAnalyzer
GEMEfficiencyAnalyzer(const edm::ParameterSet &)
Definition: GEMEfficiencyAnalyzer.cc:13
GEMEfficiencyAnalyzer::me_residual_rphi_
MEMap me_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:121
GEMEfficiencyAnalyzer::use_skip_layer_
bool use_skip_layer_
Definition: GEMEfficiencyAnalyzer.h:89
GEMEfficiencyAnalyzer::me_muon_eta_
MEMap me_muon_eta_
Definition: GEMEfficiencyAnalyzer.h:110
GEMEfficiencyAnalyzer::eta_low_
double eta_low_
Definition: GEMEfficiencyAnalyzer.h:98
GEMGeometry.h
edm::RangeMap::range
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
reco::TransientTrack
Definition: TransientTrack.h:19
GEMEfficiencyAnalyzer::kLogCategory_
const std::string kLogCategory_
Definition: GEMEfficiencyAnalyzer.h:131
MuonServiceProxy.h
Plane
Definition: Plane.h:16
GEMEfficiencyAnalyzer::findEtaPartition
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: GEMEfficiencyAnalyzer.cc:712
GEMEfficiencyAnalyzer::GEMLayerData::chambers
std::vector< const GEMChamber * > chambers
Definition: GEMEfficiencyAnalyzer.h:43
GEMEfficiencyAnalyzer::bookEfficiencyEtaPartition
void bookEfficiencyEtaPartition(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:211
dqm::implementation::IBooker
Definition: DQMStore.h:43
GEMEfficiencyAnalyzer::me_muon_pt_
MEMap me_muon_pt_
Definition: GEMEfficiencyAnalyzer.h:108
GEMEfficiencyAnalyzer::me_chamber_matched_
MEMap me_chamber_matched_
Definition: GEMEfficiencyAnalyzer.h:115
GEMEfficiencyAnalyzer::muon_service_
MuonServiceProxy * muon_service_
Definition: GEMEfficiencyAnalyzer.h:102
GEMEfficiencyAnalyzer::use_prop_phi_error_cut_
bool use_prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:94
GEMEfficiencyAnalyzer::gemToken2_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken2_
Definition: GEMEfficiencyAnalyzer.h:48
MuonServiceProxy
Definition: MuonServiceProxy.h:38
GEMEfficiencyAnalyzer::me_detector_
MEMap me_detector_
Definition: GEMEfficiencyAnalyzer.h:118
MuonGeometryRecord.h
GEMEfficiencyAnalyzer::eta_clamp_max_
double eta_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:104
GEMEfficiencyAnalyzer::eta_nbins_
int eta_nbins_
Definition: GEMEfficiencyAnalyzer.h:97
event
Definition: event.py:1
GEMEfficiencyAnalyzer::findStartingState
std::pair< TrajectoryStateOnSurface, DetId > findStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:643
GEMEfficiencyAnalyzer::isInsideOut
bool isInsideOut(const reco::Track &)
Definition: GEMEfficiencyAnalyzer.h:134
edm::Event
Definition: Event.h:73
GEMEfficiencyAnalyzer::bookEfficiencyMomentum
void bookEfficiencyMomentum(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:141
GEMEfficiencyAnalyzer::me_detector_matched_
MEMap me_detector_matched_
Definition: GEMEfficiencyAnalyzer.h:119
GEMEfficiencyAnalyzer::bookNumerator1D
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:129
GEMEfficiencyAnalyzer::me_muon_phi_
MEMap me_muon_phi_
Definition: GEMEfficiencyAnalyzer.h:112
GEMEfficiencyAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: GEMEfficiencyAnalyzer.cc:52
GEMEfficiencyAnalyzer::me_prop_chamber_
MEMap me_prop_chamber_
Definition: GEMEfficiencyAnalyzer.h:128
GEMEfficiencyAnalyzer::me_muon_eta_matched_
MEMap me_muon_eta_matched_
Definition: GEMEfficiencyAnalyzer.h:111
GEMEfficiencyAnalyzer::prop_r_error_cut_
double prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:93