ATLAS Offline Software
Loading...
Searching...
No Matches
InDetTrackSmearingAlg.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
17namespace CP
18{
19
20 StatusCode InDetTrackSmearingAlg ::
21 initialize ()
22 {
23 ANA_CHECK (m_smearingTool.retrieve());
26 ANA_CHECK (m_systematicsList.addSystematics (*m_smearingTool));
27 ANA_CHECK (m_systematicsList.initialize());
28 ANA_CHECK (m_outOfValidity.initialize());
29 return StatusCode::SUCCESS;
30 }
31
32
33
34 StatusCode InDetTrackSmearingAlg ::
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_smearingTool->applySystematicVariation (sys));
45 for (xAOD::TrackParticle *track : *inDetTracks)
46 {
47 if (m_preselection.getBool (*track, sys))
48 {
50 }
51 }
52 }
53 return StatusCode::SUCCESS;
54 }
55}
#define ANA_CHECK(EXP)
check whether the given expression was successful
#define ANA_CHECK_CORRECTION(helper, object, expr)
a helper check macro to work with OutOfValidityHelper
OutOfValidityHelper m_outOfValidity
the helper for OutOfValidity results
SysListHandle m_systematicsList
the systematics list we run
ToolHandle< InDet::IInDetTrackSmearingTool > m_smearingTool
the smearing tool
SysReadSelectionHandle m_preselection
the preselection we apply to our input
SysCopyHandle< xAOD::TrackParticleContainer > m_tracksHandle
the track collection we run on
Select isolated Photons, Electrons and Muons.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".