Definition at line 28 of file TrackHandle_TruthTrack.cxx.
◆ Imp()
Definition at line 30 of file TrackHandle_TruthTrack.cxx.
std::vector< AscObj_TruthPoint * > * ascObjs
const Trk::Track * trkTrack
TrackHandle_TruthTrack * theclass
HepMC::ConstGenParticlePtr genParticle
◆ addPars()
Definition at line 92 of file TrackHandle_TruthTrack.cxx.
93 {
94 if (!pars)
95 return;
96 Trk::TrackStateOnSurface * tsos =
createTSOS(pars);
97 if (tsos)
99 }
static Trk::TrackStateOnSurface * createTSOS(Trk::TrackParameters *pars)
◆ createTrack()
| void TrackHandle_TruthTrack::Imp::createTrack |
( |
Trk::TrackStates * | trackStateOnSurfaces | ) |
|
|
inline |
Definition at line 101 of file TrackHandle_TruthTrack.cxx.
102 {
103 if (!trackStateOnSurfaces) {
104 VP1Msg::messageDebug(
"TrackHandle_TruthTrack WARNING: Could not create track due to null TSOS vector");
105 return;
106 }
107 if (trackStateOnSurfaces->
empty()) {
108 VP1Msg::messageDebug(
"TrackHandle_TruthTrack WARNING: Could not create track due to empty TSOS vector");
109 delete trackStateOnSurfaces;
110 return;
111 }
114 delete trackStateOnSurfaces;
115 return;
116 }
117
119 std::unique_ptr<Trk::TrackStates> sink(trackStateOnSurfaces);
121 std::move(sink),
122 nullptr );
123
124 }
bool empty() const noexcept
Returns true if the collection is empty.
@ Unknown
Track fitter not defined.
static void messageDebug(const QString &)
◆ createTrkParamFromDecayVertex()
Definition at line 65 of file TrackHandle_TruthTrack.cxx.
66 {
67 if (!p)
68 return nullptr;
70 if (!v)
71 return nullptr;
73
74
75
77
79 Amg::Transform3D amgTransf(amgtranslation * Amg::RotationMatrix3D::Identity());
80
82 }
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D
const HepMC::GenVertex * ConstGenVertexPtr
ParametersT< TrackParametersDim, Charged, PlaneSurface > AtaPlane
◆ createTrkPerigeeFromProdVertex()
Definition at line 50 of file TrackHandle_TruthTrack.cxx.
51 {
52 if (!p)
53 return nullptr;
55 if (!v)
56 return nullptr;
58 double absmom(
mom.mag());
59 if (absmom<=0)
60 return nullptr;
63 }
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
◆ createTSOS()
Definition at line 84 of file TrackHandle_TruthTrack.cxx.
85 {
86 return pars ?
new Trk::TrackStateOnSurface(
87 nullptr,
88 std::unique_ptr<Trk::TrackParameters>(pars),
89 nullptr)
90 : nullptr;
91 }
◆ ensureInitAscObjs()
| void TrackHandle_TruthTrack::Imp::ensureInitAscObjs |
( |
| ) |
|
Definition at line 307 of file TrackHandle_TruthTrack.cxx.
308{
310 return;
311 ascObjs =
new std::vector<AscObj_TruthPoint*>;
317 }
319 if (vprod)
321
322 if (vend) {
324 } else {
326 for ( it =
simHitList.begin(); it != itE; ++it )
328 }
329 std::vector<AscObj_TruthPoint*>::iterator
it,
itE(
ascObjs->end());
330 for (it=
ascObjs->begin();it!=itE;++it)
332 for (it=
ascObjs->begin();it!=itE;++it)
334}
◆ ensureInitTrkTracks()
| void TrackHandle_TruthTrack::Imp::ensureInitTrkTracks |
( |
| ) |
|
Definition at line 157 of file TrackHandle_TruthTrack.cxx.
158{
160 return;
161
162
163
164
166 bool decayedGenParticle = useGenParticle &&
genParticle->end_vertex();
167 bool useSimHits = !decayedGenParticle && !
simHitList.empty();
168
169 if (!useGenParticle&&!useSimHits) {
170 VP1Msg::message(
"TrackHandle_TruthTrack ERROR: Track has neither a genparticle or sim. hits!!");
171 return;
172 }
173
175 VP1Msg::message(
"TrackHandle_TruthTrack ERROR: Could not determine particle charge (pdg="
176 +QString::number(
theclass->pdgCode())+
").");
177 return;
178 }
180
182
183 if (useGenParticle) {
185
186 if (decayedGenParticle) {
189 return;
190 }
191 }
192
193 if (useSimHits) {
194
196 for ( it =
simHitList.begin(); it != itE; ++it ) {
197
198
199 addPars(trackStateOnSurfaces,
it->second->createTrackParameters());
200 }
201
202 }
203
205}
static Trk::Perigee * createTrkPerigeeFromProdVertex(HepMC::ConstGenParticlePtr p, const double &charge)
void createTrack(Trk::TrackStates *trackStateOnSurfaces)
static void addPars(Trk::TrackStates *dv, Trk::TrackParameters *pars)
static Trk::TrackParameters * createTrkParamFromDecayVertex(HepMC::ConstGenParticlePtr p, const double &charge)
static void message(const QString &, IVP1System *sys=0)
DataVector< const Trk::TrackStateOnSurface > TrackStates
◆ ascObjs
◆ ascObjVis
| bool TrackHandle_TruthTrack::Imp::ascObjVis |
◆ genParticle
◆ simBarCode
| SimBarCode TrackHandle_TruthTrack::Imp::simBarCode |
◆ simHitList
| SimHitList TrackHandle_TruthTrack::Imp::simHitList |
◆ theclass
◆ trkTrack
| const Trk::Track* TrackHandle_TruthTrack::Imp::trkTrack |
The documentation for this class was generated from the following file: