Belle II Software  release-08-01-10
TOPPDFCheckerModule.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 
11 #include <framework/core/HistoModule.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <mdst/dataobjects/Track.h>
14 #include <top/dataobjects/TOPDigit.h>
15 #include <mdst/dataobjects/MCParticle.h>
16 #include <set>
17 #include <TH2F.h>
18 #include <Math/Vector3D.h>
19 #include <Math/Point3D.h>
20 
21 
22 namespace Belle2 {
32 
33  public:
34 
39 
44  {}
45 
50  virtual void defineHisto() override;
51 
56  virtual void initialize() override;
57 
61  virtual void event() override;
62 
67  virtual void terminate() override;
68 
69  private:
70 
76  bool isFromThisParticle(const TOPDigit& digit, const MCParticle* particle);
77 
78  double m_minTime;
79  double m_maxTime;
80  int m_numBins;
82  TH2F* m_hits = 0;
83  TH2F* m_pdf = 0;
84  TH2F* m_hitsCol = 0;
85  TH2F* m_pdfCol = 0;
90  ROOT::Math::XYZVector m_avrgMomentum;
91  ROOT::Math::XYZPoint m_avrgPosition;
92  int m_numTracks = 0;
93  std::set<int> m_slotIDs;
94  std::set<int> m_PDGCodes;
96  };
97 
99 } // Belle2 namespace
100 
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Class to store TOP digitized hits (output of TOPDigitizer or raw data unpacker) relations to TOPSimHi...
Definition: TOPDigit.h:24
Module for checking analytic PDF used in likelihood calculation.
TH2F * m_pdfCol
histogram of PDF projected to pixel columns
TH2F * m_hits
histogram of photon hits
double m_maxTime
histogram upper bound in time [ns]
double m_minTime
histogram lower bound in time [ns]
TH2F * m_hitsCol
histogram of photon hits projected to pixel columns
ROOT::Math::XYZPoint m_avrgPosition
average particle position at bar entrance (bar frame)
int m_numBins
number of bins in time
int m_numTracks
number of tracks
StoreArray< Track > m_tracks
collection of tracks
std::set< int > m_PDGCodes
particle PDG codes
TH2F * m_pdf
histogram of PDF
StoreArray< TOPDigit > m_digits
collection of digits
std::set< int > m_slotIDs
slot ID's that are hit by particle
ROOT::Math::XYZVector m_avrgMomentum
average particle momentum at bar entrance (bar frame)
virtual ~TOPPDFCheckerModule()
Destructor.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual void terminate() override
Termination action.
bool isFromThisParticle(const TOPDigit &digit, const MCParticle *particle)
Checks if digit comes from given MC particle.
virtual void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
Abstract base class for different kinds of events.