ATLAS Offline Software
Loading...
Searching...
No Matches
L2IsoMuon_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 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):
15
16namespace xAOD {
17
22
24 //
25 // Implementation of the xAOD::IParticle functions
26 //
27
29 pt )
31 eta )
33 phi )
34
35 double L2IsoMuon_v1::m() const {
36
38 }
39
40 double L2IsoMuon_v1::e() const {
41
42 return genvecP4().E();
43 }
44
45 double L2IsoMuon_v1::rapidity() const {
46
47 return genvecP4().Rapidity();
48 }
49
52 p4.SetPtEtaPhiM( pt(), eta(), phi(),m());
53 return p4;
54 }
55
58 return GenVecFourMom_t(pt(), eta(), phi(), m());
59 }
60
62
63 return Type::L2IsoMuon;
64 }
65
66 //
68
70 //
71 // Implementation of the 4-momentum setter functions
72 //
73
74 void L2IsoMuon_v1::setPt( float pt ) {
75
76 static const Accessor< float > acc( "pt" );
77 acc( *this ) = pt;
78 return;
79 }
80
81 void L2IsoMuon_v1::setEta( float eta ) {
82
83 static const Accessor< float > acc( "eta" );
84 acc( *this ) = eta;
85 return;
86 }
87
88 void L2IsoMuon_v1::setPhi( float phi ) {
89
90 static const Accessor< float > acc( "phi" );
91 acc( *this ) = phi;
92 return;
93 }
94
95 //
97
99 //
100 // Implementation of the LVL2 muon iso specific functions
101 //
102
104 roiWord, setRoiWord )
106 charge, setCharge )
108 errorFlag, setErrorFlag )
110 sumPt01, setSumPt01 )
112 sumPt02, setSumPt02 )
114 sumPt03, setSumPt03 )
116 sumPt04, setSumPt04 )
118 sumEt01, setSumEt01 )
120 sumEt02, setSumEt02 )
122 sumEt03, setSumEt03 )
124 sumEt04, setSumEt04 )
125 //
127
128} // namespace xAOD
129
133std::ostream& operator<< ( std::ostream& out,
134 const xAOD::L2IsoMuon_v1& mu ) {
135
136 out << "roiWord: " << mu.roiWord() << "; ";
137 out << "charge: " << mu.charge() << "; ";
138 out << "pt: " << mu.pt() << "; ";
139 out << "phi: " << mu.phi() << "; ";
140 out << "eta: " << mu.eta() << "; ";
141 out << "errorFlag: " << mu.errorFlag() << "; ";
142 out << "sumPt01: " << mu.sumPt01() << "; ";
143 out << "sumPt02: " << mu.sumPt02() << "; ";
144 out << "sumPt03: " << mu.sumPt03() << "; ";
145 out << "sumPt04: " << mu.sumPt04() << "; ";
146 out << "sumEt01: " << mu.sumEt01() << "; ";
147 out << "sumEt02: " << mu.sumEt02() << "; ";
148 out << "sumEt03: " << mu.sumEt03() << "; ";
149 out << "sumEt04: " << mu.sumEt04();
150
151 // Return the stream:
152 return out;
153}
Scalar eta() const
pseudorapidity method
#define AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME)
Macro creating a getter function with a type conversion.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
A number of constexpr particle constants to avoid hardcoding them directly in various places.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
STL class.
IParticle()=default
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Class describing isolation info for muons reconstructed in the LVL2 trigger.
L2IsoMuon_v1()
Constructor.
void setPt(float pt)
Set the transverse momentum ( ) of the muon.
virtual double m() const
The invariant mass of the particle.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for trig muons.
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : internal trig muon type.
virtual double e() const
The total energy of the particle.
void setEta(float eta)
Set the pseudorapidity ( ) of the muon.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual double rapidity() const
The true rapidity (y) of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
void setPhi(float phi)
Set the azimuthal angle ( ) of the muon.
constexpr double muonMassInMeV
the mass of the muon (in MeV)
STL namespace.
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setRcore setEtHad setFside pt
setCharge setSumPt01 sumPt03
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
setCharge setSumPt01 setSumPt03 setSumEt01 sumEt03
setCharge sumPt01
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
setEventNumber uint32_t
setCharge setSumPt01 setSumPt03 sumEt01