8#include <tracking/modules/EcmsCollector/EcmsCollectorModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <analysis/variables/ContinuumSuppressionVariables.h>
12#include <analysis/utility/PCmsLabTransform.h>
13#include <mdst/dataobjects/PIDLikelihood.h>
14#include <framework/particledb/EvtGenDatabasePDG.h>
34 setDescription(
"Collect data for eCMS calibration algorithm using the momenta of the hadronic events");
40 B2INFO(
"Init of the trees");
41 TString objectName =
"events";
43 TTree* tree =
new TTree(objectName,
"");
45 tree->Branch<
int>(
"event", &
m_evt);
46 tree->Branch<
int>(
"exp", &
m_exp);
47 tree->Branch<
int>(
"run", &
m_run);
48 tree->Branch<
double>(
"time", &
m_time);
50 tree->Branch<std::vector<double>>(
"pBcms", &
m_pBcms);
51 tree->Branch<std::vector<double>>(
"mB", &
m_mB);
53 tree->Branch<std::vector<int>>(
"pdg", &
m_pdg);
54 tree->Branch<std::vector<int>>(
"mode", &
m_mode);
55 tree->Branch<std::vector<double>>(
"Kpid", &
m_Kpid);
56 tree->Branch<std::vector<double>>(
"R2", &
m_R2);
57 tree->Branch<std::vector<double>>(
"mD", &
m_mD);
58 tree->Branch<std::vector<double>>(
"dmDstar", &
m_dmDstar);
64 registerObject<TTree>(objectName.Data(), tree);
96 std::vector<const Particle*> Bparts;
99 for (
unsigned i = 0; i < B0->getListSize(); ++i)
100 if (B0->getParticle(i))
101 Bparts.push_back(B0->getParticle(i));
104 for (
unsigned i = 0; i < Bm->getListSize(); ++i)
105 if (Bm->getParticle(i))
106 Bparts.push_back(Bm->getParticle(i));
109 if (Bparts.size() == 0)
return;
114 for (
unsigned i = 0; i < Bparts.size(); ++i) {
122 m_R2[i] = Variable::R2(Bpart);
143 B2INFO(
"No D meson found");
146 m_mD[i] = D->getMass();
147 const Particle* Kaon = D->getDaughter(0);
160 getObjectPtr<TTree>(
"events")->Fill();
Calibration collector module base class.
StoreObjPtr< EventMetaData > m_emd
Current EventMetaData.
static const ChargedStable pion
charged pion particle
static const ChargedStable kaon
charged kaon particle
void prepare() override final
Initialize the module.
std::vector< double > m_dmDstar
D*-D0 mass.
EcmsCollectorModule()
Constructor.
std::vector< double > m_Kpid
Kaon PID.
std::vector< double > m_pBcms
B mesons CMS momentum.
std::vector< int > m_mode
decay mode ID
double m_time
event time [hours]
void resize(int n)
resize the event members to n candidates
std::vector< double > m_mB
B mesons mass.
void collect() override final
Event processor The filling of the tree.
std::vector< double > m_mD
D meson mass.
int m_exp
experiment number
std::vector< double > m_R2
the R2 variable used for the continuum suppression
std::vector< int > m_pdg
B meson PDG code (can neutral or charged)
static EvtGenDatabasePDG * Instance()
Instance method that loads the EvtGen table.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
double getProbability(const Const::ChargedStable &p1, const Const::ChargedStable &p2, Const::PIDDetectorSet set=Const::PIDDetectorSet::set()) const
Return combined likelihood probability for a particle being p1 and not p2, assuming equal prior proba...
Class to store reconstructed particles.
const PIDLikelihood * getPIDLikelihood() const
Returns the pointer to the PIDLikelihood object that is related to the Track, which was used to creat...
int getPDGCode(void) const
Returns PDG code.
ROOT::Math::PxPyPzEVector get4Vector() const
Returns Lorentz vector.
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
double getExtraInfo(const std::string &name) const
Return given value if set.
double getMass() const
Returns invariant mass (= nominal for FS particles)
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.