33 if (
m_tDTST->m_bCreateControlPlots)
35 auto hHist = std::make_unique<TH1F>(sName, sTitle, iBins, dXLow, dXUp);
36 hHist->SetDirectory(0);
59 std::map<std::string, std::string&>::iterator it =
m_mProperties.find(name);
61 throw std::runtime_error ((
"Undeclared property: " + name +
"\n").c_str());
68 std::pair<std::string, std::string&> p(name, loc);
75 std::map<std::string, std::string&>::iterator it =
m_mProperties.find(name);
77 throw std::runtime_error ((
"Undeclared property: " + name +
"\n").c_str());
95 hHist.Fill(xDiTau.
pt()/1000.);
102 "Selection of ditaus according to their transverse momentum" );
109 double pt = xDiTau.
pt() / 1000.;
111 if (
m_tDTST->m_vPtRegion.size() == 1)
113 if ( pt >=
m_tDTST->m_vPtRegion.at(0) )
119 unsigned int iNumPtRegion =
m_tDTST->m_vPtRegion.size()/2;
120 for(
unsigned int iPtRegion = 0; iPtRegion < iNumPtRegion; iPtRegion++ )
122 if ( pt >=
m_tDTST->m_vPtRegion.at(iPtRegion*2) and pt <= m_tDTST->m_vPtRegion.at(iPtRegion*2+1))
128 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed pt requirement, ditau pt [GeV]: " << pt <<
endmsg;
144 hHist.Fill(xDiTau.
eta());
150 info.addCut(
"AbsEta",
151 "Selection of ditaus according to their absolute pseudorapidity" );
158 unsigned int iNumEtaRegion =
m_tDTST->m_vAbsEtaRegion.size()/2;
159 for(
unsigned int iEtaRegion = 0; iEtaRegion < iNumEtaRegion; iEtaRegion++ )
161 if ( std::abs( xDiTau.
eta() ) >=
m_tDTST->m_vAbsEtaRegion.at(iEtaRegion*2) and std::abs( xDiTau.
eta() ) <=
m_tDTST->m_vAbsEtaRegion.at(iEtaRegion*2+1))
167 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed eta requirement, ditau eta: " << xDiTau.
eta() <<
endmsg;
189 info.addCut(
"NSubjets",
190 "Selection of ditaus according to their number of subjets" );
198 if (
m_tDTST->m_vNSubjetsRegion.size() == 1)
200 if ( nsubjets >=
m_tDTST->m_vNSubjetsRegion.at(0) )
206 unsigned int iNumNSubjetsRegion =
m_tDTST->m_vNSubjetsRegion.size()/2;
207 for(
unsigned int iNSubjetsRegion = 0; iNSubjetsRegion < iNumNSubjetsRegion; iNSubjetsRegion++ )
209 if ( nsubjets >=
m_tDTST->m_vNSubjetsRegion.at(iNSubjetsRegion*2) and nsubjets <= m_tDTST->m_vNSubjetsRegion.at(iNSubjetsRegion*2+1))
215 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed NSubjets requirement, ditau number of subjets: " << nsubjets <<
endmsg;
238 info.addCut(
"AbsCharge",
239 "Selection of taus according to their absolute charge" );
250 for (
const auto& xTrack : xTau.
trackLinks()) {
251 if (!xTrack.isValid())
255 for (
int i = 0; i < 2; ++i) {
256 TLorentzVector tlvSubjet = TLorentzVector();
259 double dR = tlvSubjet.DeltaR((*xTrack)->p4());
270 for(
unsigned int iCharge = 0; iCharge <
m_tDTST->m_vAbsCharges.size(); iCharge++ )
295 hHist.Fill(acc_OmniScore(xTau));
300 info.addCut(
"OmniScore",
301 "Selection of taus according to their OmniScore" );
309 float dOmniScore = acc(xTau);
310 unsigned int iNumOmniScoreRegion =
m_tDTST->m_vOmniScoreRegion.size()/2;
311 for(
unsigned int iOmniScoreRegion = 0; iOmniScoreRegion < iNumOmniScoreRegion; iOmniScoreRegion++ )
313 if ( dOmniScore >=
m_tDTST->m_vOmniScoreRegion.at(iOmniScoreRegion*2) and dOmniScore <= m_tDTST->m_vOmniScoreRegion.at(iOmniScoreRegion*2+1))
319 m_tDTST->msg() << MSG::VERBOSE <<
"Tau failed OmniScore requirement, tau OmniScore: " << dOmniScore <<
endmsg;
342 m_hHistCut->GetXaxis()->SetBinLabel(1,
"!VeryLoose");
343 m_hHistCut->GetXaxis()->SetBinLabel(2,
"VeryLoose");
344 m_hHistCut->GetXaxis()->SetBinLabel(3,
"!Loose");
345 m_hHistCut->GetXaxis()->SetBinLabel(4,
"Loose");
346 m_hHistCut->GetXaxis()->SetBinLabel(5,
"!Medium");
347 m_hHistCut->GetXaxis()->SetBinLabel(6,
"Medium");
348 m_hHistCut->GetXaxis()->SetBinLabel(7,
"!Tight");
349 m_hHistCut->GetXaxis()->SetBinLabel(8,
"Tight");
360 hHist.Fill(acc_OmniVeryLoose(xTau));
361 hHist.Fill(acc_OmniLoose(xTau)+2);
362 hHist.Fill(acc_OmniMedium(xTau)+4);
363 hHist.Fill(acc_OmniTight(xTau)+6);
370 info.addCut(
"OmniIDWP",
371 "Selection of ditaus according to their OmniIDScore" );
386 if (!acc_OmniVeryLoose.
isAvailable(xTau))
m_tDTST->msg() << MSG::WARNING <<
"Omni VeryLoose WP not available" <<
endmsg;
387 else bPass = acc_OmniVeryLoose(xTau);
392 else bPass = acc_OmniLoose(xTau);
397 else bPass = acc_OmniMedium(xTau);
402 else bPass = acc_OmniTight(xTau);
405 m_tDTST->msg() << MSG::WARNING <<
"The Omni ID working point with the enum " <<
m_tDTST->m_iOmniIDWP <<
" is not available" <<
endmsg;
413 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed OmniIDWP requirement" <<
endmsg;
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
virtual double eta() const
The pseudorapidity ( ) of the particle.
float subjetEta(unsigned int numSubjet) const
virtual double pt() const
The transverse momentum ( ) of the particle.
float subjetE(unsigned int numSubjet) const
float subjetPt(unsigned int numSubjet) const
float subjetPhi(unsigned int numSubjet) const
const TrackParticleLinks_t & trackLinks() const
DiTauJet_v1 DiTauJet
Definition of the current version.