9#include <dqm/modules/PhysicsObjectsMiraBelle/PhysicsObjectsMiraBelleTauModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <framework/datastore/StoreObjPtr.h>
12#include <framework/datastore/StoreArray.h>
13#include <mdst/dataobjects/TRGSummary.h>
14#include <mdst/dataobjects/SoftwareTriggerResult.h>
15#include <TDirectory.h>
31 "Trigger identifier string used to select 1x1 tau mode for the histograms",
32 std::string(
"software_trigger_cut&skim&accept_tau_2trk"));
34 "Trigger identifier string used to select 1x3 tau mode for the histograms",
35 std::string(
"software_trigger_cut&skim&accept_tau_Ntrk"));
37 std::string(
"Z0:physMiraBelleTau1x1"));
39 std::string(
"Z0:physMiraBelleTau1x3"));
45 TDirectory* oldDir = gDirectory;
46 oldDir->mkdir(
"PhysicsObjectsMiraBelleTau");
47 oldDir->cd(
"PhysicsObjectsMiraBelleTau");
50 m_h_L1ECL1x1 =
new TH1F(
"hist_L1ECL1x1",
"hist_L1ECL1x1", 30, 0, 30);
52 m_h_L1ECL1x3 =
new TH1F(
"hist_L1ECL1x3",
"hist_L1ECL1x3", 30, 0, 30);
65 m_h_L1CDC1x1 =
new TH1F(
"hist_L1CDC1x1",
"hist_L1CDC1x1", 30, 0, 30);
66 m_h_L1CDC1x1->GetXaxis()->SetBinLabel(1,
"hie_or_c4_or_eclmumu");
67 m_h_L1CDC1x3 =
new TH1F(
"hist_L1CDC1x3",
"hist_L1CDC1x3", 30, 0, 30);
68 m_h_L1CDC1x3->GetXaxis()->SetBinLabel(1,
"hie_or_c4_or_eclmumu");
80 m_h_L1CDCKLM1x1 =
new TH1F(
"hist_L1CDCKLM1x1",
"hist_L1CDCKLM1x1", 30, 0, 30);
82 m_h_L1CDCKLM1x3 =
new TH1F(
"hist_L1CDCKLM1x3",
"hist_L1CDCKLM1x3", 30, 0, 30);
122 if (!result.isValid()) {
123 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
127 const std::map<std::string, int>& results = result->getResults();
132 m_ECL_ref = (m_trgSummary->testFtdl(
"hie") || m_trgSummary->testFtdl(
"c4") || m_trgSummary->testFtdl(
"eclmumu"));
133 }
catch (
const std::exception&) {
137 m_CDC_ref = (m_trgSummary->testFtdl(
"fff") || m_trgSummary->testFtdl(
"ffo"));
138 }
catch (
const std::exception&) {
151 if (Z0Particles1x1.
isValid()) {
152 for (
unsigned int i = 0; i < Z0Particles1x1->getListSize(); i++) {
162 bool m_ECL_target =
false;
164 m_ECL_target = m_trgSummary->testFtdl(bit.c_str());
165 }
catch (
const std::exception&) {
166 m_ECL_target =
false;
184 bool m_CDC_target =
false;
186 m_CDC_target = m_trgSummary->testFtdl(bit.c_str());
187 }
catch (
const std::exception&) {
188 m_CDC_target =
false;
206 bool m_CDCKLM_target =
false;
208 m_CDCKLM_target = m_trgSummary->testFtdl(bit.c_str());
209 }
catch (
const std::exception&) {
210 m_CDCKLM_target =
false;
232 if (Z0Particles1x3.
isValid()) {
233 for (
unsigned int i = 0; i < Z0Particles1x3->getListSize(); i++) {
243 bool m_ECL_target =
false;
245 m_ECL_target = m_trgSummary->testFtdl(bit.c_str());
246 }
catch (
const std::exception&) {
247 m_ECL_target =
false;
264 bool m_CDC_target =
false;
266 m_CDC_target = m_trgSummary->testFtdl(bit.c_str());
267 }
catch (
const std::exception&) {
268 m_CDC_target =
false;
285 bool m_CDCKLM_target =
false;
287 m_CDCKLM_target = m_trgSummary->testFtdl(bit.c_str());
288 }
catch (
const std::exception&) {
289 m_CDCKLM_target =
false;
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...
std::string m_tautau1x3PListName
Name of the tau+tau- (1x3) particle list.
TH1F * m_h_L1ECL1x1
histogram for efficiency of ECL TRG bits using 1x1 prong tau pairs
TH1F * m_h_L1ECL1x3
histogram for efficiency of ECL TRG bits using 1x3 prong tau pairs
std::string m_triggerIdentifierTauNtrk
Trigger identifier string used to select 1x3 tau pairs for the histograms.
void initialize() override
Initializer.
void event() override
This method is called for each event.
TH1F * m_h_L1CDCKLM1x3
histogram for efficiency of CDC-KLM TRG bits using 1x3 prong tau pairs
std::array< std::string, 9 > m_CDCTrgBit
Array of CDC trigger bits.
TH1F * m_h_L1CDC1x1
histogram for efficiency of CDC TRG bits using 1x1 prong tau pairs
TH1F * m_h_L1CDCKLM1x1
histogram for efficiency of CDC-KLM TRG bits using 1x1 prong tau pairs
void beginRun() override
Called when entering a new run.
TH1F * m_h_L1CDC1x3
histogram for efficiency of CDC TRG bits using 1x3 prong tau pairs
std::string m_tautau1x1PListName
Name of the tau+tau- (1x1) particle list.
std::string m_triggerIdentifierTau2trk
Trigger identifier string used to select 1x1 tau pairs for the histograms.
PhysicsObjectsMiraBelleTauModule()
Constructor.
bool m_CDC_ref
Flag for ECL bit.
std::array< std::string, 13 > m_ECLTrgBit
Array of ECL trigger bits.
bool m_ECL_ref
Reference bits for L1 Trigger efficiency monitor.
std::array< std::string, 17 > m_CDCKLMTrgBit
Array of KLM and CDC-KLM bits.
void defineHisto() override
Definition of the histograms.
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.
Abstract base class for different kinds of events.