Belle II Software development
recoTrack.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <tracking/dataobjects/RecoTrack.h>
10#include <framework/datastore/StoreArray.h>
11#include <framework/geometry/VectorUtil.h>
12
13#include <framework/utilities/TestHelpers.h>
14#include <framework/gearbox/Const.h>
15#include <vector>
16#include <genfit/WireTrackCandHit.h>
17
18using namespace std;
19
20namespace Belle2 {
26 class RecoTrackTest : public ::testing::Test {
27 protected:
29 void SetUp() override
30 {
32 m_storeArrayNameOfRecoTracks = "ILoveRecoTracks";
34 m_storeArrayNameOfPXDHits = "PXDsILike";
36 m_storeArrayNameOfSVDHits = "WhatAboutSVD";
38 m_storeArrayNameOfCDCHits = "CDCHitsAreCool";
40 m_storeArrayNameOfBKLMHits = "KeepBKLMsAlive";
42 m_storeArrayNameOfEKLMHits = "EKLMsAreImportant";
44 m_storeArrayNameOfHitInformation = "ConnectingAll";
45
46 //--- Setup -----------------------------------------------------------------------
47 // We do not use the KLM store arrays to test, if the RecoTrack can be used without them.
50 pxdHits.registerInDataStore();
52 svdHits.registerInDataStore();
54 cdcHits.registerInDataStore();
56 recoTracks.registerInDataStore();
58 recoHitInformations.registerInDataStore();
59
60 pxdHits.registerRelationTo(recoTracks);
61 svdHits.registerRelationTo(recoTracks);
62 cdcHits.registerRelationTo(recoTracks);
63 recoHitInformations.registerRelationTo(pxdHits);
64 recoHitInformations.registerRelationTo(svdHits);
65 recoHitInformations.registerRelationTo(cdcHits);
66
67 recoTracks.registerRelationTo(recoHitInformations);
68
69 //"CDCHit(tdcCount, adcCount, superLayer, layer, wire)"
70 //Indices range from 0-7
71 cdcHits.appendNew(100, 100, 0, 0, 0);
72 cdcHits.appendNew(100, 100, 2, 0, 0);
73 cdcHits.appendNew(100, 100, 4, 0, 0);
74 cdcHits.appendNew(100, 100, 6, 0, 0);
75 cdcHits.appendNew(100, 100, 8, 0, 0);
76 cdcHits.appendNew(100, 100, 1, 1, 0);
77 cdcHits.appendNew(100, 100, 3, 0, 0);
78 cdcHits.appendNew(100, 100, 5, 0, 0);
79
80 // We add some hits to the track. Then we assure they were added properly and the hit information objects are correct.
81 ROOT::Math::XYZVector position(0, 1, 2);
82 ROOT::Math::XYZVector momentum(-1, -0.5, 1.123);
83 short int charge = 1;
84 m_recoTrack = recoTracks.appendNew(position, momentum, charge,
87 m_recoTrack2 = recoTracks.appendNew(position, momentum, charge,
90 }
91
101 };
102
104 // cppcheck-suppress syntaxError
105 TEST_F(RecoTrackTest, cdcHit)
106 {
107 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
108
109 EXPECT_FALSE(m_recoTrack->hasCDCHits());
110
111 // Add three cdc hits to the track
112 m_recoTrack->addCDCHit(cdcHits[0], 1);
113 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right);
114 m_recoTrack->addCDCHit(cdcHits[2], 2);
115
116 EXPECT_TRUE(m_recoTrack->hasCDCHits());
117
118 EXPECT_TRUE(m_recoTrack->hasHit(cdcHits[0]));
119 EXPECT_TRUE(m_recoTrack->hasHit(cdcHits[1]));
120 EXPECT_TRUE(m_recoTrack->hasHit(cdcHits[2]));
121
122 EXPECT_FALSE(m_recoTrack->hasHit(cdcHits[4]));
123
124 ASSERT_EQ(m_recoTrack->getNumberOfCDCHits(), 3);
125 const std::vector<CDCHit*> addedCDCHits = m_recoTrack->getCDCHitList();
126 ASSERT_EQ(addedCDCHits.size(), 3);
127 EXPECT_EQ(addedCDCHits[0], cdcHits[0]);
128 EXPECT_EQ(addedCDCHits[1], cdcHits[1]);
129 EXPECT_EQ(addedCDCHits[2], cdcHits[2]);
130
131 const std::vector<CDCHit*> sortedCDCHits = m_recoTrack->getSortedCDCHitList();
132 ASSERT_EQ(sortedCDCHits.size(), 3);
133 EXPECT_EQ(sortedCDCHits[0], cdcHits[1]);
134 EXPECT_EQ(sortedCDCHits[1], cdcHits[0]);
135 EXPECT_EQ(sortedCDCHits[2], cdcHits[2]);
136
137 // Individual hit information
138 CDCHit* cdcHit = cdcHits[0];
139
140 RecoHitInformation* recoHitInformation = m_recoTrack->getRecoHitInformation(cdcHit);
141 EXPECT_NE(recoHitInformation, nullptr);
142 EXPECT_EQ(recoHitInformation->getTrackingDetector(), RecoHitInformation::RecoHitDetector::c_CDC);
143 EXPECT_EQ(recoHitInformation->getRightLeftInformation(), RecoHitInformation::RightLeftInformation::c_undefinedRightLeftInformation);
144 EXPECT_EQ(recoHitInformation->getFoundByTrackFinder(), RecoHitInformation::OriginTrackFinder::c_undefinedTrackFinder);
145 EXPECT_EQ(recoHitInformation->getSortingParameter(), 1);
146
147 cdcHit = cdcHits[1];
148 recoHitInformation = m_recoTrack->getRecoHitInformation(cdcHit);
149 EXPECT_NE(recoHitInformation, nullptr);
150 EXPECT_EQ(recoHitInformation->getRightLeftInformation(), RecoHitInformation::RightLeftInformation::c_right);
151
152
153
154 // Setter and getter for the reco hit information
155 // with added hits
156 cdcHit = cdcHits[0];
157
158 EXPECT_EQ(m_recoTrack->getTrackingDetector(cdcHit), RecoHitInformation::RecoHitDetector::c_CDC);
159 EXPECT_EQ(m_recoTrack->getRightLeftInformation(cdcHit), RecoHitInformation::RightLeftInformation::c_undefinedRightLeftInformation);
160 EXPECT_EQ(m_recoTrack->getFoundByTrackFinder(cdcHit), RecoHitInformation::OriginTrackFinder::c_undefinedTrackFinder);
161 EXPECT_EQ(m_recoTrack->getSortingParameter(cdcHit), 1);
162
163 EXPECT_NO_THROW(m_recoTrack->setFoundByTrackFinder(cdcHit, RecoHitInformation::OriginTrackFinder::c_SegmentTrackCombiner));
164 EXPECT_NO_THROW(m_recoTrack->setRightLeftInformation(cdcHit, RecoHitInformation::RightLeftInformation::c_left));
165 EXPECT_NO_THROW(m_recoTrack->setSortingParameter(cdcHit, 3));
166
167 EXPECT_EQ(m_recoTrack->getFoundByTrackFinder(cdcHit), RecoHitInformation::OriginTrackFinder::c_SegmentTrackCombiner);
168 EXPECT_EQ(m_recoTrack->getRightLeftInformation(cdcHit), RecoHitInformation::RightLeftInformation::c_left);
169 EXPECT_EQ(m_recoTrack->getSortingParameter(cdcHit), 3);
170
171 // with not added hits
172 cdcHit = cdcHits[4];
173
174 EXPECT_B2FATAL(m_recoTrack->getTrackingDetector(cdcHit));
175 EXPECT_B2FATAL(m_recoTrack->getRightLeftInformation(cdcHit));
176 EXPECT_B2FATAL(m_recoTrack->getFoundByTrackFinder(cdcHit));
177 EXPECT_B2FATAL(m_recoTrack->getSortingParameter(cdcHit));
178
179 EXPECT_B2FATAL(m_recoTrack->setFoundByTrackFinder(cdcHit, RecoHitInformation::OriginTrackFinder::c_SegmentTrackCombiner));
180 EXPECT_B2FATAL(m_recoTrack->setRightLeftInformation(cdcHit, RecoHitInformation::RightLeftInformation::c_left));
181 }
182
184 TEST_F(RecoTrackTest, cdcHitMCFinderCategory)
185 {
186 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
187
188 EXPECT_FALSE(m_recoTrack->hasCDCHits());
189
190 // Add three cdc hits to the track
191 m_recoTrack->addCDCHit(cdcHits[0], 1, RecoHitInformation::RightLeftInformation::c_right,
192 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderPriorityHit);
193 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right,
194 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderAuxiliaryHit);
195 // the mcfinder prorperty of this hit is not provided explicitly and therefore should be set to undefined
196 m_recoTrack->addCDCHit(cdcHits[2], 2);
197
198 // get the RecoHitInfo and check their category
199 EXPECT_EQ(m_recoTrack->getRecoHitInformation(cdcHits[0])->getFoundByTrackFinder(),
200 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderPriorityHit);
201 EXPECT_EQ(m_recoTrack->getRecoHitInformation(cdcHits[1])->getFoundByTrackFinder(),
202 RecoHitInformation::OriginTrackFinder::c_MCTrackFinderAuxiliaryHit);
203 EXPECT_EQ(m_recoTrack->getRecoHitInformation(cdcHits[2])->getFoundByTrackFinder(),
204 RecoHitInformation::OriginTrackFinder::c_undefinedTrackFinder);
205 }
206
208 TEST_F(RecoTrackTest, testGenfitConversionOne)
209 {
210 // Create a genfit track cand
211 genfit::TrackCand newCreatedTrackCand;
212 ROOT::Math::XYZVector position(4, 23, 5.6);
213 ROOT::Math::XYZVector momentum(4, 23, 5.6);
214 short int charge = 1;
215 // We can not add these parameters immediately - we have to convert them to the perigee parameters
216 newCreatedTrackCand.setPosMomSeed(XYZToTVector(position), XYZToTVector(momentum), charge);
217 newCreatedTrackCand.addHit(new genfit::WireTrackCandHit(Const::CDC, 0, -1, 0, 0));
218 newCreatedTrackCand.addHit(new genfit::WireTrackCandHit(Const::CDC, 1, -1, 1, 0));
219 newCreatedTrackCand.addHit(new genfit::WireTrackCandHit(Const::CDC, 2, -1, 2, 0));
220
221 // convert it to a RecoTrack
222 RecoTrack* recoTrackFromGenfit = RecoTrack::createFromTrackCand(newCreatedTrackCand, m_storeArrayNameOfRecoTracks,
223 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
224 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
225 m_storeArrayNameOfHitInformation);
226
227 // convert it back
228
229 const genfit::TrackCand& exportedTrackCand = recoTrackFromGenfit->createGenfitTrackCand();
230
231 // Expect equal
232 ASSERT_EQ(exportedTrackCand.getNHits(), newCreatedTrackCand.getNHits());
233 EXPECT_NEAR(exportedTrackCand.getPosSeed().X(), newCreatedTrackCand.getPosSeed().X(), 1E-10);
234 EXPECT_NEAR(exportedTrackCand.getPosSeed().Y(), newCreatedTrackCand.getPosSeed().Y(), 1E-10);
235 EXPECT_NEAR(exportedTrackCand.getPosSeed().Z(), newCreatedTrackCand.getPosSeed().Z(), 1E-10);
236 EXPECT_NEAR(exportedTrackCand.getMomSeed().X(), newCreatedTrackCand.getMomSeed().X(), 1E-10);
237 EXPECT_NEAR(exportedTrackCand.getMomSeed().Y(), newCreatedTrackCand.getMomSeed().Y(), 1E-10);
238 EXPECT_NEAR(exportedTrackCand.getMomSeed().Z(), newCreatedTrackCand.getMomSeed().Z(), 1E-10);
239 EXPECT_EQ(exportedTrackCand.getChargeSeed(), newCreatedTrackCand.getChargeSeed());
240 EXPECT_EQ(exportedTrackCand.getHit(0)->getHitId(), newCreatedTrackCand.getHit(0)->getHitId());
241 EXPECT_EQ(exportedTrackCand.getHit(1)->getSortingParameter(), newCreatedTrackCand.getHit(1)->getSortingParameter());
242 EXPECT_EQ(exportedTrackCand.getHit(2)->getHitId(), newCreatedTrackCand.getHit(2)->getHitId());
243 }
244
246 TEST_F(RecoTrackTest, testGenfitConversionTwo)
247 {
248 EXPECT_FALSE(m_recoTrack->hasCDCHits());
249 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
250
251 // Add three cdc hits to the track
252 m_recoTrack->addCDCHit(cdcHits[0], 1);
253 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right);
254 m_recoTrack->addCDCHit(cdcHits[2], 2);
255
256 EXPECT_TRUE(m_recoTrack->hasCDCHits());
257
258 const genfit::TrackCand& exportedTrackCand = m_recoTrack->createGenfitTrackCand();
259
260 ASSERT_EQ(exportedTrackCand.getNHits(), m_recoTrack->getNumberOfTotalHits());
261 ASSERT_EQ(m_recoTrack->getNumberOfTotalHits(), 3);
262
263 RecoTrack* recoTrackFromGenfit = RecoTrack::createFromTrackCand(exportedTrackCand, m_storeArrayNameOfRecoTracks,
264 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
265 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
266 m_storeArrayNameOfHitInformation);
267
268 B2INFO("kjh");
269
270 ASSERT_EQ(recoTrackFromGenfit->getNumberOfCDCHits(), m_recoTrack->getNumberOfCDCHits());
271 const auto& cdcHitListOne = recoTrackFromGenfit->getCDCHitList();
272 const auto& cdcHitListTwo = m_recoTrack->getCDCHitList();
273 ASSERT_EQ(cdcHitListOne.size(), 3);
274 ASSERT_EQ(cdcHitListTwo.size(), 3);
275 }
276
278 TEST_F(RecoTrackTest, copyRecoTrack)
279 {
280 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
281
282 // Add three cdc hits to the track
283 m_recoTrack->addCDCHit(cdcHits[0], 1);
284 m_recoTrack->addCDCHit(cdcHits[1], 0, RecoHitInformation::RightLeftInformation::c_right);
285 m_recoTrack->addCDCHit(cdcHits[2], 2);
286
287 // create a second RecoTrack
288 StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
289
290 auto recoTrack = recoTracks.appendNew(m_recoTrack->getPositionSeed(), m_recoTrack->getMomentumSeed(), m_recoTrack->getChargeSeed(),
291 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
292 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
293 m_storeArrayNameOfHitInformation);
294 EXPECT_FALSE(recoTrack->hasCDCHits());
295
296 // check if the offset computation of the hit order works as expected
297 size_t offset = 3;
298 recoTrack->addHitsFromRecoTrack(m_recoTrack, offset);
299 ASSERT_EQ(recoTrack->getNumberOfCDCHits(), 3);
300
301 size_t this_i = offset;
302 for (auto pHit : recoTrack->getSortedCDCHitList()) {
303 auto sortParam = recoTrack->getSortingParameter(pHit);
304 ASSERT_EQ(this_i, sortParam);
305 this_i++;
306 }
307 }
308
310 TEST_F(RecoTrackTest, recoHitInformations)
311 {
312 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
313
314 m_recoTrack->addCDCHit(cdcHits[0], 1);
315
316 // create a second RecoTrack
317 StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
318
319 RecoTrack* recoTrack2 = recoTracks.appendNew(m_recoTrack->getPositionSeed(), m_recoTrack->getMomentumSeed(),
320 m_recoTrack->getChargeSeed(),
321 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
322 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
323 m_storeArrayNameOfHitInformation);
324 recoTrack2->addCDCHit(cdcHits[1], 2);
325
326 ASSERT_EQ(m_recoTrack->getRecoHitInformations().size(), 1);
327 ASSERT_EQ(m_recoTrack->getRecoHitInformations()[0]->getSortingParameter(), 1);
328 ASSERT_EQ(recoTrack2->getRecoHitInformations().size(), 1);
329 ASSERT_EQ(recoTrack2->getRecoHitInformations()[0]->getSortingParameter(), 2);
330 }
331
333 TEST_F(RecoTrackTest, trackTime)
334 {
335 StoreArray<SVDCluster> svdHits(m_storeArrayNameOfSVDHits);
336 StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
337
338 //"SVDCluster(VxdID, isU, position, positionErr, clsTime, clsTimeErr, clsCharge, seedCharge, clsSize, clsSNR, clsChi2, FF)"
339 svdHits.appendNew(Belle2::VxdID("3.1.2"), true, 1.0, 0.01, 0.1, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
340 svdHits.appendNew(Belle2::VxdID("4.1.2"), true, 1.0, 0.01, 0.2, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
341 svdHits.appendNew(Belle2::VxdID("5.1.3"), true, 1.0, 0.01, 0.3, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
342 svdHits.appendNew(Belle2::VxdID("6.1.3"), true, 1.0, 0.01, 0.4, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
343 svdHits.appendNew(Belle2::VxdID("6.7.7"), true, 1.0, 0.01, 1.0, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
344 svdHits.appendNew(Belle2::VxdID("5.7.4"), true, 1.0, 0.01, 1.1, 0.1, 5.0e4, 5.0e4, 1, 50.0, 0.1, 0);
345
346 ROOT::Math::XYZVector momentum(0.25, 0.25, 0.05);
347
348 StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
349 RecoTrack* recoTrack = recoTracks.appendNew(m_recoTrack->getPositionSeed(), momentum,
350 m_recoTrack->getChargeSeed(),
351 m_storeArrayNameOfPXDHits, m_storeArrayNameOfSVDHits, m_storeArrayNameOfCDCHits,
352 m_storeArrayNameOfBKLMHits, m_storeArrayNameOfEKLMHits,
353 m_storeArrayNameOfHitInformation);
354
355 // SVD Hits
356 recoTrack->addSVDHit(svdHits[0], 0);
357 recoTrack->addSVDHit(svdHits[1], 1);
358 recoTrack->addSVDHit(svdHits[2], 2);
359 recoTrack->addSVDHit(svdHits[3], 3);
360
361 // CDC Hits
362 recoTrack->addCDCHit(cdcHits[0], 4);
363 recoTrack->addCDCHit(cdcHits[1], 5);
364
365 // SVD Hits
366 recoTrack->addSVDHit(svdHits[4], 6);
367 recoTrack->addSVDHit(svdHits[5], 7);
368
369 EXPECT_TRUE(recoTrack->hasSVDHits());
370
371 EXPECT_FALSE(recoTrack->hasOutgoingArmTime());
372 EXPECT_FALSE(recoTrack->hasIngoingArmTime());
373
374 B2INFO("outgoing arm time: " << recoTrack->getOutgoingArmTime());
375 B2INFO("ingoing arm time: " << recoTrack->getIngoingArmTime());
376 B2INFO("difference: " << recoTrack->getInOutArmTimeDifference());
377 EXPECT_NEAR(recoTrack->getIngoingArmTime(), recoTrack->getOutgoingArmTime(), 0.8);
378 EXPECT_NEAR(recoTrack->getIngoingArmTime(), 1.05, 1E-5);
379
380 EXPECT_TRUE(recoTrack->hasOutgoingArmTime());
381 EXPECT_TRUE(recoTrack->hasIngoingArmTime());
382 }
384}
R E
internal precision of FFTW codelets
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
void setInitializeActive(bool active)
Setter for m_initializeActive.
Definition: DataStore.cc:94
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
RightLeftInformation getRightLeftInformation() const
Get the right-left-information.
OriginTrackFinder getFoundByTrackFinder() const
Get which track finder has found the track.
RecoHitDetector getTrackingDetector() const
Get the detector this hit comes from.
unsigned int getSortingParameter() const
Get the sorting parameter.
Test class for the RecoTrack object.
Definition: recoTrack.cc:26
std::string m_storeArrayNameOfHitInformation
name of storeArray with hit information
Definition: recoTrack.cc:100
std::string m_storeArrayNameOfCDCHits
name of storeArray with CDC hits
Definition: recoTrack.cc:97
void SetUp() override
Setup a "working environment" with store arrays for the hits and the correct relations.
Definition: recoTrack.cc:29
std::string m_storeArrayNameOfBKLMHits
name of storeArray with BKLM hits
Definition: recoTrack.cc:98
std::string m_storeArrayNameOfRecoTracks
name of recoTracks storeArray
Definition: recoTrack.cc:94
std::string m_storeArrayNameOfSVDHits
name of storeArray with SVD hits
Definition: recoTrack.cc:96
RecoTrack * m_recoTrack2
pointer to other recoTrack
Definition: recoTrack.cc:93
std::string m_storeArrayNameOfEKLMHits
name of storeArray with EKLM hits
Definition: recoTrack.cc:99
RecoTrack * m_recoTrack
pointer to recoTrack
Definition: recoTrack.cc:92
std::string m_storeArrayNameOfPXDHits
name of storeArray with PXD hits
Definition: recoTrack.cc:95
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
bool addCDCHit(const UsedCDCHit *cdcHit, const unsigned int sortingParameter, RightLeftInformation rightLeftInformation=RightLeftInformation::c_undefinedRightLeftInformation, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
Adds a cdc hit with the given information to the reco track.
Definition: RecoTrack.h:243
float getInOutArmTimeDifference()
Return the difference between the track times of the ingoing and outgoing arms.
Definition: RecoTrack.h:542
float getOutgoingArmTime()
Return the track time of the outgoing arm.
Definition: RecoTrack.h:514
static RecoTrack * createFromTrackCand(const genfit::TrackCand &trackCand, const std::string &storeArrayNameOfRecoTracks="", const std::string &storeArrayNameOfPXDHits="", const std::string &storeArrayNameOfSVDHits="", const std::string &storeArrayNameOfCDCHits="", const std::string &storeArrayNameOfBKLMHits="", const std::string &storeArrayNameOfEKLMHits="", const std::string &storeArrayNameOfRecoHitInformation="", const bool recreateSortingParameters=false)
Create a reco track from a genfit::TrackCand and save it to the given store array.
Definition: RecoTrack.cc:97
std::vector< Belle2::RecoTrack::UsedCDCHit * > getCDCHitList() const
Return an unsorted list of cdc hits.
Definition: RecoTrack.h:455
unsigned int getNumberOfCDCHits() const
Return the number of cdc hits.
Definition: RecoTrack.h:427
bool hasOutgoingArmTime()
Check if the outgoing arm time is set.
Definition: RecoTrack.h:563
float getIngoingArmTime()
Return the track time of the ingoing arm.
Definition: RecoTrack.h:528
genfit::TrackCand createGenfitTrackCand() const
Create a genfit::TrackCand out of this reco track and copy all information to the track candidate.
Definition: RecoTrack.cc:178
std::vector< RecoHitInformation * > getRecoHitInformations(bool getSorted=false) const
Return a list of all RecoHitInformations associated with the RecoTrack.
Definition: RecoTrack.cc:557
bool hasIngoingArmTime()
Check if the ingoing arm time is set.
Definition: RecoTrack.h:557
bool addSVDHit(const UsedSVDHit *svdHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
Adds a svd hit with the given information to the reco track.
Definition: RecoTrack.h:272
bool hasSVDHits() const
Returns true if the track has svd hits.
Definition: RecoTrack.h:398
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:140
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
static constexpr auto XYZToTVector
Helper function to convert XYZVector to TVector3.
Definition: VectorUtil.h:24
Abstract base class for different kinds of events.
STL namespace.