ATLAS Offline Software
PRDHandle_SpacePoint.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Header file for class PRDHandle_SpacePoint //
9 // //
10 // Description: Handles for SpacePoints (not really "PRDs") //
11 // //
12 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13 // Initial version: September 2008 //
14 // //
16 
17 #ifndef PRDHANDLE_SPACEPOINT_H
18 #define PRDHANDLE_SPACEPOINT_H
19 
21 
25 
27 
28 
29 
30 namespace Trk { class SpacePoint; }
32 
34 public:
35 
37  virtual ~PRDHandle_SpacePoint();
38 
39  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
40  int regionIndex();
41 
42  Amg::Vector3D center() const { return m_sp->globalPosition(); }
43 
44 //SCT spacepoints have two clusters, Pixels one:
45  bool isSCT() { return getSecondPRD(); }
46  bool isPixel() { return !getSecondPRD(); }
47 
48  const Trk::SpacePoint * spacePoint() const { return m_sp; }
49  const Trk::PrepRawData * getPRD() const { return m_sp->clusterList().first; }
50  const Trk::PrepRawData * getSecondPRD() const { return m_sp->clusterList().second; }
51  bool isBarrel() const
52  { return static_cast<const InDetDD::SiDetectorElement*>(getPRD()->detectorElement())->isBarrel(); }
53  bool isPositiveZ() const { return m_sp->globalPosition().z() > 0.0; }
54 
55 private:
56 
57  // Uncomment to make it illegal to copy/assign a PRDHandle_SpacePoint:
58  // PRDHandle_SpacePoint( const PRDHandle_SpacePoint & );
59  // PRDHandle_SpacePoint & operator= ( const PRDHandle_SpacePoint & );
60 
62  class Imp;
63  Imp * m_d;
64 
65 };
66 
67 #endif
Trk::SpacePoint::clusterList
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:127
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
Trk::SpacePoint::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:146
PRDHandle_SpacePoint::isPositiveZ
bool isPositiveZ() const
Definition: PRDHandle_SpacePoint.h:53
PRDHandle_SpacePoint::spacePoint
const Trk::SpacePoint * spacePoint() const
Definition: PRDHandle_SpacePoint.h:48
PRDHandle_SpacePoint::m_sp
const Trk::SpacePoint * m_sp
Definition: PRDHandle_SpacePoint.h:61
PRDCollHandle_SpacePoints
Definition: PRDCollHandle_SpacePoints.h:25
PRDHandle_SpacePoint::m_d
Imp * m_d
Definition: PRDHandle_SpacePoint.h:62
PrepRawData.h
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
GeoPrimitives.h
PRDHandle_SpacePoint::isBarrel
bool isBarrel() const
Definition: PRDHandle_SpacePoint.h:51
PRDHandle_SpacePoint::~PRDHandle_SpacePoint
virtual ~PRDHandle_SpacePoint()
Definition: PRDHandle_SpacePoint.cxx:38
SpacePoint.h
PRDHandle_SpacePoint::isSCT
bool isSCT()
Definition: PRDHandle_SpacePoint.h:45
PRDHandle_SpacePoint::buildShapes
void buildShapes(SoNode *&shape_simple, SoNode *&shape_detailed)
Definition: PRDHandle_SpacePoint.cxx:54
PRDHandle_SpacePoint::PRDHandle_SpacePoint
PRDHandle_SpacePoint(PRDCollHandle_SpacePoints *, const Trk::SpacePoint *)
Definition: PRDHandle_SpacePoint.cxx:32
PRDHandle_SpacePoint::getPRD
const Trk::PrepRawData * getPRD() const
Definition: PRDHandle_SpacePoint.h:49
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
PRDHandle_SpacePoint::Imp
Definition: PRDHandle_SpacePoint.cxx:26
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SiDetectorElement.h
PRDHandle_SpacePoint::isPixel
bool isPixel()
Definition: PRDHandle_SpacePoint.h:46
PRDHandleBase
Definition: PRDHandleBase.h:35
PRDHandle_SpacePoint::regionIndex
int regionIndex()
Definition: PRDHandle_SpacePoint.cxx:44
PRDHandle_SpacePoint::center
Amg::Vector3D center() const
Definition: PRDHandle_SpacePoint.h:42
PRDHandle_SpacePoint::getSecondPRD
const Trk::PrepRawData * getSecondPRD() const
Definition: PRDHandle_SpacePoint.h:50
PRDHandle_SpacePoint
Definition: PRDHandle_SpacePoint.h:33
PRDHandleBase.h
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...