Belle II Software  release-06-01-15
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 
14 namespace Belle2 {
24  class TOPTimeZero : public RelationsObject {
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  unsigned getModuleID() const {return m_moduleID;}
73 
78  double getTime() const {return m_t0;}
79 
84  double getError() const {return m_err;}
85 
90  int getNumPhotons() const {return m_numPhotons;}
91 
96  const TH1F& getChi2() const {return m_chi2;}
97 
102  const TH1F& getPDF() const {return m_pdf;}
103 
108  const TH1F& getHits() const {return m_hits;}
109 
114  double getAssumedMass() const {return m_assumedMass;}
115 
120  bool isValid() const {return m_valid;}
121 
122  private:
123 
124  int m_moduleID = 0;
125  float m_t0 = 0;
126  float m_err = 0;
127  int m_numPhotons = 0;
128  TH1F m_chi2;
129  TH1F m_pdf;
130  TH1F m_hits;
131  float m_assumedMass = 0;
132  bool m_valid = false;
136  };
137 
139 }
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:129
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
TH1F m_hits
time distribution of hits
Definition: TOPTimeZero.h:130
float m_err
error on time zero [ns]
Definition: TOPTimeZero.h:126
float m_t0
time zero in [ns]
Definition: TOPTimeZero.h:125
TOPTimeZero()
Default constructor.
Definition: TOPTimeZero.h:30
const TH1F & getHits() const
Returns histogram of time distribution of hits.
Definition: TOPTimeZero.h:108
bool isValid() const
Returns the status of time zero reconstruction.
Definition: TOPTimeZero.h:120
int m_numPhotons
number of photons
Definition: TOPTimeZero.h:127
int m_moduleID
slot number (1-based)
Definition: TOPTimeZero.h:124
ClassDef(TOPTimeZero, 3)
ClassDef.
float m_assumedMass
particle mass used in reconstruction
Definition: TOPTimeZero.h:131
bool m_valid
status: true if time zero is successfully determined
Definition: TOPTimeZero.h:132
TH1F m_chi2
chi^2 versus t0 used to find minimum
Definition: TOPTimeZero.h:128
unsigned getModuleID() const
Returns slot number used to determine t0.
Definition: TOPTimeZero.h:72
double getError() const
Returns time zero uncertainty.
Definition: TOPTimeZero.h:84
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
const TH1F & getChi2() const
Returns histogram of chi^2 versus t0 that was used to find minimum.
Definition: TOPTimeZero.h:96
int getNumPhotons() const
Returns number of photons used to find minimum.
Definition: TOPTimeZero.h:90
double getAssumedMass() const
Returns particle mass used in time zero reconstruction.
Definition: TOPTimeZero.h:114
double getTime() const
Returns time zero.
Definition: TOPTimeZero.h:78
const TH1F & getPDF() const
Returns histogram of PDF projected to time axis.
Definition: TOPTimeZero.h:102
Abstract base class for different kinds of events.