ATLAS Offline Software
Loading...
Searching...
No Matches
Muon.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
15
18
19
20#include "muonEvent/Muon.h"
21
22#include "VxVertex/RecVertex.h"
24#include "CaloEvent/CaloCluster.h"
25#include "GaudiKernel/GaudiException.h"
26
27#include <cmath>
28#include <string>
29
30namespace Analysis {
31
32//------------------------------------------------------------
33// Constructor -- just set defaults
34
62
63//------------------------------------------------------------
94
97 const Rec::TrackParticle* inDetTP, const Rec::TrackParticle* extrapTP,
98 const Rec::TrackParticle* combTP, const bool isExtrapolatedToVertex)
99 :
101 INavigable (),
102 I4Momentum (),
104 MuonImpl_t(),
106 m_matchChi2(-1.0),
109 m_transientOuterMatchChi2(Trk::FitQuality()),
110 m_bestMatch(false),
111 m_isAlsoFoundByLowPt(false),
114 m_isCorrected(false)
115{
116 this->set4Mom(combTP->hlv());
117
118 m_inDetTrackParticle.setElement(inDetTP);
119
120 if(isExtrapolatedToVertex)
121 m_muonExtrapolatedTrackParticle.setElement(extrapTP);
122 else
123 m_innerExtrapolatedTrackParticle.setElement(extrapTP);
124
125 m_combinedMuonTrackParticle.setElement(combTP);
126
129 m_associatedEtaDigits.clear();
130 m_associatedPhiDigits.clear();
131 this->set_charge( combTP->charge() );
132 m_allAuthors = 0;
133 this->add_author( author );
134 m_isMuonBits = 0;
135 m_isMuonLikelihood = 0.0;
136
137}
138
140 const Rec::TrackParticle* trackParticle, const bool isExtrapolatedToVertex)
141 :
143 INavigable (),
144 I4Momentum (),
146 MuonImpl_t(),
148 m_matchChi2(-1.0),
151 m_transientOuterMatchChi2(Trk::FitQuality()),
152 m_bestMatch(false),
153 m_isAlsoFoundByLowPt(false),
156 m_isCorrected(false)
157 {
158 this->set4Mom(trackParticle->hlv());
159
160 if(isExtrapolatedToVertex)
161 m_muonExtrapolatedTrackParticle.setElement(trackParticle);
162 else {
163 if (this->isCaloMuonId())
164 m_inDetTrackParticle.setElement(trackParticle);
165 else
166 m_innerExtrapolatedTrackParticle.setElement(trackParticle);
167 }
170 m_associatedEtaDigits.clear();
171 m_associatedPhiDigits.clear();
172 this->set_charge( trackParticle->charge() );
173 m_allAuthors = 0;
174 this->add_author( author );
175 m_isMuonBits = 0;
176 m_isMuonLikelihood = 0.0;
177
178}
179
183 const Rec::TrackParticle* inDetTP,
184 const Trk::SegmentCollection * segmentContainer,
185 const std::vector<const Trk::Segment*>& muonSegments)
186 :
188 INavigable (),
189 I4Momentum (),
191 MuonImpl_t(),
193 m_matchChi2(-1.0),
196 m_transientOuterMatchChi2(Trk::FitQuality()),
197 m_bestMatch(false),
198 m_isAlsoFoundByLowPt(false),
201 m_isCorrected(false)
202 {
203 this->set4Mom(inDetTP->hlv());
204 m_inDetTrackParticle.setElement(inDetTP);
205
206 for (unsigned int i=0; i<muonSegments.size(); ++i) this->addSegment(segmentContainer, muonSegments[i]);
207
210 m_associatedEtaDigits.clear();
211 m_associatedPhiDigits.clear();
212 this->set_charge( inDetTP->charge() );
213 m_allAuthors = 0;
214 this->add_author( author );
215 m_isMuonBits = 0;
216 m_isMuonLikelihood = 0.0;
217}
218
219//------------------------------------------------------------
221Muon::Muon( const Muon& rhs ) :
222 IAthenaBarCode(rhs),
223 INavigable (rhs),
224 I4Momentum (rhs),
226 MuonImpl_t(rhs),
227 m_author ( rhs.m_author ),
230 m_matchChi2 ( rhs.m_matchChi2 ),
234 m_bestMatch ( rhs.m_bestMatch ),
242 m_cluster ( rhs.m_cluster ),
253
254{
256}
257
258
260 if( !m_muonSegments.empty() ) m_muonSegments.clear();
261 m_muonSegments.reserve(segments.size());
264 for( ;sit!=sit_end;++sit) m_muonSegments.push_back( *sit );
265}
266
267//------------------------------------------------------------
270{
271 if ( this != &rhs ) {
272 IAthenaBarCode::operator=(rhs);
273 INavigable::operator=(rhs);
274 I4Momentum::operator=(rhs);
275 INavigable4Momentum::operator=(rhs);
277 m_author = rhs.m_author;
292 m_cluster = rhs.m_cluster;
303
305
306 }
307 return *this;
308}
309
310//------------------------------------------------------------
312Muon::~Muon() = default;
313
314bool Muon::isAuthor ( const unsigned int author ) const {
316 return this->isAuthor(x);
317}
318
320 bool is_it = false;
321 switch ( author ) {
323 is_it = m_allAuthors & 1;
324 break;
326 is_it = m_allAuthors & 2;
327 break;
329 is_it = m_allAuthors & 4;
330 break;
332 is_it = m_allAuthors & 8;
333 break;
335 is_it = m_allAuthors & 16;
336 break;
338 is_it = m_allAuthors & 32;
339 break;
341 is_it = m_allAuthors & 64;
342 break;
344 is_it = m_allAuthors & 128;
345 break;
347 is_it = m_allAuthors & 256;
348 break;
350 is_it = m_allAuthors & 512;
351 break;
353 is_it = m_allAuthors & 1024;
354 break;
356 is_it = m_allAuthors & 2048;
357 break;
359 is_it = m_allAuthors & 4096;
360 break;
361
362 default :
363 is_it = false;
364 }
365 return is_it;
366}
367
369 bool is_set = false;
370 if ( !this->isAuthor( author ) ) {
371 is_set = true;
372 switch ( author ) {
375 break;
378 break;
381 break;
384 break;
387 break;
390 break;
393 break;
396 break;
399 break;
402 break;
404 m_allAuthors = m_allAuthors | 1024;
405 break;
407 m_allAuthors = m_allAuthors | 2048;
408 break;
410 m_allAuthors = m_allAuthors | 4096;
411 break;
412
413 default :
414 is_set = false;
415 }
416 }
417 return is_set;
418}
419
422 if (m_hasCombinedMuonTrackParticle && // mind DPD where hasParticle() but EL may be invalid
426 m_author==MuonParameters::MuGirl ) ) return true;
427 else return false;
428}
429
432
433 if (m_hasMuonExtrapolatedTrackParticle && // mind DPD where hasParticle() but EL may be invalid
440 else return false;
441
442 // Formerly: !this->bestMatch() && !this->hasCombinedMuonTrackParticle()
443 // && !this->isSegmentTaggedMuon() && this->isHighPt() && this->m_hasMuonExtr...
444}
445
446
455
464
467 const Rec::TrackParticle* indetParticle = inDetTrackParticle();
468 if( !indetParticle ) return false;
470}
471
482
483
486
487 double result = -999.;
488
489 for (const std::pair<MuonParameters::ParamDef, float>& p : m_parameters) {
490 if ( p.first == x )
491 result = p.second;
492 }
493
494 return result;
495}
496
497void Muon::set_outerMatchChi2(double chi2, int ndof)
498{
499 if (ndof>0) {
503 } else {
506 }
507}
508
509
511std::pair<double,double> Muon::energyLoss() const{
512 double eloss = 0.0;
513 double sigma = 0.0;
514 if ( m_caloEnergyLoss.isValid() ) {
515 const CaloEnergy * caloEnergy = *m_caloEnergyLoss;
516 eloss = caloEnergy->deltaE();
517 sigma = caloEnergy->sigmaDeltaE();
518 }
519 return std::make_pair(eloss, sigma);
520}
521
525 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfInnermostPixelLayerHits );
526 else return -1;
527
528}
529
533 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfPixelHits );
534 else return -1;
535
536}
537
541 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfSCTHits );
542 else return -1;
543
544}
545
549 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfTRTHits );
550 else return -1;
551
552}
553
557 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfTRTHighThresholdHits );
558 else return -1;
559
560}
561
565 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::legacy_numberOfInnermostPixelLayerSharedHits );
566 else return -1;
567}
570 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::legacy_numberOfPixelSharedHits );
571 else return -1;
572}
573
576 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfPixelHoles );
577 else return -1;
578}
579
582 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::legacy_numberOfSCTSharedHits );
583 else return -1;
584}
585
588 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfSCTHoles );
589 else return -1;
590}
591
594 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfTRTOutliers );
595 else return -1;
596}
597
600 return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfTRTHighThresholdOutliers );
601 else return -1;
602}
603
607 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfMdtHits );
608 else if ( this->hasInDetTrackParticle() && !associatedEtaDigits().empty())
609 return ( associatedEtaDigits()[0] );
610 else return -1;
611}
614 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfMdtHoles );
615 else return -1;
616}
617
621 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfCscPhiHits );
622 else if ( this->hasInDetTrackParticle() && !associatedPhiDigits().empty())
623 return ( associatedPhiDigits()[1] );
624 else return -1;
625}
628 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfCscPhiHoles );
629 else return -1;
630}
631
635 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfCscEtaHits );
636 else if ( this->hasInDetTrackParticle() && !associatedEtaDigits().empty())
637 return ( associatedEtaDigits()[1] );
638 else return -1;
639}
642 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfCscEtaHoles );
643 else return -1;
644}
645
649 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfRpcPhiHits );
650 else if ( this->hasInDetTrackParticle() && !associatedPhiDigits().empty())
651 return ( associatedPhiDigits()[2] );
652 else return -1;
653}
656 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfRpcPhiHoles );
657 else return -1;
658}
659
663 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfRpcEtaHits );
664 else if ( this->hasInDetTrackParticle() && !associatedEtaDigits().empty())
665 return ( associatedEtaDigits()[2] );
666 else return -1;
667}
670 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfRpcEtaHoles );
671 else return -1;
672}
673
677 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfTgcPhiHits );
678 else if ( this->hasInDetTrackParticle() && !associatedPhiDigits().empty())
679 return ( associatedPhiDigits()[3] );
680 else return -1;
681}
684 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfTgcPhiHoles );
685 else return -1;
686}
687
691 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfTgcEtaHits );
692 else if ( this->hasInDetTrackParticle() && !associatedEtaDigits().empty())
693 return ( associatedEtaDigits()[3] );
694 else return -1;
695}
698 return (*m_muonExtrapolatedTrackParticle)->trackSummary()->get( Trk::numberOfTgcEtaHoles );
699 else return -1;
700}
701
704 const Rec::TrackParticle * theTrack = this->track();
705 if ( theTrack )
706 return theTrack->trackSummary()->get( Trk::numberOfGangedPixels );
707 else return -1;
708}
709
711 const Rec::TrackParticle * theTrack = this->track();
712 if ( theTrack )
713 return theTrack->trackSummary()->get( Trk::numberOfOutliersOnTrack );
714 else return -1;
715
716}
717
718int Muon::numberOfTrackSummaryTypes(unsigned int type) const {
719 const Rec::TrackParticle * theTrack = this->track();
720 if ( theTrack && type < Trk::numberOfTrackSummaryTypes )
721 return theTrack->trackSummary()->get( static_cast<Trk::SummaryType>(type) );
722 else return -1;
723}
724
725void Muon::set_energyLoss ( const MuonCaloEnergyContainer* cont, const CaloEnergy* caloEnergy )
726{
727 if (m_caloEnergyLoss.isValid() ) m_caloEnergyLoss.reset();
728 m_caloEnergyLoss.toContainedElement(*cont, caloEnergy);
729}
730
733 const Rec::TrackParticle* trackParticle )
734{
735 if (m_inDetTrackParticle.isValid() ) m_inDetTrackParticle.reset();
736 m_inDetTrackParticle.toContainedElement(*cont, trackParticle);
737}
738
740{
741 m_inDetTrackParticle.setElement(trackParticle);
742}
743
745void Muon::set_muonSegments(const Trk::SegmentCollection* segmentContainer,
746 const std::vector<const Trk::Segment*>& muonSegments)
747{
748 m_muonSegments.clear();
749 for (unsigned int i=0; i<muonSegments.size(); ++i) this->addSegment(segmentContainer, muonSegments[i]);
750}
751
752void Muon::addSegment ( const Trk::SegmentCollection* segmentContainer, const Trk::Segment* segment )
753{
755 link.toContainedElement( *segmentContainer,segment) ;
756 m_muonSegments.push_back( link ) ;
757}
758
759const ElementLink<Trk::SegmentCollection> Muon::muonSegmentLink(const unsigned int i, bool& validLink) const
760{
762 if ( i < this->numberOfSegments() ) {
763 validLink = true;
764 theLink = m_muonSegments[i];
765 } else {
766 validLink = false;
767 }
768 return theLink;
769}
770
773 const Rec::TrackParticle* trackParticle)
774{
776 if (cont && trackParticle) // allow also to remove an EL
777 m_muonSpectrometerTrackParticle.toContainedElement(*cont, trackParticle);
778}
779
782 const Rec::TrackParticle* trackParticle )
783{
785 if (cont && trackParticle) { // allow also to remove an EL
786 m_muonExtrapolatedTrackParticle.toContainedElement(*cont, trackParticle);
788 }
789}
790
796
799 const Rec::TrackParticle* trackParticle )
800{
802 if (cont && trackParticle) { // allow also to remove an EL
803 m_innerExtrapolatedTrackParticle.toContainedElement(*cont, trackParticle);
804 }
805}
806
808{
809 m_innerExtrapolatedTrackParticle.setElement(trackParticle);
810}
811
814 const Rec::TrackParticle* trackParticle )
815{
817 if (cont && trackParticle) { // allow also to remove an EL
818 m_combinedMuonTrackParticle.toContainedElement(*cont, trackParticle);
820 }
821}
822
828
831 const Rec::TrackParticle* trackParticle )
832{
834 if (cont && trackParticle) { // allow also to remove an EL
835 m_statCombinedMuonTrackParticle.toContainedElement(*cont, trackParticle);
836 }
837}
838
840void Muon::set_numberOfAssociatedEtaDigits(int nMDT, int nCSC, int nRPC, int nTGC) {
841 m_associatedEtaDigits.clear();
842 m_associatedEtaDigits.push_back(nMDT);
843 m_associatedEtaDigits.push_back(nCSC);
844 m_associatedEtaDigits.push_back(nRPC);
845 m_associatedEtaDigits.push_back(nTGC);
846
847}
848void Muon::set_numberOfAssociatedPhiDigits(int nMDT, int nCSC, int nRPC, int nTGC) {
849 m_associatedPhiDigits.clear();
850 m_associatedPhiDigits.push_back(nMDT);
851 m_associatedPhiDigits.push_back(nCSC);
852 m_associatedPhiDigits.push_back(nRPC);
853 m_associatedPhiDigits.push_back(nTGC);
854}
855
856void Muon::set_numberOfAssociatedEtaDigits(const std::vector<int>& associated_digits) {
857 m_associatedEtaDigits = associated_digits;
858}
859
860void Muon::set_numberOfAssociatedPhiDigits(const std::vector<int>& associated_digits) {
861 m_associatedPhiDigits = associated_digits;
862}
863void Muon::set_numberOfSegmentEtaDigits(int nMDT, int nCSC, int nRPC, int nTGC) {
864 m_associatedEtaDigits.clear();
865 m_associatedEtaDigits.push_back(nMDT);
866 m_associatedEtaDigits.push_back(nCSC);
867 m_associatedEtaDigits.push_back(nRPC);
868 m_associatedEtaDigits.push_back(nTGC);
869
870}
871void Muon::set_numberOfSegmentPhiDigits(int nMDT, int nCSC, int nRPC, int nTGC) {
872 m_associatedPhiDigits.clear();
873 m_associatedPhiDigits.push_back(nMDT);
874 m_associatedPhiDigits.push_back(nCSC);
875 m_associatedPhiDigits.push_back(nRPC);
876 m_associatedPhiDigits.push_back(nTGC);
877}
878
879void Muon::set_numberOfSegmentEtaDigits(const std::vector<int>& associated_digits) {
880 m_associatedEtaDigits = associated_digits;
881}
882
883void Muon::set_numberOfSegmentPhiDigits(const std::vector<int>& associated_digits) {
884 m_associatedPhiDigits = associated_digits;
885}
886
888void Muon::set_parameter(MuonParameters::ParamDef index, double value, bool overwrite) {
889
890 using muonParams = std::pair<MuonParameters::ParamDef, float>;
891
892 std::vector<muonParams>::iterator p = m_parameters.begin();
893
894 for (;p !=m_parameters.end(); ++p) {
895 if ( (*p).first == index ) break;
896 }
897
898 if ( p == m_parameters.end() ) {
899 m_parameters.emplace_back(index,(float)value );
900 }
901 else {
902 if ( overwrite ) {
903 (*p).second = (float)value;
904 }
905 //else {
906 // throw GaudiException("parameter not saved", "Muon::set_parameter(...)", true);
907 //int ind = static_cast<int>(index);
908 //std::cout << "parameter not overwritten - Muon::set_parameter(...) index = " << ind << std::endl;
909
910 //}
911 }
912}
913
915// Navigation without parameters //
917
919{
920
921 bool checkFlag = false;
922
924 // First check on track //
926
927
928 const Rec::TrackParticle* aTrack;
929
931 if ( this->combinedMuonTrackParticle() ) {
932
933 aTrack = this->combinedMuonTrackParticle();
934
935 // check requested object type with token type
937 dynamic_cast< NavigationToken<Rec::TrackParticle>* >(&theToken);
938 if ( trackToken != nullptr ) {
939 // request is honored
940 trackToken->setObject(aTrack);
941 checkFlag = true;
942 }
943
944 // alternative token type may phrase the same request
945 if ( ! checkFlag ) {
948 (&theToken);
949 if ( parTrackToken != nullptr ) {
950 parTrackToken->setObject(aTrack);
951 checkFlag = true;
952 }
953 }
954 if(!checkFlag) {
955 // try for generic type requests
956 if ( aTrack != nullptr ) theToken.trySetObject(aTrack);
957 }
958
959 }
960 else {
961 if ( this->muonExtrapolatedTrackParticle() ) {
962 aTrack = this->muonExtrapolatedTrackParticle();
963
964 // check requested object type with token type
966 dynamic_cast< NavigationToken<Rec::TrackParticle>* >(&theToken);
967 if ( trackToken != nullptr ) {
968 // request is honored
969 trackToken->setObject(aTrack);
970 checkFlag = true;
971 }
972
973 // alternative token type may phrase the same request
974 if ( ! checkFlag ) {
977 (&theToken);
978 if ( parTrackToken != nullptr ) {
979 parTrackToken->setObject(aTrack);
980 checkFlag = true;
981 }
982 }
983 if(!checkFlag) {
984
985 // try for generic type requests
986 if ( aTrack != nullptr ) theToken.trySetObject(aTrack);
987 }
988
989 }
990
991 if ( this->inDetTrackParticle() ) {
992 aTrack = this->inDetTrackParticle();
993
994 // check requested object type with token type
996 dynamic_cast< NavigationToken<Rec::TrackParticle>* >(&theToken);
997 if ( trackToken != nullptr ) {
998 // request is honored
999 trackToken->setObject(aTrack);
1000 checkFlag = true;
1001 }
1002
1003 // alternative token type may phrase the same request
1004 if ( ! checkFlag ) {
1007 (&theToken);
1008 if ( parTrackToken != nullptr ) {
1009 parTrackToken->setObject(aTrack);
1010 checkFlag = true;
1011 }
1012 }
1013 if(!checkFlag) {
1014
1015 // try for generic type requests
1016 if ( aTrack != nullptr ) theToken.trySetObject(aTrack);
1017 }
1018 }
1019
1020 }
1021
1022 }
1023
1025// Navigation with parameters //
1027
1029 const std::any& theWeight) const
1030{
1031 bool checkFlag = false;
1032
1033
1034 const Rec::TrackParticle* aTrack;
1035
1037 if ( this->combinedMuonTrackParticle() ) {
1038
1039 aTrack = this->combinedMuonTrackParticle();
1040
1041 // check requested object type with token type
1043 dynamic_cast< NavigationToken<Rec::TrackParticle>* >(&theToken);
1044 if ( trackToken != nullptr ) {
1045 // request is honored
1046 trackToken->setObject(aTrack);
1047 checkFlag = true;
1048 }
1049
1050 // alternative token type may phrase the same request
1051 if ( ! checkFlag ) {
1054 (&theToken);
1055 if ( parTrackToken != nullptr ) {
1056 parTrackToken->setObject(aTrack,
1057 std::any_cast<double>(theWeight));
1058 checkFlag = true;
1059 }
1060 }
1061 if(!checkFlag) {
1062
1063 // try for generic type requests
1064 if ( aTrack != nullptr ) theToken.trySetObject(aTrack, theWeight);
1065 }
1066
1067 }
1068 else {
1069 if ( this->muonExtrapolatedTrackParticle() ) {
1070 aTrack = this->muonExtrapolatedTrackParticle();
1071
1072 // check requested object type with token type
1074 dynamic_cast< NavigationToken<Rec::TrackParticle>* >(&theToken);
1075 if ( trackToken != nullptr ) {
1076 // request is honored
1077 trackToken->setObject(aTrack);
1078 checkFlag = true;
1079 }
1080
1081 // alternative token type may phrase the same request
1082 if ( ! checkFlag ) {
1085 (&theToken);
1086 if ( parTrackToken != nullptr ) {
1087 parTrackToken->setObject(aTrack,
1088 std::any_cast<double>(theWeight));
1089 checkFlag = true;
1090 }
1091 }
1092 if(!checkFlag) {
1093
1094 // try for generic type requests
1095 if ( aTrack != nullptr ) theToken.trySetObject(aTrack, theWeight);
1096 }
1097
1098 }
1099
1100 if ( this->inDetTrackParticle() ) {
1101 aTrack = this->inDetTrackParticle();
1102
1103 // check requested object type with token type
1105 dynamic_cast< NavigationToken<Rec::TrackParticle>* >(&theToken);
1106 if ( trackToken != nullptr ) {
1107 // request is honored
1108 trackToken->setObject(aTrack);
1109 checkFlag = true;
1110 }
1111
1112 // alternative token type may phrase the same request
1113 if ( ! checkFlag ) {
1116 (&theToken);
1117 if ( parTrackToken != nullptr ) {
1118 parTrackToken->setObject(aTrack,
1119 std::any_cast<double>(theWeight));
1120 checkFlag = true;
1121 }
1122 }
1123 if(!checkFlag) {
1124
1125 // try for generic type requests
1126 if ( aTrack != nullptr ) theToken.trySetObject(aTrack, theWeight);
1127 }
1128 }
1129
1130 }
1131
1132}
1133
1138 //else if (this->hasMuonExtrapolatedTrackParticle()) return (*m_muonExtrapolatedTrackParticle);
1139 else if (this->hasInDetTrackParticle()) return (*m_inDetTrackParticle);
1141 else return nullptr;
1142}
1143
1144} //namespace
1145
1146
#define x
static const Attributes_t empty
int numberOfRPCEtaHoles() const
Get Muon Spectrometer RPC Eta Holes information for MS track or tagged segments.
Definition Muon.cxx:668
const Rec::TrackParticle * track() const
return the primary track of this muon
Definition Muon.cxx:1135
bool hasInDetTrackParticle() const
test if associated indet TrackParticle is available
uint16_t m_allAuthors
all authors - all the authors of this this Muon
MuonParameters::Author author() const
return the primary author of this Muon - the algorithm that is most likely to reconstruct prompt muon...
const Rec::TrackParticle * combinedMuonTrackParticle() const
Access to the TrackParticles.
void set_innerExtrapolatedTrackParticle(const Rec::TrackParticleContainer *, const Rec::TrackParticle *)
set the extrapolated track particle from the inner detector.
Definition Muon.cxx:798
int numberOfGangedPixels() const
number of Ganged Pixel for track from primary author
Definition Muon.cxx:703
bool hasInnerExtrapolatedTrackParticle() const
test if associated TrackParticle from ID-seeded full track fit is available
void set_inDetTrackParticle(const Rec::TrackParticleContainer *, const Rec::TrackParticle *)
Set the inner detector track particle.
Definition Muon.cxx:732
int numberOfTGCPhiHoles() const
Get Muon Spectrometer TGC Phi Holes information for MS track or tagged segments.
Definition Muon.cxx:682
ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM > MuonImpl_t
bool isSegmentTaggedMuon() const
Method for querying primary identification mechanism: muon identified by inner-detector seeded identi...
Definition Muon.cxx:448
int numberOfTGCEtaHits() const
Get Muon Spectrometer TGC Eta Hits information for MS track or tagged segments.
Definition Muon.cxx:689
int numberOfRPCPhiHoles() const
Get Muon Spectrometer RPC Phi Holes information for MS track or tagged segments.
Definition Muon.cxx:654
~Muon()
Destructor.
int numberOfInnermostPixelLayerHits() const
Get Inner detector Hits information from ID trackparticle.
Definition Muon.cxx:523
void set_parameter(MuonParameters::ParamDef index, double value, bool overwrite=false)
set a parameter in the MuonParamDefs.h
Definition Muon.cxx:888
std::vector< std::pair< MuonParameters::ParamDef, float > > m_parameters
Parameters as defined in MuonParamDef.h.
int numberOfTRTOutliers() const
Get number of TRT Outliers from ID trackparticle.
Definition Muon.cxx:592
int numberOfSCTHoles() const
Get number of Silicon SCT holes from ID trackparticle.
Definition Muon.cxx:586
int numberOfTRTHighThresholdOutliers() const
Get number of TRT Outliers High Threshold from ID trackparticle.
Definition Muon.cxx:598
Muon & operator=(const Muon &rhs)
Assignment operator.
Definition Muon.cxx:269
bool hasGlobalMuonTrackFit() const
flag if the there was re-fit of ID and MS hits, currently muons from MuidCB, CombinedMuonFit and MuGi...
Definition Muon.cxx:473
std::vector< int > m_associatedEtaDigits
Low Pt muon stuff.
bool isCaloMuonId() const
Method for querying primary identification mechanism: muon identified solely by calorimeter based ide...
Definition Muon.cxx:457
bool hasCombinedMuonTrackParticle() const
test if associated combined-muon TrackParticle is available
int numberOfCSCPhiHits() const
Get Muon Spectrometer CSC Phi Hits information for MS track or tagged segments.
Definition Muon.cxx:619
int numberOfCSCPhiHoles() const
Get Muon Spectrometer CSC Phi Holes information for MS track or tagged segments.
Definition Muon.cxx:626
ElementLink< Rec::TrackParticleContainer > m_combinedMuonTrackParticle
void set_combinedMuonTrackParticle(const Rec::TrackParticleContainer *, const Rec::TrackParticle *)
set the combined muon track particle.
Definition Muon.cxx:813
ElementLink< Rec::TrackParticleContainer > m_inDetTrackParticle
end LowPt stuff
int numberOfTrackSummaryTypes(unsigned int type=0) const
number of summaryTypes for track from primary author
Definition Muon.cxx:718
bool add_author(MuonParameters::Author author)
the add_author method returns a bool:
Definition Muon.cxx:368
int numberOfTRTHits() const
Get number of TRT hits from ID trackparticle.
Definition Muon.cxx:547
void set_muonExtrapolatedTrackParticle(const Rec::TrackParticleContainer *, const Rec::TrackParticle *)
set the muon spectrometer extrapolated track particle.
Definition Muon.cxx:781
int numberOfInnermostPixelLayerSharedHits() const
Get number of shared hits or holes from ID trackparticle.
Definition Muon.cxx:563
virtual void fillToken(INavigationToken &thisToken) const
navigation method
Definition Muon.cxx:918
void set_numberOfAssociatedPhiDigits(int nMDT, int nCSC, int nRPC, int nTGC)
Set the LowPt - Associated Phi Digits.
Definition Muon.cxx:848
void set_numberOfSegmentEtaDigits(int nMDT, int nCSC, int nRPC, int nTGC)
Set Segment Eta Digits.
Definition Muon.cxx:863
int numberOfCSCEtaHoles() const
Get Muon Spectrometer CSC Eta Holes information for MS track or tagged segments.
Definition Muon.cxx:640
bool m_isAlsoFoundByCaloMuonId
this muon is also found by the Calo Muon ID reconstruction algorithm
void set_numberOfSegmentPhiDigits(int nMDT, int nCSC, int nRPC, int nTGC)
Set Segment Phi Digits.
Definition Muon.cxx:871
int numberOfSCTHits() const
Get number of Silicon SCT hits from ID trackparticle.
Definition Muon.cxx:539
int numberOfTGCPhiHits() const
Get Muon Spectrometer TGC Phi Hits information for MS track or tagged segments.
Definition Muon.cxx:675
void set_muonSpectrometerTrackParticle(const Rec::TrackParticleContainer *, const Rec::TrackParticle *)
set Muon Spectrometer TrackParticle
Definition Muon.cxx:772
const Rec::TrackParticle * muonExtrapolatedTrackParticle() const
Access to the TrackParticles.
const Rec::TrackParticle * inDetTrackParticle() const
deprecated - instead use primary identification, muon quality or MuonCP group guidelines to adopt a g...
bool isStandAloneMuon() const
method for querying primary identification mechanism: muon identified by spectrometer track (that is ...
Definition Muon.cxx:431
int numberOfSCTSharedHits() const
Get number of Silicon SCT shared hits from ID trackparticle.
Definition Muon.cxx:580
bool isCombinedMuon() const
method for querying primary identification mechanism: muon identified by successfully combining a ful...
Definition Muon.cxx:421
ElementLink< MuonCaloEnergyContainer > m_caloEnergyLoss
energy loss in calorimeter
unsigned int numberOfSegments() const
Access to the number of muon segments.
ElementLink< Rec::TrackParticleContainer > m_muonExtrapolatedTrackParticle
int numberOfOutliersOnTrack() const
number of outliers for track from primary author
Definition Muon.cxx:710
int numberOfRPCPhiHits() const
Get Muon Spectrometer RPC Phi Hits information for MS track or tagged segments.
Definition Muon.cxx:647
void set_energyLoss(const CaloEnergy *caloEnergy)
set the energy loss in the calorimeter
bool m_isAlsoFoundByLowPt
this muon is also found by the lowPT reconstruction algorithm
bool hasMuonExtrapolatedTrackParticle() const
test if associated MS TrackParticle (extrapolated to IP) is available
MuonQualityWord m_isMuonBits
muon selection parameters
int numberOfPixelHoles() const
Get number of Pixel holes from ID trackparticle.
Definition Muon.cxx:574
void set_outerMatchChi2(double x, int ndof)
set the outer match chi2/ndof for combined and segment-tagged muons
Definition Muon.cxx:497
void set_statCombinedMuonTrackParticle(const Rec::TrackParticleContainer *, const Rec::TrackParticle *)
set the combined muon track particle for statistical combination.
Definition Muon.cxx:830
ElementLink< Rec::TrackParticleContainer > m_muonSpectrometerTrackParticle
needed by MOORE
int numberOfTGCEtaHoles() const
Get Muon Spectrometer TGC Eta Holes information for MS track or tagged segments.
Definition Muon.cxx:696
void copySegmentLinkVector(const ElementLinkVector< Trk::SegmentCollection > &segments)
function to copy muon segment element links into this muon
Definition Muon.cxx:259
void set_muonSegments(const Trk::SegmentCollection *, const std::vector< const Trk::Segment * > &)
set the combined muon track particle
Definition Muon.cxx:745
void set_numberOfAssociatedEtaDigits(int nMDT, int nCSC, int nRPC, int nTGC)
Set the LowPt stuff.
Definition Muon.cxx:840
void addSegment(const Trk::SegmentCollection *, const Trk::Segment *)
set the combined muon track particle
Definition Muon.cxx:752
bool isAuthor(const unsigned int author) const
check if this author is among the list of authors of this Muon - obviously, the primary author MUST b...
Definition Muon.cxx:314
MuonParameters::Author m_author
the author of this muon
Muon()
Default constructor.
Definition Muon.cxx:35
int numberOfMDTHoles() const
Get Muon Spectrometer MDT holes information for MS track or tagged segments.
Definition Muon.cxx:612
ElementLinkVector< Trk::SegmentCollection > m_muonSegments
const std::vector< int > & associatedPhiDigits() const
Access to the MS phi hits associated by segment-tagged muons.
const std::vector< std::pair< MuonParameters::ParamDef, float > > & parameter() const
vector of parameter pairs for this Muon - isolation energy in some cone for example
ElementLink< Rec::TrackParticleContainer > m_statCombinedMuonTrackParticle
int numberOfPixelSharedHits() const
Get number of Pixel shared hits from ID trackparticle.
Definition Muon.cxx:568
ElementLink< Rec::TrackParticleContainer > m_innerExtrapolatedTrackParticle
int numberOfMDTHits() const
Get Muon Spectrometer MDT Hits information for MS track or tagged segments.
Definition Muon.cxx:605
int numberOfPixelHits() const
Get number of Pixel hits from ID trackparticle.
Definition Muon.cxx:531
std::pair< double, double > energyLoss() const
energy loss and its uncertainty in the calorimeter
Definition Muon.cxx:511
const ElementLinkVector< Trk::SegmentCollection > & muonSegmentLink() const
Access to vector smart pointers (ElementLink) to muon segments.
unsigned short m_caloMuonAlsoFoundByMuonReco
flag the calo muon if it is also reconstruction by the standart muon algorithms
bool isSiliconAssociatedForwardMuon() const
Method for querying primary identification mechanism: a combined muon where a clean forward standalon...
Definition Muon.cxx:466
int numberOfTRTHighThresholdHits() const
Get number of TRT High Threshold hits from ID trackparticle.
Definition Muon.cxx:555
int numberOfRPCEtaHits() const
Get Muon Spectrometer RPC Eta Hits information for MS track or tagged segments.
Definition Muon.cxx:661
const std::vector< int > & associatedEtaDigits() const
Access to the MS eta hits associated by segment-tagged muons.
int numberOfCSCEtaHits() const
Get Muon Spectrometer CSC Eta Hits information for MS track or tagged segments.
Definition Muon.cxx:633
class extending the basic Trk::EnergyLoss to describe the measured or parameterised muon energy loss ...
Definition CaloEnergy.h:28
ElementLinkVector implementation for standalone ROOT.
ELVIterator< typename RefVector::const_iterator > const_iterator
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition I4Momentum.h:31
virtual CLHEP::HepLorentzVector hlv() const =0
CLHEP HepLorentzVector.
virtual bool trySetObject(const INavigable *child)=0
Data object for a StoreGate container holding a vector of CaloEnergy, the detailed energy loss descri...
void setObject(const_child_ptr data)
double sigmaDeltaE() const
returns the symmatric error
double deltaE() const
returns the
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition FitQuality.h:97
Base class for all TrackSegment implementations, extends the common MeasurementBase.
bool patternRecoInfo(const TrackPatternRecoInfo &pattern) const
Access method for pattern recognition algorithm.
@ SiSpacePointsSeedMaker_ForwardTracks
Entries allowing to distinguish different seed makers.
const TrackSummary * trackSummary() const
accessor function for TrackSummary.
double charge() const
Return charge of the particle.
const TrackInfo & info() const
returns the info of the track.
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
double chi2(TH1 *h0, TH1 *h1)
The namespace of all packages in PhysicsAnalysis/JetTagging.
ParamDef
Enum for parameter indexes.
Author
do not change the order of these enums.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< Trk::Segment > SegmentCollection
SummaryType
enumerates the different types of information stored in Summary.
@ numberOfTgcPhiHoles
number of TGC Phi measurements missing from the track
@ numberOfRpcEtaHoles
number of RPC Eta measurements missing from the track
@ numberOfGangedPixels
number of Ganged Pixels flagged as fakes
@ numberOfPixelHits
number of pixel layers on track with absence of hits
@ numberOfTRTHighThresholdOutliers
number of dead TRT straws crossed
@ numberOfMdtHoles
number of MDT measurements missing from the track
@ numberOfInnermostPixelLayerHits
these are the hits in the 1st pixel layer
@ numberOfTRTHighThresholdHits
total number of TRT hits which pass the high threshold
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
@ numberOfOutliersOnTrack
100 times the standard deviation of the chi2 from the surfaces
@ numberOfTgcEtaHoles
number of TGC Eta measurements missing from the track
@ numberOfCscPhiHoles
number of CSC Phi measurements missing from the track
@ numberOfRpcPhiHoles
number of RPC Phi measurements missing from the track
@ numberOfCscEtaHoles
number of CSC Eta measurements missing from the track
Definition index.py:1