Belle II Software light-2406-ragdoll
Kink.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 <mdst/dataobjects/Kink.h>
9
10using namespace Belle2;
11
13 m_trackIndexMother(-1),
14 m_trackIndexDaughter(-1),
15 m_trackFitResultIndexMotherStart(-1),
16 m_trackFitResultIndexMotherEnd(-1),
17 m_trackFitResultIndexDaughter(-1),
18 m_fittedVertexX(0.0),
19 m_fittedVertexY(0.0),
20 m_fittedVertexZ(0.0),
21 m_filterFlag(0)
22{}
23
24Kink::Kink(const std::pair<const Belle2::Track*,
25 std::pair<const Belle2::TrackFitResult*, const Belle2::TrackFitResult*> >& trackPairMother,
26 const std::pair<const Belle2::Track*, const Belle2::TrackFitResult*>& trackPairDaughter,
27 const Double32_t vertexX, const Double32_t vertexY, const Double32_t vertexZ, const short filterFlag) :
28 m_trackIndexMother(trackPairMother.first->getArrayIndex()),
29 m_trackIndexDaughter(trackPairDaughter.first->getArrayIndex()),
30 m_trackFitResultIndexMotherStart(trackPairMother.second.first->getArrayIndex()),
31 m_trackFitResultIndexMotherEnd(trackPairMother.second.second->getArrayIndex()),
32 m_trackFitResultIndexDaughter(trackPairDaughter.second->getArrayIndex()),
33 m_fittedVertexX(vertexX),
34 m_fittedVertexY(vertexY),
35 m_fittedVertexZ(vertexZ),
36 m_filterFlag(filterFlag)
37{}
38
40{
41 // safety check in case of default constructor was used (should not)
42 if (m_trackIndexMother == -1) return nullptr;
43 StoreArray<Track> tracks;
44 return tracks[m_trackIndexMother];
45}
46
48{
49 // safety check in case of default constructor was used (should not)
50 if (m_trackIndexDaughter == -1) return nullptr;
51 StoreArray<Track> tracks;
52 return tracks[m_trackIndexDaughter];
53}
54
56{
57 // safety check in case of default constructor was used (should not)
58 if (m_trackFitResultIndexMotherStart == -1) return nullptr;
59 StoreArray <TrackFitResult> trackFitResults;
60 return trackFitResults[m_trackFitResultIndexMotherStart];
61}
62
64{
65 // safety check in case of default constructor was used (should not)
66 if (m_trackFitResultIndexMotherEnd == -1) return nullptr;
67 StoreArray <TrackFitResult> trackFitResults;
68 return trackFitResults[m_trackFitResultIndexMotherEnd];
69}
70
72{
73 // safety check in case of default constructor was used (should not)
74 if (m_trackFitResultIndexDaughter == -1) return nullptr;
75 StoreArray <TrackFitResult> trackFitResults;
76 return trackFitResults[m_trackFitResultIndexDaughter];
77}
short m_trackFitResultIndexMotherStart
Points to the new TrackFitResult of the mother Track at Start.
Definition: Kink.h:174
Track * getDaughterTrack() const
Get daughter Track (it is the same as mother's in case of track splitting).
Definition: Kink.cc:47
Track * getMotherTrack() const
Get mother Track.
Definition: Kink.cc:39
Kink()
Constructor without arguments; needed for I/O.
Definition: Kink.cc:12
short m_trackIndexMother
Indicates which mother Track was used for this Kink.
Definition: Kink.h:168
TrackFitResult * getMotherTrackFitResultEnd() const
Get the TrackFitResult of mother at the ending point.
Definition: Kink.cc:63
TrackFitResult * getMotherTrackFitResultStart() const
Get the TrackFitResult of mother at the starting point.
Definition: Kink.cc:55
short m_trackFitResultIndexDaughter
Points to the new TrackFitResult of the daughter Track at Start.
Definition: Kink.h:180
short m_trackIndexDaughter
Indicates which daughter Track was used for this Kink (it is the same as mother's in case of track sp...
Definition: Kink.h:171
short m_trackFitResultIndexMotherEnd
Points to the new TrackFitResult of the mother Track at End.
Definition: Kink.h:177
TrackFitResult * getDaughterTrackFitResult() const
Get the TrackFitResult of daughter at the starting point.
Definition: Kink.cc:71
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.
Class that bundles various TrackFitResults.
Definition: Track.h:25
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24