Belle II Software development
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
12Kink::Kink(const std::pair<const Belle2::Track*,
13 std::pair<const Belle2::TrackFitResult*, const Belle2::TrackFitResult*> >& trackPairMother,
14 const std::pair<const Belle2::Track*, const Belle2::TrackFitResult*>& trackPairDaughter,
15 const Double32_t vertexX, const Double32_t vertexY, const Double32_t vertexZ, const short filterFlag) :
16 m_fittedVertexX(vertexX),
17 m_fittedVertexY(vertexY),
18 m_fittedVertexZ(vertexZ),
19 m_trackIndexMother(trackPairMother.first->getArrayIndex()),
20 m_trackIndexDaughter(trackPairDaughter.first->getArrayIndex()),
21 m_trackFitResultIndexMotherStart(trackPairMother.second.first->getArrayIndex()),
22 m_trackFitResultIndexMotherEnd(trackPairMother.second.second->getArrayIndex()),
23 m_trackFitResultIndexDaughter(trackPairDaughter.second->getArrayIndex()),
24 m_filterFlag(filterFlag)
25{}
26
28{
29 // safety check in case of default constructor was used (should not)
30 if (m_trackIndexMother == -1) return nullptr;
31 StoreArray<Track> tracks;
32 return tracks[m_trackIndexMother];
33}
34
36{
37 // safety check in case of default constructor was used (should not)
38 if (m_trackIndexDaughter == -1) return nullptr;
39 StoreArray<Track> tracks;
40 return tracks[m_trackIndexDaughter];
41}
42
44{
45 // safety check in case of default constructor was used (should not)
46 if (m_trackFitResultIndexMotherStart == -1) return nullptr;
47 StoreArray <TrackFitResult> trackFitResults;
48 return trackFitResults[m_trackFitResultIndexMotherStart];
49}
50
52{
53 // safety check in case of default constructor was used (should not)
54 if (m_trackFitResultIndexMotherEnd == -1) return nullptr;
55 StoreArray <TrackFitResult> trackFitResults;
56 return trackFitResults[m_trackFitResultIndexMotherEnd];
57}
58
60{
61 // safety check in case of default constructor was used (should not)
62 if (m_trackFitResultIndexDaughter == -1) return nullptr;
63 StoreArray <TrackFitResult> trackFitResults;
64 return trackFitResults[m_trackFitResultIndexDaughter];
65}
short m_trackFitResultIndexMotherStart
Points to the new TrackFitResult of the mother Track at Start.
Definition: Kink.h:183
Track * getDaughterTrack() const
Get daughter Track (it is the same as mother's in case of track splitting).
Definition: Kink.cc:35
Track * getMotherTrack() const
Get mother Track.
Definition: Kink.cc:27
Kink()
Constructor without arguments; needed for I/O.
Definition: Kink.h:35
short m_trackIndexMother
Indicates which mother Track was used for this Kink.
Definition: Kink.h:177
TrackFitResult * getMotherTrackFitResultEnd() const
Get the TrackFitResult of mother at the ending point.
Definition: Kink.cc:51
TrackFitResult * getMotherTrackFitResultStart() const
Get the TrackFitResult of mother at the starting point.
Definition: Kink.cc:43
short m_trackFitResultIndexDaughter
Points to the new TrackFitResult of the daughter Track at Start.
Definition: Kink.h:189
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:180
short m_trackFitResultIndexMotherEnd
Points to the new TrackFitResult of the mother Track at End.
Definition: Kink.h:186
TrackFitResult * getDaughterTrackFitResult() const
Get the TrackFitResult of daughter at the starting point.
Definition: Kink.cc:59
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.