38 if (
m_tDTST->m_bCreateControlPlots)
40 TH1F* hHist =
new TH1F(sName, sTitle, iBins, dXLow, dXUp);
41 hHist->SetDirectory(0);
64 std::map<std::string, std::string&>::iterator it =
m_mProperties.find(name);
66 throw std::runtime_error ((
"Undeclared property: " + name +
"\n").c_str());
73 std::pair<std::string, std::string&> p(name, loc);
80 std::map<std::string, std::string&>::iterator it =
m_mProperties.find(name);
82 throw std::runtime_error ((
"Undeclared property: " + name +
"\n").c_str());
100 hHist.Fill(xDiTau.
pt()/1000.);
107 "Selection of ditaus according to their transverse momentum" );
114 double pt = xDiTau.
pt() / 1000.;
116 if (
m_tDTST->m_vPtRegion.size() == 1)
118 if ( pt >=
m_tDTST->m_vPtRegion.at(0) )
124 unsigned int iNumPtRegion =
m_tDTST->m_vPtRegion.size()/2;
125 for(
unsigned int iPtRegion = 0; iPtRegion < iNumPtRegion; iPtRegion++ )
127 if ( pt >=
m_tDTST->m_vPtRegion.at(iPtRegion*2) and pt <= m_tDTST->m_vPtRegion.at(iPtRegion*2+1))
133 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed pt requirement, ditau pt [GeV]: " << pt <<
endmsg;
149 hHist.Fill(xDiTau.
eta());
155 info.addCut(
"AbsEta",
156 "Selection of ditaus according to their absolute pseudorapidity" );
163 unsigned int iNumEtaRegion =
m_tDTST->m_vAbsEtaRegion.size()/2;
164 for(
unsigned int iEtaRegion = 0; iEtaRegion < iNumEtaRegion; iEtaRegion++ )
166 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))
172 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed eta requirement, ditau eta: " << xDiTau.
eta() <<
endmsg;
194 info.addCut(
"NSubjets",
195 "Selection of ditaus according to their number of subjets" );
203 if (
m_tDTST->m_vNSubjetsRegion.size() == 1)
205 if ( nsubjets >=
m_tDTST->m_vNSubjetsRegion.at(0) )
211 unsigned int iNumNSubjetsRegion =
m_tDTST->m_vNSubjetsRegion.size()/2;
212 for(
unsigned int iNSubjetsRegion = 0; iNSubjetsRegion < iNumNSubjetsRegion; iNSubjetsRegion++ )
214 if ( nsubjets >=
m_tDTST->m_vNSubjetsRegion.at(iNSubjetsRegion*2) and nsubjets <= m_tDTST->m_vNSubjetsRegion.at(iNSubjetsRegion*2+1))
220 m_tDTST->msg() << MSG::VERBOSE <<
"DiTau failed NSubjets requirement, ditau number of subjets: " << nsubjets <<
endmsg;
243 info.addCut(
"AbsCharge",
244 "Selection of taus according to their absolute charge" );
255 for (
const auto& xTrack : xTau.
trackLinks()) {
256 if (!xTrack.isValid())
260 for (
int i = 0; i < 2; ++i) {
261 TLorentzVector tlvSubjet = TLorentzVector();
264 double dR = tlvSubjet.DeltaR((*xTrack)->p4());
275 for(
unsigned int iCharge = 0; iCharge <
m_tDTST->m_vAbsCharges.size(); iCharge++ )
300 hHist.Fill(acc_OmniScore(xTau));
305 info.addCut(
"OmniScore",
306 "Selection of taus according to their OmniScore" );
314 float dOmniScore = acc(xTau);
315 unsigned int iNumOmniScoreRegion =
m_tDTST->m_vOmniScoreRegion.size()/2;
316 for(
unsigned int iOmniScoreRegion = 0; iOmniScoreRegion < iNumOmniScoreRegion; iOmniScoreRegion++ )
318 if ( dOmniScore >=
m_tDTST->m_vOmniScoreRegion.at(iOmniScoreRegion*2) and dOmniScore <= m_tDTST->m_vOmniScoreRegion.at(iOmniScoreRegion*2+1))
324 m_tDTST->msg() << MSG::VERBOSE <<
"Tau failed OmniScore requirement, tau OmniScore: " << dOmniScore <<
endmsg;
347 m_hHistCut->GetXaxis()->SetBinLabel(1,
"!VeryLoose");
348 m_hHistCut->GetXaxis()->SetBinLabel(2,
"VeryLoose");
349 m_hHistCut->GetXaxis()->SetBinLabel(3,
"!Loose");
350 m_hHistCut->GetXaxis()->SetBinLabel(4,
"Loose");
351 m_hHistCut->GetXaxis()->SetBinLabel(5,
"!Medium");
352 m_hHistCut->GetXaxis()->SetBinLabel(6,
"Medium");
353 m_hHistCut->GetXaxis()->SetBinLabel(7,
"!Tight");
354 m_hHistCut->GetXaxis()->SetBinLabel(8,
"Tight");
365 hHist.Fill(acc_OmniVeryLoose(xTau));
366 hHist.Fill(acc_OmniLoose(xTau)+2);
367 hHist.Fill(acc_OmniMedium(xTau)+4);
368 hHist.Fill(acc_OmniTight(xTau)+6);
375 info.addCut(
"OmniIDWP",
376 "Selection of ditaus according to their OmniIDScore" );
391 if (!acc_OmniVeryLoose.
isAvailable(xTau))
m_tDTST->msg() << MSG::WARNING <<
"Omni VeryLoose WP not available" <<
endmsg;
392 else bPass = acc_OmniVeryLoose(xTau);
397 else bPass = acc_OmniLoose(xTau);
402 else bPass = acc_OmniMedium(xTau);
407 else bPass = acc_OmniTight(xTau);
410 m_tDTST->msg() << MSG::WARNING <<
"The Omni ID working point with the enum " <<
m_tDTST->m_iOmniIDWP <<
" is not available" <<
endmsg;
418 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.