ATLAS Offline Software
Loading...
Searching...
No Matches
AFPSiHit_v1.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
22
23namespace xAOD
24{
27
28 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, float, depositedCharge, setDepositedCharge)
30 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, stationID, setStationID)
31 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, pixelLayerID, setPixelLayerID)
32 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, pixelRowIDChip, setPixelRowIDChip)
33 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, pixelColIDChip, setPixelColIDChip)
34
35 AUXSTORE_OBJECT_SETTER_AND_GETTER (AFPSiHit_v1, std::vector< AFPSiHit_v1::AFPTrackLink_t >, tracksLinks, setTracksLinks)
36 static const SG::AuxElement::Accessor< std::vector<AFPSiHit_v1::AFPTrackLink_t> > tracksLinksAcc( "tracksLinks" );
37
39 {
40 tracksLinksAcc( *this ).push_back( link );
41 }
42
44 // Prepare the tracks links for persistification:
45 if ( tracksLinksAcc.isAvailableWritable( *this ) )
46 for (AFPTrackLink_t trackLink : tracksLinksAcc( *this ) )
47 trackLink.toPersistent();
48 }
49
50
52 {
53 // use pixel rows because detectors are rotated and subtract
54 // from 336, because the axis is reversed
55 return 336 - pixelRowIDChip();
56 }
57
58 void AFPSiHit_v1::setPixelHorizID(const int horizontalID)
59 {
60 // use pixel rows because detectors are rotated and subtract
61 // from 336, because the axis is reversed
62 setPixelRowIDChip (336 - horizontalID);
63 }
64
65
67 {
68 // use pixel columns because detectors are rotated
69 return pixelColIDChip();
70 }
71
72 void AFPSiHit_v1::setPixelVertID(const int verticalID)
73 {
74 // use pixel columns because detectors are rotated
75 setPixelColIDChip (verticalID);
76 }
77
78
79
80 // Type::ObjectType AFPSiHit_v1::type() const
81 // {
82 // return Type::AFPSiHit;
83 // }
84
85}
Header file for AFPSiHit_v1 class representing a hit in AFP track detector.
Header file with typedef for AFPTrackContainer_v1.
#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.
AuxElement()
Default constructor.
Class representing a hit in silicon detector.
Definition AFPSiHit_v1.h:35
void setPixelHorizID(const int horizontalID)
Set index of the pixel along X axis in LHC coordinate system.
void toPersistent()
Function making sure that the object is ready for persistification i.e. saving.
void setPixelColIDChip(int colID)
Set pixel column index in the chip coordinate system.
int pixelRowIDChip() const
Index of the pixel row in chip coordinate system.
void addTrackLink(const AFPTrackLink_t &newTrack)
Add a link to a track that uses this hit in reconstruction.
void setPixelRowIDChip(int rowID)
Set pixel row index in the chip coordinate system.
int pixelVertID() const
Index of the pixel along Y axis in LHC coordinate system.
ElementLink< AFPTrackContainer > AFPTrackLink_t
Type of a link to the track.
Definition AFPSiHit_v1.h:38
int pixelColIDChip() const
Index of the pixel column in chip coordinate system.
void setPixelVertID(const int verticalID)
Set index of the pixel along Y axis in LHC coordinate system.
int pixelHorizID() const
Index of the pixel along X axis in LHC coordinate system.
double timeOverThreshold(unsigned int m_word)
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< AFPSiHit_v1::AFPTrackLink_t > > tracksLinksAcc("tracksLinks")