|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef MUON_MOOTRACKFITTER_H
5 #define MUON_MOOTRACKFITTER_H
42 class MeasurementBase;
61 typedef std::vector<const Trk::MeasurementBase*>
MeasVec;
65 typedef std::vector<const Trk::PrepRawData*>
PrepVec;
70 typedef std::map<MuonStationIndex::StIndex, SmallLargeChambers>
SLStationMap;
72 typedef std::vector<std::pair<const Trk::TrackParameters*, const Trk::Layer*> >
MaterialLayers;
78 MooTrackFitter(
const std::string&,
const std::string&,
const IInterface*);
91 static const InterfaceID IID_MooTrackFitter(
"Muon::MooTrackFitter", 1, 0);
92 return IID_MooTrackFitter;
102 const PrepVec& externalPhiHits)
const;
105 std::unique_ptr<Trk::Track>
refit(
const EventContext& ctx,
const MuPatTrack& trkCan)
const;
126 std::pair<std::unique_ptr<Trk::Track>, std::unique_ptr<Trk::Track> >
splitTrack(
const EventContext& ctx,
const Trk::Track&
track)
const;
130 const std::vector<const Trk::TrackStateOnSurface*>& tsos)
const;
160 std::vector<std::unique_ptr<const Trk::MeasurementBase>>
garbage{};
178 for (;
it != it_end; ++
it) {
261 "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"};
262 ToolHandle<Trk::ITrackFitter>
m_trackFitter{
this,
"Fitter",
"Trk::GlobalChi2Fitter/MCTBFitter"};
263 PublicToolHandle<MuPatHitTool>
m_hitHandler{
this,
"HitTool",
"Muon::MuPatHitTool/MuPatHitTool"};
265 this,
"SegmentMomentum",
"MuonSegmentMomentum/MuonSegmentMomentum"};
267 Gaudi::Property<Trk::RunOutlierRemoval>
m_runOutlier{
this,
"RunOutlier",
false,
"Switch whether to run outlier logics or not"};
268 Gaudi::Property<int>
m_matEffects{
this,
"MatEffects", 2,
"type of material interaction in extrapolation"};
274 this,
"edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
275 "Handle to the service providing the IMuonEDMHelperSvc interface"};
276 PublicToolHandle<MuonEDMPrinterTool>
m_printer{
this,
"MuonPrinterTool",
277 "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
279 this,
"TrackToSegmentTool",
280 "Muon::MuonTrackToSegmentTool/MuonTrackToSegmentTool"};
283 "MuonPhiHitSelector/MuonPhiHitSelector"};
284 ToolHandle<IMuonTrackCleaner>
m_cleaner{
this,
"TrackCleaner",
"Muon::MuonTrackCleaner/MuonTrackCleaner"};
286 this,
"SegmentInOverlapTool",
"Muon::MuonSegmentInOverlapResolvingTool/MuonSegmentInOverlapResolvingTool"};
288 this,
"TrackSummaryTool",
"Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"};
290 Gaudi::Property<bool>
m_slFit{
this,
"SLFit",
true,
"Perform sl fit"};
291 Gaudi::Property<bool>
m_slProp{
this,
"SLProp",
false,
"Enable straight line propagation"};
292 Gaudi::Property<bool>
m_seedWithSegmentTheta{
this,
"SeedWithSegmentTheta",
true,
"Seed with theta connecting first + last eta hit"};
293 Gaudi::Property<bool>
m_seedWithAvePhi{
this,
"SeedWithAvePhi",
true,
"Seed with average phi of all phi hits"};
294 Gaudi::Property<bool>
m_seedPhiWithEtaHits{
this,
"SeedPhiWithEtaHits",
false,
"Seed phi from positions first last eta hit"};
295 Gaudi::Property<bool>
m_usePreciseHits{
this,
"UsePreciseHits",
false,
"Use actual measurement error"};
296 Gaudi::Property<bool>
m_usePrefit{
this,
"UsePrefit",
true,
"Use prefit"};
297 Gaudi::Property<bool>
m_allowFirstFit{
this,
"AllowFirstFitResult",
false,
"Return the result of the prefit is final fit fails"};
299 "Momentum cut-off. Seeds below the threshold will not be fitted"};
300 Gaudi::Property<bool>
m_cosmics{
this,
"Cosmics",
false,
"Special treatment for cosmics"};
301 Gaudi::Property<bool>
m_cleanPhiHits{
this,
"CleanPhiHits",
true,
"Special flag to switch off phi hit cleaning"};
302 Gaudi::Property<unsigned int>
m_phiHitsMax{
this,
"MaxPatternPhiHits", 40,
303 "If more than maximum number of phi hits on pattern, no hits will be added"};
304 Gaudi::Property<bool>
m_seedAtStartOfTrack{
this,
"SeedAtStartOfTrack",
true,
"Provide seed parameters at the start of the track"};
306 "use precise hits in first station to stabalise the fit"};
309 "cut on the maximum difference in phi between measurements on the track"};
311 "minimum chi2/ndof for a track to be passed to cleaner"};
312 Gaudi::Property<double>
m_chi2Cut{
this,
"ReducedChi2Cut", 100.,
"minimum chi2/ndof for a track to be accepted"};
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
PublicToolHandle< MuonEDMPrinterTool > m_printer
tool to print out EDM objects
MaterialLayers materialLayers
bool extractData(const MuPatCandidateBase &entry1, const MuPatCandidateBase &entry2, FitterData &fitterData) const
extract all information needed for the fit from the track
Gaudi::Property< bool > m_seedPhiWithEtaHits
static double qOverPFromEntry(const MuPatCandidateBase &entry)
get q/p from entry
SLStationMap smallLargeChambersPerStation
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
Gaudi::Property< bool > m_seedWithSegmentTheta
int numberOfSmallChambers()
std::unique_ptr< Trk::Track > refit(const EventContext &ctx, const MuPatTrack &trkCan) const
refit a MuPatTrack
track candidate entry object.
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
PublicToolHandle< MuPatHitTool > m_hitHandler
hit handler
ToolHandle< IMuonSegmentMomentumEstimator > m_momentumEstimator
tool to estimate track momentum
Tool to fit a trajectory using a set of two segments or a track and a segment as input.
std::shared_ptr< const MuonSegment > segmentFromEntry(const EventContext &ctx, const MuPatCandidateBase &entry) const
get segment from entry
std::atomic_uint m_noPerigee
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
std::atomic_uint m_nfailedTubeFit
Gaudi::Property< double > m_chi2Cut
Gaudi::Property< double > m_openingAngleCut
double thetaSeeding(const MuPatCandidateBase &entry, MeasVec &etaHits) const
calculate theta used for seeding the fit
std::atomic_uint m_nsuccess
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
Gaudi::Property< int > m_matEffects
Gaudi::Property< bool > m_seedWithAvePhi
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
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
Gaudi::Property< double > m_pThreshold
This class provides conversion from CSC RDO data to CSC Digits.
ToolHandle< IMuonTrackToSegmentTool > m_trackToSegmentTool
helper tool to convert tracks into segments
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 getMaterial(const Trk::TrackParameters &pars, FitterData &fitterData) const
get material
MeasVec::const_iterator MeasCit
Gaudi::Property< bool > m_slProp
Gaudi::Property< double > m_preCleanChi2Cut
std::vector< const Trk::MeasurementBase * > MeasVec
std::unique_ptr< Trk::Perigee > startPars
Gaudi::Property< Trk::RunOutlierRemoval > m_runOutlier
static const InterfaceID & interfaceID()
access to tool interface
std::map< MuonStationIndex::StIndex, SmallLargeChambers > SLStationMap
std::vector< std::pair< const Trk::TrackParameters *, const Trk::Layer * > > MaterialLayers
Gaudi::Property< bool > m_cleanPhiHits
bool corruptEntry(const MuPatCandidateBase &entry) const
sanity check for entries
StatusCode finalize()
finialize method, method taken from bass-class AlgTool
NSWSeed::MeasVec MeasVec
Stereo seeds can be formed using hits from 4 independent layers by solving the following system of eq...
::StatusCode StatusCode
StatusCode definition for legacy code.
bool validMomentum(const Trk::TrackParameters &pars) const
check whether mometum of start parameter is ok
~MooTrackFitter()=default
destructor
unsigned int nLargeChambers
std::atomic_uint m_nfailedFakePrecise
Gaudi::Property< bool > m_usePrefit
const MuPatCandidateBase * firstEntry
void removeSegmentOutliers(FitterData &fitterData) const
Gaudi::Property< bool > m_preciseFirstStation
Trk::ParticleHypothesis m_ParticleHypothesis
nomen est omen
std::atomic_uint m_nlowMomentum
std::set< MuonStationIndex::StIndex > stations
std::atomic_uint m_nfailedMinMaxPhi
@ FullField
Field is set to be realistic, but within a given Volume.
ToolHandle< IMuonHitSelector > m_phiHitSelector
tool to clean phi hits
const MuPatCandidateBase * secondEntry
std::set< Identifier > mdtIdsSecond
static double restrictedMomentum(double momentum)
impose upper and lower bound on momentum
Ensure that the ATLAS eigen extensions are properly loaded.
Gaudi::Property< bool > m_allowFirstFit
StatusCode initialize()
initialize method, method taken from bass-class AlgTool
Gaudi::Property< bool > m_cosmics
MooTrackFitter(const std::string &, const std::string &, const IInterface *)
default AlgTool constructor
ToolHandle< Trk::ITrackSummaryHelperTool > m_trackSummaryTool
std::atomic_uint m_nfailedFitPrecise
void cleanSegment(const MuonSegment &seg, std::set< Identifier > &removedIdentifiers) const
MeasVec firstLastMeasurements
PrepVec::const_iterator PrepCit
Eigen::Matrix< double, 3, 1 > Vector3D
std::vector< MuPatHitPtr > MuPatHitList
std::vector< const Trk::PrepRawData * > PrepVec
std::atomic_uint m_nfailedParsInital
ToolHandle< Trk::IPropagator > m_propagator
propagator
Trk::MagneticFieldProperties m_magFieldProperties
magnetic field properties
unsigned int hasPhiConstrain(FitterData &inputData) const
check whether data has sufficient phi constraints
int numberOfLargeChambers()
std::atomic_uint m_nfailedFakeInitial
std::set< Identifier > mdtIdsFirst
unsigned int nSmallChambers
ToolHandle< IMuonTrackCleaner > m_cleaner
std::unique_ptr< Trk::Track > fitWithRefit(const EventContext &ctx, const Trk::Perigee &startPars, MeasVec &hits) const
fit track, refit if needed
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 extra...
Gaudi::Property< bool > m_slFit
ToolHandle< Trk::ITrackFitter > m_trackFitter
fitter
double phiSeeding(const EventContext &ctx, FitterData &fitterData) const
calculate phi used to for seeding the fit
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
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
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
Gaudi::Property< bool > m_seedAtStartOfTrack
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
ToolHandle< IMuonSegmentInOverlapResolvingTool > m_overlapResolver
std::pair< double, double > getElementHalfLengths(const Identifier &id, const Trk::TrkDetElementBase *ele) const
std::vector< std::unique_ptr< const Trk::MeasurementBase > > garbage