ATLAS Offline Software
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 
15 // xAOD include(s):
17 
18 // Local include(s):
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 
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 }
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AuxStoreAccessorMacros.h
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
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
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
AFPProtonContainer_v1.h
Header file with typedef for class AFPProtonContainer_v1.
AFPToFTrackContainer_v1.h
Header file with typedef for AFPToFTrackContainer_v1.
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
AFPVertex_v1.h
Header file for the AFPVertex class.
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27