|
|
Go to the documentation of this file.
8 double getMaxEta(
int binsEta,
double widthEta) {
10 edm::LogWarning(
"HLTTauDQMOffline") <<
"HLTTauDQML1Plotter::HLTTauDQML1Plotter: EtaHistoBinWidth = " << widthEta
11 <<
" <= 0, using default value 0.348 instead";
30 maxHighPt_(maxhighpt),
31 binsEt_(ps.getUntrackedParameter<
int>(
"EtHistoBins", 25)),
32 binsEta_(ps.getUntrackedParameter<
int>(
"EtaHistoBins", 14)),
34 maxEta_(getMaxEta(binsEta_, ps.getUntrackedParameter<double>(
"EtaHistoBinWidth", 0.348))) {
54 constexpr
float pi = 3.1416f;
55 constexpr
float phiShift =
pi / 18;
56 constexpr
float minPhi = -
pi + phiShift;
57 constexpr
float maxPhi =
pi + phiShift;
59 constexpr
int BUFMAX = 256;
77 snprintf(
buffer, BUFMAX,
"L1 leading #tau E_{T};L1 #tau E_{T};entries");
79 snprintf(
buffer, BUFMAX,
"L1 leading #tau #eta;L1 #tau #eta;entries");
81 snprintf(
buffer, BUFMAX,
"L1 leading #tau #phi;L1 #tau #phi;entries");
84 snprintf(
buffer, BUFMAX,
"L1 second-leading #tau E_{T};L1 #tau E_{T};entries");
86 snprintf(
buffer, BUFMAX,
"L1 second-leading #tau #eta;L1 #tau #eta;entries");
88 snprintf(
buffer, BUFMAX,
"L1 second-leading #tau #phi;L1 #tau #phi;entries");
91 snprintf(
buffer, BUFMAX,
"L1 leading isolated #tau E_{T};L1 #tau E_{T};entries");
93 snprintf(
buffer, BUFMAX,
"L1 leading isolated #tau #eta;L1 #tau #eta;entries");
95 snprintf(
buffer, BUFMAX,
"L1 leading isolated #tau #phi;L1 #tau #phi;entries");
98 snprintf(
buffer, BUFMAX,
"L1 second-leading isolated #tau E_{T};L1 #tau E_{T};entries");
100 snprintf(
buffer, BUFMAX,
"L1 second-leading isolated #tau #eta;L1 #tau #eta;entries");
102 snprintf(
buffer, BUFMAX,
"L1 second-leading isolated #tau #phi;L1 #tau #phi;entries");
107 "L1TauEtResol",
"L1 #tau E_{T} resolution;[L1 #tau E_{T}-Ref #tau E_{T}]/Ref #tau E_{T};entries", 60, -1, 4);
109 iBooker.
book1D(
"L1IsoTauEtResol",
110 "L1 isolated #tau E_{T} resolution;[L1 #tau E_{T}-Ref #tau E_{T}]/Ref #tau E_{T};entries",
118 iBooker.
book1D(
"L1TauEtEffNum",
"L1 #tau E_{T} Efficiency;Ref #tau E_{T};entries",
binsEt_, 0,
maxPt_);
120 "L1TauHighEtEffNum",
"L1 #tau E_{T} Efficiency (high E_{T});Ref #tau E_{T};entries",
binsEt_, 0,
maxHighPt_);
123 iBooker.
book1D(
"L1TauEtEffDenom",
"L1 #tau E_{T} Denominator;Ref #tau E_{T};entries",
binsEt_, 0,
maxPt_);
125 "L1 #tau E_{T} Denominator (high E_{T});Ref #tau E_{T};Efficiency",
138 "L1TauPhiEffDenom",
"L1 #tau #phi Denominator;Ref #tau #phi;Efficiency",
binsPhi_,
minPhi,
maxPhi);
141 "L1IsoTauEtEffNum",
"L1 isolated #tau E_{T} Efficiency;Ref #tau E_{T};entries",
binsEt_, 0,
maxPt_);
143 "L1IsoTauEtEffDenom",
"L1 isolated #tau E_{T} Denominator;Ref #tau E_{T};entries",
binsEt_, 0,
maxPt_);
146 "L1IsoTauEtaEffNum",
"L1 isolated #tau #eta Efficiency;Ref #tau #eta;entries",
binsEta_, -
maxEta_,
maxEta_);
148 "L1IsoTauEtaEffDenom",
"L1 isolated #tau #eta Denominator;Ref #tau #eta;entries",
binsEta_, -
maxEta_,
maxEta_);
151 "L1IsoTauPhiEffNum",
"L1 isolated #tau #phi Efficiency;Ref #tau #phi;entries",
binsPhi_,
minPhi,
maxPhi);
153 "L1IsoTauPhiEffDenom",
"L1 isolated #tau #phi Denominator;Ref #tau #phi;Efficiency",
binsPhi_,
minPhi,
maxPhi);
171 for (
auto const&
tau : refC.
taus) {
183 if (!refC.
met.empty())
202 if (
taus.isValid()) {
203 for (
auto const&
i : *
taus) {
204 l1taus.push_back(
i.p4());
206 l1isotaus.push_back(
i.p4());
211 pathTaus.push_back(
i.p4());
217 pathIsoTaus.push_back(
i.p4());
221 edm::LogWarning(
"HLTTauDQMOffline") <<
"HLTTauDQML1Plotter::analyze: unable to read L1 tau collection "
228 for (
auto it = sums->
begin(ibx); it != sums->
end(ibx); it++) {
229 auto type = static_cast<int>(it->getType());
236 edm::LogWarning(
"HLTTauDQMOffline") <<
"HLTTauDQML1Plotter::analyze: unable to read L1 met collection "
242 for (
auto const&
tau : refC.
taus) {
256 pathTaus.push_back(
m.second);
270 pathIsoTaus.push_back(
m.second);
276 for (
auto it = sums->
begin(ibx); it != sums->
end(ibx); it++) {
277 auto type = static_cast<int>(it->getType());
292 if (pathTaus.size() > 1)
293 std::sort(pathTaus.begin(), pathTaus.end(), [](
const LV&
a,
const LV&
b) {
return a.pt() >
b.pt(); });
294 if (!pathTaus.empty()) {
299 if (pathTaus.size() > 1) {
304 if (pathIsoTaus.size() > 1)
305 std::sort(pathIsoTaus.begin(), pathIsoTaus.end(), [](
const LV&
a,
const LV&
b) {
return a.pt() >
b.pt(); });
306 if (!pathIsoTaus.empty()) {
311 if (pathIsoTaus.size() > 1) {
MonitorElement * firstIsoTauEta_
MonitorElement * l1tauEt_
MonitorElement * l1tauEtaEffNum_
MonitorElement * l1isotauEtaEffDenom_
MonitorElement * l1isotauPhiEffDenom_
HLTTauDQML1Plotter(const edm::ParameterSet &, edm::ConsumesCollector &&cc, int phibins, double maxpt, double maxhighpt, bool ref, double dr, const std::string &dqmBaseFolder)
T const * product() const
MonitorElement * firstTauPhi_
MonitorElement * secondIsoTauEta_
MonitorElement * l1isotauEta_
MonitorElement * l1etmEtEffNum_
virtual void setCurrentFolder(std::string const &fullpath)
edm::InputTag l1stage2Taus_
MonitorElement * firstTauEt_
edm::InputTag l1stage2Sums_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * l1isotauEtRes_
MonitorElement * l1tauEtRes_
MonitorElement * l1tauEtaEffDenom_
std::pair< bool, LV > match(const LV &, const LVColl &, double)
MonitorElement * l1isotauEt_
MonitorElement * l1isotauEtEffNum_
const_iterator begin(int bx) const
const std::string & triggerTag() const
MonitorElement * l1tauPhi_
void bookHistograms(DQMStore::IBooker &iBooker)
MonitorElement * l1etmEtEffDenom_
MonitorElement * secondIsoTauEt_
MonitorElement * firstTauEta_
const_iterator end(int bx) const
MonitorElement * l1isotauPhiEffNum_
MonitorElement * firstIsoTauPhi_
MonitorElement * l1tauEta_
const bool doRefAnalysis_
MonitorElement * l1tauPhiEffDenom_
const double matchDeltaR_
MonitorElement * l1tauHighEtEffNum_
edm::EDGetTokenT< l1t::TauBxCollection > l1stage2TausToken_
MonitorElement * secondIsoTauPhi_
MonitorElement * l1isotauEtaEffNum_
MonitorElement * secondTauPhi_
MonitorElement * l1tauEtEffNum_
MonitorElement * l1isotauEtEffDenom_
math::XYZTLorentzVectorD LV
MonitorElement * l1tauHighEtEffDenom_
MonitorElement * l1etmEt_
MonitorElement * firstIsoTauEt_
unsigned size(int bx) const
MonitorElement * l1isotauPhi_
MonitorElement * secondTauEta_
MonitorElement * secondTauEt_
edm::EDGetTokenT< l1t::EtSumBxCollection > l1stage2SumsToken_
MonitorElement * l1etmPhi_
MonitorElement * l1tauPhiEffNum_
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const HLTTauDQMOfflineObjects &refC)
MonitorElement * l1tauEtEffDenom_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())