ATLAS Offline Software
L2CombinedMuon_v1.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 
6 // System include(s):
7 #include <iostream>
8 
9 // EDM include(s):
11 
12 // Local include(s):
17 
18 namespace xAOD {
19 
21  : IParticle() {
22 
23  }
24 
26  //
27  // Implementation of the xAOD::IParticle functions
28  //
29 
31  pt )
33  eta )
35  phi )
36 
37  double L2CombinedMuon_v1::m() const {
38 
40  }
41 
42  double L2CombinedMuon_v1::e() const {
43 
44  return genvecP4().E();
45  }
46 
47  double L2CombinedMuon_v1::rapidity() const {
48 
49  return genvecP4().Rapidity();
50  }
51 
53  FourMom_t p4;
54  p4.SetPtEtaPhiM( pt(), eta(), phi(),m());
55  return p4;
56  }
57 
60  return GenVecFourMom_t(pt(), eta(), phi(), m());
61  }
62 
64 
65  return Type::L2CombinedMuon;
66  }
67 
68  //
70 
72  //
73  // Implementation of the 4-momentum setter functions
74  //
75 
76  void L2CombinedMuon_v1::setPt( float pt ) {
77 
78  static const Accessor< float > acc( "pt" );
79  acc( *this ) = pt;
80  return;
81  }
82 
84 
85  static const Accessor< float > acc( "eta" );
86  acc( *this ) = eta;
87  return;
88  }
89 
91 
92  static const Accessor< float > acc( "phi" );
93  acc( *this ) = phi;
94  return;
95  }
96 
97  //
99 
101  //
102  // Implementation of the LVL2 muon iso specific functions
103  //
104 
106  charge, setCharge )
108  strategy, setStrategy )
110  errorFlag, setErrorFlag )
112  matchFlag, setMatchFlag )
114  sigmaPt, setSigmaPt )
115 
118  idTrackLink, setIdTrackLink )
119 
121 
123  acc( "idTrackLink" );
124  if( ! acc.isAvailable( *this ) ) {
125  return nullptr;
126  }
127  const ElementLink< TrackParticleContainer >& el = acc( *this );
128  if( ! el.isValid() ) {
129  return nullptr;
130  }
131  return *el;
132  }
133 
136  muSATrackLink, setMuSATrackLink )
137 
139 
140  static const Accessor< ElementLink< L2StandAloneMuonContainer > >
141  acc( "muSATrackLink" );
142  if( ! acc.isAvailable( *this ) ) {
143  return nullptr;
144  }
145  const ElementLink< L2StandAloneMuonContainer >& el = acc( *this );
146  if( ! el.isValid() ) {
147  return nullptr;
148  }
149  return *el;
150  }
151 
152  //
154 
158 std::ostream& operator<< ( std::ostream& out,
159  const xAOD::L2CombinedMuon_v1& mu ) {
160 
161  out << "charge: " << mu.charge() << "; ";
162  out << "pt: " << mu.pt() << "; ";
163  out << "phi: " << mu.phi() << "; ";
164  out << "eta: " << mu.eta() << "; ";
165  out << "strategy: " << mu.strategy() << "; ";
166  out << "errorFlag: " << mu.errorFlag() << "; ";
167  out << "matchFlag: " << mu.matchFlag() << "; ";
168  out << "sigmaPt: " << mu.sigmaPt();
169 
170  // Return the stream:
171  return out;
172 }
173 
174 
175 } // namespace xAOD
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:108
xAOD::L2CombinedMuon_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
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
L2StandAloneMuon.h
SG::Accessor< float >
AuxStoreAccessorMacros.h
xAOD::L2CombinedMuon_v1::setPhi
void setPhi(float phi)
Set the azimuthal angle ( ) of the muon.
Definition: L2CombinedMuon_v1.cxx:90
xAOD::L2StandAloneMuon_v2
Class describing standalone muons reconstructed in the LVL2 trigger.
Definition: L2StandAloneMuon_v2.h:36
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
ParticleConstants::PDG2011::muonMassInMeV
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Definition: ParticleConstants.h:29
xAOD::L2CombinedMuon_v1::L2CombinedMuon_v1
L2CombinedMuon_v1()
Constructor.
Definition: L2CombinedMuon_v1.cxx:20
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
L2StandAloneMuonContainer.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::pt
setRcore setEtHad setFside pt
Definition: TrigPhoton_v1.cxx:106
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::L2CombinedMuon_v1::setEta
void setEta(float eta)
Set the pseudorapidity ( ) of the muon.
Definition: L2CombinedMuon_v1.cxx:83
xAOD::L2CombinedMuon_v1
Class describing combined muon reconstructed in the LVL2 trigger.
Definition: L2CombinedMuon_v1.h:41
xAOD::L2CombinedMuon_v1::m
virtual double m() const
The invariant mass of the particle.
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::L2CombinedMuon_v1::muSATrack
const xAOD::L2StandAloneMuon * muSATrack() const
Get the SA muon as a bare pointer.
xAOD::L2CombinedMuon_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
xAOD::L2CombinedMuon_v1::e
virtual double e() const
The total energy of the particle.
xAOD::idTrackLink
setStrategy setMatchFlag idTrackLink
Definition: L2CombinedMuon_v1.cxx:118
ParticleConstants.h
xAOD::L2CombinedMuon_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
xAOD::AUXSTORE_PRIMITIVE_GETTER_WITH_CAST
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
xAOD::charge
charge
Definition: TrigElectron_v1.cxx:85
xAOD::L2CombinedMuon_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for trig muons.
Definition: L2CombinedMuon_v1.h:70
xAOD::L2CombinedMuon_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
xAOD::L2CombinedMuon_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : internal trig muon type.
xAOD::L2CombinedMuon_v1::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: L2CombinedMuon_v1.h:64
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:48
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
xAOD::L2CombinedMuon_v1::type
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
L2CombinedMuon_v1.h
xAOD::L2CombinedMuon
L2CombinedMuon_v1 L2CombinedMuon
Define the latest version of the muon CB class.
Definition: L2CombinedMuon.h:15
xAOD::L2CombinedMuon_v1::setPt
void setPt(float pt)
Set the transverse momentum ( ) of the muon.
xAOD::L2CombinedMuon_v1::rapidity
virtual double rapidity() const
The true rapidity (y) of the particle.
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::matchFlag
setStrategy matchFlag
Definition: L2CombinedMuon_v1.cxx:112
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:51
xAOD::operator<<
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
Definition: RDataSource.cxx:53
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27