 |
ATLAS Offline Software
|
Tool to fit a trajectory using a set of two segments or a track and a segment as input.
More...
#include <MooTrackFitter.h>
|
| MooTrackFitter (const std::string &, const std::string &, const IInterface *) |
| default AlgTool constructor More...
|
|
| ~MooTrackFitter ()=default |
| destructor More...
|
|
StatusCode | initialize () |
| initialize method, method taken from bass-class AlgTool More...
|
|
StatusCode | finalize () |
| finialize method, method taken from bass-class AlgTool More...
|
|
std::unique_ptr< Trk::Track > | fit (const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry, const PrepVec &externalPhiHits) const |
| fit the hits of two MuPatCandidateBase More...
|
|
std::unique_ptr< Trk::Track > | refit (const EventContext &ctx, const MuPatTrack &trkCan) const |
| refit a MuPatTrack More...
|
|
std::unique_ptr< Trk::Track > | refit (const EventContext &ctx, const Trk::Track &track) const |
| refit a track More...
|
|
std::unique_ptr< Trk::Perigee > | createPerigee (const EventContext &ctx, const Trk::TrackParameters &firstPars, const Trk::MeasurementBase &firstMeas) const |
| create perigee parameter to initialize fit More...
|
|
std::unique_ptr< Trk::Track > | fit (const EventContext &ctx, const Trk::Perigee &startPars, MeasVec &hits, Trk::ParticleHypothesis partHypo, bool prefit) const |
| fit track More...
|
|
std::unique_ptr< Trk::Track > | fitWithRefit (const EventContext &ctx, const Trk::Perigee &startPars, MeasVec &hits) const |
| fit track, refit if needed More...
|
|
std::pair< std::unique_ptr< Trk::Track >, std::unique_ptr< Trk::Track > > | splitTrack (const EventContext &ctx, const Trk::Track &track) const |
| split given track if it crosses the calorimeter volume, code assumes that the track was already extrapolated to the muon entry record using the MuonTrackExtrapolationTool. More...
|
|
std::unique_ptr< Trk::Track > | fitSplitTrack (const EventContext &ctx, const Trk::TrackParameters &startPars, const std::vector< const Trk::TrackStateOnSurface * > &tsos) const |
| construct a track from a list of TSOS and a start parameters 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, V, H > &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 |
|
|
std::unique_ptr< Trk::Track > | cleanAndEvaluateTrack (const EventContext &ctx, Trk::Track &track, const std::set< Identifier > &excludedChambers) const |
| clean and evaluate the track, More...
|
|
bool | extractData (const MuPatCandidateBase &entry1, const MuPatCandidateBase &entry2, FitterData &fitterData) const |
| extract all information needed for the fit from the track More...
|
|
bool | extractData (FitterData &fitterData, bool usePreciseHits) const |
| extract all information from the HitList of a FitterData object More...
|
|
bool | addFakePhiHits (const EventContext &ctx, FitterData &fitterData, const Trk::TrackParameters &referenceParameter) const |
| check fitterData, add fake phi hits if needed. More...
|
|
bool | corruptEntry (const MuPatCandidateBase &entry) const |
| sanity check for entries More...
|
|
bool | getMaterial (const Trk::TrackParameters &pars, FitterData &fitterData) const |
| get material More...
|
|
void | createStartParameters (const EventContext &ctx, FitterData &inputData) const |
| create a perigee parameter give the input data More...
|
|
std::shared_ptr< const MuonSegment > | segmentFromEntry (const EventContext &ctx, const MuPatCandidateBase &entry) const |
| get segment from entry More...
|
|
unsigned int | hasPhiConstrain (FitterData &inputData) const |
| check whether data has sufficient phi constraints More...
|
|
unsigned int | hasPhiConstrain (Trk::Track *track) const |
| check whether data has sufficient phi constraints More...
|
|
std::unique_ptr< Trk::MeasurementBase > | createFakePhiForMeasurement (const Trk::MeasurementBase &measurement, const Amg::Vector3D *overlapPos, const Amg::Vector3D *phiPos, double error) const |
| create fake phi hit on the surface of the give measurement More...
|
|
double | qOverPFromEntries (const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry) const |
| get q/p using angle + position of the two entries More...
|
|
double | phiSeeding (const EventContext &ctx, FitterData &fitterData) const |
| calculate phi used to for seeding the fit More...
|
|
double | thetaSeeding (const MuPatCandidateBase &entry, MeasVec &etaHits) const |
| calculate theta used for seeding the fit More...
|
|
bool | cleanPhiHits (const EventContext &ctx, double momentum, FitterData &phiHits, const PrepVec &patternPhiHits) const |
| clean phi hits, returns true if anything happened during the cleaning More...
|
|
bool | validMomentum (const Trk::TrackParameters &pars) const |
| check whether mometum of start parameter is ok More...
|
|
bool | getMinMaxPhi (FitterData &fitterData) const |
| calculate the minimum and maximum phi value a track could have to pass all eta channels More...
|
|
void | removeSegmentOutliers (FitterData &fitterData) const |
|
void | cleanEntry (const MuPatCandidateBase &entry, std::set< Identifier > &removedIdentifiers) const |
|
void | cleanSegment (const MuonSegment &seg, std::set< Identifier > &removedIdentifiers) const |
|
std::pair< double, double > | getElementHalfLengths (const Identifier &id, const Trk::TrkDetElementBase *ele) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
ToolHandle< Trk::IPropagator > | m_propagator |
| propagator More...
|
|
ToolHandle< Trk::ITrackFitter > | m_trackFitter {this, "Fitter", "Trk::GlobalChi2Fitter/MCTBFitter"} |
| fitter More...
|
|
PublicToolHandle< MuPatHitTool > | m_hitHandler {this, "HitTool", "Muon::MuPatHitTool/MuPatHitTool"} |
| hit handler More...
|
|
ToolHandle< IMuonSegmentMomentumEstimator > | m_momentumEstimator |
| tool to estimate track momentum More...
|
|
Gaudi::Property< Trk::RunOutlierRemoval > | m_runOutlier {this, "RunOutlier", false, "Switch whether to run outlier logics or not"} |
|
Gaudi::Property< int > | m_matEffects {this, "MatEffects", 2, "type of material interaction in extrapolation"} |
|
Trk::ParticleHypothesis | m_ParticleHypothesis |
| nomen est omen More...
|
|
Trk::TrackInfo::TrackPatternRecoInfo | m_patRecInfo {Trk::TrackInfo::Moore} |
|
Trk::MagneticFieldProperties | m_magFieldProperties {Trk::FullField} |
| magnetic field properties More...
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
ServiceHandle< IMuonEDMHelperSvc > | m_edmHelperSvc |
| multi purpose helper tool More...
|
|
PublicToolHandle< MuonEDMPrinterTool > | m_printer |
| tool to print out EDM objects More...
|
|
ToolHandle< IMuonTrackToSegmentTool > | m_trackToSegmentTool |
| helper tool to convert tracks into segments More...
|
|
ToolHandle< IMuonHitSelector > | m_phiHitSelector |
| tool to clean phi hits More...
|
|
ToolHandle< IMuonTrackCleaner > | m_cleaner {this, "TrackCleaner", "Muon::MuonTrackCleaner/MuonTrackCleaner"} |
|
ToolHandle< IMuonSegmentInOverlapResolvingTool > | m_overlapResolver |
|
ToolHandle< Trk::ITrackSummaryHelperTool > | m_trackSummaryTool |
|
Gaudi::Property< bool > | m_slFit {this, "SLFit", true, "Perform sl fit"} |
|
Gaudi::Property< bool > | m_slProp {this, "SLProp", false, "Enable straight line propagation"} |
|
Gaudi::Property< bool > | m_seedWithSegmentTheta {this, "SeedWithSegmentTheta", true, "Seed with theta connecting first + last eta hit"} |
|
Gaudi::Property< bool > | m_seedWithAvePhi {this, "SeedWithAvePhi", true, "Seed with average phi of all phi hits"} |
|
Gaudi::Property< bool > | m_seedPhiWithEtaHits {this, "SeedPhiWithEtaHits", false, "Seed phi from positions first last eta hit"} |
|
Gaudi::Property< bool > | m_usePreciseHits {this, "UsePreciseHits", false, "Use actual measurement error"} |
|
Gaudi::Property< bool > | m_usePrefit {this, "UsePrefit", true, "Use prefit"} |
|
Gaudi::Property< bool > | m_allowFirstFit {this, "AllowFirstFitResult", false, "Return the result of the prefit is final fit fails"} |
|
Gaudi::Property< double > | m_pThreshold |
|
Gaudi::Property< bool > | m_cosmics {this, "Cosmics", false, "Special treatment for cosmics"} |
|
Gaudi::Property< bool > | m_cleanPhiHits {this, "CleanPhiHits", true, "Special flag to switch off phi hit cleaning"} |
|
Gaudi::Property< unsigned int > | m_phiHitsMax |
|
Gaudi::Property< bool > | m_seedAtStartOfTrack {this, "SeedAtStartOfTrack", true, "Provide seed parameters at the start of the track"} |
|
Gaudi::Property< bool > | m_preciseFirstStation |
|
Gaudi::Property< double > | m_openingAngleCut |
|
Gaudi::Property< double > | m_preCleanChi2Cut |
|
Gaudi::Property< double > | m_chi2Cut {this, "ReducedChi2Cut", 100., "minimum chi2/ndof for a track to be accepted"} |
|
std::atomic_uint | m_nfits {0} |
|
std::atomic_uint | m_nfailedExtractInital {0} |
|
std::atomic_uint | m_nfailedMinMaxPhi {0} |
|
std::atomic_uint | m_nfailedParsInital {0} |
|
std::atomic_uint | m_nfailedExtractCleaning {0} |
|
std::atomic_uint | m_nfailedFakeInitial {0} |
|
std::atomic_uint | m_nfailedTubeFit {0} |
|
std::atomic_uint | m_noPerigee {0} |
|
std::atomic_uint | m_nlowMomentum {0} |
|
std::atomic_uint | m_nfailedExtractPrecise {0} |
|
std::atomic_uint | m_nfailedFakePrecise {0} |
|
std::atomic_uint | m_nfailedFitPrecise {0} |
|
std::atomic_uint | m_nsuccess {0} |
|
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 |
|
Tool to fit a trajectory using a set of two segments or a track and a segment as input.
The tool can be configured to fit either a straight line or all 5 parameters of the track.
For more details look at the mainpage of this package.
Definition at line 59 of file MooTrackFitter.h.
◆ MaterialLayers
◆ MeasCit
◆ MeasIt
◆ MeasVec
◆ PrepCit
◆ PrepIt
◆ PrepVec
◆ SLStationMap
◆ SmallLargeChambers
◆ StoreGateSvc_t
◆ MooTrackFitter()
Muon::MooTrackFitter::MooTrackFitter |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
default AlgTool constructor
Definition at line 53 of file MooTrackFitter.cxx.
54 declareInterface<MooTrackFitter>(
this);
◆ ~MooTrackFitter()
Muon::MooTrackFitter::~MooTrackFitter |
( |
| ) |
|
|
default |
◆ addFakePhiHits()
check fitterData, add fake phi hits if needed.
If provided the reference parameter will be used to calcualte the fake hits
A small hack putting James last onto the actual stage and not let him fall into the orchestra pit...
Definition at line 513 of file MooTrackFitter.cxx.
519 if (nphiConstraints >= 2) {
520 if (fitterData.firstEntry->stations().size() == 1 && fitterData.firstEntry->containsStation(
StIndex::EI) &&
521 (fitterData.firstEntry->phiHits().empty() || (fitterData.firstEntry->containsChamber(
ChIndex::CSS) ||
522 fitterData.firstEntry->containsChamber(
ChIndex::CSL)))) {
523 ATH_MSG_VERBOSE(
" Special treatment of the forward region: adding fake at ip ");
530 std::unique_ptr<Amg::Vector3D> overlapPos;
531 std::unique_ptr<const Amg::Vector3D> phiPos;
532 if (fitterData.numberOfSLOverlaps() > 0 || (fitterData.numberOfSmallChambers() > 0 && fitterData.numberOfLargeChambers() > 0)) {
536 overlapPos = std::make_unique<Amg::Vector3D>(1., 1., 1.);
537 double phi = fitterData.avePhi;
538 double theta = fitterData.secondEntry->etaHits().front()->globalPosition().theta();
540 if (fitterData.firstEntry->hasSLOverlap()) {
541 theta = fitterData.firstEntry->entryPars().momentum().theta();
542 phi = fitterData.firstEntry->entryPars().momentum().phi();
544 theta = fitterData.secondEntry->entryPars().momentum().theta();
545 phi = fitterData.secondEntry->entryPars().momentum().phi();
550 if (fitterData.startPars) {
551 phiPos = std::make_unique<Amg::Vector3D>(fitterData.startPars->momentum());
553 phiPos = std::make_unique<Amg::Vector3D>(*overlapPos);
557 if (fitterData.numberOfSLOverlaps() > 0) {
558 if (fitterData.stations.size() == 1)
561 msg(
MSG::VERBOSE) <<
" multi station fit with SL overlap, using overlapPos " << *overlapPos <<
endmsg;
562 }
else if (fitterData.numberOfSmallChambers() > 0 && fitterData.numberOfLargeChambers() > 0) {
563 msg(
MSG::VERBOSE) <<
" multi station fit, SL overlap not in same station, using overlapPos " << *overlapPos <<
endmsg;
569 if (fitterData.phiHits.empty()) {
570 const MuPatSegment* segInfo1 =
dynamic_cast<const MuPatSegment*
>(fitterData.firstEntry);
571 const MuPatSegment* segInfo2 =
dynamic_cast<const MuPatSegment*
>(fitterData.secondEntry);
572 if (segInfo1 && segInfo2 && fitterData.stations.size() == 1 && fitterData.numberOfSLOverlaps() == 1) {
577 ATH_MSG_VERBOSE(
" Special treatment for tracks with one station, a SL overlap and no phi hits ");
579 IMuonSegmentInOverlapResolvingTool::SegmentMatchResult
result =
582 if (!
result.goodMatch()) {
587 double locx1 =
result.segmentResult1.positionInTube1;
589 segInfo1->segment->localParameters().contains(
Trk::locY) ? segInfo1->segment->localParameters()[
Trk::locY] : 0.;
590 Trk::AtaPlane segPars1(locx1, locy1,
result.phiResult.segmentDirection1.phi(),
result.phiResult.segmentDirection1.theta(),
591 0., segInfo1->segment->associatedSurface());
593 std::unique_ptr<Trk::TrackParameters> exPars1 =
m_propagator->propagate(ctx,
594 segPars1, fitterData.measurements.front()->associatedSurface(),
Trk::anyDirection,
598 std::unique_ptr<Trk::MeasurementBase> fake =
601 fitterData.phiHits.push_back(fake.get());
602 fitterData.measurements.insert(fitterData.measurements.begin(), fake.get());
603 fitterData.firstLastMeasurements.insert(fitterData.firstLastMeasurements.begin(), fake.get());
604 fitterData.garbage.push_back(std::move(fake));
610 double locx2 =
result.segmentResult2.positionInTube1;
612 segInfo2->segment->localParameters().contains(
Trk::locY) ? segInfo2->segment->localParameters()[
Trk::locY] : 0.;
613 Trk::AtaPlane segPars2(locx2, locy2,
result.phiResult.segmentDirection2.phi(),
result.phiResult.segmentDirection2.theta(),
614 0., segInfo2->segment->associatedSurface());
617 segPars2, fitterData.measurements.back()->associatedSurface(),
Trk::anyDirection,
621 std::unique_ptr<Trk::MeasurementBase> fake =
624 fitterData.phiHits.push_back(fake.get());
625 fitterData.measurements.push_back(fake.get());
626 fitterData.firstLastMeasurements.push_back(fake.get());
627 fitterData.garbage.push_back(std::move(fake));
633 }
else if (nphiConstraints == 0 || (fitterData.stations.size() == 1) ||
634 (nphiConstraints == 1 && fitterData.numberOfSLOverlaps() == 0 && fitterData.numberOfSmallChambers() > 0 &&
635 fitterData.numberOfLargeChambers() > 0)) {
638 overlapPos.get(), phiPos.get(), 100.);
640 fitterData.phiHits.push_back(fake.get());
641 fitterData.measurements.insert(fitterData.measurements.begin(), fake.get());
642 fitterData.firstLastMeasurements.insert(fitterData.firstLastMeasurements.begin(), fake.get());
643 fitterData.garbage.push_back(std::move(fake));
649 overlapPos.get(), phiPos.get(), 100.);
651 fitterData.phiHits.push_back(fake.get());
652 fitterData.measurements.push_back(fake.get());
653 fitterData.firstLastMeasurements.push_back(fake.get());
654 fitterData.garbage.push_back(std::move(fake));
658 }
else if (fitterData.numberOfSLOverlaps() == 1) {
660 ATH_MSG_VERBOSE(
" Special treatment for tracks with one SL overlap and no phi hits ");
662 StIndex overlapStation = StIndex::StUnknown;
665 for (;
it != it_end; ++
it) {
666 if (
it->second.first &&
it->second.second) {
667 overlapStation =
it->first;
671 if (overlapStation == StIndex::StUnknown) {
678 ATH_MSG_WARNING(
" unexpected condition, first measurement has no identifier ");
682 if (overlapStation == firstSt) {
687 overlapPos.get(), phiPos.get(), 100.);
689 fitterData.phiHits.push_back(fake.get());
690 fitterData.measurements.push_back(fake.get());
691 fitterData.firstLastMeasurements.push_back(fake.get());
692 fitterData.garbage.push_back(std::move(fake));
698 overlapPos.get(), phiPos.get(), 100.);
700 fitterData.phiHits.push_back(fake.get());
701 fitterData.measurements.insert(fitterData.measurements.begin(), fake.get());
702 fitterData.firstLastMeasurements.insert(fitterData.firstLastMeasurements.begin(), fake.get());
703 fitterData.garbage.push_back(std::move(fake));
713 double distFirstEtaPhi =
714 (fitterData.measurements.front()->globalPosition() - fitterData.phiHits.front()->globalPosition()).
mag();
715 double distLastEtaPhi = (fitterData.measurements.back()->globalPosition() - fitterData.phiHits.back()->globalPosition()).
mag();
719 phiPos = std::make_unique<Amg::Vector3D>(fitterData.phiHits.back()->globalPosition());
720 ATH_MSG_VERBOSE(
" using pointing constraint to calculate fake phi hit ");
724 const Trk::Surface *firstmdtsurf =
nullptr, *lastmdtsurf =
nullptr;
726 int indexfirst = 0, indexlast = (
int)fitterData.measurements.size();
728 for (; hitit != fitterData.hitList.end(); hitit++) {
729 if ((**hitit).info().measuresPhi)
break;
731 firstmdtsurf = &(**hitit).measurement().associatedSurface();
736 hitit = fitterData.hitList.end();
738 for (; hitit != fitterData.hitList.begin(); hitit--) {
739 if ((**hitit).info().measuresPhi)
break;
741 lastmdtsurf = &(**hitit).measurement().associatedSurface();
742 lastmdtpar = &(**hitit).parameters();
750 bool phifromextrapolation =
false;
751 if (!fitterData.secondEntry->phiHits().empty() || !fitterData.firstEntry->phiHits().empty()) phifromextrapolation =
true;
753 const Trk::Surface *firstphisurf =
nullptr, *lastphisurf =
nullptr;
755 if (!fitterData.phiHits.empty()) {
756 firstphisurf = &fitterData.phiHits.front()->associatedSurface();
757 lastphisurf = &fitterData.phiHits.back()->associatedSurface();
758 firstphinormal = firstphisurf->
normal();
759 lastphinormal = lastphisurf->normal();
760 if (firstphinormal.dot(startpar.momentum()) < 0) firstphinormal = -firstphinormal;
761 if (lastphinormal.dot(startpar.momentum()) < 0) lastphinormal = -lastphinormal;
763 if (lastmdtsurf && (!firstphisurf || (lastmdtsurf->center() - lastphisurf->center()).dot(lastphinormal) > 1000)) {
764 ATH_MSG_VERBOSE(
" Adding fake at last hit: dist first phi/first eta " << distFirstEtaPhi <<
" dist last phi/last eta "
766 std::unique_ptr<Trk::MeasurementBase> fake{};
767 if (fitterData.secondEntry->hasSLOverlap() || phifromextrapolation) {
769 std::unique_ptr<Trk::TrackParameters> mdtpar{};
770 if (fitterData.secondEntry->hasSLOverlap()){
773 mdtpar =
m_propagator->propagateParameters(ctx, startpar, *lastmdtsurf,
779 fake = std::make_unique<Trk::PseudoMeasurementOnTrack>(
782 mdtpar->associatedSurface());
789 fitterData.phiHits.push_back(fake.get());
790 fitterData.measurements.insert(fitterData.measurements.begin() + indexlast, fake.get());
791 fitterData.firstLastMeasurements.push_back(fake.get());
792 fitterData.garbage.push_back(std::move(fake));
796 if (firstmdtsurf && (!firstphisurf || (firstmdtsurf->
center() - firstphisurf->
center()).dot(firstphinormal) < -1000)) {
797 ATH_MSG_VERBOSE(
" Adding fake at first hit: dist first phi/first eta " << distFirstEtaPhi <<
" dist last phi/last eta "
799 std::unique_ptr<Trk::MeasurementBase> fake{};
800 if (phifromextrapolation) {
802 auto mdtpar =
m_propagator->propagateParameters(ctx, startpar,
807 fake = std::make_unique<Trk::PseudoMeasurementOnTrack>(
810 mdtpar->associatedSurface());
816 fitterData.phiHits.insert(fitterData.phiHits.begin(), fake.get());
817 fitterData.measurements.insert(fitterData.measurements.begin() + indexfirst, fake.get());
818 fitterData.firstLastMeasurements.insert(fitterData.firstLastMeasurements.begin(), fake.get());
819 fitterData.garbage.push_back(std::move(fake));
◆ cleanAndEvaluateTrack()
clean and evaluate the track,
- Returns
- 0 if Track does not forfill criteria, a unique_ptr otherwise (could be to a track which is the same as the current)
Definition at line 1840 of file MooTrackFitter.cxx.
1849 std::unique_ptr<Trk::Track> cleanTrack;
1850 if (excludedChambers.empty())
1853 ATH_MSG_DEBUG(
" Cleaning with exclusion list " << excludedChambers.size());
1857 ATH_MSG_DEBUG(
" Cleaner returned a zero pointer, reject track ");
◆ cleanEntry()
Definition at line 1880 of file MooTrackFitter.cxx.
1882 const MuPatSegment* segEntry =
dynamic_cast<const MuPatSegment*
>(&
entry);
1883 if (segEntry && segEntry->segment) {
1884 if (
entry.hasSmallChamber() &&
entry.hasLargeChamber()) {
1885 ATH_MSG_DEBUG(
" Segment with SL overlap, cannot perform cleaning ");
◆ cleanPhiHits()
bool Muon::MooTrackFitter::cleanPhiHits |
( |
const EventContext & |
ctx, |
|
|
double |
momentum, |
|
|
FitterData & |
phiHits, |
|
|
const PrepVec & |
patternPhiHits |
|
) |
| const |
|
private |
clean phi hits, returns true if anything happened during the cleaning
do not add CSCs as they really should be on a segment
Definition at line 1687 of file MooTrackFitter.cxx.
1691 MeasVec& phiHits = fitterData.phiHits;
1694 std::vector<const Trk::RIO_OnTrack*> rots;
1695 std::vector<std::unique_ptr<const Trk::RIO_OnTrack>> rotsNSW;
1696 std::set<Identifier>
ids;
1697 std::set<MuonStationIndex::StIndex> stations;
1698 rots.reserve(phiHits.size() + 5);
1707 rots.push_back(rot);
1711 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(hit);
1713 for (
const MuonClusterOnTrack* mit : crot->containedROTs()) {
1714 rots.push_back(mit);
1715 ids.insert(mit->identify());
1717 stations.insert(stIndex);
1720 ATH_MSG_WARNING(
" phi hits should be ROTs or competing ROTs! Dropping hit ");
1724 if (rots.empty())
return false;
1727 ATH_MSG_DEBUG(
" too many phi hits, not running cleaning " << rots.size());
1738 std::vector<const Trk::PrepRawData*> roadPhiHits;
1740 return !(ids.count(prd->identify()) ||
1742 m_idHelperSvc->isCsc(prd->identify()) || m_idHelperSvc->issTgc(prd->identify()));
1747 ATH_MSG_VERBOSE(
" too many pattern phi hits, not adding any " << roadPhiHits.size());
1748 roadPhiHits.clear();
1751 if (!roadPhiHits.empty()) {
1753 std::vector<const Trk::PrepRawData*>::const_iterator pit = roadPhiHits.begin();
1754 std::vector<const Trk::PrepRawData*>::const_iterator pit_end = roadPhiHits.end();
1755 for (; pit != pit_end; ++pit) {
1757 if (pit + 1 != pit_end)
1765 std::vector<std::unique_ptr<const Trk::MeasurementBase>> newMeasurements{
m_phiHitSelector->select_rio(
momentum, rots, roadPhiHits)};
1767 newMeasurements.insert(newMeasurements.end(),
1768 std::make_move_iterator(rotsNSW.begin()),
1769 std::make_move_iterator(rotsNSW.end()));
1773 if (newMeasurements.empty()) {
1774 ATH_MSG_DEBUG(
" empty list of phi hits return from phi hit selector: input size " << phiHits.size());
1779 DistanceAlongParameters distAlongPars;
1780 constexpr
double maxDistCut = 800.;
1781 std::vector<const Trk::MeasurementBase*> measurementsToBeAdded{};
1782 measurementsToBeAdded.reserve(newMeasurements.size());
1783 for (std::unique_ptr<const Trk::MeasurementBase>& meas : newMeasurements) {
1785 if (!
id.is_valid()) {
1792 if (fitterData.hitList.empty()) {
1799 double dist = distAlongPars(fitterData.hitList.front()->parameters(), *meas);
1800 if (dist < -maxDistCut) {
1801 ATH_MSG_VERBOSE(
" discarded phi hit, distance to first hit too large " << dist);
1807 double distBack = distAlongPars(fitterData.hitList.back()->parameters(), *meas);
1808 if (distBack > maxDistCut) {
1809 ATH_MSG_VERBOSE(
" discarded phi hit, distance to last hit too large " << distBack);
1813 ATH_MSG_VERBOSE(
" new phi hit, distance from start pars " << dist <<
" distance to last pars " << distBack);
1815 measurementsToBeAdded.push_back(meas.get());
1816 fitterData.garbage.push_back(std::move(meas));
1828 if (!measurementsToBeAdded.empty()) {
1831 m_hitHandler->create(ctx, fitterData.firstEntry->entryPars(), measurementsToBeAdded, newHitList);
1832 fitterData.hitList =
m_hitHandler->merge(newHitList, fitterData.hitList);
◆ cleanSegment()
Definition at line 1892 of file MooTrackFitter.cxx.
1901 float tubeRadius = 14.6;
1905 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(meas);
1907 if (!mdt) {
continue; }
1910 detEl = mdt->prepRawData()->detectorElement();
1922 Amg::Vector3D LocVec2D = gToStation * mdt->prepRawData()->globalPosition();
1925 double r = mdt->localParameters()[
Trk::locR];
1937 dcs.push_back(dcOnTrack);
1941 double angleYZ = seg.localDirection().angleYZ();
1942 const Amg::Vector3D lpos = gToStation * seg.globalPosition();
1945 <<
" local parameters " << lpos.y() <<
" " << lpos.z() <<
" phi " << angleYZ <<
" with "
1946 << dcs.size() <<
" hits ");
1954 segment.hitsOnTrack(dcs.size());
1956 <<
" " <<
segment.line().y0() <<
" phi " <<
segment.line().phi());
1958 bool hasDroppedHit =
false;
1959 unsigned int dropDepth = 0;
1961 bool success =
finder.dropHits(
segment, hasDroppedHit, dropDepth);
1967 if (dcs.size() ==
segment.ndof() + 2) {
1969 }
else if (dcs.size() !=
segment.ndof() + 3) {
1970 ATH_MSG_DEBUG(
" more than one hit removed, keeping old segment ");
1979 removedIdentifiers.insert(dcit.rot()->identify());
◆ corruptEntry()
◆ createFakePhiForMeasurement()
create fake phi hit on the surface of the give measurement
Definition at line 826 of file MooTrackFitter.cxx.
832 ATH_MSG_WARNING(
" Cannot create fake phi hit from a measurement without Identifier ");
845 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(&meas);
847 if (!crot || crot->containedROTs().empty())
return nullptr;
848 rot = &crot->rioOnTrack(0);
862 std::optional<Amg::Vector2D> lpos = std::nullopt;
877 <<
" theta " <<
dir.theta() <<
" seed: phi " << phiPos->phi() <<
" theta "
881 lpos = meas.associatedSurface().globalToLocal(
intersect.position, 3000.);
886 lpos = meas.associatedSurface().globalToLocal(detEl->
center(), 3000.);
888 lpos = meas.associatedSurface().globalToLocal(meas.associatedSurface().center(), 3000.);
899 double halfLength = ly < 0 ? halfLengthL : halfLengthR;
900 bool shiftedPos =
false;
902 if (std::abs(ly) > halfLength) {
904 ly = ly < 0 ? -halfLength : halfLength;
905 ATH_MSG_DEBUG(
" extrapolated position outside detector, shifting it back: " << lyold <<
" size " << halfLength <<
" new pos "
907 if (phiPos && std::abs(lyold) - halfLength > 1000.) {
923 std::optional<Amg::Vector2D> loverlapPos = surf.
globalToLocal(*overlapPos, 3000.);
927 double lyfake = halfLength - 50.;
928 if (ly < 0.) lyfake *= -1.;
930 errPos = FiftyOverSqrt12;
934 const Amg::Vector3D fakePos_plus = meas.associatedSurface().localToGlobal(LocVec2D_plus);
936 const Amg::Vector3D fakePos_min = meas.associatedSurface().localToGlobal(LocVec2D_min);
938 double phi_min = fakePos_min.phi();
939 double phi_plus = fakePos_plus.phi();
940 double phi_overlap = phiPos->phi();
941 ATH_MSG_VERBOSE(
" fake lpos " << lyfake <<
" ch half length " << halfLength <<
" phi+ " << phi_plus <<
" phi- " << phi_min
942 <<
" phi overlap " << phi_overlap <<
" err " << errPos);
947 halfLength = ly < 0 ? halfLengthL : halfLengthR;
948 if (std::abs(ly) > halfLength) { ly = ly < 0 ? -halfLength : halfLength; }
949 ATH_MSG_VERBOSE(
" fake from overlap: lpos " << ly <<
" ch half length " << halfLength <<
" overlapPos " << *overlapPos);
956 cov(0, 0) = errPos * errPos;
957 std::unique_ptr<Trk::PseudoMeasurementOnTrack> fake = std::make_unique<Trk::PseudoMeasurementOnTrack>(std::move(locPars),
958 std::move(
cov), surf);
962 const Amg::Vector3D fakePos = meas.associatedSurface().localToGlobal(LocVec2D);
965 <<
" errpr " << errPos <<
" phi " << fakePos.phi() <<
endmsg;
967 if (!shiftedPos && !overlapPos && phiPos && std::abs(phiPos->phi() - fakePos.phi()) > 0.01) {
970 ATH_MSG_WARNING(
" Problem calculating fake from IP seed: phi fake " << fakePos.phi() <<
" IP phi " << phiPos->phi()
971 <<
" local meas pos " << locMeas);
◆ createPerigee()
create perigee parameter to initialize fit
Definition at line 1544 of file MooTrackFitter.cxx.
1550 std::unique_ptr<Trk::TrackParameters> garbage;
1560 exPars = garbage.get();
1581 std::unique_ptr<Trk::Perigee> perigee = std::make_unique<Trk::Perigee>(0, 0, phi, theta, qoverp, persurf);
1583 ATH_MSG_DEBUG( std::setprecision(5) <<
" creating perigee: phi " << phi <<
" theta " << theta <<
" q*mom "
1584 << perigee->charge() * perigee->momentum().mag() <<
" r " << perigee->position().perp() <<
" z "
1585 << perigee->position().z() <<
" input q*mom " << firstPars.
charge() * firstPars.
momentum().mag());
◆ createStartParameters()
create a perigee parameter give the input data
Definition at line 1439 of file MooTrackFitter.cxx.
1442 std::unique_ptr<Trk::Perigee> startPars{
nullptr};
1443 const MuPatCandidateBase *entry1 = fitterData.firstEntry, *entry2 = fitterData.secondEntry;
1445 const MuPatTrack* trkEntry1 =
dynamic_cast<const MuPatTrack*
>(entry1);
1446 const MuPatTrack* trkEntry2 =
dynamic_cast<const MuPatTrack*
>(entry2);
1447 const MuPatSegment* seg1 =
dynamic_cast<const MuPatSegment*
>(entry1);
1448 const MuPatSegment* seg2 =
dynamic_cast<const MuPatSegment*
>(entry2);
1453 dir1 = seg1->segment->globalDirection();
1454 point1 = seg1->segment->globalPosition();
1456 if (trkEntry1->track().perigeeParameters()) {
1457 dir1 = trkEntry1->track().perigeeParameters()->momentum().unit();
1458 point1 = trkEntry1->track().perigeeParameters()->position();
1464 dir2 = seg2->segment->globalDirection();
1465 point2 = seg2->segment->globalPosition();
1467 if (trkEntry2->track().perigeeParameters()) {
1468 dir2 = trkEntry2->track().perigeeParameters()->momentum().unit();
1469 point2 = trkEntry2->track().perigeeParameters()->position();
1474 if (dir1.dot(point2 - point1) < 0) {
1477 entry1 = fitterData.secondEntry;
1478 entry2 = fitterData.firstEntry;
1479 trkEntry1 =
dynamic_cast<const MuPatTrack*
>(entry1);
1480 trkEntry2 =
dynamic_cast<const MuPatTrack*
>(entry2);
1481 seg1 =
dynamic_cast<const MuPatSegment*
>(entry1);
1482 seg2 =
dynamic_cast<const MuPatSegment*
>(entry2);
1485 const MuPatCandidateBase* bestentry = entry1;
1486 double dist1 = -1, dist2 = -1;
1487 MuPatHitPtr firstphi1{
nullptr}, lastphi1{
nullptr}, firstphi2{
nullptr}, lastphi2{
nullptr};
1489 for (
const MuPatHitPtr& hit : entry1->hitList()) {
1491 if (!firstphi1) firstphi1 = hit;
1495 for (
const MuPatHitPtr& hit : entry2->hitList()) {
1497 if (!firstphi2) firstphi2 = hit;
1501 if (firstphi1) dist1 = std::abs((firstphi1->measurement().globalPosition() - lastphi1->measurement().globalPosition()).dot(dir1));
1502 if (firstphi2) dist2 = std::abs((firstphi2->measurement().globalPosition() - lastphi2->measurement().globalPosition()).dot(dir2));
1503 if (dist2 > dist1) { bestentry = entry2; }
1504 const MuPatTrack* besttrkEntry =
dynamic_cast<const MuPatTrack*
>(bestentry);
1505 const MuPatSegment* bestseg =
dynamic_cast<const MuPatSegment*
>(bestentry);
1509 parit != besttrkEntry->track().trackParameters()->end(); ++parit) {
1526 double phi = bestseg->segment->globalDirection().phi();
1527 if ((fitterData.firstEntry->containsChamber(
ChIndex::CSS) ||
1528 fitterData.firstEntry->containsChamber(
ChIndex::CSL)) &&
1529 fitterData.secondEntry->hasSLOverlap())
1530 phi = (fitterData.hitList.back()->parameters().position() - bestseg->segment->globalPosition()).
phi();
1532 double theta = bestseg->segment->globalDirection().theta();
1534 startPars = std::make_unique<Trk::Perigee>(0, 0, phi, theta,
qOverP, persurf);
1541 fitterData.startPars = std::move(startPars);
◆ 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]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extractData() [1/2]
extract all information needed for the fit from the track
Definition at line 327 of file MooTrackFitter.cxx.
331 ATH_MSG_DEBUG(
" corrupt first entry, cannot perform fit: eta hits " << entry1.etaHits().size());
335 ATH_MSG_DEBUG(
" corrupt second entry, cannot perform fit: eta hits " << entry2.etaHits().size());
339 bool isEndcap = entry1.hasEndcap() || entry2.hasEndcap();
343 SortMeasurementsByPosition sortMeasurements(isEndcap);
345 bool entry1IsFirst = sortMeasurements(entry1.hits().front(), entry2.hits().front());
347 DistanceToPars distToPars(&entry1.entryPars());
348 double distToSecond = distToPars(entry2.entryPars().position());
349 if (distToSecond < 0) entry1IsFirst =
false;
351 <<
" pos " <<
Amg::toString(entry1.entryPars().position()) <<
" second "
352 <<
Amg::toString(entry2.entryPars().position()) <<
" dist " << distToSecond);
354 const MuPatCandidateBase& firstEntry = entry1IsFirst ? entry1 : entry2;
355 const MuPatCandidateBase& secondEntry = entry1IsFirst ? entry2 : entry1;
357 fitterData.firstEntry = &firstEntry;
358 fitterData.secondEntry = &secondEntry;
361 if (
dynamic_cast<const MuPatTrack*
>(fitterData.firstEntry)) {
362 fitterData.firstIsTrack =
true;
363 fitterData.firstHasMomentum = fitterData.firstEntry->hasMomentum();
365 if (
dynamic_cast<const MuPatTrack*
>(fitterData.secondEntry)) {
366 fitterData.secondIsTrack =
true;
367 fitterData.secondHasMomentum = fitterData.secondEntry->hasMomentum();
370 fitterData.hitList =
m_hitHandler->merge(entry1.hitList(), entry2.hitList());
372 bool usePrecise =
m_usePreciseHits || (fitterData.firstHasMomentum || fitterData.secondHasMomentum);
375 if (fitterData.firstIsTrack)
379 msg(
MSG::DEBUG) << fitterData.firstEntry->etaHits().size() << std::endl
380 <<
m_hitHandler->print(fitterData.firstEntry->hitList()) << std::endl
381 <<
" second entry: ";
382 if (fitterData.secondIsTrack)
386 msg(
MSG::DEBUG) << fitterData.secondEntry->etaHits().size() << std::endl
◆ extractData() [2/2]
extract all information from the HitList of a FitterData object
Definition at line 400 of file MooTrackFitter.cxx.
401 ATH_MSG_DEBUG(
" extracting hits from hit list, using " << (usePreciseHits ?
"precise measurements" :
"broad measurements"));
405 unsigned int nhits = hitList.size();
407 fitterData.measurements.clear();
408 fitterData.firstLastMeasurements.clear();
409 fitterData.etaHits.clear();
410 fitterData.phiHits.clear();
411 fitterData.measurements.reserve(nhits);
412 fitterData.firstLastMeasurements.reserve(nhits);
416 StIndex firstStation = StIndex::StUnknown;
417 ChIndex currentChIndex = ChIndex::ChUnknown;
418 bool currentMeasPhi =
false;
431 <<
") is not a muon Identifier, continuing");
437 fitterData.stations.insert(stIndex);
439 if (firstStation == StIndex::StUnknown) {
440 firstStation = stIndex;
443 const bool measuresPhi = hit->info().measuresPhi;
453 fitterData.hasEndcap |= isEndcap;
454 fitterData.hasBarrel |= !isEndcap;
456 const Trk::MeasurementBase* meas = usePreciseHits ? &hit->preciseMeasurement() : &hit->broadMeasurement();
462 fitterData.phiHits.push_back(meas);
464 fitterData.etaHits.push_back(meas);
469 if (usePreciseHits &&
m_idHelperSvc->isMdt(
id) && std::abs(rDrift) < 0.01 && rError > 4.) {
474 fitterData.measurements.push_back(meas);
480 currentMeasPhi = measuresPhi;
481 fitterData.firstLastMeasurements.push_back(&hit->broadMeasurement());
482 }
else if (currentChIndex ==
chIndex && currentMeasPhi == measuresPhi) {
486 currentMeasPhi = measuresPhi;
488 fitterData.firstLastMeasurements.push_back(&hit->broadMeasurement());
493 if (previousHit && &previousHit->broadMeasurement() != fitterData.firstLastMeasurements.back())
494 fitterData.firstLastMeasurements.push_back(&previousHit->broadMeasurement());
497 if (fitterData.measurements.size() < 7) {
498 ATH_MSG_VERBOSE(
" Too few measurements, cannot perform fit " << fitterData.measurements.size());
503 if (fitterData.etaHits.size() < 7) {
504 ATH_MSG_VERBOSE(
" Too few eta measurements, cannot perform fit " << fitterData.etaHits.size());
508 ATH_MSG_VERBOSE(
" Extracted measurements: total " << fitterData.measurements.size() <<
" eta "
509 << fitterData.etaHits.size() <<
" phi " << fitterData.phiHits.size()<< std::endl <<
m_printer->print(fitterData.measurements));
◆ 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
◆ finalize()
StatusCode Muon::MooTrackFitter::finalize |
( |
| ) |
|
finialize method, method taken from bass-class AlgTool
Definition at line 79 of file MooTrackFitter.cxx.
95 <<
"| extract | phi range | startPars | clean phi | add fake | fit | no perigee | low mom | extract | "
96 "add fake | final fit | passed |"
98 << std::setprecision(2) << std::setw(12) << nfailedExtractInital << std::setw(12) << nfailedMinMaxPhi << std::setw(12)
99 << nfailedParsInital << std::setw(12) << nfailedExtractCleaning << std::setw(12) << nfailedFakeInitial << std::setw(12)
100 << nfailedTubeFit << std::setw(13) << noPerigee << std::setw(12) << nlowMomentum << std::setw(12)
101 << nfailedExtractPrecise << std::setw(12) << nfailedFakePrecise << std::setw(12) << nfailedFitPrecise << std::setw(12)
104 return StatusCode::SUCCESS;
◆ fit() [1/2]
fit the hits of two MuPatCandidateBase
- Parameters
-
firstEntry | the first entry |
secondEntry | the second entry |
externalPhiHits | if provided, the external phi hits will be used instead of the phi hits on the segment |
- Returns
- a pointer to the resulting track, will return zero if the fit failed.
Definition at line 176 of file MooTrackFitter.cxx.
180 FitterData fitterData;
191 ATH_MSG_DEBUG(
" Phi range check failed, candidate stations not pointing. Will not fit track");
199 std::unique_ptr<Trk::Perigee>& startPars = fitterData.startPars;
211 bool usePrecise =
m_usePreciseHits || (fitterData.firstHasMomentum || fitterData.secondHasMomentum);
214 ATH_MSG_DEBUG(
" Failed to extract data after phi hit cleaning");
222 ATH_MSG_DEBUG(
" Failed to add fake phi hits for precise fit");
230 if (fitterData.firstHasMomentum || fitterData.secondHasMomentum) doPreFit =
false;
233 std::unique_ptr<Trk::Track>
track =
fit(ctx, *startPars, fitterData.measurements,
particleType, doPreFit);
255 if (!fitterData.firstHasMomentum && !fitterData.secondHasMomentum && doPreFit) {
259 FitterData fitterDataRefit{};
260 fitterDataRefit.startPars.reset(pp->
clone());
261 fitterDataRefit.firstIsTrack = fitterData.firstIsTrack;
262 fitterDataRefit.secondIsTrack = fitterData.secondIsTrack;
263 fitterDataRefit.firstHasMomentum = fitterData.firstHasMomentum;
264 fitterDataRefit.secondHasMomentum = fitterData.secondHasMomentum;
265 fitterDataRefit.avePhi = fitterData.avePhi;
266 fitterDataRefit.phiMin = fitterData.phiMin;
267 fitterDataRefit.phiMax = fitterData.phiMax;
268 fitterDataRefit.firstEntry = fitterData.firstEntry;
269 fitterDataRefit.secondEntry = fitterData.secondEntry;
270 fitterDataRefit.hitList = fitterData.hitList;
281 ATH_MSG_DEBUG(
" Failed to add fake phi hits for precise fit");
287 std::unique_ptr<Trk::Track> newTrack =
fit(ctx, *pp, fitterDataRefit.measurements,
Trk::muon,
false);
289 track.swap(newTrack);
294 ATH_MSG_DEBUG(
" Precise fit failed, keep fit with broad errors");
298 fitterData.garbage.insert(fitterData.garbage.end(), std::make_move_iterator(fitterDataRefit.garbage.begin()),
299 std::make_move_iterator(fitterDataRefit.garbage.end()));
300 fitterDataRefit.garbage.clear();
305 std::set<Identifier> excludedChambers;
306 if (fitterData.firstIsTrack && !fitterData.secondIsTrack) {
307 excludedChambers = fitterData.secondEntry->chamberIds();
309 }
else if (!fitterData.firstIsTrack && fitterData.secondIsTrack) {
310 excludedChambers = fitterData.firstEntry->chamberIds();
313 if (!excludedChambers.empty()) {
ATH_MSG_DEBUG(
" Using exclusion list for cleaning"); }
◆ fit() [2/2]
fit track
Definition at line 1606 of file MooTrackFitter.cxx.
1608 if (
hits.empty())
return nullptr;
1609 std::unique_ptr<Trk::Perigee> perigee{};
1610 ATH_MSG_VERBOSE(std::setprecision(5) <<
" track start parameter: phi " << startPars.momentum().phi() <<
" theta "
1611 << startPars.momentum().theta() <<
" q*mom " << startPars.charge() * startPars.momentum().mag()
1612 <<
" r " << startPars.position().perp() <<
" z " << startPars.position().z() << std::endl
1613 <<
" start par is a perigee "
1614 <<
" partHypo " << partHypo << std::endl
1619 DistanceAlongParameters distAlongPars;
1620 double dist = distAlongPars(startPars, *
hits.front());
1623 ATH_MSG_DEBUG(
" start parameters after first hit, shifting them.... ");
1626 pars = perigee.get();
1636 ATH_MSG_VERBOSE(
"fit: " << (prefit ?
"prefit" :
"fit") <<
"track with hits: " <<
hits.size() << std::endl
◆ fitSplitTrack()
construct a track from a list of TSOS and a start parameters
Definition at line 2150 of file MooTrackFitter.cxx.
2158 std::unique_ptr<Trk::Perigee> perigee = std::make_unique<Trk::Perigee>(0, 0, phi, theta, qoverp, persurf);
2160 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
2161 trackStateOnSurfaces->reserve(tsos.size() + 1);
2166 std::unique_ptr<Trk::Track>
track = std::make_unique<Trk::Track>(
trackInfo, std::move(trackStateOnSurfaces),
nullptr);
2171 ATH_MSG_DEBUG(
"Track has sufficient phi constraints, fitting ");
2179 std::vector<const Trk::TrackStateOnSurface*>::const_iterator
tit = tsos.begin();
2180 std::vector<const Trk::TrackStateOnSurface*>::const_iterator tit_end = tsos.end();
2181 for (;
tit != tit_end; ++
tit) {
2183 if (!(*tit)->trackParameters())
continue;
2186 if (!meas)
continue;
2192 if (!firstMeas) firstMeas = *
tit;
2200 ATH_MSG_WARNING(
" failed to find first MDT measurement with track parameters");
2205 ATH_MSG_WARNING(
" failed to find second MDT measurement with track parameters");
2209 if (firstMeas == lastMeas) {
2210 ATH_MSG_WARNING(
" first MDT measurement with track parameters equals to second");
2220 ATH_MSG_DEBUG(
"Track has one phi constraints, adding second: dist to first " << distFirst <<
" dist to second "
2223 if (distFirst < distSecond) {
2224 positionFirstFake = lastMeas;
2226 positionFirstFake = firstMeas;
2230 ATH_MSG_DEBUG(
"Track has no phi constraints, adding one at beginning and one at the end of the track ");
2232 positionFirstFake = firstMeas;
2233 positionSecondFake = lastMeas;
2237 auto uniquePerigee = std::make_unique<Trk::Perigee>(0, 0, phi, theta, qoverp, persurf);
2238 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
2239 trackStateOnSurfaces->reserve(tsos.size() + 3);
2243 tit_end = tsos.end();
2244 for (;
tit != tit_end; ++
tit) {
2252 trackStateOnSurfaces->push_back((*tit)->clone());
2253 if (*
tit == positionFirstFake) {
2254 double fakeError = 100.;
2261 std::unique_ptr<Trk::MeasurementBase> fake =
2271 if (*
tit == positionSecondFake && positionSecondFake) {
2272 double fakeError = 100.;
2279 std::unique_ptr<Trk::MeasurementBase> fake =
2292 track = std::make_unique<Trk::Track>(
trackInfo, std::move(trackStateOnSurfaces),
nullptr);
2296 std::unique_ptr<Trk::Track> refittedTrack =
refit(ctx, *
track);
2299 return refittedTrack;
◆ fitWithRefit()
fit track, refit if needed
Definition at line 1651 of file MooTrackFitter.cxx.
1665 double difMom = startPars.momentum().mag() - pp->momentum().mag();
1666 if (std::abs(difMom) > 5000.) {
1667 ATH_MSG_DEBUG(
" absolute difference in momentum too large, refitting track. Dif momentum= " << difMom);
1670 if (refittedTrack) {
1671 track.swap(refittedTrack);
1676 ATH_MSG_DEBUG(
" refitted track fit perigee: r " << pp->position().perp() <<
" z " << pp->position().z());
◆ getElementHalfLengths()
Definition at line 1093 of file MooTrackFitter.cxx.
1096 if (!mdtDetEl){
return std::make_pair(0., 0.); }
1099 return std::make_pair(halfLength, halfLength);
1103 if (!cscDetEl) {
return std::make_pair(0., 0.);}
1104 const double halfLenghth = 0.5 * cscDetEl->
stripLength(
id);
1105 return std::make_pair(halfLenghth, halfLenghth);
1108 if (!rpcDetEl) {
return std::make_pair(0, 0);}
1109 const double halfLength = 0.5 * rpcDetEl->
StripLength(
false);
1110 return std::make_pair(halfLength, halfLength);
1113 if (!tgcDetEl) {
return std::make_pair(0.,0.);}
1115 return std::make_pair(halfLength, halfLength);
1118 if (!stgcDetEl || !stgcDetEl->
getDesign(
id)) {
return std::make_pair(0.,0.);}
1120 return std::make_pair(halfLength, halfLength);
1129 return std::make_pair(0.,0.);
◆ getMaterial()
◆ getMinMaxPhi()
bool Muon::MooTrackFitter::getMinMaxPhi |
( |
FitterData & |
fitterData | ) |
const |
|
private |
calculate the minimum and maximum phi value a track could have to pass all eta channels
Definition at line 1131 of file MooTrackFitter.cxx.
1132 double phiStart = fitterData.etaHits.front()->globalPosition().phi();
1133 double phiOffset = 0.;
1135 double phiRange2 = 0.25 *
M_PI;
1137 phiOffset = 2 *
M_PI;
1138 else if (phiStart > -phiRange2 && phiStart < phiRange2)
1141 double phiMin = -999.;
1142 double phiMax = 999.;
1148 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(meas);
1150 if (!crot || crot->containedROTs().empty())
continue;
1151 rot = crot->containedROTs().front();
1169 double phiLeft = gposLeft.phi();
1173 double phiRight = gposRight.phi();
1175 if (phiOffset > 1.5 *
M_PI) {
1176 if (phiLeft < 0) phiLeft = phiOffset + phiLeft;
1177 if (phiRight < 0) phiRight = phiOffset + phiRight;
1178 }
else if (phiOffset > 0.) {
1179 phiLeft = phiLeft + phiOffset;
1180 phiRight = phiRight + phiOffset;
1183 bool leftSmaller = phiLeft < phiRight;
1185 double phiMinMeas = leftSmaller ? phiLeft : phiRight;
1186 double phiMaxMeas = leftSmaller ? phiRight : phiLeft;
1187 double orgPhiMin = phiMinMeas;
1188 double orgPhiMax = phiMaxMeas;
1190 if (phiOffset > 1.5 *
M_PI) {
1191 if (orgPhiMin >
M_PI) orgPhiMin = orgPhiMin - phiOffset;
1192 if (orgPhiMax >
M_PI) orgPhiMax = orgPhiMax - phiOffset;
1193 }
else if (phiOffset > 0.) {
1194 orgPhiMin = orgPhiMin - phiOffset;
1195 orgPhiMax = orgPhiMax - phiOffset;
1198 if (phiMinMeas > phiMin) { phiMin = phiMinMeas; }
1199 if (phiMaxMeas < phiMax) { phiMax = phiMaxMeas; }
1201 if (phiMin < -998 || phiMax > 998) {
1206 double diffPhi = phiMax - phiMin;
1207 double avePhi = phiMin + 0.5 * diffPhi;
1209 ATH_MSG_VERBOSE(
"Phi ranges: min " << phiMin <<
" max " << phiMax <<
" average phi " << avePhi);
1218 if (!fitterData.phiHits.empty()) {
1220 const double minPhi =
std::min(phiMin, phiMax);
1221 const double maxPhi =
std::max(phiMin, phiMax);
1223 if (phiOffset > 1.5 *
M_PI) {
1224 if (phiMeas < 0.) phiMeas = phiOffset + phiMeas;
1225 }
else if (phiOffset > 0.) {
1226 phiMeas = phiMeas + phiOffset;
1228 double diffMin = phiMeas - minPhi;
1229 double diffMax = phiMeas - maxPhi;
1230 if (diffMin < 0. || diffMax > 0.) {
1232 ATH_MSG_VERBOSE(
" Phi hits inconsistent with min/max, rejecting track: phi meas " << phiMeas);
1239 if (phiOffset > 1.5 *
M_PI) {
1240 if (phiMax >
M_PI) phiMax = phiMax - phiOffset;
1241 if (phiMin >
M_PI) phiMin = phiMin - phiOffset;
1242 if (avePhi >
M_PI) avePhi = avePhi - phiOffset;
1243 }
else if (phiOffset > 0.) {
1244 phiMax = phiMax - phiOffset;
1245 phiMin = phiMin - phiOffset;
1246 avePhi = avePhi - phiOffset;
1249 fitterData.avePhi = avePhi;
1250 fitterData.phiMin = phiMin;
1251 fitterData.phiMax = phiMax;
◆ hasPhiConstrain() [1/2]
check whether data has sufficient phi constraints
Definition at line 977 of file MooTrackFitter.cxx.
980 if ((fitterData.firstEntry->containsChamber(
ChIndex::CSS) ||
981 fitterData.firstEntry->containsChamber(
ChIndex::CSL)) &&
982 !fitterData.secondEntry->phiHits().empty())
985 unsigned int nphiConstraints = fitterData.phiHits.size();
995 double distanceMin = 400.;
998 if (fitterData.phiHits.size() > 1) {
1000 const Amg::Vector3D& gposFirstPhi = fitterData.phiHits.front()->globalPosition();
1001 const Amg::Vector3D& gposLastPhi = fitterData.phiHits.back()->globalPosition();
1002 double distFirstEtaPhi =
1003 (fitterData.measurements.front()->globalPosition() - fitterData.phiHits.front()->globalPosition()).
mag();
1004 double distLastEtaPhi = (fitterData.measurements.back()->globalPosition() - fitterData.phiHits.back()->globalPosition()).
mag();
1010 distance = fitterData.hasEndcap ? std::abs(globalDistance.z()) : globalDistance.
perp();
1013 if (distance < distanceMin || distFirstEtaPhi > 1000 || distLastEtaPhi > 1000) {
1014 nphiConstraints -= fitterData.phiHits.size();
1015 nphiConstraints += 1;
1016 ATH_MSG_VERBOSE(
" distance between phi hits too small, updating phi constraints ");
1018 ATH_MSG_VERBOSE(
" distance between phi hits sufficient, no fake hits needed ");
1023 <<
" | nphi hits | distance | SL station overlaps | small ch | large ch | nphiConstraints " << std::endl
1024 << std::setw(12) << fitterData.phiHits.size() << std::setw(11) << (
int)
distance << std::setw(22)
1025 << fitterData.numberOfSLOverlaps() << std::setw(11) << fitterData.numberOfSmallChambers() << std::setw(11)
1026 << fitterData.numberOfLargeChambers() << std::setw(18) << nphiConstraints <<
endmsg;
1029 return nphiConstraints;
◆ hasPhiConstrain() [2/2]
unsigned int Muon::MooTrackFitter::hasPhiConstrain |
( |
Trk::Track * |
track | ) |
const |
|
private |
check whether data has sufficient phi constraints
Definition at line 1032 of file MooTrackFitter.cxx.
1033 std::map<MuonStationIndex::StIndex, StationPhiData> stationDataMap;
1039 if (
summary->muonTrackSummary()) {
1040 muonSummary = *
summary->muonTrackSummary();
1044 if (tmpSum.muonTrackSummary()) muonSummary = *(tmpSum.muonTrackSummary());
1052 std::vector<Trk::MuonTrackSummary::ChamberHitSummary>::const_iterator chit = muonSummary.
chamberHitSummary().begin();
1053 std::vector<Trk::MuonTrackSummary::ChamberHitSummary>::const_iterator chit_end = muonSummary.
chamberHitSummary().end();
1054 for (; chit != chit_end; ++chit) {
1058 StationPhiData& stData = stationDataMap[stIndex];
1059 if (chit->isMdt()) {
1061 ++stData.nSmallChambers;
1063 ++stData.nLargeChambers;
1065 if (chit->phiProjection().nhits) ++stData.nphiHits;
1069 unsigned int phiConstraints = 0;
1070 unsigned int stationsWithSmall = 0;
1071 unsigned int stationsWithLarge = 0;
1075 for (; sit != sit_end; ++sit) {
1076 StationPhiData& stData = sit->second;
1079 phiConstraints += stData.nphiHits;
1081 if (stData.nSmallChambers > 0 && stData.nLargeChambers > 0)
1083 else if (stData.nSmallChambers > 0)
1084 ++stationsWithSmall;
1085 else if (stData.nLargeChambers > 0)
1086 ++stationsWithLarge;
1089 if (stationsWithSmall > 0 && stationsWithLarge > 0) { ++phiConstraints; }
1091 return phiConstraints;
◆ initialize()
StatusCode Muon::MooTrackFitter::initialize |
( |
| ) |
|
initialize method, method taken from bass-class AlgTool
Definition at line 57 of file MooTrackFitter.cxx.
76 return StatusCode::SUCCESS;
◆ 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& Muon::MooTrackFitter::interfaceID |
( |
| ) |
|
|
inlinestatic |
access to tool interface
Definition at line 90 of file MooTrackFitter.h.
91 static const InterfaceID IID_MooTrackFitter(
"Muon::MooTrackFitter", 1, 0);
92 return IID_MooTrackFitter;
◆ 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.
◆ phiSeeding()
calculate phi used to for seeding the fit
Definition at line 1312 of file MooTrackFitter.cxx.
1315 if (!
dynamic_cast<const MuPatTrack*
>(fitterData.firstEntry)) {
1317 if (
dynamic_cast<const MuPatTrack*
>(fitterData.secondEntry)) {
1318 ATH_MSG_DEBUG(
"Using phi of second entry " << fitterData.secondEntry->entryPars().momentum().phi());
1319 return fitterData.secondEntry->entryPars().momentum().phi();
1324 const MuPatSegment* segInfo1 =
dynamic_cast<const MuPatSegment*
>(fitterData.firstEntry);
1325 const MuPatSegment* segInfo2 =
dynamic_cast<const MuPatSegment*
>(fitterData.secondEntry);
1326 if (segInfo1 && segInfo2 && fitterData.stations.size() == 1 && fitterData.numberOfSLOverlaps() == 1) {
1330 IMuonSegmentInOverlapResolvingTool::SegmentMatchResult
result =
1333 if (!
result.goodMatch()) {
1337 double overlapPhi =
result.phiResult.segmentDirection1.phi();
1344 Amg::Vector3D difPos = fitterData.firstEntry->entryPars().position() - fitterData.secondEntry->entryPars().position();
1346 if (difPos.y() > 0) difPos *= -1.;
1349 const double dphi = fitterData.firstEntry->entryPars().momentum().deltaPhi(difPos);
1350 if (std::abs(dphi) > 0.2) {
1351 ATH_MSG_DEBUG(
"Large diff between phi of segment direction and of position "
1352 << fitterData.firstEntry->entryPars().momentum().phi() <<
" from pos " << difPos.phi() <<
" dphi " << dphi);
1353 return difPos.phi();
1356 ATH_MSG_DEBUG(
"Using phi of first entry " << fitterData.firstEntry->entryPars().momentum().phi() <<
" phi from position "
1359 return fitterData.firstEntry->entryPars().momentum().phi();
1367 Amg::Vector3D difPos = etaHits.back()->globalPosition() - etaHits.front()->globalPosition();
1368 if (difPos.mag() > 3000) {
1369 ATH_MSG_DEBUG(
"Seeding phi using average phi of eta hits ");
1378 if (phiHits.empty()) {
1381 return fitterData.avePhi;
1385 if (phiHits.size() == 1) {
return phiHits.front()->globalPosition().phi(); }
1388 const MuPatSegment* segInfo1 =
dynamic_cast<const MuPatSegment*
>(fitterData.firstEntry);
1389 if (segInfo1 && segInfo1->containsStation(
StIndex::EI) && !segInfo1->phiHits().empty()) {
1390 return segInfo1->segment->globalDirection().phi();
1394 if (segInfo1 && segInfo1->containsStation(
StIndex::EM) && !segInfo1->phiHits().empty()) {
1395 return segInfo1->segment->globalDirection().phi();
1400 MeasCit hit = phiHits.begin();
1401 MeasCit hit_end = phiHits.end();
1403 for (; hit != hit_end; ++hit) avePos += (*hit)->globalPosition();
1404 avePos /= phiHits.size();
1408 Amg::Vector3D difPos = phiHits.back()->globalPosition() - phiHits.front()->globalPosition();
◆ qOverPFromEntries()
get q/p using angle + position of the two entries
Definition at line 1277 of file MooTrackFitter.cxx.
1282 if (firstEntry.hasMomentum())
1284 else if (secondEntry.hasMomentum())
1288 std::shared_ptr<const MuonSegment> segFirst =
segmentFromEntry(ctx, firstEntry);
1290 ATH_MSG_WARNING(
" failed to get segment for first entry, this should not happen ");
1294 std::shared_ptr<const MuonSegment> segSecond =
segmentFromEntry(ctx, secondEntry);
1296 ATH_MSG_WARNING(
" failed to get segment for second entry, this should not happen ");
1300 std::vector<const MuonSegment*> segments{segFirst.get(), segSecond.get()};
◆ qOverPFromEntry()
◆ refit() [1/2]
refit a MuPatTrack
Definition at line 116 of file MooTrackFitter.cxx.
119 FitterData fitterData;
122 fitterData.hitList = trkCan.hitList();
125 if (!
extractData(fitterData,
true))
return nullptr;
128 const Trk::Perigee* pp = trkCan.track().perigeeParameters();
129 if (!pp)
return nullptr;
132 std::unique_ptr<Trk::Track>
track =
fit(ctx, *pp, fitterData.measurements,
Trk::muon,
false);
136 std::set<Identifier> excludedChambers;
◆ refit() [2/2]
refit a track
Definition at line 145 of file MooTrackFitter.cxx.
159 std::set<Identifier> excludedChambers;
◆ removeSegmentOutliers()
void Muon::MooTrackFitter::removeSegmentOutliers |
( |
FitterData & |
fitterData | ) |
const |
|
private |
Definition at line 1985 of file MooTrackFitter.cxx.
1986 if (fitterData.startPars->momentum().mag() < 4000.)
return;
1988 std::set<Identifier> removedIdentifiers;
1989 if (fitterData.firstEntry)
cleanEntry(*fitterData.firstEntry, removedIdentifiers);
1990 if (fitterData.secondEntry)
cleanEntry(*fitterData.secondEntry, removedIdentifiers);
1992 ATH_MSG_DEBUG(
" removing hits " << removedIdentifiers.size());
1994 for (
const Identifier&
id : removedIdentifiers) {
◆ renounce()
◆ renounceArray()
◆ restrictedMomentum()
double Muon::MooTrackFitter::restrictedMomentum |
( |
double |
momentum | ) |
|
|
static |
◆ segmentFromEntry()
get segment from entry
Definition at line 1256 of file MooTrackFitter.cxx.
1258 const MuPatTrack* trkEntry =
dynamic_cast<const MuPatTrack*
>(&
entry);
1265 const MuPatSegment* segEntry =
dynamic_cast<const MuPatSegment*
>(&
entry);
1267 return std::shared_ptr<const MuonSegment> {segEntry->segment, Unowned()};
◆ splitTrack()
split given track if it crosses the calorimeter volume, code assumes that the track was already extrapolated to the muon entry record using the MuonTrackExtrapolationTool.
It uses the double perigee to spot the tracks to be split.
Definition at line 2000 of file MooTrackFitter.cxx.
2004 if (!oldTSOT)
return std::make_pair<std::unique_ptr<Trk::Track>, std::unique_ptr<Trk::Track>>(
nullptr,
nullptr);
2009 bool atIP = std::abs(perigee->position().dot(perigee->momentum().unit())) < 10;
2011 ATH_MSG_DEBUG(
" track extressed at perigee, cannot split it ");
2012 return std::make_pair<std::unique_ptr<Trk::Track>, std::unique_ptr<Trk::Track>>(
nullptr,
nullptr);
2017 unsigned int nperigees(0);
2020 for (;
tit != tit_end; ++
tit) {
2025 if (nperigees != 2) {
2026 ATH_MSG_DEBUG(
" Number of perigees is not one, cannot split it " << nperigees);
2027 return std::make_pair<std::unique_ptr<Trk::Track>, std::unique_ptr<Trk::Track>>(
nullptr,
nullptr);
2030 struct TrackContent {
2031 TrackContent() : firstParameters(nullptr), tsos(),
track() {}
2033 std::vector<const Trk::TrackStateOnSurface*> tsos;
2034 std::unique_ptr<Trk::Track>
track;
2035 std::set<MuonStationIndex::StIndex> stations;
2039 TrackContent firstTrack;
2040 firstTrack.tsos.reserve(oldTSOT->
size());
2042 TrackContent secondTrack;
2043 secondTrack.tsos.reserve(oldTSOT->
size());
2046 TrackContent* currentTrack = &firstTrack;
2053 tit_end = oldTSOT->
end();
2054 for (;
tit != tit_end; ++
tit) {
2064 if (nperigees == 2) {
2065 ATH_MSG_DEBUG(
" found second perigee, switch to second track");
2066 currentTrack = &secondTrack;
2068 }
else if (nperigees > 2) {
2074 if (nperigees == 1) {
ATH_MSG_VERBOSE(
" state between the two perigees "); }
2077 if (!currentTrack->firstParameters) {
2079 currentTrack->firstParameters =
pars;
2085 currentTrack->tsos.push_back(*
tit);
2093 currentTrack->tsos.push_back(*
tit);
2101 currentTrack->tsos.push_back(*
tit);
2105 if (nperigees == 1)
ATH_MSG_WARNING(
" found muon measurement inbetween the two perigees, this should not happen ");
2112 currentTrack->tsos.push_back(*
tit);
2115 if (firstTrack.firstParameters)
2116 ATH_MSG_DEBUG(
" first track content: states " << firstTrack.tsos.size() <<
" stations " << firstTrack.stations.size() <<
endmsg
2117 <<
" first pars " <<
m_printer->print(*firstTrack.firstParameters));
2119 else if (secondTrack.firstParameters)
2120 ATH_MSG_DEBUG(
" second track content: states " << secondTrack.tsos.size() <<
" stations " << secondTrack.stations.size()
2121 <<
endmsg <<
" first pars " <<
m_printer->print(*secondTrack.firstParameters));
2124 if ((firstTrack.firstParameters && firstTrack.stations.size() > 1) &&
2125 (secondTrack.firstParameters && secondTrack.stations.size() > 1)) {
2126 ATH_MSG_DEBUG(
" track candidate can be split, trying to fit split tracks ");
2128 firstTrack.track =
fitSplitTrack(ctx, *firstTrack.firstParameters, firstTrack.tsos);
2129 if (firstTrack.track) {
2132 secondTrack.track =
fitSplitTrack(ctx, *secondTrack.firstParameters, secondTrack.tsos);
2134 if (secondTrack.track) {
2139 firstTrack.track.reset();
2146 return std::make_pair<std::unique_ptr<Trk::Track>, std::unique_ptr<Trk::Track>>(std::move(firstTrack.track),
2147 std::move(secondTrack.track));
◆ 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.
◆ thetaSeeding()
calculate theta used for seeding the fit
Definition at line 1415 of file MooTrackFitter.cxx.
1417 if (etaHits.empty()) {
1424 theta =
entry.entryPars().momentum().theta();
1427 if (etaHits.size() == 1) {
1428 theta = etaHits.front()->globalPosition().theta();
1431 Amg::Vector3D difPos = etaHits.back()->globalPosition() - etaHits.front()->globalPosition();
1432 theta = difPos.theta();
◆ updateVHKA()
◆ validMomentum()
check whether mometum of start parameter is ok
Definition at line 1871 of file MooTrackFitter.cxx.
1872 const double p =
pars.momentum().mag();
1874 ATH_MSG_DEBUG(
" momentum below threshold: momentum " <<
pars.momentum().mag() <<
" p " <<
pars.momentum().perp());
◆ m_allowFirstFit
Gaudi::Property<bool> Muon::MooTrackFitter::m_allowFirstFit {this, "AllowFirstFitResult", false, "Return the result of the prefit is final fit fails"} |
|
private |
◆ m_chi2Cut
Gaudi::Property<double> Muon::MooTrackFitter::m_chi2Cut {this, "ReducedChi2Cut", 100., "minimum chi2/ndof for a track to be accepted"} |
|
private |
◆ m_cleaner
◆ m_cleanPhiHits
Gaudi::Property<bool> Muon::MooTrackFitter::m_cleanPhiHits {this, "CleanPhiHits", true, "Special flag to switch off phi hit cleaning"} |
|
private |
◆ m_cosmics
Gaudi::Property<bool> Muon::MooTrackFitter::m_cosmics {this, "Cosmics", false, "Special treatment for cosmics"} |
|
private |
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{
this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
multi purpose helper tool
Definition at line 273 of file MooTrackFitter.h.
◆ m_evtStore
◆ m_hitHandler
◆ m_idHelperSvc
◆ m_magFieldProperties
◆ m_matEffects
Gaudi::Property<int> Muon::MooTrackFitter::m_matEffects {this, "MatEffects", 2, "type of material interaction in extrapolation"} |
|
private |
◆ m_momentumEstimator
Initial value:{
this, "SegmentMomentum", "MuonSegmentMomentum/MuonSegmentMomentum"}
tool to estimate track momentum
Definition at line 264 of file MooTrackFitter.h.
◆ m_nfailedExtractCleaning
std::atomic_uint Muon::MooTrackFitter::m_nfailedExtractCleaning {0} |
|
mutableprivate |
◆ m_nfailedExtractInital
std::atomic_uint Muon::MooTrackFitter::m_nfailedExtractInital {0} |
|
mutableprivate |
◆ m_nfailedExtractPrecise
std::atomic_uint Muon::MooTrackFitter::m_nfailedExtractPrecise {0} |
|
mutableprivate |
◆ m_nfailedFakeInitial
std::atomic_uint Muon::MooTrackFitter::m_nfailedFakeInitial {0} |
|
mutableprivate |
◆ m_nfailedFakePrecise
std::atomic_uint Muon::MooTrackFitter::m_nfailedFakePrecise {0} |
|
mutableprivate |
◆ m_nfailedFitPrecise
std::atomic_uint Muon::MooTrackFitter::m_nfailedFitPrecise {0} |
|
mutableprivate |
◆ m_nfailedMinMaxPhi
std::atomic_uint Muon::MooTrackFitter::m_nfailedMinMaxPhi {0} |
|
mutableprivate |
◆ m_nfailedParsInital
std::atomic_uint Muon::MooTrackFitter::m_nfailedParsInital {0} |
|
mutableprivate |
◆ m_nfailedTubeFit
std::atomic_uint Muon::MooTrackFitter::m_nfailedTubeFit {0} |
|
mutableprivate |
◆ m_nfits
std::atomic_uint Muon::MooTrackFitter::m_nfits {0} |
|
mutableprivate |
◆ m_nlowMomentum
std::atomic_uint Muon::MooTrackFitter::m_nlowMomentum {0} |
|
mutableprivate |
◆ m_noPerigee
std::atomic_uint Muon::MooTrackFitter::m_noPerigee {0} |
|
mutableprivate |
◆ m_nsuccess
std::atomic_uint Muon::MooTrackFitter::m_nsuccess {0} |
|
mutableprivate |
◆ m_openingAngleCut
Gaudi::Property<double> Muon::MooTrackFitter::m_openingAngleCut |
|
private |
Initial value:{this, "OpeningAngleCut", 0.3,
"cut on the maximum difference in phi between measurements on the track"}
Definition at line 308 of file MooTrackFitter.h.
◆ m_overlapResolver
Initial value:{
this, "SegmentInOverlapTool", "Muon::MuonSegmentInOverlapResolvingTool/MuonSegmentInOverlapResolvingTool"}
Definition at line 285 of file MooTrackFitter.h.
◆ m_ParticleHypothesis
◆ m_patRecInfo
◆ m_phiHitSelector
Initial value:{this, "PhiHitSelector",
"MuonPhiHitSelector/MuonPhiHitSelector"}
tool to clean phi hits
Definition at line 282 of file MooTrackFitter.h.
◆ m_phiHitsMax
Gaudi::Property<unsigned int> Muon::MooTrackFitter::m_phiHitsMax |
|
private |
Initial value:{this, "MaxPatternPhiHits", 40,
"If more than maximum number of phi hits on pattern, no hits will be added"}
Definition at line 302 of file MooTrackFitter.h.
◆ m_preciseFirstStation
Gaudi::Property<bool> Muon::MooTrackFitter::m_preciseFirstStation |
|
private |
Initial value:{this, "UsePreciseHitsInFirstStation", false,
"use precise hits in first station to stabalise the fit"}
Definition at line 305 of file MooTrackFitter.h.
◆ m_preCleanChi2Cut
Gaudi::Property<double> Muon::MooTrackFitter::m_preCleanChi2Cut |
|
private |
Initial value:{this, "PreCleaningReducedChi2Cut", 500.,
"minimum chi2/ndof for a track to be passed to cleaner"}
Definition at line 310 of file MooTrackFitter.h.
◆ m_printer
Initial value:{this, "MuonPrinterTool",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
tool to print out EDM objects
Definition at line 276 of file MooTrackFitter.h.
◆ m_propagator
Initial value:{this, "Propagator",
"Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"}
propagator
Definition at line 260 of file MooTrackFitter.h.
◆ m_pThreshold
Gaudi::Property<double> Muon::MooTrackFitter::m_pThreshold |
|
private |
Initial value:{this, "PThreshold", 500.,
"Momentum cut-off. Seeds below the threshold will not be fitted"}
Definition at line 298 of file MooTrackFitter.h.
◆ m_runOutlier
Gaudi::Property<Trk::RunOutlierRemoval> Muon::MooTrackFitter::m_runOutlier {this, "RunOutlier", false, "Switch whether to run outlier logics or not"} |
|
private |
◆ m_seedAtStartOfTrack
Gaudi::Property<bool> Muon::MooTrackFitter::m_seedAtStartOfTrack {this, "SeedAtStartOfTrack", true, "Provide seed parameters at the start of the track"} |
|
private |
◆ m_seedPhiWithEtaHits
Gaudi::Property<bool> Muon::MooTrackFitter::m_seedPhiWithEtaHits {this, "SeedPhiWithEtaHits", false, "Seed phi from positions first last eta hit"} |
|
private |
◆ m_seedWithAvePhi
Gaudi::Property<bool> Muon::MooTrackFitter::m_seedWithAvePhi {this, "SeedWithAvePhi", true, "Seed with average phi of all phi hits"} |
|
private |
◆ m_seedWithSegmentTheta
Gaudi::Property<bool> Muon::MooTrackFitter::m_seedWithSegmentTheta {this, "SeedWithSegmentTheta", true, "Seed with theta connecting first + last eta hit"} |
|
private |
◆ m_slFit
Gaudi::Property<bool> Muon::MooTrackFitter::m_slFit {this, "SLFit", true, "Perform sl fit"} |
|
private |
◆ m_slProp
Gaudi::Property<bool> Muon::MooTrackFitter::m_slProp {this, "SLProp", false, "Enable straight line propagation"} |
|
private |
◆ m_trackFitter
◆ m_trackSummaryTool
Initial value:{
this, "TrackSummaryTool", "Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"}
Definition at line 287 of file MooTrackFitter.h.
◆ m_trackToSegmentTool
Initial value:{
this, "TrackToSegmentTool",
"Muon::MuonTrackToSegmentTool/MuonTrackToSegmentTool"}
helper tool to convert tracks into segments
Definition at line 278 of file MooTrackFitter.h.
◆ m_usePreciseHits
Gaudi::Property<bool> Muon::MooTrackFitter::m_usePreciseHits {this, "UsePreciseHits", false, "Use actual measurement error"} |
|
private |
◆ m_usePrefit
Gaudi::Property<bool> Muon::MooTrackFitter::m_usePrefit {this, "UsePrefit", true, "Use prefit"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
std::unique_ptr< Trk::Track > cleanAndEvaluateTrack(const EventContext &ctx, Trk::Track &track, const std::set< Identifier > &excludedChambers) const
clean and evaluate the track,
Gaudi::Property< unsigned int > m_phiHitsMax
JetConstituentVector::iterator iterator
std::unique_ptr< RIO_OnTrack > uniqueClone() const
NVI clone returning unique_ptr.
PublicToolHandle< MuonEDMPrinterTool > m_printer
tool to print out EDM objects
static std::unique_ptr< Trk::TrackStateOnSurface > createPerigeeTSOS(std::unique_ptr< Trk::TrackParameters > perigee)
create a perigee TSOS, takes ownership of the Perigee
bool extractData(const MuPatCandidateBase &entry1, const MuPatCandidateBase &entry2, FitterData &fitterData) const
extract all information needed for the fit from the track
const ShapeFitter * fitter
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Gaudi::Property< bool > m_seedPhiWithEtaHits
Contains information about the 'fitter' of this track.
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
static double qOverPFromEntry(const MuPatCandidateBase &entry)
get q/p from entry
Const iterator class for DataVector/DataList.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
std::unique_ptr< Trk::Perigee > createPerigee(const EventContext &ctx, const Trk::TrackParameters &firstPars, const Trk::MeasurementBase &firstMeas) const
create perigee parameter to initialize fit
std::atomic_uint m_nfailedExtractCleaning
std::atomic_uint m_nfailedExtractInital
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Gaudi::Property< bool > m_seedWithSegmentTheta
std::vector< DCOnTrack > DCOnTrackVec
double StripLength(bool measphi) const
returns the strip length for the phi or eta plane
std::unique_ptr< Trk::Track > refit(const EventContext &ctx, const MuPatTrack &trkCan) const
refit a MuPatTrack
double charge() const
Returns the charge.
bool getMinMaxPhi(FitterData &fitterData) const
calculate the minimum and maximum phi value a track could have to pass all eta channels
Gaudi::Property< bool > m_usePreciseHits
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
PublicToolHandle< MuPatHitTool > m_hitHandler
hit handler
ToolHandle< IMuonSegmentMomentumEstimator > m_momentumEstimator
tool to estimate track momentum
Intersection straightLineIntersection(const T &pars, bool forceDir=false, const Trk::BoundaryCheck &bchk=false) const
fst straight line intersection schema - templated for charged and neutral parameters
Scalar perp() const
perp method - perpenticular length
std::shared_ptr< const MuonSegment > segmentFromEntry(const EventContext &ctx, const MuPatCandidateBase &entry) const
get segment from entry
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
std::atomic_uint m_noPerigee
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone() const
clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existi...
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
std::atomic_uint m_nfailedTubeFit
Gaudi::Property< double > m_chi2Cut
Gaudi::Property< double > m_openingAngleCut
std::atomic_uint m_nsuccess
virtual const Amg::Vector3D & globalPosition() const override=0
Interface method to get the global Position.
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
bool addFakePhiHits(const EventContext &ctx, FitterData &fitterData, const Trk::TrackParameters &referenceParameter) const
check fitterData, add fake phi hits if needed.
std::pair< int, int > SmallLargeChambers
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
std::vector< SG::VarHandleKeyArray * > m_vhka
Gaudi::Property< int > m_matEffects
bool msgLvl(const MSG::Level lvl) const
Gaudi::Property< bool > m_seedWithAvePhi
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
@ loc2
generic first and second local coordinate
std::atomic_uint m_nfailedExtractPrecise
bool cleanPhiHits(const EventContext &ctx, double momentum, FitterData &phiHits, const PrepVec &patternPhiHits) const
clean phi hits, returns true if anything happened during the cleaning
Trk::TrackInfo::TrackPatternRecoInfo m_patRecInfo
This class represents a drift time measurement.
std::unique_ptr< Trk::Track > fitSplitTrack(const EventContext &ctx, const Trk::TrackParameters &startPars, const std::vector< const Trk::TrackStateOnSurface * > &tsos) const
construct a track from a list of TSOS and a start parameters
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< double > m_pThreshold
const Amg::Vector3D & center() const
Returns the center position of the Surface.
ToolHandle< IMuonTrackToSegmentTool > m_trackToSegmentTool
helper tool to convert tracks into segments
bool fit(const LArSamples::AbsShape &data, const AbsShape &reference, double &k, double &deltaT, double &chi2, const ScaledErrorData *sed=0) const
std::unique_ptr< Trk::MeasurementBase > createFakePhiForMeasurement(const Trk::MeasurementBase &measurement, const Amg::Vector3D *overlapPos, const Amg::Vector3D *phiPos, double error) const
create fake phi hit on the surface of the give measurement
bool is_valid() const
Check if id is in a valid state.
MeasVec::const_iterator MeasCit
double stripLength(int chamberLayer, int measuresPhi, int stripNumber, double &epsilon) const
Gaudi::Property< bool > m_slProp
Implementation of 2 dimensional vector class.
std::pair< double, ParamDefs > DefinedParameter
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
Gaudi::Property< double > m_preCleanChi2Cut
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< const Trk::MeasurementBase * > MeasVec
Class to handle pseudo-measurements in fitters and on track objects.
double get(ParamDefs par) const
Retrieve specified parameter (const version).
double stripActiveLengthRight(const Identifier &id) const
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Gaudi::Property< Trk::RunOutlierRemoval > m_runOutlier
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Gaudi::Property< bool > m_cleanPhiHits
bool corruptEntry(const MuPatCandidateBase &entry) const
sanity check for entries
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
MuPatHitList::const_iterator MuPatHitCit
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool validMomentum(const Trk::TrackParameters &pars) const
check whether mometum of start parameter is ok
double getActiveTubeLength(const int tubeLayer, const int tube) const
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Eigen::Affine3d Transform3D
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
virtual const Surface & surface() const =0
Return surface associated with this detector element.
std::atomic_uint m_nfailedFakePrecise
Out copy_if(In first, const In &last, Out res, const Pred &p)
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
Gaudi::Property< bool > m_usePrefit
void removeSegmentOutliers(FitterData &fitterData) const
Detailed track summary for the muon system Give access to hit counts per chamber.
Gaudi::Property< bool > m_preciseFirstStation
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Trk::ParticleHypothesis m_ParticleHypothesis
nomen est omen
std::atomic_uint m_nlowMomentum
double gangCentralWidth(int gasGap, int gang) const
Returns the length of the central wire in the gang.
std::atomic_uint m_nfailedMinMaxPhi
std::shared_ptr< MuPatHit > MuPatHitPtr
@ FullField
Field is set to be realistic, but within a given Volume.
ToolHandle< IMuonHitSelector > m_phiHitSelector
tool to clean phi hits
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StIndex
enum to classify the different station layers in the muon spectrometer
@ NoField
Field is set to 0., 0., 0.,.
const Perigee * perigeeParameters() const
return Perigee.
represents the track state (measurement, material, fit parameters and quality) at a surface.
virtual const Amg::Vector3D & globalPosition() const override final
returns the global Position (interface from MeasurementBase)
A summary of the information contained by a track.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
Gaudi::Property< bool > m_allowFirstFit
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 ...
Gaudi::Property< bool > m_cosmics
ToolHandle< Trk::ITrackSummaryHelperTool > m_trackSummaryTool
std::atomic_uint m_nfailedFitPrecise
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
void cleanSegment(const MuonSegment &seg, std::set< Identifier > &removedIdentifiers) const
Eigen::Matrix< double, 3, 1 > Vector3D
std::vector< MuPatHitPtr > MuPatHitList
std::atomic_uint m_nfailedParsInital
ToolHandle< Trk::IPropagator > m_propagator
propagator
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Trk::MagneticFieldProperties m_magFieldProperties
magnetic field properties
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
unsigned int hasPhiConstrain(FitterData &inputData) const
check whether data has sufficient phi constraints
const Amg::Vector3D & momentum() const
Access method for the momentum.
std::atomic_uint m_nfailedFakeInitial
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
ToolHandle< IMuonTrackCleaner > m_cleaner
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
#define ATH_MSG_WARNING(x)
std::string getStationType() const
Identifier identify() const
return the identifier -extends MeasurementBase
MuonStationIndex::StIndex StIndex
Gaudi::Property< bool > m_slFit
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
class representing a drift circle meaurement on segment
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ToolHandle< Trk::ITrackFitter > m_trackFitter
fitter
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOSWithUpdate(const Trk::TrackStateOnSurface &tsos, std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
ChIndex
enum to classify the different chamber layers in the muon spectrometer
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
phiRange
Filling Phi ranges.
std::unique_ptr< Trk::Track > fit(const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry, const PrepVec &externalPhiHits) const
fit the hits of two MuPatCandidateBase
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
void setPatternRecognitionInfo(const TrackPatternRecoInfo &patternReco)
Method setting the pattern recognition algorithm.
void cleanEntry(const MuPatCandidateBase &entry, std::set< Identifier > &removedIdentifiers) const
void createStartParameters(const EventContext &ctx, FitterData &inputData) const
create a perigee parameter give the input data
const MuonTrackSummary * muonTrackSummary() const
returns a pointer to the MuonTrackSummary if available
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual ParametersT< DIM, T, S > * clone() const override final
Virtual clone.
Gaudi::Property< bool > m_seedAtStartOfTrack
Scalar mag() const
mag method
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
double qOverPFromEntries(const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry) const
get q/p using angle + position of the two entries
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
multi purpose helper tool
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ToolHandle< IMuonSegmentInOverlapResolvingTool > m_overlapResolver
void setThetaPhi(Amg::Vector3D &v, double theta, double phi)
sets the theta and phi angle of a vector without changing the magnitude
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
std::pair< double, double > getElementHalfLengths(const Identifier &id, const Trk::TrkDetElementBase *ele) const
@ InTime
drift time too small to be compatible with drift spectrum
double stripActiveLengthLeft(const Identifier &id) const
@ Unknown
Track fitter not defined.