ATLAS Offline Software
MuonCalibTruth.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 
9 namespace MuonCalib {
10 
11  MuonCalibTruth::MuonCalibTruth(const Amg::Vector3D& pos, const Amg::Vector3D& momentum, double kinEnergy, int code, int barCode) :
12  m_position{pos}, m_momentum{momentum}, m_kinEnergy{kinEnergy}, m_PDGCode{code}, m_barCode{barCode} {}
13 
15 
17 
18  void MuonCalibTruth::setKinEnergy(double kinEnergy) { m_kinEnergy = kinEnergy; }
19 
21 
22  void MuonCalibTruth::setBarCode(int barCode) { m_barCode = barCode; }
23 
25 
27 
29 
30  double MuonCalibTruth::kinEnergy() const { return m_kinEnergy; }
31 
32  int MuonCalibTruth::PDGCode() const { return m_PDGCode; }
33 
34  int MuonCalibTruth::barCode() const { return m_barCode; }
35 
36  int MuonCalibTruth::id() const { return m_uniqueID; }
37 
38  std::ostream& MuonCalibTruth::dump(std::ostream& stream) const {
39  stream << "MuonCalibTruth with" << std::endl;
40  stream << " position " << position() << std::endl;
41  stream << " momentum " << momentum() << std::endl;
42  stream << " kinEnergy " << kinEnergy() << " , PDGCode " << PDGCode() << " and barCode/uniqueID " << barCode() <<"/" << id() << std::endl;
43 
44  return stream;
45  }
46 
47 } // namespace MuonCalib
48 
49 std::ostream& operator<<(std::ostream& stream, const MuonCalib::MuonCalibTruth& truth) { return truth.dump(stream); }
MuonCalib::MuonCalibTruth::setBarCode
void setBarCode(int barCode)
sets barcode
Definition: MuonCalibTruth.cxx:22
MuonCalib::MuonCalibTruth::setPDGCode
void setPDGCode(int code)
sets PDG code
Definition: MuonCalibTruth.cxx:20
MuonCalib::MuonCalibTruth::m_uniqueID
int m_uniqueID
unique ID
Definition: MuonCalibTruth.h:55
MuonCalib::MuonCalibTruth::position
const Amg::Vector3D & position() const
retrieve position
Definition: MuonCalibTruth.cxx:26
MuonCalib::MuonCalibTruth::PDGCode
int PDGCode() const
retrieve PDG code
Definition: MuonCalibTruth.cxx:32
MuonCalib::MuonCalibTruth::m_PDGCode
int m_PDGCode
PDG code.
Definition: MuonCalibTruth.h:53
MuonCalib::MuonCalibTruth::kinEnergy
double kinEnergy() const
retrieve kinetic energy
Definition: MuonCalibTruth.cxx:30
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
MuonCalib::MuonCalibTruth::m_kinEnergy
double m_kinEnergy
kinetic energy
Definition: MuonCalibTruth.h:52
histSizes.code
code
Definition: histSizes.py:129
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
MuonCalib::MuonCalibTruth::setUniqueID
void setUniqueID(int uniqueID)
sets unique ID
Definition: MuonCalibTruth.cxx:24
MuonCalib::MuonCalibTruth::MuonCalibTruth
MuonCalibTruth()=default
default constructor
MuonCalib::MuonCalibTruth::setMomentum
void setMomentum(const Amg::Vector3D &mom)
sets momentum
Definition: MuonCalibTruth.cxx:16
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:109
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibTruth::m_momentum
Amg::Vector3D m_momentum
momentum
Definition: MuonCalibTruth.h:51
MuonCalib::MuonCalibTruth::m_position
Amg::Vector3D m_position
position
Definition: MuonCalibTruth.h:50
MuonCalib::MuonCalibTruth::dump
std::ostream & dump(std::ostream &stream) const
dump method to be used in operator<<() of the MuonCalibTruth for output
Definition: MuonCalibTruth.cxx:38
MuonCalib::MuonCalibTruth::m_barCode
int m_barCode
bar code
Definition: MuonCalibTruth.h:54
MuonCalibTruth.h
MuonCalib::MuonCalibTruth::setPosition
void setPosition(const Amg::Vector3D &pos)
sets position
Definition: MuonCalibTruth.cxx:14
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonCalib::MuonCalibTruth::id
int id() const
retrieve unique ID
Definition: MuonCalibTruth.cxx:36
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
operator<<
std::ostream & operator<<(std::ostream &stream, const MuonCalib::MuonCalibTruth &truth)
Definition: MuonCalibTruth.cxx:49
MuonCalib::MuonCalibTruth::setKinEnergy
void setKinEnergy(double kinEnergy)
sets kinetic energy
Definition: MuonCalibTruth.cxx:18
MuonCalib::MuonCalibTruth::momentum
const Amg::Vector3D & momentum() const
retrieve momentum
Definition: MuonCalibTruth.cxx:28
MuonCalib::MuonCalibTruth
Definition: MuonCalibTruth.h:24
MuonCalib::MuonCalibTruth::barCode
int barCode() const
retrieve barcode
Definition: MuonCalibTruth.cxx:34