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>
35 setDescription(
"Collect data for eCMS calibration algorithm using the momenta of the hadronic events");
36 setPropertyFlags(c_ParallelProcessingCertified);
41 B2INFO(
"Init of the trees");
42 TString objectName =
"events";
44 TTree* tree =
new TTree(objectName,
"");
46 tree->Branch<
int>(
"event", &
m_evt);
47 tree->Branch<
int>(
"exp", &
m_exp);
48 tree->Branch<
int>(
"run", &
m_run);
49 tree->Branch<
double>(
"time", &
m_time);
51 tree->Branch<vector<double>>(
"pBcms", &
m_pBcms);
52 tree->Branch<vector<double>>(
"mB", &
m_mB);
54 tree->Branch<vector<int>>(
"pdg", &
m_pdg);
55 tree->Branch<vector<int>>(
"mode", &
m_mode);
56 tree->Branch<vector<double>>(
"Kpid", &
m_Kpid);
57 tree->Branch<vector<double>>(
"R2", &
m_R2);
58 tree->Branch<vector<double>>(
"mD", &
m_mD);
59 tree->Branch<vector<double>>(
"dmDstar", &
m_dmDstar);
65 registerObject<TTree>(objectName.Data(), tree);
97 vector<const Particle*> Bparts;
100 for (
unsigned i = 0; i < B0->getListSize(); ++i)
101 if (B0->getParticle(i))
102 Bparts.push_back(B0->getParticle(i));
105 for (
unsigned i = 0; i < Bm->getListSize(); ++i)
106 if (Bm->getParticle(i))
107 Bparts.push_back(Bm->getParticle(i));
110 if (Bparts.size() == 0)
return;
115 for (
unsigned i = 0; i < Bparts.size(); ++i) {
123 m_R2[i] = Variable::R2(Bpart);
144 B2INFO(
"No D meson found");
146 m_mD[i] = D->getMass();
147 const Particle* Kaon = D->getDaughter(0);
158 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
Collector for the collision energy calibration based on the hadronic modes.
void prepare() override final
Initialize the module.
std::vector< double > m_dmDstar
D*-D0 mass.
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.
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.
float getExtraInfo(const std::string &name) const
Return given value if set.
float getMass() const
Returns invariant mass (= nominal for FS 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.
TLorentzVector get4Vector() const
Returns Lorentz vector.
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
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.