ATLAS Offline Software
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 
15 // xAOD include(s):
17 
18 // Local include(s):
21 
22 
23 namespace xAOD
24 {
25  AFPSiHit_v1::AFPSiHit_v1() : SG::AuxElement()
26  { }
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 }
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
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AuxStoreAccessorMacros.h
xAOD::AFPSiHit_v1::setPixelHorizID
void setPixelHorizID(const int horizontalID)
Set index of the pixel along X axis in LHC coordinate system.
Definition: AFPSiHit_v1.cxx:58
xAOD::AFPSiHit_v1::addTrackLink
void addTrackLink(const AFPTrackLink_t &newTrack)
Add a link to a track that uses this hit in reconstruction.
Definition: AFPSiHit_v1.cxx:38
xAOD::AFPSiHit_v1::pixelHorizID
int pixelHorizID() const
Index of the pixel along X axis in LHC coordinate system.
Definition: AFPSiHit_v1.cxx:51
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::AFPSiHit_v1::setPixelColIDChip
void setPixelColIDChip(int colID)
Set pixel column index in the chip coordinate system.
xAOD::AFPSiHit_v1::pixelRowIDChip
int pixelRowIDChip() const
Index of the pixel row in chip coordinate system.
xAOD::AFPSiHit_v1
Class representing a hit in silicon detector.
Definition: AFPSiHit_v1.h:35
AFPSiHit_v1.h
Header file for AFPSiHit_v1 class representing a hit in AFP track detector.
xAOD::AFPSiHit_v1::setPixelRowIDChip
void setPixelRowIDChip(int rowID)
Set pixel row index in the chip coordinate system.
xAOD::AFPSiHit_v1::setPixelVertID
void setPixelVertID(const int verticalID)
Set index of the pixel along Y axis in LHC coordinate system.
Definition: AFPSiHit_v1.cxx:72
xAOD::AFPSiHit_v1::pixelColIDChip
int pixelColIDChip() const
Index of the pixel column in chip coordinate system.
AFPTrackContainer_v1.h
Header file with typedef for AFPTrackContainer_v1.
xAOD::AFPSiHit_v1::pixelVertID
int pixelVertID() const
Index of the pixel along Y axis in LHC coordinate system.
Definition: AFPSiHit_v1.cxx:66
timeOverThreshold
double timeOverThreshold(unsigned int m_word)
Definition: driftCircle.h:116
xAOD::AFPSiHit_v1::AFPSiHit_v1
AFPSiHit_v1()
Definition: AFPSiHit_v1.cxx:25
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::AFPSiHit_v1::toPersistent
void toPersistent()
Function making sure that the object is ready for persistification i.e. saving.
Definition: AFPSiHit_v1.cxx:43