9#include <dqm/modules/PhysicsObjectsMiraBelle/PhysicsObjectsMiraBelleDstModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <analysis/variables/ContinuumSuppressionVariables.h>
12#include <analysis/variables/TrackVariables.h>
13#include <analysis/utility/PCmsLabTransform.h>
14#include <analysis/variables/Variables.h>
15#include <framework/datastore/StoreObjPtr.h>
16#include <framework/datastore/StoreArray.h>
17#include <mdst/dataobjects/Track.h>
18#include <mdst/dataobjects/TrackFitResult.h>
19#include <mdst/dataobjects/KLMCluster.h>
20#include <mdst/dataobjects/HitPatternCDC.h>
21#include <mdst/dataobjects/HitPatternVXD.h>
22#include <mdst/dataobjects/EventLevelTrackingInfo.h>
23#include <mdst/dataobjects/PIDLikelihood.h>
24#include <top/variables/TOPDigitVariables.h>
25#include <arich/modules/arichDQM/ARICHDQMModule.h>
26#include <arich/dataobjects/ARICHLikelihood.h>
27#include <mdst/dataobjects/SoftwareTriggerResult.h>
28#include <TDirectory.h>
41 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_hadron"));
42 addParam(
"DstListName",
m_dstListName,
"Name of the D*+ particle list", std::string(
"D*+:physMiraBelle"));
47 TDirectory* oldDir = gDirectory;
48 oldDir->mkdir(
"PhysicsObjectsMiraBelleDst");
49 oldDir->cd(
"PhysicsObjectsMiraBelleDst");
52 m_h_D0_InvM =
new TH1F(
"hist_D0_InvM",
"Signal enhanced;m_h_D0_InvM;", 50, 1.81, 1.95);
53 m_h_delta_m =
new TH1F(
"hist_delta_m",
"Signal enhanced;delta_m;", 50, 0.14, 0.16);
55 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);
56 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);
57 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);
58 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);
62 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);
63 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);
65 "D0_softpi_PID_ALL_pion;D0_softpi_PID_ALL_pion;", 50, 0, 1);
67 "D0_softpi_PID_SVD_pion;D0_softpi_PID_SVD_pion;", 50, 0, 1);
69 "D0_softpi_PID_CDC_pion;D0_softpi_PID_CDC_pion;", 50, 0, 1);
71 "D0_softpi_PID_TOP_pion;D0_softpi_PID_TOP_pion;", 50, 0, 1);
73 "D0_softpi_PID_ARICH_pion;D0_softpi_PID_ARICH_pion;", 50, 0, 1);
75 "D0_softpi_PID_ECL_pion;D0_softpi_PID_ECL_pion;", 50, 0, 1);
77 "D0_softpi_PID_KLM_pion;D0_softpi_PID_KLM_pion;", 50, 0, 1);
79 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);
80 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);
81 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);
82 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);
83 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);
84 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);
85 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);
95 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);
96 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);
97 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);
98 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);
99 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);
100 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);
101 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);
175 if (!result.isValid()) {
176 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
180 const std::map<std::string, int>& results = result->getResults();
182 B2WARNING(
"PhysicsObjectsMiraBelleDst: Can't find trigger identifier: " <<
m_triggerIdentifier);
188 if (accepted ==
false)
return;
193 for (
unsigned int i = 0; i < dstParticles->getListSize(); i++) {
194 const Particle* dst = dstParticles->getParticle(i);
196 float dst_mass = dst->
getMass();
197 float d0_mass = d0->getMass();
198 float delta_m = dst_mass - d0_mass;
199 if (delta_m < 0.14 || 0.16 < delta_m || d0_mass < 1.81 || 1.95 < d0_mass)
continue;
201 bool isSignal_D0_InvM(
false), isSignal_delta_m(
false);
203 if (0.143 < delta_m && delta_m < 0.147) {
205 isSignal_D0_InvM =
true;
207 if (1.83 < d0_mass && d0_mass < 1.89) {
209 isSignal_delta_m =
true;
211 const PIDLikelihood* pid_K = d0->getDaughter(0)->getPIDLikelihood();
212 const PIDLikelihood* pid_Pi = d0->getDaughter(1)->getPIDLikelihood();
215 if (pid_K != NULL && pid_Pi != NULL && pid_softPi != NULL) {
216 if (isSignal_D0_InvM && isSignal_delta_m) {
static const ChargedStable pion
charged pion particle
static const ChargedStable kaon
charged kaon particle
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 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.
void endRun() override
This method is called if the current run ends.
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.
void terminate() override
This method is called at the end of the event processing.
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.