Skip to content
Snippets Groups Projects
Commit 980c92b2 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'MeasurementBase_derived_final' into 'master'

Measurement Base Derived classes. Add override / final clang-tidy checks

See merge request atlas/athena!39728
parents 5f7dd53d 1bc9d841
No related branches found
No related tags found
No related merge requests found
Showing
with 191 additions and 183 deletions
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -45,7 +45,7 @@ namespace InDet { ...@@ -45,7 +45,7 @@ namespace InDet {
@author Veronique.Boisvert@cern.ch, Edward.Moyse@cern.ch, Andreas.Salzburger@cern.ch @author Veronique.Boisvert@cern.ch, Edward.Moyse@cern.ch, Andreas.Salzburger@cern.ch
*/ */
class PixelClusterOnTrack : public SiClusterOnTrack { class PixelClusterOnTrack final: public SiClusterOnTrack {
public: public:
friend class Trk::ITrkEventCnvTool; friend class Trk::ITrkEventCnvTool;
...@@ -108,11 +108,11 @@ namespace InDet { ...@@ -108,11 +108,11 @@ namespace InDet {
virtual ~PixelClusterOnTrack(); virtual ~PixelClusterOnTrack();
/** Pseudo-constructor : needed to avoid excessive RTTI*/ /** Pseudo-constructor : needed to avoid excessive RTTI*/
virtual PixelClusterOnTrack* clone() const override; virtual PixelClusterOnTrack* clone() const override final;
/** returns the surface for the local to global transformation /** returns the surface for the local to global transformation
- fullfills Trk::MeasurementBase interface*/ - fullfills Trk::MeasurementBase interface*/
virtual const Trk::Surface& associatedSurface() const override; virtual const Trk::Surface& associatedSurface() const override final;
virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final
{ {
...@@ -122,13 +122,13 @@ namespace InDet { ...@@ -122,13 +122,13 @@ namespace InDet {
/** returns the PrepRawData - is a SiCluster in this scope /** returns the PrepRawData - is a SiCluster in this scope
- fullfills Trk::RIO_OnTrack interface*/ - fullfills Trk::RIO_OnTrack interface*/
virtual const PixelCluster* prepRawData() const override; virtual const PixelCluster* prepRawData() const override final;
const ElementLinkToIDCPixelClusterContainer& prepRawDataLink() const; const ElementLinkToIDCPixelClusterContainer& prepRawDataLink() const;
/** returns the detector element, assoicated with the PRD of this class /** returns the detector element, assoicated with the PRD of this class
- fullfills Trk::RIO_OnTrack interface*/ - fullfills Trk::RIO_OnTrack interface*/
virtual const InDetDD::SiDetectorElement* detectorElement() const override; virtual const InDetDD::SiDetectorElement* detectorElement() const override final;
/** returns whether there was an ambiguity associated with this pixel cluster. /** returns whether there was an ambiguity associated with this pixel cluster.
...@@ -144,18 +144,20 @@ namespace InDet { ...@@ -144,18 +144,20 @@ namespace InDet {
float energyLoss() const; float energyLoss() const;
/**returns some information about this RIO_OnTrack.*/ /**returns some information about this RIO_OnTrack.*/
virtual MsgStream& dump( MsgStream& out ) const override; virtual MsgStream& dump( MsgStream& out ) const override final;
/**returns some information about this RIO_OnTrack.*/ /**returns some information about this RIO_OnTrack.*/
virtual std::ostream& dump( std::ostream& out ) const override; virtual std::ostream& dump( std::ostream& out ) const override final;
private: private:
friend class PixelClusterOnTrackCnv_p1; friend class PixelClusterOnTrackCnv_p1;
friend class ::FakeTrackBuilder; friend class ::FakeTrackBuilder;
/** ONLY for use in custom convertor /** ONLY for use in custom convertor
Allows the custom convertor to reset values when persistying/reading back RoTs*/ Allows the custom convertor to reset values when persistying/reading back
virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd) override; RoTs*/
virtual void setValues(const Trk::TrkDetElementBase* detEl,
const Trk::PrepRawData* prd) override final;
/** PixelCluster - the RIO (PRD, PrepRawData)*/ /** PixelCluster - the RIO (PRD, PrepRawData)*/
ElementLinkToIDCPixelClusterContainer m_rio; ElementLinkToIDCPixelClusterContainer m_rio;
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -40,7 +40,7 @@ namespace InDet{ ...@@ -40,7 +40,7 @@ namespace InDet{
@author Veronique.Boisvert@cern.ch, Edward.Moyse@cern.ch, Andreas.Salzburger@cern.ch @author Veronique.Boisvert@cern.ch, Edward.Moyse@cern.ch, Andreas.Salzburger@cern.ch
*/ */
class SCT_ClusterOnTrack : public SiClusterOnTrack{ class SCT_ClusterOnTrack final : public SiClusterOnTrack {
public: public:
friend class Trk::ITrkEventCnvTool; friend class Trk::ITrkEventCnvTool;
...@@ -116,12 +116,12 @@ namespace InDet{ ...@@ -116,12 +116,12 @@ namespace InDet{
virtual ~SCT_ClusterOnTrack() = default; virtual ~SCT_ClusterOnTrack() = default;
/** Pseudo-constructor */ /** Pseudo-constructor */
virtual SCT_ClusterOnTrack* clone() const override; virtual SCT_ClusterOnTrack* clone() const override final;
/** returns the surface for the local to global transformation /** returns the surface for the local to global transformation
- fullfills the Trk::MeasurementBase interface - fullfills the Trk::MeasurementBase interface
*/ */
virtual const Trk::Surface& associatedSurface() const override; virtual const Trk::Surface& associatedSurface() const override final;
virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final
{ {
...@@ -132,7 +132,7 @@ namespace InDet{ ...@@ -132,7 +132,7 @@ namespace InDet{
/** returns the PrepRawData - is a SCT_Cluster in this scope /** returns the PrepRawData - is a SCT_Cluster in this scope
- fullfills the Trk::RIO_OnTrack interface - fullfills the Trk::RIO_OnTrack interface
*/ */
virtual const InDet::SCT_Cluster* prepRawData() const override; virtual const InDet::SCT_Cluster* prepRawData() const override final;
const ElementLinkToIDCSCT_ClusterContainer& prepRawDataLink() const; const ElementLinkToIDCSCT_ClusterContainer& prepRawDataLink() const;
...@@ -140,28 +140,29 @@ namespace InDet{ ...@@ -140,28 +140,29 @@ namespace InDet{
/** returns the detector element, assoicated with the PRD of this class /** returns the detector element, assoicated with the PRD of this class
- fullfills the Trk::RIO_OnTrack interface - fullfills the Trk::RIO_OnTrack interface
*/ */
virtual const InDetDD::SiDetectorElement* detectorElement() const override; virtual const InDetDD::SiDetectorElement* detectorElement() const override final;
/**returns some information about this RIO_OnTrack.*/ /**returns some information about this RIO_OnTrack.*/
virtual MsgStream& dump( MsgStream& out ) const override; virtual MsgStream& dump( MsgStream& out ) const override final;
/**returns some information about this RIO_OnTrack.*/ /**returns some information about this RIO_OnTrack.*/
virtual std::ostream& dump( std::ostream& out ) const override; virtual std::ostream& dump( std::ostream& out ) const override final;
double positionAlongStrip() const; double positionAlongStrip() const;
private: private:
/** ONLY for use in custom convertor /** ONLY for use in custom convertor
Allows the custom convertor to reset values when persistying/reading back RoTs*/ Allows the custom convertor to reset values when persistying/reading
virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd) override; back RoTs*/
virtual void setValues(const Trk::TrkDetElementBase* detEl,
const Trk::PrepRawData* prd) override final;
/** SCT_Cluster - the RIO (PRD, PrepRawData)*/ /** SCT_Cluster - the RIO (PRD, PrepRawData)*/
ElementLinkToIDCSCT_ClusterContainer m_rio; ElementLinkToIDCSCT_ClusterContainer m_rio;
/** corresponding detector element*/ /** corresponding detector element*/
const InDetDD::SiDetectorElement* m_detEl; const InDetDD::SiDetectorElement* m_detEl;
double m_positionAlongStrip; double m_positionAlongStrip;
}; };
inline SCT_ClusterOnTrack* SCT_ClusterOnTrack::clone() const inline SCT_ClusterOnTrack* SCT_ClusterOnTrack::clone() const
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -49,8 +49,8 @@ namespace InDet{ ...@@ -49,8 +49,8 @@ namespace InDet{
@author Andreas.Salzburger@cern.ch @author Andreas.Salzburger@cern.ch
*/ */
class TRT_DriftCircleOnTrack : public Trk::RIO_OnTrack{ class TRT_DriftCircleOnTrack final: public Trk::RIO_OnTrack {
public: public:
friend class Trk::ITrkEventCnvTool; friend class Trk::ITrkEventCnvTool;
/**Default constructor - needed for POOL*/ /**Default constructor - needed for POOL*/
...@@ -60,7 +60,7 @@ namespace InDet{ ...@@ -60,7 +60,7 @@ namespace InDet{
/**Assignment operator*/ /**Assignment operator*/
TRT_DriftCircleOnTrack &operator=(const TRT_DriftCircleOnTrack &); TRT_DriftCircleOnTrack &operator=(const TRT_DriftCircleOnTrack &);
/**Move assignment operator*/ /**Move assignment operator*/
TRT_DriftCircleOnTrack &operator=(TRT_DriftCircleOnTrack &&); TRT_DriftCircleOnTrack &operator=(TRT_DriftCircleOnTrack &&) noexcept;
/** Constructor with parameters and without externalPrediction: /** Constructor with parameters and without externalPrediction:
RIO pointer, LocalPosition*, LocalErrorMatrix*, RIO pointer, LocalPosition*, LocalErrorMatrix*,
...@@ -95,18 +95,18 @@ namespace InDet{ ...@@ -95,18 +95,18 @@ namespace InDet{
virtual ~TRT_DriftCircleOnTrack(); virtual ~TRT_DriftCircleOnTrack();
/**allows copying without losing the type information. Used in Trk::Track*/ /**allows copying without losing the type information. Used in Trk::Track*/
virtual TRT_DriftCircleOnTrack* clone() const override; virtual TRT_DriftCircleOnTrack* clone() const override final;
/** return the global position of this RIO_OnTrack /** return the global position of this RIO_OnTrack
@todo convention about z coordinate @todo convention about z coordinate
- fullfills Trk::MeasurementBase interface - fullfills Trk::MeasurementBase interface
*/ */
virtual const Amg::Vector3D& globalPosition() const override; virtual const Amg::Vector3D& globalPosition() const override final;
/** returns the surface for the local to global transformation /** returns the surface for the local to global transformation
- fullfills Trk::MeasurementBase interface - fullfills Trk::MeasurementBase interface
*/ */
virtual const Trk::Surface& associatedSurface() const override; virtual const Trk::Surface& associatedSurface() const override final;
virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final
{ {
...@@ -116,18 +116,18 @@ namespace InDet{ ...@@ -116,18 +116,18 @@ namespace InDet{
/** returns the PrepRawData - is a TRT_DriftCircle in this scope /** returns the PrepRawData - is a TRT_DriftCircle in this scope
- fullfills Trk::RIO_OnTrack interface - fullfills Trk::RIO_OnTrack interface
*/ */
virtual const TRT_DriftCircle* prepRawData() const override; virtual const TRT_DriftCircle* prepRawData() const override final;
const ElementLinkToIDCTRT_DriftCircleContainer& prepRawDataLink() const; const ElementLinkToIDCTRT_DriftCircleContainer& prepRawDataLink() const;
/** returns the DE hashID /** returns the DE hashID
- fullfills Trk::RIO_OnTrack interface - fullfills Trk::RIO_OnTrack interface
*/ */
virtual IdentifierHash idDE() const override; virtual IdentifierHash idDE() const override final;
/** returns the detector element, assoicated with the PRD of this class /** returns the detector element, assoicated with the PRD of this class
- fullfills Trk::RIO_OnTrack interface - fullfills Trk::RIO_OnTrack interface
*/ */
virtual const InDetDD::TRT_BaseElement* detectorElement() const override; virtual const InDetDD::TRT_BaseElement* detectorElement() const override final;
/** returns the side on which the drift radius is. /** returns the side on which the drift radius is.
(for more information see the definition of (for more information see the definition of
...@@ -151,9 +151,9 @@ namespace InDet{ ...@@ -151,9 +151,9 @@ namespace InDet{
double timeOverThreshold() const; double timeOverThreshold() const;
/**returns some information about this RIO_OnTrack.*/ /**returns some information about this RIO_OnTrack.*/
virtual MsgStream& dump( MsgStream& out ) const override; virtual MsgStream& dump( MsgStream& out ) const override final;
/**returns some information about this RIO_OnTrack.*/ /**returns some information about this RIO_OnTrack.*/
virtual std::ostream& dump( std::ostream& out ) const override; virtual std::ostream& dump( std::ostream& out ) const override final;
float localAngle() const; float localAngle() const;
float positionAlongWire() const; float positionAlongWire() const;
...@@ -162,8 +162,9 @@ namespace InDet{ ...@@ -162,8 +162,9 @@ namespace InDet{
private: private:
/** ONLY for use in custom convertor /** ONLY for use in custom convertor
Allows the custom convertor to reset values when persistying/reading back RoTs*/ Allows the custom convertor to reset values when persistying/reading back RoTs*/
virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd) override; virtual void setValues(const Trk::TrkDetElementBase* detEl,
const Trk::PrepRawData* prd) override final;
/** @calculate and set the global coord of this hit. /** @calculate and set the global coord of this hit.
The detector element surface is used. Can be used from the convertor The detector element surface is used. Can be used from the convertor
after setValues if the element is constructed without a detEl*/ after setValues if the element is constructed without a detEl*/
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -93,7 +93,7 @@ InDet::PixelClusterOnTrack::PixelClusterOnTrack() ...@@ -93,7 +93,7 @@ InDet::PixelClusterOnTrack::PixelClusterOnTrack()
m_hasClusterAmbiguity(false), m_hasClusterAmbiguity(false),
m_isFake(false), m_isFake(false),
m_energyLoss(0.), m_energyLoss(0.),
m_detEl(0) m_detEl(nullptr)
{} {}
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -142,7 +142,7 @@ InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( const I ...@@ -142,7 +142,7 @@ InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( const I
//move assignment operator: //move assignment operator:
InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( InDet::TRT_DriftCircleOnTrack&& rot) InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( InDet::TRT_DriftCircleOnTrack&& rot)
{ noexcept {
if ( &rot != this) { if ( &rot != this) {
Trk::RIO_OnTrack::operator= (rot); Trk::RIO_OnTrack::operator= (rot);
m_globalPosition = std::move(rot.m_globalPosition); m_globalPosition = std::move(rot.m_globalPosition);
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
// //
...@@ -43,7 +43,7 @@ namespace Muon ...@@ -43,7 +43,7 @@ namespace Muon
{ {
/** @brief Class to represent the calibrated clusters created from CSC strips*/ /** @brief Class to represent the calibrated clusters created from CSC strips*/
class CscClusterOnTrack : public MuonClusterOnTrack class CscClusterOnTrack final: public MuonClusterOnTrack
{ {
public: public:
...@@ -91,18 +91,18 @@ public: ...@@ -91,18 +91,18 @@ public:
virtual ~CscClusterOnTrack(); virtual ~CscClusterOnTrack();
/** @brief Clone this ROT */ /** @brief Clone this ROT */
virtual CscClusterOnTrack* clone() const ; virtual CscClusterOnTrack* clone() const override final;
/** @brief Returns the CscPrepData - is a CscPrepData in this scope*/ /** @brief Returns the CscPrepData - is a CscPrepData in this scope*/
virtual const CscPrepData* prepRawData() const; virtual const CscPrepData* prepRawData() const override final;
const ElementLinkToIDC_CSC_Container& prepRawDataLink() const; const ElementLinkToIDC_CSC_Container& prepRawDataLink() const;
/** @brief Returns the detector element, associated with the PRD of this class*/ /** @brief Returns the detector element, associated with the PRD of this class*/
virtual const MuonGM::CscReadoutElement* detectorElement() const; virtual const MuonGM::CscReadoutElement* detectorElement() const override final;
/** @brief Returns the surface on which this measurement was taken. /** @brief Returns the surface on which this measurement was taken.
(i.e. a surface of a detector element) */ (i.e. a surface of a detector element) */
virtual const Trk::Surface& associatedSurface() const; virtual const Trk::Surface& associatedSurface() const override final;
/** @brief Returns Csc position measurement status flag */ /** @brief Returns Csc position measurement status flag */
CscClusterStatus status() const; CscClusterStatus status() const;
...@@ -114,30 +114,31 @@ public: ...@@ -114,30 +114,31 @@ public:
float time() const; float time() const;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual MsgStream& dump( MsgStream& stream) const; virtual MsgStream& dump( MsgStream& stream) const override final;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual std::ostream& dump( std::ostream& stream) const; virtual std::ostream& dump( std::ostream& stream) const override final;
private: private:
/** this method is only used by the custom convertors. /** this method is only used by the custom convertors.
@warning At the moment it only actually sets the CscPrepData, since that's all that's stored @warning At the moment it only actually sets the CscPrepData, since that's all that's stored
@todo Throw exception if TrkDetElementBase isn't correct concrete type*/ @todo Throw exception if TrkDetElementBase isn't correct concrete type*/
virtual void setValues(const Trk::TrkDetElementBase*, const Trk::PrepRawData*); virtual void setValues(const Trk::TrkDetElementBase*,
const Trk::PrepRawData*) override final;
/** PrepRawData object assoicated with this measurement*/ /** PrepRawData object assoicated with this measurement*/
ElementLinkToIDC_CSC_Container m_rio; ElementLinkToIDC_CSC_Container m_rio;
/** The detector element, associated with this measurement*/ /** The detector element, associated with this measurement*/
const MuonGM::CscReadoutElement* m_detEl; const MuonGM::CscReadoutElement* m_detEl;
/** cluster position measurement status */ /** cluster position measurement status */
CscClusterStatus m_status; CscClusterStatus m_status;
/** cluster time measurement status */ /** cluster time measurement status */
CscTimeStatus m_timeStatus; CscTimeStatus m_timeStatus;
float m_time; float m_time;
}; };
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -53,7 +53,7 @@ namespace Muon ...@@ -53,7 +53,7 @@ namespace Muon
/** @brief This class represents the corrected MDT measurements, /** @brief This class represents the corrected MDT measurements,
where the corrections include the effects of wire sag etc.*/ where the corrections include the effects of wire sag etc.*/
class MdtDriftCircleOnTrack : public Trk::RIO_OnTrack class MdtDriftCircleOnTrack final: public Trk::RIO_OnTrack
{ {
public: public:
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
MdtDriftCircleOnTrack(const MdtDriftCircleOnTrack &); MdtDriftCircleOnTrack(const MdtDriftCircleOnTrack &);
MdtDriftCircleOnTrack &operator=(const MdtDriftCircleOnTrack &); MdtDriftCircleOnTrack &operator=(const MdtDriftCircleOnTrack &);
MdtDriftCircleOnTrack &operator=(MdtDriftCircleOnTrack &&); MdtDriftCircleOnTrack &operator=(MdtDriftCircleOnTrack &&) noexcept;
...@@ -162,32 +162,32 @@ public: ...@@ -162,32 +162,32 @@ public:
Trk::DriftCircleStatus status() const; Trk::DriftCircleStatus status() const;
/** @copydoc Trk::RIO_OnTrack::clone() */ /** @copydoc Trk::RIO_OnTrack::clone() */
virtual MdtDriftCircleOnTrack* clone() const override; virtual MdtDriftCircleOnTrack* clone() const override final;
/** @brief Returns the PrepRawData used to create this corrected measurement */ /** @brief Returns the PrepRawData used to create this corrected measurement */
virtual const MdtPrepData* prepRawData() const override; virtual const MdtPrepData* prepRawData() const override final;
const ElementLinkToIDC_MDT_Container& prepRawDataLink() const; const ElementLinkToIDC_MDT_Container& prepRawDataLink() const;
/** @brief Returns the hashID of the PRD collection */ /** @brief Returns the hashID of the PRD collection */
virtual IdentifierHash collectionHash() const; IdentifierHash collectionHash() const;
/** @brief Returns an invalid hash @todo Remove*/ /** @brief Returns an invalid hash @todo Remove*/
virtual IdentifierHash idDE() const override { return IdentifierHash(); } virtual IdentifierHash idDE() const override final{ return IdentifierHash(); }
/** @brief Returns the detector element, assoicated with the PRD of this class*/ /** @brief Returns the detector element, assoicated with the PRD of this class*/
virtual const MuonGM::MdtReadoutElement* detectorElement() const override; virtual const MuonGM::MdtReadoutElement* detectorElement() const override final;
/** @brief Returns the surface on which this measurement was taken. /** @brief Returns the surface on which this measurement was taken.
- If hasSaggedSurface()==false, then the surface will be that of the matching Detector Element - If hasSaggedSurface()==false, then the surface will be that of the matching Detector Element
- If hasSaggedSurface()==true, then the surface will be a special surface, representing the sagged position - If hasSaggedSurface()==true, then the surface will be a special surface, representing the sagged position
of the wire at the coords of this measurement.*/ of the wire at the coords of this measurement.*/
virtual const Trk::Surface& associatedSurface() const override; virtual const Trk::Surface& associatedSurface() const override final;
/** @brief Returns the global Position. /** @brief Returns the global Position.
Be aware that this is calculated from the predicted position along Be aware that this is calculated from the predicted position along
the tube, and the drift radius. i.e. it is partly inferred from other data, the tube, and the drift radius. i.e. it is partly inferred from other data,
and so is not a 'true' measurement.*/ and so is not a 'true' measurement.*/
virtual const Amg::Vector3D& globalPosition() const override; virtual const Amg::Vector3D& globalPosition() const override final;
virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final
{ {
...@@ -223,10 +223,10 @@ public: ...@@ -223,10 +223,10 @@ public:
const MuonDriftCircleErrorStrategy& errorStrategy() const; const MuonDriftCircleErrorStrategy& errorStrategy() const;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual MsgStream& dump( MsgStream& stream) const override; virtual MsgStream& dump( MsgStream& stream) const override final;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual std::ostream& dump( std::ostream& stream) const override; virtual std::ostream& dump( std::ostream& stream) const override final;
// ///////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////
// Private data: // Private data:
...@@ -239,7 +239,7 @@ private: ...@@ -239,7 +239,7 @@ private:
/**@brief Sets the DetElement and Trk::PrepRawData pointers after reading from disk. /**@brief Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
@warning Only intended for use by persistency convertors*/ @warning Only intended for use by persistency convertors*/
virtual void setValues(const Trk::TrkDetElementBase*, virtual void setValues(const Trk::TrkDetElementBase*,
const Trk::PrepRawData*) override; const Trk::PrepRawData*) override final;
/** @brief Uses the passed loc3Dframe to calculate and set the global coord of this hit. /** @brief Uses the passed loc3Dframe to calculate and set the global coord of this hit.
If there is a sagged wire defined, this will be used for the transformation, otherwise the detector element surface is used*/ If there is a sagged wire defined, this will be used for the transformation, otherwise the detector element surface is used*/
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef MUONRIOONTRACK_RPCCLUSTERONTRACK_H #ifndef MUONRIOONTRACK_RPCCLUSTERONTRACK_H
...@@ -31,7 +31,7 @@ namespace Muon ...@@ -31,7 +31,7 @@ namespace Muon
{ {
/** @brief Class to represent calibrated clusters formed from RPC strips*/ /** @brief Class to represent calibrated clusters formed from RPC strips*/
class RpcClusterOnTrack : public MuonClusterOnTrack class RpcClusterOnTrack final: public MuonClusterOnTrack
{ {
public: public:
...@@ -74,43 +74,44 @@ public: ...@@ -74,43 +74,44 @@ public:
virtual ~RpcClusterOnTrack(); virtual ~RpcClusterOnTrack();
/** @brief Clone this ROT */ /** @brief Clone this ROT */
virtual RpcClusterOnTrack* clone() const ; virtual RpcClusterOnTrack* clone() const override final;
/** @brief Returns the RpcPrepData - is a TRT_DriftCircle in this scope*/ /** @brief Returns the RpcPrepData - is a TRT_DriftCircle in this scope*/
virtual const RpcPrepData* prepRawData() const; virtual const RpcPrepData* prepRawData() const override final;
const ElementLinkToIDC_RPC_Container& prepRawDataLink() const; const ElementLinkToIDC_RPC_Container& prepRawDataLink() const;
/** @brief Returns the detector element, assoicated with the PRD of this class*/ /** @brief Returns the detector element, assoicated with the PRD of this class*/
virtual const MuonGM::RpcReadoutElement* detectorElement() const; virtual const MuonGM::RpcReadoutElement* detectorElement() const override final;
/** @brief Returns the surface on which this measurement was taken. /** @brief Returns the surface on which this measurement was taken.
(i.e. a surface of a detector element) */ (i.e. a surface of a detector element) */
virtual const Trk::Surface& associatedSurface() const; virtual const Trk::Surface& associatedSurface() const override final;
/** Return the time (ns)*/ /** Return the time (ns)*/
float time() const; float time() const;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual MsgStream& dump( MsgStream& stream) const; virtual MsgStream& dump( MsgStream& stream) const override final;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual std::ostream& dump( std::ostream& stream) const; virtual std::ostream& dump( std::ostream& stream) const override final;
private: private:
/**@brief Sets the DetElement and Trk::PrepRawData pointers after reading from disk. /**@brief Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
@warning Only intended for use by persistency convertors @warning Only intended for use by persistency convertors
@todo Throw exception if TrkDetElementBase isn't correct concrete type*/ @todo Throw exception if TrkDetElementBase isn't correct concrete type*/
virtual void setValues(const Trk::TrkDetElementBase*, const Trk::PrepRawData*); virtual void setValues(const Trk::TrkDetElementBase*,
const Trk::PrepRawData*) override final;
/** PrepRawData object assoicated with this measurement*/ /** PrepRawData object assoicated with this measurement*/
ElementLinkToIDC_RPC_Container m_rio; ElementLinkToIDC_RPC_Container m_rio;
/** The detector element, assoicated with this measurement*/ /** The detector element, assoicated with this measurement*/
const MuonGM::RpcReadoutElement* m_detEl; const MuonGM::RpcReadoutElement* m_detEl;
/** The time in ns*/ /** The time in ns*/
float m_time; float m_time;
}; };
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef MUONRIOONTRACK_STGCCLUSTERONTRACK_H #ifndef MUONRIOONTRACK_STGCCLUSTERONTRACK_H
...@@ -30,7 +30,7 @@ namespace Muon ...@@ -30,7 +30,7 @@ namespace Muon
{ {
/** @brief Class to represent calibrated clusters formed from TGC strips*/ /** @brief Class to represent calibrated clusters formed from TGC strips*/
class sTgcClusterOnTrack : public MuonClusterOnTrack class sTgcClusterOnTrack final: public MuonClusterOnTrack
{ {
public: public:
...@@ -69,30 +69,31 @@ namespace Muon ...@@ -69,30 +69,31 @@ namespace Muon
virtual ~sTgcClusterOnTrack(); virtual ~sTgcClusterOnTrack();
/** @brief Clone this ROT */ /** @brief Clone this ROT */
virtual sTgcClusterOnTrack* clone() const ; virtual sTgcClusterOnTrack* clone() const override final;
/** @brief Returns the sTgcPrepData - is a TRT_DriftCircle in this scope*/ /** @brief Returns the sTgcPrepData - is a TRT_DriftCircle in this scope*/
virtual const sTgcPrepData* prepRawData() const; virtual const sTgcPrepData* prepRawData() const override final;
virtual const ElementLinkToIDC_STGC_Container& prepRawDataLink() const; const ElementLinkToIDC_STGC_Container& prepRawDataLink() const;
/** @brief Returns the detector element, assoicated with the PRD of this class*/ /** @brief Returns the detector element, assoicated with the PRD of this class*/
virtual const MuonGM::sTgcReadoutElement* detectorElement() const; virtual const MuonGM::sTgcReadoutElement* detectorElement() const override final;
/** @brief Returns the surface on which this measurement was taken. /** @brief Returns the surface on which this measurement was taken.
(i.e. a surface of a detector element) */ (i.e. a surface of a detector element) */
virtual const Trk::Surface& associatedSurface() const; virtual const Trk::Surface& associatedSurface() const override final;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual MsgStream& dump( MsgStream& stream) const; virtual MsgStream& dump( MsgStream& stream) const override final;
/** @brief Dumps information about the PRD*/ /** @brief Dumps information about the PRD*/
virtual std::ostream& dump( std::ostream& stream) const; virtual std::ostream& dump( std::ostream& stream) const override final;
private: private:
/**@brief Sets the DetElement and Trk::PrepRawData pointers after reading from disk. /**@brief Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
@warning Only intended for use by persistency convertors. @warning Only intended for use by persistency convertors.
@todo Throw exception if TrkDetElementBase isn't correct concrete type*/ @todo Throw exception if TrkDetElementBase isn't correct concrete type*/
virtual void setValues(const Trk::TrkDetElementBase*, const Trk::PrepRawData*); virtual void setValues(const Trk::TrkDetElementBase*,
const Trk::PrepRawData*) override final;
/** PrepRawData object assoicated with this measurement*/ /** PrepRawData object assoicated with this measurement*/
ElementLinkToIDC_STGC_Container m_rio; ElementLinkToIDC_STGC_Container m_rio;
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -22,7 +22,7 @@ namespace Muon ...@@ -22,7 +22,7 @@ namespace Muon
CscClusterOnTrack::CscClusterOnTrack(): CscClusterOnTrack::CscClusterOnTrack():
MuonClusterOnTrack(), // call base class ctor MuonClusterOnTrack(), // call base class ctor
m_rio(), m_rio(),
m_detEl(0), m_detEl(nullptr),
m_status(CscStatusUndefined), m_status(CscStatusUndefined),
m_timeStatus(CscTimeStatusUndefined), m_timeStatus(CscTimeStatusUndefined),
m_time(9999.0) m_time(9999.0)
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -23,23 +23,23 @@ ...@@ -23,23 +23,23 @@
// Full Constructor : // Full Constructor :
Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack(
const Muon::MdtPrepData* RIO, const Muon::MdtPrepData* RIO,
const Trk::LocalParameters& locPos, const Trk::LocalParameters& locPos,
const Amg::MatrixX& errDriftRadius, const Amg::MatrixX& errDriftRadius,
const double driftTime, const double driftTime,
const Trk::DriftCircleStatus status, const Trk::DriftCircleStatus status,
const Amg::Vector3D& predictedTrackDirection, const Amg::Vector3D& predictedTrackDirection,
double positionAlongWire, double positionAlongWire,
const MuonDriftCircleErrorStrategy& errorStrategy, const MuonDriftCircleErrorStrategy& errorStrategy,
const Trk::StraightLineSurface* surface) const Trk::StraightLineSurface* surface)
: :
RIO_OnTrack( locPos, errDriftRadius, RIO->identify() ), //call base class constructor RIO_OnTrack( locPos, errDriftRadius, RIO->identify() ), //call base class constructor
m_status(status), m_status(status),
m_globalPosition(), m_globalPosition(),
m_saggedSurface(surface), m_saggedSurface(surface),
m_detEl( RIO->detectorElement() ), m_detEl( RIO->detectorElement() ),
m_localAngle(0.0), m_localAngle(0.0),
m_positionAlongWire(positionAlongWire), m_positionAlongWire(positionAlongWire),
m_driftTime(driftTime), m_driftTime(driftTime),
m_errorStrategy(errorStrategy) m_errorStrategy(errorStrategy)
...@@ -48,31 +48,31 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( ...@@ -48,31 +48,31 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack(
assert(m_status!=Trk::UNDECIDED); // use of this constructor implies that the side is decided assert(m_status!=Trk::UNDECIDED); // use of this constructor implies that the side is decided
const Trk::StraightLineSurface* slsf = dynamic_cast<const Trk::StraightLineSurface*>(&(m_detEl->surface(RIO->identify()))); const Trk::StraightLineSurface* slsf = dynamic_cast<const Trk::StraightLineSurface*>(&(m_detEl->surface(RIO->identify())));
if(slsf) m_globalPosition.store(std::unique_ptr<const Amg::Vector3D>(slsf->localToGlobal(locPos, predictedTrackDirection, positionAlongWire))); if(slsf) m_globalPosition.store(std::unique_ptr<const Amg::Vector3D>(slsf->localToGlobal(locPos, predictedTrackDirection, positionAlongWire)));
Amg::Vector3D loc_gDirection = predictedTrackDirection; Amg::Vector3D loc_gDirection = predictedTrackDirection;
//scaling the direction with drift radius //scaling the direction with drift radius
if(driftRadius() !=0.) { if(driftRadius() !=0.) {
// Set loc_gDirection's perpendicular distance equal to driftRadius // Set loc_gDirection's perpendicular distance equal to driftRadius
Amg::setPerp(loc_gDirection,driftRadius()); Amg::setPerp(loc_gDirection,driftRadius());
float ratio = loc_gDirection.x()/driftRadius(); float ratio = loc_gDirection.x()/driftRadius();
float calc_angle = (ratio >= 1.) ? 0. : acos(ratio); float calc_angle = (ratio >= 1.) ? 0. : std::acos(ratio);
m_localAngle = (loc_gDirection.y()<0.) ? 2*M_PI - calc_angle : calc_angle; m_localAngle = (loc_gDirection.y()<0.) ? 2*M_PI - calc_angle : calc_angle;
} }
m_rio.setElement(RIO); m_rio.setElement(RIO);
} }
// Partial Constructor : // Partial Constructor :
Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack(
const Muon::MdtPrepData* RIO, const Muon::MdtPrepData* RIO,
const Trk::LocalParameters& locPos, const Trk::LocalParameters& locPos,
const Amg::MatrixX& errDriftRadius, const Amg::MatrixX& errDriftRadius,
const double driftTime, const double driftTime,
const Trk::DriftCircleStatus status, const Trk::DriftCircleStatus status,
double positionAlongWire, double positionAlongWire,
const MuonDriftCircleErrorStrategy& errorStrategy, const MuonDriftCircleErrorStrategy& errorStrategy,
const Trk::StraightLineSurface* surface) const Trk::StraightLineSurface* surface)
: :
RIO_OnTrack( locPos, errDriftRadius, RIO->identify() ), //call base class constructor RIO_OnTrack( locPos, errDriftRadius, RIO->identify() ), //call base class constructor
m_status(status), m_status(status),
...@@ -89,18 +89,18 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( ...@@ -89,18 +89,18 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack(
m_rio.setElement(RIO); m_rio.setElement(RIO);
} }
Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack(
const ElementLinkToIDC_MDT_Container& RIO, const ElementLinkToIDC_MDT_Container& RIO,
const Trk::LocalParameters& locPos, const Trk::LocalParameters& locPos,
const Amg::MatrixX& errDriftRadius, const Amg::MatrixX& errDriftRadius,
const Identifier& id, const Identifier& id,
const MuonGM::MdtReadoutElement* detEl, const MuonGM::MdtReadoutElement* detEl,
const double driftTime, const double driftTime,
const Trk::DriftCircleStatus status, const Trk::DriftCircleStatus status,
double positionAlongWire, double positionAlongWire,
float localAngle, float localAngle,
const MuonDriftCircleErrorStrategy& errorStrategy, const MuonDriftCircleErrorStrategy& errorStrategy,
const Trk::StraightLineSurface* surface) const Trk::StraightLineSurface* surface)
: :
RIO_OnTrack( locPos, errDriftRadius, id ), //call base class constructor RIO_OnTrack( locPos, errDriftRadius, id ), //call base class constructor
m_status(status), m_status(status),
...@@ -130,13 +130,13 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack() ...@@ -130,13 +130,13 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack()
m_status(Trk::UNDECIDED), m_status(Trk::UNDECIDED),
m_rio(), m_rio(),
m_globalPosition(), m_globalPosition(),
m_saggedSurface(0), m_saggedSurface(nullptr),
m_detEl(0), m_detEl(nullptr),
m_localAngle(0.0), m_localAngle(0.0),
m_positionAlongWire(0.0), m_positionAlongWire(0.0),
m_driftTime(0), m_driftTime(0),
m_errorStrategy(0) m_errorStrategy(0)
{ {
} }
//copy constructor: //copy constructor:
...@@ -146,15 +146,15 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( const Muon::MdtDriftCircleOn ...@@ -146,15 +146,15 @@ Muon::MdtDriftCircleOnTrack::MdtDriftCircleOnTrack( const Muon::MdtDriftCircleOn
m_status(rot.m_status), m_status(rot.m_status),
m_rio(rot.m_rio), m_rio(rot.m_rio),
m_globalPosition(), m_globalPosition(),
m_saggedSurface(0), m_saggedSurface(nullptr),
m_detEl(rot.m_detEl), m_detEl(rot.m_detEl),
m_localAngle(rot.m_localAngle), m_localAngle(rot.m_localAngle),
m_positionAlongWire(rot.m_positionAlongWire), m_positionAlongWire(rot.m_positionAlongWire),
m_driftTime(rot.m_driftTime), m_driftTime(rot.m_driftTime),
m_errorStrategy(rot.m_errorStrategy) m_errorStrategy(rot.m_errorStrategy)
{ {
if ( rot.m_globalPosition ) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*rot.m_globalPosition)); if ( rot.m_globalPosition ) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*rot.m_globalPosition));
if ( rot.m_saggedSurface!=0 ) m_saggedSurface= new Trk::StraightLineSurface( *(rot.m_saggedSurface) ); if ( rot.m_saggedSurface!=nullptr ) m_saggedSurface= new Trk::StraightLineSurface( *(rot.m_saggedSurface) );
} }
//assignment operator: //assignment operator:
...@@ -166,43 +166,44 @@ Muon::MdtDriftCircleOnTrack& Muon::MdtDriftCircleOnTrack::operator=( const Muon: ...@@ -166,43 +166,44 @@ Muon::MdtDriftCircleOnTrack& Muon::MdtDriftCircleOnTrack::operator=( const Muon:
if (rot.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*rot.m_globalPosition)); if (rot.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*rot.m_globalPosition));
else if (m_globalPosition) m_globalPosition.release().reset(); else if (m_globalPosition) m_globalPosition.release().reset();
delete m_saggedSurface; delete m_saggedSurface;
if( rot.m_saggedSurface!=0 ) if( rot.m_saggedSurface!=nullptr )
m_saggedSurface= new Trk::StraightLineSurface( *(rot.m_saggedSurface) ); m_saggedSurface= new Trk::StraightLineSurface( *(rot.m_saggedSurface) );
else else
m_saggedSurface=0; m_saggedSurface=nullptr;
m_driftTime = rot.m_driftTime; m_driftTime = rot.m_driftTime;
m_status = rot.m_status; m_status = rot.m_status;
m_rio = rot.m_rio; m_rio = rot.m_rio;
m_detEl = rot.m_detEl; m_detEl = rot.m_detEl;
m_localAngle = rot.m_localAngle; m_localAngle = rot.m_localAngle;
m_positionAlongWire = rot.m_positionAlongWire; m_positionAlongWire = rot.m_positionAlongWire;
m_errorStrategy= rot.m_errorStrategy; m_errorStrategy= rot.m_errorStrategy;
} }
return *this; return *this;
} }
Muon::MdtDriftCircleOnTrack& Muon::MdtDriftCircleOnTrack::operator=( Muon::MdtDriftCircleOnTrack&& rot) Muon::MdtDriftCircleOnTrack&
Muon::MdtDriftCircleOnTrack::operator=(
Muon::MdtDriftCircleOnTrack&& rot) noexcept
{ {
if ( &rot != this) if (&rot != this) {
{ Trk::RIO_OnTrack::operator=(rot); // base class ass. op.
Trk::RIO_OnTrack::operator=(std::move(rot));//base class ass. op. m_globalPosition = std::move(rot.m_globalPosition);
m_globalPosition = std::move(rot.m_globalPosition);
delete m_saggedSurface; delete m_saggedSurface;
m_saggedSurface = rot.m_saggedSurface; m_saggedSurface = rot.m_saggedSurface;
rot.m_saggedSurface = nullptr; rot.m_saggedSurface = nullptr;
m_driftTime = rot.m_driftTime; m_driftTime = rot.m_driftTime;
m_status = rot.m_status; m_status = rot.m_status;
m_rio = rot.m_rio; m_rio = rot.m_rio;
m_detEl = rot.m_detEl; m_detEl = rot.m_detEl;
m_localAngle = rot.m_localAngle; m_localAngle = rot.m_localAngle;
m_positionAlongWire = rot.m_positionAlongWire; m_positionAlongWire = rot.m_positionAlongWire;
m_errorStrategy= std::move(rot.m_errorStrategy); m_errorStrategy = std::move(rot.m_errorStrategy);
} }
return *this; return *this;
} }
const Amg::Vector3D& Muon::MdtDriftCircleOnTrack::globalPosition() const const Amg::Vector3D& Muon::MdtDriftCircleOnTrack::globalPosition() const
{ {
if (not m_globalPosition){ if (not m_globalPosition){
...@@ -223,7 +224,7 @@ const Amg::Vector3D& Muon::MdtDriftCircleOnTrack::globalPosition() const ...@@ -223,7 +224,7 @@ const Amg::Vector3D& Muon::MdtDriftCircleOnTrack::globalPosition() const
void Muon::MdtDriftCircleOnTrack::setGlobalPosition(HepGeom::Point3D<double>& loc3Dframe) const void Muon::MdtDriftCircleOnTrack::setGlobalPosition(HepGeom::Point3D<double>& loc3Dframe) const
{ {
if (0!=m_saggedSurface){ if (nullptr!=m_saggedSurface){
Amg::Vector3D tempFrame(loc3Dframe.x(), loc3Dframe.y(), loc3Dframe.z()); Amg::Vector3D tempFrame(loc3Dframe.x(), loc3Dframe.y(), loc3Dframe.z());
m_globalPosition.set(std::make_unique<const Amg::Vector3D>(m_saggedSurface->transform() * tempFrame)); m_globalPosition.set(std::make_unique<const Amg::Vector3D>(m_saggedSurface->transform() * tempFrame));
} else { } else {
...@@ -243,7 +244,7 @@ void Muon::MdtDriftCircleOnTrack::setGlobalPosition(HepGeom::Point3D<double>& lo ...@@ -243,7 +244,7 @@ void Muon::MdtDriftCircleOnTrack::setGlobalPosition(HepGeom::Point3D<double>& lo
MsgStream& Muon::MdtDriftCircleOnTrack::dump( MsgStream& stream) const MsgStream& Muon::MdtDriftCircleOnTrack::dump( MsgStream& stream) const
{ {
stream << MSG::INFO<<"MdtDriftCircleOnTrack {"<<std::endl; stream << MSG::INFO<<"MdtDriftCircleOnTrack {"<<std::endl;
Trk::RIO_OnTrack::dump(stream); Trk::RIO_OnTrack::dump(stream);
stream << "DriftTime: "<<m_driftTime<<std::endl; stream << "DriftTime: "<<m_driftTime<<std::endl;
stream << "Status: "<<m_status<<std::endl; stream << "Status: "<<m_status<<std::endl;
stream << "Global position (x,y,z) = ("; stream << "Global position (x,y,z) = (";
...@@ -251,12 +252,12 @@ MsgStream& Muon::MdtDriftCircleOnTrack::dump( MsgStream& stream) const ...@@ -251,12 +252,12 @@ MsgStream& Muon::MdtDriftCircleOnTrack::dump( MsgStream& stream) const
<<this->globalPosition().y()<<", " <<this->globalPosition().y()<<", "
<<this->globalPosition().z()<<")"<<std::endl; <<this->globalPosition().z()<<")"<<std::endl;
if (m_saggedSurface!=0) { if (m_saggedSurface!=nullptr) {
stream << "Sagged surface: "<<(*m_saggedSurface)<<std::endl; stream << "Sagged surface: "<<(*m_saggedSurface)<<std::endl;
}else{ }else{
stream << "Sagged surface: NONE "<<std::endl; stream << "Sagged surface: NONE "<<std::endl;
} }
stream << "Position along wire: "<<positionAlongWire()<<", \tlocal angle="<<localAngle()<<std::endl; stream << "Position along wire: "<<positionAlongWire()<<", \tlocal angle="<<localAngle()<<std::endl;
stream << "Creation strategy: "<<m_errorStrategy; stream << "Creation strategy: "<<m_errorStrategy;
stream<<"}"<<endmsg; stream<<"}"<<endmsg;
...@@ -266,7 +267,7 @@ MsgStream& Muon::MdtDriftCircleOnTrack::dump( MsgStream& stream) const ...@@ -266,7 +267,7 @@ MsgStream& Muon::MdtDriftCircleOnTrack::dump( MsgStream& stream) const
std::ostream& Muon::MdtDriftCircleOnTrack::dump( std::ostream& stream) const std::ostream& Muon::MdtDriftCircleOnTrack::dump( std::ostream& stream) const
{ {
stream << "MdtDriftCircleOnTrack {"<<std::endl; stream << "MdtDriftCircleOnTrack {"<<std::endl;
Trk::RIO_OnTrack::dump(stream); Trk::RIO_OnTrack::dump(stream);
stream << "DriftTime: "<<m_driftTime<<std::endl; stream << "DriftTime: "<<m_driftTime<<std::endl;
stream << "Status: "<<m_status<<std::endl; stream << "Status: "<<m_status<<std::endl;
//stream << "Global position (x,y,z) = ("; //stream << "Global position (x,y,z) = (";
...@@ -278,7 +279,7 @@ std::ostream& Muon::MdtDriftCircleOnTrack::dump( std::ostream& stream) const ...@@ -278,7 +279,7 @@ std::ostream& Muon::MdtDriftCircleOnTrack::dump( std::ostream& stream) const
// stream<<"NULL!), "<<std::endl; // stream<<"NULL!), "<<std::endl;
// } // }
if (m_saggedSurface!=0) { if (m_saggedSurface!=nullptr) {
stream << "Sagged surface: "<<(*m_saggedSurface)<<std::endl; stream << "Sagged surface: "<<(*m_saggedSurface)<<std::endl;
}else{ }else{
stream << "Sagged surface: NONE "<<std::endl; stream << "Sagged surface: NONE "<<std::endl;
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -99,7 +99,7 @@ std::ostream& MuonClusterOnTrack::dump( std::ostream& stream) const ...@@ -99,7 +99,7 @@ std::ostream& MuonClusterOnTrack::dump( std::ostream& stream) const
} }
const Amg::Vector3D& MuonClusterOnTrack::globalPosition() const { const Amg::Vector3D& MuonClusterOnTrack::globalPosition() const {
if (detectorElement()==0){ if (detectorElement()==nullptr){
// Not much we can do here - no detelement, so just return 0,0,0 // Not much we can do here - no detelement, so just return 0,0,0
m_globalPosition.set(std::make_unique<const Amg::Vector3D>(0.0,0.0,0.0)); m_globalPosition.set(std::make_unique<const Amg::Vector3D>(0.0,0.0,0.0));
} }
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -23,7 +23,7 @@ RpcClusterOnTrack::RpcClusterOnTrack() ...@@ -23,7 +23,7 @@ RpcClusterOnTrack::RpcClusterOnTrack()
: :
MuonClusterOnTrack(), // call base class ctor MuonClusterOnTrack(), // call base class ctor
m_rio(), m_rio(),
m_detEl(0), m_detEl(nullptr),
m_time(0.0) m_time(0.0)
{} {}
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -22,7 +22,7 @@ namespace Muon ...@@ -22,7 +22,7 @@ namespace Muon
TgcClusterOnTrack::TgcClusterOnTrack(): TgcClusterOnTrack::TgcClusterOnTrack():
MuonClusterOnTrack(), // call base class ctor MuonClusterOnTrack(), // call base class ctor
m_rio(), m_rio(),
m_detEl(0) m_detEl(nullptr)
{} {}
// copy constructor: // copy constructor:
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
#include "MuonRIO_OnTrack/sTgcClusterOnTrack.h" #include "MuonRIO_OnTrack/sTgcClusterOnTrack.h"
...@@ -12,7 +12,7 @@ namespace Muon ...@@ -12,7 +12,7 @@ namespace Muon
sTgcClusterOnTrack::sTgcClusterOnTrack(): sTgcClusterOnTrack::sTgcClusterOnTrack():
MuonClusterOnTrack(), // call base class ctor MuonClusterOnTrack(), // call base class ctor
m_rio(), m_rio(),
m_detEl(0) m_detEl(nullptr)
{} {}
// copy constructor: // copy constructor:
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -37,7 +37,7 @@ namespace Trk{ ...@@ -37,7 +37,7 @@ namespace Trk{
*/ */
class PseudoMeasurementOnTrack : public MeasurementBase { class PseudoMeasurementOnTrack final: public MeasurementBase {
friend class ::TrackCollectionCnv; friend class ::TrackCollectionCnv;
...@@ -59,7 +59,7 @@ namespace Trk{ ...@@ -59,7 +59,7 @@ namespace Trk{
ConstSurfaceUniquePtr assocSurf); ConstSurfaceUniquePtr assocSurf);
//! Destructor //! Destructor
virtual ~PseudoMeasurementOnTrack() override; virtual ~PseudoMeasurementOnTrack() override final;
//! virtual constructor, not absolutely needed but given for EDM symmetry //! virtual constructor, not absolutely needed but given for EDM symmetry
virtual PseudoMeasurementOnTrack* clone() const override final; virtual PseudoMeasurementOnTrack* clone() const override final;
...@@ -90,12 +90,12 @@ namespace Trk{ ...@@ -90,12 +90,12 @@ namespace Trk{
virtual std::ostream& dump( std::ostream& out ) const override final; virtual std::ostream& dump( std::ostream& out ) const override final;
protected: protected:
//! holds the surface to which the PMoT is associated. The surface is
//! holds the surface to which the PMoT is associated. The surface is responsible for the correct local-to-global transformation. //! responsible for the correct local-to-global transformation.
const Surface* m_associatedSurface; const Surface* m_associatedSurface;
//! Global position of the PMoT //! Global position of the PMoT
const Amg::Vector3D* m_globalPosition; const Amg::Vector3D* m_globalPosition;
}; };
inline PseudoMeasurementOnTrack* PseudoMeasurementOnTrack::clone() const inline PseudoMeasurementOnTrack* PseudoMeasurementOnTrack::clone() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment