CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiPixelPhase1TrackComparisonHarvester.cc
Go to the documentation of this file.
11 public:
13  ~SiPixelPhase1TrackComparisonHarvester() override = default;
14  void dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) override;
15 
16  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
17 
18 private:
19  // ----------member data ---------------------------
21 };
22 
24  : topFolder_(iConfig.getParameter<std::string>("topFolderName")) {}
25 
27  MonitorElement* hpt_eta_tkAllCPU = igetter.get(topFolder_ + "/ptetatrkAllCPU");
28  MonitorElement* hpt_eta_tkAllCPUmatched = igetter.get(topFolder_ + "/ptetatrkAllCPUmatched");
29  MonitorElement* hphi_z_tkAllCPU = igetter.get(topFolder_ + "/phiztrkAllCPU");
30  MonitorElement* hphi_z_tkAllCPUmatched = igetter.get(topFolder_ + "/phiztrkAllCPUmatched");
31 
32  if (hpt_eta_tkAllCPU == nullptr or hpt_eta_tkAllCPUmatched == nullptr or hphi_z_tkAllCPU == nullptr or
33  hphi_z_tkAllCPUmatched == nullptr) {
34  edm::LogError("SiPixelPhase1TrackComparisonHarvester")
35  << "MEs needed for this module are not found in the input file. Skipping.";
36  return;
37  }
38 
39  ibooker.cd();
41  MonitorElement* hpt_eta_matchRatio = ibooker.book2D(
42  "matchingeff_pt_eta", "Efficiency of track matching; #eta; p_{T} [GeV];", 30, -M_PI, M_PI, 200, 0., 200.);
43  MonitorElement* hphi_z_matchRatio = ibooker.book2D(
44  "matchingeff_phi_z", "Efficiency of track matching; #phi; z [cm];", 30, -M_PI, M_PI, 30, -30., 30.);
45 
46  hpt_eta_matchRatio->divide(hpt_eta_tkAllCPUmatched, hpt_eta_tkAllCPU, 1., 1., "B");
47  hphi_z_matchRatio->divide(hphi_z_tkAllCPUmatched, hphi_z_tkAllCPU, 1., 1., "B");
48 }
49 
54  desc.add<std::string>("topFolderName", "SiPixelHeterogeneous/PixelTrackCompareGPUvsCPU/");
55  descriptions.add("siPixelPhase1TrackComparisonHarvester", desc);
56 }
57 
58 //define this as a plug-in
~SiPixelPhase1TrackComparisonHarvester() override=default
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Log< level::Error, false > LogError
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define M_PI
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.