ATLAS Offline Software
Simulation
G4Sim
MCTruth
MCTruth
TrackHelper.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MCTRUTH_TRACKHELPER_H
6
#define MCTRUTH_TRACKHELPER_H
7
8
9
#include "
GeneratorObjects/HepMcParticleLink.h
"
10
11
class
G4Track;
12
class
TrackInformation
;
13
14
class
TrackHelper
{
15
public
:
16
TrackHelper
(
const
G4Track*
t
);
17
bool
IsPrimary
()
const
;
18
bool
IsRegeneratedPrimary
()
const
;
19
bool
IsRegisteredSecondary
()
const
;
20
bool
IsSecondary
()
const
;
21
int
GetBarcode
()
const
;
// TODO Drop this once UniqueID and Status are used instead
22
int
GetUniqueID
()
const
;
23
int
GetStatus
()
const
;
24
TrackInformation
*
GetTrackInformation
() {
return
m_trackInfo
;}
30
inline
HepMcParticleLink
GenerateParticleLink
();
31
private
:
32
TrackInformation
*
m_trackInfo
;
33
};
34
35
HepMcParticleLink
TrackHelper::GenerateParticleLink
()
36
{
37
#if defined(HEPMC3)
38
return
HepMcParticleLink
(this->
GetUniqueID
(), 0,
HepMcParticleLink::IS_POSITION
,
HepMcParticleLink::IS_ID
);
39
#else
40
return
HepMcParticleLink
(this->
GetBarcode
(), 0,
HepMcParticleLink::IS_POSITION
,
HepMcParticleLink::IS_BARCODE
);
41
#endif
42
}
43
44
#endif // MCTRUTH_TRACKHELPER_H
HepMcParticleLink.h
TrackHelper::IsRegeneratedPrimary
bool IsRegeneratedPrimary() const
Definition:
TrackHelper.cxx:20
HepMcParticleLink::IS_BARCODE
@ IS_BARCODE
Definition:
HepMcParticleLink.h:85
TrackHelper::GetBarcode
int GetBarcode() const
Definition:
TrackHelper.cxx:35
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
TrackHelper
Definition:
TrackHelper.h:14
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition:
HepMcParticleLink.h:72
HepMcParticleLink::IS_POSITION
@ IS_POSITION
Definition:
HepMcParticleLink.h:80
TrackHelper::TrackHelper
TrackHelper(const G4Track *t)
Definition:
TrackHelper.cxx:11
HepMcParticleLink::IS_ID
@ IS_ID
Definition:
HepMcParticleLink.h:84
TrackInformation
Implementation of VTrackInformation. Instances of this class are attached as UserInformation to G4Tra...
Definition:
TrackInformation.h:41
TrackHelper::IsSecondary
bool IsSecondary() const
Definition:
TrackHelper.cxx:30
TrackHelper::GetTrackInformation
TrackInformation * GetTrackInformation()
Definition:
TrackHelper.h:24
TrackHelper::GetStatus
int GetStatus() const
Definition:
TrackHelper.cxx:47
TrackHelper::IsRegisteredSecondary
bool IsRegisteredSecondary() const
Definition:
TrackHelper.cxx:25
TrackHelper::IsPrimary
bool IsPrimary() const
Definition:
TrackHelper.cxx:15
TrackHelper::m_trackInfo
TrackInformation * m_trackInfo
Definition:
TrackHelper.h:32
TrackHelper::GenerateParticleLink
HepMcParticleLink GenerateParticleLink()
Generates a creates new HepMcParticleLink object on the stack based on GetUniqueID(),...
Definition:
TrackHelper.h:35
TrackHelper::GetUniqueID
int GetUniqueID() const
Definition:
TrackHelper.cxx:41
Generated on Sun Dec 22 2024 21:20:23 for ATLAS Offline Software by
1.8.18