36 if (
m_tDTST->m_bCreateControlPlots)
38 auto hHist = std::make_unique<TH1F>(sName, sTitle, iBins, dXLow, dXUp);
39 hHist->SetDirectory(0);
62 std::map<std::string, std::string&>::iterator it =
m_mProperties.find(name);
64 throw std::runtime_error ((
"Undeclared property: " + name +
"\n").c_str());
77 std::map<std::string, std::string&>::iterator it =
m_mProperties.find(name);
79 throw std::runtime_error ((
"Undeclared property: " + name +
"\n").c_str());
97 hHist.Fill(xDiTau.
pt()/1000.);
104 "Selection of ditaus according to their transverse momentum" );
111 double pt = xDiTau.
pt() / 1000.;
113 if (
m_tDTST->m_vPtRegion.size() == 1)
115 if ( pt >=
m_tDTST->m_vPtRegion.at(0) )
121 unsigned int iNumPtRegion =
m_tDTST->m_vPtRegion.size()/2;
122 for(
unsigned int iPtRegion = 0; iPtRegion < iNumPtRegion; iPtRegion++ )
124 if ( pt >=
m_tDTST->m_vPtRegion.at(iPtRegion*2) and pt <= m_tDTST->m_vPtRegion.at(iPtRegion*2+1))
130 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed pt requirement, ditau pt [GeV]: " << pt <<
endmsg;
146 hHist.Fill(xDiTau.
eta());
152 info.addCut(
"AbsEta",
153 "Selection of ditaus according to their absolute pseudorapidity" );
160 unsigned int iNumEtaRegion =
m_tDTST->m_vAbsEtaRegion.size()/2;
161 for(
unsigned int iEtaRegion = 0; iEtaRegion < iNumEtaRegion; iEtaRegion++ )
163 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))
169 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed eta requirement, ditau eta: " << xDiTau.
eta() <<
endmsg;
191 info.addCut(
"NSubjets",
192 "Selection of ditaus according to their number of subjets" );
200 if (
m_tDTST->m_vNSubjetsRegion.size() == 1)
202 if ( nsubjets >=
m_tDTST->m_vNSubjetsRegion.at(0) )
208 unsigned int iNumNSubjetsRegion =
m_tDTST->m_vNSubjetsRegion.size()/2;
209 for(
unsigned int iNSubjetsRegion = 0; iNSubjetsRegion < iNumNSubjetsRegion; iNSubjetsRegion++ )
211 if ( nsubjets >=
m_tDTST->m_vNSubjetsRegion.at(iNSubjetsRegion*2) and nsubjets <= m_tDTST->m_vNSubjetsRegion.at(iNSubjetsRegion*2+1))
217 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed NSubjets requirement, ditau number of subjets: " << nsubjets <<
endmsg;
240 info.addCut(
"AbsCharge",
241 "Selection of taus according to their absolute charge" );
252 for (
const auto& xTrack : xTau.
trackLinks()) {
253 if (!xTrack.isValid())
257 for (
int i = 0; i < 2; ++i) {
258 TLorentzVector tlvSubjet = TLorentzVector();
261 double dR = tlvSubjet.DeltaR((*xTrack)->p4());
272 for(
unsigned int iCharge = 0; iCharge <
m_tDTST->m_vAbsCharges.size(); iCharge++ )
297 hHist.Fill(acc_OmniScore(xTau));
302 info.addCut(
"OmniScore",
303 "Selection of taus according to their OmniScore" );
311 float dOmniScore = acc(xTau);
312 unsigned int iNumOmniScoreRegion =
m_tDTST->m_vOmniScoreRegion.size()/2;
313 for(
unsigned int iOmniScoreRegion = 0; iOmniScoreRegion < iNumOmniScoreRegion; iOmniScoreRegion++ )
315 if ( dOmniScore >=
m_tDTST->m_vOmniScoreRegion.at(iOmniScoreRegion*2) and dOmniScore <= m_tDTST->m_vOmniScoreRegion.at(iOmniScoreRegion*2+1))
321 m_tDTST->msg() << MSG::VERBOSE <<
"Tau failed OmniScore requirement, tau OmniScore: " << dOmniScore <<
endmsg;
344 m_hHistCut->GetXaxis()->SetBinLabel(1,
"!VeryLoose");
345 m_hHistCut->GetXaxis()->SetBinLabel(2,
"VeryLoose");
346 m_hHistCut->GetXaxis()->SetBinLabel(3,
"!Loose");
347 m_hHistCut->GetXaxis()->SetBinLabel(4,
"Loose");
348 m_hHistCut->GetXaxis()->SetBinLabel(5,
"!Medium");
349 m_hHistCut->GetXaxis()->SetBinLabel(6,
"Medium");
350 m_hHistCut->GetXaxis()->SetBinLabel(7,
"!Tight");
351 m_hHistCut->GetXaxis()->SetBinLabel(8,
"Tight");
362 hHist.Fill(acc_OmniVeryLoose(xTau));
363 hHist.Fill(acc_OmniLoose(xTau)+2);
364 hHist.Fill(acc_OmniMedium(xTau)+4);
365 hHist.Fill(acc_OmniTight(xTau)+6);
372 info.addCut(
"OmniIDWP",
373 "Selection of ditaus according to their OmniIDScore" );
388 if (!acc_OmniVeryLoose.
isAvailable(xTau))
m_tDTST->msg() << MSG::WARNING <<
"Omni VeryLoose WP not available" <<
endmsg;
389 else bPass = acc_OmniVeryLoose(xTau);
394 else bPass = acc_OmniLoose(xTau);
399 else bPass = acc_OmniMedium(xTau);
404 else bPass = acc_OmniTight(xTau);
407 m_tDTST->msg() << MSG::WARNING <<
"The Omni ID working point with the enum " <<
m_tDTST->m_iOmniIDWP <<
" is not available" <<
endmsg;
415 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.