#include <DiLeptonVertexHelpers.h>
|
void | bookFromPSet (const TFileDirectory &fs, const edm::ParameterSet &hpar) |
|
void | bookPlots (TFileDirectory &fs, const float valmin, const float valmax, const int nxbins, const int nybins) |
|
void | fillPlots (const float val, const std::pair< TLorentzVector, TLorentzVector > &momenta) |
|
| PlotsVsKinematics (flavour FLAV) |
|
| PlotsVsKinematics (flavour FLAV, const std::string &name, const std::string &tt, const std::string &ytt) |
|
| ~PlotsVsKinematics ()=default |
|
Definition at line 51 of file DiLeptonVertexHelpers.h.
DiLeptonHelp::PlotsVsKinematics::PlotsVsKinematics |
( |
flavour |
FLAV | ) |
|
|
inline |
DiLeptonHelp::PlotsVsKinematics::PlotsVsKinematics |
( |
flavour |
FLAV, |
|
|
const std::string & |
name, |
|
|
const std::string & |
tt, |
|
|
const std::string & |
ytt |
|
) |
| |
|
inline |
Definition at line 57 of file DiLeptonVertexHelpers.h.
References m_flav.
60 edm::LogError(
"PlotsVsKinematics") <<
"The initialization flavour is not correct!" << std::endl;
const std::string m_ytitle
Log< level::Error, false > LogError
const std::string m_title
DiLeptonHelp::PlotsVsKinematics::~PlotsVsKinematics |
( |
| ) |
|
|
default |
Definition at line 67 of file DiLeptonVertexHelpers.h.
References axisChoices, Exception, edm::ParameterSet::getParameter(), m_flav, m_h2_map, m_isBooked, M_PI, TFileDirectory::make(), AlCaHLTBitMon_QueryRunRegistry::string, hlt_dqm_clientPB-live_cfg::xmax, and hlt_dqm_clientPB-live_cfg::xmin.
Referenced by DiMuonVertexValidation::beginJob(), and DiElectronVertexValidation::beginJob().
79 namePostfix =
m_flav ?
"EEPhi" :
"MMPhi";
80 titlePostfix = fmt::sprintf(
"%s%s pair #phi;%s^{+}%s^{-} #phi", sed, sed, sed, sed);
85 namePostfix =
m_flav ?
"EEEta" :
"MuMuEta";
86 titlePostfix = fmt::sprintf(
"%s%s pair #eta;%s^{+}%s^{-} #eta", sed, sed, sed, sed);
91 namePostfix =
m_flav ?
"EPlusPhi" :
"MuPlusPhi";
92 titlePostfix = fmt::sprintf(
"%s^{+} #phi;%s^{+} #phi [rad]", sed, sed);
97 namePostfix =
m_flav ?
"EPlusEta" :
"MuPlusEta";
98 titlePostfix = fmt::sprintf(
"%s^{+} #eta;%s^{+} #eta", sed, sed);
103 namePostfix =
m_flav ?
"EMinusPhi" :
"MuMinusPhi";
104 titlePostfix = fmt::sprintf(
"%s^{-} #phi;%s^{-} #phi [rad]", sed, sed);
109 namePostfix =
m_flav ?
"EMinusEta" :
"MuMinusEta";
110 titlePostfix = fmt::sprintf(
"%s^{-} #eta;%s^{+} #eta", sed, sed);
113 throw cms::Exception(
"LogicalError") <<
" there is not such Axis choice as " << xAx;
117 const auto& h2title = fmt::sprintf(
"%s vs %s;%s% s",
std::map< xAxis, TH2F * > m_h2_map
const std::vector< xAxis > axisChoices
T * make(const Args &...args) const
make new ROOT object
T getParameter(std::string const &) const
void DiLeptonHelp::PlotsVsKinematics::bookPlots |
( |
TFileDirectory & |
fs, |
|
|
const float |
valmin, |
|
|
const float |
valmax, |
|
|
const int |
nxbins, |
|
|
const int |
nybins |
|
) |
| |
|
inline |
Definition at line 138 of file DiLeptonVertexHelpers.h.
References m_flav, m_h2_map, m_isBooked, m_name, M_PI, m_title, m_ytitle, TFileDirectory::make(), and AlCaHLTBitMon_QueryRunRegistry::string.
142 <<
"In" << __FUNCTION__ <<
"," << __LINE__
143 <<
"trying to book plots without the right constructor being called!" << std::endl;
151 static constexpr
float maxMuEta = 2.4;
152 static constexpr
float maxMuMuEta = 3.5;
153 TH1F::SetDefaultSumw2(kTRUE);
157 fmt::sprintf(
"%s vs %s pair #eta;%s #eta;%s",
m_title, dilep, dilep,
m_ytitle).c_str(),
159 nybins, valmin, valmax);
162 fmt::sprintf(
"%s vs %s pair #phi;%s #phi [rad];%s",
m_title, dilep, dilep,
m_ytitle).c_str(),
163 nxbins, -maxMuMuEta, maxMuMuEta,
164 nybins, valmin, valmax);
166 m_h2_map[xAxis::LP_ETA] = fs.
make<TH2F>(fmt::sprintf(
"%sVsMuPlusEta",
m_name).c_str(),
167 fmt::sprintf(
"%s vs %s #eta;%s #eta;%s",
m_title, lep, lep,
m_ytitle).c_str(),
168 nxbins, -maxMuEta, maxMuEta,
169 nybins, valmin, valmax);
171 m_h2_map[xAxis::LP_PHI] = fs.
make<TH2F>(fmt::sprintf(
"%sVsMuPlusPhi",
m_name).c_str(),
172 fmt::sprintf(
"%s vs %s #phi;%s #phi [rad];%s",
m_title, lep, lep,
m_ytitle).c_str(),
174 nybins, valmin, valmax);
176 m_h2_map[xAxis::LM_ETA] = fs.
make<TH2F>(fmt::sprintf(
"%sVsMuMinusEta",
m_name).c_str(),
177 fmt::sprintf(
"%s vs %s #eta;%s #eta;%s",
m_title, lem, lem,
m_ytitle).c_str(),
178 nxbins, -maxMuEta, maxMuEta,
179 nybins, valmin, valmax);
181 m_h2_map[xAxis::LM_PHI] = fs.
make<TH2F>(fmt::sprintf(
"%sVsMuMinusPhi",
m_name).c_str(),
182 fmt::sprintf(
"%s vs %s #phi;%s #phi [rad];%s",
m_title, lem, lem,
m_ytitle).c_str(),
184 nybins, valmin, valmax);
const std::string m_ytitle
Log< level::Error, false > LogError
std::map< xAxis, TH2F * > m_h2_map
T * make(const Args &...args) const
make new ROOT object
const std::string m_title
void DiLeptonHelp::PlotsVsKinematics::fillPlots |
( |
const float |
val, |
|
|
const std::pair< TLorentzVector, TLorentzVector > & |
momenta |
|
) |
| |
|
inline |
Definition at line 192 of file DiLeptonVertexHelpers.h.
References m_h2_map, m_isBooked, and hgcalPerformanceValidation::val.
Referenced by DiMuonVertexValidation::analyze(), and DiElectronVertexValidation::analyze().
195 <<
"In" << __FUNCTION__ <<
"," << __LINE__ <<
"trying to fill a plot not booked!" << std::endl;
199 m_h2_map[xAxis::Z_ETA]->Fill((momenta.first + momenta.second).Eta(),
val);
200 m_h2_map[xAxis::Z_PHI]->Fill((momenta.first + momenta.second).Phi(),
val);
201 m_h2_map[xAxis::LP_ETA]->Fill((momenta.first).Eta(),
val);
202 m_h2_map[xAxis::LP_PHI]->Fill((momenta.first).Phi(),
val);
203 m_h2_map[xAxis::LM_ETA]->Fill((momenta.second).Eta(),
val);
204 m_h2_map[xAxis::LM_PHI]->Fill((momenta.second).Phi(),
val);
Log< level::Error, false > LogError
std::map< xAxis, TH2F * > m_h2_map
const std::vector<xAxis> DiLeptonHelp::PlotsVsKinematics::axisChoices |
|
private |
flavour DiLeptonHelp::PlotsVsKinematics::m_flav |
|
private |
std::map<xAxis, TH2F*> DiLeptonHelp::PlotsVsKinematics::m_h2_map |
|
private |
bool DiLeptonHelp::PlotsVsKinematics::m_isBooked |
|
private |
const std::string DiLeptonHelp::PlotsVsKinematics::m_name |
|
private |
const std::string DiLeptonHelp::PlotsVsKinematics::m_title |
|
private |
const std::string DiLeptonHelp::PlotsVsKinematics::m_ytitle |
|
private |