12 InDetTrackSystematicsTool::InDetTrackSystematicsTool(
const std::string&
name )
22 if (
registry.registerSystematics(*
this) != StatusCode::SUCCESS) {
24 return StatusCode::FAILURE;
27 return StatusCode::SUCCESS;
32 auto affSysts = affectingSystematics();
33 return ( affSysts.find(systematic) != affSysts.end() );
39 return affectingSystematics();
49 if (sysMapItr == m_sysFilterMap.end()) {
55 (
systematics, affectingSysts, filteredSysts) != StatusCode::SUCCESS ) {
57 return StatusCode::FAILURE;
65 bool isSetTrkLoose = isIn( TRK_FAKE_RATE_LOOSE )
66 || isIn( TRK_EFF_LOOSE_GLOBAL )
67 || isIn( TRK_EFF_LOOSE_IBL )
68 || isIn( TRK_EFF_LOOSE_PP0 )
69 || isIn( TRK_EFF_LOOSE_PHYSMODEL );
70 bool isSetTrkTight = isIn( TRK_FAKE_RATE_TIGHT )
71 || isIn( TRK_EFF_TIGHT_GLOBAL )
72 || isIn( TRK_EFF_TIGHT_IBL )
73 || isIn( TRK_EFF_TIGHT_PP0 )
74 || isIn( TRK_EFF_TIGHT_PHYSMODEL );
75 if ( isSetTrkLoose && isSetTrkTight) {
76 ATH_MSG_ERROR(
"Both Loose and TightPrimary versions of systematics are simultaneously active." );
77 return StatusCode::FAILURE;
81 sysMapItr = m_sysFilterMap.insert(std::make_pair(
systematics, filteredSysts)).first;
84 m_activeSysts = &sysMapItr->second;
86 return StatusCode::SUCCESS;
89 bool InDetTrackSystematicsTool::isActive( TrackSystematic syst )
const
91 if (m_activeSysts ==
nullptr) {
92 ATH_MSG_DEBUG(
"applySystematicsVariation() has not been successfully called." );
96 return it_syst != m_activeSysts->end();
99 std::unique_ptr<TFile> InDetTrackSystematicsTool::getFile(
const std::string&
filename)
const
106 return std::unique_ptr<TFile>(TFile::Open(filenameWithFullPath.data(),
"READ"));;