Belle II Software development
V0.h
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#pragma once
9#include <mdst/dataobjects/TrackFitResult.h>
10#include <mdst/dataobjects/Track.h>
11#include <framework/datastore/RelationsObject.h>
12#include <framework/datastore/StoreArray.h>
13#include <framework/gearbox/Const.h>
14#include <utility>
15
16namespace Belle2 {
34 class V0 : public RelationsObject {
35 public:
37 V0() {};
38
40 V0(const std::pair<const Belle2::Track*, const Belle2::TrackFitResult*>& trackPairPositive,
41 const std::pair<const Belle2::Track*, const Belle2::TrackFitResult*>& trackPairNegative,
42 double vertexX, double vertexY, double vertexZ);
43
45 std::pair<Track*, Track*> getTracks() const
46 {
47 StoreArray<Track> tracks;
48 return std::make_pair(tracks[m_trackIndexPositive], tracks[m_trackIndexNegative]);
49 }
50
52 std::pair<short, short> getTrackIndices() const
53 {
54 return std::make_pair(m_trackIndexPositive, m_trackIndexNegative);
55 }
56
58 std::pair<TrackFitResult*, TrackFitResult*> getTrackFitResults() const
59 {
60 StoreArray<TrackFitResult> trackFitResults;
61 return std::make_pair(trackFitResults[m_trackFitResultIndexPositive], trackFitResults[m_trackFitResultIndexNegative]);
62 }
63
65 std::pair<short, short> getTrackFitResultIndices() const
66 {
68 }
69
73
75 double getFittedVertexX() const { return m_fittedVertexX; }
76
78 double getFittedVertexY() const { return m_fittedVertexY; }
79
81 double getFittedVertexZ() const { return m_fittedVertexZ; }
82
84 ROOT::Math::XYZVector getFittedVertexPosition() const { return ROOT::Math::XYZVector(m_fittedVertexX, m_fittedVertexY, m_fittedVertexZ); }
85
86 private:
88 Double32_t m_fittedVertexX = 0.0;
89
91 Double32_t m_fittedVertexY = 0.0;
92
94 Double32_t m_fittedVertexZ = 0.0;
95
98
101
104
107
110
111 friend class FixMergedObjectsModule;
112 };
114}
The ParticleType class for identifying different particle types.
Definition: Const.h:408
If the content of two DataStores are merged using the 'MergeDataStoreModule', then Relations of the o...
Defines interface for accessing relations of objects in StoreArray.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Object holding information for V0s.
Definition: V0.h:34
Double32_t m_fittedVertexZ
The Z coordinate of the fitted vertex.
Definition: V0.h:94
std::pair< short, short > getTrackFitResultIndices() const
Get indices of the TrackFitResults, that are part of the V0 particle.
Definition: V0.h:65
short m_trackFitResultIndexNegative
Points to the new TrackFitResult of the positive Track.
Definition: V0.h:106
double getFittedVertexX() const
Get the X coordinate of the fitted vertex.
Definition: V0.h:75
double getFittedVertexY() const
Get the Y coordinate of the fitted vertex.
Definition: V0.h:78
short m_trackIndexNegative
Indicates which negatively charged track was used for this V0.
Definition: V0.h:100
std::pair< Track *, Track * > getTracks() const
Get pair of the Tracks, that are part of the V0 particle.
Definition: V0.h:45
V0()
Constructor without arguments; needed for I/O.
Definition: V0.h:37
double getFittedVertexZ() const
Get the Z coordinate of the fitted vertex.
Definition: V0.h:81
std::pair< short, short > getTrackIndices() const
Get indices of the Tracks, that are part of the V0 particle.
Definition: V0.h:52
ROOT::Math::XYZVector getFittedVertexPosition() const
Get the fitted vertex position.
Definition: V0.h:84
std::pair< TrackFitResult *, TrackFitResult * > getTrackFitResults() const
Get pair of the TrackFitResults, that are part of the V0 particle.
Definition: V0.h:58
short m_trackFitResultIndexPositive
Points to the new TrackFitResult of the positive Track.
Definition: V0.h:103
ClassDef(V0, 5)
Macro for ROOTification.
Double32_t m_fittedVertexY
The Y coordinate of the fitted vertex.
Definition: V0.h:91
Const::ParticleType getV0Hypothesis() const
Get the hypothesis under which the V0 particle was created.
Definition: V0.cc:25
Double32_t m_fittedVertexX
The X coordinate of the fitted vertex.
Definition: V0.h:88
short m_trackIndexPositive
Indicates which positively charged track was used for this V0.
Definition: V0.h:97
Abstract base class for different kinds of events.