Loading [MathJax]/extensions/tex2jax.js
 |
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_addMDTExtrasMuGirlLowBeta {this, "AddMDTExtrasMuGirlLowBeta", false} |
|
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 720 of file MuonCreatorTool.cxx.
727 mu.setParameter(0.
f, xAOD::Muon::CaloMuonScore);
728 mu.setParameter(
static_cast<int>(0xFF), xAOD::Muon::CaloMuonIDTag);
732 acc_ET_Core(
mu) = 0.0;
733 acc_ElType(
mu) = -999.0;
734 acc_ElFSREnergy(
mu) = -999.0;
739 ATH_MSG_DEBUG(
"Adding Calo Muon with author " <<
tag->author() <<
", type " <<
tag->type() <<
", CaloMuonScore "
740 <<
tag->caloMuonScore());
741 mu.setParameter(
static_cast<float>(
tag->caloMuonScore()), xAOD::Muon::CaloMuonScore);
742 mu.setParameter(
static_cast<int>(
tag->caloMuonIdTag()), xAOD::Muon::CaloMuonIDTag);
747 acc_ET_Core(
mu) =
tag->etCore();
748 acc_ElType(
mu) =
tag->energyLossType();
749 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 1273 of file MuonCreatorTool.cxx.
1274 if (!
muon.inDetTrackParticleLink().isValid()) {
1275 ATH_MSG_WARNING(
"Missing ID track particle link in addEnergyLossToMuon!");
1280 const Trk::Track* trk = (*(
muon.inDetTrackParticleLink()))->track();
1290 for (;
it != itEnd; ++
it) {
1291 if ((*it)->trackParameters()) {
1297 ATH_MSG_WARNING(
"Missing ID TSOS with track parameters in addEnergyLossToMuon!");
1302 std::vector<const Trk::TrackStateOnSurface*>* caloTSOS =
m_caloMaterialProvider->getCaloTSOS(*((*it)->trackParameters()), *trk);
1313 std::vector<const Trk::TrackStateOnSurface*>::const_iterator it2 = caloTSOS->begin();
1314 std::vector<const Trk::TrackStateOnSurface*>::const_iterator itEnd2 = caloTSOS->end();
1315 for (; it2 != itEnd2; ++it2)
delete *it2;
◆ addMuGirl()
Definition at line 629 of file MuonCreatorTool.cxx.
637 if (!
muon.combinedTrackParticleLink().isValid() &&
tag->combinedTrack()) {
639 if (outputData.combinedTrackParticleContainer) {
642 tag->combinedTrackLink(), *outputData.combinedTrackParticleContainer, outputData.combinedTrackCollection);
646 ATH_MSG_DEBUG(
"Adding MuGirl: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
647 muon.setTrackParticleLink(xAOD::Muon::CombinedTrackParticle, link);
652 if (outputData.extrapolatedTrackParticleContainer &&
tag->updatedExtrapolatedTrack()) {
656 outputData.extrapolatedTrackCollection);
659 ATH_MSG_DEBUG(
"Adding MuGirl: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
660 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
665 if (outputData.xaodSegmentContainer) {
668 std::vector<ElementLink<xAOD::MuonSegmentContainer>> segments;
672 segments.push_back(link);
673 ATH_MSG_DEBUG(
"Adding MuGirl: xaod::MuonSegment px " << (*link)->px() <<
" py " << (*link)->py() <<
" pz "
678 muon.setMuonSegmentLinks(segments);
◆ addMuGirlLowBeta()
Definition at line 520 of file MuonCreatorTool.cxx.
534 if (slowMuon && stauExtras) {
555 std::vector<uint8_t>& eTechVec = eTechAcc(*slowMuon);
556 std::vector<unsigned int>& idVec = idAcc(*slowMuon);
557 std::vector<float>& mToFVec = mToFAcc(*slowMuon);
558 std::vector<float>& xVec = xAcc(*slowMuon);
559 std::vector<float>& yVec = yAcc(*slowMuon);
560 std::vector<float>& zVec = zAcc(*slowMuon);
561 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);
584 std::vector<int>& adcVec = adcAcc(*slowMuon);
585 std::vector<float>& rdriftVec = rdriftAcc(*slowMuon);
589 adcVec.push_back(extraMDTinfo.adc);
590 rdriftVec.push_back(extraMDTinfo.rdrift);
598 if (!
muon.combinedTrackParticleLink().isValid() &&
tag->combinedTrack()) {
600 if (outputData.combinedTrackParticleContainer) {
603 tag->combinedTrackLink(), *outputData.combinedTrackParticleContainer, outputData.combinedTrackCollection);
606 ATH_MSG_DEBUG(
"Adding MuGirlLowBeta: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
607 muon.setTrackParticleLink(xAOD::Muon::CombinedTrackParticle, link);
609 ATH_MSG_WARNING(
"Creating of MuGirlLowBeta TrackParticle Link failed");
613 if (outputData.xaodSegmentContainer) {
615 std::vector<ElementLink<xAOD::MuonSegmentContainer>> segments;
619 segments.push_back(link);
620 ATH_MSG_DEBUG(
"Adding MuGirlLowBeta: xaod::MuonSegment px " << (*link)->px() <<
" py " << (*link)->py() <<
" pz "
625 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 797 of file MuonCreatorTool.cxx.
799 if (!
muon.nMuonSegments()) {
800 std::vector< ElementLink<xAOD::MuonSegmentContainer>> segments;
804 segments.push_back(link);
805 ATH_MSG_DEBUG(
"Adding MuGirl: xaod::MuonSegment px " << (*link)->px() <<
" py " << (*link)->py() <<
" pz "
808 ATH_MSG_WARNING(
"Creating of Muon candidate segment failed "<<candidate.toString());
811 muon.setMuonSegmentLinks(segments);
814 if (
muon.muonSpectrometerTrackParticleLink().isValid()) {
return; }
819 muon.setTrackParticleLink(xAOD::Muon::MuonSpectrometerTrackParticle, candidate.muonSpectrometerTrackLink());
822 if (!outputData.extrapolatedTrackParticleContainer || (!candidate.extrapolatedTrack() && !meLink.
isValid())) {
return; }
824 const Trk::Track* extrapolatedTrack = candidate.extrapolatedTrack();
827 ATH_MSG_DEBUG(
"There is no extrapolated track associated to the MuonCandidate.");
832 meLink, *outputData.extrapolatedTrackParticleContainer, outputData.extrapolatedTrackCollection);
834 ATH_MSG_DEBUG(
"Adding standalone fit (refitted): pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
836 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
837 float fieldInt =
m_trackQuery->fieldIntegral(**meLink, ctx).betweenSpectrometerMeasurements();
840 acc_nUnspoiledCscHits(muon) = nunspoiled;
844 if (!extrapolatedTrack)
ATH_MSG_WARNING(
"Track doesn't have extrapolated track. Skipping");
847 "Track doesn't have perigee parameters on extrapolated "
854 if (
muon.muonType() != xAOD::Muon::MuonStandAlone) {
856 if (outputData.msOnlyExtrapolatedTrackParticleContainer) {
861 candidate.extrapolatedTrackLink(), *outputData.msOnlyExtrapolatedTrackParticleContainer,
862 outputData.msOnlyExtrapolatedTrackCollection);
865 ATH_MSG_DEBUG(
"Adding MS-only extrapolated track: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
868 muon.setTrackParticleLink(xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle, link);
870 ATH_MSG_WARNING(
"failed to create MS-only extrapolated track particle");
874 meLink, *outputData.extrapolatedTrackParticleContainer, outputData.extrapolatedTrackCollection);
876 ATH_MSG_DEBUG(
"Adding standalone fit (refitted): pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi "
878 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
879 float fieldInt =
m_trackQuery->fieldIntegral(**meLink, ctx).betweenSpectrometerMeasurements();
882 acc_nUnspoiledCscHits(muon) = nunspoiled;
891 candidate.extrapolatedTrackLink(), *outputData.msOnlyExtrapolatedTrackParticleContainer,
892 outputData.msOnlyExtrapolatedTrackCollection);
895 ATH_MSG_DEBUG(
"Adding MS-only extrapolated track to MuGirl muon: pt "
896 << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
898 muon.setTrackParticleLink(xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle, link);
900 m_trackQuery->fieldIntegral(**candidate.extrapolatedTrackLink(), ctx).betweenSpectrometerMeasurements();
905 candidate.extrapolatedTrackLink(), *outputData.extrapolatedTrackParticleContainer,
906 outputData.extrapolatedTrackCollection);
909 ATH_MSG_DEBUG(
"Adding standalone fit (un-refitted): pt " << (*link)->pt() <<
" eta " << (*link)->eta()
910 <<
" phi " << (*link)->phi());
912 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
914 m_trackQuery->fieldIntegral(**candidate.extrapolatedTrackLink(), ctx).betweenSpectrometerMeasurements();
923 outputData.extrapolatedTrackCollection);
926 ATH_MSG_DEBUG(
"Adding standalone fit: pt " << (*link)->pt() <<
" eta " << (*link)->eta() <<
" phi " << (*link)->phi());
928 muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link);
930 m_trackQuery->fieldIntegral(**candidate.extrapolatedTrackLink(), ctx).betweenSpectrometerMeasurements();
933 acc_nUnspoiledCscHits(muon) = nunspoiled;
◆ addSegmentTag()
Definition at line 684 of file MuonCreatorTool.cxx.
695 std::vector<ElementLink<xAOD::MuonSegmentContainer>> segments;
696 bool foundseg =
false;
697 for (
const auto&
info :
tag->segmentsInfo()) {
704 if (seglink.
isValid()) segments.push_back(seglink);
710 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);
476 acc_d0(muon) =
tag->combinedParameters().parameters()[
Trk::d0];
477 acc_z0(muon) =
tag->combinedParameters().parameters()[
Trk::z0];
478 acc_phi0(muon) =
tag->combinedParameters().parameters()[
Trk::phi0];
479 acc_theta(muon) =
tag->combinedParameters().parameters()[
Trk::theta];
480 acc_qOverP(muon) =
tag->combinedParameters().parameters()[
Trk::qOverP];
◆ collectCells()
Definition at line 1366 of file MuonCreatorTool.cxx.
1369 if (!
tp || !clusterContainer) {
1375 ATH_MSG_DEBUG(
" Selected track: pt " <<
tp->pt() <<
" eta " <<
tp->eta() <<
" phi " <<
tp->phi());
1383 if (!inputCaloExt) {
1386 std::unique_ptr<Trk::CaloExtension> caloExtension =
m_caloExtTool->caloExtension(ctx, *
tp);
1387 if (!caloExtension) {
1392 ATH_MSG_DEBUG(
"Received a caloExtension object without track extrapolation");
1399 ATH_MSG_DEBUG(
"Failed to create cluster from ParticleCellAssociation");
1407 muon.setClusterLink(clusterLink);
1411 caloNoise = noiseH.cptr();
1414 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();
211 if (!track)
track =
muon->primaryTrackParticle();
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);
342 addMuGirl(ctx, *muon, muGirlTag, outputData);
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);
351 addMuGirl(ctx, *muon, muGirlTag, outputData);
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 1165 of file MuonCreatorTool.cxx.
1170 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
1177 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
1180 std::unique_ptr<Trk::TrackParameters> exPars{
m_propagator->propagateParameters(
1182 if (!exPars) {
ATH_MSG_VERBOSE(
"Could not propagate Track to segment surface"); }
1185 trackStateOnSurfaces->push_back(trackState);
1192 std::unique_ptr<Trk::Track> newtrack =
1193 std::make_unique<Trk::Track>(
info, std::move(trackStateOnSurfaces), (indetTrack.
fitQuality())->uniqueClone());
◆ createMuonSegmentElementLink()
Definition at line 780 of file MuonCreatorTool.cxx.
783 if (outData.xaodSegmentContainer && outData.tagToSegmentAssocMap) {
786 unsigned int link = outData.tagToSegmentAssocMap->linkIndex(trkSeg);
787 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 754 of file MuonCreatorTool.cxx.
759 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.
235 addMuGirl(ctx, muon,
nullptr, outputData);
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 1201 of file MuonCreatorTool.cxx.
1202 if (!
muon.primaryTrackParticleLink().isValid()) {
1203 ATH_MSG_DEBUG(
"No primary track particle set, deleting muon");
1213 ATH_MSG_WARNING(
"MuonCreatorTool::dressMuon - trying to set qOverP, but value from muon.primaryTrackParticle ["
1214 <<
muon.primaryTrackParticleLink().dataID()
1215 <<
"] is zero. Setting charge=0.0. The eta/phi of the muon is: " <<
muon.eta() <<
" / " <<
muon.phi());
1216 muon.setCharge(0.0);
1229 ATH_MSG_VERBOSE(
"Got curvatureSignificance " << curvatureSignificance <<
" and neighbourSignificance "
1230 << neighbourSignificance);
1241 muon.setParameter(meanDeltaADC, xAOD::Muon::meanDeltaADCCountsMDT);
1246 acc_MuonSpectrometerPt(muon) =
muon.pt();
1247 acc_InnerDetectorPt(muon) =
muon.pt();
1258 if (
muon.trackParticle(xAOD::Muon::CombinedTrackParticle)) {
1259 trk =
muon.trackParticle(xAOD::Muon::CombinedTrackParticle)->track();
1261 if (!trk &&
muon.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle)) {
1262 trk =
muon.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle)->track();
1268 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 1319 of file MuonCreatorTool.cxx.
1322 muon.setParameter(0.
f, xAOD::Muon::EnergyLoss);
1323 muon.setParameter(0.
f, xAOD::Muon::ParamEnergyLoss);
1324 muon.setParameter(0.
f, xAOD::Muon::MeasEnergyLoss);
1325 muon.setParameter(0.
f, xAOD::Muon::EnergyLossSigma);
1326 muon.setParameter(0.
f, xAOD::Muon::MeasEnergyLossSigma);
1327 muon.setParameter(0.
f, xAOD::Muon::ParamEnergyLossSigmaPlus);
1328 muon.setParameter(0.
f, xAOD::Muon::ParamEnergyLossSigmaMinus);
1330 muon.setEnergyLossType(xAOD::Muon::Parametrized);
1331 muon.setParameter(0.
f, xAOD::Muon::FSR_CandidateEnergy);
1337 unsigned int numEnergyLossPerTrack = 0;
1338 bool problem =
false;
1339 for (
const auto* tsos : *tsosVector) {
1341 if (!meot)
continue;
1344 if (!caloEnergy)
continue;
1345 ++numEnergyLossPerTrack;
1347 muon.setParameter(
static_cast<float>(caloEnergy->
deltaE()), xAOD::Muon::EnergyLoss);
1348 muon.setParameter(
static_cast<float>(caloEnergy->
deltaEParam()), xAOD::Muon::ParamEnergyLoss);
1349 muon.setParameter(
static_cast<float>(caloEnergy->
deltaEMeas()), xAOD::Muon::MeasEnergyLoss);
1350 muon.setParameter(
static_cast<float>(caloEnergy->
sigmaDeltaE()), xAOD::Muon::EnergyLossSigma);
1351 muon.setParameter(
static_cast<float>(caloEnergy->
sigmaDeltaEMeas()), xAOD::Muon::MeasEnergyLossSigma);
1355 muon.setEnergyLossType(
static_cast<xAOD::Muon::EnergyLossType
>(caloEnergy->
energyLossType()));
1356 muon.setParameter(
static_cast<float>(caloEnergy->
fsrCandidateEnergy()), xAOD::Muon::FSR_CandidateEnergy);
1358 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 969 of file MuonCreatorTool.cxx.
974 resolvedMuonCandidates.clear();
975 resolvedInDetCandidates.clear();
977 std::unique_ptr<const TrackCollection> resolvedTracks;
978 std::vector<std::unique_ptr<Trk::Track>> garbage_collection;
984 for (
const InDetCandidateToTagMap* tag_map : tagMaps) {
985 if (!tag_map)
continue;
986 for (
const auto& comb_tag : *tag_map) {
987 const TagBase*
tag = comb_tag.second.get();
991 if (
tag->isCommissioning() != select_commissioning)
break;
993 std::find_if(inDetCandidateMap.begin(), inDetCandidateMap.end(),
994 [&comb_tag](
const InDetCandidateTags& to_test) { return (*to_test.first) == (*comb_tag.first); });
995 if (itr != inDetCandidateMap.end())
996 itr->second.emplace_back(
tag);
998 inDetCandidateMap.emplace_back(std::make_pair(comb_tag.first, std::vector<const TagBase*>{tag}));
1005 if (!inDetCandidateMap.empty()) {
1011 resolvedInDetCandidates.reserve(inDetCandidateMap.size());
1012 caloMuons.reserve(inDetCandidateMap.size());
1014 std::stable_sort(comb_tag.second.begin(), comb_tag.second.end(), SortTagBasePtr());
1015 if (comb_tag.second.size() == 1 && comb_tag.second.front()->type() == xAOD::Muon::CaloTagged) {
1016 caloMuons.emplace_back(std::move(comb_tag));
1018 resolvedInDetCandidates.emplace_back(std::move(comb_tag));
1020 inDetCandidateMap.clear();
1022 std::stable_sort(resolvedInDetCandidates.begin(), resolvedInDetCandidates.end(), SortInDetCandidates());
1024 ATH_MSG_DEBUG(
"Found " << resolvedInDetCandidates.size() <<
" inner detector tags in event "
1025 << ctx.eventID().event_number());
1027 std::stringstream
tags;
1028 for (
const TagBase*
tag : candidate.second)
tags <<
" " <<
tag->toString();
1029 ATH_MSG_DEBUG(
"ID candidate: " << candidate.first->toString() <<
" " <<
tags.str());
1035 to_resolve.reserve(resolvedInDetCandidates.size());
1036 garbage_collection.reserve(resolvedInDetCandidates.size());
1040 std::map<const Trk::Track*, InDetCandidateTags> trackInDetCandLinks;
1044 const TagBase* primaryTag = candidate.second[0];
1047 if (primaryTag->primaryTrack()) {
1049 to_resolve.push_back(primaryTag->primaryTrack());
1051 trackInDetCandLinks[to_resolve.back()] = std::move(candidate);
1056 std::vector<const Muon::MuonSegment*> segments = primaryTag->associatedSegments();
1057 if (!segments.empty()) {
1059 garbage_collection.emplace_back(
1060 createDummyTrack(ctx, primaryTag->associatedSegments(), *(candidate.first->indetTrackParticle().track())));
1062 to_resolve.push_back(garbage_collection.back().get());
1064 trackInDetCandLinks[garbage_collection.back().get()] = std::move(candidate);
1068 resolvedInDetCandidates.clear();
1074 for (
const Trk::Track* track : *resolvedTracks) {
1076 if (trackCandLink == trackInDetCandLinks.end()) {
1077 ATH_MSG_WARNING(
"Unable to find internal link between MS track and ID candidate!");
1080 resolvedInDetCandidates.push_back(std::move(trackCandLink->second));
1086 << resolvedInDetCandidates.size() <<
" trackCandLinks: " << trackInDetCandLinks.size()
1087 <<
" to_resolve: " << to_resolve.size() <<
" resolvedTracks: " << resolvedTracks->size());
1089 ATH_MSG_DEBUG(
"ID candidate: " << candidate.first->toString() <<
" " << candidate.second[0]->toString());
1093 ATH_MSG_DEBUG(
"ID candidate: " << candidate.first->toString() <<
" " << candidate.second[0]->toString());
1097 resolvedInDetCandidates.insert(resolvedInDetCandidates.end(), caloMuons.begin(), caloMuons.end());
1100 std::stable_sort(resolvedInDetCandidates.begin(), resolvedInDetCandidates.end(),
1102 return a.first->indetTrackParticle().pt() > b.first->indetTrackParticle().pt();
1108 if (!muonCandidates) {
return; }
1112 for (
const MuonCandidate* candidate : *muonCandidates) {
ATH_MSG_DEBUG(
"Muon candidate: " << candidate->toString()); }
1116 if (resolvedTracks) { resolvedTracks2.assign(resolvedTracks->begin(), resolvedTracks->end()); }
1118 std::set<const MuonCandidate*> used_candidates;
1120 for (
const TagBase*
tag : indet_cand.second) {
1123 const CombinedFitTag* cmb_tag =
dynamic_cast<const CombinedFitTag*
>(
tag);
1124 used_candidates.insert(&cmb_tag->muonCandidate());
1126 const StacoTag* staco_tag =
dynamic_cast<const StacoTag*
>(
tag);
1127 used_candidates.insert(&staco_tag->muonCandidate());
1134 std::map<const Trk::Track*, const MuonCandidate*> trackMuonCandLinks;
1135 for (
const MuonCandidate* candidate : *muonCandidates) {
1136 if (candidate->isCommissioning() != select_commissioning)
continue;
1138 if (used_candidates.count(candidate)) {
1142 used_candidates.insert(candidate);
1143 resolvedTracks2.push_back(track);
1144 trackMuonCandLinks[
track] = candidate;
1151 for (
const Trk::Track* track : *resolvedTracks) {
1152 auto trackCandLink = trackMuonCandLinks.find(track);
1153 if (trackCandLink != trackMuonCandLinks.end()) resolvedMuonCandidates.push_back(trackCandLink->second);
1158 ATH_MSG_DEBUG(
"Muon candidates: " << muonCandidates->size() <<
" after ambiguity solving " << resolvedMuonCandidates.size());
1159 for (
const MuonCandidate* candidate : resolvedMuonCandidates) {
◆ selectStaus()
Definition at line 941 of file MuonCreatorTool.cxx.
943 resolvedInDetCandidates.clear();
944 for (
const InDetCandidateToTagMap* tag_map : tagMaps) {
945 if (!tag_map)
continue;
946 for (
const auto& combined_tag : *tag_map) {
947 const TagBase*
tag = combined_tag.second.get();
948 const MuGirlLowBetaTag* muGirlLowBetaTag =
dynamic_cast<const MuGirlLowBetaTag*
>(
tag);
949 if (muGirlLowBetaTag) { resolvedInDetCandidates.emplace_back(combined_tag.first, std::vector<const TagBase*>{
tag}); }
955 ATH_MSG_DEBUG(
"ID candidates: " << tagMaps.size() <<
" after stau selection " << resolvedInDetCandidates.size());
963 std::stable_sort(resolvedInDetCandidates.begin(), resolvedInDetCandidates.end(),
965 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_addMDTExtrasMuGirlLowBeta
Gaudi::Property<bool> MuonCombined::MuonCreatorTool::m_addMDTExtrasMuGirlLowBeta {this, "AddMDTExtrasMuGirlLowBeta", false} |
|
private |
◆ 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 201 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 198 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 178 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 181 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 211 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 194 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 208 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 185 of file MuonCreatorTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
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.
@ segmentDeltaEta
MuTag parameters.
double deltaE() const
returns the
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.
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.