Belle II Software development
KinkFinderModule.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#include <tracking/modules/kinkFinder/KinkFinderModule.h>
9
10#include <framework/gearbox/Const.h>
11#include <framework/logging/Logger.h>
12#include <framework/dataobjects/Helix.h>
13#include <framework/geometry/BFieldManager.h>
14
15#include <mdst/dataobjects/HitPatternCDC.h>
16#include <mdst/dataobjects/TrackFitResult.h>
17
18#include <genfit/MeasuredStateOnPlane.h>
19
20using namespace Belle2;
21
22REG_MODULE(KinkFinder);
23
25{
26
27 setDescription("This is a Kink finder module which preselects mother and daughter candidate tracks and matches them "
28 "and fits a vertex for each pair. Depending on the outcome of each fit, a corresponding "
29 "``Belle2::Kink`` is stored or not.\n\n"
30 "The parameters of the ``KinkFinder`` are stored as payloads in ``KinkFinderParameters``.\n\n"
31 "A loose cut on the pair is applied before the fit; then, a vertex fit is performed, and only pairs "
32 "passing a chi^2 (``KinkFinderParameters::m_vertexChi2Cut``) and distance "
33 "(``KinkFinderParameters::m_vertexDistanceCut``) are stored as ``Belle2::Kink``.\n\n"
34 "If a corresponding ``KinkFitter`` mode is ON, hits are reassigned between mother and daughter tracks "
35 "to improve the resolutions and efficiency. If a corresponding ``KinkFitter`` mode is ON, the track "
36 "pair is also fitted as one track and a special flag is filled based on the result to suppress the clones.\n\n"
37 "If a corresponding ``KinkFitter`` mode is ON, ``KinkFinder`` preselects track candidates "
38 "that might be formed from two kink tracks, and ``KinkFitter`` splits such tracks. "
39 "After that the result is stored in ``Belle2::Kink``.");
40
42
43 // input: RecoTracks
44 addParam("RecoTracks", m_arrayNameRecoTrack,
45 "RecoTrack StoreArray name (input)", std::string(""));
46
47 // RecoTracks for the refitting procedures
48 addParam("CopiedRecoTracks", m_arrayNameCopiedRecoTrack,
49 "RecoTrack StoreArray name (used for track refitting)", std::string("RecoTracksKinkTmp"));
50
51 // input: Tracks and TrackFitResults; output: TrackFitResults (for the refitted tracks)
52 addParam("TrackFitResults", m_arrayNameTFResult,
53 "Belle2::TrackFitResult StoreArray name (in- and output).\n"
54 "Note that the Kinks use pointers indices into these arrays, so all hell may break loose, "
55 "if you change this.", std::string(""));
56 addParam("Tracks", m_arrayNameTrack,
57 "Belle2::Track StoreArray name (input).\n"
58 "Note that the Kinks use pointers indices into these arrays, so all hell may break loose, "
59 "if you change this.", std::string(""));
60
61 // output: Kinks
62 addParam("Kinks", m_arrayNameKink, "Kink StoreArray name (output).", std::string(""));
63
64}
65
66
68{
69 m_tracks.isRequired(m_arrayNameTrack);
71 m_tracks.requireRelationTo(recoTracks);
72 // All the other required StoreArrays are checked in the Constructor of the KinkFitter.
73
74 // Create KinkFitter object.
75 // Its parameters and cuts are set at the beginning of each run based on the information from the database.
76 m_kinkFitter = std::make_unique<KinkFitter>(m_arrayNameTFResult, m_arrayNameKink,
79
80 // Set geometry of CDC forward and backward walls.
81 // Here the tangent is forward CDC acceptance (17 degrees).
82 m_cdcForwardBottomWall.setLine(tan(17. / 180 * M_PI), 0);
83 // Here numbers are calculated from the CDC technical geometry.
84 m_cdcForwardTopWall.setLine(4.97, -670);
85 // Here the tangent is backward CDC acceptance (30 degrees).
86 m_cdcBackwardBottomWall.setLine(-tan(30. / 180 * M_PI), 0);
87 // Here numbers are calculated from the CDC technical geometry.
88 m_cdcBackwardTopWall.setLine(-4.2, -192.5);
89
90}
91
93{
94 if (!m_kinkFinderParameters.isValid())
95 B2FATAL("KinkFinder parameters are not available.");
96
97 // apply cuts and fitter mode to KinkFitter
98 m_kinkFitter->initializeCuts(m_kinkFinderParameters->getVertexDistanceCut(),
99 m_kinkFinderParameters->getVertexChi2Cut(),
100 m_kinkFinderParameters->getPrecutDistance());
101 m_kinkFitter->setFitterMode(m_kinkFinderParameters->getKinkFitterMode());
102}
103
104
106{
107 B2DEBUG(29, m_tracks.getEntries() << " tracks in event.");
108
109 // Group tracks into mother and daughter candidates.
110 std::vector<const Track*> tracksMother;
111 tracksMother.reserve(m_tracks.getEntries());
112
113 std::vector<const Track*> tracksDaughter;
114 tracksDaughter.reserve(m_tracks.getEntries());
115
116 for (const auto& track : m_tracks) {
117 RecoTrack const* const recoTrack = track.getRelated<RecoTrack>(m_arrayNameRecoTrack);
118 B2ASSERT("No RecoTrack available for given Track.", recoTrack);
119
120 // track is fitted
121 if (!recoTrack->hasTrackFitStatus() || !recoTrack->wasFitSuccessful()) continue;
122
123 // exclude tracks that have CDC hits and end with VXD hits (the kink efficiency loss is negligible)
124 const auto& recoHitsInformation = recoTrack->getRecoHitInformations(true);
125 if (recoTrack->getNumberOfCDCHits() &&
126 ((recoHitsInformation.back())->getTrackingDetector() == RecoHitInformation::RecoHitDetector::c_SVD ||
127 (recoHitsInformation.back())->getTrackingDetector() == RecoHitInformation::RecoHitDetector::c_PXD))
128 continue;
129
130 bool trackChosen = false;
131 // select mother candidates
132 if (preFilterMotherTracks(&track)) {
133 tracksMother.push_back(&track);
134 trackChosen = true;
135
136 // if mother candidate pass criteria for splitting, split it with filter 7
138 const short filterFlag = 7;
139 fitAndStore(&track, &track, filterFlag);
140 }
141 }
142 // select daughter candidates
143 if (preFilterDaughterTracks(&track)) {
144 tracksDaughter.push_back(&track);
145 trackChosen = true;
146
147 // if daughter candidate pass criteria for splitting, split it with filter 8
149 const short filterFlag = 8;
150 fitAndStore(&track, &track, filterFlag);
151 }
152 }
153
154 // if track does not pass mother or daughter selection but passes criteria for splitting, split it with filter 9
155 if (kinkFitterModeSplitTrack() && !trackChosen && preFilterTracksToSplit(&track)) {
156 const short filterFlag = 9;
157 fitAndStore(&track, &track, filterFlag);
158 }
159 }
160
161 // Reject boring events.
162 if (tracksMother.empty() || tracksDaughter.empty()) {
163 B2DEBUG(29, "No interesting track pairs found. Number of selected tracksMother: " << tracksMother.size() <<
164 ", tracksDaughter " << tracksDaughter.size());
165 return;
166 }
167
168 // Pair up each mother track with each daughter track.
169 for (auto& trackMother : tracksMother) {
170 for (auto& trackDaughter : tracksDaughter) {
171 const short filterFlag = isTrackPairSelected(trackMother, trackDaughter);
172 if (!filterFlag) continue;
173 B2DEBUG(29, "Found kink candidate with filterFlag " << filterFlag);
174 fitAndStore(trackMother, trackDaughter, filterFlag);
175 }
176 }
177
178}
179
180
182{
183 B2INFO("===KinkFinder summary===========================================================");
184 B2INFO("In total " << m_allStored << " kinks saved. Among them");
185 B2INFO("track pairs with close endpoints: " << m_f1Stored << ";");
186 B2INFO("track pairs with missing layers between their endpoints (Helix extrapolation selection): " << m_f2Stored << ";");
187 B2INFO("split track chosen from mother candidates: " << m_f3Stored << ";");
188 B2INFO("split track chosen from daughter candidates: " << m_f4Stored << ";");
189 B2INFO("split track chosen from tracks not passing mother/daughter preselection " << m_f5Stored << ".");
190}
191
194{
195 return m_kinkFinderParameters->getKinkFitterMode() & 0b1000;
196}
197
199bool KinkFinderModule::ifInCDC(const ROOT::Math::XYZVector& pos)
200{
201 // check for the first layer of CDC (needed separately because of calculation of trapezoid shapes later)
204 return true;
205
206 // position inside CDC with respect to required shifts
207 const double z = (pos.Z() > 0) ? (pos.Z() + m_kinkFinderParameters->getPrecutZ()) : (pos.Z() -
208 m_kinkFinderParameters->getPrecutZ());
209 const double r = sqrt(pos.Perp2()) + m_kinkFinderParameters->getPrecutRho();
210
211 // the point should be inside CDC with respect to shift, precutRho, from outer wall
212 if (!((r < m_cdcOuterWall) && (r > m_cdcInnerWallWithoutFirstLayer + m_kinkFinderParameters->getPrecutRho())))
213 return false;
214
215 // the z coordinate point restriction
216 // CDC has a shape of two trapezoids; thus, the forward and backward walls are described with two lines: bottom and top
217 bool z_part;
218 if (z > 0) {
219 // forward walls of CDC
220 z_part = (r > m_cdcForwardBottomWall.getLine(z)) && (r > m_cdcForwardTopWall.getLine(z));
221 } else {
222 // backward walls of CDC
223 z_part = (r > m_cdcBackwardBottomWall.getLine(z)) && (r > m_cdcBackwardTopWall.getLine(z));
224 }
225 return z_part;
226}
227
231{
232 // RecoTrack (existence and fit checked before calling this function)
233 RecoTrack const* const recoTrack = track->getRelated<RecoTrack>(m_arrayNameRecoTrack);
234 // track fit result
235 TrackFitResult const* const trackFitResult = track->getTrackFitResultWithClosestMass(Const::pion);
236
237 // total number of CDC hits
238 const int nCDCHits = recoTrack->getNumberOfCDCHits();
239
240 // last point of the track is > precutRho and > precutZ from outer walls of CDC
241 const ROOT::Math::XYZVector posLast(recoTrack->getMeasuredStateOnPlaneFromLastHit().getPos());
242 if (nCDCHits && !ifInCDC(posLast)) return false;
243
244 // track is not curled back to IP
245 // The first layer of CDC has 16.8 cm radius; thus, the track which ends inside m_cdcInnerWallWithoutFirstLayer=17 cm
246 // cylinder is either short or curler.
247 // The requirement of >= 10 hits ensures that it is a curler (obtained empirically)
248 if (nCDCHits >= 10 && posLast.Perp2() < m_cdcInnerWallWithoutFirstLayer * m_cdcInnerWallWithoutFirstLayer) return false;
249
250 // first point of the track is inside inner layers of VXD
251 // The mother candidate should start inside VXD. The radius of outer two SVD layers are 10.4 and 13.5 cm,
252 // so we set m_svdBeforeOuterLayer=12 cm cut (between these layers).
253 const ROOT::Math::XYZVector posFirst(recoTrack->getMeasuredStateOnPlaneFromFirstHit().getPos());
254 if (posFirst.Perp2() > m_svdBeforeOuterLayer * m_svdBeforeOuterLayer) return false;
255
256 // impact parameter in rphi < 1 cm
257 // conservative enough assuming possible bad resolution of mother track due to daughter hits assignment
258 if (fabs(trackFitResult->getD0()) > 1) return false;
259 return true;
260}
261
265{
266 // RecoTrack (existence and fit checked before calling this function)
267 RecoTrack const* const recoTrack = track->getRelated<RecoTrack>(m_arrayNameRecoTrack);
268 // track fit result
269 TrackFitResult const* const trackFitResult = track->getTrackFitResultWithClosestMass(Const::pion);
270
271 // first and last points of the track are > precutRho and > precutZ from outer walls of CDC (against back splashes)
272 const ROOT::Math::XYZVector posLast(recoTrack->getMeasuredStateOnPlaneFromLastHit().getPos());
273 const ROOT::Math::XYZVector posFirst(recoTrack->getMeasuredStateOnPlaneFromFirstHit().getPos());
274 if (!ifInCDC(posLast) && !ifInCDC(posFirst)) return false;
275
276 // first point of the track is outside inner layers of VXD, or impact parameter in rphi > 1 cm
277 // inverse criteria for mother
278 if (posFirst.Perp2() < m_svdBeforeOuterLayer * m_svdBeforeOuterLayer && fabs(trackFitResult->getD0()) < 1) return false;
279 return true;
280}
281
285{
286 // RecoTrack (existence and fit checked before calling this function)
287 RecoTrack const* const recoTrack = track->getRelated<RecoTrack>(m_arrayNameRecoTrack);
288
289 if (recoTrack->getTrackFitStatus()->getPVal() > m_kinkFinderParameters->getPrecutSplitPValue()) return false;
290
291 // track fit result
292 TrackFitResult const* const trackFitResult = track->getTrackFitResultWithClosestMass(Const::pion);
293
294 // number of fitted CDC hits
295 const int nFittedCDCHits = trackFitResult->getHitPatternCDC().getNHits();
296 if (nFittedCDCHits > m_kinkFinderParameters->getPrecutSplitNCDCHit()) return false;
297 // more than 5 CDC hits to have enough hits for possible splitting
298 if (nFittedCDCHits < 5) return false;
299
300 // first point of the track is close to the inner wall of the CDC
301 // we set m_cdcInnerWallWithoutFirstTwoLayers=18 cm cut to have both tracks with and without VXD hits
302 const ROOT::Math::XYZVector posFirst(recoTrack->getMeasuredStateOnPlaneFromFirstHit().getPos());
304
305 // impact parameter in rphi < 2 cm
306 // Loose enough assuming possible bad resolution of track due to daughter hits assignment
307 if (fabs(trackFitResult->getD0()) > 2) return false;
308
309 return true;
310}
311
313short KinkFinderModule::isTrackPairSelected(const Track* motherTrack, const Track* daughterTrack)
314{
315 constexpr double M_PI_over_6 = M_PI / 6.;
316 const double cos_M_PI_over_6 = cos(M_PI_over_6);
317
318 // cut variables squared for convenience
319 const double precutDistanceSquared = m_kinkFinderParameters->getPrecutDistance() * m_kinkFinderParameters->getPrecutDistance();
320 const double precutDistance2DSquared = m_kinkFinderParameters->getPrecutDistance2D() *
321 m_kinkFinderParameters->getPrecutDistance2D();
322
323 // get recoTracks and check that they are not the same
324 RecoTrack const* const motherRecoTrack = motherTrack->getRelated<RecoTrack>(m_arrayNameRecoTrack);
325 RecoTrack const* const daughterRecoTrack = daughterTrack->getRelated<RecoTrack>(m_arrayNameRecoTrack);
326 if (motherRecoTrack == daughterRecoTrack) return 0;
327
328 // Filter 1 check.
329 const ROOT::Math::XYZVector motherPosLast(motherRecoTrack->getMeasuredStateOnPlaneFromLastHit().getPos());
330 const ROOT::Math::XYZVector daughterPosFirst(daughterRecoTrack->getMeasuredStateOnPlaneFromFirstHit().getPos());
331 if ((daughterPosFirst - motherPosLast).Mag2() < precutDistanceSquared) return 1;
332
333 // Filter 2 check.
334 const ROOT::Math::XYZVector daughterPosLast(daughterRecoTrack->getMeasuredStateOnPlaneFromLastHit().getPos());
335 if ((daughterPosLast - motherPosLast).Mag2() < precutDistanceSquared) return 2;
336
337 // Filter 3 check. Here the same direction of daughter and mother is checked to exclude intersection of tracks
338 // from different hemispheres.
339 // Here and further M_PI_over_6 criteria was obtained empirically: it conservatively reduces the combinatorial
340 // background while saving as much signal events as possible.
341 if (daughterPosLast.Unit().Dot(motherPosLast.Unit()) > cos_M_PI_over_6 ||
342 daughterPosFirst.Unit().Dot(motherPosLast.Unit()) > cos_M_PI_over_6 ||
343 fabs(daughterPosLast.Phi() - motherPosLast.Phi()) < M_PI_over_6 ||
344 fabs(daughterPosFirst.Phi() - motherPosLast.Phi()) < M_PI_over_6) {
345
346 const ROOT::Math::XYZVector daughterPosClosestToMotherPosLast(daughterRecoTrack->getMeasuredStateOnPlaneFromFirstHit().getPos());
347 const ROOT::Math::XYZVector daughterMomClosestToMotherPosLast(daughterRecoTrack->getMeasuredStateOnPlaneFromFirstHit().getMom());
348 const double Bz = BFieldManager::getFieldInTesla(daughterPosClosestToMotherPosLast).Z();
349 // daughter Helix with move to mother last point
350 Helix daughterHelixClosestToMotherPosLast(daughterPosClosestToMotherPosLast,
351 daughterMomClosestToMotherPosLast,
352 static_cast<short>(daughterRecoTrack->getTrackFitStatus()->getCharge()),
353 Bz);
354 daughterHelixClosestToMotherPosLast.passiveMoveBy(motherPosLast);
355
356 if ((daughterHelixClosestToMotherPosLast.getD0() * daughterHelixClosestToMotherPosLast.getD0() +
357 daughterHelixClosestToMotherPosLast.getZ0() * daughterHelixClosestToMotherPosLast.getZ0()) <
358 precutDistanceSquared)
359 return 3;
360 }
361
362 // Filter 4 check.
363 if ((daughterPosFirst - motherPosLast).Perp2() < precutDistance2DSquared)
364 return 4;
365
366 // Filter 5 check.
367 if ((daughterPosLast - motherPosLast).Perp2() < precutDistance2DSquared)
368 return 5;
369
370 // Filter 6 check. Here the same direction of daughter and mother is checked to exclude intersection of tracks
371 // from different hemispheres.
372 if (daughterPosLast.Unit().Dot(motherPosLast.Unit()) > cos_M_PI_over_6 ||
373 daughterPosFirst.Unit().Dot(motherPosLast.Unit()) > cos_M_PI_over_6 ||
374 fabs(daughterPosLast.Phi() - motherPosLast.Phi()) < M_PI_over_6 ||
375 fabs(daughterPosFirst.Phi() - motherPosLast.Phi()) < M_PI_over_6) {
376
377 const ROOT::Math::XYZVector daughterPosClosestToMotherPosLast(daughterRecoTrack->getMeasuredStateOnPlaneFromFirstHit().getPos());
378 const ROOT::Math::XYZVector daughterMomClosestToMotherPosLast(daughterRecoTrack->getMeasuredStateOnPlaneFromFirstHit().getMom());
379 const double Bz = BFieldManager::getFieldInTesla(daughterPosClosestToMotherPosLast).Z();
380 // daughter Helix with move to mother last point
381 Helix daughterHelixClosestToMotherPosLast(daughterPosClosestToMotherPosLast,
382 daughterMomClosestToMotherPosLast,
383 static_cast<short>(daughterRecoTrack->getTrackFitStatus()->getCharge()),
384 Bz);
385 daughterHelixClosestToMotherPosLast.passiveMoveBy(motherPosLast);
386
387 if (fabs(daughterHelixClosestToMotherPosLast.getD0()) < m_kinkFinderParameters->getPrecutDistance())
388 return 6;
389 }
390
391 // No filter is passed.
392 return 0;
393
394}
395
397void KinkFinderModule::fitAndStore(const Track* trackMother, const Track* trackDaughter, const short filterFlag)
398{
399 bool ok = m_kinkFitter->fitAndStore(trackMother, trackDaughter, filterFlag);
400 if (ok) {
401 ++m_allStored;
402 switch (filterFlag) {
403 case 1:
404 case 2:
405 case 4:
406 case 5:
407 ++m_f1Stored;
408 break;
409 case 3:
410 case 6:
411 ++m_f2Stored;
412 break;
413 case 7:
414 ++m_f3Stored;
415 break;
416 case 8:
417 ++m_f4Stored;
418 break;
419 case 9:
420 ++m_f5Stored;
421 }
422 }
423}
static ROOT::Math::XYZVector getFieldInTesla(const ROOT::Math::XYZVector &pos)
return the magnetic field at a given position in Tesla.
Definition: BFieldManager.h:61
Helix parameter class.
Definition: Helix.h:48
static const ChargedStable pion
charged pion particle
Definition: Const.h:661
unsigned short getNHits() const
Get the total Number of CDC hits in the fit.
unsigned int m_f4Stored
counter for filter 4 saved Kinks
static constexpr double m_cdcInnerWallWithoutFirstLayer
Bigger radius of inner CDC wall [cm].
void fitAndStore(const Track *trackMother, const Track *trackDaughter, const short filterFlag)
Kink fitting and storing.
bool preFilterTracksToSplit(Track const *const track)
Check if the track can be a candidate to be split based on some simple selections.
CDCForwardBackwardWallLine m_cdcBackwardTopWall
Top part of backward CDC wall.
short isTrackPairSelected(const Track *motherTrack, const Track *daughterTrack)
Track pair preselection based on distance between two tracks with different options.
std::string m_arrayNameCopiedRecoTrack
StoreArray name of the RecoTrack used for creating copies.
std::string m_arrayNameKink
StoreArray name of the Kink (Output).
void initialize() override
Registration of StoreArrays, Relations.
static constexpr double m_cdcInnerWithFirstLayerWall
Smaller radius of inner CDC wall [cm].
bool ifInCDC(const ROOT::Math::XYZVector &pos)
Test if the point in space is inside CDC (approximate custom geometry) with respect to shifts from ou...
void event() override
Creates Belle2::Kink from Belle2::Track as described in the class documentation.
std::string m_arrayNameTFResult
StoreArray name of the TrackFitResult (In- and Output).
unsigned int m_f2Stored
counter for filter 2 saved Kinks
DBObjPtr< KinkFinderParameters > m_kinkFinderParameters
kinkFinder parameters Database ObjPtr
unsigned int m_f3Stored
counter for filter 3 saved Kinks
static constexpr double m_cdcInnerWallWithoutFirstTwoLayers
Second bigger radius of inner CDC wall [cm].
bool preFilterMotherTracks(Track const *const track)
Check if the track can be a mother candidate based on some simple selections.
static constexpr double m_svdBeforeOuterLayer
Radius between two outer SVD layers (10.4 and 13.5 cm) [cm].
void terminate() override
Prints status summary.
bool preFilterDaughterTracks(Track const *const track)
Check if the track can be a daughter candidate based on some simple selections.
unsigned int m_f1Stored
counter for filter 1 saved Kinks
void beginRun() override
Read parameters from the database and apply to KinkFitter.
StoreArray< Track > m_tracks
StoreArray of Belle2::Track.
unsigned int m_f5Stored
counter for filter 5 saved Kinks
std::string m_arrayNameRecoTrack
StoreArray name of the RecoTrack (Input).
CDCForwardBackwardWallLine m_cdcForwardBottomWall
Bottom part of forward CDC wall.
unsigned int m_allStored
counter for all saved Kinks
CDCForwardBackwardWallLine m_cdcBackwardBottomWall
Bottom part of backward CDC wall.
bool kinkFitterModeSplitTrack()
Fitter mode 4th bit responsible for turning On/Off track splitting.
static constexpr double m_cdcOuterWall
Radius of outer CDC wall [cm].
CDCForwardBackwardWallLine m_cdcForwardTopWall
Top part of forward CDC wall.
std::string m_arrayNameTrack
StoreArray name of the Belle2::Track (Input).
KinkFinderModule()
Setting of module description, parameters.
std::unique_ptr< KinkFitter > m_kinkFitter
Object containing the algorithm of Kink creation.
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
bool wasFitSuccessful(const genfit::AbsTrackRep *representation=nullptr) const
Returns true if the last fit with the given representation was successful.
Definition: RecoTrack.cc:336
unsigned int getNumberOfCDCHits() const
Return the number of cdc hits.
Definition: RecoTrack.h:427
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlaneFromLastHit(const genfit::AbsTrackRep *representation=nullptr) const
Return genfit's MeasuredStateOnPlane for the last hit in a fit useful for extrapolation of measuremen...
Definition: RecoTrack.cc:619
bool hasTrackFitStatus(const genfit::AbsTrackRep *representation=nullptr) const
Check, if there is a fit status for the given representation or for the cardinal one.
Definition: RecoTrack.cc:543
std::vector< RecoHitInformation * > getRecoHitInformations(bool getSorted=false) const
Return a list of all RecoHitInformations associated with the RecoTrack.
Definition: RecoTrack.cc:557
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlaneFromFirstHit(const genfit::AbsTrackRep *representation=nullptr) const
Return genfit's MeasuredStateOnPlane for the first hit in a fit useful for extrapolation of measureme...
Definition: RecoTrack.cc:605
const genfit::FitStatus * getTrackFitStatus(const genfit::AbsTrackRep *representation=nullptr) const
Return the track fit status for the given representation or for the cardinal one. You are not allowed...
Definition: RecoTrack.h:621
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Values of the result of a track fit with a given particle hypothesis.
double getD0() const
Getter for d0.
HitPatternCDC getHitPatternCDC() const
Getter for the hit pattern in the CDC;.
Class that bundles various TrackFitResults.
Definition: Track.h:25
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
Abstract base class for different kinds of events.
double getLine(const double x) const
Return the y value of the sloping line based on the x value.
void setLine(const double tangent, const double offset)
Set parameters of slopping line.