 |
Belle II Software
release-05-02-19
|
9 #include <dqm/modules/PhysicsObjectsDQM/PhysicsObjectsDQMModule.h>
10 #include <analysis/dataobjects/ParticleList.h>
11 #include <analysis/variables/EventShapeVariables.h>
12 #include <framework/datastore/StoreObjPtr.h>
13 #include <mdst/dataobjects/SoftwareTriggerResult.h>
14 #include <TDirectory.h>
28 PhysicsObjectsDQMModule::PhysicsObjectsDQMModule() :
HistoModule()
35 addParam(
"TriggerIdentifier", m_triggerIdentifier,
36 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_hadron"));
37 addParam(
"PI0PListName", m_pi0PListName,
"Name of the pi0 particle list", std::string(
"pi0:physDQM"));
38 addParam(
"KS0PListName", m_ks0PListName,
"Name of the KS0 particle list", std::string(
"K_S0:physDQM"));
43 TDirectory* oldDir = gDirectory;
44 oldDir->mkdir(
"PhysicsObjects")->cd();
46 m_h_mKS0 =
new TH1F(
"mKS0",
"KS0 Invariant Mass", 20, 0.48, 0.52);
47 m_h_mKS0->SetXTitle(
"M(K_{S}^{0}) [GeV]");
49 m_h_mPI0 =
new TH1F(
"mPI0",
"pi0 Invariant Mass", 25, 0.10, 0.15);
50 m_h_mPI0->SetXTitle(
"M(#pi^{0}) [GeV]");
52 m_h_R2 =
new TH1F(
"R2",
"Event Level R2", 36, 0, 1.2);
89 if (!result.isValid()) {
90 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
94 const std::map<std::string, int>& results = result->getResults();
102 if (accepted ==
false)
return;
107 double R2 = Belle2::Variable::foxWolframR2(
nullptr);
110 if (pi0Particles.
isValid() && abs(pi0Particles->getPDGCode()) == 111) {
111 for (
unsigned int i = 0; i < pi0Particles->getListSize(); i++) {
112 Particle* pi0 = pi0Particles->getParticle(i);
116 if (ks0Particles.
isValid() && abs(ks0Particles->getPDGCode()) == 310) {
117 for (
unsigned int i = 0; i < ks0Particles->getListSize(); i++) {
118 Particle* ks0 = ks0Particles->getParticle(i);
void setDescription(const std::string &description)
Sets the description of the module.
void defineHisto() override
Function to define histograms.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void beginRun() override
Function to process begin_run record.
TH1F * m_h_mPI0
PI0 invariant mass.
@ c_accept
Accept this event.
std::string m_ks0PListName
Name of the KS0 particle list.
TH1F * m_h_mKS0
KS0 invariant mass.
std::string m_pi0PListName
Name of the pi0 particle list.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
float getMass() const
Returns invariant mass (= nominal for FS particles)
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
void event() override
Function to process event record.
Class to store reconstructed particles.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
void initialize() override
Function for dynamic initialization of module.
std::string m_triggerIdentifier
Trigger identifier string used to select events for the histograms.
void terminate() override
Function to terminate module.
void endRun() override
Function to process end_run record.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
bool isValid() const
Check whether the object was created.