Belle II Software  release-05-02-19
TOPRingPlotterModule.h
1 /**************************************************************************
2 * BASF2 (Belle Analysis Framework 2) *
3 * Copyright(C) 2020 - Belle II Collaboration *
4 * *
5 * Author: The Belle II Collaboration *
6 * Contributors: Umberto Tamponi *
7 * *
8 * This software is provided "as is" without any warranty. *
9 **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <TTree.h>
15 #include <TH2F.h>
16 #include <TFile.h>
17 #include <analysis/VariableManager/Manager.h>
18 #include <mdst/dataobjects/Track.h>
19 #include <top/reconstruction/TOPreco.h>
20 
21 using namespace Belle2::Variable;
22 
23 namespace Belle2 {
33  class TOPRingPlotterModule : public Module {
34 
35  public:
36 
41 
43  void initialize() override;
44 
45 
47  void event() override;
48 
49 
51  void terminate() override;
52 
53 
54  private:
55 
57  void fillPDF(Belle2::Const::ChargedStable, const Track*, TH2F*, short*, float*, int&, int&);
58 
60  void resetTree();
61 
62 
63  static const int m_MaxPhotons = 5000;
64  static const int m_MaxPDFPhotons = 5000;
66  // steering parameters
67  std::string m_particleList = "pi+:all";
68  std::string m_outputName = "TOPRings.root";
69  int m_toyNumber = 1;
70  bool m_saveHistograms = false;
72  TFile* m_outputFile = nullptr;
73  TTree* m_tree = nullptr;
76  std::vector<double> m_branchAddresses = {};
78  std::vector<Variable::Manager::FunctionPtr> m_functions = {};
80  std::vector<std::string> m_variables = {};
81 
82  std::vector<short> m_pdgHyp = {11, 13, 211, 321, 2212};
84  float m_digitTime[m_MaxPhotons] = {0};
85  short m_digitChannel[m_MaxPhotons] = {0};
86  short m_digitPixel[m_MaxPhotons] = {0};
87  short m_digitPixelCol[m_MaxPhotons] = {0};
88  short m_digitPixelRow[m_MaxPhotons] = {0};
89  float m_digitAmplitude[m_MaxPhotons] = {0};
90  float m_digitWidth[m_MaxPhotons] = {0};
91  short m_digitSlot[m_MaxPhotons] = {0};
92  short m_digitBoardstack[m_MaxPhotons] = {0};
93  short m_digitCarrier[m_MaxPhotons] = {0};
94  short m_digitAsic[m_MaxPhotons] = {0};
95  short m_digitQuality[m_MaxPhotons] = {0};
96  short m_digitASICChannel[m_MaxPhotons] = {0};
97  short m_digitPMTNumber[m_MaxPhotons] = {0};
98  short m_nDigits = 0;
100  short m_pdfPixelE[m_MaxPDFPhotons] = {0};
101  float m_pdfTimeE[m_MaxPDFPhotons] = {0};
102  short m_pdfPixelMU[m_MaxPDFPhotons] = {0};
103  float m_pdfTimeMU[m_MaxPDFPhotons] = {0};
104  short m_pdfPixelPI[m_MaxPDFPhotons] = {0};
105  float m_pdfTimePI[m_MaxPDFPhotons] = {0};
106  short m_pdfPixelK[m_MaxPDFPhotons] = {0};
107  float m_pdfTimeK[m_MaxPDFPhotons] = {0};
108  short m_pdfPixelP[m_MaxPDFPhotons] = {0};
109  float m_pdfTimeP[m_MaxPDFPhotons] = {0};
110  int m_pdfSamplesP = 0;
111  int m_pdfToysP = 0;
112  int m_pdfSamplesK = 0;
113  int m_pdfToysK = 0;
114  int m_pdfSamplesPI = 0;
115  int m_pdfToysPI = 0;
116  int m_pdfSamplesMU = 0;
117  int m_pdfToysMU = 0;
118  int m_pdfSamplesE = 0;
119  int m_pdfToysE = 0;
121  TH2F* m_hitMapMCK = nullptr;
122  TH2F* m_hitMapMCPI = nullptr;
123  TH2F* m_hitMapMCP = nullptr;
124  TH2F* m_hitMapMCE = nullptr;
125  TH2F* m_hitMapMCMU = nullptr;
127  TH2F* m_pdfAsHisto = nullptr;
129  };
131 }
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPRingPlotterModule
A module to plot the x-t images from TOP, and in general study the distribution of the digits associa...
Definition: TOPRingPlotterModule.h:33
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
Belle2::Track
Class that bundles various TrackFitResults.
Definition: Track.h:35