ATLAS Offline Software
PRDHandle_SpacePoint.cxx
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 // Implementation of class PRDHandle_SpacePoint //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: September 2008 //
12 // //
13 // update: March 2014 Riccardo.Maria.Bianchi@cern.ch//
14 // //
16 
20 
21 #include <Inventor/C/errors/debugerror.h>
22 #include <Inventor/nodes/SoPointSet.h>
23 #include <Inventor/nodes/SoVertexProperty.h>
24 
25 //____________________________________________________________________
27 public:
28 };
29 
30 
31 //____________________________________________________________________
33  : PRDHandleBase(ch), m_sp(sp), m_d(new Imp)
34 {
35 }
36 
37 //____________________________________________________________________
39 {
40  delete m_d;
41 }
42 
43 //____________________________________________________________________
45  static const double l=isSCT() ? 100.0 : 200.0;//CLHEP::mm
47  return static_cast<int>(c.z()/l)
48  +1000*static_cast<int>(c.y()/l)
49  +1000000*static_cast<int>(c.x()/l);
50  //Fixme: Use identifiers instead for more intuitive regions.
51 }
52 
53 //____________________________________________________________________
54 void PRDHandle_SpacePoint::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
55 {
56  if (getSecondPRD()) {
57  Amg::Transform3D prdtransform(getTransform_CLHEP());
58  Amg::Vector3D p((prdtransform.inverse())*(m_sp->globalPosition()));
59  SoPointSet * points = new SoPointSet;
60  SoVertexProperty * vertices = new SoVertexProperty;
61  vertices->vertex.set1Value(0,p.x(),p.y(),p.z());
62  points->numPoints=1;
63  points->vertexProperty.setValue(vertices);
64  shape_simple = points;
65  } else {
66  shape_simple = common()->nodeManager()->getShapeNode_Point();
67  }
68  shape_detailed = shape_simple;
69 }
HitsSoNodeManager.h
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
PRDHandleBase::getTransform_CLHEP
Amg::Transform3D getTransform_CLHEP() const
Definition: PRDHandleBase.cxx:322
PRDHandle_SpacePoint.h
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
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PRDHandle_SpacePoint::m_sp
const Trk::SpacePoint * m_sp
Definition: PRDHandle_SpacePoint.h:61
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
PRDCollHandle_SpacePoints
Definition: PRDCollHandle_SpacePoints.h:25
PRDHandle_SpacePoint::m_d
Imp * m_d
Definition: PRDHandle_SpacePoint.h:62
PRDHandleBase::common
PRDSysCommonData * common() const
Definition: PRDHandleBase.h:53
PRDSysCommonData::nodeManager
HitsSoNodeManager * nodeManager() const
Definition: PRDSysCommonData.h:79
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
PRDHandle_SpacePoint::~PRDHandle_SpacePoint
virtual ~PRDHandle_SpacePoint()
Definition: PRDHandle_SpacePoint.cxx:38
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
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
PRDCollHandle_SpacePoints.h
PRDHandle_SpacePoint::Imp
Definition: PRDHandle_SpacePoint.cxx:26
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
HitsSoNodeManager::getShapeNode_Point
SoNode * getShapeNode_Point()
Definition: HitsSoNodeManager.cxx:412
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
python.compressB64.c
def c
Definition: compressB64.py:93
PRDHandle_SpacePoint::getSecondPRD
const Trk::PrepRawData * getSecondPRD() const
Definition: PRDHandle_SpacePoint.h:50
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97