ATLAS Offline Software
graphics
VP1
VP1Systems
VP1TrackSystems
VP1TrackSystems
SimHitHandleBase.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 sim. hit. handle classes //
9
// //
10
// Description: Wrapper for simhits and track records //
11
// //
12
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13
// Initial version: March 2008 //
14
// update: Feb 2014 - Ric Bianchi (rbianchi@cern.ch)//
15
// //
17
18
#ifndef SIMHITHANDLEBASE_H
19
#define SIMHITHANDLEBASE_H
20
21
#include "
VP1TrackSystems/SimBarCode.h
"
22
23
// Eigen migration
24
//#include "TrkEventPrimitives/GlobalMomentum.h"
25
//#include "TrkEventPrimitives/GlobalPosition.h"
26
#include "
GeoPrimitives/GeoPrimitives.h
"
27
28
#include "
GeneratorObjects/HepMcParticleLink.h
"
29
#include "
TrkParameters/TrackParameters.h
"
30
#include <QString>
31
32
class
SimHitHandleBase
{
33
public
:
34
SimHitHandleBase
() :
m_trackPars
(nullptr),
m_pdgId
(
SimBarCode
::unknownPDG),
m_fakemom
(-2),
m_charge
(-99999.0) {}
35
virtual
~SimHitHandleBase
(){}
36
virtual
QString
type
()
const
= 0;
37
38
//Fixme: Evaluate which of the following we really need:
39
virtual
Amg::Vector3D
momentumDirection
()
const
= 0;
40
virtual
double
actualMomentum
()
const
{
return
-1; }
41
double
momentum
()
const
{
return
m_fakemom
== -2 ?
actualMomentum
() :
m_fakemom
; }
42
virtual
Amg::Vector3D
posStart
()
const
= 0;
43
virtual
Amg::Vector3D
posEnd
()
const
= 0;
44
virtual
double
hitTime
()
const
= 0;
45
46
virtual
const
HepMcParticleLink
&
particleLink
()
const
= 0;
47
int
pdg
()
const
;
48
SimBarCode
simBarCode
()
const
{
return
SimBarCode
(
particleLink
(),
pdg
()); }
49
50
bool
hasCharge
()
const
{
return
m_charge
!=-99999.0; }
51
double
charge
()
const
{
return
m_charge
; }
52
53
virtual
Trk::TrackParameters
*
createTrackParameters
()
const
= 0;
54
55
//FIXME: for TrackCollHandle_TruthTracks
56
void
setFakeMomentum
(
const
double
&
m
) {
m_fakemom
=
m
; }
57
void
setCharge
(
const
double
&
c
) {
m_charge
=
c
; }
58
void
cacheMomentum
() {
if
(
m_fakemom
==-2)
m_fakemom
=
actualMomentum
(); }
59
60
protected
:
61
virtual
int
actualPDGCodeFromSimHit
()
const
{
return
SimBarCode::unknownPDG
; };
62
63
private
:
64
// It is illegal to copy/assign a SimHitHandleBase:
65
SimHitHandleBase
(
const
SimHitHandleBase
& );
66
SimHitHandleBase
&
operator=
(
const
SimHitHandleBase
& );
67
mutable
Trk::TrackParameters
*
m_trackPars
;
68
int
m_pdgId
;
69
void
setPDG
(
int
);
//For TrackCollHandle_TruthTracks in case actualPDGCodeFromSimHit() returns SimBarCode::unknownPDG;
70
double
m_fakemom
;
71
double
m_charge
;
72
friend
class
TrackCollHandle_TruthTracks
;
73
friend
class
TrackCollHandle_SimulationTracks
;
74
};
75
76
typedef
std::vector<std::pair<double,SimHitHandleBase*> >
SimHitList
;
//hitTime() to SimHitHandle's
77
79
// Inlines //
81
82
inline
int
SimHitHandleBase::pdg
()
const
83
{
84
return
m_pdgId
;
85
}
86
87
inline
void
SimHitHandleBase::setPDG
(
int
pdg)
88
{
89
m_pdgId
=
pdg
;
90
}
91
92
#endif
SimHitHandleBase::particleLink
virtual const HepMcParticleLink & particleLink() const =0
HepMcParticleLink.h
python.SystemOfUnits.m
int m
Definition:
SystemOfUnits.py:91
SimHitHandleBase::simBarCode
SimBarCode simBarCode() const
Definition:
SimHitHandleBase.h:48
TrackParameters.h
SimHitHandleBase::operator=
SimHitHandleBase & operator=(const SimHitHandleBase &)
SimHitHandleBase::~SimHitHandleBase
virtual ~SimHitHandleBase()
Definition:
SimHitHandleBase.h:35
SimHitList
std::vector< std::pair< double, SimHitHandleBase * > > SimHitList
Definition:
SimHitHandleBase.h:76
TrackCollHandle_TruthTracks
Definition:
TrackCollHandle_TruthTracks.h:25
SimHitHandleBase::momentumDirection
virtual Amg::Vector3D momentumDirection() const =0
SimBarCode
Definition:
SimBarCode.h:22
SimHitHandleBase::SimHitHandleBase
SimHitHandleBase(const SimHitHandleBase &)
SimHitHandleBase::posStart
virtual Amg::Vector3D posStart() const =0
GeoPrimitives.h
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition:
HepMcParticleLink.h:72
SimBarCode.h
SimHitHandleBase::setCharge
void setCharge(const double &c)
Definition:
SimHitHandleBase.h:57
SimHitHandleBase::SimHitHandleBase
SimHitHandleBase()
Definition:
SimHitHandleBase.h:34
SimBarCode::unknownPDG
static const int unknownPDG
Definition:
SimBarCode.h:25
SimHitHandleBase::cacheMomentum
void cacheMomentum()
Definition:
SimHitHandleBase.h:58
SimHitHandleBase::createTrackParameters
virtual Trk::TrackParameters * createTrackParameters() const =0
SimHitHandleBase::hitTime
virtual double hitTime() const =0
Trk::ParametersBase
Definition:
ParametersBase.h:55
SimHitHandleBase::type
virtual QString type() const =0
SimHitHandleBase::momentum
double momentum() const
Definition:
SimHitHandleBase.h:41
SimHitHandleBase::setPDG
void setPDG(int)
Definition:
SimHitHandleBase.h:87
SimHitHandleBase::m_fakemom
double m_fakemom
Definition:
SimHitHandleBase.h:70
SimHitHandleBase::m_charge
double m_charge
Definition:
SimHitHandleBase.h:71
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition:
GeoPrimitives.h:47
SimHitHandleBase::actualPDGCodeFromSimHit
virtual int actualPDGCodeFromSimHit() const
Definition:
SimHitHandleBase.h:61
SimHitHandleBase::pdg
int pdg() const
Definition:
SimHitHandleBase.h:82
SimHitHandleBase::m_trackPars
Trk::TrackParameters * m_trackPars
Definition:
SimHitHandleBase.h:67
SimHitHandleBase::m_pdgId
int m_pdgId
Definition:
SimHitHandleBase.h:68
SimHitHandleBase::hasCharge
bool hasCharge() const
Definition:
SimHitHandleBase.h:50
SimHitHandleBase::actualMomentum
virtual double actualMomentum() const
Definition:
SimHitHandleBase.h:40
SimHitHandleBase
Definition:
SimHitHandleBase.h:32
TrackCollHandle_SimulationTracks
Definition:
TrackCollHandle_SimulationTracks.h:25
SimHitHandleBase::charge
double charge() const
Definition:
SimHitHandleBase.h:51
SimHitHandleBase::posEnd
virtual Amg::Vector3D posEnd() const =0
python.compressB64.c
def c
Definition:
compressB64.py:93
SimHitHandleBase::setFakeMomentum
void setFakeMomentum(const double &m)
Definition:
SimHitHandleBase.h:56
Generated on Sun Dec 22 2024 21:18:10 for ATLAS Offline Software by
1.8.18