Skip to content
Snippets Groups Projects

Add type to PrepRawData, move implementations .icc, avoid dyn_cast

@@ -38,108 +38,103 @@ class SiClusterCnv_p1;
namespace InDet{
class SiCluster : public Trk::PrepRawData {
/**
* @name Friend class declarations
*/
//@{
friend class ::PixelClusterContainerCnv;
friend class ::SCT_ClusterContainerCnv;
friend class ::PixelClusterContainerCnv_p2;
friend class PixelClusterContainerCnv_p1;
friend class ::PixelClusterContainerCnv_p0;
friend class SCT_ClusterContainerCnv_p1;
friend class ::SCT_ClusterContainerCnv_p0;
friend class ::SiClusterCnv_p1;
//@}
public:
/// Constructor without parameter
SiCluster();
/// Copy constructor
SiCluster(const SiCluster &);
/// Move constructor
SiCluster(SiCluster &&);
/// Assignment operator
SiCluster &operator=(const SiCluster &);
/// Move assignment operator
SiCluster &operator=(SiCluster &&);
/**
* Constructor with parameters using pointer of Amg::MatrixX.
* Last parameter might not be always filled and will be nullptr by default.
* The others including SiDetectorElement have to be given!
*/
SiCluster(
const Identifier& RDOId,
const Amg::Vector2D& locpos,
const std::vector<Identifier>& rdoList,
const InDet::SiWidth& width,
const InDetDD::SiDetectorElement* detEl,
const Amg::MatrixX* locErrMat = nullptr
);
/**
* Constructor with parameters using unique_ptr of Amg::MatrixX.
* All parameters have to be given!
*/
SiCluster(
const Identifier& RDOId,
const Amg::Vector2D& locpos,
std::vector<Identifier>&& rdoList,
const InDet::SiWidth& width,
const InDetDD::SiDetectorElement* detEl,
std::unique_ptr<const Amg::MatrixX> locErrMat
);
/// Destructor:
virtual ~SiCluster();
/**
* @name Virtual methods
*/
//@{
/// return width class reference
virtual const InDet::SiWidth& width() const;
/// return global position reference
virtual const Amg::Vector3D& globalPosition() const;
/// set the flag of this cluster containing a gangedPixel
virtual void setGangedPixel(bool ganged);
/// return the flag of this cluster containing a gangedPixel
virtual bool gangedPixel() const;
/// return the detector element corresponding to this PRD
/// The pointer will be zero if the det el is not defined (i.e. it was not passed in by the ctor)
virtual const InDetDD::SiDetectorElement* detectorElement() const override;
class SiCluster : public Trk::PrepRawData
{
/**
* @name Friend class declarations
*/
//@{
friend class ::PixelClusterContainerCnv;
friend class ::SCT_ClusterContainerCnv;
friend class ::PixelClusterContainerCnv_p2;
friend class PixelClusterContainerCnv_p1;
friend class ::PixelClusterContainerCnv_p0;
friend class SCT_ClusterContainerCnv_p1;
friend class ::SCT_ClusterContainerCnv_p0;
friend class ::SiClusterCnv_p1;
//@}
public:
/// Constructor without parameter
SiCluster();
/// Copy constructor
SiCluster(const SiCluster&);
/// Move constructor
SiCluster(SiCluster&&);
/// Assignment operator
SiCluster& operator=(const SiCluster&);
/// Move assignment operator
SiCluster& operator=(SiCluster&&);
/**
* Constructor with parameters using pointer of Amg::MatrixX.
* Last parameter might not be always filled and will be nullptr by default.
* The others including SiDetectorElement have to be given!
*/
SiCluster(const Identifier& RDOId,
const Amg::Vector2D& locpos,
const std::vector<Identifier>& rdoList,
const InDet::SiWidth& width,
const InDetDD::SiDetectorElement* detEl,
const Amg::MatrixX* locErrMat = nullptr);
/**
* Constructor with parameters using unique_ptr of Amg::MatrixX.
* All parameters have to be given!
*/
SiCluster(const Identifier& RDOId,
const Amg::Vector2D& locpos,
std::vector<Identifier>&& rdoList,
const InDet::SiWidth& width,
const InDetDD::SiDetectorElement* detEl,
std::unique_ptr<const Amg::MatrixX> locErrMat);
/// Destructor:
virtual ~SiCluster();
/**
* @name Virtual methods
*/
//@{
/// return width class reference
virtual const InDet::SiWidth& width() const;
/// return global position reference
virtual const Amg::Vector3D& globalPosition() const;
/// set the flag of this cluster containing a gangedPixel
virtual void setGangedPixel(bool ganged);
/// return the flag of this cluster containing a gangedPixel
virtual bool gangedPixel() const;
/// return the detector element corresponding to this PRD
/// The pointer will be zero if the det el is not defined (i.e. it was not
/// passed in by the ctor)
virtual const InDetDD::SiDetectorElement* detectorElement() const override;
/** Interface method checking the type*/
virtual bool type(Trk::PrepRawDataType::Type type) const override final;
/// dump information about the SiCluster
virtual MsgStream& dump( MsgStream& stream) const override;
/// dump information about the SiCluster
virtual std::ostream& dump( std::ostream& stream) const override;
//@}
private:
/// col, row, and width in mm
InDet::SiWidth m_width;
/// For lazy initialization CxxUtils::CachedUniquePtr is used.
CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition;
bool m_gangedPixel;
const InDetDD::SiDetectorElement* m_detEl;
/// dump information about the SiCluster
virtual MsgStream& dump(MsgStream& stream) const override;
/// dump information about the SiCluster
virtual std::ostream& dump(std::ostream& stream) const override;
//@}
private:
/// col, row, and width in mm
InDet::SiWidth m_width;
/// For lazy initialization CxxUtils::CachedUniquePtr is used.
CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition;
bool m_gangedPixel;
const InDetDD::SiDetectorElement* m_detEl;
};
MsgStream& operator << (MsgStream& stream, const SiCluster& prd);
std::ostream& operator << (std::ostream& stream, const SiCluster& prd);
MsgStream&
operator<<(MsgStream& stream, const SiCluster& prd);
std::ostream&
operator<<(std::ostream& stream, const SiCluster& prd);
}
#include "InDetPrepRawData/SiCluster.icc"
#endif // TRKPREPRAWDATA_SICLUSTER_H
Loading