8#include <dqm/modules/PhysicsObjectsMiraBelle/PhysicsObjectsMiraBelleEcmsBBModule.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>
15#include <mdst/dataobjects/SoftwareTriggerResult.h>
16#include <framework/datastore/StoreObjPtr.h>
17#include <framework/datastore/StoreArray.h>
18#include <analysis/dataobjects/ParticleList.h>
40 setDescription(
"Monitor of the CMS collision energy based on hadronic B decays");
44 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_btocharm"));
45 addParam(
"BmListName",
m_BmListName,
"Name of the B- particle list", std::string(
"B-:combined"));
46 addParam(
"B0ListName",
m_B0ListName,
"Name of the B0 particle list", std::string(
"B0:combined"));
57 TDirectory* oldDir = gDirectory;
58 oldDir->mkdir(
"PhysicsObjectsMiraBelleEcmsBB");
59 oldDir->cd(
"PhysicsObjectsMiraBelleEcmsBB");
66 m_hB0 =
new TH1D(
"hB0",
"", 80, cMBp, 5.37);
67 m_hBp =
new TH1D(
"hBp",
"", 80, cMBp, 5.37);
84 if (!result.isValid()) {
85 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
90 if (accepted ==
false)
return;
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));
110 if (Bparts.size() == 0)
return;
112 for (
unsigned i = 0; i < Bparts.size(); ++i) {
116 double dmDstar = std::numeric_limits<double>::quiet_NaN();
130 dmDstar = Dstar->
getMass() - D->getMass();
132 B2INFO(
"No D meson found");
134 double mD = D ? D->getMass() : std::numeric_limits<double>::quiet_NaN();
138 double mInv = Bpart->
getMass();
140 double R2 = Variable::R2(Bpart);
151 double eBC =
sqrt(pBcms * pBcms + mB * mB);
152 if (abs(pdg) == 511) {
static EvtGenDatabasePDG * Instance()
Instance method that loads the EvtGen table.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
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.
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 getMass() const
Returns invariant mass (= nominal for FS particles)
PhysicsObjectsMiraBelleEcmsBBModule()
Constructor.
void initialize() override final
Register the histograms.
std::string m_B0ListName
List name for neutral B candidates.
static constexpr double c_mDmax
Maximal value of the D meson inv mass.
void defineHisto() override final
Initialize the histograms.
std::string m_triggerIdentifier
Trigger identifier string used to select events for the histograms.
void event() override final
Event processor Filling of the histograms.
static constexpr double c_mDmin
Minimal value of the D meson inv mass.
TH1D * m_hBp
EB* histogram for charged B.
static constexpr double c_dmDstarMin
Minimal value of the m(D*)-(mD)
std::string m_BmListName
List name for charged B candidates.
TH1D * m_hB0
EB* histogram for neutral B.
static constexpr double c_dmDstarMax
Maximal value of the m(D*)-(mD)
void beginRun() override final
Reset the histograms.
static constexpr double c_mBwindow
Maximal deviation of B meson inv mass from PDG value.
static constexpr double c_R2max
Maximal allowed R2 value (to suppress continuum)
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.
double sqrt(double a)
sqrt for double
@ c_accept
Accept this event.
Abstract base class for different kinds of events.