ATLAS Offline Software
Simulation
G4Utilities
G4Ancillary
G4AncillarySimEvent
src
SimpleScintillatorHit.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// SimpleScintillatorHit.h
7
// Implementation file for class SimpleScintillatorHit
8
//
9
// Author Andrea Di Simone. Based on ScintillatorHit by homas Kittelmann <kittel@nbi.dk>
11
#include "
G4AncillarySimEvent/SimpleScintillatorHit.h
"
12
13
// Default constructor needed by athenaroot
14
SimpleScintillatorHit::SimpleScintillatorHit
() :
15
m_particleEncoding(0),
16
m_kineticEnergy(0),
17
m_energyDeposit(0),
18
m_position(0),
19
m_globalTime(0),
20
m_copyNo(0),
21
m_partLink() {}
22
23
SimpleScintillatorHit::~SimpleScintillatorHit
() {}
24
25
// Constructor
26
SimpleScintillatorHit::SimpleScintillatorHit
(
const
int
particleEncoding,
27
const
float
kineticEnergy,
28
const
float
energyDeposit
,
29
const
CLHEP::Hep3Vector& position,
30
const
float
globalTime,
31
const
int
copyNo,
32
const
int
track
) :
33
m_particleEncoding(particleEncoding),
34
m_kineticEnergy(kineticEnergy),
35
m_energyDeposit(
energyDeposit
),
36
m_position(position),
37
m_globalTime(globalTime),
38
m_copyNo(copyNo),
39
m_partLink(
track
, 0,
HepMcParticleLink
::IS_POSITION,
HepMcParticleLink
::IS_BARCODE)
// FIXME barcode-based syntax
40
{}
41
42
int
SimpleScintillatorHit::truthBarcode
()
const
{
43
return
HepMC::barcode
(
m_partLink
);
// FIXME barcode-based
44
}
45
46
int
SimpleScintillatorHit::truthID
()
const
47
{
48
return
m_partLink
.
id
();
49
}
SimpleScintillatorHit.h
SimpleScintillatorHit::~SimpleScintillatorHit
virtual ~SimpleScintillatorHit()
Definition:
SimpleScintillatorHit.cxx:23
HepMcParticleLink::id
int id() const
Return the id of the target particle.
Definition:
HepMcParticleLink.cxx:291
Trk::energyDeposit
@ energyDeposit
Definition:
MeasurementType.h:32
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition:
HepMcParticleLink.h:72
HepMC::barcode
int barcode(const T *p)
Definition:
Barcode.h:16
SimpleScintillatorHit::truthID
int truthID() const
Definition:
SimpleScintillatorHit.cxx:46
SimpleScintillatorHit::m_partLink
HepMcParticleLink m_partLink
Definition:
SimpleScintillatorHit.h:58
xAOD::track
@ track
Definition:
TrackingPrimitives.h:512
SimpleScintillatorHit::SimpleScintillatorHit
SimpleScintillatorHit()
Definition:
SimpleScintillatorHit.cxx:14
SimpleScintillatorHit::truthBarcode
int truthBarcode() const
Definition:
SimpleScintillatorHit.cxx:42
Generated on Mon Dec 23 2024 21:18:24 for ATLAS Offline Software by
1.8.18