ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrackSegmentMatchResult.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 * Author : Martin Woudstra
7 ***************************************************************************/
8
9#ifndef MUONTRACKSEGMENTMATCHRESULT_H
10#define MUONTRACKSEGMENTMATCHRESULT_H
11
12// std
13#include <string>
14// other packages
16#include "Identifier/Identifier.h"
17
18namespace Trk {
19 class Track;
20}
21
22// this package
23
24namespace Muon {
25
26 class MuonSegment;
27
30 //
31 // nested types
32 //
45
47 static std::string cutString(CutType cut);
48
74
76 static std::string reasonString(Reason r);
77
78 //
79 // public data members
80 //
81 double localPosXDiff{};
82 double localPosYDiff{};
85 double posXMeasErr2{};
86 double posYMeasErr2{};
87 double posXPredErr2{};
88 double posYPredErr2{};
89 double posXAlignErr2{};
90 double posYAlignErr2{};
91 double posXTotalErr2{}; // measured + predicted + alignment
92 double posYTotalErr2{}; // measured + predicted + alignment
99 double angleXTotalErr2{}; // measured + predicted + alignment
100 double angleYTotalErr2{}; // measured + predicted + alignment
104 Amg::MatrixX totalCovariance; // measured + predicted + alignment
106 Identifier trackChamberId; // ID of the MDT/CSC chamber on the track closest to segment
107 Identifier segmentChamberId; // ID of the MDT/CSC chamber of the segment
110 Reason reason; // reason for acceptance or failure
111 bool havePosX{}; // have X position difference available
112 bool havePosY{}; // have Y position difference available
113 bool havePosXError{}; // have total error on X position difference available
114 bool havePosYError{}; // have total error on Y position difference available
115 bool haveAngleX{}; // have X angle difference available
116 bool haveAngleY{}; // have Y angle difference available
117 bool haveAngleXError{}; // have total error on X angle difference available
118 bool haveAngleYError{}; // have total error on X angle difference available
119 bool haveMatchChiSquared{}; // have total match chi-squared available
120 bool matchOK{}; // Final result: was the match OK or not
121
122 //
123 // public functions
124 //
126 virtual ~TrackSegmentMatchResult();
127
128 virtual void clear();
129
131 void resetCuts() {
132 m_failedCuts = 0;
133 m_passedCuts = 0;
134 }
135
137 void setCutPassed(CutType cut) { m_passedCuts |= (1 << cut); }
138
140 void setCutFailed(CutType cut) { m_failedCuts |= (1 << cut); }
141
143 bool passedCut(CutType cut) const { return !(m_failedCuts & (1 << cut)); }
144
146 bool failedCut(CutType cut) const { return (m_failedCuts & (1 << cut)); }
147
149 bool appliedCut(CutType cut) const { return (m_passedCuts & (1 << cut)) || (m_failedCuts & (1 << cut)); }
150
152 bool appliedAnyCut() const { return m_passedCuts || m_failedCuts; }
153
155 bool passedAllCuts() const { return !m_failedCuts; }
156
158 std::string failedCutsString() const;
159
161 std::string passedCutsString() const;
162
163 std::string reasonString() const;
164
165 private:
166 //
167 // private data members
168 //
169 int m_failedCuts{}; // bitpattern with failed cuts (bits given by enum CutType)
170 int m_passedCuts{}; // bitpattern with passed cuts (bits given by enum CutType)
171
172 }; // end of class TrackSegmentMatchResult
173
175 double posXCut{};
176 double posYCut{};
177 double posXPullCut{};
178 double posYPullCut{};
179 double angleXCut{};
180 double angleYCut{};
185 bool cutOnPosX{};
186 bool cutOnPosY{};
194
195 virtual void clear();
196
199 };
200
201} // namespace Muon
202
203#endif // MUONCOMBITRACKMAKER_MUONTRACKSEGMENTMATCHRESULT_H
This is the common class for 3D segments used in the muon spectrometer.
int r
Definition globals.cxx:22
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
bool passedAllCuts() const
Did all of the cuts that were applied pass?
void resetCuts()
Reset all cuts (applied & passed)
void setCutPassed(CutType cut)
Set cut applied and cut passed.
bool appliedAnyCut() const
Was any cut applied ?
bool passedCut(CutType cut) const
Did it pass the cut?
bool failedCut(CutType cut) const
Did it fail the cut?
void setCutFailed(CutType cut)
Set cut applied, but not cut passed.
std::string failedCutsString() const
String with all cuts that were applied and failed.
bool appliedCut(CutType cut) const
Was the cut applied ?
static std::string cutString(CutType cut)
turn enum CutType into a string
std::string passedCutsString() const
String with all cuts that were applied and passed.