ATLAS Offline Software
Loading...
Searching...
No Matches
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//____________________________________________________________________
27public:
28};
29
30
31//____________________________________________________________________
36
37//____________________________________________________________________
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//____________________________________________________________________
54void PRDHandle_SpacePoint::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
55{
56 if (getSecondPRD()) {
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}
static Double_t sp
Amg::Transform3D getTransform_CLHEP() const
PRDHandleBase(PRDCollHandleBase *)
PRDSysCommonData * common() const
void buildShapes(SoNode *&shape_simple, SoNode *&shape_detailed)
Amg::Vector3D center() const
const Trk::PrepRawData * getSecondPRD() const
const Trk::SpacePoint * m_sp
PRDHandle_SpacePoint(PRDCollHandle_SpacePoints *, const Trk::SpacePoint *)
HitsSoNodeManager * nodeManager() const
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D