13 #include <dqm/modules/PhysicsObjectsDQM/PhysicsObjectsDQMModule.h>
14 #include <analysis/dataobjects/ParticleList.h>
15 #include <analysis/variables/EventShapeVariables.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 #include <framework/gearbox/Const.h>
18 #include <mdst/dataobjects/SoftwareTriggerResult.h>
19 #include <TDirectory.h>
33 PhysicsObjectsDQMModule::PhysicsObjectsDQMModule() :
HistoModule()
37 setDescription(
"Monitor Physics Objects Quality");
38 setPropertyFlags(c_ParallelProcessingCertified);
40 addParam(
"TriggerIdentifier", m_triggerIdentifier,
41 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_hadron"));
42 addParam(
"TriggerIdentifierMuMu", m_triggerIdentifierMuMu,
43 "Trigger identifier string used to select events for the mumu histograms",
44 std::string(
"software_trigger_cut&skim&accept_mumutight"));
45 addParam(
"PI0PListName", m_pi0PListName,
"Name of the pi0 particle list", std::string(
"pi0:physDQM"));
46 addParam(
"KS0PListName", m_ks0PListName,
"Name of the KS0 particle list", std::string(
"K_S0:physDQM"));
47 addParam(
"UpsPListName", m_upsPListName,
"Name of the Ups particle list", std::string(
"Upsilon:physDQM"));
50 void PhysicsObjectsDQMModule::defineHisto()
52 TDirectory* oldDir = gDirectory;
53 oldDir->mkdir(
"PhysicsObjects")->cd();
55 m_h_mKS0 =
new TH1F(
"mKS0",
"KS0 Invariant Mass", 20, 0.48, 0.52);
56 m_h_mKS0->SetXTitle(
"M(K_{S}^{0}) [GeV]");
58 m_h_mPI0 =
new TH1F(
"mPI0",
"pi0 Invariant Mass", 25, 0.10, 0.15);
59 m_h_mPI0->SetXTitle(
"M(#pi^{0}) [GeV]");
61 m_h_mUPS =
new TH1F(
"mUPS",
"Ups Invariant Mass", 500, 9, 12);
62 m_h_mUPS->SetXTitle(
"M(#mu#mu) [GeV]");
64 m_h_R2 =
new TH1F(
"R2",
"Event Level R2", 36, 0, 1.2);
102 if (!result.isValid()) {
103 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
107 const std::map<std::string, int>& results = result->getResults();
114 if (accepted !=
false) {
119 double R2 = Belle2::Variable::foxWolframR2(
nullptr);
123 for (
unsigned int i = 0; i < pi0Particles->getListSize(); i++) {
124 Particle* pi0 = pi0Particles->getParticle(i);
129 for (
unsigned int i = 0; i < ks0Particles->getListSize(); i++) {
130 Particle* ks0 = ks0Particles->getParticle(i);
142 if (accepted !=
false) {
145 for (
unsigned int i = 0; i < UpsParticles->getListSize(); i++) {
146 Particle* Ups = UpsParticles->getParticle(i);
int getPDGCode() const
PDG code.
static const ParticleType pi0
neutral pion particle
static const ParticleType Kshort
K^0_S particle.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Class to store reconstructed particles.
float getMass() const
Returns invariant mass (= nominal for FS particles)
TH1F * m_h_mUPS
Ups invariant mass.
std::string m_ks0PListName
Name of the KS0 particle list.
void initialize() override
Function for dynamic initialization of module.
void event() override
Function to process event record.
void endRun() override
Function to process end_run record.
void terminate() override
Function to terminate module.
std::string m_triggerIdentifier
Trigger identifier string used to select events for the histograms.
TH1F * m_h_mPI0
PI0 invariant mass.
void beginRun() override
Function to process begin_run record.
TH1F * m_h_mKS0
KS0 invariant mass.
std::string m_upsPListName
Name of the Ups particle list.
std::string m_triggerIdentifierMuMu
Trigger identifier string used to select events for the mumu histograms.
std::string m_pi0PListName
Name of the pi0 particle list.
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.
@ c_accept
Accept this event.
Abstract base class for different kinds of events.