ATLAS Offline Software
MuonCalibMdtTruthHit.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <utility>
6 
8 
9 namespace MuonCalib {
10 
12  int MuonCalibMdtTruthHit::barCode() const { return m_barCode; }
15  double MuonCalibMdtTruthHit::gpositionX() const { return m_pos[0]; }
16  double MuonCalibMdtTruthHit::gpositionY() const { return m_pos[1]; }
17  double MuonCalibMdtTruthHit::gpositionZ() const { return m_pos[2]; }
18  double MuonCalibMdtTruthHit::time() const { return m_time; }
23  void MuonCalibMdtTruthHit::setgPositionX(double gpositionX) { m_pos[0] = gpositionX; }
24  void MuonCalibMdtTruthHit::setgPositionY(double gpositionY) { m_pos[1] = gpositionY; }
25  void MuonCalibMdtTruthHit::setgPositionZ(double gpositionZ) { m_pos[2] = gpositionZ; }
26  void MuonCalibMdtTruthHit::setTime(double time) { m_time = time; }
27  void MuonCalibMdtTruthHit::setgPosition(Amg::Vector3D newPos) { m_pos = std::move(newPos); }
28  MuonCalibMdtTruthHit::MuonCalibMdtTruthHit(MuonFixedId id, int barCode, double driftRadius, double positionAlongTube,
29  Amg::Vector3D globPos, double time) :
30  m_ID{id}, m_barCode{barCode}, m_driftRadius{driftRadius}, m_positionAlongTube{positionAlongTube}, m_pos{std::move(globPos)}, m_time{time} {}
31 
32  std::ostream &MuonCalibMdtTruthHit::dump(std::ostream &stream) const {
33  stream << "MuonCalibMdtTruthHit: " << std::endl;
34  stream << " ID = " << identify() << std::endl;
35  stream << " barCode = " << barCode() << std::endl;
36  stream << " driftRadius = " << driftRadius() << std::endl;
37  stream << " positionAlongTube = " << positionAlongTube() << std::endl;
38  stream << " gpositionX = " << gpositionX() << std::endl;
39  stream << " gpositionY = " << gpositionY() << std::endl;
40  stream << " gpositionZ = " << gpositionZ() << std::endl;
41  stream << " Time = " << time() << std::endl;
42  return stream;
43  }
44 
45 } // namespace MuonCalib
46 
47 std::ostream &operator<<(std::ostream &stream, const MuonCalib::MuonCalibMdtTruthHit &truth) { return truth.dump(stream); }
MuonCalib::MuonCalibMdtTruthHit::time
double time() const
retrieve the time
Definition: MuonCalibMdtTruthHit.cxx:18
MuonCalib::MuonCalibMdtTruthHit::m_ID
MuonFixedId m_ID
identifier of the truth hit, (a MuonFixedId, not an Identifier)
Definition: MuonCalibMdtTruthHit.h:52
MuonCalib::MuonCalibMdtTruthHit::m_time
double m_time
time
Definition: MuonCalibMdtTruthHit.h:57
MuonCalib::MuonCalibMdtTruthHit::setgPosition
void setgPosition(Amg::Vector3D newPos)
Definition: MuonCalibMdtTruthHit.cxx:27
MuonCalib::MuonCalibMdtTruthHit::gpositionZ
double gpositionZ() const
retrieve the global Z position
Definition: MuonCalibMdtTruthHit.cxx:17
MuonCalib::MuonCalibMdtTruthHit::gpositionX
double gpositionX() const
retrieve the global X position
Definition: MuonCalibMdtTruthHit.cxx:15
MuonCalibMdtTruthHit.h
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
MuonCalib::MuonCalibMdtTruthHit::driftRadius
double driftRadius() const
retrieve the driftradius
Definition: MuonCalibMdtTruthHit.cxx:13
MuonCalib::MuonCalibMdtTruthHit::gpositionY
double gpositionY() const
retrieve the global Y position
Definition: MuonCalibMdtTruthHit.cxx:16
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
MuonCalib::MuonCalibMdtTruthHit::MuonCalibMdtTruthHit
MuonCalibMdtTruthHit()=default
default constructor
MuonCalib::MuonCalibMdtTruthHit::setBarCode
void setBarCode(int barCode)
sets the barcode
Definition: MuonCalibMdtTruthHit.cxx:20
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibMdtTruthHit
Definition: MuonCalibMdtTruthHit.h:21
MuonCalib::MuonCalibMdtTruthHit::m_barCode
int m_barCode
barcode
Definition: MuonCalibMdtTruthHit.h:53
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
MuonCalib::MuonCalibMdtTruthHit::identify
MuonFixedId identify() const
retrieve the MuonFixedId
Definition: MuonCalibMdtTruthHit.cxx:11
MuonCalib::MuonCalibMdtTruthHit::m_positionAlongTube
double m_positionAlongTube
position along tube
Definition: MuonCalibMdtTruthHit.h:55
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalib::MuonCalibMdtTruthHit::setTime
void setTime(double time)
sets the time
Definition: MuonCalibMdtTruthHit.cxx:26
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonCalib::MuonCalibMdtTruthHit::setgPositionZ
void setgPositionZ(double gpositionZ)
sets the global Z position
Definition: MuonCalibMdtTruthHit.cxx:25
MuonCalib::MuonCalibMdtTruthHit::m_driftRadius
double m_driftRadius
drift radius
Definition: MuonCalibMdtTruthHit.h:54
operator<<
std::ostream & operator<<(std::ostream &stream, const MuonCalib::MuonCalibMdtTruthHit &truth)
Definition: MuonCalibMdtTruthHit.cxx:47
MuonCalib::MuonCalibMdtTruthHit::setgPositionY
void setgPositionY(double gpositionY)
sets the global Y position
Definition: MuonCalibMdtTruthHit.cxx:24
MuonCalib::MuonCalibMdtTruthHit::positionAlongTube
double positionAlongTube() const
retrieve the position along tube
Definition: MuonCalibMdtTruthHit.cxx:14
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
MuonCalib::MuonCalibMdtTruthHit::setDriftRadius
void setDriftRadius(double driftRadius)
sets the driftradius
Definition: MuonCalibMdtTruthHit.cxx:21
MuonCalib::MuonCalibMdtTruthHit::barCode
int barCode() const
retrieve the barcode
Definition: MuonCalibMdtTruthHit.cxx:12
MuonCalib::MuonCalibMdtTruthHit::setgPositionX
void setgPositionX(double gpositionX)
sets the global X position
Definition: MuonCalibMdtTruthHit.cxx:23
MuonCalib::MuonCalibMdtTruthHit::setPositionAlongTube
void setPositionAlongTube(double positionAlongTube)
sets the position along tube
Definition: MuonCalibMdtTruthHit.cxx:22
MuonCalib::MuonCalibMdtTruthHit::dump
std::ostream & dump(std::ostream &stream) const
dump to be used for operator<<() to dump the MuonCalibMdtTruthHit
Definition: MuonCalibMdtTruthHit.cxx:32
MuonCalib::MuonCalibMdtTruthHit::m_pos
Amg::Vector3D m_pos
Definition: MuonCalibMdtTruthHit.h:56
MuonCalib::MuonCalibMdtTruthHit::setIdentifier
void setIdentifier(MuonFixedId id)
sets the MuonFixedId
Definition: MuonCalibMdtTruthHit.cxx:19