8 double getMaxEta(
int binsEta,
double widthEta) {
10 edm::LogWarning(
"HLTTauDQMOffline") <<
"HLTTauDQML1Plotter::HLTTauDQML1Plotter: EtaHistoBinWidth = " << widthEta <<
" <= 0, using default value 0.348 instead";
13 return binsEta/2*widthEta;
22 maxHighPt_(maxhighpt),
23 binsEt_(ps.getUntrackedParameter<
int>(
"EtHistoBins", 25)),
24 binsEta_(ps.getUntrackedParameter<
int>(
"EtaHistoBins", 14)),
26 maxEta_(getMaxEta(binsEta_, ps.getUntrackedParameter<double>(
"EtaHistoBinWidth", 0.348)))
69 snprintf(buffer, BUFMAX,
"L1 leading #tau E_{T};L1 #tau E_{T};entries");
71 snprintf(buffer, BUFMAX,
"L1 leading #tau #eta;L1 #tau #eta;entries");
73 snprintf(buffer, BUFMAX,
"L1 leading #tau #phi;L1 #tau #phi;entries");
76 snprintf(buffer, BUFMAX,
"L1 second-leading #tau E_{T};L1 #tau E_{T};entries");
78 snprintf(buffer, BUFMAX,
"L1 second-leading #tau #eta;L1 #tau #eta;entries");
80 snprintf(buffer, BUFMAX,
"L1 second-leading #tau #phi;L1 #tau #phi;entries");
83 snprintf(buffer, BUFMAX,
"L1 leading isolated #tau E_{T};L1 #tau E_{T};entries");
85 snprintf(buffer, BUFMAX,
"L1 leading isolated #tau #eta;L1 #tau #eta;entries");
87 snprintf(buffer, BUFMAX,
"L1 leading isolated #tau #phi;L1 #tau #phi;entries");
90 snprintf(buffer, BUFMAX,
"L1 second-leading isolated #tau E_{T};L1 #tau E_{T};entries");
92 snprintf(buffer, BUFMAX,
"L1 second-leading isolated #tau #eta;L1 #tau #eta;entries");
94 snprintf(buffer, BUFMAX,
"L1 second-leading isolated #tau #phi;L1 #tau #phi;entries");
98 l1tauEtRes_ = iBooker.
book1D(
"L1TauEtResol",
"L1 #tau E_{T} resolution;[L1 #tau E_{T}-Ref #tau E_{T}]/Ref #tau E_{T};entries",60,-1,4);
99 l1isotauEtRes_ = iBooker.
book1D(
"L1IsoTauEtResol",
"L1 isolated #tau E_{T} resolution;[L1 #tau E_{T}-Ref #tau E_{T}]/Ref #tau E_{T};entries",60,-1,4);
139 for (
auto const &
tau : refC.
taus) {
170 for(
auto const &
i : *taus) {
171 l1taus.push_back(
i.p4());
172 if(
i.hwIso() > 0) l1isotaus.push_back(
i.p4());
177 pathTaus.push_back(
i.p4());
182 if(
i.hwIso() > 0) pathIsoTaus.push_back(
i.p4());
193 for (
auto it=sums->
begin(ibx); it!=sums->
end(ibx); it++) {
194 auto type =
static_cast<int>( it->getType() );
206 for (
auto const &
tau : refC.
taus) {
220 pathTaus.push_back(m.second);
234 pathIsoTaus.push_back(m.second);
241 for (
auto it=sums->
begin(ibx); it!=sums->
end(ibx); it++) {
242 auto type =
static_cast<int>( it->getType() );
257 if(pathTaus.size() > 1) std::sort(pathTaus.begin(), pathTaus.end(), [](
const LV&
a,
const LV&
b) {
return a.pt() >
b.pt(); });
258 if ( pathTaus.size() > 0 ) {
263 if ( pathTaus.size() > 1 ) {
268 if(pathIsoTaus.size() > 1) std::sort(pathIsoTaus.begin(), pathIsoTaus.end(), [](
const LV&
a,
const LV&
b) {
return a.pt() >
b.pt(); });
269 if ( pathIsoTaus.size() > 0 ) {
274 if ( pathIsoTaus.size() > 1 ) {
const_iterator end(int bx) const
MonitorElement * secondIsoTauPhi_
T getUntrackedParameter(std::string const &, T const &) const
const double matchDeltaR_
unsigned size(int bx) const
MonitorElement * l1isotauEtEffDenom_
MonitorElement * secondTauEta_
void bookHistograms(DQMStore::IBooker &iBooker)
MonitorElement * l1isotauEta_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * firstTauPhi_
math::XYZTLorentzVectorD LV
MonitorElement * l1etmEtEffNum_
MonitorElement * l1isotauPhiEffNum_
MonitorElement * l1isotauEt_
const std::string & triggerTag() const
MonitorElement * firstIsoTauPhi_
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const HLTTauDQMOfflineObjects &refC)
MonitorElement * secondIsoTauEt_
MonitorElement * firstTauEta_
MonitorElement * l1tauEt_
MonitorElement * l1isotauEtaEffDenom_
MonitorElement * l1isotauPhiEffDenom_
MonitorElement * secondTauEt_
MonitorElement * l1tauEtEffDenom_
MonitorElement * secondIsoTauEta_
const bool doRefAnalysis_
MonitorElement * l1tauEtaEffNum_
MonitorElement * firstTauEt_
MonitorElement * l1tauHighEtEffDenom_
edm::EDGetTokenT< l1t::TauBxCollection > l1stage2TausToken_
MonitorElement * l1etmEt_
MonitorElement * book1D(Args &&...args)
edm::InputTag l1stage2Taus_
MonitorElement * l1tauEtEffNum_
MonitorElement * l1tauPhi_
MonitorElement * l1tauEta_
MonitorElement * l1isotauPhi_
MonitorElement * l1isotauEtaEffNum_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * secondTauPhi_
T const * product() const
MonitorElement * l1tauPhiEffDenom_
HLTTauDQML1Plotter(const edm::ParameterSet &, edm::ConsumesCollector &&cc, int phibins, double maxpt, double maxhighpt, bool ref, double dr, const std::string &dqmBaseFolder)
MonitorElement * firstIsoTauEta_
MonitorElement * l1isotauEtEffNum_
MonitorElement * l1tauEtaEffDenom_
MonitorElement * l1tauEtRes_
std::pair< bool, LV > match(const LV &, const LVColl &, double)
MonitorElement * l1isotauEtRes_
MonitorElement * l1etmEtEffDenom_
MonitorElement * l1etmPhi_
MonitorElement * firstIsoTauEt_
const_iterator begin(int bx) const
edm::InputTag l1stage2Sums_
MonitorElement * l1tauPhiEffNum_
MonitorElement * l1tauHighEtEffNum_
edm::EDGetTokenT< l1t::EtSumBxCollection > l1stage2SumsToken_