LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
TotallyCheatTrackingAlg.cxx
Go to the documentation of this file.
1
11
// algorithm header
12
#include "
larexamples/Algorithms/TotallyCheatTracks/TotallyCheatTrackingAlg.h
"
13
14
// LArSoft libraries
15
#include "
larcorealg/Geometry/geo_vectors_utils.h
"
// geo::vect namespace
16
17
// C/C++ standard libraries
18
#include <utility>
// std::move()
19
20
21
//------------------------------------------------------------------------------
22
//--- lar::example::TotallyCheatTrackingAlg implementation
23
//------------------------------------------------------------------------------
24
lar::example::CheatTrack
lar::example::TotallyCheatTrackingAlg::makeTrack
25
(
simb::MCParticle
const
& mcParticle)
const
26
{
27
recob::Trajectory::Positions_t
pos;
28
recob::Trajectory::Momenta_t
mom;
29
30
for
(
auto
const
& pair: mcParticle.
Trajectory
()) {
31
pos.push_back
32
(
geo::vect::rounded01
(
geo::vect::toPoint
(pair.first.Vect()), 1
e
-8));
33
mom.push_back
34
(
geo::vect::rounded01
(
geo::vect::toVector
(pair.second.Vect()), 1
e
-8));
35
}
// for
36
37
return
{ { std::move(pos), std::move(mom),
true
}, mcParticle.
PdgCode
() };
38
}
// lar::example::TotallyCheatTrackingAlg::makeTrack()
39
40
41
//------------------------------------------------------------------------------
simb::MCParticle::PdgCode
int PdgCode() const
Definition:
MCParticle.h:216
simb::MCParticle::Trajectory
const simb::MCTrajectory & Trajectory() const
Definition:
MCParticle.h:257
geo::vect::toPoint
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
Definition:
geo_vectors_utils.h:1281
TotallyCheatTrackingAlg.h
Algorithm to "reconstruct" trajectories from simulated particles.
geo::vect::toVector
::geo::Vector_t toVector(Vector const &v)
Convert the specified vector into a geo::Vector_t.
Definition:
geo_vectors_utils.h:1286
simb::MCParticle
Definition:
MCParticle.h:24
lar::example::CheatTrack
Pseudo-track object for TotallyCheatTracks example.
Definition:
CheatTrack.h:52
geo_vectors_utils.h
Utilities to extend the interface of geometry vectors.
lar::example::TotallyCheatTrackingAlg::makeTrack
lar::example::CheatTrack makeTrack(simb::MCParticle const &mcParticle) const
Returns a reconstructed track from the specified particle.
Definition:
TotallyCheatTrackingAlg.cxx:25
recob::Trajectory::Positions_t
tracking::Positions_t Positions_t
Type of trajectory point list.
Definition:
Trajectory.h:84
recob::Trajectory::Momenta_t
tracking::Momenta_t Momenta_t
Type of momentum list.
Definition:
Trajectory.h:87
geo::vect::rounded01
Vector rounded01(Vector const &v, Scalar tol)
Returns a vector with all components rounded if close to 0, -1 or +1.
Definition:
geo_vectors_utils.h:965
e
Float_t e
Definition:
plot.C:34
larexamples
v06_14_06
source
larexamples
Algorithms
TotallyCheatTracks
TotallyCheatTrackingAlg.cxx
Generated on Thu Jul 26 2018 13:10:00 for LArSoft by
1.8.11