Belle II Software  release-05-02-19
TOPTimeZero.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/datastore/RelationsObject.h>
14 #include <TH1F.h>
15 
16 namespace Belle2 {
26  class TOPTimeZero : public RelationsObject {
27  public:
28 
32  TOPTimeZero()
33  {}
34 
42  TOPTimeZero(int moduleID, double t0, double err, int numPhotons):
43  m_moduleID(moduleID), m_t0(t0), m_err(err), m_numPhotons(numPhotons), m_valid(true)
44  {}
45 
52  void setHistograms(const TH1F& chi2, const TH1F& pdf, const TH1F& hits)
53  {
54  m_chi2 = chi2;
55  m_pdf = pdf;
56  m_hits = hits;
57  }
58 
63  void setAssumedMass(double mass) {m_assumedMass = mass;}
64 
68  void setInvalid() {m_valid = false;}
69 
74  unsigned getModuleID() const {return m_moduleID;}
75 
80  double getTime() const {return m_t0;}
81 
86  double getError() const {return m_err;}
87 
92  int getNumPhotons() const {return m_numPhotons;}
93 
98  const TH1F& getChi2() const {return m_chi2;}
99 
104  const TH1F& getPDF() const {return m_pdf;}
105 
110  const TH1F& getHits() const {return m_hits;}
111 
116  double getAssumedMass() const {return m_assumedMass;}
117 
122  bool isValid() const {return m_valid;}
123 
124  private:
125 
126  int m_moduleID = 0;
127  float m_t0 = 0;
128  float m_err = 0;
129  int m_numPhotons = 0;
130  TH1F m_chi2;
131  TH1F m_pdf;
132  TH1F m_hits;
133  float m_assumedMass = 0;
134  bool m_valid = false;
138  };
139 
141 }
Belle2::TOPTimeZero::m_numPhotons
int m_numPhotons
number of photons
Definition: TOPTimeZero.h:137
Belle2::TOPTimeZero::isValid
bool isValid() const
Returns the status of time zero reconstruction.
Definition: TOPTimeZero.h:130
Belle2::TOPTimeZero::m_t0
float m_t0
time zero in [ns]
Definition: TOPTimeZero.h:135
Belle2::TOPTimeZero::m_assumedMass
float m_assumedMass
particle mass used in reconstruction
Definition: TOPTimeZero.h:141
Belle2::TOPTimeZero::m_chi2
TH1F m_chi2
chi^2 versus t0 used to find minimum
Definition: TOPTimeZero.h:138
Belle2::TOPTimeZero
Class to store T0 information.
Definition: TOPTimeZero.h:34
Belle2::TOPTimeZero::m_pdf
TH1F m_pdf
PDF projected to time.
Definition: TOPTimeZero.h:139
Belle2::TOPTimeZero::getTime
double getTime() const
Returns time zero.
Definition: TOPTimeZero.h:88
Belle2::TOPTimeZero::getNumPhotons
int getNumPhotons() const
Returns number of photons used to find minimum.
Definition: TOPTimeZero.h:100
Belle2::TOPTimeZero::getModuleID
unsigned getModuleID() const
Returns slot number used to determine t0.
Definition: TOPTimeZero.h:82
Belle2::TOPTimeZero::setInvalid
void setInvalid()
Sets time zero to invalid.
Definition: TOPTimeZero.h:76
Belle2::TOPTimeZero::getPDF
const TH1F & getPDF() const
Returns histogram of PDF projected to time axis.
Definition: TOPTimeZero.h:112
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPTimeZero::ClassDef
ClassDef(TOPTimeZero, 3)
ClassDef.
Belle2::TOPTimeZero::m_err
float m_err
error on time zero [ns]
Definition: TOPTimeZero.h:136
Belle2::TOPTimeZero::getChi2
const TH1F & getChi2() const
Returns histogram of chi^2 versus t0 that was used to find minimum.
Definition: TOPTimeZero.h:106
Belle2::TOPTimeZero::setAssumedMass
void setAssumedMass(double mass)
Sets particle mass used in reconstruction.
Definition: TOPTimeZero.h:71
Belle2::TOPTimeZero::m_hits
TH1F m_hits
time distribution of hits
Definition: TOPTimeZero.h:140
Belle2::TOPTimeZero::TOPTimeZero
TOPTimeZero()
Default constructor.
Definition: TOPTimeZero.h:40
Belle2::TOPTimeZero::m_moduleID
int m_moduleID
slot number (1-based)
Definition: TOPTimeZero.h:134
Belle2::TOPTimeZero::getError
double getError() const
Returns time zero uncertainty.
Definition: TOPTimeZero.h:94
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::TOPTimeZero::setHistograms
void setHistograms(const TH1F &chi2, const TH1F &pdf, const TH1F &hits)
Sets histograms.
Definition: TOPTimeZero.h:60
Belle2::TOPTimeZero::getHits
const TH1F & getHits() const
Returns histogram of time distribution of hits.
Definition: TOPTimeZero.h:118
Belle2::TOPTimeZero::m_valid
bool m_valid
status: true if time zero is successfully determined
Definition: TOPTimeZero.h:142
Belle2::TOPTimeZero::getAssumedMass
double getAssumedMass() const
Returns particle mass used in time zero reconstruction.
Definition: TOPTimeZero.h:124