ATLAS Offline Software
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>
12 
13 // Default constructor needed by athenaroot
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 
24 
25 // Constructor
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 
43  return HepMC::barcode(m_partLink); // FIXME barcode-based
44 }
45 
47 {
48  return m_partLink.id();
49 }
SimpleScintillatorHit.h
SimpleScintillatorHit::~SimpleScintillatorHit
virtual ~SimpleScintillatorHit()
Definition: SimpleScintillatorHit.cxx:23
Trk::energyDeposit
@ energyDeposit
Definition: MeasurementType.h:32
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