ATLAS Offline Software
Loading...
Searching...
No Matches
Muon_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Misc includes
6#include <vector>
7
8// EDM include(s):
14
15// Local include(s):
17#include "MuonAccessors_v1.h"
19// Athena-only includes
20
22
23#define IMPLEMENT_LINK_GETTER(ContType, DECORATOR_NAME) \
24 { \
25 static const SG::Accessor<ElementLink<ContType>> acc{DECORATOR_NAME}; \
26 if (!acc.isAvailable(*this)) { \
27 return nullptr; \
28 } \
29 const auto& link = acc(*this); \
30 if (!link.isValid()){ \
31 return nullptr; \
32 } \
33 return *link; \
34 } \
35
36namespace xAOD {
37
39 : IParticle(rhs) //IParticle does not have a copy constructor. AuxElement has one with same behavior as default ctor
40 {
41 this->makePrivateStore(rhs);
42 }
43
45 if(this == &rhs) return *this;
46
47 if( ( ! hasStore() ) && ( ! container() ) ) {
48 makePrivateStore();
49 }
50 this->IParticle::operator=( rhs );
51
52 return *this;
53 }
54
59
60 // AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, float, double, e)
61
62 double Muon_v1::e() const {
63 // FIXME - optimise?
64 return genvecP4().E();
65 }
66
67 double Muon_v1::m() const {
69 }
70
71 void Muon_v1::setP4(double pt, double eta, double phi) {
72 static const Accessor< float > acc1( "pt" );
73 static const Accessor< float > acc2( "eta" );
74 static const Accessor< float > acc3( "phi" );
75 acc1( *this )=pt;
76 acc2( *this )=eta;
77 acc3( *this )=phi;
78 }
79
80 double Muon_v1::rapidity() const {
81 return genvecP4().Rapidity();
82 }
83
86 p4.SetPtEtaPhiM( pt(), eta(), phi(), m() );
87 return p4;
88 }
89
90 // depend on return value optimization
92 return GenVecFourMom_t(pt(), eta(), phi(), m());
93 }
94
95 Type::ObjectType Muon_v1::type() const {
96 return Type::Muon;
97 }
98
99 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::Author, author)
100 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::Author, author, setAuthor)
101
102 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( Muon_v1, uint16_t, allAuthors, setAllAuthors)
103
104
106 static const Accessor< uint16_t > acc( "allAuthors" );
107 acc(*this) |= 1<<static_cast<unsigned int>(author);
108 }
109
110 bool Muon_v1::isAuthor ( const Author author ) const{
111 static const Accessor< uint16_t > acc( "allAuthors" );
112 return (acc(*this)& (1<<static_cast<unsigned int>(author)));
113 }
114
115 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::MuonType, muonType)
116 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::MuonType, muonType, setMuonType)
117
118 bool Muon_v1::summaryValue(uint8_t& value, const SummaryType information) const {
119 const auto* acc = trackSummaryAccessorV1<uint8_t>( information );
120 if (acc->isAvailable(*this)) {
121 value = (*acc)( *this );
122 return true;
123 }
124 // Okay - fallback: try to get from TrackParticle.
125 const TrackParticle* primTrk = trackParticle(TrackParticleType::Primary);
126 return primTrk->summaryValue(value, information);
127 }
128
129 void Muon_v1::setSummaryValue( uint8_t value, const SummaryType information ) {
130 const Muon_v1::Accessor< uint8_t >* acc = trackSummaryAccessorV1<uint8_t>( information );
131 // Set the value:
132 ( *acc )( *this ) = value;
133 }
134
135 // No set method for 'float' values as not expected to be needed
136
137 bool Muon_v1::summaryValue(float& value, const SummaryType information) const {
138 return trackParticle(TrackParticleType::Primary)->summaryValue(value,information);
139 }
140
141 float Muon_v1::floatSummaryValue(const SummaryType information) const {
142 const Muon_v1::Accessor< float >* acc = trackSummaryAccessorV1< float >( information );
143 return ( *acc )( *this );
144 }
145
147 const Muon_v1::Accessor< uint8_t >* acc = trackSummaryAccessorV1< uint8_t >( information );
148 return ( *acc )( *this );
149 }
150
151 bool Muon_v1::summaryValue(uint8_t& value, const MuonSummaryType information) const {
152 const auto& acc = muonTrackSummaryAccessorV1( information );
153 if( !acc.isAvailable( *this ) ) {
154 value = 0;
155 return false;
156 }
157 // Retrieve the value:
158 value = acc( *this );
159 return true;
160 }
161
162 float Muon_v1::uint8MuonSummaryValue(const MuonSummaryType information) const{
163 uint8_t sumVal{0};
164 summaryValue(sumVal, information);
165 return sumVal;
166 }
167
168
169 void Muon_v1::setSummaryValue(uint8_t value, const MuonSummaryType information) {
170 const auto& acc = muonTrackSummaryAccessorV1( information );
171 // Set the value:
172 acc(*this) = value;
173 }
174
175 bool Muon_v1::parameter(float& value, const ParamDef information) const {
176 const Muon_v1::Accessor< float >* acc = parameterAccessorV1<float>( information );
177 if( ! acc || ! acc->isAvailable( *this ) ) {
178 value = 0.;
179 return false;
180 }
181 // Retrieve the value:
182 value = ( *acc )( *this );
183 return true;
184 }
185
186 float Muon_v1::floatParameter(const ParamDef information) const{
187 float sumVal{0.f};
188 parameter(sumVal, information);
189 return sumVal;
190 }
191
192 void Muon_v1::setParameter(float value, const ParamDef information){
193 const Muon_v1::Accessor< float >* acc = parameterAccessorV1<float>( information );
194 if( ! acc ) {
195 throw std::runtime_error("Muon_v1::setParameter - no float accessor for paramdef number: "
196 +std::to_string(information));
197 }
198 // Set the value:
199 ( *acc )( *this ) = value;
200 }
201
202 bool Muon_v1::parameter(int& value, const ParamDef information) const {
203 const Muon_v1::Accessor< int >* acc = parameterAccessorV1<int>( information );
204 if( ! acc || ! acc->isAvailable( *this ) ) {
205 value = 0;
206 return false;
207 }
208 // Retrieve the value:
209 value = ( *acc )( *this );
210 return true;
211 }
212
213 int Muon_v1::intParameter(const ParamDef information) const{
214 int sumValue{0};
215 parameter(sumValue, information);
216 return sumValue;
217 }
218
219 void Muon_v1::setParameter(int value, const ParamDef information) {
220 const Muon_v1::Accessor< int >* acc = parameterAccessorV1<int>( information );
221 if( ! acc ) {
222 throw std::runtime_error("Muon_v1::setParameter - no int accessor for paramdef number: "+std::to_string(information));
223 }
224 // Set the value:
225 ( *acc )( *this ) = value;
226 }
227
228 Muon_v1::Quality Muon_v1::quality() const {
229 static const Accessor< uint8_t > acc( "quality" );
230 uint8_t temp = acc( *this );
231 return static_cast<Quality>(temp&3);
232 }
233
234 void Muon_v1::setQuality(const Quality value) {
235 static const Accessor< uint8_t > acc( "quality" );
236 uint8_t temp = static_cast< uint8_t >(value);
237 acc( *this ) = acc( *this ) & ~(0x7); // Reset the first 3 bits.
238 acc( *this ) |= temp;
239 return;
240 }
241
243 static const Accessor< uint8_t > acc( "quality" );
244 uint8_t temp = acc( *this );
245 // We use 4th bit for 'passesIDCuts'
246 return temp&8;
247 }
248
249 void Muon_v1::setPassesIDCuts(bool value) {
250 static const Accessor< uint8_t > acc( "quality" );
251 // We use 4th bit for 'passesIDCuts'
252 if (value) acc( *this ) |= 8;
253 else acc( *this ) &= 247;
254 return;
255 }
256
257 bool Muon_v1::isolation(float& value, const Iso::IsolationType information) const {
258 const SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information );
259
260 if( ! acc || !acc->isAvailable( *this) ){
261 value =0.;
262 return false;
263 }
264 // Retrieve the value:
265 value = ( *acc )( *this );
266 return true;
267 }
268
269 float Muon_v1::isolation( const Iso::IsolationType information) const {
270 float isoVal{0.f};
271 isolation(isoVal, information);
272 return isoVal;
273 }
274
275 void Muon_v1::setIsolation(float value, const Iso::IsolationType information){
276 const SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information );
277 if( !acc ) {
278 throw std::runtime_error( "Unknown/Unavailable Isolation type requested" );
279 }
280 // Set the value:
281 ( *acc )( *this ) = value;
282 }
283
286 const Iso::IsolationCorrectionParameter param) const{
287 const SG::AuxElement::Accessor< float > acc = getIsolationCorrectionAccessor(flavour,type,param);
288 if( !acc.isAvailable( *this) ) return false;
289 // Retrieve the value:
290 value = acc( *this );
291 return true;
292 }
293
295 const Iso::IsolationCorrectionParameter param) const{
296
297 const SG::AuxElement::Accessor< float > acc = getIsolationCorrectionAccessor(flavour,type,param);
298 if( !acc.isAvailable( *this) ) throw std::runtime_error( "Unknown/Unavailable Isolation correction requested" );
299 return acc( *this );
300 }
301
304 const SG::AuxElement::Accessor< float > acc = getIsolationCorrectionAccessor(flavour,type,param);
305 // Set the value:
306 acc( *this ) = value;
307 return true;
308 }
309
311 const SG::AuxElement::Accessor< float > acc = getIsolationCorrectionAccessor(flavour,type);
312 if( !acc.isAvailable( *this) ) return false;
313 // Retrieve the value:
314 value = acc( *this );
315 return true;
316 }
317
319
320 const SG::AuxElement::Accessor< float > acc = getIsolationCorrectionAccessor(flavour,type);
321 if( !acc.isAvailable( *this) ) throw std::runtime_error( "Unknown/Unavailable Isolation correction requested" );
322 return acc( *this );
323 }
324
326 const SG::AuxElement::Accessor< float > acc = getIsolationCorrectionAccessor(flavour,type);
327 // Set the value:
328 acc( *this ) = value;
329 return true;
330 }
331
332 bool Muon_v1::isolationCorrectionBitset(std::bitset<32>& value, const Iso::IsolationFlavour flavour ) const{
333 const SG::AuxElement::Accessor< uint32_t > acc = getIsolationCorrectionBitsetAccessor( flavour );
334 if( !acc.isAvailable( *this) ) return false;
335 // Retrieve the value:
336 value = std::bitset<32>(acc( *this ));
337 return true;
338 }
339
340 std::bitset<32> Muon_v1::isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const{
341 const SG::AuxElement::Accessor< uint32_t > acc = getIsolationCorrectionBitsetAccessor( flavour );
342 if( !acc.isAvailable( *this) ) throw std::runtime_error( "Unknown/Unavailable Isolation BitSet requested" );
343 return std::bitset<32>( acc( *this ) );
344 }
345
347 const SG::AuxElement::Accessor< uint32_t > acc = getIsolationCorrectionBitsetAccessor( flavour );
348 // Set the value:
349 acc( *this ) = value;
350 return true;
351 }
352
354 AUXSTORE_OBJECT_GETTER( Muon_v1, ElementLink< TrackParticleContainer >, muonSpectrometerTrackParticleLink)
355 AUXSTORE_OBJECT_GETTER( Muon_v1, ElementLink< TrackParticleContainer >, extrapolatedMuonSpectrometerTrackParticleLink)
356 AUXSTORE_OBJECT_GETTER( Muon_v1, ElementLink< TrackParticleContainer >, msOnlyExtrapolatedMuonSpectrometerTrackParticleLink)
358
360 switch ( muonType() ) {
361 case Combined :
362 case SiliconAssociatedForwardMuon : {
364 } case SegmentTagged :
365 case CaloTagged :
366 return inDetTrackParticleLink();
367 case MuonStandAlone :
368 {
369 // Not checking if links are valid here - this is the job of the client (as per the cases above).
370 // But we DO check that the link is available, so we can check for both types of links.
371
372 static const Accessor< ElementLink< TrackParticleContainer > > acc1( "extrapolatedMuonSpectrometerTrackParticleLink" );
373 if ( acc1.isAvailable( *this ) && acc1( *this ).isValid() ) {
374 return acc1( *this );
375 }
376
377 static const Accessor< ElementLink< TrackParticleContainer > > acc2( "msOnlyExtrapolatedMuonSpectrometerTrackParticleLink" );
378 if ( acc2.isAvailable( *this ) && acc2( *this ).isValid() ) {
379 return acc2( *this );
380 }
381
382 static const Accessor< ElementLink< TrackParticleContainer > > acc3( "muonSpectrometerTrackParticleLink" );
383 if ( acc3.isAvailable( *this ) && acc3( *this ).isValid()) {
384 return acc3( *this );
385 }
386 // We could also just return a dummy EL here, but the link is part of the aux store, and so it might be that something bad has happened...?
387 throw std::runtime_error("Type is MuonStandAlone but no available link to return!");
388 }
389 default:
390 throw std::runtime_error("Unknown primary type - not sure which track particle to return!");
391 }
392 // static ElementLink< TrackParticleContainer > dummy;
393 // return dummy;
394 }
395
397 return trackParticle(TrackParticleType::Primary);
398 }
399
402 switch ( type ) {
403 case Primary :
405 case CombinedTrackParticle : {
407 } case InnerDetectorTrackParticle :{
408 return inDetTrackParticleLink();
409 } case MuonSpectrometerTrackParticle :{
411 } case ExtrapolatedMuonSpectrometerTrackParticle :{
413 } case MSOnlyExtrapolatedMuonSpectrometerTrackParticle : {
415 } default:
416 throw std::runtime_error("Unknown TrackParticleType - not sure which track particle to return!");
417 }
418 // static ElementLink< TrackParticleContainer > dummy;
419 // return dummy;
420
421 }
422
423 const TrackParticle* Muon_v1::trackParticle(const TrackParticleType type) const{
424 switch ( type ) {
425 using enum TrackParticleType;
426 case Primary : {
427 switch(muonType()) {
428 using enum MuonType;
429 case Combined:
430 case SiliconAssociatedForwardMuon : {
431 return trackParticle(TrackParticleType::CombinedTrackParticle);
432 } case SegmentTagged:
433 case CaloTagged : {
434 return trackParticle(TrackParticleType::InnerDetectorTrackParticle);
435 } case MuonStandAlone : {
436 for (const auto MsType : {ExtrapolatedMuonSpectrometerTrackParticle,
437 MSOnlyExtrapolatedMuonSpectrometerTrackParticle,
438 MuonSpectrometerTrackParticle}) {
439 if (const TrackParticle* msTrk = trackParticle(MsType); msTrk != nullptr) {
440 return msTrk;
441 }
442 }
443 return nullptr;
444 } default: return nullptr;
445 }
446 } case CombinedTrackParticle :
447 IMPLEMENT_LINK_GETTER(TrackParticleContainer, "combinedTrackParticleLink");
448 case InnerDetectorTrackParticle :
449 IMPLEMENT_LINK_GETTER(TrackParticleContainer, "inDetTrackParticleLink");
450 case MuonSpectrometerTrackParticle :
451 IMPLEMENT_LINK_GETTER(TrackParticleContainer, "muonSpectrometerTrackParticleLink");
452 case ExtrapolatedMuonSpectrometerTrackParticle :
453 IMPLEMENT_LINK_GETTER(TrackParticleContainer, "extrapolatedMuonSpectrometerTrackParticleLink");
454 case MSOnlyExtrapolatedMuonSpectrometerTrackParticle :
455 IMPLEMENT_LINK_GETTER(TrackParticleContainer, "msOnlyExtrapolatedMuonSpectrometerTrackParticleLink");
456 }
457 return nullptr;
458 }
459
461 switch ( type ) {
462 case InnerDetectorTrackParticle :
463 static const Accessor< ElementLink< TrackParticleContainer > > acc1( "inDetTrackParticleLink" );
464 acc1(*this)=link;
465 break;
466 case MuonSpectrometerTrackParticle :
467 static const Accessor< ElementLink< TrackParticleContainer > > acc2( "muonSpectrometerTrackParticleLink" );
468 acc2(*this)=link;
469 break;
470 case CombinedTrackParticle :
471 static const Accessor< ElementLink< TrackParticleContainer > > acc3( "combinedTrackParticleLink" );
472 acc3(*this)=link;
473 break;
474 case ExtrapolatedMuonSpectrometerTrackParticle :
475 static const Accessor< ElementLink< TrackParticleContainer > > acc4( "extrapolatedMuonSpectrometerTrackParticleLink" );
476 acc4(*this)=link;
477 break;
478 case MSOnlyExtrapolatedMuonSpectrometerTrackParticle :
479 static const Accessor< ElementLink< TrackParticleContainer > > acc5( "msOnlyExtrapolatedMuonSpectrometerTrackParticleLink" );
480 acc5(*this)=link;
481 break;
482 case Primary :
483 default:
484 throw std::runtime_error("Unknown or Primary TrackParticleType - not sure which track particle to set!");
485 }
486 }
487
490
491 if (const TrackParticle* idTrack = trackParticle(TrackParticleType::InnerDetectorTrackParticle);
492 idTrack == nullptr) {
493 return nullptr;
494 }
496 }
497
501 energyLossType, setEnergyLossType )
502
503 AUXSTORE_OBJECT_SETTER_AND_GETTER( Muon_v1, std::vector< ElementLink< MuonSegmentContainer > >, muonSegmentLinks, setMuonSegmentLinks)
504
505 static const SG::AuxElement::Accessor< std::vector< ElementLink< MuonSegmentContainer > > > muonSegmentsAcc( "muonSegmentLinks" );
506 size_t Muon_v1::nMuonSegments() const {
507 // If a link was not set (yet), return zero.
508 if( ! muonSegmentsAcc.isAvailable( *this ) ) {
509 return 0;
510 }
511 return muonSegmentsAcc(*this).size();
512 }
513
515 // If a Trk::Track link was not set (yet), return a dummy object:
516 // FIXME - maybe
517 if( ! muonSegmentsAcc.isAvailable( *this ) ) {
518 static const ElementLink< MuonSegmentContainer > dummy;
519 return dummy;
520 }
521 return muonSegmentsAcc(*this).at(i);
522 }
523
524 const MuonSegment* Muon_v1::muonSegment( size_t i ) const{
525 if (i >= nMuonSegments()) {
526 return nullptr;
527 }
529 if (!el.isValid()) {
530 return nullptr;
531 }
532 return *el;
533 }
534} // namespace xAOD
535
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_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME, SETTER)
Macro creating a setter function with a type conversion.
#define AUXSTORE_OBJECT_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a complex auxiliary property.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
#define IMPLEMENT_LINK_GETTER(ContType, DECORATOR_NAME)
Definition Muon_v1.cxx:23
A number of constexpr particle constants to avoid hardcoding them directly in various places.
Helper class to provide type-safe access to aux data.
IParticle & operator=(const IParticle &)=default
IParticle()=default
Class describing a Muon.
Definition Muon_v1.h:48
const ElementLink< TrackParticleContainer > & combinedTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
bool setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour)
Set method for Isolation corection Bitset.
Definition Muon_v1.cxx:346
const ElementLink< MuonSegmentContainer > & muonSegmentLink(size_t i) const
Returns a link to the specified MuonSegment.
Definition Muon_v1.cxx:514
Muon_v1()=default
Default constructor.
void setPassesIDCuts(bool)
Definition Muon_v1.cxx:249
bool summaryValue(uint8_t &value, const SummaryType information) const
Accessor for TrackSummary values (in most cases, retrieved from the 'primary' TrackParticle - though ...
Definition Muon_v1.cxx:118
const ElementLink< TrackParticleContainer > & trackParticleLink(TrackParticleType type) const
Returns an ElementLink to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:400
const ElementLink< TrackParticleContainer > & inDetTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
virtual double m() const override
The invariant mass of the particle..
Definition Muon_v1.cxx:67
void setTrackParticleLink(TrackParticleType type, const ElementLink< TrackParticleContainer > &link)
Set method for TrackParticle links.
Definition Muon_v1.cxx:460
bool setIsolationCaloCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection type, const Iso::IsolationCorrectionParameter param)
set method for Isolation Calo Corrections.
Definition Muon_v1.cxx:302
const ElementLink< TrackParticleContainer > & extrapolatedMuonSpectrometerTrackParticleLink() const
Returns an ElementLink to the Extrapolated Muon Spectrometer TrackParticle used in identification of ...
float floatSummaryValue(const SummaryType information) const
Same as bool summaryValue(float& value, const SummaryType &information) const , but without check (wi...
Definition Muon_v1.cxx:141
bool passesIDCuts() const
MCP ID hit cuts - get/set the corresponding status bit in the quality decoration.
Definition Muon_v1.cxx:242
void addAllAuthor(const Author author)
add author to all authors
Definition Muon_v1.cxx:105
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition Muon_v1.h:96
float uint8MuonSummaryValue(const MuonSummaryType information) const
Same as bool summaryValue(uint8_t& value, const MuonSummaryType &information) const,...
Definition Muon_v1.cxx:162
const MuonSegment * muonSegment(size_t i) const
Returns a pointer to the specified MuonSegment.
Definition Muon_v1.cxx:524
virtual double pt() const override
The transverse momentum ( ) of the particle.
bool isAuthor(const Author author) const
Returns 'true' if 'author' is the an author of this muon.
Definition Muon_v1.cxx:110
virtual double eta() const override
The pseudorapidity ( ) of the particle.
virtual double e() const override
The total energy of the particle.
Definition Muon_v1.cxx:62
bool parameter(float &value, const ParamDef parameter) const
Get a parameter for this Muon - momentumBalanceSignificance for example.
Definition Muon_v1.cxx:175
uint8_t uint8SummaryValue(const SummaryType information) const
Same as bool summaryValue(uint8_t& value, const SummaryType &information) const, but without check (w...
Definition Muon_v1.cxx:146
bool isolationCaloCorrection(float &value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection type, const Iso::IsolationCorrectionParameter param) const
Accessor for Isolation Calo correction.
Definition Muon_v1.cxx:284
const ElementLink< TrackParticleContainer > & msOnlyExtrapolatedMuonSpectrometerTrackParticleLink() const
Returns an ElementLink to the MS-only Extrapolated Muon Spectrometer TrackParticle used in identifica...
void setParameter(float value, const ParamDef parameter)
Set method for parameter values.
Definition Muon_v1.cxx:192
bool isolation(float &value, const Iso::IsolationType information) const
Accessor for Isolation values.
Definition Muon_v1.cxx:257
const TrackParticle * trackParticle(TrackParticleType type) const
Returns a pointer (which can be a nullptr) to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:423
Muon_v1 & operator=(const Muon_v1 &rhs)
Assignment operator.
Definition Muon_v1.cxx:44
float floatParameter(const ParamDef parameter) const
Same as bool parameter(float& value, const ParamDef &parameter) const, but without check (will throw ...
Definition Muon_v1.cxx:186
bool isolationTrackCorrection(float &value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection type) const
Accessor for Isolation Track correction.
Definition Muon_v1.cxx:310
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector.
Definition Muon_v1.cxx:91
void setQuality(const Quality)
Definition Muon_v1.cxx:234
int intParameter(const ParamDef parameter) const
Same as bool parameter(float& value, const ParamDef &parameter) const, but without check (will throw ...
Definition Muon_v1.cxx:213
virtual double phi() const override
The azimuthal angle ( ) of the particle.
const TrackParticle * primaryTrackParticle() const
Returns a pointer (which should not usually be NULL, but might be if the muon has been stripped of in...
Definition Muon_v1.cxx:396
size_t nMuonSegments() const
Number of MuonSegments linked to by this Muon.
Definition Muon_v1.cxx:506
virtual double rapidity() const override
The true rapidity (y) of the particle.
Definition Muon_v1.cxx:80
virtual Type::ObjectType type() const override
The type of the object as a simple enumeration.
Definition Muon_v1.cxx:95
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for Muon.
Definition Muon_v1.h:102
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Definition Muon_v1.cxx:84
void setP4(double pt, double eta, double phi)
Set method for IParticle values.
Definition Muon_v1.cxx:71
void setIsolation(float value, const Iso::IsolationType information)
Set method for Isolation values.
Definition Muon_v1.cxx:275
Quality quality() const
Muon CP quality accessors.
Definition Muon_v1.cxx:228
bool setIsolationTrackCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection type)
Set method for Isolation Track Corrections.
Definition Muon_v1.cxx:325
Author author() const
bool isolationCorrectionBitset(std::bitset< 32 > &value, const Iso::IsolationFlavour flavour) const
Accessor for Isolation corection Bitset.
Definition Muon_v1.cxx:332
MuonType muonType() const
const ElementLink< TrackParticleContainer > & muonSpectrometerTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
const CaloCluster * cluster() const
Retrieve the associated cluster with a bare pointer.
Definition Muon_v1.cxx:489
const ElementLink< TrackParticleContainer > & primaryTrackParticleLink() const
Definition Muon_v1.cxx:359
void setSummaryValue(uint8_t value, const SummaryType information)
Set method for storing TrackSummary SummaryType information on the Muon (see Aux to see which is alre...
Definition Muon_v1.cxx:129
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Forward declaration.
STL namespace.
IsolationType
Overall enumeration for isolation types in xAOD files.
IsolationFlavour
Enumeration for different ways of calculating isolation in xAOD files.
IsolationCaloCorrection
Enumeration for different ways of correcting isolation in xAOD files.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static setEnergyLossType const SG::AuxElement::Accessor< std::vector< ElementLink< MuonSegmentContainer > > > muonSegmentsAcc("muonSegmentLinks")
setStrategy setMatchFlag ElementLink< TrackParticleContainer >
const SG::AuxElement::Accessor< uint32_t > getIsolationCorrectionBitsetAccessor(Iso::IsolationFlavour type)
Returns an accessor for the correction bitset corresponding to this IsolationType.
setRcore setEtHad setFside pt
AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1, float, double, px, setPx) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
const SG::AuxElement::Accessor< float > * trackSummaryAccessorV1< float >(xAOD::SummaryType type)
energyLossType
Definition Muon_v1.cxx:501
const SG::AuxElement::Accessor< uint8_t > * trackSummaryAccessorV1< uint8_t >(xAOD::SummaryType type)
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
const SG::AuxElement::Accessor< float > getIsolationCorrectionAccessor(Iso::IsolationFlavour type, Iso::IsolationCaloCorrection corr, Iso::IsolationCorrectionParameter param)
const SG::Accessor< uint8_t > & muonTrackSummaryAccessorV1(xAOD::MuonSummaryType type)
Helper function for managing MuonTrackSummary Accessor objects.
const SG::AuxElement::Accessor< float > * getIsolationAccessor(Iso::IsolationType type)
Get the Accessor object for a given isolation type.
const SG::Accessor< T > * parameterAccessorV1(Muon_v1::ParamDef type)
This function holds on to Accessor objects that can be used by each Muon_v1 object at runtime to get/...
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
setBGCode setTAP setLVL2ErrorBits bool
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
setWord1 uint16_t
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
MuonSegment_v1 MuonSegment
Reference the current persistent version:
SummaryType
Enumerates the different types of information stored in Summary.
setEventNumber uint32_t
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
MuonSummaryType
Enumerates the different types of information stored in Summary.