Belle II Software development
EventT0Validation.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10#include <framework/core/Module.h>
11#include <framework/datastore/StoreObjPtr.h>
12#include <framework/dataobjects/EventT0.h>
13
14#include <TFile.h>
15#include <TH1F.h>
16#include <TH1D.h>
17#include <TEfficiency.h>
18#include <TDirectory.h>
19
20namespace Belle2 {
31
32 public:
33
36
39
41 virtual void initialize() override;
42
44 virtual void beginRun() override;
45
48 virtual void event() override;
49
51 virtual void endRun() override;
52
53 private:
54
58 std::string m_RootFileName = "EventT0Validation.root";
59
62
64 TH1F* m_histECLEventT0{nullptr};
66 TH1F* m_histSVDEventT0{nullptr};
68 TH1F* m_histTOPEventT0{nullptr};
70 TH1F* m_histCDCEventT0{nullptr};
74 TH1F* m_histCDCChi2EventT0{nullptr};
76 TH1F* m_histCDCGridEventT0{nullptr};
77
79 const char* c_eventT0Algorithms[11] = {"Any", "ECL", "SVD", "TOP", "CDC (all)", "CDC hit based (all)", "CDC hit based (active)",
80 "CDC full grid #chi^{2} (all)", "CDC full grid #chi^{2} (active)", "CDC grid (all)", "CDC grid (active)"
81 };
86
88 void setPlotMetaData(TH1* hist, const std::string& description, const std::string& check,
89 const std::string& contact, const std::string& shifter = "shifter");
90
92 std::string m_contact = "christian.wessel@desy.de";
93 };
94
96} // Belle2 namespace
This module to design collect the event t0 values base on different detectors and physics processes.
TH1F * m_histTOPEventT0
TOP based EventT0 histograms.
TFile * m_outputFile
Output ROOT file.
virtual ~EventT0ValidationModule()
Destructor.
StoreObjPtr< EventT0 > m_eventT0
Store array for event t0.
TH1F * m_histCDCEventT0
CDC based EventT0 histograms.
std::string m_contact
For simplicity, just set the contact once.
virtual void initialize() override
Initialize the module.
TH1D * m_histAlgorithmSourceCounts
Count of events with EventT0 from a given algorithm, numerator for efficiency calculation.
virtual void event() override
This method is called for each event.
TH1F * m_histCDCHitBasedEventT0
CDC hit based EventT0 histograms.
TH1F * m_histCDCChi2EventT0
CDC chi2 based EventT0 histograms.
virtual void endRun() override
This method is called for each run.
TH1F * m_histCDCGridEventT0
CDC grid EventT0 histograms.
std::string m_RootFileName
Name of the output ROOT file.
TH1F * m_histECLEventT0
ECL based EventT0 histograms.
virtual void beginRun() override
This method is called for each run.
const char * c_eventT0Algorithms[11]
EventT0 algorithms for which to calculate fractions of abundance.
EventT0ValidationModule()
Default constructor.
TH1D * m_histAlgorithmSourceCountsActive
Counts of events with EventT0 from a given algorithm, denominator for efficiency calculation.
void setPlotMetaData(TH1 *hist, const std::string &description, const std::string &check, const std::string &contact, const std::string &shifter="shifter")
Set additional plot info: contact, description, shifter.
TH1F * m_histSVDEventT0
SVD based EventT0 histograms.
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.