ATLAS Offline Software
graphics
VP1
VP1Systems
VP1TrackSystems
VP1TrackSystems
SimHitHandle_TrackRecord.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Header file for class SimHitHandle_TrackRecord //
9
// //
10
// Description: Handle for Track Records //
11
// //
12
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13
// Initial version: May 2008 //
14
// //
16
17
#ifndef SIMHITHANDLE_TRACKRECORD_H
18
#define SIMHITHANDLE_TRACKRECORD_H
19
20
#include "
VP1TrackSystems/SimHitHandleBase.h
"
21
#include "
TrackRecord/TrackRecord.h
"
22
#include "
GeoPrimitives/CLHEPtoEigenConverter.h
"
23
24
25
class
TrackRecord
;
26
class
HepMcParticleLink
;
27
28
class
SimHitHandle_TrackRecord
:
public
SimHitHandleBase
{
29
public
:
30
31
SimHitHandle_TrackRecord
(
const
TrackRecord
*);
32
virtual
~SimHitHandle_TrackRecord
();
33
34
virtual
QString
type
()
const override
{
return
"TrackRecord"
; };
35
36
virtual
Amg::Vector3D
momentumDirection
()
const override
;
37
virtual
double
actualMomentum
()
const override
;
38
virtual
Amg::Vector3D
posStart
()
const override
;
39
virtual
Amg::Vector3D
posEnd
()
const override
;
//We fake this one as a point 0.1mm away from posStart, in the momentumDirection.
40
virtual
double
hitTime
()
const override
;
41
virtual
int
actualPDGCodeFromSimHit
()
const override
;
42
virtual
const
HepMcParticleLink
&
particleLink
()
const override
;
43
virtual
Trk::TrackParameters
*
createTrackParameters
()
const override
;
44
45
private
:
46
47
TrackRecord
*
m_trkrecord
;
//We keep this as non-const pointers due to wrong constness in TrackRecord methods!!
48
double
m_mom
;
49
Amg::Vector3D
m_momdir
;
50
const
HepMcParticleLink
*
m_link
;
51
};
52
54
// Inlines //
56
57
inline
Amg::Vector3D
SimHitHandle_TrackRecord::momentumDirection
()
const
58
{
59
return
m_momdir
;
60
}
61
62
inline
double
SimHitHandle_TrackRecord::actualMomentum
()
const
63
{
64
return
m_mom
;
65
}
66
67
inline
Amg::Vector3D
SimHitHandle_TrackRecord::posStart
()
const
68
{
69
return
Amg::Hep3VectorToEigen
(
m_trkrecord
->
GetPosition
());
70
}
71
72
inline
Amg::Vector3D
SimHitHandle_TrackRecord::posEnd
()
const
73
{
74
return
posStart
() + 0.1*
CLHEP::mm
*(
momentumDirection
());
//faking it... but shouldn't matter.
75
}
76
77
inline
double
SimHitHandle_TrackRecord::hitTime
()
const
78
{
79
return
m_trkrecord
->
GetTime
();
80
}
81
82
inline
int
SimHitHandle_TrackRecord::actualPDGCodeFromSimHit
()
const
83
{
84
return
m_trkrecord
->
GetPDGCode
();
85
}
86
87
#endif
SimHitHandle_TrackRecord::SimHitHandle_TrackRecord
SimHitHandle_TrackRecord(const TrackRecord *)
Definition:
SimHitHandle_TrackRecord.cxx:25
SimHitHandle_TrackRecord::posStart
virtual Amg::Vector3D posStart() const override
Definition:
SimHitHandle_TrackRecord.h:67
SimHitHandle_TrackRecord::type
virtual QString type() const override
Definition:
SimHitHandle_TrackRecord.h:34
SimHitHandle_TrackRecord::posEnd
virtual Amg::Vector3D posEnd() const override
Definition:
SimHitHandle_TrackRecord.h:72
SimHitHandle_TrackRecord::createTrackParameters
virtual Trk::TrackParameters * createTrackParameters() const override
Definition:
SimHitHandle_TrackRecord.cxx:41
SimHitHandle_TrackRecord::~SimHitHandle_TrackRecord
virtual ~SimHitHandle_TrackRecord()
Definition:
SimHitHandle_TrackRecord.cxx:35
SimHitHandle_TrackRecord::particleLink
virtual const HepMcParticleLink & particleLink() const override
Definition:
SimHitHandle_TrackRecord.cxx:64
SimHitHandle_TrackRecord::m_momdir
Amg::Vector3D m_momdir
Definition:
SimHitHandle_TrackRecord.h:49
SimHitHandle_TrackRecord::actualMomentum
virtual double actualMomentum() const override
Definition:
SimHitHandle_TrackRecord.h:62
Amg::Hep3VectorToEigen
Amg::Vector3D Hep3VectorToEigen(const CLHEP::Hep3Vector &CLHEPvector)
Converts a CLHEP-based CLHEP::Hep3Vector into an Eigen-based Amg::Vector3D.
Definition:
CLHEPtoEigenConverter.h:137
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition:
HepMcParticleLink.h:72
SimHitHandle_TrackRecord::hitTime
virtual double hitTime() const override
Definition:
SimHitHandle_TrackRecord.h:77
TrackRecord::GetTime
double GetTime() const
Time.
Definition:
TrackRecord.h:106
SimHitHandle_TrackRecord::m_link
const HepMcParticleLink * m_link
Definition:
SimHitHandle_TrackRecord.h:50
TrackRecord::GetPosition
CLHEP::Hep3Vector GetPosition() const
Position.
Definition:
TrackRecord.h:88
SimHitHandle_TrackRecord
Definition:
SimHitHandle_TrackRecord.h:28
Trk::ParametersBase
Definition:
ParametersBase.h:55
CLHEPtoEigenConverter.h
SimHitHandle_TrackRecord::m_mom
double m_mom
Definition:
SimHitHandle_TrackRecord.h:48
TrackRecord.h
SimHitHandleBase.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition:
GeoPrimitives.h:47
TrackRecord
Definition:
TrackRecord.h:12
python.SystemOfUnits.mm
int mm
Definition:
SystemOfUnits.py:83
SimHitHandle_TrackRecord::momentumDirection
virtual Amg::Vector3D momentumDirection() const override
Definition:
SimHitHandle_TrackRecord.h:57
SimHitHandleBase
Definition:
SimHitHandleBase.h:32
SimHitHandle_TrackRecord::actualPDGCodeFromSimHit
virtual int actualPDGCodeFromSimHit() const override
Definition:
SimHitHandle_TrackRecord.h:82
TrackRecord::GetPDGCode
int GetPDGCode() const
PDG Code.
Definition:
TrackRecord.h:100
SimHitHandle_TrackRecord::m_trkrecord
TrackRecord * m_trkrecord
Definition:
SimHitHandle_TrackRecord.h:47
Generated on Sun Dec 22 2024 21:18:10 for ATLAS Offline Software by
1.8.18