8#include <tracking/modules/BeamSpotCollector/BeamSpotCollectorModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <analysis/utility/ReferenceFrame.h>
12#include <mdst/dataobjects/TrackFitResult.h>
28 m_evt(-99), m_exp(-99), m_run(-99),
30 m_mu0_d0(-99), m_mu0_z0(-99), m_mu0_phi0(-99), m_mu0_tanlambda(-99), m_mu0_omega(-99),
31 m_mu1_d0(-99), m_mu1_z0(-99), m_mu1_phi0(-99), m_mu1_tanlambda(-99), m_mu1_omega(-99)
35 setDescription(
"Collect data for BeamSpot calibration algorithm using the position of mu+mu- events");
38 addParam(
"Y4SPListName",
m_Y4SPListName,
"Name of the Y4S particle list", std::string(
"Upsilon(4S):IPDQM"));
43 B2INFO(
"Init of the trees");
44 std::string objectName =
"events";
46 TTree* tree =
new TTree(objectName.c_str(),
"");
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_d0", &
m_mu0_d0);
54 tree->Branch<
double>(
"mu0_z0", &
m_mu0_z0);
58 tree->Branch<
double>(
"mu1_d0", &
m_mu1_d0);
59 tree->Branch<
double>(
"mu1_z0", &
m_mu1_z0);
67 registerObject<TTree>(objectName, tree);
82 if (!Y4SParticles.
isValid() || abs(Y4SParticles->getPDGCode()) != 300553)
85 if (Y4SParticles->getListSize() != 1)
88 if (Y4SParticles->getParticle(0)->getDaughterIndices().size() != 2)
91 const Particle* part0 = Y4SParticles->getParticle(0)->getDaughter(0);
92 const Particle* part1 = Y4SParticles->getParticle(0)->getDaughter(1);
110 getObjectPtr<TTree>(
"events")->Fill();
void prepare() override final
Initialize the module.
double m_mu1_tanlambda
tanlambda track parameter of the second muon in the event
double m_mu1_omega
omega track parameter of the second muon in the event
double m_mu1_z0
z0 track parameter of the second muon in the event
double m_mu0_tanlambda
tanlambda track parameter of the first muon in the event
std::string m_Y4SPListName
Name of the Y4S particle list.
double m_mu1_d0
d0 track parameter of the second muon in the event
void collect() override final
Event processor The filling of the tree.
int m_exp
experiment number
BeamSpotCollectorModule()
Constructor.
double m_mu0_z0
z0 track parameter of the first muon in the event
double m_mu1_phi0
phi0 track parameter of the second muon in the event
double m_mu0_omega
omega track parameter of the first muon in the event
double m_mu0_d0
d0 track parameter of the first muon in the event
double m_mu0_phi0
phi0 track parameter of the first muon in the event
Calibration collector module base class.
StoreObjPtr< EventMetaData > m_emd
Current EventMetaData.
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...
Class to store reconstructed particles.
const TrackFitResult * getTrackFitResult() const
Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Tr...
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
Values of the result of a track fit with a given particle hypothesis.
double getOmega() const
Getter for omega.
double getD0() const
Getter for d0.
double getTanLambda() const
Getter for tanLambda.
double getZ0() const
Getter for z0.
double getPhi0() const
Getter for phi0.
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.
Abstract base class for different kinds of events.