8#include <tracking/modules/BoostVectorCollector/BoostVectorCollectorModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <mdst/dataobjects/PIDLikelihood.h>
27 m_exp(-99), m_run(-99), m_evt(-99),
29 m_mu0_pid(-99), m_mu1_pid(-99)
33 setDescription(
"Collect data for BoostVector calibration algorithm using the momenta of the mu+mu- events");
36 addParam(
"Y4SPListName",
m_Y4SPListName,
"Name of the Y4S particle list", std::string(
"Upsilon(4S):IPDQM"));
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<
double>(
"mu0_pid", &
m_mu0_pid);
52 tree->Branch<
double>(
"mu1_pid", &
m_mu1_pid);
61 registerObject<TTree>(objectName.Data(), tree);
76 if (!Y4SParticles.
isValid() || abs(Y4SParticles->getPDGCode()) != 300553)
79 if (Y4SParticles->getListSize() != 1)
82 if (Y4SParticles->getParticle(0)->getDaughterIndices().size() != 2)
85 const Particle* part0 = Y4SParticles->getParticle(0)->getDaughter(0);
86 const Particle* part1 = Y4SParticles->getParticle(0)->getDaughter(1);
97 getObjectPtr<TTree>(
"events")->Fill();
void prepare() override final
Initialize the module.
double m_mu1_pid
particle ID of mu/e separation second muon
std::string m_Y4SPListName
Name of the Y4S particle list.
B2Vector3D m_mu0_p
three momentum of first muon
void collect() override final
Event processor The filling of the tree.
double m_mu0_pid
particle ID of mu/e separation first muon
B2Vector3D m_mu1_p
three momentum of second muon
int m_exp
experiment number
BoostVectorCollectorModule()
Constructor.
Calibration collector module base class.
StoreObjPtr< EventMetaData > m_emd
Current EventMetaData.
Provides a type-safe way to pass members of the chargedStableSet set.
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...
ROOT::Math::XYZVector getMomentum() const
Returns momentum vector.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Abstract base class for different kinds of events.