9#include <dqm/modules/PhysicsObjectsMiraBelle/PhysicsObjectsMiraBelleDstModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <framework/datastore/StoreObjPtr.h>
12#include <mdst/dataobjects/PIDLikelihood.h>
13#include <mdst/dataobjects/SoftwareTriggerResult.h>
14#include <TDirectory.h>
27 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_hadron"));
28 addParam(
"DstListName",
m_dstListName,
"Name of the D*+ particle list", std::string(
"D*+:physMiraBelle"));
33 TDirectory* oldDir = gDirectory;
34 oldDir->mkdir(
"PhysicsObjectsMiraBelleDst");
35 oldDir->cd(
"PhysicsObjectsMiraBelleDst");
38 m_h_D0_InvM =
new TH1F(
"hist_D0_InvM",
"Signal enhanced;m_h_D0_InvM;", 50, 1.81, 1.95);
39 m_h_delta_m =
new TH1F(
"hist_delta_m",
"Signal enhanced;delta_m;", 50, 0.14, 0.16);
41 m_h_D0_softpi_PID_ALL_pion =
new TH1F(
"hist_D0_softpi_PID_ALL_pion",
"D0_softpi_PID_ALL_pion;D0_softpi_PID_ALL_pion;", 50, 0, 1);
42 m_h_D0_softpi_PID_SVD_pion =
new TH1F(
"hist_D0_softpi_PID_SVD_pion",
"D0_softpi_PID_SVD_pion;D0_softpi_PID_SVD_pion;", 50, 0, 1);
43 m_h_D0_softpi_PID_CDC_pion =
new TH1F(
"hist_D0_softpi_PID_CDC_pion",
"D0_softpi_PID_CDC_pion;D0_softpi_PID_CDC_pion;", 50, 0, 1);
44 m_h_D0_softpi_PID_TOP_pion =
new TH1F(
"hist_D0_softpi_PID_TOP_pion",
"D0_softpi_PID_TOP_pion;D0_softpi_PID_TOP_pion;", 50, 0, 1);
48 m_h_D0_softpi_PID_ECL_pion =
new TH1F(
"hist_D0_softpi_PID_ECL_pion",
"D0_softpi_PID_ECL_pion;D0_softpi_PID_ECL_pion;", 50, 0, 1);
49 m_h_D0_softpi_PID_KLM_pion =
new TH1F(
"hist_D0_softpi_PID_KLM_pion",
"D0_softpi_PID_KLM_pion;D0_softpi_PID_KLM_pion;", 50, 0, 1);
51 "D0_softpi_PID_ALL_pion;D0_softpi_PID_ALL_pion;", 50, 0, 1);
53 "D0_softpi_PID_SVD_pion;D0_softpi_PID_SVD_pion;", 50, 0, 1);
55 "D0_softpi_PID_CDC_pion;D0_softpi_PID_CDC_pion;", 50, 0, 1);
57 "D0_softpi_PID_TOP_pion;D0_softpi_PID_TOP_pion;", 50, 0, 1);
59 "D0_softpi_PID_ARICH_pion;D0_softpi_PID_ARICH_pion;", 50, 0, 1);
61 "D0_softpi_PID_ECL_pion;D0_softpi_PID_ECL_pion;", 50, 0, 1);
63 "D0_softpi_PID_KLM_pion;D0_softpi_PID_KLM_pion;", 50, 0, 1);
65 m_h_D0_pi_PID_ALL_pion =
new TH1F(
"hist_D0_pi_PID_ALL_pion",
"D0_pi_PID_ALL_pion;D0_pi_PID_ALL_pion;", 50, 0, 1);
66 m_h_D0_pi_PID_SVD_pion =
new TH1F(
"hist_D0_pi_PID_SVD_pion",
"D0_pi_PID_SVD_pion;D0_pi_PID_SVD_pion;", 50, 0, 1);
67 m_h_D0_pi_PID_CDC_pion =
new TH1F(
"hist_D0_pi_PID_CDC_pion",
"D0_pi_PID_CDC_pion;D0_pi_PID_CDC_pion;", 50, 0, 1);
68 m_h_D0_pi_PID_TOP_pion =
new TH1F(
"hist_D0_pi_PID_TOP_pion",
"D0_pi_PID_TOP_pion;D0_pi_PID_TOP_pion;", 50, 0, 1);
69 m_h_D0_pi_PID_ARICH_pion =
new TH1F(
"hist_D0_pi_PID_ARICH_pion",
"D0_pi_PID_ARICH_pion;D0_pi_PID_ARICH_pion;", 50, 0, 1);
70 m_h_D0_pi_PID_ECL_pion =
new TH1F(
"hist_D0_pi_PID_ECL_pion",
"D0_pi_PID_ECL_pion;D0_pi_PID_ECL_pion;", 50, 0, 1);
71 m_h_D0_pi_PID_KLM_pion =
new TH1F(
"hist_D0_pi_PID_KLM_pion",
"D0_pi_PID_KLM_pion;D0_pi_PID_KLM_pion;", 50, 0, 1);
81 m_h_D0_K_PID_ALL_kaon =
new TH1F(
"hist_D0_K_PID_ALL_kaon",
"D0_K_PID_ALL_kaon;D0_K_PID_ALL_kaon;", 50, 0, 1);
82 m_h_D0_K_PID_SVD_kaon =
new TH1F(
"hist_D0_K_PID_SVD_kaon",
"D0_K_PID_SVD_kaon;D0_K_PID_SVD_kaon;", 50, 0, 1);
83 m_h_D0_K_PID_CDC_kaon =
new TH1F(
"hist_D0_K_PID_CDC_kaon",
"D0_K_PID_CDC_kaon;D0_K_PID_CDC_kaon;", 50, 0, 1);
84 m_h_D0_K_PID_TOP_kaon =
new TH1F(
"hist_D0_K_PID_TOP_kaon",
"D0_K_PID_TOP_kaon;D0_K_PID_TOP_kaon;", 50, 0, 1);
85 m_h_D0_K_PID_ARICH_kaon =
new TH1F(
"hist_D0_K_PID_ARICH_kaon",
"D0_K_PID_ARICH_kaon;D0_K_PID_ARICH_kaon;", 50, 0, 1);
86 m_h_D0_K_PID_ECL_kaon =
new TH1F(
"hist_D0_K_PID_ECL_kaon",
"D0_K_PID_ECL_kaon;D0_K_PID_ECL_kaon;", 50, 0, 1);
87 m_h_D0_K_PID_KLM_kaon =
new TH1F(
"hist_D0_K_PID_KLM_kaon",
"D0_K_PID_KLM_kaon;D0_K_PID_KLM_kaon;", 50, 0, 1);
161 if (!result.isValid()) {
162 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
166 const std::map<std::string, int>& results = result->getResults();
168 B2WARNING(
"PhysicsObjectsMiraBelleDst: Can't find trigger identifier: " <<
m_triggerIdentifier);
174 if (accepted ==
false)
return;
179 for (
unsigned int i = 0; i < dstParticles->getListSize(); i++) {
180 const Particle* dst = dstParticles->getParticle(i);
182 float dst_mass = dst->
getMass();
183 float d0_mass = d0->getMass();
184 float delta_m = dst_mass - d0_mass;
185 if (delta_m < 0.14 || 0.16 < delta_m || d0_mass < 1.81 || 1.95 < d0_mass)
continue;
187 bool isSignal_D0_InvM(
false), isSignal_delta_m(
false);
189 if (0.143 < delta_m && delta_m < 0.147) {
191 isSignal_D0_InvM =
true;
193 if (1.83 < d0_mass && d0_mass < 1.89) {
195 isSignal_delta_m =
true;
197 const PIDLikelihood* pid_K = d0->getDaughter(0)->getPIDLikelihood();
198 const PIDLikelihood* pid_Pi = d0->getDaughter(1)->getPIDLikelihood();
201 if (pid_K != NULL && pid_Pi != NULL && pid_softPi != NULL) {
202 if (isSignal_D0_InvM && isSignal_delta_m) {
static const ChargedStable pion
charged pion particle
static const ChargedStable kaon
charged kaon particle
HistoModule()
Constructor.
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 collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
bool isAvailable(Const::PIDDetectorSet set=Const::PIDDetectorSet::set()) const
Check whether PID information is available for at least one of the detectors in a given set.
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...
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)
TH1F * m_h_sideband_D0_pi_PID_CDC_pion
PID of CDC for pion in sideband.
TH1F * m_h_D0_pi_PID_ALL_pion
PID of all for pion.
TH1F * m_h_D0_pi_PID_ECL_pion
PID of ECL for pion.
TH1F * m_h_D0_pi_PID_ARICH_pion
PID of ARICH for pion.
TH1F * m_h_D0_softpi_PID_ARICH_pion
PID of ARICH for soft pion.
TH1F * m_h_sideband_D0_pi_PID_KLM_pion
PID of KLM for pion in sideband.
TH1F * m_h_sideband_D0_K_PID_ARICH_kaon
PID of ARICH for kaon in sideband.
TH1F * m_h_sideband_D0_softpi_PID_KLM_pion
PID of KLM for soft pion in sideband.
PhysicsObjectsMiraBelleDstModule()
Constructor.
TH1F * m_h_D0_K_PID_CDC_kaon
PID of CDC for kaon.
TH1F * m_h_D0_softpi_PID_KLM_pion
PID of KLM for soft pion.
std::string m_dstListName
Name of the mu+ particle list.
TH1F * m_h_sideband_D0_pi_PID_SVD_pion
PID of SVD for pion in sideband.
void initialize() override
Initializer.
TH1F * m_h_sideband_D0_K_PID_KLM_kaon
PID of KLM for kaon in sideband.
TH1F * m_h_sideband_D0_softpi_PID_ARICH_pion
PID of ARICH for soft pion in sideband.
TH1F * m_h_D0_softpi_PID_TOP_pion
PID of TOP for soft pion.
TH1F * m_h_sideband_D0_K_PID_SVD_kaon
PID of SVD for kaon in sideband.
void event() override
This method is called for each event.
TH1F * m_h_sideband_D0_softpi_PID_SVD_pion
PID of SVD for soft pion in sideband.
TH1F * m_h_D0_pi_PID_KLM_pion
PID of KLM for pion.
TH1F * m_h_sideband_D0_K_PID_TOP_kaon
PID of TOP for kaon in sideband.
TH1F * m_h_sideband_D0_pi_PID_TOP_pion
PID of TOP for pion in sideband.
TH1F * m_h_D0_K_PID_KLM_kaon
PID of KLM for kaon.
TH1F * m_h_D0_pi_PID_CDC_pion
PID of CDC for pion.
std::string m_triggerIdentifier
Trigger identifier string used to select events for the histograms.
TH1F * m_h_D0_K_PID_TOP_kaon
PID of TOP for kaon.
TH1F * m_h_D0_pi_PID_SVD_pion
PID of SVD for pion.
TH1F * m_h_sideband_D0_softpi_PID_ECL_pion
PID of ECL for soft pion in sideband.
TH1F * m_h_delta_m
Mass difference b/w D*+ and D0.
TH1F * m_h_D0_softpi_PID_ECL_pion
PID of ECL for soft pion.
TH1F * m_h_sideband_D0_softpi_PID_ALL_pion
PID of all detectors for soft pion in sideband.
TH1F * m_h_sideband_D0_pi_PID_ALL_pion
PID of all detectors for pion in sideband.
TH1F * m_h_D0_softpi_PID_ALL_pion
PID of all detectors for soft pion.
TH1F * m_h_D0_InvM
D0 invariant mass.
TH1F * m_h_D0_softpi_PID_SVD_pion
PID of SVD for soft pion.
void beginRun() override
Called when entering a new run.
TH1F * m_h_sideband_D0_K_PID_ECL_kaon
PID of ECL for kaon in sideband.
TH1F * m_h_sideband_D0_pi_PID_ARICH_pion
PID of ARICH for pion in sideband.
TH1F * m_h_D0_K_PID_ARICH_kaon
PID of ARICH for kaon.
TH1F * m_h_D0_softpi_PID_CDC_pion
PID of CDC for soft pion.
TH1F * m_h_sideband_D0_K_PID_ALL_kaon
PID of all detectors for kaon in sideband.
TH1F * m_h_D0_K_PID_ECL_kaon
PID of ECL for kaon.
TH1F * m_h_sideband_D0_softpi_PID_TOP_pion
PID of TOP for soft pion in sideband.
TH1F * m_h_D0_pi_PID_TOP_pion
PID of TOP for pion.
TH1F * m_h_sideband_D0_pi_PID_ECL_pion
PID of ECL for pion in sideband.
TH1F * m_h_D0_K_PID_SVD_kaon
PID of SVD for kaon.
TH1F * m_h_sideband_D0_K_PID_CDC_kaon
PID of CDC for kaon in sideband.
TH1F * m_h_sideband_D0_softpi_PID_CDC_pion
PID of CDC for soft pion in sideband.
TH1F * m_h_D0_K_PID_ALL_kaon
PID of all detectors for kaon.
void defineHisto() override
Definition of the histograms.
Type-safe access to single objects in the data store.
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.
@ c_accept
Accept this event.
Abstract base class for different kinds of events.