ATLAS Offline Software
Loading...
Searching...
No Matches
Muon_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 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
23namespace xAOD {
24
26 : IParticle(rhs) //IParticle does not have a copy constructor. AuxElement has one with same behavior as default ctor
27 {
28 this->makePrivateStore(rhs);
29 }
30
32 if(this == &rhs) return *this;
33
34 if( ( ! hasStore() ) && ( ! container() ) ) {
36 }
37 this->IParticle::operator=( rhs );
38
39 return *this;
40 }
41
46
47 // AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, float, double, e)
48
49 double Muon_v1::e() const {
50 // FIXME - optimise?
51 return genvecP4().E();
52 }
53
54 double Muon_v1::m() const {
56 }
57
58 void Muon_v1::setP4(double pt, double eta, double phi) {
59 static const Accessor< float > acc1( "pt" );
60 static const Accessor< float > acc2( "eta" );
61 static const Accessor< float > acc3( "phi" );
62 acc1( *this )=pt;
63 acc2( *this )=eta;
64 acc3( *this )=phi;
65 }
66
67 double Muon_v1::rapidity() const {
68 return genvecP4().Rapidity();
69 }
70
73 p4.SetPtEtaPhiM( pt(), eta(), phi(), m() );
74 return p4;
75 }
76
77 // depend on return value optimization
79 return GenVecFourMom_t(pt(), eta(), phi(), m());
80 }
81
82 Type::ObjectType Muon_v1::type() const {
83 return Type::Muon;
84 }
85
86 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::Author, author)
87 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::Author, author, setAuthor)
88
89 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( Muon_v1, uint16_t, allAuthors, setAllAuthors)
90
91
92 void Muon_v1::addAllAuthor ( const Author author ){
93 static const Accessor< uint16_t > acc( "allAuthors" );
94 acc(*this) |= 1<<static_cast<unsigned int>(author);
95 }
96
97 bool Muon_v1::isAuthor ( const Author author ) const{
98 static const Accessor< uint16_t > acc( "allAuthors" );
99 return (acc(*this)& (1<<static_cast<unsigned int>(author)));
100 }
101
102 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::MuonType, muonType)
103 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST( Muon_v1, uint16_t, Muon_v1::MuonType, muonType, setMuonType)
104
105 bool Muon_v1::summaryValue(uint8_t& value, const SummaryType information) const {
106 const auto* acc = trackSummaryAccessorV1<uint8_t>( information );
107 if (acc->isAvailable(*this)) {
108 value = (*acc)( *this );
109 return true;
110 }
111 // Okay - fallback: try to get from TrackParticle.
112 const xAOD::TrackParticle* primTrk = primaryTrackParticle();
113 if (primTrk) {
114 return primTrk->summaryValue(value, information);
115 }
116 return false;
117 }
118
119 void Muon_v1::setSummaryValue( uint8_t value, const SummaryType information ) {
121 // Set the value:
122 ( *acc )( *this ) = value;
123 }
124
125 // No set method for 'float' values as not expected to be needed
126
127 bool Muon_v1::summaryValue(float& value, const SummaryType information) const {
129 if (!el.isValid()) return false;
130 return (*el)->summaryValue(value,information);
131 }
132
133 float Muon_v1::floatSummaryValue(const SummaryType information) const {
135 return ( *acc )( *this );
136 }
137
140 return ( *acc )( *this );
141 }
142
143 bool Muon_v1::summaryValue(uint8_t& value, const MuonSummaryType information) const {
144 const auto& acc = muonTrackSummaryAccessorV1( information );
145 if( !acc.isAvailable( *this ) ) {
146 value = 0;
147 return false;
148 }
149 // Retrieve the value:
150 value = acc( *this );
151 return true;
152 }
153
154 float Muon_v1::uint8MuonSummaryValue(const MuonSummaryType information) const{
155 uint8_t sumVal{0};
156 summaryValue(sumVal, information);
157 return sumVal;
158 }
159
160
161 void Muon_v1::setSummaryValue(uint8_t value, const MuonSummaryType information) {
162 const auto& acc = muonTrackSummaryAccessorV1( information );
163 // Set the value:
164 acc(*this) = value;
165 }
166
167 bool Muon_v1::parameter(float& value, const Muon_v1::ParamDef information) const {
169 if( ! acc || ! acc->isAvailable( *this ) ) {
170 value = 0.;
171 return false;
172 }
173 // Retrieve the value:
174 value = ( *acc )( *this );
175 return true;
176 }
177
178 float xAOD::Muon_v1::floatParameter(xAOD::Muon_v1::ParamDef information) const{
179 float sumVal{0.f};
180 parameter(sumVal, information);
181 return sumVal;
182 }
183
184 void Muon_v1::setParameter(float value, const Muon_v1::ParamDef information){
186 if( ! acc ) {
187 throw std::runtime_error("Muon_v1::setParameter - no float accessor for paramdef number: "
188 +std::to_string(information));
189 }
190 // Set the value:
191 ( *acc )( *this ) = value;
192 }
193
194 bool Muon_v1::parameter(int& value, const Muon_v1::ParamDef information) const {
196 if( ! acc || ! acc->isAvailable( *this ) ) {
197 value = 0;
198 return false;
199 }
200 // Retrieve the value:
201 value = ( *acc )( *this );
202 return true;
203 }
204
205 int xAOD::Muon_v1::intParameter(xAOD::Muon_v1::ParamDef information) const{
206 int sumValue{0};
207 parameter(sumValue, information);
208 return sumValue;
209 }
210
211 void Muon_v1::setParameter(int value, const Muon_v1::ParamDef information){
213 if( ! acc ) {
214 throw std::runtime_error("Muon_v1::setParameter - no int accessor for paramdef number: "+std::to_string(information));
215 }
216 // Set the value:
217 ( *acc )( *this ) = value;
218 }
219
220 xAOD::Muon_v1::Quality Muon_v1::quality() const {
221 static const Accessor< uint8_t > acc( "quality" );
222 uint8_t temp = acc( *this );
223 return static_cast<Quality>(temp&3);
224 }
225
226 void Muon_v1::setQuality(xAOD::Muon_v1::Quality value) {
227 static const Accessor< uint8_t > acc( "quality" );
228 uint8_t temp = static_cast< uint8_t >(value);
229 acc( *this ) = acc( *this ) & ~(0x7); // Reset the first 3 bits.
230 acc( *this ) |= temp;
231 return;
232 }
233
235 static const Accessor< uint8_t > acc( "quality" );
236 uint8_t temp = acc( *this );
237 // We use 4th bit for 'passesIDCuts'
238 return temp&8;
239 }
240
241 void Muon_v1::setPassesIDCuts(bool value) {
242 static const Accessor< uint8_t > acc( "quality" );
243 // We use 4th bit for 'passesIDCuts'
244 if (value) acc( *this ) |= 8;
245 else acc( *this ) &= 247;
246 return;
247 }
248
249 // AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( Muon_v1, uint8_t, Muon_v1::Quality,
250 // quality )
251 // AUXSTORE_PRIMITIVE_SETTER_WITH_CAST( Muon_v1, uint8_t, Muon_v1::Quality,
252 // quality, setQuality )
253
254 bool Muon_v1::isolation(float& value, const Iso::IsolationType information) const {
256
257 if( ! acc || !acc->isAvailable( *this) ){
258 value =0.;
259 return false;
260 }
261 // Retrieve the value:
262 value = ( *acc )( *this );
263 return true;
264 }
265
266 float Muon_v1::isolation( const Iso::IsolationType information) const {
267 float isoVal{0.f};
268 isolation(isoVal, information);
269 return isoVal;
270 }
271
272 void Muon_v1::setIsolation(float value, const Iso::IsolationType information){
274 if( !acc ) {
275 throw std::runtime_error( "Unknown/Unavailable Isolation type requested" );
276 }
277 // Set the value:
278 ( *acc )( *this ) = value;
279 }
280
283 const Iso::IsolationCorrectionParameter param) const{
285 if( !acc.isAvailable( *this) ) return false;
286 // Retrieve the value:
287 value = acc( *this );
288 return true;
289 }
290
292 const Iso::IsolationCorrectionParameter param) const{
293
295 if( !acc.isAvailable( *this) ) throw std::runtime_error( "Unknown/Unavailable Isolation correction requested" );
296 return acc( *this );
297 }
298
302 // Set the value:
303 acc( *this ) = value;
304 return true;
305 }
306
309 if( !acc.isAvailable( *this) ) return false;
310 // Retrieve the value:
311 value = acc( *this );
312 return true;
313 }
314
316
318 if( !acc.isAvailable( *this) ) throw std::runtime_error( "Unknown/Unavailable Isolation correction requested" );
319 return acc( *this );
320 }
321
324 // Set the value:
325 acc( *this ) = value;
326 return true;
327 }
328
329 bool Muon_v1::isolationCorrectionBitset(std::bitset<32>& value, const Iso::IsolationFlavour flavour ) const{
331 if( !acc.isAvailable( *this) ) return false;
332 // Retrieve the value:
333 value = std::bitset<32>(acc( *this ));
334 return true;
335 }
336
337 std::bitset<32> Muon_v1::isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const{
339 if( !acc.isAvailable( *this) ) throw std::runtime_error( "Unknown/Unavailable Isolation BitSet requested" );
340 return std::bitset<32>( acc( *this ) );
341 }
342
345 // Set the value:
346 acc( *this ) = value;
347 return true;
348 }
349
351 AUXSTORE_OBJECT_GETTER( Muon_v1, ElementLink< TrackParticleContainer >, muonSpectrometerTrackParticleLink)
352 AUXSTORE_OBJECT_GETTER( Muon_v1, ElementLink< TrackParticleContainer >, extrapolatedMuonSpectrometerTrackParticleLink)
353 AUXSTORE_OBJECT_GETTER( Muon_v1, ElementLink< TrackParticleContainer >, msOnlyExtrapolatedMuonSpectrometerTrackParticleLink)
355
357 MuonType type = muonType();
358 switch ( type ) {
359 case Combined :
360 case SiliconAssociatedForwardMuon :
362 break;
363 case SegmentTagged :
364 case CaloTagged :
365 return inDetTrackParticleLink();
366 break;
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
398 MuonType type = muonType();
399 switch( type ) {
400 case Combined:
401 case SiliconAssociatedForwardMuon :
402 {
403 static const Accessor< ElementLink< TrackParticleContainer > > acc( "combinedTrackParticleLink" );
404 if( ! acc.isAvailable( *this ) ) return nullptr;
405
406 const ElementLink< TrackParticleContainer >& link = acc( *this );
407 if( ! link.isValid() ) return nullptr;
408
409 return *link;
410 }
411 case SegmentTagged:
412 case CaloTagged :
413 {
414 static const Accessor< ElementLink< TrackParticleContainer > > acc( "inDetTrackParticleLink" );
415 if( ! acc.isAvailable( *this ) ) return nullptr;
416
417 const ElementLink< TrackParticleContainer >& link = acc( *this );
418 if( ! link.isValid() ) return nullptr;
419
420 return *link;
421 }
422 case MuonStandAlone :
423 {
424 // Want to return link to extrapolated MS track particle if possible.
425 static const Accessor< ElementLink< TrackParticleContainer > > acc1( "extrapolatedMuonSpectrometerTrackParticleLink" );
426 if ( acc1.isAvailable( *this ) ) {
427 const ElementLink< TrackParticleContainer >& link = acc1( *this );
428 if ( link.isValid() ) return *link;
429 }
430
431 //if no, maybe the MS-only extrapolated track particle?
432 static const Accessor< ElementLink< TrackParticleContainer > > acc2( "msOnlyExtrapolatedMuonSpectrometerTrackParticleLink" );
433 if ( acc2.isAvailable( *this ) ) {
434 const ElementLink< TrackParticleContainer >& link = acc2( *this );
435 if ( link.isValid() ) return *link;
436 }
437
438 // Try fallback (non-extrapolated MS track particle)...
439 static const Accessor< ElementLink< TrackParticleContainer > > acc3( "muonSpectrometerTrackParticleLink" );
440 if ( acc3.isAvailable( *this ) ) {
441 const ElementLink< TrackParticleContainer >& link = acc3( *this );
442 if ( link.isValid() ) return *link;
443 }
444
445 return nullptr;
446 }
447 default:
448 {
449 // No valid link.
450 return nullptr;
451 }
452 }
453 }
454
456 switch ( type ) {
457 case Primary :
459 break;
460 case CombinedTrackParticle :
462 break;
463 case InnerDetectorTrackParticle :
464 return inDetTrackParticleLink();
465 break;
466 case MuonSpectrometerTrackParticle :
468 break;
469 case ExtrapolatedMuonSpectrometerTrackParticle :
471 break;
472 case MSOnlyExtrapolatedMuonSpectrometerTrackParticle :
474 break;
475 default:
476 throw std::runtime_error("Unknown TrackParticleType - not sure which track particle to return!");
477 }
478 // static ElementLink< TrackParticleContainer > dummy;
479 // return dummy;
480 }
481
482 const xAOD::TrackParticle* Muon_v1::trackParticle( Muon_v1::TrackParticleType type) const{
483 // TODO - perhaps we can get rid of this try/catch clause?
484 try {
485 // Get the ElementLink pointing to the requested track particle:
488
489 // If it's invalid, return a null pointer:
490 if( ! el.isValid() ) {
491 return nullptr;
492 }
493
494 // If it's valid, let's de-reference it:
495 return *el;
496 } catch ( SG::ExcBadAuxVar& ) {
497 return nullptr;
498 }
499 }
500
502 switch ( type ) {
503 case InnerDetectorTrackParticle :
504 static const Accessor< ElementLink< TrackParticleContainer > > acc1( "inDetTrackParticleLink" );
505 acc1(*this)=link;
506 break;
507 case MuonSpectrometerTrackParticle :
508 static const Accessor< ElementLink< TrackParticleContainer > > acc2( "muonSpectrometerTrackParticleLink" );
509 acc2(*this)=link;
510 break;
511 case CombinedTrackParticle :
512 static const Accessor< ElementLink< TrackParticleContainer > > acc3( "combinedTrackParticleLink" );
513 acc3(*this)=link;
514 break;
515 case ExtrapolatedMuonSpectrometerTrackParticle :
516 static const Accessor< ElementLink< TrackParticleContainer > > acc4( "extrapolatedMuonSpectrometerTrackParticleLink" );
517 acc4(*this)=link;
518 break;
519 case MSOnlyExtrapolatedMuonSpectrometerTrackParticle :
520 static const Accessor< ElementLink< TrackParticleContainer > > acc5( "msOnlyExtrapolatedMuonSpectrometerTrackParticleLink" );
521 acc5(*this)=link;
522 break;
523 case Primary :
524 default:
525 throw std::runtime_error("Unknown or Primary TrackParticleType - not sure which track particle to set!");
526 }
527 }
528
531
532 static const Accessor< ElementLink< TrackParticleContainer > > acc( "inDetTrackParticleLink" );
533 if( ! acc.isAvailable( *this ) ) {
534 return nullptr;
535 }
536 const ElementLink< TrackParticleContainer >& link = acc( *this );
537 if( ! link.isValid() ) {
538 return nullptr;
539 }
540
541 // Get the ElementLink pointing to the calo cluster:
543 // If it's invalid, return a null pointer:
544 if( ! el.isValid() ) {
545 return nullptr;
546 }
547 // If it's valid, let's de-reference it:
548 return *el;
549 }
550
554 energyLossType, setEnergyLossType )
555
556 AUXSTORE_OBJECT_SETTER_AND_GETTER( Muon_v1, std::vector< ElementLink< xAOD::MuonSegmentContainer > >, muonSegmentLinks, setMuonSegmentLinks)
557
558 static const SG::AuxElement::Accessor< std::vector< ElementLink< MuonSegmentContainer > > > muonSegmentsAcc( "muonSegmentLinks" );
559 size_t Muon_v1::nMuonSegments() const {
560 // If a link was not set (yet), return zero.
561 if( ! muonSegmentsAcc.isAvailable( *this ) ) {
562 return 0;
563 }
564 return muonSegmentsAcc(*this).size();
565 }
566
568 // If a Trk::Track link was not set (yet), return a dummy object:
569 // FIXME - maybe
570 if( ! muonSegmentsAcc.isAvailable( *this ) ) {
571 static const ElementLink< MuonSegmentContainer > dummy;
572 return dummy;
573 }
574 return muonSegmentsAcc(*this).at(i);
575 }
576
577 const MuonSegment* Muon_v1::muonSegment( size_t i ) const{
578 // Get the ElementLink pointing to the requested muon segment:
580 muonSegmentLink( i );
581 // If it's invalid, return a null pointer:
582 if( ! el.isValid() ) {
583 return nullptr;
584 }
585 // If it's valid, let's de-reference it:
586 return *el;
587 }
588} // namespace xAOD
589
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.
A number of constexpr particle constants to avoid hardcoding them directly in various places.
void makePrivateStore()
Create a new (empty) private store for this object.
bool hasStore() const
Return true if this object has an associated store.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
const SG::AuxVectorData * container() const
Return the container holding this element.
Exception — Attempt to retrieve nonexistent aux data item.
IParticle & operator=(const IParticle &)=default
IParticle()=default
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Class describing a Muon.
Definition Muon_v1.h:38
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:343
virtual double eta() const
The pseudorapidity ( ) of the particle.
const ElementLink< MuonSegmentContainer > & muonSegmentLink(size_t i) const
Returns a link to the specified MuonSegment.
Definition Muon_v1.cxx:567
Muon_v1()=default
inject the enums
void setPassesIDCuts(bool)
Definition Muon_v1.cxx:241
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:105
const ElementLink< TrackParticleContainer > & trackParticleLink(TrackParticleType type) const
Returns an ElementLink to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:455
const ElementLink< TrackParticleContainer > & inDetTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
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
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition Muon_v1.cxx:71
void setTrackParticleLink(TrackParticleType type, const ElementLink< TrackParticleContainer > &link)
Set method for TrackParticle links.
Definition Muon_v1.cxx:501
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:299
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:133
virtual double m() const
The invariant mass of the particle..
Definition Muon_v1.cxx:54
bool passesIDCuts() const
MCP ID hit cuts - get/set the corresponding status bit in the quality decoration.
Definition Muon_v1.cxx:234
void addAllAuthor(const Author author)
add author to all authors
Definition Muon_v1.cxx:92
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition Muon_v1.h:74
float uint8MuonSummaryValue(const MuonSummaryType information) const
Same as bool summaryValue(uint8_t& value, const MuonSummaryType &information) const,...
Definition Muon_v1.cxx:154
const MuonSegment * muonSegment(size_t i) const
Returns a pointer to the specified MuonSegment.
Definition Muon_v1.cxx:577
const ElementLink< CaloClusterContainer > & clusterLink() const
Returns an ElementLinkto the cluster associated to this muon.
Quality quality() const
Muon CP quality accessors.
Definition Muon_v1.cxx:220
bool isAuthor(const Author author) const
Returns 'true' if 'author' is the an author of this muon.
Definition Muon_v1.cxx:97
bool parameter(float &value, const ParamDef parameter) const
Get a parameter for this Muon - momentumBalanceSignificance for example.
virtual double phi() const
The azimuthal angle ( ) of the particle.
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:138
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:281
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.
bool isolation(float &value, const Iso::IsolationType information) const
Accessor for Isolation values.
Definition Muon_v1.cxx:254
virtual double rapidity() const
The true rapidity (y) of the particle.
Definition Muon_v1.cxx:67
Muon_v1 & operator=(const Muon_v1 &rhs)
Assignment operator.
Definition Muon_v1.cxx:31
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:178
bool isolationTrackCorrection(float &value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection type) const
Accessor for Isolation Track correction.
Definition Muon_v1.cxx:307
virtual double e() const
The total energy of the particle.
Definition Muon_v1.cxx:49
void setQuality(Quality)
Definition Muon_v1.cxx:226
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector.
Definition Muon_v1.cxx:78
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:205
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition Muon_v1.cxx:82
size_t nMuonSegments() const
Number of MuonSegments linked to by this Muon.
Definition Muon_v1.cxx:559
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for Muon.
Definition Muon_v1.h:80
void setP4(double pt, double eta, double phi)
Set method for IParticle values.
Definition Muon_v1.cxx:58
void setIsolation(float value, const Iso::IsolationType information)
Set method for Isolation values.
Definition Muon_v1.cxx:272
bool setIsolationTrackCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection type)
Set method for Isolation Track Corrections.
Definition Muon_v1.cxx:322
Author author() const
bool isolationCorrectionBitset(std::bitset< 32 > &value, const Iso::IsolationFlavour flavour) const
Accessor for Isolation corection Bitset.
Definition Muon_v1.cxx:329
MuonType muonType() const
const TrackParticle * trackParticle(TrackParticleType type) const
Returns a pointer (which can be NULL) to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:482
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:530
const ElementLink< TrackParticleContainer > & primaryTrackParticleLink() const
Definition Muon_v1.cxx:356
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:119
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:554
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
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
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
MuonSummaryType
Enumerates the different types of information stored in Summary.