ATLAS Offline Software
Loading...
Searching...
No Matches
HelperStructs.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef TRKEXINTERFACES_HELPERSTRUCTS_H
6#define TRKEXINTERFACES_HELPERSTRUCTS_H
7
9
10namespace Trk {
11struct HitInfo
12{
13 std::unique_ptr<const Trk::TrackParameters> trackParms; // intersection
14 float time; // timing
15 int detID; // sensitive detector id
16 float deposit; // interaction energy deposit (secondaries subtracted)
17
21 HitInfo(std::unique_ptr<const Trk::TrackParameters> parms,
22 float time,
23 int id,
24 float deposit)
25 : trackParms(std::move(parms))
26 , time(time)
27 , detID(id)
29 {
30 }
31};
32
33struct PathLimit
34{
35 float x0Max; // path limit after which sampled process occurs
36 float x0Collected; // x0 traversed so far
37 float l0Collected; // l0 traversed so far
38 float weightedZ; // type of material traversed (divide by collected x0 to get average Z)
39 int process; // type of pre-sampled material process
40
44 PathLimit( float pathLimit, int proc) :
45 x0Max(pathLimit), x0Collected(0.0), l0Collected(0.0),weightedZ(0.0), process(proc)
46 {}
47
51 void updateMat( float dX0, float Z, float dL0) {
52 x0Collected += dX0; weightedZ += dX0*Z;
53 l0Collected += dL0>0. ? dL0 : dX0/0.37/Z; // use approximation if l0 not available
54 }
55};
56
57struct TimeLimit
58{
59 float tMax; // pre-sampled life-time
60 float time; // timing
61 int process; // type of pre-sampled decay process
62
66 TimeLimit( float timeMax, float time, int proc) :
67 tMax(timeMax), time(time), process(proc)
68 {}
69
73 void updateTime( float dt) { time += dt; }
74};
75}
76
77#endif
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.
HitInfo(std::unique_ptr< const Trk::TrackParameters > parms, float time, int id, float deposit)
Constructor.
std::unique_ptr< const Trk::TrackParameters > trackParms
PathLimit(float pathLimit, int proc)
Constructor.
void updateMat(float dX0, float Z, float dL0)
collected material update
void updateTime(float dt)
timing update
TimeLimit(float timeMax, float time, int proc)
Constructor.