ATLAS Offline Software
Loading...
Searching...
No Matches
PixelClusterOnTrack.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// PixelClusterOnTrack.cxx, (c) ATLAS Detector Software
8
12#include "GaudiKernel/MsgStream.h"
13#include <ostream>
14
15
17 const InDet::PixelCluster* RIO,
18 Trk::LocalParameters&& locpars,
19 Amg::MatrixX&& locerr,
20 const IdentifierHash& idDE,
21 bool,
22 bool isbroad)
23 : // call base class constructor
24 InDet::SiClusterOnTrack(std::move(locpars),
25 std::move(locerr),
26 idDE, RIO->identify(), isbroad)
27 , m_hasClusterAmbiguity(RIO->isAmbiguous())
28 , m_isFake(RIO->isFake())
29 , m_energyLoss(RIO->energyLoss())
30 , m_detEl(RIO->detectorElement())
31{
32 m_rio.setElement(RIO);
33 // Set global position
35}
36
37// Constructor with parameters
39 const InDet::PixelCluster* RIO,
40 Trk::LocalParameters&& locpars,
41 Amg::MatrixX&& locerr,
42 const IdentifierHash& idDE,
44 bool,
45 bool isbroad)
46 : // call base class constructor
47 InDet::SiClusterOnTrack(std::move(locpars),
48 std::move(locerr),
49 idDE,
50 RIO->identify(),
52 isbroad)
53 , m_hasClusterAmbiguity(RIO->isAmbiguous())
54 , m_isFake(RIO->isFake())
55 , m_energyLoss(RIO->energyLoss())
56 , m_detEl(RIO->detectorElement())
57{
58 m_rio.setElement(RIO);
59}
60
61
62
63//P->T constructor
66 const Trk::LocalParameters& locpars,
67 const Amg::MatrixX& locerr,
68 const IdentifierHash& idDE,
69 const Identifier& id,
70 float energyLoss,
71 bool isFake,
73 bool isbroad)
74 : InDet::SiClusterOnTrack(Trk::LocalParameters(locpars), Amg::MatrixX(locerr), idDE, id, isbroad),
75 m_rio (RIO),
79 m_detEl (nullptr)
80{
81 // The setting of the global position
82 // happens via the setValues method
83}
84
85
86
87// Default constructor:
97
98
99
100
103
104
106{
107 //set detector element
108 m_detEl = dynamic_cast< const InDetDD::SiDetectorElement* >(detEl);
109 if(m_detEl){
110 //Then set global potition based on it
112 }
113}
114
115
116
117MsgStream& InDet::PixelClusterOnTrack::dump( MsgStream& sl ) const
118{
119 sl<<"PixelClusterOnTrack {"<<endmsg;
120 InDet::SiClusterOnTrack::dump(sl); // use common dump(...) from SiClusterOnTrack
121 sl<<"Ganged cluster ambiguity: "<<hasClusterAmbiguity()
122 <<", fake: " << isFake()
123 <<", dedX: " << energyLoss()
124 <<endmsg;
125 sl<<"}"<<endmsg;
126 return sl;
127}
128
129std::ostream& InDet::PixelClusterOnTrack::dump( std::ostream& sl ) const
130{
131 sl<<"PixelClusterOnTrack {"<<std::endl;
132 InDet::SiClusterOnTrack::dump(sl);// use common dump(...) from SiClusterOnTrack
133 sl<<"Ganged cluster ambiguity: "<<hasClusterAmbiguity()
134 <<", fake: " << isFake()
135 <<", dedX: " << energyLoss()
136 <<std::endl;
137 sl<<"}"<<std::endl;
138 return sl;
139}
140
141
142
143
144
145
146
#define endmsg
ElementLink< InDet::PixelClusterContainer > ElementLinkToIDCPixelClusterContainer
This is a "hash" representation of an Identifier.
Class to hold geometrical description of a silicon detector element.
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
bool isFake() const
returns whether this cluster is likely to be the fake mirror image of a ganged pixel.
virtual const Trk::Surface & associatedSurface() const override final
returns the surface for the local to global transformation
ElementLinkToIDCPixelClusterContainer m_rio
PixelCluster - the RIO (PRD, PrepRawData)
bool m_hasClusterAmbiguity
records whether there is an ambiguity about this cluster
bool hasClusterAmbiguity() const
returns whether there was an ambiguity associated with this pixel cluster.
bool m_isFake
records whether this cluster would be removed by the internal solving of ganged pixel ambiguities
virtual MsgStream & dump(MsgStream &out) const override final
returns some information about this RIO_OnTrack.
float m_energyLoss
get energy deposited in the cluster, in MeV
const InDetDD::SiDetectorElement * m_detEl
corresponding detector element
PixelClusterOnTrack()
Default constructor - needed for POOL.
float energyLoss() const
returns the energy loss in MeV associated to this cluster.
virtual void setValues(const Trk::TrkDetElementBase *detEl, const Trk::PrepRawData *prd) override final
ONLY for use in custom convertor Allows the custom convertor to reset values when persistying/reading...
virtual const Amg::Vector3D & globalPosition() const override
returns global position (gathered through Surface constraint)
SiClusterOnTrack()
Default Constructor - needed for POOL.
virtual IdentifierHash idDE() const override
returns the DE hashID*
Amg::Vector3D m_globalPosition
The global position.
virtual MsgStream & dump(MsgStream &out) const override
returns some information about this RIO_OnTrack.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Identifier identify() const
return the identifier -extends MeasurementBase
Abstract Base Class for tracking surfaces.
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.
This is the base class for all tracking detector elements with read-out relevant information.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.