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 disk, std::vector<const GEMChamber *> chambers, int region, int station, int layer)
37  std::vector<const GEMChamber *> chambers;
39  };
40 
43 
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_ieta_; // 1D, region-station-layer
107  MEMap me_detector_; // 2D, region-station-layer
109  // resolution
113  // MEs for optimizing cut values
118 
119  // const
120  const std::string kLogCategory_ = "GEMEfficiencyAnalyzer";
121 };
122 
124  return track.innerPosition().mag2() > track.outerPosition().mag2();
125 }
126 
127 #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:676
GEMEfficiencyAnalyzer::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: GEMEfficiencyAnalyzer.cc:348
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
GEMEfficiencyAnalyzer::me_ieta_matched_
MEMap me_ieta_matched_
Definition: GEMEfficiencyAnalyzer.h:106
ESHandle.h
edm::Run
Definition: Run.h:45
GEMEfficiencyAnalyzer::me_prop_r_err_
MonitorElement * me_prop_r_err_
Definition: GEMEfficiencyAnalyzer.h:114
GEMEfficiencyAnalyzer::GEMLayerData::station
int station
Definition: GEMEfficiencyAnalyzer.h:38
GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
MonitorElement * me_all_abs_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:116
GEMEfficiencyAnalyzer::getTrack
const reco::Track * getTrack(const reco::Muon &)
Definition: GEMEfficiencyAnalyzer.cc:584
edm::EDGetTokenT< GEMRecHitCollection >
GEMEfficiencyAnalyzer::bookNumerator2D
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:130
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:115
GEMEtaPartition
Definition: GEMEtaPartition.h:12
GEMOfflineDQMBase
Definition: GEMOfflineDQMBase.h:11
GEMEfficiencyAnalyzer::bookEfficiencyDetector
void bookEfficiencyDetector(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:241
GEMEfficiencyAnalyzer::GEMLayerData::layer
int layer
Definition: GEMEfficiencyAnalyzer.h:38
GEMEfficiencyAnalyzer::me_residual_y_
MEMap me_residual_y_
Definition: GEMEfficiencyAnalyzer.h:111
GEMEfficiencyAnalyzer::bookMisc
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:320
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:280
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
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
DetId
Definition: DetId.h:17
GEMEfficiencyAnalyzer::~GEMEfficiencyAnalyzer
~GEMEfficiencyAnalyzer() override
Definition: GEMEfficiencyAnalyzer.cc:46
GEMEfficiencyAnalyzer::GEMLayerData::region
int region
Definition: GEMEfficiencyAnalyzer.h:38
GEMEfficiencyAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: GEMEfficiencyAnalyzer.cc:106
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:697
EDGetToken.h
GEMEfficiencyAnalyzer::me_pull_y_
MEMap me_pull_y_
Definition: GEMEfficiencyAnalyzer.h:112
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:531
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:721
GEMEfficiencyAnalyzer::GEMLayerData::GEMLayerData
GEMLayerData(Disk::DiskPointer disk, std::vector< const GEMChamber * > chambers, int region, int station, int layer)
Definition: GEMEfficiencyAnalyzer.h:34
GEMEfficiencyAnalyzer::bookEfficiencyChamber
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:171
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:603
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:58
GEMEfficiencyAnalyzer::eta_up_
double eta_up_
Definition: GEMEfficiencyAnalyzer.h:88
GEMEfficiencyAnalyzer::me_ieta_
MEMap me_ieta_
Definition: GEMEfficiencyAnalyzer.h:105
GEMEfficiencyAnalyzer::GEMLayerData::disk
Disk::DiskPointer disk
Definition: GEMEfficiencyAnalyzer.h:36
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:669
GEMEfficiencyAnalyzer::GEMEfficiencyAnalyzer
GEMEfficiencyAnalyzer(const edm::ParameterSet &)
Definition: GEMEfficiencyAnalyzer.cc:15
GEMEfficiencyAnalyzer::me_residual_rphi_
MEMap me_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:110
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:120
MuonServiceProxy.h
Plane
Definition: Plane.h:16
GEMEfficiencyAnalyzer::findEtaPartition
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: GEMEfficiencyAnalyzer.cc:703
GEMEfficiencyAnalyzer::GEMLayerData::chambers
std::vector< const GEMChamber * > chambers
Definition: GEMEfficiencyAnalyzer.h:37
GEMEfficiencyAnalyzer::bookEfficiencyEtaPartition
void bookEfficiencyEtaPartition(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:206
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:107
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:634
GEMEfficiencyAnalyzer::isInsideOut
bool isInsideOut(const reco::Track &)
Definition: GEMEfficiencyAnalyzer.h:123
edm::Event
Definition: Event.h:73
GEMEfficiencyAnalyzer::bookEfficiencyMomentum
void bookEfficiencyMomentum(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:136
GEMEfficiencyAnalyzer::me_detector_matched_
MEMap me_detector_matched_
Definition: GEMEfficiencyAnalyzer.h:108
GEMEfficiencyAnalyzer::bookNumerator1D
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:124
GEMEfficiencyAnalyzer::me_muon_phi_
MEMap me_muon_phi_
Definition: GEMEfficiencyAnalyzer.h:101
GEMEfficiencyAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: GEMEfficiencyAnalyzer.cc:48
GEMEfficiencyAnalyzer::me_prop_chamber_
MEMap me_prop_chamber_
Definition: GEMEfficiencyAnalyzer.h:117
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