ATLAS Offline Software
Loading...
Searching...
No Matches
AFPVertex_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
13
14
15// xAOD include(s):
17
18// Local include(s):
22
23namespace xAOD
24{
25 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPVertex_v1, float, position, setPosition)
29
30 AUXSTORE_OBJECT_SETTER_AND_GETTER (AFPVertex_v1, std::vector< AFPVertex_v1::AFPProtonLink_t >, protons, setProtons)
31 static const SG::AuxElement::Accessor< std::vector<AFPVertex_v1::AFPProtonLink_t> > protonsAcc( "protons" );
32
33 AUXSTORE_OBJECT_SETTER_AND_GETTER (AFPVertex_v1, std::vector< AFPVertex_v1::AFPToFTrackLink_t >, tofTracks, setToFTracks)
34 static const SG::AuxElement::Accessor< std::vector<AFPVertex_v1::AFPToFTrackLink_t> > tofTracksAcc( "tofTracks" );
35
36
38 {
39
40 if (not protonsAcc.isAvailable( *this ) )
41 protonsAcc( *this ) = std::vector<AFPVertex_v1::AFPProtonLink_t>();
42 protonsAcc( *this ).push_back( link );
43 return;
44 }
45
47 {
48 if (not tofTracksAcc.isAvailable( *this ) )
49 tofTracksAcc( *this ) = std::vector<AFPVertex_v1::AFPToFTrackLink_t>();
50 tofTracksAcc( *this ).push_back( link );
51 return;
52 }
53
55 // Prepare the protons links for persistification:
56 if( protonsAcc.isAvailableWritable( *this ) ) {
57 for (AFPProtonLink_t link : protonsAcc( *this )) link.toPersistent();
58 }
59 // Prepare the tofTrackss links for persistification:
60 if( tofTracksAcc.isAvailableWritable( *this ) ) {
61 for (AFPToFTrackLink_t link : tofTracksAcc( *this )) link.toPersistent();
62 }
63 return;
64 }
65
66
67}
Header file with typedef for class AFPProtonContainer_v1.
Header file with typedef for AFPToFTrackContainer_v1.
Header file for the AFPVertex class.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
Class representing a vertex reconstructed in AFP.
void addProton(const AFPProtonLink_t &newProton)
Add a link to a proton used to reconstruct the vertex.
ElementLink< AFPProtonContainer > AFPProtonLink_t
Type of a link to the proton.
void addToFTrack(const AFPToFTrackLink_t &newToFTrack)
Add a link to a ToFTrack used to reconstruct the vertex.
void toPersistent()
Function making sure that the object is ready for persistification i.e. saving.
ElementLink< AFPToFTrackContainer > AFPToFTrackLink_t
Type of a link to the tofTrack.
Forward declaration.
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static const SG::AuxElement::Accessor< std::vector< AFPVertex_v1::AFPToFTrackLink_t > > tofTracksAcc("tofTracks")
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
static const SG::AuxElement::Accessor< std::vector< AFPVertex_v1::AFPProtonLink_t > > protonsAcc("protons")