Belle II Software  release-06-02-00
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 
16 namespace Belle2 {
30  class V0 : public RelationsObject {
31  public:
33  V0();
34 
36  V0(const std::pair<const Belle2::Track*, const Belle2::TrackFitResult*>& trackPairPositive,
37  const std::pair<const Belle2::Track*, const Belle2::TrackFitResult*>& trackPairNegative);
38 
40  std::pair<Track*, Track*> getTracks() const
41  {
42  StoreArray<Track> tracks;
43  return std::make_pair(tracks[m_trackIndexPositive], tracks[m_trackIndexNegative]);
44  }
45 
47  std::pair<short, short> getTrackIndices() const
48  {
49  return std::make_pair(m_trackIndexPositive, m_trackIndexNegative);
50  }
51 
53  std::pair<TrackFitResult*, TrackFitResult*> getTrackFitResults() const
54  {
55  StoreArray<TrackFitResult> trackFitResults;
56  return std::make_pair(trackFitResults[m_trackFitResultIndexPositive], trackFitResults[m_trackFitResultIndexNegative]);
57  }
58 
60  std::pair<short, short> getTrackFitResultIndices() const
61  {
63  }
64 
68 
69  private:
72 
75 
78 
81 
83  ClassDef(V0, 3);
84  };
86 }
The ParticleType class for identifying different particle types.
Definition: Const.h:289
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:30
std::pair< TrackFitResult *, TrackFitResult * > getTrackFitResults() const
Get pair of the TrackFitResults, that are part of the V0 particle.
Definition: V0.h:53
short m_trackFitResultIndexNegative
Points to the new TrackFitResult of the positive Track.
Definition: V0.h:80
std::pair< Track *, Track * > getTracks() const
Get pair of yhe Tracks, that are part of the V0 particle.
Definition: V0.h:40
short m_trackIndexNegative
Indicates which negatively charged track was used for this V0.
Definition: V0.h:74
std::pair< short, short > getTrackIndices() const
Get indices of the Tracks, that are part of the V0 particle.
Definition: V0.h:47
V0()
Constructor without arguments; needed for I/O.
Definition: V0.cc:13
std::pair< short, short > getTrackFitResultIndices() const
Get indices of the TrackFitResults, that are part of the V0 particle.
Definition: V0.h:60
ClassDef(V0, 3)
Macro for ROOTification.
short m_trackFitResultIndexPositive
Points to the new TrackFitResult of the positive Track.
Definition: V0.h:77
Const::ParticleType getV0Hypothesis() const
Get the hypothesis under which the V0 particle was created.
Definition: V0.cc:28
short m_trackIndexPositive
Indicates which positively charged track was used for this V0.
Definition: V0.h:71
Abstract base class for different kinds of events.