|
ATLAS Offline Software
|
#include <MuonCreatorTool.h>
|
| MuonCreatorTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
| ~MuonCreatorTool ()=default |
|
virtual StatusCode | initialize () override final |
|
virtual void | create (const EventContext &ctx, const MuonCandidateCollection *muonCandidates, const std::vector< const InDetCandidateToTagMap * > &tagMaps, OutputData &outputData) const override final |
| IMuonCreatorTool interface: build muons from ID and MS candidates. More...
|
|
virtual xAOD::Muon * | create (const EventContext &ctx, const MuonCandidate &candidate, OutputData &outputData) const override final |
| IMuonCreatorTool interface: create a muon from a muon candidate. More...
|
|
virtual xAOD::Muon * | create (const EventContext &ctx, InDetCandidateTags &candidate, OutputData &outputData) const override final |
| IMuonCreatorTool interface: create a muon from a muon candidate. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | create (const EventContext &ctx, const MuonCandidateCollection *muonCandidates, const std::vector< const InDetCandidateToTagMap * > &tagMaps, OutputData &outputData, bool select_comissioning) const |
|
void | decorateDummyValues (const EventContext &ctx, xAOD::Muon &muon, OutputData &outputData) const |
| De^corated a bunch of dummy values to the muon to ensure data consistency in the xAOD. More...
|
|
void | addStatisticalCombination (const EventContext &ctx, xAOD::Muon &muon, const InDetCandidate *candidate, const StacoTag *tag, OutputData &outputData) const |
|
void | addCombinedFit (const EventContext &ctx, xAOD::Muon &muon, const CombinedFitTag *tag, OutputData &outputData) const |
|
void | addMuGirl (const EventContext &ctx, xAOD::Muon &muon, const MuGirlTag *tag, OutputData &outputData) const |
|
void | addMuGirlLowBeta (const EventContext &ctx, xAOD::Muon &muon, const MuGirlLowBetaTag *tag, xAOD::SlowMuon *slowMuon, OutputData &outputData) const |
|
void | addSegmentTag (const EventContext &ctx, xAOD::Muon &muon, const SegmentTag *tag, OutputData &outputData) const |
|
void | addCaloTag (xAOD::Muon &muon, const CaloTag *tag) const |
|
void | addMuonCandidate (const EventContext &ctx, const MuonCandidate &candidate, xAOD::Muon &muon, OutputData &outputData, const ElementLink< TrackCollection > &meLink=ElementLink< TrackCollection >()) const |
| add muon candidate info to a muon, if an updateExtrapolatedTrack is provided, the routine takes ownership of the track. More...
|
|
ElementLink< xAOD::TrackParticleContainer > | createTrackParticleElementLink (const ElementLink< TrackCollection > &trackLink, xAOD::TrackParticleContainer &trackParticleContainer, TrackCollection *trackCollection=0) const |
| function creates an element link to a track particle from the track and the TrackParticle collection. More...
|
|
ElementLink< xAOD::MuonSegmentContainer > | createMuonSegmentElementLink (const EventContext &ctx, const Muon::MuonSegment *segLink, const OutputData &outData) const |
|
void | resolveOverlaps (const EventContext &ctx, const MuonCandidateCollection *muonCandidates, const std::vector< const InDetCandidateToTagMap * > &tagMaps, InDetCandidateTagsMap &resolvedInDetCandidates, std::vector< const MuonCombined::MuonCandidate * > &resolvedMuonCandidates, bool select_comissioning=false) const |
|
void | selectStaus (InDetCandidateTagsMap &resolvedInDetCandidates, const std::vector< const InDetCandidateToTagMap * > &tagMaps) const |
|
std::unique_ptr< Trk::Track > | createDummyTrack (const EventContext &ctx, const std::vector< const Muon::MuonSegment * > &segments, const Trk::Track &indetTrack) const |
|
void | setMuonHitCounts (xAOD::Muon &muon) const |
|
bool | dressMuon (xAOD::Muon &muon) const |
|
void | addEnergyLossToMuon (xAOD::Muon &muon) const |
|
void | fillEnergyLossFromTrack (xAOD::Muon &muon, const std::vector< const Trk::TrackStateOnSurface * > *tsosVector) const |
|
void | setP4 (xAOD::Muon &muon, const xAOD::TrackParticle &tp) const |
|
void | collectCells (const EventContext &ctx, xAOD::Muon &muon, xAOD::CaloClusterContainer *clusterContainer, const Trk::CaloExtension *inputCaloExt=nullptr) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
ServiceHandle< Muon::IMuonEDMHelperSvc > | m_edmHelperSvc |
|
PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
|
ToolHandle< Rec::IMuonPrintingTool > | m_muonPrinter {this, "MuonPrinter", "Rec::MuonPrintingTool/MuonPrintingTool"} |
|
ToolHandle< Trk::IParticleCaloExtensionTool > | m_caloExtTool |
|
ToolHandle< Trk::ITrackParticleCreatorTool > | m_particleCreator |
|
ToolHandle< Trk::ITrackAmbiguityProcessorTool > | m_ambiguityProcessor {this, "AmbiguityProcessor", ""} |
|
ToolHandle< Trk::IPropagator > | m_propagator {this, "Propagator", "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"} |
|
ToolHandle< xAOD::IMuonDressingTool > | m_muonDressingTool {this, "MuonDressingTool", "MuonCombined::MuonDressingTool/MuonDressingTool"} |
|
ToolHandle< Rec::IMuonMomentumBalanceSignificance > | m_momentumBalanceTool |
|
ToolHandle< Rec::IMuonScatteringAngleSignificance > | m_scatteringAngleTool |
|
ToolHandle< CP::IMuonSelectionTool > | m_selectorTool {this, "MuonSelectionTool", "CP::MuonSelectionTool/MuonSelectionTool"} |
|
ToolHandle< Rec::IMuonMeanMDTdADCFiller > | m_meanMDTdADCTool |
|
ToolHandle< Trk::ITrkMaterialProviderTool > | m_caloMaterialProvider |
|
ToolHandle< Rec::IMuonTrackQuery > | m_trackQuery {this, "TrackQuery", "Rec::MuonTrackQuery/MuonTrackQuery"} |
|
ToolHandle< Trk::IExtendedTrackSummaryTool > | m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"} |
|
Rec::CaloCellCollector | m_cellCollector |
|
SG::ReadHandleKey< CaloCellContainer > | m_cellContainerName {this, "CaloCellContainer", "AllCalo", "calo cells"} |
|
SG::ReadCondHandleKey< CaloNoise > | m_caloNoiseKey {this, "CaloNoise", "", "CaloNoise object to use, or blank."} |
|
Gaudi::Property< bool > | m_buildStauContainer {this, "BuildStauContainer", false, "flag to decide whether to build stau or not"} |
|
Gaudi::Property< bool > | m_fillEnergyLossFromTrack |
|
Gaudi::Property< bool > | m_fillExtraELossInfo |
|
Gaudi::Property< bool > | m_printSummary {this, "PrintSummary", false, "flag to print muon edm"} |
|
Gaudi::Property< bool > | m_useUpdatedExtrapolatedTrack |
|
Gaudi::Property< bool > | m_segLowBeta {this, "AssociateSegmentsToLowBetaMuons", false, "associate segments to MuGirlLowBeta muons"} |
|
Gaudi::Property< bool > | m_useCaloCells {this, "UseCaloCells", true} |
|
Gaudi::Property< bool > | m_doSA {this, "MakeSAMuons", false} |
|
Gaudi::Property< bool > | m_requireIDTracks {this, "RequireIDTrack", false} |
| In case of running the muon reconstruction with LRT tracks this property removes the overlap of muons in the container in which in any case no ID track is available. More...
|
|
Gaudi::Property< float > | m_sigmaCaloNoiseCut {this, "SigmaCaloNoiseCut", 3.4} |
|
Gaudi::Property< std::vector< std::string > > | m_copyFloatSummaryKeys |
|
Gaudi::Property< std::vector< std::string > > | m_copyCharSummaryKeys |
|
Gaudi::Property< bool > | m_requireMSOEforSA |
|
Gaudi::Property< bool > | m_requireCaloDepositForSA |
|
std::vector< std::unique_ptr< SG::AuxElement::Accessor< float > > > | m_copyFloatSummaryAccessors |
|
std::vector< std::unique_ptr< SG::AuxElement::Accessor< uint8_t > > > | m_copyCharSummaryAccessors |
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager"} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 60 of file MuonCreatorTool.h.
◆ InDetCandidateTags
◆ InDetCandidateTagsMap
◆ StoreGateSvc_t
◆ MuonCreatorTool()
MuonCombined::MuonCreatorTool::MuonCreatorTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuonCreatorTool()
MuonCombined::MuonCreatorTool::~MuonCreatorTool |
( |
| ) |
|
|
default |
◆ addCaloTag()
Definition at line 702 of file MuonCreatorTool.cxx.
709 mu.setParameter(0.
f, xAOD::Muon::CaloMuonScore);
710 mu.setParameter(
static_cast<int>(0xFF), xAOD::Muon::CaloMuonIDTag);
714 acc_ET_Core(
mu) = 0.0;
715 acc_ElType(
mu) = -999.0;
716 acc_ElFSREnergy(
mu) = -999.0;
721 ATH_MSG_DEBUG(
"Adding Calo Muon with author " <<
tag->author() <<
", type " <<
tag->type() <<
", CaloMuonScore "
722 <<
tag->caloMuonScore());
723 mu.setParameter(
static_cast<float>(
tag->caloMuonScore()), xAOD::Muon::CaloMuonScore);
724 mu.setParameter(
static_cast<int>(
tag->caloMuonIdTag()), xAOD::Muon::CaloMuonIDTag);
729 acc_ET_Core(
mu) =
tag->etCore();
730 acc_ElType(
mu) =
tag->energyLossType();
731 acc_ElFSREnergy(
mu) =
tag->fsrCandidateEnergy();
◆ addCombinedFit()
Definition at line 486 of file MuonCreatorTool.cxx.
494 if (!
muon.combinedTrackParticleLink().isValid()) {
496 if (outputData.combinedTrackParticleContainer) {
499 tag->combinedTrackLink(), *outputData.combinedTrackParticleContainer, outputData.combinedTrackCollection);
503 ATH_MSG_DEBUG(
"Adding combined fit: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
504 muon.setTrackParticleLink(xAOD::Muon::CombinedTrackParticle, link);
513 const float inner_chi2 =
tag->matchChi2();
514 muon.setParameter(
tag->matchDoF(), xAOD::Muon::msInnerMatchDOF);
515 muon.setParameter(inner_chi2, xAOD::Muon::msInnerMatchChi2);
517 ATH_MSG_DEBUG(
"Done adding Combined Fit Muon " <<
tag->author() <<
" type " <<
tag->type());
◆ addEnergyLossToMuon()
void MuonCombined::MuonCreatorTool::addEnergyLossToMuon |
( |
xAOD::Muon & |
muon | ) |
const |
|
private |
Definition at line 1255 of file MuonCreatorTool.cxx.
1256 if (!
muon.inDetTrackParticleLink().isValid()) {
1257 ATH_MSG_WARNING(
"Missing ID track particle link in addEnergyLossToMuon!");
1262 const Trk::Track* trk = (*(
muon.inDetTrackParticleLink()))->track();
1272 for (;
it != itEnd; ++
it) {
1273 if ((*it)->trackParameters()) {
1279 ATH_MSG_WARNING(
"Missing ID TSOS with track parameters in addEnergyLossToMuon!");
1284 std::vector<const Trk::TrackStateOnSurface*>* caloTSOS =
m_caloMaterialProvider->getCaloTSOS(*((*it)->trackParameters()), *trk);
1295 std::vector<const Trk::TrackStateOnSurface*>::const_iterator it2 = caloTSOS->begin();
1296 std::vector<const Trk::TrackStateOnSurface*>::const_iterator itEnd2 = caloTSOS->end();
1297 for (; it2 != itEnd2; ++it2)
delete *it2;
◆ addMuGirl()
Definition at line 611 of file MuonCreatorTool.cxx.
619 if (!
muon.combinedTrackParticleLink().isValid() &&
tag->combinedTrack()) {
621 if (outputData.combinedTrackParticleContainer) {
624 tag->combinedTrackLink(), *outputData.combinedTrackParticleContainer, outputData.combinedTrackCollection);
628 ATH_MSG_DEBUG(
"Adding MuGirl: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
629 muon.setTrackParticleLink(xAOD::Muon::CombinedTrackParticle, link);
634 if (outputData.extrapolatedTrackParticleContainer &&
tag->updatedExtrapolatedTrack()) {
638 outputData.extrapolatedTrackCollection);
641 ATH_MSG_DEBUG(
"Adding MuGirl: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
642 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
647 if (outputData.xaodSegmentContainer) {
650 std::vector<ElementLink<xAOD::MuonSegmentContainer>> segments;
654 segments.push_back(link);
655 ATH_MSG_DEBUG(
"Adding MuGirl: xaod::MuonSegment px " << (*link)->px() <<
" py " << (*link)->py() <<
" pz "
660 muon.setMuonSegmentLinks(segments);
◆ addMuGirlLowBeta()
Definition at line 520 of file MuonCreatorTool.cxx.
534 if (slowMuon && stauExtras) {
554 std::vector<uint8_t>& eTechVec = eTechAcc(*slowMuon);
555 std::vector<unsigned int>& idVec = idAcc(*slowMuon);
556 std::vector<float>& mToFVec = mToFAcc(*slowMuon);
557 std::vector<float>& xVec = xAcc(*slowMuon);
558 std::vector<float>& yVec = yAcc(*slowMuon);
559 std::vector<float>& zVec = zAcc(*slowMuon);
560 std::vector<float>& eVec = eAcc(*slowMuon);
562 std::vector<float>& errorVec = errorAcc(*slowMuon);
563 std::vector<float>& shiftVec = shiftAcc(*slowMuon);
564 std::vector<float>& propagationTimeVec = propTimeAcc(*slowMuon);
566 for (
const auto& hit : stauExtras->
hits) {
567 eTechVec.push_back(hit.eTech);
568 idVec.push_back(hit.id.get_identifier32().get_compact());
569 mToFVec.push_back(hit.mToF);
570 xVec.push_back(hit.x);
571 yVec.push_back(hit.y);
572 zVec.push_back(hit.z);
573 eVec.push_back(hit.e);
574 errorVec.push_back(hit.error);
575 shiftVec.push_back(hit.shift);
576 propagationTimeVec.push_back(hit.propagationTime);
580 if (!
muon.combinedTrackParticleLink().isValid() &&
tag->combinedTrack()) {
582 if (outputData.combinedTrackParticleContainer) {
585 tag->combinedTrackLink(), *outputData.combinedTrackParticleContainer, outputData.combinedTrackCollection);
588 ATH_MSG_DEBUG(
"Adding MuGirlLowBeta: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
589 muon.setTrackParticleLink(xAOD::Muon::CombinedTrackParticle, link);
591 ATH_MSG_WARNING(
"Creating of MuGirlLowBeta TrackParticle Link failed");
595 if (outputData.xaodSegmentContainer) {
597 std::vector<ElementLink<xAOD::MuonSegmentContainer>> segments;
601 segments.push_back(link);
602 ATH_MSG_DEBUG(
"Adding MuGirlLowBeta: xaod::MuonSegment px " << (*link)->px() <<
" py " << (*link)->py() <<
" pz "
607 muon.setMuonSegmentLinks(segments);
◆ addMuonCandidate()
add muon candidate info to a muon, if an updateExtrapolatedTrack is provided, the routine takes ownership of the track.
The track will be used instead of the extrapolatedTrack of the MuonCandidate. The extrapolatedTrack of the MuonCandidate will be release during the operation.
Definition at line 779 of file MuonCreatorTool.cxx.
781 if (!
muon.nMuonSegments()) {
782 std::vector< ElementLink<xAOD::MuonSegmentContainer>> segments;
786 segments.push_back(link);
787 ATH_MSG_DEBUG(
"Adding MuGirl: xaod::MuonSegment px " << (*link)->px() <<
" py " << (*link)->py() <<
" pz "
790 ATH_MSG_WARNING(
"Creating of Muon candidate segment failed "<<candidate.toString());
793 muon.setMuonSegmentLinks(segments);
796 if (
muon.muonSpectrometerTrackParticleLink().isValid()) {
return; }
801 muon.setTrackParticleLink(xAOD::Muon::MuonSpectrometerTrackParticle, candidate.muonSpectrometerTrackLink());
804 if (!outputData.extrapolatedTrackParticleContainer || (!candidate.extrapolatedTrack() && !meLink.
isValid())) {
return; }
806 const Trk::Track* extrapolatedTrack = candidate.extrapolatedTrack();
809 ATH_MSG_DEBUG(
"There is no extrapolated track associated to the MuonCandidate.");
814 meLink, *outputData.extrapolatedTrackParticleContainer, outputData.extrapolatedTrackCollection);
816 ATH_MSG_DEBUG(
"Adding standalone fit (refitted): pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
818 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
819 float fieldInt =
m_trackQuery->fieldIntegral(**meLink, ctx).betweenSpectrometerMeasurements();
822 acc_nUnspoiledCscHits(
muon) = nunspoiled;
826 if (!extrapolatedTrack)
ATH_MSG_WARNING(
"Track doesn't have extrapolated track. Skipping");
829 "Track doesn't have perigee parameters on extrapolated "
836 if (
muon.muonType() != xAOD::Muon::MuonStandAlone) {
838 if (outputData.msOnlyExtrapolatedTrackParticleContainer) {
843 candidate.extrapolatedTrackLink(), *outputData.msOnlyExtrapolatedTrackParticleContainer,
844 outputData.msOnlyExtrapolatedTrackCollection);
847 ATH_MSG_DEBUG(
"Adding MS-only extrapolated track: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
850 muon.setTrackParticleLink(xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle, link);
852 ATH_MSG_WARNING(
"failed to create MS-only extrapolated track particle");
856 meLink, *outputData.extrapolatedTrackParticleContainer, outputData.extrapolatedTrackCollection);
858 ATH_MSG_DEBUG(
"Adding standalone fit (refitted): pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
860 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
861 float fieldInt =
m_trackQuery->fieldIntegral(**meLink, ctx).betweenSpectrometerMeasurements();
864 acc_nUnspoiledCscHits(
muon) = nunspoiled;
873 candidate.extrapolatedTrackLink(), *outputData.msOnlyExtrapolatedTrackParticleContainer,
874 outputData.msOnlyExtrapolatedTrackCollection);
877 ATH_MSG_DEBUG(
"Adding MS-only extrapolated track to MuGirl muon: pt "
878 << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
880 muon.setTrackParticleLink(xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle, link);
882 m_trackQuery->fieldIntegral(**candidate.extrapolatedTrackLink(), ctx).betweenSpectrometerMeasurements();
887 candidate.extrapolatedTrackLink(), *outputData.extrapolatedTrackParticleContainer,
888 outputData.extrapolatedTrackCollection);
891 ATH_MSG_DEBUG(
"Adding standalone fit (un-refitted): pt " << (*link)->pt() <<
" eta " << (*link)->eta()
892 <<
" phi " << (*link)->phi());
894 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
896 m_trackQuery->fieldIntegral(**candidate.extrapolatedTrackLink(), ctx).betweenSpectrometerMeasurements();
905 outputData.extrapolatedTrackCollection);
908 ATH_MSG_DEBUG(
"Adding standalone fit: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
910 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
912 m_trackQuery->fieldIntegral(**candidate.extrapolatedTrackLink(), ctx).betweenSpectrometerMeasurements();
915 acc_nUnspoiledCscHits(
muon) = nunspoiled;
◆ addSegmentTag()
Definition at line 666 of file MuonCreatorTool.cxx.
677 std::vector<ElementLink<xAOD::MuonSegmentContainer>> segments;
678 bool foundseg =
false;
679 for (
const auto&
info :
tag->segmentsInfo()) {
686 if (seglink.
isValid()) segments.push_back(seglink);
692 muon.setParameter(
static_cast<float>(
info.segment->fitQuality()->chiSquared() /
info.segment->fitQuality()->numberDoF()),
◆ addStatisticalCombination()
Also add this decoration to maintain data-format consistency to the combined track particles (cf. ATLASRECTS-6454)
Definition at line 389 of file MuonCreatorTool.cxx.
402 acc_phi0(
muon) = -999;
403 acc_theta(
muon) = -999;
404 acc_qOverP(
muon) = -999;
405 acc_qOverPerr(
muon) = -999.;
411 if (!
muon.combinedTrackParticleLink().isValid()) {
414 const Trk::Track* idTrack = candidate->indetTrackParticle().track();
415 const Trk::Track* msTrack =
tag->muonCandidate().extrapolatedTrack() ?
tag->muonCandidate().extrapolatedTrack()
416 : &
tag->muonCandidate().muonSpectrometerTrack();
422 if (idSummary)
summary += *idSummary;
423 if (msSummary)
summary += *msSummary;
429 if (outputData.combinedTrackParticleContainer) {
431 xAOD::muon, outputData.combinedTrackParticleContainer);
437 std::vector<float> dummy_cov(15, 0.);
438 tp->setTrackParameterCovarianceMatrix(0, dummy_cov);
441 outputData.combinedTrackParticleContainer->size() - 1);
442 if (link.isValid()) {
444 ATH_MSG_DEBUG(
"Adding statistical combination: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
446 muon.setTrackParticleLink(xAOD::Muon::CombinedTrackParticle, link);
452 std::bitset<xAOD::NumberOfTrackRecoInfo>
pattern;
458 (*accessor)( *tp ) = (*accessor)( id_track_particle );
461 (*accessor)( *tp ) = (*accessor)( id_track_particle );
472 muon.setParameter(5, xAOD::Muon::msInnerMatchDOF);
473 muon.setParameter(
static_cast<float>(
tag->matchChi2()), xAOD::Muon::msInnerMatchChi2);
◆ collectCells()
Definition at line 1348 of file MuonCreatorTool.cxx.
1351 if (!
tp || !clusterContainer) {
1357 ATH_MSG_DEBUG(
" Selected track: pt " <<
tp->pt() <<
" eta " <<
tp->eta() <<
" phi " <<
tp->phi());
1365 if (!inputCaloExt) {
1368 std::unique_ptr<Trk::CaloExtension> caloExtension =
m_caloExtTool->caloExtension(ctx, *
tp);
1369 if (!caloExtension) {
1374 ATH_MSG_DEBUG(
"Received a caloExtension object without track extrapolation");
1381 ATH_MSG_DEBUG(
"Failed to create cluster from ParticleCellAssociation");
1384 ATH_MSG_DEBUG(
" New cluster: eta " << cluster->
eta() <<
" phi " << cluster->
phi() <<
" cells " << cluster->
size());
1389 muon.setClusterLink(clusterLink);
1393 caloNoise = noiseH.cptr();
1396 std::vector<float> etcore(4, 0);
◆ create() [1/4]
IMuonCreatorTool interface: create a muon from a muon candidate.
Implements MuonCombined::IMuonCreatorTool.
Definition at line 178 of file MuonCreatorTool.cxx.
181 ATH_MSG_DEBUG(
"MuonCreatorTool::create(...) No extrapolated track - aborting. Will not create Muon.");
187 outputData.muonContainer->push_back(
muon);
191 muon->setMuonType(xAOD::Muon::MuonStandAlone);
197 using TrackParticleType = xAOD::Muon::TrackParticleType;
198 if (
m_requireMSOEforSA && !
muon->trackParticle(TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle)) {
199 ATH_MSG_DEBUG(
"Creation of track particle for SA muon failed, removing it");
200 outputData.muonContainer->pop_back();
206 outputData.muonContainer->pop_back();
212 std::unique_ptr<Trk::CaloExtension> caloExtension =
m_caloExtTool->caloExtension(ctx, *
track);
214 ATH_MSG_DEBUG(
"failed to get a calo extension for this SA muon, discard it");
215 outputData.muonContainer->pop_back();
219 ATH_MSG_DEBUG(
"failed to retrieve any calo layers for this SA muon, discard it");
220 outputData.muonContainer->pop_back();
◆ create() [2/4]
◆ create() [3/4]
Definition at line 121 of file MuonCreatorTool.cxx.
127 std::vector<const MuonCombined::MuonCandidate*> resolvedMuonCandidates;
131 resolveOverlaps(ctx, muonCandidates, tagMaps, resolvedInDetCandidates, resolvedMuonCandidates, select_commissioning);
132 else if (!select_commissioning)
135 unsigned int numIdCan = resolvedInDetCandidates.size();
136 unsigned int numMuCan = muonCandidates ? muonCandidates->
size() : 0;
137 ATH_MSG_DEBUG(
"Creating xAOD::Muons from: " << numIdCan <<
" indet candidates and " << numMuCan <<
" muon candidates ");
140 ATH_MSG_DEBUG(
"MuonCandidates : overlap removal " << muonCandidates->
size() <<
" in, " << resolvedMuonCandidates.size()
151 if (select_commissioning) {
muon->addAllAuthor(xAOD::Muon::Author::Commissioning); }
153 if (!
muon->primaryTrackParticleLink().isValid()) {
154 ATH_MSG_ERROR(
"This muon has no valid primaryTrackParticleLink! Author=" <<
muon->author());
163 if (
muon && select_commissioning) {
muon->addAllAuthor(xAOD::Muon::Author::Commissioning); }
174 ATH_MSG_VERBOSE(
"Associated clusters : " << outputData.clusterContainer->size());
◆ create() [4/4]
IMuonCreatorTool interface: create a muon from a muon candidate.
Implements MuonCombined::IMuonCreatorTool.
Definition at line 250 of file MuonCreatorTool.cxx.
252 if (candidate.second.empty()) {
253 ATH_MSG_DEBUG(
"MuonCreatorTool::create(...) - InDetCandidate with empty combinedDataTags. Aborting. Will not create Muon.");
256 const std::vector<const TagBase*>&
tags = candidate.second;
258 const MuGirlLowBetaTag* muGirlLowBetaTag =
dynamic_cast<const MuGirlLowBetaTag*
>(
tags[0]);
259 if (muGirlLowBetaTag) {
260 ATH_MSG_DEBUG(
"Track has only a MuGirlLowBetaTag but Staus are not being built, so will not create muon");
267 outputData.muonContainer->push_back(
muon);
273 muon->setTrackParticleLink(xAOD::Muon::InnerDetectorTrackParticle, candidate.first->indetTrackParticleLink());
274 ATH_MSG_DEBUG(
"Adding InDet Track: pt " << candidate.first->indetTrackParticle().pt() <<
" eta "
275 << candidate.first->indetTrackParticle().eta() <<
" phi "
276 << candidate.first->indetTrackParticle().phi());
288 const MuGirlLowBetaTag* muGirlLowBetaTag =
dynamic_cast<const MuGirlLowBetaTag*
>(
tag);
290 if (muGirlLowBetaTag) {
293 muon->setAuthor(
tag->author());
294 muon->setMuonType(
tag->type());
300 if (outputData.slowMuonContainer) {
302 outputData.slowMuonContainer->push_back(slowMuon);
307 ATH_MSG_DEBUG(
"slowMuon muonContainer size " << outputData.muonContainer->size());
309 if (slowMuon && muonLink.isValid()) {
318 const MuGirlLowBetaTag* muGirlLowBetaTag =
dynamic_cast<const MuGirlLowBetaTag*
>(
tag);
319 if (muGirlLowBetaTag)
continue;
323 ATH_MSG_DEBUG(
"MuonCreatorTool first muon tag: author=" <<
tag->author() <<
" type=" <<
tag->type());
324 muon->setAuthor(
tag->author());
325 muon->setMuonType(
tag->type());
327 if (candidate.first->isSiliconAssociated()) {
muon->setMuonType(xAOD::Muon::SiliconAssociatedForwardMuon); }
331 muon->addAllAuthor(
tag->author());
334 xAOD::Muon::MuonType
type =
tag->type();
337 const CombinedFitTag* cbFitTag =
dynamic_cast<const CombinedFitTag*
>(
tag);
338 const StacoTag* stacoTag =
dynamic_cast<const StacoTag*
>(
tag);
339 const MuGirlTag* muGirlTag =
dynamic_cast<const MuGirlTag*
>(
tag);
344 if (!(cbFitTag || stacoTag || muGirlTag)) {
ATH_MSG_WARNING(
"Unknown combined tag "); }
346 }
else if (
type == xAOD::Muon::SegmentTagged) {
347 const SegmentTag* segTag =
dynamic_cast<const SegmentTag*
>(
tag);
348 const MuGirlTag* muGirlTag =
dynamic_cast<const MuGirlTag*
>(
tag);
353 if (!(segTag || muGirlTag)) {
ATH_MSG_WARNING(
"Unknown segment-tagged tag "); }
354 }
else if (
type == xAOD::Muon::CaloTagged) {
366 outputData.muonContainer->pop_back();
374 bool haveEloss =
muon->parameter(eLoss, xAOD::Muon::EnergyLoss);
375 if (!haveEloss || eLoss == 0) {
384 ATH_MSG_DEBUG(
"Done creating muon with " << acc_nUnspoiledCscHits(*
muon) <<
" unspoiled csc hits");
◆ createDummyTrack()
Definition at line 1147 of file MuonCreatorTool.cxx.
1152 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
1159 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
1162 std::unique_ptr<Trk::TrackParameters> exPars{
m_propagator->propagateParameters(
1164 if (!exPars) {
ATH_MSG_VERBOSE(
"Could not propagate Track to segment surface"); }
1167 trackStateOnSurfaces->push_back(trackState);
1174 std::unique_ptr<Trk::Track> newtrack =
1175 std::make_unique<Trk::Track>(
info, std::move(trackStateOnSurfaces), (indetTrack.
fitQuality())->uniqueClone());
◆ createMuonSegmentElementLink()
Definition at line 762 of file MuonCreatorTool.cxx.
765 if (outData.xaodSegmentContainer && outData.tagToSegmentAssocMap) {
768 unsigned int link = outData.tagToSegmentAssocMap->linkIndex(trkSeg);
769 if (link >= outData.xaodSegmentContainer->size()) {
◆ createTrackParticleElementLink()
function creates an element link to a track particle from the track and the TrackParticle collection.
if a TrackCollection is also provided, the element link to the track will also be set takes ownership of the track
Definition at line 736 of file MuonCreatorTool.cxx.
741 if (trackCollection) {
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ decorateDummyValues()
void MuonCombined::MuonCreatorTool::decorateDummyValues |
( |
const EventContext & |
ctx, |
|
|
xAOD::Muon & |
muon, |
|
|
OutputData & |
outputData |
|
) |
| const |
|
private |
De^corated a bunch of dummy values to the muon to ensure data consistency in the xAOD.
Unspoiled CSC hits
Definition at line 230 of file MuonCreatorTool.cxx.
239 acc_nUnspoiledCscHits(
muon) = 0;
240 acc_MuonSpectrometerPt(
muon) = -1;
241 acc_InnerDetectorPt(
muon) = -1;
243 acc_ET_Core(
muon) = 0;
244 acc_ET_EMCore(
muon) = 0;
245 acc_ET_TileCore(
muon) = 0;
246 acc_ET_HECCore(
muon) = 0;
◆ detStore()
◆ dressMuon()
bool MuonCombined::MuonCreatorTool::dressMuon |
( |
xAOD::Muon & |
muon | ) |
const |
|
private |
Definition at line 1183 of file MuonCreatorTool.cxx.
1184 if (!
muon.primaryTrackParticleLink().isValid()) {
1185 ATH_MSG_DEBUG(
"No primary track particle set, deleting muon");
1195 ATH_MSG_WARNING(
"MuonCreatorTool::dressMuon - trying to set qOverP, but value from muon.primaryTrackParticle ["
1196 <<
muon.primaryTrackParticleLink().dataID()
1197 <<
"] is zero. Setting charge=0.0. The eta/phi of the muon is: " <<
muon.eta() <<
" / " <<
muon.phi());
1198 muon.setCharge(0.0);
1211 ATH_MSG_VERBOSE(
"Got curvatureSignificance " << curvatureSignificance <<
" and neighbourSignificance "
1212 << neighbourSignificance);
1223 muon.setParameter(meanDeltaADC, xAOD::Muon::meanDeltaADCCountsMDT);
1228 acc_MuonSpectrometerPt(
muon) =
muon.pt();
1229 acc_InnerDetectorPt(
muon) =
muon.pt();
1240 if (
muon.trackParticle(xAOD::Muon::CombinedTrackParticle)) {
1241 trk =
muon.trackParticle(xAOD::Muon::CombinedTrackParticle)->track();
1243 if (!trk &&
muon.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle)) {
1244 trk =
muon.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle)->track();
1250 ATH_MSG_VERBOSE(
"Couldn't find matching track which might have energy loss.");
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fillEnergyLossFromTrack()
Definition at line 1301 of file MuonCreatorTool.cxx.
1304 muon.setParameter(0.
f, xAOD::Muon::EnergyLoss);
1305 muon.setParameter(0.
f, xAOD::Muon::ParamEnergyLoss);
1306 muon.setParameter(0.
f, xAOD::Muon::MeasEnergyLoss);
1307 muon.setParameter(0.
f, xAOD::Muon::EnergyLossSigma);
1308 muon.setParameter(0.
f, xAOD::Muon::MeasEnergyLossSigma);
1309 muon.setParameter(0.
f, xAOD::Muon::ParamEnergyLossSigmaPlus);
1310 muon.setParameter(0.
f, xAOD::Muon::ParamEnergyLossSigmaMinus);
1312 muon.setEnergyLossType(xAOD::Muon::Parametrized);
1313 muon.setParameter(0.
f, xAOD::Muon::FSR_CandidateEnergy);
1319 unsigned int numEnergyLossPerTrack = 0;
1320 bool problem =
false;
1321 for (
const auto* tsos : *tsosVector) {
1323 if (!meot)
continue;
1326 if (!caloEnergy)
continue;
1327 ++numEnergyLossPerTrack;
1329 muon.setParameter(
static_cast<float>(caloEnergy->
deltaE()), xAOD::Muon::EnergyLoss);
1330 muon.setParameter(
static_cast<float>(caloEnergy->
deltaEParam()), xAOD::Muon::ParamEnergyLoss);
1331 muon.setParameter(
static_cast<float>(caloEnergy->
deltaEMeas()), xAOD::Muon::MeasEnergyLoss);
1332 muon.setParameter(
static_cast<float>(caloEnergy->
sigmaDeltaE()), xAOD::Muon::EnergyLossSigma);
1333 muon.setParameter(
static_cast<float>(caloEnergy->
sigmaDeltaEMeas()), xAOD::Muon::MeasEnergyLossSigma);
1337 muon.setEnergyLossType(
static_cast<xAOD::Muon::EnergyLossType
>(caloEnergy->
energyLossType()));
1338 muon.setParameter(
static_cast<float>(caloEnergy->
fsrCandidateEnergy()), xAOD::Muon::FSR_CandidateEnergy);
1340 if (numEnergyLossPerTrack > 1) {
◆ initialize()
StatusCode MuonCombined::MuonCreatorTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
static const InterfaceID& MuonCombined::IMuonCreatorTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 72 of file IMuonCreatorTool.h.
73 static const InterfaceID IID_IMuonCreatorTool(
"MuonCombined::IMuonCreatorTool", 1, 0);
74 return IID_IMuonCreatorTool;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ resolveOverlaps()
Find all InDetCandidate – Combined tag combinations Be aware that different InDetCandidateMaps could have different InDetCandidate objects but the underlying tracks are always the same
Check whether the author arises from the comissioning chain The maps are filled in dedicated algorithim. So all tags will fail / satisfy this condition
Add the track for the ambiguity reprocessing
Create firs the dummy track
Add it to the list piped to ambiguity solving
Move the candidate into the map to find the resolved tracks
In principle we can include here STACO as well but that is lower ranked as MuidSA
Definition at line 951 of file MuonCreatorTool.cxx.
956 resolvedMuonCandidates.clear();
957 resolvedInDetCandidates.clear();
959 std::unique_ptr<const TrackCollection> resolvedTracks;
960 std::vector<std::unique_ptr<Trk::Track>> garbage_collection;
966 for (
const InDetCandidateToTagMap* tag_map : tagMaps) {
967 if (!tag_map)
continue;
968 for (
const auto& comb_tag : *tag_map) {
969 const TagBase*
tag = comb_tag.second.get();
973 if (
tag->isCommissioning() != select_commissioning)
break;
975 std::find_if(inDetCandidateMap.begin(), inDetCandidateMap.end(),
976 [&comb_tag](
const InDetCandidateTags& to_test) { return (*to_test.first) == (*comb_tag.first); });
977 if (itr != inDetCandidateMap.end())
978 itr->second.emplace_back(
tag);
980 inDetCandidateMap.emplace_back(std::make_pair(comb_tag.first, std::vector<const TagBase*>{tag}));
987 if (!inDetCandidateMap.empty()) {
993 resolvedInDetCandidates.reserve(inDetCandidateMap.size());
994 caloMuons.reserve(inDetCandidateMap.size());
996 std::stable_sort(comb_tag.second.begin(), comb_tag.second.end(), SortTagBasePtr());
997 if (comb_tag.second.size() == 1 && comb_tag.second.front()->type() == xAOD::Muon::CaloTagged) {
998 caloMuons.emplace_back(std::move(comb_tag));
1000 resolvedInDetCandidates.emplace_back(std::move(comb_tag));
1002 inDetCandidateMap.clear();
1004 std::stable_sort(resolvedInDetCandidates.begin(), resolvedInDetCandidates.end(), SortInDetCandidates());
1006 ATH_MSG_DEBUG(
"Found " << resolvedInDetCandidates.size() <<
" inner detector tags in event "
1007 << ctx.eventID().event_number());
1009 std::stringstream
tags;
1010 for (
const TagBase*
tag : candidate.second)
tags <<
" " <<
tag->toString();
1011 ATH_MSG_DEBUG(
"ID candidate: " << candidate.first->toString() <<
" " <<
tags.str());
1017 to_resolve.reserve(resolvedInDetCandidates.size());
1018 garbage_collection.reserve(resolvedInDetCandidates.size());
1022 std::map<const Trk::Track*, InDetCandidateTags> trackInDetCandLinks;
1026 const TagBase* primaryTag = candidate.second[0];
1029 if (primaryTag->primaryTrack()) {
1031 to_resolve.push_back(primaryTag->primaryTrack());
1033 trackInDetCandLinks[to_resolve.back()] = std::move(candidate);
1038 std::vector<const Muon::MuonSegment*> segments = primaryTag->associatedSegments();
1039 if (!segments.empty()) {
1041 garbage_collection.emplace_back(
1042 createDummyTrack(ctx, primaryTag->associatedSegments(), *(candidate.first->indetTrackParticle().track())));
1044 to_resolve.push_back(garbage_collection.back().get());
1046 trackInDetCandLinks[garbage_collection.back().get()] = std::move(candidate);
1050 resolvedInDetCandidates.clear();
1058 if (trackCandLink == trackInDetCandLinks.end()) {
1059 ATH_MSG_WARNING(
"Unable to find internal link between MS track and ID candidate!");
1062 resolvedInDetCandidates.push_back(std::move(trackCandLink->second));
1068 << resolvedInDetCandidates.size() <<
" trackCandLinks: " << trackInDetCandLinks.size()
1069 <<
" to_resolve: " << to_resolve.size() <<
" resolvedTracks: " << resolvedTracks->size());
1071 ATH_MSG_DEBUG(
"ID candidate: " << candidate.first->toString() <<
" " << candidate.second[0]->toString());
1075 ATH_MSG_DEBUG(
"ID candidate: " << candidate.first->toString() <<
" " << candidate.second[0]->toString());
1079 resolvedInDetCandidates.insert(resolvedInDetCandidates.end(), caloMuons.begin(), caloMuons.end());
1082 std::stable_sort(resolvedInDetCandidates.begin(), resolvedInDetCandidates.end(),
1084 return a.first->indetTrackParticle().pt() > b.first->indetTrackParticle().pt();
1090 if (!muonCandidates) {
return; }
1094 for (
const MuonCandidate* candidate : *muonCandidates) {
ATH_MSG_DEBUG(
"Muon candidate: " << candidate->toString()); }
1098 if (resolvedTracks) { resolvedTracks2.assign(resolvedTracks->begin(), resolvedTracks->end()); }
1100 std::set<const MuonCandidate*> used_candidates;
1102 for (
const TagBase*
tag : indet_cand.second) {
1105 const CombinedFitTag* cmb_tag =
dynamic_cast<const CombinedFitTag*
>(
tag);
1106 used_candidates.insert(&cmb_tag->muonCandidate());
1108 const StacoTag* staco_tag =
dynamic_cast<const StacoTag*
>(
tag);
1109 used_candidates.insert(&staco_tag->muonCandidate());
1116 std::map<const Trk::Track*, const MuonCandidate*> trackMuonCandLinks;
1117 for (
const MuonCandidate* candidate : *muonCandidates) {
1118 if (candidate->isCommissioning() != select_commissioning)
continue;
1120 if (used_candidates.count(candidate)) {
1124 used_candidates.insert(candidate);
1125 resolvedTracks2.push_back(
track);
1126 trackMuonCandLinks[
track] = candidate;
1134 auto trackCandLink = trackMuonCandLinks.find(
track);
1135 if (trackCandLink != trackMuonCandLinks.end()) resolvedMuonCandidates.push_back(trackCandLink->second);
1140 ATH_MSG_DEBUG(
"Muon candidates: " << muonCandidates->size() <<
" after ambiguity solving " << resolvedMuonCandidates.size());
1141 for (
const MuonCandidate* candidate : resolvedMuonCandidates) {
◆ selectStaus()
Definition at line 923 of file MuonCreatorTool.cxx.
925 resolvedInDetCandidates.clear();
926 for (
const InDetCandidateToTagMap* tag_map : tagMaps) {
927 if (!tag_map)
continue;
928 for (
const auto& combined_tag : *tag_map) {
929 const TagBase*
tag = combined_tag.second.get();
930 const MuGirlLowBetaTag* muGirlLowBetaTag =
dynamic_cast<const MuGirlLowBetaTag*
>(
tag);
931 if (muGirlLowBetaTag) { resolvedInDetCandidates.emplace_back(combined_tag.first, std::vector<const TagBase*>{
tag}); }
937 ATH_MSG_DEBUG(
"ID candidates: " << tagMaps.size() <<
" after stau selection " << resolvedInDetCandidates.size());
945 std::stable_sort(resolvedInDetCandidates.begin(), resolvedInDetCandidates.end(),
947 return a.first->indetTrackParticle().pt() > b.first->indetTrackParticle().pt();
◆ setMuonHitCounts()
void MuonCombined::MuonCreatorTool::setMuonHitCounts |
( |
xAOD::Muon & |
muon | ) |
const |
|
private |
◆ setP4()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_ambiguityProcessor
◆ m_buildStauContainer
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_buildStauContainer {this, "BuildStauContainer", false, "flag to decide whether to build stau or not"} |
|
private |
◆ m_caloExtTool
Initial value:{this, "ParticleCaloExtensionTool",
"Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"}
Definition at line 148 of file MuonCreatorTool.h.
◆ m_caloMaterialProvider
Initial value:{this, "CaloMaterialProvider",
"Trk::TrkMaterialProviderTool/TrkMaterialProviderTool"}
Definition at line 165 of file MuonCreatorTool.h.
◆ m_caloMgrKey
◆ m_caloNoiseKey
◆ m_cellCollector
◆ m_cellContainerName
◆ m_copyCharSummaryAccessors
std::vector< std::unique_ptr<SG::AuxElement::Accessor<uint8_t> > > MuonCombined::MuonCreatorTool::m_copyCharSummaryAccessors |
|
private |
◆ m_copyCharSummaryKeys
Gaudi::Property< std::vector<std::string> > MuonCombined::MuonCreatorTool::m_copyCharSummaryKeys |
|
private |
Initial value:{this,"CopyUInt8SummaryKeys",
{"numberOfUsedHitsdEdx","numberOfIBLOverflowsdEdx","TRTdEdxUsedHits",
"expectInnermostPixelLayerHit", "expectNextToInnermostPixelLayerHit",
"numberOfPixelOutliers", "numberOfInnermostPixelLayerOutliers", "numberOfNextToInnermostPixelLayerOutliers", "numberOfSCTOutliers"},
"List of uint8_t aux element names to copy over from ID track particle summaries."}
Definition at line 200 of file MuonCreatorTool.h.
◆ m_copyFloatSummaryAccessors
std::vector< std::unique_ptr<SG::AuxElement::Accessor<float> > > MuonCombined::MuonCreatorTool::m_copyFloatSummaryAccessors |
|
private |
◆ m_copyFloatSummaryKeys
Gaudi::Property< std::vector<std::string> > MuonCombined::MuonCreatorTool::m_copyFloatSummaryKeys |
|
private |
Initial value:{this,"CopyFloatSummaryKeys",{"TRTTrackOccupancy","eProbabilityComb","eProbabilityHT","pixeldEdx","TRTdEdx","eProbabilityNN"},
"List of float aux element names to copy over from ID track particle summaries."}
Definition at line 197 of file MuonCreatorTool.h.
◆ m_detStore
◆ m_doSA
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_doSA {this, "MakeSAMuons", false} |
|
private |
◆ m_edmHelperSvc
Initial value:{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 142 of file MuonCreatorTool.h.
◆ m_evtStore
◆ m_fillEnergyLossFromTrack
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_fillEnergyLossFromTrack |
|
private |
Initial value:{this, "FillEnergyLossFromTrack", true,
"Decide whether to try to extract the calo energy loss from tracks "}
Definition at line 177 of file MuonCreatorTool.h.
◆ m_fillExtraELossInfo
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_fillExtraELossInfo |
|
private |
Initial value:{this, "FillExtraELossInfo", true,
"Can enabled this for debugging - will add extra information not for "
"production"}
Definition at line 180 of file MuonCreatorTool.h.
◆ m_idHelperSvc
◆ m_meanMDTdADCTool
Initial value:{this, "MeanMDTdADCTool",
"Rec::MuonMeanMDTdADCFillerTool/MuonMeanMDTdADCFillerTool"}
Definition at line 163 of file MuonCreatorTool.h.
◆ m_momentumBalanceTool
Initial value:{this, "MomentumBalanceTool",
"Rec::MuonMomentumBalanceSignificanceTool/"
"MuonMomentumBalanceSignificanceTool"}
Definition at line 155 of file MuonCreatorTool.h.
◆ m_muonDressingTool
◆ m_muonPrinter
◆ m_particleCreator
Initial value:{this, "TrackParticleCreator",
"Trk::TrackParticleCreatorTool/MuonCombinedTrackParticleCreator"}
Definition at line 150 of file MuonCreatorTool.h.
◆ m_printer
◆ m_printSummary
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_printSummary {this, "PrintSummary", false, "flag to print muon edm"} |
|
private |
◆ m_propagator
◆ m_requireCaloDepositForSA
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_requireCaloDepositForSA |
|
private |
Initial value:{this, "RequireCaloForSA", true,
"Flag to discard SA muons that have no calorimeter loss associated."}
Definition at line 210 of file MuonCreatorTool.h.
◆ m_requireIDTracks
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_requireIDTracks {this, "RequireIDTrack", false} |
|
private |
In case of running the muon reconstruction with LRT tracks this property removes the overlap of muons in the container in which in any case no ID track is available.
Definition at line 193 of file MuonCreatorTool.h.
◆ m_requireMSOEforSA
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_requireMSOEforSA |
|
private |
Initial value:{this, "RequireMSOEforSA", true,
"Flag to accept muons with SA track only but not MSOE. Interesting for BSM?"}
Definition at line 207 of file MuonCreatorTool.h.
◆ m_scatteringAngleTool
Initial value:{this, "ScatteringAngleTool",
"Rec::MuonScatteringAngleSignificanceTool/"
"MuonScatteringAngleSignificanceTool"}
Definition at line 158 of file MuonCreatorTool.h.
◆ m_segLowBeta
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_segLowBeta {this, "AssociateSegmentsToLowBetaMuons", false, "associate segments to MuGirlLowBeta muons"} |
|
private |
◆ m_selectorTool
◆ m_sigmaCaloNoiseCut
Gaudi::Property<float> MuonCombined::MuonCreatorTool::m_sigmaCaloNoiseCut {this, "SigmaCaloNoiseCut", 3.4} |
|
private |
◆ m_trackQuery
◆ m_trackSummaryTool
◆ m_useCaloCells
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_useCaloCells {this, "UseCaloCells", true} |
|
private |
◆ m_useUpdatedExtrapolatedTrack
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_useUpdatedExtrapolatedTrack |
|
private |
Initial value:{this, "UseUpdatedExtrapolatedTrack", true,
"configure whether to use the updated extrapolated track for a combined "
"fit or not"}
Definition at line 184 of file MuonCreatorTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
virtual double phi() const
The azimuthal angle ( ) of the particle.
double neighbourSignificance(void) const
ScatteringAngleSignificance inline accessor: maximum significance of neighbouring scatterers.
Contains information about the 'fitter' of this track.
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
Class describing a SlowMuon.
class extending the basic Trk::EnergyLoss to describe the measured or parameterised muon energy loss ...
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
@ numberOfCscUnspoiltEtaHits
number of unspoilt CSC eta measurements (all CSC phi measurements are by definition spoilt).
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
void setCaloInfo(float caloBetaAvg, float caloBetaRms, float caloBetaChi2, int caloBetaDof)
Sets.
@ scatteringNeighbourSignificance
double deltaEMeas() const
get measured energy loss
SlowMuon_v1 SlowMuon
Reference the current persistent version:
double sigmaDeltaE() const
returns the symmatric error
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
double deltaEParam() const
get parametrised energy loss
xAOD::CaloCluster * collectCells(const Trk::CaloExtension &extension, const CaloDetDescrManager *caloMgr, const CaloCellContainer &cellContainer, xAOD::CaloClusterContainer &clusterContainer) const
double curvatureSignificance(void) const
ScatteringAngleSignificance inline accessor: significance of maximum curvature discontinuity.
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
bool isValid() const
Test to see if the link can be dereferenced.
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
double sigmaDeltaEMeas() const
get measured energy loss error
virtual void setOwner(IDataHandleHolder *o)=0
void setBeta(float beta)
Sets.
@ momentumBalanceSignificance
void setMuonLink(const ElementLink< MuonContainer > &muonLink)
Sets.
represents the full description of deflection and e-loss of a track in material.
Description of a calorimeter cluster.
std::vector< std::string > tags
CaloEnergy::EnergyLossType energyLossType(void) const
Accessor methods.
void setAnn(float ann)
Sets.
virtual double eta() const
The pseudorapidity ( ) of the particle.
@ segmentDeltaEta
MuTag parameters.
double deltaE() const
returns the
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void setRpcInfo(float rpcBetaAvg, float rpcBetaRms, float rpcBetaChi2, int rpcBetaDof)
Sets.
size_t index() const
Return the index of this element within its container.
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
void collectEtCore(const xAOD::CaloCluster &cluster, std::vector< float > &et_core, const CaloNoise *caloNoise, float sigmaNoiseCut=3.4) const
void setNRpcHits(int nRpcHits)
Sets.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ NoField
Field is set to 0., 0., 0.,.
@ scatteringCurvatureSignificance
const Perigee * perigeeParameters() const
return Perigee.
Muon_v1 Muon
Reference the current persistent version:
represents the track state (measurement, material, fit parameters and quality) at a surface.
float fsrCandidateEnergy() const
FSR Candidate Energy.
A summary of the information contained by a track.
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
std::string to_string(const DetectorType &type)
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
This class describes energy loss material effects in the ATLAS tracking EDM.
double sigmaPlusDeltaEParam() const
get parametrised energy loss plus error
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
double sigmaMinusDeltaEParam() const
get parametrised energy loss minus error
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
const PtrVector & stdcont() const
Return the underlying std::vector of the container.
const EnergyLoss * energyLoss() const
returns the energy loss object.
This class provides the client interface for accessing the detector description information common to...
#define ATH_MSG_WARNING(x)
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
DataVector adapter that acts like it holds const pointers.
index_type index() const
Get the index of the element inside of its container.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ MuTag
Tracks produced by MuTag.
@ STACO
Tracks produced by STACO.
Class describing a TrackParticle.
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setMdtInfo(float mdtBetaAvg, float mdtBetaRms, float mdtBetaChi2, int mdtBetaDof)
Sets.
void setNTileCells(int nTileCells)
Sets.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ spectrometerFieldIntegral
Discriminators and further variables.
base-class for combined reconstruction output Provides access to MuonType and Author
void setBetaT(float betaT)
Sets.
@ Unknown
Track fitter not defined.