|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef SORTMEASUREMENTSBYPOSITION_H
6 #define SORTMEASUREMENTSBYPOSITION_H
26 return difPos.mag() *
sign;
59 double operator()(
const std::pair<bool, const Trk::TrackStateOnSurface*>& tsos1,
60 const std::pair<bool, const Trk::TrackStateOnSurface*>& tsos2) {
63 double operator()(
const std::unique_ptr<const Trk::TrackStateOnSurface>& tsos1,
64 const std::unique_ptr<const Trk::TrackStateOnSurface>& tsos2) {
84 std::cout <<
"Muon::SortTSOSs: state 1 without parameters " << std::endl;
88 std::cout <<
"Muon::SortTSOSs: state 2 without parameters " << std::endl;
102 if (tsos1->
type(Trk::TrackStateOnSurface::TrackStateOnSurfaceType::CaloDeposit) ||
103 tsos2->
type(Trk::TrackStateOnSurface::TrackStateOnSurfaceType::CaloDeposit)) {
104 if (okId1 && tsos2->
type(Trk::TrackStateOnSurface::TrackStateOnSurfaceType::CaloDeposit))
return false;
105 if (tsos1->
type(Trk::TrackStateOnSurface::TrackStateOnSurfaceType::CaloDeposit) && okId2)
return true;
113 double dist = (pos2 - pos1).
dot(trackDir);
115 if (std::abs(dist) < 1
e-5) {
117 if (okId1 && !okId2)
return true;
118 if (!okId1 && okId2)
return false;
120 if (!okId1 && !okId2)
return false;
125 if (measPhi1 && !measPhi2)
return true;
126 if (!measPhi1 && measPhi2)
return false;
129 double inOrOut = (pos1 + pos2).
dot(trackDir);
130 if (inOrOut >= 0.0) {
141 bool operator()(
const std::unique_ptr<const Trk::TrackStateOnSurface>& tsos1,
142 const std::unique_ptr<const Trk::TrackStateOnSurface>& tsos2)
const {
143 return this->
operator()(tsos1.get(), tsos2.get());
160 double d1 =
m_isEndcap ? std::abs(
m1->globalPosition().z()) : std::abs(
m1->globalPosition().perp());
161 double d2 =
m_isEndcap ? std::abs(
m2->globalPosition().z()) : std::abs(
m2->globalPosition().perp());
171 if (
cm->numberOfContainedROTs() != 0)
return &
cm->rioOnTrack(
cm->indexOfMaxAssignProb());
Amg::Vector3D m_dummyPosition
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
virtual bool isMuon(const Identifier &id) const =0
returns whether this is a Muon Identifier or not
virtual Identifier getIdentifier(const Trk::MeasurementBase &meas) const =0
tries to get Identifier for measurement, if not possible it will return Identifier()
Helper tool containing functionality needed by multiple tools.
SortMeasurementsByPosition(bool hasEndcap=true)
bool operator()(const Trk::TrackStateOnSurface *tsos1, const Trk::TrackStateOnSurface *tsos2) const
bool operator()(const Trk::MeasurementBase *meas1, const Trk::MeasurementBase *meas2)
const IMuonIdHelperSvc * m_idHelperSvc
const Trk::MeasurementBase * getMeas(const Trk::MeasurementBase *meas) const
double operator()(const Trk::TrackStateOnSurface *tsos1, const Trk::TrackStateOnSurface *tsos2)
const Amg::Vector3D & position() const
Access method for the position.
bool operator()(const std::unique_ptr< const Trk::TrackStateOnSurface > &tsos1, const std::unique_ptr< const Trk::TrackStateOnSurface > &tsos2) const
Amg::Vector3D m_dummyPosition
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
double operator()(const std::pair< bool, const Trk::TrackStateOnSurface * > &tsos1, const std::pair< bool, const Trk::TrackStateOnSurface * > &tsos2)
virtual bool measuresPhi(const Identifier &id) const =0
returns whether channel measures phi or not
This class provides conversion from CSC RDO data to CSC Digits.
bool is_valid() const
Check if id is in a valid state.
Amg::Vector3D position(const Trk::TrackStateOnSurface &tsos) const
SortTSOSsByPos(bool isEndcap)
const IMuonEDMHelperSvc * m_helperSvc
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
Workaround x86 precision issues for FP inequality comparisons.
def dot(G, fn, nodesToHighlight=[])
double operator()(const std::unique_ptr< const Trk::TrackStateOnSurface > &tsos1, const std::unique_ptr< const Trk::TrackStateOnSurface > &tsos2)
double operator()(const Amg::Vector3D &pos) const
represents the track state (measurement, material, fit parameters and quality) at a surface.
SortTSOSs(const IMuonEDMHelperSvc *h, const IMuonIdHelperSvc *idh)
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
bool less(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Eigen::Matrix< double, 3, 1 > Vector3D
DistanceToPars m_distToPars
DistanceToPars(const Trk::TrackParameters *pars)
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Trk::TrackParameters * m_pars
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
SortTSOSByDistanceToPars(const Trk::TrackParameters *pars)
Amg::Vector3D position(const Trk::TrackStateOnSurface &tsos)