ATLAS Offline Software
Loading...
Searching...
No Matches
MdtSegmentT0Fitter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Fitting for in situ calibration of segments
6#ifndef MUON_MDTSEGMENTT0FITTER_H
7#define MUON_MDTSEGMENTT0FITTER_H
8
10#include "GaudiKernel/ToolHandle.h"
11#include "GaudiKernel/ServiceHandle.h"
12
15
18
19#include <atomic>
20#include <vector>
21#include <memory>
22
23namespace TrkDriftCircleMath {
24
25 class MdtSegmentT0Fitter : public AthAlgTool, public DCSLFitter, virtual public Muon::IDCSLFitProvider {
26 public:
27
28 MdtSegmentT0Fitter(const std::string&,const std::string&,const IInterface*);
29 virtual ~MdtSegmentT0Fitter()=default;
30 virtual StatusCode initialize() override;
31 virtual StatusCode finalize() override;
32
33 virtual bool fit( Segment& result, const Line& line, const DCOnTrackVec& dcs, double t0Seed ) const override;
34 virtual bool fit( Segment& result, const Line& line, const DCOnTrackVec& dcs, const HitSelection& selection, double t0Seed ) const override;
35
36 virtual const DCSLFitter* getFitter() const override { return this; }
37
38 private:
39
41 "Conditions object containing the calibrations"};
42
43 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
44
45 Gaudi::Property<bool> m_rejectWeakTopologies{this,"RejectWeakTopologies",true,"reject topolgies that do not have at least one +- combination in one multilayer"};
46 Gaudi::Property<bool> m_scaleErrors{this,"RescaleErrors",true,"rescale errors in fit"};
47 Gaudi::Property<bool> m_propagateErrors{this,"PropagateErrors",true,"propagate errors"};
48 Gaudi::Property<int> m_minHits{this,"MinimumHits",4,"minimum number of selected hits for t0 fit. Otherwise use default"};
49 Gaudi::Property<float> m_dRTol{this,"dRTolerance",0.1};
50
51 Gaudi::Property<bool> m_floatDir{this, "FloatSegDirection", false,
52 "If set to true, the line of the segment is simultaenously fitted with t0"};
53 // counters
54 mutable std::atomic_uint m_ntotalCalls{0};
55 mutable std::atomic_uint m_npassedNHits{0};
56 mutable std::atomic_uint m_npassedSelectionConsistency{0};
57 mutable std::atomic_uint m_npassedNSelectedHits{0};
58 mutable std::atomic_uint m_npassedMinHits{0};
59 mutable std::atomic_uint m_npassedMinuitFit{0};
60
61 };
62
63 inline bool MdtSegmentT0Fitter::fit( Segment& result, const Line& line, const DCOnTrackVec& dcs, double t0Seed ) const {
64 HitSelection selection(dcs.size(),0);
65 return fit( result, line, dcs, selection, t0Seed );
66 }
67}
68
69#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Interface for tools resolving ambigueties and remove outliers in Muon::MuonSegment objects.
Gaudi::Property< bool > m_rejectWeakTopologies
virtual StatusCode initialize() override
virtual const DCSLFitter * getFitter() const override
fitter factory
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual bool fit(Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed) const override
MdtSegmentT0Fitter(const std::string &, const std::string &, const IInterface *)
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_calibDbKey
const std::string selection
Function object to check whether two Segments are sub/super sets or different.
std::vector< bool > HitSelection
Definition HitSelection.h:9
std::vector< DCOnTrack > DCOnTrackVec
Definition DCOnTrack.h:59