12 #include <fmt/printf.h> 28 : topFolder_(iConfig.getParameter<
std::
string>(
"topFolderName")) {}
32 if (hpt_eta_tkAllReference ==
nullptr) {
34 <<
"MonitorElement not found: " <<
topFolder_ <<
"/ptetatrkAllReference. Skipping.";
39 if (hpt_eta_tkAllReferencematched ==
nullptr) {
41 <<
"MonitorElement not found: " <<
topFolder_ <<
"/ptetatrkAllReferencematched. Skipping.";
46 if (hphi_z_tkAllReference ==
nullptr) {
48 <<
"MonitorElement not found: " <<
topFolder_ <<
"/phiztrkAllReference. Skipping.";
53 if (hphi_z_tkAllReferencematched ==
nullptr) {
55 <<
"MonitorElement not found: " <<
topFolder_ <<
"/phiztrkAllReferencematched. Skipping.";
62 "matchingeff_pt_eta",
"Efficiency of track matching; #eta; p_{T} [GeV];", 30, -
M_PI,
M_PI, 200, 0., 200.);
64 "matchingeff_phi_z",
"Efficiency of track matching; #phi; z [cm];", 30, -
M_PI,
M_PI, 30, -30., 30.);
66 hpt_eta_matchRatio->
divide(hpt_eta_tkAllReferencematched, hpt_eta_tkAllReference, 1., 1.,
"B");
67 hphi_z_matchRatio->
divide(hphi_z_tkAllReferencematched, hphi_z_tkAllReference, 1., 1.,
"B");
70 std::vector<std::string> listOfMEsToProject = {
"nTracks",
71 "nLooseAndAboveTracks",
72 "nLooseAndAboveTracks_matched",
83 for (
const auto&
me : listOfMEsToProject) {
91 if (input2D ==
nullptr) {
93 <<
"ME needed for diagonal projection is not found in the input file at" <<
topFolder_ <<
". Skipping.";
99 const auto& h_name = fmt::sprintf(
"%s_proj", input2D->
getName());
100 const auto& h_title = fmt::sprintf(
";%s CPU -GPU difference", input2D->
getTitle());
102 const auto& b_w = span / input2D->
getNbinsX();
125 desc.add<
std::string>(
"topFolderName",
"SiPixelHeterogeneous/PixelTrackCompareGPUvsCPU/");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
SiPixelTrackComparisonHarvester(const edm::ParameterSet &)
virtual void setCurrentFolder(std::string const &fullpath)
const std::string topFolder_
Log< level::Error, false > LogError
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
#define DEFINE_FWK_MODULE(type)
void project2DalongDiagonal(MonitorElement *input2D, DQMStore::IBooker &ibooker)
Log< level::Warning, true > LogPrint
virtual int getNbinsY() const
get # of bins in Y-axis
virtual std::string getTitle() const
get MonitorElement title
~SiPixelTrackComparisonHarvester() override=default
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual MonitorElement * get(std::string const &fullpath) const
virtual double getAxisMin(int axis=1) const
const std::string & getName() const
get name of ME
virtual double getAxisMax(int axis=1) const
virtual int getNbinsX() const
get # of bins in X-axis
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.
virtual double getBinContent(int binx) const
get content of bin (1-D)