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 if ( isIn( TRK_RES_D0_MEAS) + isIn( TRK_RES_D0_MEAS_UP ) + isIn( TRK_RES_D0_MEAS_DOWN ) > 1 ) {
67 ATH_MSG_ERROR(
"You must pick only one choice for the d0 resolution systematic" );
68 return StatusCode::FAILURE;
70 if ( isIn(TRK_RES_Z0_MEAS) + isIn( TRK_RES_Z0_MEAS_UP ) + isIn( TRK_RES_Z0_MEAS_DOWN ) > 1 ) {
71 ATH_MSG_ERROR(
"You must pick only one choice for the z0 resolution systematic" );
72 return StatusCode::FAILURE;
74 bool isSetTrkLoose = isIn( TRK_FAKE_RATE_LOOSE )
75 || isIn( TRK_EFF_LOOSE_GLOBAL )
76 || isIn( TRK_EFF_LOOSE_IBL )
77 || isIn( TRK_EFF_LOOSE_PP0 )
78 || isIn( TRK_EFF_LOOSE_PHYSMODEL );
79 bool isSetTrkTight = isIn( TRK_FAKE_RATE_TIGHT )
80 || isIn( TRK_EFF_TIGHT_GLOBAL )
81 || isIn( TRK_EFF_TIGHT_IBL )
82 || isIn( TRK_EFF_TIGHT_PP0 )
83 || isIn( TRK_EFF_TIGHT_PHYSMODEL );
84 if ( isSetTrkLoose && isSetTrkTight) {
85 ATH_MSG_ERROR(
"Both Loose and TightPrimary versions of systematics are simultaneously active." );
86 return StatusCode::FAILURE;
90 sysMapItr = m_sysFilterMap.insert(std::make_pair(
systematics, filteredSysts)).first;
93 m_activeSysts = &sysMapItr->second;
95 return StatusCode::SUCCESS;
98 bool InDetTrackSystematicsTool::isActive( TrackSystematic syst )
const
100 if (m_activeSysts ==
nullptr) {
101 ATH_MSG_DEBUG(
"applySystematicsVariation() has not been successfully called." );
105 return it_syst != m_activeSysts->end();
108 std::unique_ptr<TFile> InDetTrackSystematicsTool::getFile(
const std::string&
filename)
const
115 return std::unique_ptr<TFile>(TFile::Open(filenameWithFullPath.data(),
"READ"));;