ATLAS Offline Software
SiCluster.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // SiCluster.cxx
7 // Implementation file for class SiCluster
9 // (c) ATLAS Detector software
11 // Version 1.0 15/07/2003 Veronique Boisvert
13 
15 #include "GaudiKernel/MsgStream.h"
16 #include <ostream>
17 #include <sstream>
18 
19 namespace InDet {
20 
21 // Constructor for EF:
23  const Amg::Vector2D& locpos,
24  std::vector<Identifier>&& rdoList,
25  const InDet::SiWidth& width,
26  const InDetDD::SiDetectorElement* detEl,
27  Amg::MatrixX&& locErrMat)
28  : // call base class constructor
29  PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat))
30  , m_width(width)
31  , m_detEl(detEl)
32  , m_gangedPixel(false)
33 {
34  if (m_detEl) {
37  }
38 }
39 
40 // Constructor for EF:
42  const Amg::Vector2D& locpos,
43  std::vector<Identifier>&& rdoList,
44  const InDet::SiWidth& width,
45  const InDetDD::SiDetectorElement* detEl)
46  : // call base class constructor
47  PrepRawData(RDOId, locpos, std::move(rdoList), {})
48  , m_width(width)
49  , m_detEl(detEl)
50  , m_gangedPixel(false)
51 {
52  if (m_detEl) {
53  m_globalPosition =
54  m_detEl->surface(identify()).localToGlobal(localPosition());
55  }
56 }
57 
59  const Amg::Vector2D& locpos,
60  const Amg::Vector3D& globpos,
61  std::vector<Identifier>&& rdoList,
62  const InDet::SiWidth& width,
63  const InDetDD::SiDetectorElement* detEl,
64  Amg::MatrixX&& locErrMat)
65  : // call base class constructor
66  PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat))
67  , m_globalPosition(globpos)
68  , m_width(width)
69  , m_detEl(detEl)
70  , m_gangedPixel(false)
71 {}
72 
74  const Amg::Vector2D& locpos,
75  const Amg::Vector3D& globpos,
76  std::vector<Identifier>&& rdoList,
77  const InDet::SiWidth& width,
78  const InDetDD::SiDetectorElement* detEl)
79  : // call base class constructor
80  PrepRawData(RDOId, locpos, std::move(rdoList),{})
81  , m_globalPosition(globpos)
82  , m_width(width)
83  , m_detEl(detEl)
84  , m_gangedPixel(false)
85 {}
86 
87 MsgStream&
88 SiCluster::dump(MsgStream& stream) const
89 {
90  std::ostringstream out;
91  dump(out);
92  stream<<out.str();
93  return stream;
94 }
95 
96 std::ostream&
97 SiCluster::dump(std::ostream& stream) const
98 {
99  const std::string lf("\n");
100  stream << "SiCluster object" << lf;
101  {
102  stream << "at global coordinates (x,y,z) = (" << this->globalPosition().x()
103  << ", " << this->globalPosition().y() << ", "
104  << this->globalPosition().z() << ")" << lf;
105  }
106 
107  if (gangedPixel()) {
108  stream << "and is a ganged pixel. " << lf;
109  } else {
110  stream << "and is not a ganged pixel. " << lf;
111  }
112 
113  stream << "SiWidth: " << m_width << lf;
114 
115  stream << "Base Class (PrepRawData): " << lf;
116  this->PrepRawData::dump(stream);
117 
118  return stream;
119 }
120 
121 MsgStream&
122 operator<<(MsgStream& stream, const SiCluster& prd)
123 {
124  return prd.dump(stream);
125 }
126 
127 std::ostream&
128 operator<<(std::ostream& stream, const SiCluster& prd)
129 {
130  return prd.dump(stream);
131 }
132 
133 } // end of nsk
InDet::operator<<
MsgStream & operator<<(MsgStream &, const GNNTrackReaderTool &)
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SiCluster::m_detEl
const InDetDD::SiDetectorElement * m_detEl
Not owning points (ownned by the store.
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:139
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
xAOD::identify
Identifier identify(const UncalibratedMeasurement *meas)
Returns the associated identifier.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:61
python.TriggerAPI.TriggerAPISession.lf
lf
Definition: TriggerAPISession.py:390
InDet::SiCluster::m_width
InDet::SiWidth m_width
col, row, and width in mm
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:137
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
run_Egamma1_LArStrip_Fex.dump
dump
Definition: run_Egamma1_LArStrip_Fex.py:88
InDet::SiCluster::m_globalPosition
Amg::Vector3D m_globalPosition
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:135
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
InDet::SiCluster::gangedPixel
bool gangedPixel() const
return the flag of this cluster containing a gangedPixel
InDet::SiCluster::dump
virtual MsgStream & dump(MsgStream &stream) const override
dump information about the SiCluster
Definition: SiCluster.cxx:88
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
SiCluster.h
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::SiCluster::globalPosition
const Amg::Vector3D & globalPosition() const
return global position reference
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
InDet::SiWidth
Definition: SiWidth.h:25
InDet::SiCluster::SiCluster
SiCluster()=default
InDet::SiCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:40
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
Identifier
Definition: IdentifierFieldParser.cxx:14