ATLAS Offline Software
JSSTaggerBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 #include <TSystem.h>
10 
11 JSSTaggerBase::JSSTaggerBase(const std::string &name) :
12  asg::AsgTool(name),
13  m_calibArea(""),
14  m_jetPtMin(200000.),
15  m_jetPtMax(3000000.),
16  m_jetEtaMax(2.0),
17  m_strMassCutLow(""),
18  m_strMassCutHigh(""),
19  m_strScoreCut("")
20 {
21 
23  declareProperty( "ContainerName", m_containerName = "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", "Name of jet container" );
24  declareProperty( "ConfigFile", m_configFile = "", "Name of config file" );
25  declareProperty( "CalibArea", m_calibArea = "", "Path to config file" );
26  declareProperty( "CalcSF", m_calcSF = false, "Flag to calculate the efficiency SF" );
27  declareProperty( "WorkingPoint", m_wkpt = "", "If specified, name of working point is added to the variable names" );
28  declareProperty( "TaggerType", m_tagType = "XXX", "Tagger type (e.g. SmoothedWZTagger, JSSWTopTaggerDNN, etc.)" );
29  declareProperty( "Decoration", m_decorationName = "XX", "Prefix for the variables decorated to xAOD::Jet" );
30  declareProperty( "IsMC", m_isMC = true, "Flag to identify data or MC" );
31 
33  declareProperty( "JetEtaMax", m_jetEtaMax = 2.0, "Eta cut to define fiducial phase space for the tagger");
34 
36  declareProperty( "UseTRUTH3", m_truthLabelUseTRUTH3 = true,
37  "Flag to use TRUTH3 containers. If false, TRUTH1 format is used." );
38  declareProperty( "TruthParticleContainerName", m_truthParticleContainerName = "TruthParticles",
39  "Name of truth-particle container (with UseTRUTH3=false). TruthParticles by default" );
40  declareProperty( "TruthBosonContainerName", m_truthBosonContainerName = "TruthBosonsWithDecayParticles",
41  "Name of truth-boson container (with UseTRUTH3=true). TruthBosonWithDecayParticles by default" );
42  declareProperty( "TruthTopQuarkContainerName", m_truthTopQuarkContainerName = "TruthTopQuarkWithDecayParticles",
43  "Name of truth-top container (with UseTRUTH3=true). TruthTopQuarkWithDecayParticles by default" );
44 
46  declareProperty( "CalibAreaKeras", m_kerasCalibArea = "BoostedJetTaggers/TopoclusterTopTagger/Boost2017/",
47  "Path to json file to configure ML-taggers (Keras)" );
48  declareProperty( "KerasConfigFile", m_kerasConfigFileName = "XXX",
49  "Name of json file to configure ML-taggers (Keras)" );
50  declareProperty( "KerasOutput", m_kerasConfigOutputName = "XXX",
51  "Name of output variable by the ML-tagger (Keras)" );
52 
54  declareProperty( "CalibAreaTMVA", m_tmvaCalibArea = "BoostedJetTaggers/JSSWTopTaggerBDT/Boost2017/",
55  "Path to xml file to configure ML-taggers (TMVA)" );
56  declareProperty( "TMVAConfigFile", m_tmvaConfigFileName = "XXX",
57  "Name of xml file to configure ML-taggers (TMVA)" );
58 
60  declareProperty( "WeightDecorationName", m_weightDecorationName = "SF",
61  "Name of SF variable decorated to xAOD::Jet" );
62  declareProperty( "WeightFile", m_weightFileName = "",
63  "Name of config ROOT file for SF calculation" );
64  declareProperty( "WeightHistogramName", m_weightHistogramName = "",
65  "Name of SF histograms in the ROOT file" );
66  declareProperty( "EfficiencyHistogramName", m_efficiencyHistogramName = "",
67  "Name of efficiency histograms in the ROOT file" );
68  declareProperty( "WeightFlavors", m_weightFlavors = "",
69  "List of jet flavours for which the SF is available. Divided by comma" );
70  declareProperty( "SuppressOutputDependence", m_suppressOutputDependence = false );
71 }
72 
74 
76  if ( m_containerName.empty() ) {
77  ATH_MSG_ERROR( "ContainerName has not been set. Exiting" );
78  return StatusCode::FAILURE;
79  }
80 
82  m_nWarnVar = 0;
83 
85  m_acceptInfo.addCut( "ValidPtRangeHigh" , "True if the jet is not too high pT" );
86  m_acceptInfo.addCut( "ValidPtRangeLow" , "True if the jet is not too low pT" );
87  m_acceptInfo.addCut( "ValidEtaRange" , "True if the jet is not too forward" );
88 
89  m_acceptInfo.addCut( "ValidJetContent" , "True if the jet is alright technically (e.g. all attributes necessary for tag)" );
90  m_acceptInfo.addCut( "ValidEventContent" , "True if the event is alright technically (e.g. primary vertices)" );
91 
93  ATH_MSG_INFO( "Decorators that will be attached to jet :" );
94 
95  ATH_CHECK( m_jetContainer_key.initialize() );
96 
104 
108  m_decC2Key = m_containerName + "." + m_decC2Key.key();
109  m_decD2Key = m_containerName + "." + m_decD2Key.key();
110  m_decE3Key = m_containerName + "." + m_decE3Key.key();
111  m_decL2Key = m_containerName + "." + m_decL2Key.key();
112  m_decL3Key = m_containerName + "." + m_decL3Key.key();
113 
124  m_readC2Key = m_containerName + "." + m_readC2Key.key();
125  m_readD2Key = m_containerName + "." + m_readD2Key.key();
126  m_readE3Key = m_containerName + "." + m_readE3Key.key();
129  m_readQwKey = m_containerName + "." + m_readQwKey.key();
132  m_readL2Key = m_containerName + "." + m_readL2Key.key();
133  m_readL3Key = m_containerName + "." + m_readL3Key.key();
137 
138  ATH_CHECK( m_decTau21WTAKey.initialize() );
139  ATH_CHECK( m_decTau32WTAKey.initialize() );
140  ATH_CHECK( m_decTau42WTAKey.initialize() );
141  ATH_CHECK( m_decC2Key.initialize() );
142  ATH_CHECK( m_decD2Key.initialize() );
143  ATH_CHECK( m_decE3Key.initialize() );
144  ATH_CHECK( m_decL2Key.initialize() );
145  ATH_CHECK( m_decL3Key.initialize() );
146 
147  ATH_CHECK( m_readTau1WTAKey.initialize() );
148  ATH_CHECK( m_readTau2WTAKey.initialize() );
149  ATH_CHECK( m_readTau3WTAKey.initialize() );
150  ATH_CHECK( m_readTau4WTAKey.initialize() );
151  ATH_CHECK( m_readTau21WTAKey.initialize() );
152  ATH_CHECK( m_readTau32WTAKey.initialize() );
153  ATH_CHECK( m_readTau42WTAKey.initialize() );
154  ATH_CHECK( m_readECF1Key.initialize() );
155  ATH_CHECK( m_readECF2Key.initialize() );
156  ATH_CHECK( m_readECF3Key.initialize() );
157  ATH_CHECK( m_readC2Key.initialize() );
158  ATH_CHECK( m_readD2Key.initialize() );
159  ATH_CHECK( m_readE3Key.initialize() );
160  ATH_CHECK( m_readSplit12Key.initialize() );
161  ATH_CHECK( m_readSplit23Key.initialize() );
162  ATH_CHECK( m_readQwKey.initialize() );
163  ATH_CHECK( m_readThrustMajKey.initialize() );
164  ATH_CHECK( m_readSphericityKey.initialize() );
165  ATH_CHECK( m_readL2Key.initialize() );
166  ATH_CHECK( m_readL3Key.initialize() );
167  ATH_CHECK( m_readECFG331Key.initialize() );
168  ATH_CHECK( m_readECFG311Key.initialize() );
169  ATH_CHECK( m_readECFG212Key.initialize() );
170 
172  ATH_CHECK( m_readParentKey.initialize() );
173 
175  ATH_CHECK( m_decNtrk500Key.initialize() );
176 
178  ATH_CHECK( m_readNtrk500Key.initialize() );
179 
180  ATH_CHECK( m_decTaggedKey.initialize() );
181  ATH_CHECK( m_decValidPtRangeHighKey.initialize() );
182  ATH_CHECK( m_decValidPtRangeLowKey.initialize() );
183  ATH_CHECK( m_decValidEtaRangeKey.initialize() );
184  ATH_CHECK( m_decValidKinRangeKey.initialize() );
185  ATH_CHECK( m_decValidJetContentKey.initialize() );
186  ATH_CHECK( m_decValidEventContentKey.initialize() );
187 
188  ATH_MSG_INFO( " " << m_decTaggedKey.key() << " : pass tagging criteria" );
189  ATH_MSG_INFO( " " << m_decValidPtRangeHighKey.key() << " : pass upper pt range" );
190  ATH_MSG_INFO( " " << m_decValidPtRangeLowKey.key() << " : pass lower pt range" );
191  ATH_MSG_INFO( " " << m_decValidEtaRangeKey.key() << " : pass eta range" );
192  ATH_MSG_INFO( " " << m_decValidKinRangeKey.key() << " : pass kinematic range" );
193  ATH_MSG_INFO( " " << m_decValidJetContentKey.key() << " : has valid jet content" );
194  ATH_MSG_INFO( " " << m_decValidEventContentKey.key() << " : has valid event content" );
195 
196 
200 
201  ATH_CHECK( m_decPassMassKey.initialize() );
202  ATH_CHECK( m_decCutMLowKey.initialize() );
203  ATH_CHECK( m_decCutMHighKey.initialize() );
204 
205  ATH_MSG_INFO( " " << m_decPassMassKey.key() << " : pass mass cut" );
206  ATH_MSG_INFO( " " << m_decCutMLowKey.key() << " : lower mass cut" );
207  ATH_MSG_INFO( " " << m_decCutMHighKey.key() << " : upper mass cut" );
208 
209 
213 
214  ATH_CHECK( m_decPassScoreKey.initialize() );
215  ATH_CHECK( m_decScoreCutKey.initialize() );
216  ATH_CHECK( m_decScoreValueKey.initialize() );
217 
218  ATH_MSG_INFO( " " << m_decPassScoreKey.key() << " : pass MVA score cut" );
219  ATH_MSG_INFO( " " << m_decScoreCutKey.key() << " : MVA score cut" );
220  ATH_MSG_INFO( " " << m_decScoreValueKey.key() << " : evaluated MVA score" );
221 
222 
227 
228  ATH_CHECK( m_decWeightKey.initialize() );
229  ATH_CHECK( m_decEfficiencyKey.initialize() );
230  ATH_CHECK( m_decEffSFKey.initialize() );
231  ATH_CHECK( m_decSigeffSFKey.initialize() );
232 
233  ATH_MSG_INFO( " " << m_decWeightKey.key() << " : tagging SF" );
234 
236  ATH_CHECK( m_readTruthLabelKey.initialize() );
237 
238 #ifndef XAOD_STANDALONE
253  }
254 #endif
255 
257  if ( m_calcSF ) {
258 
260  m_weightConfig = std::make_unique<TFile>( m_weightConfigPath.c_str() );
261  if( !m_weightConfig ) {
262  ATH_MSG_ERROR( "SmoothedWZTagger: Error openning config file : " << m_weightConfigPath );
263  return StatusCode::FAILURE;
264  }
265 
267  std::stringstream ss{m_weightFlavors};
268  std::string flavor;
269  while ( std::getline(ss, flavor, ',') ) {
270  m_weightHistograms.insert( std::make_pair( flavor, (TH2D*)m_weightConfig->Get((m_weightHistogramName+"_"+flavor).c_str()) ) );
271  if ( !m_efficiencyHistogramName.empty() ) {
272  m_efficiencyHistograms.insert( std::make_pair( flavor, (TH2D*)m_weightConfig->Get((m_efficiencyHistogramName+"_"+flavor).c_str()) ) );
273  }
274  ATH_MSG_INFO( "Tagging SF histogram for " << flavor << " is installed." );
275  }
276 
277  }
278 
280  if ( !m_strMassCutLow.empty() ) m_funcMassCutLow = std::make_unique<TF1>("strMassCutLow", m_strMassCutLow.c_str(), 0, 14000);
281  if ( !m_strMassCutHigh.empty() ) m_funcMassCutHigh = std::make_unique<TF1>("strMassCutHigh", m_strMassCutHigh.c_str(), 0, 14000);
282  if ( !m_strScoreCut.empty() ) m_funcScoreCut = std::make_unique<TF1>("strScoreCut", m_strScoreCut.c_str(), 0, 14000);
283 
284  return StatusCode::SUCCESS;
285 
286 }
287 
290 
291  for ( const auto *jet : jets ) {
292  ATH_CHECK( tag(*jet) );
293  }
294 
295  return StatusCode::SUCCESS;
296 
297 }
298 
301 
302  ATH_MSG_INFO( "Using config file : " << m_configFile );
303 
305  std::string configPath;
306 
307  if ( m_calibArea.compare("Local") == 0 ) {
308  configPath = PathResolverFindCalibFile(("$WorkDir_DIR/data/BoostedJetTaggers/"+m_configFile).c_str());
309  }
310  else if ( m_calibArea.find("eos") != std::string::npos) {
311  configPath = PathResolverFindCalibFile((m_calibArea+"/"+m_configFile).c_str());
312  }
313  else {
314  configPath = PathResolverFindCalibFile(("BoostedJetTaggers/"+m_calibArea+"/"+m_configFile).c_str());
315  }
316 
318  FileStat_t fStats;
319  int fSuccess = gSystem->GetPathInfo(configPath.c_str(), fStats);
320  if ( fSuccess ) {
321  ATH_MSG_ERROR( "Recommendations file " << m_configFile << " could not be found" );
322  return StatusCode::FAILURE;
323  }
324  else {
325  ATH_MSG_DEBUG( "Recommendations file was found : " << configPath );
326  }
327 
328  if ( m_configReader.ReadFile( configPath.c_str(), EEnvLevel(0) ) ) {
329  ATH_MSG_ERROR( "Error while reading config file : "<< configPath );
330  return StatusCode::FAILURE;
331  }
332 
333  return StatusCode::SUCCESS;
334 
335 }
336 
339 
341  acceptData.clear();
342 
344  acceptData.setCutResult( "ValidJetContent", true );
345  acceptData.setCutResult( "ValidEventContent", true );
346 
347  acceptData.setCutResult( "ValidPtRangeHigh", true );
348  acceptData.setCutResult( "ValidPtRangeLow" , true );
349  acceptData.setCutResult( "ValidEtaRange" , true );
350 
351  return StatusCode::SUCCESS;
352 
353 }
354 
357 
358  float scale = 1.0;
359  if ( m_ptGeV ) scale = 1.e3;
360 
361  if ( jet.pt() < m_jetPtMin * scale ) return false;
362  if ( jet.pt() > m_jetPtMax * scale ) return false;
363  if ( std::abs( jet.eta() ) > m_jetEtaMax ) return false;
364 
365  return true;
366 
367 }
368 
371 
372  float scale = 1.0;
373  if ( m_ptGeV ) scale = 1.e3;
374 
375  bool passKinRange = true;
376 
379  if ( std::abs(jet.eta()) > m_jetEtaMax ) {
380  ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (|eta| < " << m_jetEtaMax << "). Jet eta = " << jet.eta() );
381  acceptData.setCutResult( "ValidEtaRange", false );
382  passKinRange = false;
383  }
384 
385  if ( jet.pt() < m_jetPtMin * scale ) {
386  ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (pT > " << m_jetPtMin * scale / 1.e3 << "). Jet pT = " << jet.pt() / 1.e3 << " GeV" );
387  acceptData.setCutResult( "ValidPtRangeLow", false );
388  passKinRange = false;
389  }
390 
391  if ( jet.pt() > m_jetPtMax * scale ) {
392  ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (pT < " << m_jetPtMax * scale / 1.e3 << "). Jet pT = " << jet.pt() / 1.e3 << " GeV" );
393  acceptData.setCutResult( "ValidPtRangeHigh", false );
394  passKinRange = false;
395  }
396 
402 
404  decValidPtRangeHigh(jet) = acceptData.getCutResult( "ValidPtRangeHigh" );
405  decValidPtRangeLow(jet) = acceptData.getCutResult( "ValidPtRangeLow" );
406  decValidEtaRange(jet) = acceptData.getCutResult( "ValidEtaRange" );
407  decValidKinRange(jet) = passKinRange;
408 
409  return StatusCode::SUCCESS;
410 
411 }
412 
417 
418  int result = 0;
419 
429 
435 
439 
443 
446 
447 
449  float tau21_wta = -999.0;
450  float tau32_wta = -999.0;
451  float tau42_wta = -999.0;
452 
453  float tau1_wta = readTau1WTA(jet);
454  float tau2_wta = readTau2WTA(jet);
455  float tau3_wta = readTau3WTA(jet);
456  float tau4_wta = -999.0;
457  if(readTau4WTA.isAvailable()){
458  tau4_wta = readTau4WTA(jet);
459  }
460 
461  if ( tau1_wta > 1e-8 ) {
462  tau21_wta = tau2_wta / tau1_wta;
463  }
464  else result = 1;
465 
466  if ( tau2_wta > 1e-8 ) {
467  tau32_wta = tau3_wta / tau2_wta;
468  if(readTau4WTA.isAvailable()){
469  tau42_wta = tau4_wta / tau2_wta;
470  }
471  }
472  else result = 1;
473 
474  decTau21WTA(jet) = tau21_wta;
475  decTau32WTA(jet) = tau32_wta;
476  decTau42WTA(jet) = tau42_wta;
477 
479  float C2 = -999.0;
480  float D2 = -999.0;
481  float e3 = -999.0;
482 
483  float ECF1 = readECF1(jet);
484  float ECF2 = readECF2(jet);
485  float ECF3 = readECF3(jet);
486 
487  if ( ECF2 > 1e-8 ) {
488  C2 = ECF3 * ECF1 / std::pow( ECF2, 2.0 );
489  D2 = ECF3 * std::pow( ECF1, 3.0 ) / std::pow( ECF2, 3.0 );
490  }
491  else result = 1;
492 
493  e3 = ECF3 / std::pow( ECF1, 3.0 );
494 
495  decC2(jet) = C2;
496  decD2(jet) = D2;
497  decE3(jet) = e3;
498 
499  // L-series for UFO top taggers
500  float L2 = -999.0;
501  float L3 = -999.0;
502 
503  if(!readL2.isAvailable()){
504  if(readECFG331.isAvailable() && readECFG212.isAvailable()){
505  if(readECFG212(jet) > 1e-8){
506  L2 = readECFG331(jet) / pow(readECFG212(jet), (3.0/2.0));
507  }
508  else result = 1;
509  }
510  decL2(jet) = L2;
511  }
512 
513  if(!readL3.isAvailable()){
514  if(readECFG331.isAvailable() && readECFG311.isAvailable()){
515  if(readECFG331(jet) > 1e-8){
516  L3 = readECFG311(jet) / pow(readECFG331(jet), (1.0/3.0));
517  }
518  else result = 1;
519  }
520  decL3(jet) = L3;
521  }
522 
523  // TODO: Add ECFG for ANN tagger whenever it is defined
524 
525  return result;
526 
527 }
528 
530 
531  int indexPV = -1;
532 
533  const xAOD::VertexContainer* vxCont = nullptr;
534  if ( evtStore()->retrieve( vxCont, "PrimaryVertices" ).isFailure() ) {
535  ATH_MSG_WARNING( "Unable to retrieve primary vertex container PrimaryVertices" );
536  }
537  else {
538  int vtx_counter = 0;
539  for ( const auto *vx : *vxCont ) {
540  if ( vx->vertexType()==xAOD::VxType::PriVtx ) {
541  indexPV = vtx_counter;
542  break;
543  }
544  vtx_counter++;
545  }
546  }
547 
548  return indexPV;
549 
550 }
551 
554 
556 
558 
559  const xAOD::Jet * ungroomedJet = nullptr;
560  if ( readParent.isAvailable() ) {
561  const ElementLink<xAOD::JetContainer>& linkToUngroomed = readParent(jet);
562  if ( linkToUngroomed.isValid() ) {
563  ungroomedJet = *linkToUngroomed;
564 
565  static const SG::AuxElement::ConstAccessor< std::vector<int> >acc_Ntrk("NumTrkPt500");
566 
567  if ( acc_Ntrk.isAvailable(*ungroomedJet) ) {
568 
569  const std::vector<int>& NTrkPt500 = acc_Ntrk(*ungroomedJet);
570 
571  int jet_ntrk = NTrkPt500.at(indexPV);
572  decNtrk500(jet) = jet_ntrk;
573 
574  }
575  else {
576  ATH_MSG_ERROR("WARNING: Unable to retrieve Ntrk of the ungroomed parent jet. Please make sure this variable is in your derivations!!!");
577  return StatusCode::FAILURE;
578  }
579  }
580  else {
581  ATH_MSG_ERROR("WARNING: Unable to retrieve the parent ungroomed jet. Please make sure this variable is in your derivations!!!");
582  return StatusCode::FAILURE;
583  }
584  }
585  else {
586  ATH_MSG_ERROR("WARNING: Unable to retrieve the link to the parent ungroomed jet. Please make sure this variable is in your derivations!!!");
587  return StatusCode::FAILURE;
588  }
589 
590  return StatusCode::SUCCESS;
591 
592 }
593 
594 
596 StatusCode JSSTaggerBase::getWeight( const xAOD::Jet& jet, bool passSel, asg::AcceptData &acceptData ) const {
597  if ( !m_calcSF ) return StatusCode::SUCCESS;
598 
599  float weight = 1.0;
600  float effSF = 1.0;
601  float sigeffSF = 1.0;
602  float efficiency = 1.0;
603 
604  if ( m_isMC ) {
605 
606  std::string truthLabelStr = getTruthLabelStr( jet, acceptData );
607  std::tie(effSF, efficiency) = getSF( jet, truthLabelStr );
608 
609  // calculate signal efficiency SF
610  if ( m_weightHistograms.count("t_qqb") ) {
611  sigeffSF = getSF(jet, "t_qqb").first;
612  } else if ( m_weightHistograms.count("V_qq") ) {
613  sigeffSF = getSF(jet, "V_qq").first;
614  } else if ( m_weightHistograms.count("t") ){
615  sigeffSF = getSF(jet, "t").first;
616  } else {
617  sigeffSF = 1.0;
618  }
619 
621  if ( m_weightFlavors.find("fail") != std::string::npos ) {
622  weight = effSF;
623  }
624 
625  else {
626 
628  if ( passSel ) {
629  weight = effSF;
630  }
631 
633  else {
635  if ( m_efficiencyHistogramName.empty() ) {
636  weight = 1.0;
637  }
638  else if ( efficiency < 1.0 ) {
639  weight = ( 1. - effSF * efficiency ) / ( 1. - efficiency );
640  }
641  else {
642  weight = 1.0;
643  }
644  }
645  }
646 
647  }
648 
649  else {
650  weight = 1.0;
651  }
652 
658 
660  decWeight(jet) = weight;
661  decEfficiency(jet) = efficiency;
662  decEffSF(jet) = effSF;
663  decSigeffSF(jet) = sigeffSF;
664 
665  return StatusCode::SUCCESS;
666 
667 }
668 
670 std::pair<double, double> JSSTaggerBase::getSF( const xAOD::Jet& jet, const std::string& truthLabelStr ) const {
671 
672  if ( !passKinRange(jet) ) return std::make_pair( 1.0, 1.0 );
673 
674 
675  double logmOverPt = std::log(jet.m()/jet.pt());
676  if ( m_decorationName.find("SmoothZ") != std::string::npos ||
677  m_decorationName.find("SmoothInclusiveZ") != std::string::npos ) {
679  const double WtoZmassShift = 10803;
680  logmOverPt = std::log((jet.m()-WtoZmassShift)/jet.pt());
681  }
682 
683  if ( logmOverPt > 0 ) logmOverPt = 0;
684 
685  double SF = 1.0;
686  double eff = 1.0;
687 
688  if ( m_weightHistograms.count(truthLabelStr.c_str()) ) {
689 
690  int pt_mPt_bin = (m_weightHistograms.find(truthLabelStr.c_str())->second)->FindBin(jet.pt()*0.001, logmOverPt);
691  SF = (m_weightHistograms.find(truthLabelStr.c_str())->second)->GetBinContent(pt_mPt_bin);
692 
693  if ( !m_efficiencyHistogramName.empty() ) {
694  eff = (m_efficiencyHistograms.find(truthLabelStr.c_str())->second)->GetBinContent(pt_mPt_bin);
695  }
696 
697  }
698  else {
699  // set the efficiency for "Other" category to be the signal efficiency
700  std::string signal_truthLabel="";
701  if ( m_weightHistograms.count("t_qqb") ) {
702  signal_truthLabel="t_qqb";
703  }else if ( m_weightHistograms.count("V_qq") ){
704  signal_truthLabel="V_qq";
705  }else if ( m_weightHistograms.count("t") ){
706  signal_truthLabel="t";
707  }
708  if ( !signal_truthLabel.empty() && !m_efficiencyHistogramName.empty() ){
709  int pt_mPt_bin = (m_weightHistograms.find(signal_truthLabel.c_str())->second)->FindBin(jet.pt()*0.001, logmOverPt);
710  eff = (m_efficiencyHistograms.find(signal_truthLabel.c_str())->second)->GetBinContent(pt_mPt_bin);
711  }
712 
713  return std::make_pair( 1.0, eff );
714  }
715 
716  if ( SF < 1e-3 ) {
717  ATH_MSG_DEBUG( "(pt, m/pt) (" << jet.pt()/1.e3 << ", " << jet.m()/jet.pt() << ") is out of range for SF calculation. Returning 1.0" );
718  return std::make_pair( 1.0, 1.0 );
719  }
720  else {
721  return std::make_pair( SF, eff );
722  }
723 
724 }
725 
726 
727 
728 std::string JSSTaggerBase::getTruthLabelStr( const xAOD::Jet& jet, asg::AcceptData &acceptData ) const {
730  std::string truthLabelStr;
731 
734  LargeRJetTruthLabel::TypeEnum jetContainment = LargeRJetTruthLabel::intToEnum(readTruthLabel(jet));
735 
737  if ( m_weightHistograms.count("t_qqb") ) {
738 
740  if ( jetContainment==LargeRJetTruthLabel::tqqb ) {
741  truthLabelStr = "t_qqb";
742  }
744  else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
745  truthLabelStr = "q";
746  }
747 
748  }
750  else if ( m_weightHistograms.count("V_qq_passMpassD2") ) {
751 
753  if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
754  truthLabelStr = "t_";
755  }
757  else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
758  truthLabelStr = "V_qq_";
759  }
761  else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
762  truthLabelStr = "q_";
763  }
764 
766  if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && acceptData.getCutResult("PassD2") ) {
767  truthLabelStr += "passMpassD2";
768  }
770  else if ( !(acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh")) && acceptData.getCutResult("PassD2") ) {
771  truthLabelStr += "failMpassD2";
772  }
774  else if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && !acceptData.getCutResult("PassD2") ) {
775  truthLabelStr += "passMfailD2";
776  }
778  else{
779  truthLabelStr += "failMfailD2";
780  }
781 
782  }
783 
785  else if ( m_weightHistograms.count("V_qq") ) {
786 
788  if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
789  truthLabelStr = "t";
790  }
792  else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
793  truthLabelStr = "V_qq";
794  }
796  else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
797  truthLabelStr = "q";
798  }
799  }
800 
801  // inclusive top tagger
802  else {
804  if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
805  truthLabelStr = "t";
806  }
808  else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
809  truthLabelStr = "q";
810  }
811 
812  }
813 
814  return truthLabelStr;
815 }
816 
818  ATH_MSG_INFO( "After tagging, you will have access to the following cuts as an asg::AcceptData : (<NCut>) <cut> : <description>)" );
819  int nCuts = m_acceptInfo.getNCuts();
820  for ( int iCut=0; iCut < nCuts; iCut++ ) {
821  std::string cut_string = "";
822  cut_string += " (";
823  cut_string += std::to_string(iCut);
824  cut_string += ") ";
825  cut_string += m_acceptInfo.getCutName(iCut).data();
826  cut_string += " : ";
827  cut_string += m_acceptInfo.getCutDescription(iCut).data();
828  ATH_MSG_INFO( cut_string );
829  }
830 }
JSSTaggerBase::m_readParentKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readParentKey
Definition: JSSTaggerBase.h:185
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LargeRJetTruthLabel::TypeEnum
TypeEnum
Definition: LargeRJetLabelEnum.h:14
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
JSSTaggerBase::m_readTau4WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau4WTAKey
Definition: JSSTaggerBase.h:156
JSSTaggerBase::m_suppressOutputDependence
bool m_suppressOutputDependence
Definition: JSSTaggerBase.h:189
JSSTaggerBase::m_readSplit23Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit23Key
Definition: JSSTaggerBase.h:171
Trk::L2
@ L2
Definition: AlignModuleList.h:32
JSSTaggerBase::m_readECF1Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF1Key
Definition: JSSTaggerBase.h:162
JSSTaggerBase::getTruthLabelStr
std::string getTruthLabelStr(const xAOD::Jet &jet, asg::AcceptData &acceptData) const
Definition: JSSTaggerBase.cxx:728
JSSTaggerBase::m_decScoreCutKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreCutKey
Definition: JSSTaggerBase.h:233
JSSTaggerBase::m_strMassCutLow
std::string m_strMassCutLow
Strings for cut functions.
Definition: JSSTaggerBase.h:192
get_generator_info.result
result
Definition: get_generator_info.py:21
JSSTaggerBase::m_funcScoreCut
std::unique_ptr< TF1 > m_funcScoreCut
Definition: JSSTaggerBase.h:199
JSSTaggerBase::m_readTau32WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau32WTAKey
Definition: JSSTaggerBase.h:159
JSSTaggerBase::resetCuts
StatusCode resetCuts(asg::AcceptData &acceptData) const
Reset cuts.
Definition: JSSTaggerBase.cxx:338
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JSSTaggerBase::m_readNtrk500Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readNtrk500Key
Definition: JSSTaggerBase.h:187
JSSTaggerBase::m_readECFG311Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG311Key
Definition: JSSTaggerBase.h:182
JSSTaggerBase::m_jetContainer_key
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer_key
Definition: JSSTaggerBase.h:68
JSSTaggerBase::m_jetEtaMax
float m_jetEtaMax
Definition: JSSTaggerBase.h:134
JSSTaggerBase::m_nWarnVar
std::atomic< int > m_nWarnVar
Warning counters.
Definition: JSSTaggerBase.h:86
JSSTaggerBase::m_readTau42WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau42WTAKey
Definition: JSSTaggerBase.h:160
LargeRJetLabelEnum.h
JSSTaggerBase::m_decValidEtaRangeKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidEtaRangeKey
Definition: JSSTaggerBase.h:74
JSSTaggerBase::m_kerasCalibArea
std::string m_kerasCalibArea
Definition: JSSTaggerBase.h:120
JSSTaggerBase::m_efficiencyHistograms
std::map< std::string, std::unique_ptr< TH2D > > m_efficiencyHistograms
Definition: JSSTaggerBase.h:218
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
JSSTaggerBase::m_configFile
std::string m_configFile
Configuration file name.
Definition: JSSTaggerBase.h:111
JSSTaggerBase::m_configReader
TEnv m_configReader
TEnv instance to read config files.
Definition: JSSTaggerBase.h:62
JSSTaggerBase::m_tmvaCalibArea
std::string m_tmvaCalibArea
Definition: JSSTaggerBase.h:125
RootHelpers::FindBin
Int_t FindBin(const TAxis *axis, const double x)
Definition: RootHelpers.cxx:14
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
JSSTaggerBase::m_weightFileName
std::string m_weightFileName
Definition: JSSTaggerBase.h:210
JSSTaggerBase::tag
virtual StatusCode tag(const xAOD::Jet &jet) const =0
Decorate single jet with tagging info.
AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
JSSTaggerBase::m_decPassScoreKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassScoreKey
Definition: JSSTaggerBase.h:80
JSSTaggerBase::getWeight
StatusCode getWeight(const xAOD::Jet &jet, bool passSel, asg::AcceptData &acceptData) const
Get SF weight.
Definition: JSSTaggerBase.cxx:596
asg
Definition: DataHandleTestTool.h:28
TRT_PAI_gasdata::SF
const float SF[NF]
Cross sections for Fluor.
Definition: TRT_PAI_gasdata.h:285
LargeRJetTruthLabel::other_From_t
@ other_From_t
Definition: LargeRJetLabelEnum.h:22
JSSTaggerBase::m_readTau2WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau2WTAKey
Definition: JSSTaggerBase.h:154
JSSTaggerBase::m_readSplit12Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit12Key
Definition: JSSTaggerBase.h:170
JSSTaggerBase::m_jetPtMin
float m_jetPtMin
Kinematic bounds for the jet - the units are controlled by m_ptGeV.
Definition: JSSTaggerBase.h:132
JSSTaggerBase::m_decL3Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decL3Key
Definition: JSSTaggerBase.h:150
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
JSSTaggerBase::m_decCutMLowKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMLowKey
WriteDecorHandle keys for cut values.
Definition: JSSTaggerBase.h:231
JSSTaggerBase::m_decC2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decC2Key
Definition: JSSTaggerBase.h:146
JSSTaggerBase::m_decorationName
std::string m_decorationName
Decoration name.
Definition: JSSTaggerBase.h:202
JSSTaggerBase::m_readECFG331Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG331Key
Definition: JSSTaggerBase.h:181
LargeRJetTruthLabel::Zqq
@ Zqq
Definition: LargeRJetLabelEnum.h:20
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
JSSTaggerBase::m_readTau21WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau21WTAKey
Definition: JSSTaggerBase.h:158
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
LargeRJetTruthLabel::qcd
@ qcd
Definition: LargeRJetLabelEnum.h:25
JSSTaggerBase::m_decValidPtRangeHighKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidPtRangeHighKey
Definition: JSSTaggerBase.h:72
JSSTaggerBase::m_funcMassCutHigh
std::unique_ptr< TF1 > m_funcMassCutHigh
Definition: JSSTaggerBase.h:198
JSSTaggerBase::m_weightHistogramName
std::string m_weightHistogramName
Definition: JSSTaggerBase.h:211
JSSTaggerBase::m_decValidJetContentKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidJetContentKey
Definition: JSSTaggerBase.h:76
asg::AcceptInfo::getCutName
const std::string & getCutName(unsigned int cutPosition) const
Get the name of a cut, based on the cut position (slow, avoid usage)
Definition: AcceptInfo.cxx:36
JSSTaggerBase::m_jetPtMax
float m_jetPtMax
Definition: JSSTaggerBase.h:133
JSSTaggerBase::m_calibArea
std::string m_calibArea
Location where config files live on cvmfs.
Definition: JSSTaggerBase.h:114
JSSTaggerBase::m_decWeightKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decWeightKey
WriteDecorHandle keys for SF.
Definition: JSSTaggerBase.h:237
JSSTaggerBase::m_readTruthLabelKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTruthLabelKey
Truth label ReadDecorHandle key.
Definition: JSSTaggerBase.h:228
LargeRJetTruthLabel::notruth
@ notruth
Definition: LargeRJetLabelEnum.h:24
JSSTaggerBase::m_decSigeffSFKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decSigeffSFKey
Definition: JSSTaggerBase.h:240
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
JSSTaggerBase::m_truthLabelName
std::string m_truthLabelName
Definition: JSSTaggerBase.h:225
JSSTaggerBase::m_decEfficiencyKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEfficiencyKey
Definition: JSSTaggerBase.h:238
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
JSSTaggerBase::m_decE3Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decE3Key
Definition: JSSTaggerBase.h:148
JSSTaggerBase::m_decCutMHighKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMHighKey
Definition: JSSTaggerBase.h:232
JSSTaggerBase::m_ptGeV
bool m_ptGeV
Flag to indicate units pT is defined in Set to false by default.
Definition: JSSTaggerBase.h:90
efficiency
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:128
JSSTaggerBase::m_decTau32WTAKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau32WTAKey
Definition: JSSTaggerBase.h:143
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
LargeRJetTruthLabel::Wqq
@ Wqq
Definition: LargeRJetLabelEnum.h:17
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
JSSTaggerBase::m_readQwKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readQwKey
Definition: JSSTaggerBase.h:173
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
JSSTaggerBase::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate jet collection with tagging info.
Definition: JSSTaggerBase.cxx:289
JSSTaggerBase::getSF
std::pair< double, double > getSF(const xAOD::Jet &jet, const std::string &truthLabelStr) const
Get scale factor and efficiency.
Definition: JSSTaggerBase.cxx:670
JSSTaggerBase::m_weightConfig
std::unique_ptr< TFile > m_weightConfig
Histograms for scale factors.
Definition: JSSTaggerBase.h:216
JSSTaggerBase::m_kerasConfigOutputName
std::string m_kerasConfigOutputName
Definition: JSSTaggerBase.h:119
Trk::L3
@ L3
Definition: AlignModuleList.h:32
JSSTaggerBase::m_readECFG212Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG212Key
Definition: JSSTaggerBase.h:183
JSSTaggerBase::m_tmvaConfigFileName
std::string m_tmvaConfigFileName
TMVA configurations for BDT taggers.
Definition: JSSTaggerBase.h:123
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
asg::AcceptInfo::getNCuts
unsigned int getNCuts() const
Get the number of cuts defined.
Definition: AcceptInfo.h:46
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
JSSTaggerBase::checkKinRange
StatusCode checkKinRange(const xAOD::Jet &jet, asg::AcceptData &acceptData) const
Check and record if jet passes kinematic constraints.
Definition: JSSTaggerBase.cxx:370
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
JSSTaggerBase::m_readL3Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readL3Key
Definition: JSSTaggerBase.h:179
JSSTaggerBase::m_efficiencyHistogramName
std::string m_efficiencyHistogramName
Definition: JSSTaggerBase.h:212
JSSTaggerBase::m_strScoreCut
std::string m_strScoreCut
Definition: JSSTaggerBase.h:194
JSSTaggerBase::m_decTau42WTAKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau42WTAKey
Definition: JSSTaggerBase.h:144
JSSTaggerBase::calculateJSSRatios
int calculateJSSRatios(const xAOD::Jet &jet) const
Calculate JSS moment ratios in case they are not already saved TODO: Remove this once JSSMomentTools ...
Definition: JSSTaggerBase.cxx:416
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
JSSTaggerBase::m_truthBosonContainerName
std::string m_truthBosonContainerName
Definition: JSSTaggerBase.h:223
JSSTaggerBase::m_decEffSFKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEffSFKey
Definition: JSSTaggerBase.h:239
JSSTaggerBase::m_decNtrk500Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decNtrk500Key
Definition: JSSTaggerBase.h:186
JSSTaggerBase::m_wkpt
std::string m_wkpt
Tagger information.
Definition: JSSTaggerBase.h:128
JSSTaggerBase::m_calcSF
bool m_calcSF
Flag to calculate scale factor.
Definition: JSSTaggerBase.h:205
TH2D
Definition: rootspy.cxx:430
JSSTaggerBase::m_decValidEventContentKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidEventContentKey
Definition: JSSTaggerBase.h:77
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JSSTaggerBase::GetUnGroomTracks
StatusCode GetUnGroomTracks(const xAOD::Jet &jet, int indexPV) const
Retrieve Ntrk variable from the ungroomed parent jet.
Definition: JSSTaggerBase.cxx:553
JSSTaggerBase::findPV
int findPV() const
Find the PV (to be used for Ntrk)
Definition: JSSTaggerBase.cxx:529
JSSTaggerBase::m_decD2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decD2Key
Definition: JSSTaggerBase.h:147
JSSTaggerBase::m_truthTopQuarkContainerName
std::string m_truthTopQuarkContainerName
Definition: JSSTaggerBase.h:224
LargeRJetTruthLabel::Wqq_From_t
@ Wqq_From_t
Definition: LargeRJetLabelEnum.h:21
JSSTaggerBase::m_readThrustMajKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readThrustMajKey
Definition: JSSTaggerBase.h:175
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JSSTaggerBase::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition: JSSTaggerBase.cxx:73
JSSTaggerBase::m_acceptInfo
asg::AcceptInfo m_acceptInfo
Object that stores the results for a jet.
Definition: JSSTaggerBase.h:65
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
JSSTaggerBase::m_decTau21WTAKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau21WTAKey
WriteDecorHandle keys for JSS moments.
Definition: JSSTaggerBase.h:142
JSSTaggerBase::m_truthLabelUseTRUTH3
bool m_truthLabelUseTRUTH3
Truth label options.
Definition: JSSTaggerBase.h:221
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
JSSTaggerBase::m_decScoreValueKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreValueKey
Definition: JSSTaggerBase.h:234
JSSTaggerBase::printCuts
void printCuts() const
Print configured cuts.
Definition: JSSTaggerBase.cxx:817
JSSTaggerBase::m_isMC
bool m_isMC
Definition: JSSTaggerBase.h:206
JSSTaggerBase::m_weightDecorationName
std::string m_weightDecorationName
String for scale factor decoration names.
Definition: JSSTaggerBase.h:209
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JSSTaggerBase::m_decValidKinRangeKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidKinRangeKey
Definition: JSSTaggerBase.h:75
JSSTaggerBase::m_readTau1WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau1WTAKey
ReadDecorHandle keys for JSS moments.
Definition: JSSTaggerBase.h:153
JSSTaggerBase::m_weightHistograms
std::map< std::string, std::unique_ptr< TH2D > > m_weightHistograms
Definition: JSSTaggerBase.h:217
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:134
JSSTaggerBase::passKinRange
bool passKinRange(const xAOD::Jet &jet) const
Check if jet passes kinematic constraints.
Definition: JSSTaggerBase.cxx:356
asg::AcceptData::clear
void clear()
Clear all bits.
Definition: AcceptData.h:54
asg::AcceptData::getCutResult
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:98
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
JSSTaggerBase::m_decValidPtRangeLowKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidPtRangeLowKey
Definition: JSSTaggerBase.h:73
JSSTaggerBase::m_truthParticleContainerName
std::string m_truthParticleContainerName
Definition: JSSTaggerBase.h:222
JSSTaggerBase::m_readSphericityKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSphericityKey
Definition: JSSTaggerBase.h:176
JSSTaggerBase::m_readTau3WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau3WTAKey
Definition: JSSTaggerBase.h:155
JSSTaggerBase::m_readD2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readD2Key
Definition: JSSTaggerBase.h:167
JSSTaggerBase::m_readECF2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF2Key
Definition: JSSTaggerBase.h:163
JSSTaggerBase::m_readECF3Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF3Key
Definition: JSSTaggerBase.h:164
JSSTaggerBase::getConfigReader
StatusCode getConfigReader()
Get configReader StatusCode.
Definition: JSSTaggerBase.cxx:300
LargeRJetTruthLabel::intToEnum
TypeEnum intToEnum(const int type)
Definition: LargeRJetLabelEnum.h:57
JSSTaggerBase::m_decPassMassKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassMassKey
Definition: JSSTaggerBase.h:79
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
JSSTaggerBase::m_tagType
std::string m_tagType
Definition: JSSTaggerBase.h:129
JSSTaggerBase::JSSTaggerBase
JSSTaggerBase(const std::string &name)
Default constructor - to be used in all derived classes.
Definition: JSSTaggerBase.cxx:11
JSSTaggerBase::m_funcMassCutLow
std::unique_ptr< TF1 > m_funcMassCutLow
TF1 for cut functions.
Definition: JSSTaggerBase.h:197
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
LargeRJetTruthLabel::tqqb
@ tqqb
Definition: LargeRJetLabelEnum.h:16
JSSTaggerBase::m_strMassCutHigh
std::string m_strMassCutHigh
Definition: JSSTaggerBase.h:193
JSSTaggerBase::m_kerasConfigFileName
std::string m_kerasConfigFileName
Keras configurations for ML taggers.
Definition: JSSTaggerBase.h:117
JSSTaggerBase::m_decL2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decL2Key
Definition: JSSTaggerBase.h:149
JSSTaggerBase::m_weightConfigPath
std::string m_weightConfigPath
Path to the SF configuration root file.
Definition: JSSTaggerBase.h:108
JSSTaggerBase::m_weightFlavors
std::string m_weightFlavors
Definition: JSSTaggerBase.h:213
asg::AcceptData
Definition: AcceptData.h:30
JSSTaggerBase::m_readE3Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readE3Key
Definition: JSSTaggerBase.h:168
SG::ReadDecorHandle::isAvailable
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
JSSTaggerBase::m_readL2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readL2Key
Definition: JSSTaggerBase.h:178
JSSTaggerBase::m_readC2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readC2Key
Definition: JSSTaggerBase.h:166
asg::AcceptInfo::getCutDescription
const std::string & getCutDescription(const std::string &cutName) const
Get the description of a cut, based on the cut name.
Definition: AcceptInfo.cxx:119
JSSTaggerBase.h
JSSTaggerBase::m_decTaggedKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTaggedKey
WriteDecorHandle keys for tagging bools.
Definition: JSSTaggerBase.h:71
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition: AcceptInfo.h:53
JSSTaggerBase::m_containerName
std::string m_containerName
Configurable members.
Definition: JSSTaggerBase.h:105