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):
16 
17 namespace xAOD {
18 
20  : IParticle() {
21 
22  }
23 
25  //
26  // Implementation of the xAOD::IParticle functions
27  //
28 
30  pt )
32  eta )
34  phi )
35 
36  double L2CombinedMuon_v1::m() const {
37 
38  return 105.6583715;
39  }
40 
41  double L2CombinedMuon_v1::e() const {
42 
43  return genvecP4().E();
44  }
45 
46  double L2CombinedMuon_v1::rapidity() const {
47 
48  return genvecP4().Rapidity();
49  }
50 
52  FourMom_t p4;
53  p4.SetPtEtaPhiM( pt(), eta(), phi(),m());
54  return p4;
55  }
56 
59  return GenVecFourMom_t(pt(), eta(), phi(), m());
60  }
61 
63 
64  return Type::L2CombinedMuon;
65  }
66 
67  //
69 
71  //
72  // Implementation of the 4-momentum setter functions
73  //
74 
75  void L2CombinedMuon_v1::setPt( float pt ) {
76 
77  static const Accessor< float > acc( "pt" );
78  acc( *this ) = pt;
79  return;
80  }
81 
82  void L2CombinedMuon_v1::setEta( float eta ) {
83 
84  static const Accessor< float > acc( "eta" );
85  acc( *this ) = eta;
86  return;
87  }
88 
90 
91  static const Accessor< float > acc( "phi" );
92  acc( *this ) = phi;
93  return;
94  }
95 
96  //
98 
100  //
101  // Implementation of the LVL2 muon iso specific functions
102  //
103 
105  charge, setCharge )
107  strategy, setStrategy )
109  errorFlag, setErrorFlag )
111  matchFlag, setMatchFlag )
113  sigmaPt, setSigmaPt )
114 
117  idTrackLink, setIdTrackLink )
118 
120 
122  acc( "idTrackLink" );
123  if( ! acc.isAvailable( *this ) ) {
124  return nullptr;
125  }
126  const ElementLink< TrackParticleContainer >& el = acc( *this );
127  if( ! el.isValid() ) {
128  return nullptr;
129  }
130  return *el;
131  }
132 
135  muSATrackLink, setMuSATrackLink )
136 
138 
139  static const Accessor< ElementLink< L2StandAloneMuonContainer > >
140  acc( "muSATrackLink" );
141  if( ! acc.isAvailable( *this ) ) {
142  return nullptr;
143  }
144  const ElementLink< L2StandAloneMuonContainer >& el = acc( *this );
145  if( ! el.isValid() ) {
146  return nullptr;
147  }
148  return *el;
149  }
150 
151  //
153 
157 std::ostream& operator<< ( std::ostream& out,
158  const xAOD::L2CombinedMuon_v1& mu ) {
159 
160  out << "charge: " << mu.charge() << "; ";
161  out << "pt: " << mu.pt() << "; ";
162  out << "phi: " << mu.phi() << "; ";
163  out << "eta: " << mu.eta() << "; ";
164  out << "strategy: " << mu.strategy() << "; ";
165  out << "errorFlag: " << mu.errorFlag() << "; ";
166  out << "matchFlag: " << mu.matchFlag() << "; ";
167  out << "sigmaPt: " << mu.sigmaPt();
168 
169  // Return the stream:
170  return out;
171 }
172 
173 
174 } // namespace xAOD
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:107
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
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
SG::Accessor< float >
AuxStoreAccessorMacros.h
xAOD::L2CombinedMuon_v1::setPhi
void setPhi(float phi)
Set the azimuthal angle ( ) of the muon.
Definition: L2CombinedMuon_v1.cxx:89
xAOD::L2StandAloneMuon_v2
Class describing standalone muons reconstructed in the LVL2 trigger.
Definition: L2StandAloneMuon_v2.h:36
xAOD::L2CombinedMuon_v1::L2CombinedMuon_v1
L2CombinedMuon_v1()
Constructor.
Definition: L2CombinedMuon_v1.cxx:19
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
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:82
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:117
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.
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
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
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
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:111
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
xAOD::operator<<
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
Definition: RDataSource.cxx:53
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27