ATLAS Offline Software
Loading...
Searching...
No Matches
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
19namespace 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) {
36 m_detEl->surface(identify()).localToGlobal(localPosition());
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
87MsgStream&
88SiCluster::dump(MsgStream& stream) const
89{
90 std::ostringstream out;
91 dump(out);
92 stream<<out.str();
93 return stream;
94}
95
96std::ostream&
97SiCluster::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
121MsgStream&
122operator<<(MsgStream& stream, const SiCluster& prd)
123{
124 return prd.dump(stream);
125}
126
127std::ostream&
128operator<<(std::ostream& stream, const SiCluster& prd)
129{
130 return prd.dump(stream);
131}
132
133} // end of nsk
const double width
Class to hold geometrical description of a silicon detector element.
const Amg::Vector3D & globalPosition() const
return global position reference
bool gangedPixel() const
return the flag of this cluster containing a gangedPixel
const InDet::SiWidth & width() const
return width class reference
virtual MsgStream & dump(MsgStream &stream) const override
dump information about the SiCluster
Definition SiCluster.cxx:88
const InDetDD::SiDetectorElement * m_detEl
Not owning points (ownned by the store.
SiCluster()=default
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
PrepRawData()
public because of DataPool
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
MsgStream & operator<<(MsgStream &, const GNNTrackFinderTritonTool &)
-event-from-file
STL namespace.