ATLAS Offline Software
PixelClusterOnTrack.h
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.h, (c) ATLAS Detector software
8 
9 #ifndef INDETRIO_ONTRACK_PIXELCLUSTERONTRACK_H
10 #define INDETRIO_ONTRACK_PIXELCLUSTERONTRACK_H
11 
12 // Base classes
15 
16 // for ElementLink to IdentifiableContainer PixelClusterContainer
17 #include "AthLinks/ElementLink.h"
19 
20 class FakeTrackBuilder;
21 class PixelCluster;
22 
23 namespace Trk {
24 class Surface;
25 class TrkDetElementBase;
26 class ITrkEventCnvTool;
27 } // namespace Trk
28 
29 namespace InDetDD {
30 class SiDetectorElement;
31 }
32 
35 
36 namespace InDet {
37 
38 class PixelDetectorElement;
39 class LocalParameters;
40 
51 class PixelClusterOnTrack final : public SiClusterOnTrack {
52 
53  public:
54  friend class Trk::ITrkEventCnvTool;
66  virtual ~PixelClusterOnTrack() = default;
69  Trk::LocalParameters&& locpars,
70  Amg::MatrixX&& locerr,
71  const IdentifierHash& idDE,
72  bool hasAmbiguity = false,
73  // this parameter is ignored,
74  // information taken from RIO
75  // Just kept not to break the interface to
76  // already existing code.
77  bool isbroad = false);
78 
79 
82  Trk::LocalParameters&& locpars,
83  Amg::MatrixX&& locerr,
84  const IdentifierHash& idDE,
86  bool hasAmbiguity = false,
87  // this parameter is ignored,
88  // information taken from RIO
89  // Just kept not to break the interface to
90  // already existing code.
91  bool isbroad = false);
92 
93 
94  /*
95  * Constuctor used by P->T converter.
96  * The P->T converter calls
97  * setValues method to complete the object.
98  * e.g set/reset the DetectorElement
99  */
101  const Trk::LocalParameters& locpars,
102  const Amg::MatrixX& locerr,
103  const IdentifierHash& idDE,
104  const Identifier& id,
105  float energyLoss,
106  bool isFake,
107  bool hasClusterAmbiguity,
108  bool isbroad);
109 
110 
112  virtual PixelClusterOnTrack* clone() const override final;
113 
116  virtual const Trk::Surface& associatedSurface() const override final;
117 
118  virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final {
120  }
121 
124  virtual const PixelCluster* prepRawData() const override final;
125 
127 
130  virtual const InDetDD::SiDetectorElement* detectorElement()
131  const override final;
132 
135  bool hasClusterAmbiguity() const;
140  bool isFake() const;
143  float energyLoss() const;
144 
146  virtual MsgStream& dump(MsgStream& out) const override final;
147 
149  virtual std::ostream& dump(std::ostream& out) const override final;
150 
151  private:
153  friend class ::FakeTrackBuilder;
154 
158  virtual void setValues(const Trk::TrkDetElementBase* detEl,
159  const Trk::PrepRawData* prd) override final;
160 
163 
168  bool m_isFake;
172  const InDetDD::SiDetectorElement* m_detEl;
173 };
174 
176  return new PixelClusterOnTrack(*this);
177 }
178 
180  // somehow one has to ask first if it is valid ... otherwise it always returns
181  // 0 ...
182  if (m_rio.isValid())
183  return m_rio.cachedElement();
184  else
185  return 0;
186 }
187 
190  return m_rio;
191 }
192 
194  const {
195  return m_detEl;
196 }
197 
199  return m_hasClusterAmbiguity;
200 }
201 
202 inline bool PixelClusterOnTrack::isFake() const {
203  return m_isFake;
204 }
205 
206 inline float PixelClusterOnTrack::energyLoss() const {
207  return m_energyLoss;
208 }
209 
210 } // namespace InDet
211 
212 #endif // TRKRIO_ONTRACK_SICLUSTERONTRACK_H
InDet::PixelClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &out) const override final
returns some information about this RIO_OnTrack.
Definition: PixelClusterOnTrack.cxx:117
Trk::LocalParameters
Definition: LocalParameters.h:98
InDet::SiClusterOnTrack::idDE
virtual IdentifierHash idDE() const override
returns the DE hashID*
Definition: SiClusterOnTrack.h:119
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
PixelCluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/PixelCluster.h:8
InDet::PixelClusterOnTrack::m_rio
ElementLinkToIDCPixelClusterContainer m_rio
PixelCluster - the RIO (PRD, PrepRawData)
Definition: PixelClusterOnTrack.h:162
InDet::PixelClusterOnTrack::rioType
virtual bool rioType(Trk::RIO_OnTrackType::Type type) const override final
Method checking the Rio On Track type.
Definition: PixelClusterOnTrack.h:118
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
PixelClusterOnTrackCnv_p1
Definition: PixelClusterOnTrackCnv_p1.h:33
SiClusterOnTrack.h
InDet::PixelClusterOnTrack::PixelClusterOnTrack
PixelClusterOnTrack()
Default constructor - needed for POOL.
Definition: PixelClusterOnTrack.cxx:88
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
InDet::PixelClusterOnTrack::PixelClusterOnTrack
PixelClusterOnTrack(const PixelClusterOnTrack &)=default
Copy constructor.
InDet::PixelClusterOnTrack::energyLoss
float energyLoss() const
returns the energy loss in MeV associated to this cluster.
Definition: PixelClusterOnTrack.h:206
InDet::PixelClusterOnTrack::PixelClusterOnTrack
PixelClusterOnTrack(PixelClusterOnTrack &&)=default
Move constructor.
Trk::RIO_OnTrack::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: RIO_OnTrack.h:110
ElementLinkToIDCPixelClusterContainer
ElementLink< InDet::PixelClusterContainer > ElementLinkToIDCPixelClusterContainer
Definition: PixelClusterOnTrack.h:34
InDet::SiClusterOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override
returns global position (gathered through Surface constraint)
Definition: SiClusterOnTrack.h:115
InDet::PixelClusterOnTrack::hasClusterAmbiguity
bool hasClusterAmbiguity() const
returns whether there was an ambiguity associated with this pixel cluster.
Definition: PixelClusterOnTrack.h:198
InDet::PixelClusterOnTrack::detectorElement
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
Definition: PixelClusterOnTrack.h:193
InDet::PixelClusterOnTrack::clone
virtual PixelClusterOnTrack * clone() const override final
Pseudo-constructor : needed to avoid excessive RTTI.
Definition: PixelClusterOnTrack.h:175
Trk::ITrkEventCnvTool
Definition: ITrkEventCnvTool.h:31
InDet::PixelClusterOnTrack::m_isFake
bool m_isFake
records whether this cluster would be removed by the internal solving of ganged pixel ambiguities
Definition: PixelClusterOnTrack.h:168
xAODType
Definition: ObjectType.h:13
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
PixelClusterContainer.h
InDet::PixelClusterOnTrack::m_hasClusterAmbiguity
bool m_hasClusterAmbiguity
records whether there is an ambiguity about this cluster
Definition: PixelClusterOnTrack.h:165
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDet::PixelClusterOnTrack::m_energyLoss
float m_energyLoss
get energy deposited in the cluster, in MeV
Definition: PixelClusterOnTrack.h:170
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::PixelClusterOnTrack::operator=
PixelClusterOnTrack & operator=(const PixelClusterOnTrack &)=default
Assignment operator.
LocalParameters.h
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
InDet::PixelClusterOnTrack::operator=
PixelClusterOnTrack & operator=(PixelClusterOnTrack &&)=default
Move assignment.
InDet::PixelClusterOnTrack::prepRawData
virtual const PixelCluster * prepRawData() const override final
returns the PrepRawData - is a SiCluster in this scope
Definition: PixelClusterOnTrack.h:179
InDet::PixelClusterOnTrack::setValues
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...
Definition: PixelClusterOnTrack.cxx:105
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDet::PixelClusterOnTrack::isFake
bool isFake() const
returns whether this cluster is likely to be the fake mirror image of a ganged pixel.
Definition: PixelClusterOnTrack.h:202
FakeTrackBuilder
Definition: FakeTrackBuilder.h:12
InDet::PixelClusterOnTrack::prepRawDataLink
const ElementLinkToIDCPixelClusterContainer & prepRawDataLink() const
Definition: PixelClusterOnTrack.h:189
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDet::PixelClusterOnTrack::~PixelClusterOnTrack
virtual ~PixelClusterOnTrack()=default
destructor
Trk::RIO_OnTrackType::PixelCluster
@ PixelCluster
Definition: RIO_OnTrack.h:57
InDet::PixelClusterOnTrack::associatedSurface
virtual const Trk::Surface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition: PixelClusterOnTrack.cxx:101
InDet::SiClusterOnTrack
Definition: SiClusterOnTrack.h:39
InDet::PixelClusterOnTrack::m_detEl
const InDetDD::SiDetectorElement * m_detEl
corresponding detector element
Definition: PixelClusterOnTrack.h:172
Identifier
Definition: IdentifierFieldParser.cxx:14