Belle II Software  release-05-02-19
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 #include <TH1D.h>
16 
17 #include <mdst/dataobjects/SoftwareTriggerResult.h>
18 #include <mdst/dataobjects/TRGSummary.h>
19 #include <framework/dataobjects/EventMetaData.h>
20 #include <mdst/dbobjects/TRGGDLDBFTDLBits.h>
21 #include <hlt/softwaretrigger/dataobjects/SoftwareTriggerVariables.h>
22 
23 #include <framework/datastore/StoreObjPtr.h>
24 #include <framework/database/DBObjPtr.h>
25 
26 #include <string>
27 #include <vector>
28 #include <map>
29 
30 namespace Belle2 {
35  namespace SoftwareTrigger {
37 
40  class SoftwareTriggerHLTDQMModule final : public HistoModule {
41  public:
44 
46  void initialize() override;
47 
49  void event() override;
50 
52  void defineHisto() override;
53 
55  void beginRun() override;
56 
57  private:
58  // Parameters
60  std::map<std::string, std::map<std::string, std::vector<std::string>>> m_param_cutResultIdentifiers;
61 
63  std::map<std::string, std::vector<std::string>> m_param_cutResultIdentifiersIgnored;
64 
66  std::vector<std::string> m_param_cutResultIdentifiersPerUnit;
67 
69  std::vector<std::string> m_param_l1Identifiers;
70 
72  std::vector<std::string> m_param_additionalL1Identifiers;
73 
76 
79 
82 
85 
87  std::vector<std::string> m_param_variableIdentifiers;
88 
90  std::string m_param_histogramDirectoryName = "softwaretrigger";
91 
93  std::string m_param_pathLocation = "after filter";
94 
96  int m_hlt_unit = 0;
97 
98  // Histograms
100  std::map<std::string, TH1F*> m_cutResultHistograms;
101 
103  std::map<std::string, TH1F*> m_cutResultPerUnitHistograms;
104 
106  std::map<std::string, TH1F*> m_triggerVariablesHistograms;
107 
109  std::map<std::string, TH1F*> m_l1Histograms;
110 
112  std::map<std::string, TH1D*> m_runInfoHistograms;
113 
114  // Datastore members
117 
120 
123 
126 
129  };
130 
132  namespace HLTUnit {
134  static constexpr unsigned int max_hlt_units = 10;
135 
137  static constexpr char hlt_unit_file[] = "/home/usr/hltdaq/HLT.UnitNumber";
138  };
139  }
141 }
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:111
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:108
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_hlt_unit_histograms
bool m_param_create_hlt_unit_histograms
Create HLT unit number histograms?
Definition: SoftwareTriggerHLTDQMModule.h:89
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_runInfoHistograms
std::map< std::string, TH1D * > m_runInfoHistograms
histograms with the run information
Definition: SoftwareTriggerHLTDQMModule.h:120
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_l1NameLookup
DBObjPtr< TRGGDLDBFTDLBits > m_l1NameLookup
Dataobjects.
Definition: SoftwareTriggerHLTDQMModule.h:136
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:142
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_histogramDirectoryName
std::string m_param_histogramDirectoryName
Directory to put the generated histograms.
Definition: SoftwareTriggerHLTDQMModule.h:98
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_variables
StoreObjPtr< SoftwareTriggerVariables > m_variables
STM cut variables.
Definition: SoftwareTriggerHLTDQMModule.h:130
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::initialize
void initialize() override
Module functions to be called from main process.
Definition: SoftwareTriggerHLTDQMModule.cc:232
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::SoftwareTriggerHLTDQMModule
SoftwareTriggerHLTDQMModule()
Constructor / Destructor.
Definition: SoftwareTriggerHLTDQMModule.cc:27
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_additionalL1Identifiers
std::vector< std::string > m_param_additionalL1Identifiers
Which additional L1 cuts should be added to the L1 total result plot?
Definition: SoftwareTriggerHLTDQMModule.h:80
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:71
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_l1Histograms
std::map< std::string, TH1F * > m_l1Histograms
histogram with the L1 information
Definition: SoftwareTriggerHLTDQMModule.h:117
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_hlt_unit
int m_hlt_unit
HLT unit number of the machine used.
Definition: SoftwareTriggerHLTDQMModule.h:104
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_triggerResult
StoreObjPtr< SoftwareTriggerResult > m_triggerResult
STM cut results.
Definition: SoftwareTriggerHLTDQMModule.h:124
Belle2::SoftwareTrigger::HLTUnit::hlt_unit_file
static constexpr char hlt_unit_file[]
Location of HLT unit number information.
Definition: SoftwareTriggerHLTDQMModule.h:145
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:95
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:68
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::event
void event() override
Module functions to be called from event process.
Definition: SoftwareTriggerHLTDQMModule.cc:251
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::beginRun
void beginRun() override
Reset all histogram entries for a new run.
Definition: SoftwareTriggerHLTDQMModule.cc:432
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_total_result_histograms
bool m_param_create_total_result_histograms
Create total result histogram?
Definition: SoftwareTriggerHLTDQMModule.h:83
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_create_error_flag_histograms
bool m_param_create_error_flag_histograms
Create error flag histograms?
Definition: SoftwareTriggerHLTDQMModule.h:92
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:86
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Event Info.
Definition: SoftwareTriggerHLTDQMModule.h:133
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_l1Identifiers
std::vector< std::string > m_param_l1Identifiers
Which L1 cuts should be reported?
Definition: SoftwareTriggerHLTDQMModule.h:77
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_l1TriggerResult
StoreObjPtr< TRGSummary > m_l1TriggerResult
L1 cut results.
Definition: SoftwareTriggerHLTDQMModule.h:127
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:114
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_cutResultIdentifiersPerUnit
std::vector< std::string > m_param_cutResultIdentifiersPerUnit
Which cuts should be reported per unit?
Definition: SoftwareTriggerHLTDQMModule.h:74
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::m_param_pathLocation
std::string m_param_pathLocation
Location of the module in the path: before filter or after filter.
Definition: SoftwareTriggerHLTDQMModule.h:101
Belle2::SoftwareTrigger::SoftwareTriggerHLTDQMModule::defineHisto
void defineHisto() override
Histogram definition.
Definition: SoftwareTriggerHLTDQMModule.cc:85