Belle II Software  release-05-01-25
v0fitter.cc
1 #include <tracking/v0Finding/fitter/V0Fitter.h>
2 
3 #include <framework/gearbox/Const.h>
4 
5 #include <utility>
6 
7 #include <gtest/gtest.h>
8 
9 using namespace std;
10 
11 namespace Belle2 {
18  class V0FitterTest : public ::testing::Test {
19  };
20 
22  TEST_F(V0FitterTest, GetTrackHypotheses)
23  {
24  V0Fitter v0Fitter;
25  const auto kShortTracks = v0Fitter.getTrackHypotheses(Const::Kshort);
26  const auto photonTracks = v0Fitter.getTrackHypotheses(Const::photon);
27  const auto lambdaTracks = v0Fitter.getTrackHypotheses(Const::Lambda);
28  const auto antiLambdaTracks = v0Fitter.getTrackHypotheses(Const::antiLambda);
29 
30  EXPECT_EQ(Const::pion, kShortTracks.first);
31  EXPECT_EQ(Const::pion, kShortTracks.second);
32 
33  EXPECT_EQ(Const::electron, photonTracks.first);
34  EXPECT_EQ(Const::electron, photonTracks.second);
35 
36  EXPECT_EQ(Const::proton, lambdaTracks.first);
37  EXPECT_EQ(Const::pion, lambdaTracks.second);
38 
39  EXPECT_EQ(Const::pion, antiLambdaTracks.first);
40  EXPECT_EQ(Const::proton, antiLambdaTracks.second);
41  }
42 
44  TEST_F(V0FitterTest, InitializeCuts)
45  {
46  V0Fitter v0Fitter;
47  v0Fitter.initializeCuts(1.0, 52.);
48  EXPECT_EQ(1.0, v0Fitter.m_beamPipeRadius);
49  EXPECT_EQ(52., v0Fitter.m_vertexChi2CutOutside);
50  }
51 
53 } // namespace
Belle2::V0Fitter::m_beamPipeRadius
double m_beamPipeRadius
Radius where inside/outside beampipe is defined.
Definition: V0Fitter.h:157
Belle2::V0FitterTest
Set up a few arrays and objects in the datastore.
Definition: v0fitter.cc:18
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::V0Fitter::getTrackHypotheses
std::pair< Const::ParticleType, Const::ParticleType > getTrackHypotheses(const Const::ParticleType &v0Hypothesis) const
Get track hypotheses for a given v0 hypothesis.
Definition: V0Fitter.cc:193
Belle2::TEST_F
TEST_F(V0FitterTest, InitializeCuts)
Test initialization of cuts.
Definition: v0fitter.cc:44
Belle2::V0Fitter::initializeCuts
void initializeCuts(double beamPipeRadius, double vertexChi2CutOutside)
Initialize the cuts which will be applied during the fit and store process.
Definition: V0Fitter.cc:85
Belle2::V0Fitter::m_vertexChi2CutOutside
double m_vertexChi2CutOutside
Chi2 cut outside beampipe.
Definition: V0Fitter.h:158
Belle2::V0Fitter
V0Fitter class to create V0 mdst's from reconstructed tracks.
Definition: V0Fitter.h:32