ATLAS Offline Software
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MuonCluster.cxx
7 // Implementation file for class MuonCluster
9 // (c) ATLAS Detector software
11 // Version 1.0 03/07/2007 Niels van Eldik
13 
14 #include <new>
16 #include "GaudiKernel/MsgStream.h"
17 
18 namespace Muon
19 {
20 
21  // Constructor
23  const IdentifierHash & , //FIXME! Should be removed.
24  const Amg::Vector2D& locpos,
25  const std::vector<Identifier>& rdoList,
26  const Amg::MatrixX& locErrMat
27  ) :
28  PrepRawData(RDOId, locpos, rdoList, locErrMat), //call base class constructor
29  m_globalPosition()
30  {
31  }
32 
34  const IdentifierHash & , //FIXME! Should be removed.
35  const Amg::Vector2D& locpos,
36  std::vector<Identifier>&& rdoList,
37  Amg::MatrixX&& locErrMat
38  ) :
39  PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat)), //call base class constructor
40  m_globalPosition()
41  {
42  }
43 
44 
45  // Destructor:
47  = default;
48 
49  // Default constructor:
51  PrepRawData(),
52  m_globalPosition()
53  { }
54 
55  //copy constructor:
57  PrepRawData(RIO),
58  m_globalPosition()
59  {
60  // copy only if it exists
61 
62  if (RIO.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*RIO.m_globalPosition));
63  }
64 
65 
66  //assignment operator
68  {
69  if (&RIO !=this)
70  {
72  if (RIO.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*RIO.m_globalPosition));
73  else if (m_globalPosition) m_globalPosition.release().reset();
74  }
75  return *this;
76  }
77 
78  MsgStream& MuonCluster::dump( MsgStream& stream) const
79  {
80  stream << MSG::INFO<<"MuonCluster {"<<std::endl;
82  stream << "Global Coordinates (x,y,z) = (";
83  stream<<this->globalPosition().x()<<", "
84  <<this->globalPosition().y()<<", "
85  <<this->globalPosition().z()<<")"<<std::endl;
86  stream<<"} End MuonCluster"<<endmsg;
87  return stream;
88  }
89 
90  std::ostream& MuonCluster::dump( std::ostream& stream) const
91  {
92  stream << "MuonCluster {"<<std::endl;
94  stream<<"} End MuonCluster"<<std::endl;
95  return stream;
96  }
97  //end of classdef
98 
99 }//end of ns
MuonCluster.h
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::PrepRawData::dump
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.
Definition: PrepRawData.cxx:79
Muon::MuonCluster::operator=
MuonCluster & operator=(const MuonCluster &)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx:67
Muon::MuonCluster::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Returns the global position of the measurement (calculated on the fly)
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::MuonCluster::~MuonCluster
virtual ~MuonCluster()
Destructor.
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::PrepRawData::operator=
PrepRawData & operator=(const PrepRawData &)=default
Muon::MuonCluster::MuonCluster
MuonCluster()
Default constructor.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx:50
Muon::MuonCluster::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:96
Muon::MuonCluster::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx:78
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
IdentifierHash
Definition: IdentifierHash.h:38