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 
21 
23 public:
24  explicit GEMEfficiencyAnalyzer(const edm::ParameterSet &);
25  ~GEMEfficiencyAnalyzer() override;
27 
28 protected:
29  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
30  void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override;
31 
32 private:
33  struct GEMLayerData {
34  GEMLayerData(Disk::DiskPointer surface, std::vector<const GEMChamber *> chambers, int region, int station, int layer)
36 
38  std::vector<const GEMChamber *> chambers;
40  };
41 
44 
50 
51  inline bool isInsideOut(const reco::Track &);
52 
53  std::vector<GEMLayerData> buildGEMLayers(const edm::ESHandle<GEMGeometry> &);
54  const reco::Track *getTrack(const reco::Muon &);
55  std::pair<TrajectoryStateOnSurface, DetId> getStartingState(const reco::TransientTrack &,
56  const GEMLayerData &,
58  std::pair<TrajectoryStateOnSurface, DetId> findStartingState(const reco::TransientTrack &,
59  const GEMLayerData &,
61  bool isME11(const DetId &);
62  bool skipLayer(const reco::Track *, const GEMLayerData &);
63  bool checkBounds(const GlobalPoint &, const Plane &);
64  const GEMEtaPartition *findEtaPartition(const GlobalPoint &, const std::vector<const GEMChamber *> &);
65  std::pair<const GEMRecHit *, float> findClosetHit(const GlobalPoint &,
67  const GEMEtaPartition *);
68 
69  // data members
70 
71  // parameters
85  std::vector<double> pt_bins_;
87  double eta_low_;
88  double eta_up_;
89 
90  // data mebers derived from parameters
92  double pt_clamp_max_;
94 
95  // MonitorElement
96  // efficiency
97  MEMap me_muon_pt_; // 1D, region-station
99  MEMap me_muon_eta_; // 1D, region-station
101  MEMap me_muon_phi_; // 1D, region-station
103  MEMap me_chamber_; // 2D, region-station-layer
105  MEMap me_detector_; // 2D, region-station
107  // resolution
111  // MEs for optimizing cut values
116 
117  // const
118  const std::string kLogCategory_ = "GEMEfficiencyAnalyzer";
119 };
120 
122  return track.innerPosition().mag2() > track.outerPosition().mag2();
123 }
124 
125 #endif // DQMOffline_Muon_GEMEfficiencyAnalyzer_h
ConfigurationDescriptions.h
GEMEfficiencyAnalyzer::me_chamber_
MEMap me_chamber_
Definition: GEMEfficiencyAnalyzer.h:103
GEMEfficiencyAnalyzer::skipLayer
bool skipLayer(const reco::Track *, const GEMLayerData &)
Definition: GEMEfficiencyAnalyzer.cc:634
GEMEfficiencyAnalyzer::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: GEMEfficiencyAnalyzer.cc:306
GEMEfficiencyAnalyzer::use_prop_r_error_cut_
bool use_prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:81
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
ESHandle.h
edm::Run
Definition: Run.h:45
GEMEfficiencyAnalyzer::me_prop_r_err_
MonitorElement * me_prop_r_err_
Definition: GEMEfficiencyAnalyzer.h:112
GEMEfficiencyAnalyzer::GEMLayerData::station
int station
Definition: GEMEfficiencyAnalyzer.h:39
GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
MonitorElement * me_all_abs_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:114
GEMEfficiencyAnalyzer::getTrack
const reco::Track * getTrack(const reco::Muon &)
Definition: GEMEfficiencyAnalyzer.cc:542
edm::EDGetTokenT< GEMRecHitCollection >
GEMEfficiencyAnalyzer::bookNumerator2D
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:128
GEMEfficiencyAnalyzer::me_muon_pt_matched_
MEMap me_muon_pt_matched_
Definition: GEMEfficiencyAnalyzer.h:98
Muon.h
GEMEfficiencyAnalyzer::me_prop_phi_err_
MonitorElement * me_prop_phi_err_
Definition: GEMEfficiencyAnalyzer.h:113
GEMEtaPartition
Definition: GEMEtaPartition.h:12
GEMOfflineDQMBase
Definition: GEMOfflineDQMBase.h:11
GEMEfficiencyAnalyzer::GEMLayerData::layer
int layer
Definition: GEMEfficiencyAnalyzer.h:39
GEMEfficiencyAnalyzer::me_residual_y_
MEMap me_residual_y_
Definition: GEMEfficiencyAnalyzer.h:109
GEMEfficiencyAnalyzer::bookMisc
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:279
GEMEfficiencyAnalyzer::prop_phi_error_cut_
double prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:84
GEMEfficiencyAnalyzer::bookResolution
void bookResolution(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:239
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
ReferenceCountingPointer< Disk >
TransientTrack.h
GEMEfficiencyAnalyzer::folder_
std::string folder_
Definition: GEMEfficiencyAnalyzer.h:73
GEMEfficiencyAnalyzer::use_global_muon_
bool use_global_muon_
Definition: GEMEfficiencyAnalyzer.h:77
GEMEfficiencyAnalyzer::GEMLayerData
Definition: GEMEfficiencyAnalyzer.h:33
GEMEfficiencyAnalyzer
Definition: GEMEfficiencyAnalyzer.h:22
reco::Muon
Definition: Muon.h:27
GEMEfficiencyAnalyzer::GEMLayerData::surface
Disk::DiskPointer surface
Definition: GEMEfficiencyAnalyzer.h:37
DetId
Definition: DetId.h:17
GEMEfficiencyAnalyzer::~GEMEfficiencyAnalyzer
~GEMEfficiencyAnalyzer() override
Definition: GEMEfficiencyAnalyzer.cc:44
GEMEfficiencyAnalyzer::GEMLayerData::region
int region
Definition: GEMEfficiencyAnalyzer.h:39
GEMEfficiencyAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: GEMEfficiencyAnalyzer.cc:105
GEMEfficiencyAnalyzer::me_muon_phi_matched_
MEMap me_muon_phi_matched_
Definition: GEMEfficiencyAnalyzer.h:102
MuonSelectors.h
GEMEfficiencyAnalyzer::residual_rphi_cut_
float residual_rphi_cut_
Definition: GEMEfficiencyAnalyzer.h:80
reco::Track
Definition: Track.h:27
edm::ESHandle< GEMGeometry >
Point3DBase< float, GlobalTag >
GEMEfficiencyAnalyzer::rechit_token_
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
Definition: GEMEfficiencyAnalyzer.h:74
GEMEfficiencyAnalyzer::checkBounds
bool checkBounds(const GlobalPoint &, const Plane &)
Definition: GEMEfficiencyAnalyzer.cc:655
EDGetToken.h
GEMEfficiencyAnalyzer::me_pull_y_
MEMap me_pull_y_
Definition: GEMEfficiencyAnalyzer.h:110
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GEMEfficiencyAnalyzer::buildGEMLayers
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:486
GEMEfficiencyAnalyzer::GEMLayerData::GEMLayerData
GEMLayerData(Disk::DiskPointer surface, std::vector< const GEMChamber * > chambers, int region, int station, int layer)
Definition: GEMEfficiencyAnalyzer.h:34
GEMOfflineDQMBase::MEMap
std::map< GEMDetId, dqm::impl::MonitorElement * > MEMap
Definition: GEMOfflineDQMBase.h:13
edm::ParameterSet
Definition: ParameterSet.h:47
GEMEfficiencyAnalyzer::findClosetHit
std::pair< const GEMRecHit *, float > findClosetHit(const GlobalPoint &, const GEMRecHitCollection::range &, const GEMEtaPartition *)
Definition: GEMEfficiencyAnalyzer.cc:679
GEMEfficiencyAnalyzer::bookEfficiencyChamber
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:169
GEMEfficiencyAnalyzer::name_
std::string name_
Definition: GEMEfficiencyAnalyzer.h:72
GEMEfficiencyAnalyzer::pt_clamp_max_
double pt_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:92
GEMEfficiencyAnalyzer::pt_bins_
std::vector< double > pt_bins_
Definition: GEMEfficiencyAnalyzer.h:85
GEMEfficiencyAnalyzer::getStartingState
std::pair< TrajectoryStateOnSurface, DetId > getStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:561
GEMEfficiencyAnalyzer::use_only_me11_
bool use_only_me11_
Definition: GEMEfficiencyAnalyzer.h:79
GEMRecHitCollection.h
GEMEfficiencyAnalyzer::is_cosmics_
bool is_cosmics_
Definition: GEMEfficiencyAnalyzer.h:76
edm::EventSetup
Definition: EventSetup.h:57
GEMEfficiencyAnalyzer::eta_up_
double eta_up_
Definition: GEMEfficiencyAnalyzer.h:88
GEMEfficiencyAnalyzer::muon_token_
edm::EDGetTokenT< edm::View< reco::Muon > > muon_token_
Definition: GEMEfficiencyAnalyzer.h:75
GEMOfflineDQMBase.h
GEMEfficiencyAnalyzer::isME11
bool isME11(const DetId &)
Definition: GEMEfficiencyAnalyzer.cc:627
GEMEfficiencyAnalyzer::GEMEfficiencyAnalyzer
GEMEfficiencyAnalyzer(const edm::ParameterSet &)
Definition: GEMEfficiencyAnalyzer.cc:14
GEMEfficiencyAnalyzer::me_residual_rphi_
MEMap me_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:108
GEMEfficiencyAnalyzer::use_skip_layer_
bool use_skip_layer_
Definition: GEMEfficiencyAnalyzer.h:78
GEMEfficiencyAnalyzer::me_muon_eta_
MEMap me_muon_eta_
Definition: GEMEfficiencyAnalyzer.h:99
GEMEfficiencyAnalyzer::eta_low_
double eta_low_
Definition: GEMEfficiencyAnalyzer.h:87
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:118
MuonServiceProxy.h
Plane
Definition: Plane.h:16
GEMEfficiencyAnalyzer::findEtaPartition
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: GEMEfficiencyAnalyzer.cc:661
GEMEfficiencyAnalyzer::GEMLayerData::chambers
std::vector< const GEMChamber * > chambers
Definition: GEMEfficiencyAnalyzer.h:38
GEMEfficiencyAnalyzer::bookEfficiencyEtaPartition
void bookEfficiencyEtaPartition(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:204
dqm::implementation::IBooker
Definition: DQMStore.h:43
GEMEfficiencyAnalyzer::me_muon_pt_
MEMap me_muon_pt_
Definition: GEMEfficiencyAnalyzer.h:97
GEMEfficiencyAnalyzer::me_chamber_matched_
MEMap me_chamber_matched_
Definition: GEMEfficiencyAnalyzer.h:104
GEMEfficiencyAnalyzer::muon_service_
MuonServiceProxy * muon_service_
Definition: GEMEfficiencyAnalyzer.h:91
GEMEfficiencyAnalyzer::use_prop_phi_error_cut_
bool use_prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:83
MuonServiceProxy
Definition: MuonServiceProxy.h:38
GEMEfficiencyAnalyzer::me_detector_
MEMap me_detector_
Definition: GEMEfficiencyAnalyzer.h:105
GEMEfficiencyAnalyzer::eta_clamp_max_
double eta_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:93
GEMEfficiencyAnalyzer::eta_nbins_
int eta_nbins_
Definition: GEMEfficiencyAnalyzer.h:86
event
Definition: event.py:1
GEMEfficiencyAnalyzer::findStartingState
std::pair< TrajectoryStateOnSurface, DetId > findStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:592
GEMEfficiencyAnalyzer::isInsideOut
bool isInsideOut(const reco::Track &)
Definition: GEMEfficiencyAnalyzer.h:121
edm::Event
Definition: Event.h:73
GEMEfficiencyAnalyzer::bookEfficiencyMomentum
void bookEfficiencyMomentum(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:134
GEMEfficiencyAnalyzer::me_detector_matched_
MEMap me_detector_matched_
Definition: GEMEfficiencyAnalyzer.h:106
GEMEfficiencyAnalyzer::bookNumerator1D
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:122
GEMEfficiencyAnalyzer::me_muon_phi_
MEMap me_muon_phi_
Definition: GEMEfficiencyAnalyzer.h:101
GEMEfficiencyAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: GEMEfficiencyAnalyzer.cc:46
GEMEfficiencyAnalyzer::me_prop_chamber_
MEMap me_prop_chamber_
Definition: GEMEfficiencyAnalyzer.h:115
GEMEfficiencyAnalyzer::me_muon_eta_matched_
MEMap me_muon_eta_matched_
Definition: GEMEfficiencyAnalyzer.h:100
GEMEfficiencyAnalyzer::prop_r_error_cut_
double prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:82