Belle II Software development
TOPTimeZero.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/datastore/RelationsObject.h>
12#include <TH1F.h>
13
14namespace Belle2 {
25 public:
26
31 {}
32
40 TOPTimeZero(int moduleID, double t0, double err, int numPhotons):
41 m_moduleID(moduleID), m_t0(t0), m_err(err), m_numPhotons(numPhotons), m_valid(true)
42 {}
43
50 void setHistograms(const TH1F& chi2, const TH1F& pdf, const TH1F& hits)
51 {
52 m_chi2 = chi2;
53 m_pdf = pdf;
54 m_hits = hits;
55 }
56
61 void setAssumedMass(double mass) {m_assumedMass = mass;}
62
66 void setInvalid() {m_valid = false;}
67
72 void setMinChi2(double minChi2) {m_minChi2 = minChi2;}
73
78 unsigned getModuleID() const {return m_moduleID;}
79
84 double getTime() const {return m_t0;}
85
90 double getError() const {return m_err;}
91
96 double getMinChi2() const {return m_minChi2;}
97
102 int getNumPhotons() const {return m_numPhotons;}
103
108 const TH1F& getChi2() const {return m_chi2;}
109
114 const TH1F& getPDF() const {return m_pdf;}
115
120 const TH1F& getHits() const {return m_hits;}
121
126 double getAssumedMass() const {return m_assumedMass;}
127
132 bool isValid() const {return m_valid;}
133
134 private:
135
136 int m_moduleID = 0;
137 float m_t0 = 0;
138 float m_err = 0;
139 int m_numPhotons = 0;
140 TH1F m_chi2;
141 TH1F m_pdf;
142 TH1F m_hits;
143 float m_assumedMass = 0;
144 bool m_valid = false;
145 float m_minChi2 = 0;
149 };
150
152}
Defines interface for accessing relations of objects in StoreArray.
Class to store T0 information.
Definition: TOPTimeZero.h:24
TH1F m_pdf
PDF projected to time.
Definition: TOPTimeZero.h:141
void setInvalid()
Sets time zero to invalid.
Definition: TOPTimeZero.h:66
void setHistograms(const TH1F &chi2, const TH1F &pdf, const TH1F &hits)
Sets histograms.
Definition: TOPTimeZero.h:50
ClassDef(TOPTimeZero, 4)
ClassDef.
TH1F m_hits
time distribution of hits
Definition: TOPTimeZero.h:142
float m_err
error on time zero [ns]
Definition: TOPTimeZero.h:138
float m_t0
time zero in [ns]
Definition: TOPTimeZero.h:137
TOPTimeZero()
Default constructor.
Definition: TOPTimeZero.h:30
const TH1F & getHits() const
Returns histogram of time distribution of hits.
Definition: TOPTimeZero.h:120
const TH1F & getChi2() const
Returns histogram of chi^2 versus t0 that was used to find minimum.
Definition: TOPTimeZero.h:108
bool isValid() const
Returns the status of time zero reconstruction.
Definition: TOPTimeZero.h:132
float m_minChi2
chi2 value at minimum
Definition: TOPTimeZero.h:145
int m_numPhotons
number of photons
Definition: TOPTimeZero.h:139
double getMinChi2() const
Returns chi2 value at minimum.
Definition: TOPTimeZero.h:96
int m_moduleID
slot number (1-based)
Definition: TOPTimeZero.h:136
float m_assumedMass
particle mass used in reconstruction
Definition: TOPTimeZero.h:143
bool m_valid
status: true if time zero is successfully determined
Definition: TOPTimeZero.h:144
const TH1F & getPDF() const
Returns histogram of PDF projected to time axis.
Definition: TOPTimeZero.h:114
TH1F m_chi2
chi^2 versus t0 used to find minimum
Definition: TOPTimeZero.h:140
unsigned getModuleID() const
Returns slot number used to determine t0.
Definition: TOPTimeZero.h:78
double getError() const
Returns time zero uncertainty.
Definition: TOPTimeZero.h:90
TOPTimeZero(int moduleID, double t0, double err, int numPhotons)
Usefull constructor.
Definition: TOPTimeZero.h:40
void setAssumedMass(double mass)
Sets particle mass used in reconstruction.
Definition: TOPTimeZero.h:61
int getNumPhotons() const
Returns number of photons used to find minimum.
Definition: TOPTimeZero.h:102
void setMinChi2(double minChi2)
Sets chi2 value at minimum.
Definition: TOPTimeZero.h:72
double getAssumedMass() const
Returns particle mass used in time zero reconstruction.
Definition: TOPTimeZero.h:126
double getTime() const
Returns time zero.
Definition: TOPTimeZero.h:84
Abstract base class for different kinds of events.