8#include <gtest/gtest.h>
9#include "utilities/TestParticleFactory.h"
11#include <analysis/dataobjects/Particle.h>
12#include <mdst/dataobjects/Track.h>
13#include <mdst/dataobjects/ECLCluster.h>
14#include <mdst/dataobjects/KLMCluster.h>
15#include <framework/gearbox/Gearbox.h>
16#include <framework/datastore/StoreArray.h>
17#include <analysis/utility/PCmsLabTransform.h>
19#include <analysis/variables/SpecificKinematicVariables.h>
20#include <analysis/variables/Variables.h>
22#include <analysis/VariableManager/Manager.h>
26using namespace Belle2::Variable;
27using namespace ROOT::Math;
30 class SpecificKinematicVariablesTest :
public ::testing::Test {
51 PxPyPzEVector b0momentum(.20, 0., 0., 4.85);
53 PxPyPzEVector pimomentum(0.1, 0, 2.5, sqrt(0.139 * 0.139 + 2.5 * 2.5));
54 PxPyPzEVector emomentum(0., 0, 1., 1.);
55 ROOT::Math::XYZVector ipposition(0, 0, 0);
56 factory.
produceParticle(
string(
"^B0 -> pi- e+"), b0momentum, ipposition);
57 myParticles[0]->set4Vector(pimomentum);
58 myParticles[1]->set4Vector(emomentum);
62 void TearDown()
override
68 TEST_F(SpecificKinematicVariablesTest, REC_q2BhSimple)
71 B2INFO(
"Cos: " << cosThetaBetweenParticleAndNominalB(myParticles[2]));
72 EXPECT_FLOAT_EQ(7.90905, REC_q2BhSimple(myParticles[2]));
74 TEST_F(SpecificKinematicVariablesTest, REC_q2Bh)
77 EXPECT_FLOAT_EQ(7.8716288, REC_q2Bh(myParticles[2]));
79 TEST_F(SpecificKinematicVariablesTest, REC_MissM2)
82 EXPECT_FLOAT_EQ(0.1534055, REC_MissM2(myParticles[2]));
static DataStore & Instance()
Instance of singleton Store.
void setInitializeActive(bool active)
Setter for m_initializeActive.
void reset(EDurability durability)
Frees memory occupied by data store items and removes all objects from the map.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
This is a class, which generates DataStore particles, according to the provided decay string e....
const Belle2::Particle * produceParticle(const std::string &decayString, const ROOT::Math::PxPyPzEVector &momentum, const ROOT::Math::XYZVector &vertex)
Main method to produce particles.
Abstract base class for different kinds of events.