Belle II Software  release-05-01-25
SoftwareTriggerHLTDQMModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Chunhua Li, Thomas Hauth, Nils Braun, Markus Prim *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <framework/core/HistoModule.h>
13 
14 #include <TH1F.h>
15 
16 #include <mdst/dataobjects/SoftwareTriggerResult.h>
17 #include <mdst/dataobjects/TRGSummary.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 #include <mdst/dbobjects/TRGGDLDBFTDLBits.h>
20 #include <hlt/softwaretrigger/dataobjects/SoftwareTriggerVariables.h>
21 
22 #include <framework/datastore/StoreObjPtr.h>
23 #include <framework/database/DBObjPtr.h>
24 
25 #include <string>
26 #include <vector>
27 #include <map>
28 
29 namespace Belle2 {
34  namespace SoftwareTrigger {
36 
39  class SoftwareTriggerHLTDQMModule final : public HistoModule {
40  public:
43 
45  void initialize() override;
46 
48  void event() override;
49 
51  void defineHisto() override;
52 
54  void beginRun() override;
55 
56  private:
57  // Parameters
59  std::map<std::string, std::map<std::string, std::vector<std::string>>> m_param_cutResultIdentifiers;
60 
62  std::map<std::string, std::vector<std::string>> m_param_cutResultIdentifiersIgnored;
63 
65  std::vector<std::string> m_param_cutResultIdentifiersPerUnit;
66 
68  std::vector<std::string> m_param_l1Identifiers;
69 
72 
75 
78 
81 
83  std::vector<std::string> m_param_variableIdentifiers;
84 
86  std::string m_param_histogramDirectoryName = "softwaretrigger";
87 
89  int m_hlt_unit = 0;
90 
91  // Histograms
93  std::map<std::string, TH1F*> m_cutResultHistograms;
94 
96  std::map<std::string, TH1F*> m_cutResultPerUnitHistograms;
97 
99  std::map<std::string, TH1F*> m_triggerVariablesHistograms;
100 
102  std::map<std::string, TH1F*> m_l1Histograms;
103 
105  std::map<std::string, TH1F*> m_runInfoHistograms;
106 
107  // Datastore members
110 
113 
116 
119 
122  };
123 
125  namespace HLTUnit {
127  static constexpr unsigned int max_hlt_units = 10;
128 
130  static constexpr char hlt_unit_file[] = "/home/usr/hltdaq/HLT.UnitNumber";
131  };
132  }
134 }
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_cutResultPerUnitHistograms
std::map< std::string, TH1F * > m_cutResultPerUnitHistograms
histograms for the final sw trigger decisions for each base identifier per unit
Definition: SoftwareTriggerHLTDQMModule.h:104
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_cutResultHistograms
std::map< std::string, TH1F * > m_cutResultHistograms
histograms for the final sw trigger decisions for each base identifier
Definition: SoftwareTriggerHLTDQMModule.h:101
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_hlt_unit_histograms
bool m_param_create_hlt_unit_histograms
Create HLT unit number histograms?
Definition: SoftwareTriggerHLTDQMModule.h:85
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_l1NameLookup
DBObjPtr< TRGGDLDBFTDLBits > m_l1NameLookup
Dataobjects.
Definition: SoftwareTriggerHLTDQMModule.h:129
Belle2::SoftwareTrigger::HLTUnit::max_hlt_units
static constexpr unsigned int max_hlt_units
Maximum number of HLT units used during the experiment.
Definition: SoftwareTriggerHLTDQMModule.h:135
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_histogramDirectoryName
std::string m_param_histogramDirectoryName
Directory to put the generated histograms.
Definition: SoftwareTriggerHLTDQMModule.h:94
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_variables
StoreObjPtr< SoftwareTriggerVariables > m_variables
STM cut variables.
Definition: SoftwareTriggerHLTDQMModule.h:123
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::initialize
void initialize() override
Module functions to be called from main process.
Definition: SoftwareTriggerHLTDQMModule.cc:181
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::SoftwareTriggerHLTDQMModule
SoftwareTriggerHLTDQMModule()
Constructor / Destructor.
Definition: SoftwareTriggerHLTDQMModule.cc:27
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_cutResultIdentifiersIgnored
std::map< std::string, std::vector< std::string > > m_param_cutResultIdentifiersIgnored
Which cuts should be ignored? This can be used to clear trigger lines from e.g. bhabha contamination.
Definition: SoftwareTriggerHLTDQMModule.h:70
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_l1Histograms
std::map< std::string, TH1F * > m_l1Histograms
histogram with the L1 information
Definition: SoftwareTriggerHLTDQMModule.h:110
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_hlt_unit
int m_hlt_unit
HLT unit number of the machine used.
Definition: SoftwareTriggerHLTDQMModule.h:97
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_triggerResult
StoreObjPtr< SoftwareTriggerResult > m_triggerResult
STM cut results.
Definition: SoftwareTriggerHLTDQMModule.h:117
Belle2::SoftwareTrigger::HLTUnit::hlt_unit_file
static constexpr char hlt_unit_file[]
Location of HLT unit number information.
Definition: SoftwareTriggerHLTDQMModule.h:138
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_variableIdentifiers
std::vector< std::string > m_param_variableIdentifiers
Which variables should be reported?
Definition: SoftwareTriggerHLTDQMModule.h:91
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_cutResultIdentifiers
std::map< std::string, std::map< std::string, std::vector< std::string > > > m_param_cutResultIdentifiers
Which cuts should be reported? Please remember to include the total_result also, if wanted.
Definition: SoftwareTriggerHLTDQMModule.h:67
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::event
void event() override
Module functions to be called from event process.
Definition: SoftwareTriggerHLTDQMModule.cc:200
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::beginRun
void beginRun() override
Reset all histogram entries for a new run.
Definition: SoftwareTriggerHLTDQMModule.cc:356
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_runInfoHistograms
std::map< std::string, TH1F * > m_runInfoHistograms
histograms with the run information
Definition: SoftwareTriggerHLTDQMModule.h:113
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_total_result_histograms
bool m_param_create_total_result_histograms
Create total result histogram?
Definition: SoftwareTriggerHLTDQMModule.h:79
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_error_flag_histograms
bool m_param_create_error_flag_histograms
Create error flag histograms?
Definition: SoftwareTriggerHLTDQMModule.h:88
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_exp_run_event_histograms
bool m_param_create_exp_run_event_histograms
Create exp/run/event number histograms?
Definition: SoftwareTriggerHLTDQMModule.h:82
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Event Info.
Definition: SoftwareTriggerHLTDQMModule.h:126
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_l1Identifiers
std::vector< std::string > m_param_l1Identifiers
Which L1 cuts should be reported?
Definition: SoftwareTriggerHLTDQMModule.h:76
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_l1TriggerResult
StoreObjPtr< TRGSummary > m_l1TriggerResult
L1 cut results.
Definition: SoftwareTriggerHLTDQMModule.h:120
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_triggerVariablesHistograms
std::map< std::string, TH1F * > m_triggerVariablesHistograms
histograms for the software trigger variables in all calculators (although maybe not filled)
Definition: SoftwareTriggerHLTDQMModule.h:107
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_cutResultIdentifiersPerUnit
std::vector< std::string > m_param_cutResultIdentifiersPerUnit
Which cuts should be reported per unit?
Definition: SoftwareTriggerHLTDQMModule.h:73
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::defineHisto
void defineHisto() override
Histogram definition.
Definition: SoftwareTriggerHLTDQMModule.cc:78