ATLAS Offline Software
Loading...
Searching...
No Matches
AFPTrack_v2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
13
14
15// xAOD include(s):
17
18// Local include(s):
21
22namespace xAOD
23{
24 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, int, stationID, setStationID)
25 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, xLocal, setXLocal)
26 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, yLocal, setYLocal)
27 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, zLocal, setZLocal)
28 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, xSlope, setXSlope)
29 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, ySlope, setYSlope)
30 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, unsigned int, nHoles, setNHoles)
31 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, int, nClusters, setNClusters)
34
35 AUXSTORE_OBJECT_SETTER_AND_GETTER (AFPTrack_v2, std::vector< AFPTrack_v2::AFPClusterLink_t >, clusters, setClusters)
36 static const SG::AuxElement::Accessor< std::vector<AFPTrack_v2::AFPClusterLink_t> > clustersAcc( "clusters" );
37
39 {
40 clustersAcc( *this ).push_back( link );
41 }
42
44 // Prepare the clusters links for persistification:
45 if( clustersAcc.isAvailableWritable( *this ) ) {
46 std::vector<AFPTrack_v2::AFPClusterLink_t>::iterator end = clustersAcc( *this ).end();
47 for(std::vector<AFPTrack_v2::AFPClusterLink_t>::iterator itr = clustersAcc( *this ).begin(); itr != end; ++itr )
48 itr->toPersistent();
49
50 }
51 }
52
53}
Header file with typedef for class AFPSiHitsClusterContainer_v1.
Header file for the AFPTrack 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 track reconstructed in AFP.
Definition AFPTrack_v2.h:37
ElementLink< AFPSiHitsClusterContainer > AFPClusterLink_t
Type of a link to the cluster.
Definition AFPTrack_v2.h:40
void toPersistent()
Function making sure that the object is ready for persistification i.e. saving.
void addCluster(const AFPClusterLink_t &newCluster)
Add a link to a cluster used to reconstruct the track.
double chi2(TH1 *h0, TH1 *h1)
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< AFPTrack_v2::AFPClusterLink_t > > clustersAcc("clusters")