8 #include <tracking/modules/BoostVectorCollector/BoostVectorCollectorModule.h>
10 #include <framework/geometry/B2Vector3.h>
11 #include <analysis/dataobjects/ParticleList.h>
12 #include <mdst/dataobjects/PIDLikelihood.h>
29 m_exp(-99), m_run(-99), m_evt(-99),
31 m_mu0_pid(-99), m_mu1_pid(-99)
35 setDescription(
"Collect data for BoostVector calibration algorithm using the momenta of the mu+mu- events");
36 setPropertyFlags(c_ParallelProcessingCertified);
38 addParam(
"Y4SPListName", m_Y4SPListName,
"Name of the Y4S particle list", std::string(
"Upsilon(4S):IPDQM"));
43 B2INFO(
"Init of the trees");
44 TString objectName =
"events";
46 TTree* tree =
new TTree(objectName,
"");
48 tree->Branch<
int>(
"event", &m_evt);
49 tree->Branch<
int>(
"exp", &m_exp);
50 tree->Branch<
int>(
"run", &m_run);
51 tree->Branch<
double>(
"time", &m_time);
53 tree->Branch<
double>(
"mu0_pid", &m_mu0_pid);
54 tree->Branch<
double>(
"mu1_pid", &m_mu1_pid);
56 tree->Branch<TVector3>(
"mu0_p", &m_mu0_p);
57 tree->Branch<TVector3>(
"mu1_p", &m_mu1_p);
63 registerObject<TTree>(objectName.Data(), tree);
69 m_evt = m_emd->getEvent();
70 m_run = m_emd->getRun();
71 m_exp = m_emd->getExperiment();
72 m_time = m_emd->getTime() / 1e9 / 3600.;
78 if (!Y4SParticles.
isValid() || abs(Y4SParticles->getPDGCode()) != 300553)
81 if (Y4SParticles->getListSize() != 1)
85 std::vector<int> indxes = Y4SParticles->getParticle(0)->getDaughterIndices();
86 if (indxes.size() != 2)
return;
88 const Particle* part0 = Y4SParticles->getParticle(0)->getDaughter(0);
89 const Particle* part1 = Y4SParticles->getParticle(0)->getDaughter(1);
100 getObjectPtr<TTree>(
"events")->Fill();
This collects the track parameters and momenta of the mu+mu- events for calibration of the BoostVecto...
void prepare() override final
Initialize the module.
void collect() override final
Event processor The filling of the tree.
Calibration collector module base class.
Provides a type-safe way to pass members of the chargedStableSet set.
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.
TVector3 getMomentum() const
Returns momentum vector.
const PIDLikelihood * getPIDLikelihood() const
Returns the pointer to the PIDLikelihood object that is related to the Track, which was used to creat...
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.