ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleUserInformation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// ParticleUserInformation.h, (c) ATLAS Detector software
8
9#ifndef ISF_EVENT_PARTICLEUSERINFORMATION_H
10#define ISF_EVENT_PARTICLEUSERINFORMATION_H
11
12#include <cmath>
13#include <memory>
14
15namespace ISF {
16
27
29 {
30 float dMax; // path limit after which sampled process occurs
31 float dCollected; // material thickness traversed so far
32 int process; // type of pre-sampled material process
33
34 MaterialPathInfo( int proc, float pathLimit, float pathCurrent ) :
35 dMax(pathLimit), dCollected(pathCurrent), process(proc)
36 {}
37
40 void updatePath( float d) { dCollected += d; }
41
43 bool operator==(const MaterialPathInfo& rhs) const {
44 float epsilon = 1e-6;
45 bool pass = true;
46 pass &= std::fabs(dMax-rhs.dMax) < epsilon;
47 pass &= std::fabs(dCollected-rhs.dCollected) < epsilon;
48 pass &= process == rhs.process;
49 return pass;
50 }
51 };
52
54
55 public:
58
60 virtual ~ParticleUserInformation() = default;
61
62 int getExtraBC() const;
63 int process() const;
64 int generation() const;
65 const MaterialPathInfo* materialLimit() const;
66
67 void setExtraBC(int extrabc);
68 void setProcess(int proc);
69 void setGeneration(int gen);
70 void setMaterialLimit(int process, float x0lim, float x0coll);
71
73 bool operator==(const ParticleUserInformation& rhs) const;
74
75 private:
76
77 int m_process; // generating process
78 int m_generation; // generation number (i.e. number of vertices separating vertex of origin
79 // from the primary vertex (GenEvent input)
80 std::unique_ptr<MaterialPathInfo> m_matInfo; // presampled process and material collection
81 };
82} // end of namespace
83
84
86
88
90
91inline void ISF::ParticleUserInformation::setProcess(int proc) { m_process = proc; }
92
94
95inline void ISF::ParticleUserInformation::setMaterialLimit(int proc, float dMax, float d)
96{ m_matInfo = std::make_unique<ISF::MaterialPathInfo>(proc,dMax,d); }
97
98#endif // ISF_EVENT_PARTICLEUSERINFORMATION_H
bool operator==(const ParticleUserInformation &rhs) const
Comparison.
const MaterialPathInfo * materialLimit() const
void setExtraBC(int extrabc)
std::unique_ptr< MaterialPathInfo > m_matInfo
void setMaterialLimit(int process, float x0lim, float x0coll)
virtual ~ParticleUserInformation()=default
virtual destructor
ISFParticleOrderedQueue.
MaterialPathInfo(int proc, float pathLimit, float pathCurrent)
bool operator==(const MaterialPathInfo &rhs) const
comparison
void updatePath(float d)
collected material update