ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODForward
Root
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):
16
#include "
xAODCore/AuxStoreAccessorMacros.h
"
17
18
// Local include(s):
19
#include "
xAODForward/versions/AFPProtonContainer_v1.h
"
20
#include "
xAODForward/versions/AFPToFTrackContainer_v1.h
"
21
#include "
xAODForward/versions/AFPVertex_v1.h
"
22
23
namespace
xAOD
24
{
25
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
AFPVertex_v1
,
float
, position, setPosition)
26
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
AFPVertex_v1
,
float
, distA, setDistA)
27
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
AFPVertex_v1
,
float
, distC, setDistC)
28
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
AFPVertex_v1
,
int
, algID, setAlgID)
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
37
void
AFPVertex_v1
::
addProton
(
const
AFPProtonLink_t
& link )
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
46
void
AFPVertex_v1::addToFTrack
(
const
AFPToFTrackLink_t
& link )
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
54
void
AFPVertex_v1::toPersistent
() {
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
}
AFPProtonContainer_v1.h
Header file with typedef for class AFPProtonContainer_v1.
AFPToFTrackContainer_v1.h
Header file with typedef for AFPToFTrackContainer_v1.
AFPVertex_v1.h
Header file for the AFPVertex class.
AuxStoreAccessorMacros.h
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
Definition
AuxStoreAccessorMacros.h:36
AUXSTORE_OBJECT_SETTER_AND_GETTER
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
Definition
AuxStoreAccessorMacros.h:88
vector
Definition
MultiHisto.h:13
xAOD::AFPVertex_v1
Class representing a vertex reconstructed in AFP.
Definition
AFPVertex_v1.h:41
xAOD::AFPVertex_v1::addProton
void addProton(const AFPProtonLink_t &newProton)
Add a link to a proton used to reconstruct the vertex.
Definition
AFPVertex_v1.cxx:37
xAOD::AFPVertex_v1::AFPProtonLink_t
ElementLink< AFPProtonContainer > AFPProtonLink_t
Type of a link to the proton.
Definition
AFPVertex_v1.h:45
xAOD::AFPVertex_v1::addToFTrack
void addToFTrack(const AFPToFTrackLink_t &newToFTrack)
Add a link to a ToFTrack used to reconstruct the vertex.
Definition
AFPVertex_v1.cxx:46
xAOD::AFPVertex_v1::toPersistent
void toPersistent()
Function making sure that the object is ready for persistification i.e. saving.
Definition
AFPVertex_v1.cxx:54
xAOD::AFPVertex_v1::AFPToFTrackLink_t
ElementLink< AFPToFTrackContainer > AFPToFTrackLink_t
Type of a link to the tofTrack.
Definition
AFPVertex_v1.h:48
const
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
std
STL namespace.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::tofTracksAcc
static const SG::AuxElement::Accessor< std::vector< AFPVertex_v1::AFPToFTrackLink_t > > tofTracksAcc("tofTracks")
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition
CaloRings_v1.cxx:27
xAOD::protonsAcc
static const SG::AuxElement::Accessor< std::vector< AFPVertex_v1::AFPProtonLink_t > > protonsAcc("protons")
Generated on
for ATLAS Offline Software by
1.17.0