ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1PRDSystems
src
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
17
#include "
VP1PRDSystems/PRDHandle_SpacePoint.h
"
18
#include "
VP1PRDSystems/PRDCollHandle_SpacePoints.h
"
19
#include "
VP1Utils/HitsSoNodeManager.h
"
20
21
#include <Inventor/C/errors/debugerror.h>
22
#include <Inventor/nodes/SoPointSet.h>
23
#include <Inventor/nodes/SoVertexProperty.h>
24
25
//____________________________________________________________________
26
class
PRDHandle_SpacePoint::Imp
{
27
public
:
28
};
29
30
31
//____________________________________________________________________
32
PRDHandle_SpacePoint::PRDHandle_SpacePoint
(
PRDCollHandle_SpacePoints
* ch,
const
Trk::SpacePoint
*
sp
)
33
:
PRDHandleBase
(ch),
m_sp
(
sp
),
m_d
(new
Imp
)
34
{
35
}
36
37
//____________________________________________________________________
38
PRDHandle_SpacePoint::~PRDHandle_SpacePoint
()
39
{
40
delete
m_d
;
41
}
42
43
//____________________________________________________________________
44
int
PRDHandle_SpacePoint::regionIndex
() {
45
static
const
double
l=
isSCT
() ? 100.0 : 200.0;
//CLHEP::mm
46
Amg::Vector3D
c(
center
());
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
sp
static Double_t sp
Definition
LArPhysWaveHECTool.cxx:37
PRDCollHandle_SpacePoints.h
PRDHandle_SpacePoint.h
HitsSoNodeManager::getShapeNode_Point
SoNode * getShapeNode_Point()
Definition
HitsSoNodeManager.cxx:412
PRDCollHandle_SpacePoints
Definition
PRDCollHandle_SpacePoints.h:25
PRDHandleBase::getTransform_CLHEP
Amg::Transform3D getTransform_CLHEP() const
Definition
PRDHandleBase.cxx:322
PRDHandleBase::PRDHandleBase
PRDHandleBase(PRDCollHandleBase *)
Definition
PRDHandleBase.cxx:66
PRDHandleBase::common
PRDSysCommonData * common() const
Definition
PRDHandleBase.h:53
PRDHandle_SpacePoint::Imp
Definition
PRDHandle_SpacePoint.cxx:26
PRDHandle_SpacePoint::buildShapes
void buildShapes(SoNode *&shape_simple, SoNode *&shape_detailed)
Definition
PRDHandle_SpacePoint.cxx:54
PRDHandle_SpacePoint::center
Amg::Vector3D center() const
Definition
PRDHandle_SpacePoint.h:42
PRDHandle_SpacePoint::isSCT
bool isSCT()
Definition
PRDHandle_SpacePoint.h:45
PRDHandle_SpacePoint::getSecondPRD
const Trk::PrepRawData * getSecondPRD() const
Definition
PRDHandle_SpacePoint.h:50
PRDHandle_SpacePoint::m_sp
const Trk::SpacePoint * m_sp
Definition
PRDHandle_SpacePoint.h:61
PRDHandle_SpacePoint::regionIndex
int regionIndex()
Definition
PRDHandle_SpacePoint.cxx:44
PRDHandle_SpacePoint::m_d
Imp * m_d
Definition
PRDHandle_SpacePoint.h:63
PRDHandle_SpacePoint::~PRDHandle_SpacePoint
virtual ~PRDHandle_SpacePoint()
Definition
PRDHandle_SpacePoint.cxx:38
PRDHandle_SpacePoint::PRDHandle_SpacePoint
PRDHandle_SpacePoint(PRDCollHandle_SpacePoints *, const Trk::SpacePoint *)
Definition
PRDHandle_SpacePoint.cxx:32
PRDSysCommonData::nodeManager
HitsSoNodeManager * nodeManager() const
Definition
PRDSysCommonData.h:79
Trk::SpacePoint
Definition
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Generated on
for ATLAS Offline Software by
1.17.0