CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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)
41  : disk(disk), chambers(chambers), region(region), station(station), layer(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
bool isInsideOut(const reco::Track &)
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trasientTrackToken_
bool skipLayer(const reco::Track *, const GEMLayerData &)
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
const std::string kLogCategory_
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
void bookEfficiencyDetector(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: Plane.h:16
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globalGeomToken_
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
void bookResolution(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
bool checkBounds(const GlobalPoint &, const Plane &)
std::vector< const GEMChamber * > chambers
MonitorElement * me_prop_r_err_
std::pair< TrajectoryStateOnSurface, DetId > getStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
std::map< GEMDetId, dqm::impl::MonitorElement * > MEMap
void bookEfficiencyEtaPartition(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
MonitorElement * me_all_abs_residual_rphi_
std::pair< const GEMRecHit *, float > findClosetHit(const GlobalPoint &, const GEMRecHitCollection::range &, const GEMEtaPartition *)
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
std::pair< TrajectoryStateOnSurface, DetId > findStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
GEMEfficiencyAnalyzer(const edm::ParameterSet &)
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken1_
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: DetId.h:17
static void fillDescriptions(edm::ConfigurationDescriptions &)
void bookEfficiencyMomentum(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
GEMLayerData(Disk::DiskPointer disk, std::vector< const GEMChamber * > chambers, int region, int station, int layer)
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
edm::EDGetTokenT< edm::View< reco::Muon > > muon_token_
bool isME11(const DetId &)
MonitorElement * me_prop_phi_err_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken2_
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
const reco::Track * getTrack(const reco::Muon &)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
std::vector< double > pt_bins_
MuonServiceProxy * muon_service_
Definition: Run.h:45