Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Algorithms
Detectors
Framework
include
ActsExamples
EventData
AverageSimHits.hpp
Cluster.hpp
ExtractedSimulationProcess.hpp
GeometryContainers.hpp
Index.hpp
IndexSourceLink.hpp
Measurement.hpp
MeasurementCalibration.hpp
ProtoTrack.hpp
ProtoVertex.hpp
ScalingCalibrator.hpp
SimHit.hpp
SimParticle.hpp
SimSeed.hpp
SimSpacePoint.hpp
SimVertex.hpp
Track.hpp
Trajectories.hpp
Framework
Utilities
Validation
ML
src
Io
Python
Run
Scripts
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Trajectories.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Trajectories.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019-2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/EventData/MultiTrajectory.hpp
"
12
#include "
Acts/EventData/VectorMultiTrajectory.hpp
"
13
#include "
Acts/Utilities/ThrowAssert.hpp
"
14
#include "
ActsExamples/EventData/IndexSourceLink.hpp
"
15
#include "
ActsExamples/EventData/Track.hpp
"
16
17
#include <algorithm>
18
#include <unordered_map>
19
#include <vector>
20
21
namespace
ActsExamples {
22
30
struct
Trajectories
final {
31
public
:
33
using
MultiTrajectory
=
Acts::ConstVectorMultiTrajectory
;
35
using
IndexedParameters
=
36
std::unordered_map<
Acts::MultiTrajectoryTraits::IndexType
,
37
TrackParameters
>;
38
41
Trajectories
() =
default
;
47
Trajectories
(
const
MultiTrajectory
& multiTraj,
48
const
std::vector<Acts::MultiTrajectoryTraits::IndexType>& tTips,
49
const
IndexedParameters
&
parameters
)
50
:
m_multiTrajectory
(&multiTraj),
51
m_trackTips
(tTips),
52
m_trackParameters
(parameters) {}
53
55
bool
empty
()
const
{
return
m_trackTips
.empty(); }
56
58
const
MultiTrajectory
&
multiTrajectory
()
const
{
59
throw_assert
(
m_multiTrajectory
!=
nullptr
,
"MultiTrajectory is null"
);
60
return
*
m_multiTrajectory
;
61
}
62
64
const
std::vector<Acts::MultiTrajectoryTraits::IndexType>&
tips
()
const
{
65
return
m_trackTips
;
66
}
67
72
bool
hasTrajectory
(
Acts::MultiTrajectoryTraits::IndexType
entryIndex)
const
{
73
return
(0 <
std::count
(
m_trackTips
.begin(),
m_trackTips
.end(), entryIndex));
74
}
75
80
bool
hasTrackParameters
(
81
Acts::MultiTrajectoryTraits::IndexType
entryIndex)
const
{
82
return
(0 <
m_trackParameters
.count(entryIndex));
83
}
84
89
const
TrackParameters
&
trackParameters
(
90
Acts::MultiTrajectoryTraits::IndexType
entryIndex)
const
{
91
auto
it
=
m_trackParameters
.find(entryIndex);
92
if
(
it
==
m_trackParameters
.end()) {
93
throw
std::runtime_error(
94
"No fitted track parameters for trajectory with entry index = "
+
95
std::to_string
(entryIndex));
96
}
97
return
it
->second;
98
}
99
100
private
:
101
// The track container
102
const
MultiTrajectory
*
m_multiTrajectory
{
nullptr
};
103
// The entry indices of trajectories stored in multiTrajectory
104
std::vector<Acts::MultiTrajectoryTraits::IndexType>
m_trackTips
= {};
105
// The fitted parameters at the provided surface for individual trajectories
106
IndexedParameters
m_trackParameters
= {};
107
};
108
110
using
TrajectoriesContainer
= std::vector<Trajectories>;
111
112
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Framework
include
ActsExamples
EventData
Trajectories.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration