ATLAS Offline Software
InDetTrackBiasingAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 //
8 // includes
9 //
10 
12 
13 //
14 // method implementations
15 //
16 
17 namespace CP
18 {
19 
21  initialize ()
22  {
23  ANA_CHECK (m_biasingTool.retrieve());
29  return StatusCode::SUCCESS;
30  }
31 
32 
33 
35  execute ()
36  {
37  for (const auto& sys : m_systematicsList.systematicsVector())
38  {
39  // always need to call `getCopy` first to ensure that the shallow copies
40  // are all there if requested
41  xAOD::TrackParticleContainer *inDetTracks = nullptr;
42  ANA_CHECK (m_tracksHandle.getCopy (inDetTracks, sys));
43 
44  ANA_CHECK (m_biasingTool->applySystematicVariation (sys));
45  for (xAOD::TrackParticle *track : *inDetTracks)
46  {
48  {
50  }
51  }
52  }
53  return StatusCode::SUCCESS;
54  }
55 }
CP::InDetTrackBiasingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition: InDetTrackBiasingAlg.h:48
CP::InDetTrackBiasingAlg::initialize
StatusCode initialize() override
Definition: InDetTrackBiasingAlg.cxx:21
CP::SysListHandle::addSystematics
StatusCode addSystematics(const CP::SystematicSet &recommended, const CP::SystematicSet &affecting)
register a set of affecting variables for the current algorithm (usually obtained from an CP::ISystem...
Definition: SysListHandle.cxx:48
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition: SysListHandle.cxx:96
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::InDetTrackBiasingAlg::m_biasingTool
ToolHandle< InDet::IInDetTrackBiasingTool > m_biasingTool
the biasing tool
Definition: InDetTrackBiasingAlg.h:35
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition: SysListHandle.cxx:69
CP::SysReadSelectionHandle::getBool
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ANA_CHECK_CORRECTION
#define ANA_CHECK_CORRECTION(helper, object, expr)
a helper check macro to work with OutOfValidityHelper
Definition: OutOfValidityHelper.h:132
CP::InDetTrackBiasingAlg::execute
StatusCode execute() override
Definition: InDetTrackBiasingAlg.cxx:35
CP::OutOfValidityHelper::initialize
::StatusCode initialize()
standard initialize
Definition: OutOfValidityHelper.cxx:25
CP::InDetTrackBiasingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: InDetTrackBiasingAlg.h:39
InDetTrackBiasingAlg.h
CP::SysReadSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Definition: SysReadSelectionHandle.cxx:34
CP::InDetTrackBiasingAlg::m_tracksHandle
SysCopyHandle< xAOD::TrackParticleContainer > m_tracksHandle
the track collection we run on
Definition: InDetTrackBiasingAlg.h:43
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
CP::InDetTrackBiasingAlg::m_outOfValidity
OutOfValidityHelper m_outOfValidity
the helper for OutOfValidity results
Definition: InDetTrackBiasingAlg.h:53