ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrackSelectorTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUON_MUONTRACKSELECTOR_H
6#define MUON_MUONTRACKSELECTOR_H
7
8#include <atomic>
9#include <set>
10#include <string>
11#include <vector>
12
14#include "GaudiKernel/ServiceHandle.h"
15#include "GaudiKernel/ToolHandle.h"
21#include "TrkTrack/Track.h"
22
23namespace Trk {
24 class Track;
25}
26
27namespace Muon {
28
34 public:
36 MuonTrackSelectorTool(const std::string&, const std::string&, const IInterface*);
37
39 virtual ~MuonTrackSelectorTool() = default;
40
42 StatusCode initialize();
43
45 StatusCode finalize();
46
53 std::vector<Identifier> holesInChamber(const Trk::TrackParameters& pars, const Identifier& chId,
54 const std::set<Identifier>& tubeIds) const;
55
57 bool decision(Trk::Track& track) const;
58
59 private:
60 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
62 this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
63 "Handle to the service providing the IMuonEDMHelperSvc interface"};
64 PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
65 "helper to nicely print out tracks"};
66 ToolHandle<Trk::ITrackSummaryHelperTool> m_trackSummaryTool{this, "TrackSummaryHelperTool",
67 "Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"};
68
69 Gaudi::Property<double> m_holeHitRatioCutPerStation{this, "HolesToHitsRatioCutPerStation", 1.1};
70 Gaudi::Property<double> m_chi2NDofCut{this, "Chi2NDofCut", 20};
71 Gaudi::Property<unsigned int> m_minMdtHitsPerStation{this, "MinimumNumberOfMdtHitsPerStation", 3};
72 Gaudi::Property<unsigned int> m_maxMdtHolesPerTwoStationTrack{this, "MaxMdtHolesOnTwoStationTrack", 5};
73 Gaudi::Property<unsigned int> m_maxMdtHolesPerTrack{this, "MaxMdtHolesOnTrack", 5};
74 Gaudi::Property<unsigned int> m_minCscHitsPerStation{this, "MinimumNumberOfCscHitsPerStation", 3 };
75
76 Gaudi::Property<bool> m_useRPCHoles{this, "UseRPCHoles", true};
77 Gaudi::Property<bool> m_useTGCHoles{this, "UseTGCHoles", true};
78 Gaudi::Property<bool> m_useCSCHoles{this, "UseCSCHoles", true};
79 Gaudi::Property<bool> m_useMDTHoles{this, "UseMDTHoles", true};
80 Gaudi::Property<bool> m_ignoreTriggerHolesInLayersWithHits{this, "IgnoreTriggerHolesInChamberWithHits", true};
81 Gaudi::Property<bool> m_useRPCTimeWindow{this, "ApplyRPCTimeWindow", false};
82 Gaudi::Property<bool> m_removeTwoStationTrackWithoutTriggerHits{this, "RemoveTwoStationTrackWithoutTriggerHits", false};
83 Gaudi::Property<bool> m_countMdtOutliersAsHoles{this, "CountMDTOutlierAsHoles", false};
84 Gaudi::Property<bool> m_removeSingleStationTracks{this, "RemoveSingleStationTracks", false};
85 Gaudi::Property<bool> m_tightSingleStationCuts{this, "TightSingleStationCuts", false};
86
87 Gaudi::Property<bool> m_requireSanePerigee{this,"RequireSanePerigee", true,
88 "Ensures that the covariance of the perigee parameters has a positive trace"};
89
91 struct StationData {
92 StationData() = default;
93 bool isMdt{false};
94 bool isCsc{false};
95 bool isNSW{false};
96 bool isTrigger{false};
98 bool mdtHasHitsinMl1{false};
99 bool mdtHasHitsinMl2{false};
100 unsigned int netaHits{0};
101 unsigned int nphiHits{0};
102 unsigned int netaHoles{0};
103 unsigned int nphiHoles{0};
104
105 unsigned int netaTrigHits{0};
106 unsigned int nphiTrigHits{0};
107 unsigned int netaTrigHoles{0};
108 unsigned int nphiTrigHoles{0};
109 };
110
112 mutable std::atomic_uint m_ntotalTracks{0};
113 mutable std::atomic_uint m_failedChi2NDofCut{0};
114 mutable std::atomic_uint m_failedSingleStationCut{0};
115 mutable std::atomic_uint m_failedRPCAveMinTimeCut{0};
116 mutable std::atomic_uint m_failedRPCAveMaxTimeCut{0};
117 mutable std::atomic_uint m_failedRPCSpreadTimeCut{0};
118 mutable std::atomic_uint m_failedTwoStationsCut{0};
119 mutable std::atomic_uint m_failedTwoStationsMaxMDTHoleCut{0};
120 mutable std::atomic_uint m_failedTwoStationsMaxHoleCut{0};
121 mutable std::atomic_uint m_failedTwoStationsGoodStationCut{0};
122 mutable std::atomic_uint m_failedTriggerStationCut{0};
123 mutable std::atomic_uint m_failedMaxMDTHoleCut{0};
124 mutable std::atomic_uint m_failedMaxHoleCut{0};
125 };
126
127} // namespace Muon
128
129#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< unsigned int > m_minMdtHitsPerStation
Gaudi::Property< bool > m_removeTwoStationTrackWithoutTriggerHits
Gaudi::Property< bool > m_removeSingleStationTracks
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
std::atomic_uint m_ntotalTracks
counter for statistics
Gaudi::Property< unsigned int > m_maxMdtHolesPerTrack
Gaudi::Property< bool > m_useRPCHoles
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
EDM Helper tool.
std::atomic_uint m_failedTwoStationsMaxMDTHoleCut
Gaudi::Property< double > m_chi2NDofCut
ToolHandle< Trk::ITrackSummaryHelperTool > m_trackSummaryTool
StatusCode initialize()
AlgTool initilize.
MuonTrackSelectorTool(const std::string &, const std::string &, const IInterface *)
constructor
Gaudi::Property< double > m_holeHitRatioCutPerStation
virtual ~MuonTrackSelectorTool()=default
destructor
Gaudi::Property< bool > m_useCSCHoles
std::atomic_uint m_failedTwoStationsMaxHoleCut
Gaudi::Property< bool > m_tightSingleStationCuts
Gaudi::Property< bool > m_ignoreTriggerHolesInLayersWithHits
StatusCode finalize()
AlgTool finalize.
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
bool decision(Trk::Track &track) const
returns true if the track satisfies the selection criteria else false
std::atomic_uint m_failedTwoStationsGoodStationCut
Gaudi::Property< bool > m_useRPCTimeWindow
Gaudi::Property< unsigned int > m_minCscHitsPerStation
Gaudi::Property< bool > m_requireSanePerigee
Gaudi::Property< unsigned int > m_maxMdtHolesPerTwoStationTrack
Gaudi::Property< bool > m_useTGCHoles
std::vector< Identifier > holesInChamber(const Trk::TrackParameters &pars, const Identifier &chId, const std::set< Identifier > &tubeIds) const
calculate holes in a given chamber using local straight line extrapolation
Gaudi::Property< bool > m_useMDTHoles
Gaudi::Property< bool > m_countMdtOutliersAsHoles
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< TrackParametersDim, Charged > TrackParameters