Belle II Software  release-06-02-00
TOPRecBunch Class Reference

Class to store results of TOPBunchFinder. More...

#include <TOPRecBunch.h>

Inheritance diagram for TOPRecBunch:
Collaboration diagram for TOPRecBunch:

Public Member Functions

 TOPRecBunch ()
 Default constructor.
 
void clearReconstructed ()
 Clear reconstruction data members.
 
void setReconstructed (int bunchNo, double time, double currentOffset, double currentOffsetError, double averageOffset, double averageOffsetError, bool fineSearch)
 Set reconstructed relative bunch number and time. More...
 
void setNumTracks (int numTracks, int usedTracks, int nodEdx)
 Set number of tracks. More...
 
void setRevo9Counter (unsigned short revo9Counter)
 Sets number of global clock tics since last revo9 flag. More...
 
void addHistogram (const TH1F &histo)
 Add histogram. More...
 
void setSimulated (int bunchNo, double time)
 Set simulated relative bunch number and time. More...
 
int getBunchNo () const
 Returns reconstructed bunch number relative to L1 trigger signal at TOP note: depends on the "look back" setting. More...
 
int getAbsoluteBunchNo (int offset) const
 Returns reconstructed absolute bunch number within the ring. More...
 
double getTime () const
 Returns reconstructed bunch time relative to L1 trigger signal at TOP (time to be subtracted to correct time of digits) More...
 
double getCurrentOffset () const
 Returns current offset to reconstructed bunch. More...
 
double getCurrentOffsetError () const
 Returns uncertainly of current offset. More...
 
double getAverageOffset () const
 Returns average offset to reconstructed bunch. More...
 
double getAverageOffsetError () const
 Returns uncertainly of average offset. More...
 
int getNumTracks () const
 Returns number of tracks in acceptance of TOP. More...
 
int getUsedTracks () const
 Returns number of tracks used for bunch reconstruction. More...
 
int getNodEdxTracks () const
 Returns number of used tracks without dEdx information. More...
 
const std::vector< TH1F > & getHistograms () const
 Returns histograms. More...
 
bool isReconstructed () const
 Check if reconstructed return values are valid. More...
 
bool isFineSearch () const
 Check if fine search is done. More...
 
int getMCBunchNo () const
 Returns simulated bunch number (= bunch used for the event start time) More...
 
double getMCTime () const
 Returns simulated bunch time (= time used as event start time) More...
 
bool isSimulated () const
 Check if simulated return values are valid. More...
 
unsigned short getRevo9Counter () const
 Returns 127 MHz clock ticks since last revo9 marker. More...
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

Protected Member Functions

TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Private Member Functions

 ClassDef (TOPRecBunch, 3)
 ClassDef.
 

Private Attributes

int m_recBunchNo = 0
 reconstructed relative bunch number
 
float m_recTime = 0
 reconstructed relative bunch time
 
float m_currentOffset = 0
 current offset
 
float m_averageOffset = 0
 running average of offset
 
float m_currentOffsetError = 0
 uncertainty of current offset
 
float m_averageOffsetError = 0
 uncertainty of running average of offset
 
int m_numTracks = 0
 number of tracks in acceptance of TOP
 
int m_usedTracks = 0
 number of tracks used for bunch reconstruction
 
int m_nodEdx = 0
 number of used tracks with no dEdx information
 
bool m_fineSearch = false
 if true, fine search was done
 
std::vector< TH1F > m_histograms
 histograms, like chi2 vs t0
 
bool m_recValid = false
 status of rec
 
int m_simBunchNo = 0
 simulated relative bunch number
 
float m_simTime = 0
 simulated relative bunch time
 
bool m_simValid = false
 status of sim
 
unsigned short m_revo9Counter = 0
 number of clock ticks since last revo9 flag
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Detailed Description

Class to store results of TOPBunchFinder.

Definition at line 25 of file TOPRecBunch.h.

Member Function Documentation

◆ addHistogram()

void addHistogram ( const TH1F &  histo)
inline

Add histogram.

Parameters
histoone dimensional histogram

Definition at line 101 of file TOPRecBunch.h.

102  {
103  m_histograms.push_back(histo);
104  }
std::vector< TH1F > m_histograms
histograms, like chi2 vs t0
Definition: TOPRecBunch.h:238

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

◆ getAbsoluteBunchNo()

int getAbsoluteBunchNo ( int  offset) const
inline

Returns reconstructed absolute bunch number within the ring.

Parameters
offsetoffset [RF clock ticks] (to be calibrated)
Returns
bunch number w.r.t revolution marker

Definition at line 130 of file TOPRecBunch.h.

◆ getAverageOffset()

double getAverageOffset ( ) const
inline

Returns average offset to reconstructed bunch.

Returns
offset

Definition at line 158 of file TOPRecBunch.h.

◆ getAverageOffsetError()

double getAverageOffsetError ( ) const
inline

Returns uncertainly of average offset.

Returns
uncertainly

Definition at line 164 of file TOPRecBunch.h.

◆ getBunchNo()

int getBunchNo ( ) const
inline

Returns reconstructed bunch number relative to L1 trigger signal at TOP note: depends on the "look back" setting.

Returns
bunch number relative to L1 trigger signal at TOP minus "look back"

Definition at line 123 of file TOPRecBunch.h.

◆ getCurrentOffset()

double getCurrentOffset ( ) const
inline

Returns current offset to reconstructed bunch.

Returns
offset

Definition at line 146 of file TOPRecBunch.h.

◆ getCurrentOffsetError()

double getCurrentOffsetError ( ) const
inline

Returns uncertainly of current offset.

Returns
uncertainly

Definition at line 152 of file TOPRecBunch.h.

◆ getHistograms()

const std::vector<TH1F>& getHistograms ( ) const
inline

Returns histograms.

Returns
1D histograms

Definition at line 188 of file TOPRecBunch.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:25
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in RecoTrack, TRGSummary, TrackFitResult, Track, SoftwareTriggerResult, PIDLikelihood, MCParticle, Cluster, and Particle.

Definition at line 362 of file RelationsObject.h.

◆ getMCBunchNo()

int getMCBunchNo ( ) const
inline

Returns simulated bunch number (= bunch used for the event start time)

Returns
bunch number relative to the interaction

Definition at line 206 of file TOPRecBunch.h.

◆ getMCTime()

double getMCTime ( ) const
inline

Returns simulated bunch time (= time used as event start time)

Returns
time relative to interaction time

Definition at line 212 of file TOPRecBunch.h.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, MCParticle, and Particle.

Definition at line 344 of file RelationsObject.h.

◆ getNodEdxTracks()

int getNodEdxTracks ( ) const
inline

Returns number of used tracks without dEdx information.

Returns
number of tracks

Definition at line 182 of file TOPRecBunch.h.

◆ getNumTracks()

int getNumTracks ( ) const
inline

Returns number of tracks in acceptance of TOP.

Returns
number of tracks

Definition at line 170 of file TOPRecBunch.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

◆ getRevo9Counter()

unsigned short getRevo9Counter ( ) const
inline

Returns 127 MHz clock ticks since last revo9 marker.

Returns
revo9counter

Definition at line 224 of file TOPRecBunch.h.

◆ getTime()

double getTime ( ) const
inline

Returns reconstructed bunch time relative to L1 trigger signal at TOP (time to be subtracted to correct time of digits)

Returns
time relative to L1 trigger signal at TOP minus "look back"

Definition at line 140 of file TOPRecBunch.h.

◆ getUsedTracks()

int getUsedTracks ( ) const
inline

Returns number of tracks used for bunch reconstruction.

Returns
number of tracks

Definition at line 176 of file TOPRecBunch.h.

◆ isFineSearch()

bool isFineSearch ( ) const
inline

Check if fine search is done.

Returns
true on fine search

Definition at line 200 of file TOPRecBunch.h.

◆ isReconstructed()

bool isReconstructed ( ) const
inline

Check if reconstructed return values are valid.

Returns
true on valid

Definition at line 194 of file TOPRecBunch.h.

◆ isSimulated()

bool isSimulated ( ) const
inline

Check if simulated return values are valid.

Returns
true on valid

Definition at line 218 of file TOPRecBunch.h.

◆ setNumTracks()

void setNumTracks ( int  numTracks,
int  usedTracks,
int  nodEdx 
)
inline

Set number of tracks.

Parameters
numTracksnumber of tracks in acceptance of TOP
usedTracksnumber of tracks used for bunch reconstruction
nodEdxnumber of used tracks without dEdx information

Definition at line 84 of file TOPRecBunch.h.

◆ setReconstructed()

void setReconstructed ( int  bunchNo,
double  time,
double  currentOffset,
double  currentOffsetError,
double  averageOffset,
double  averageOffsetError,
bool  fineSearch 
)
inline

Set reconstructed relative bunch number and time.

Parameters
bunchNorelative bunch number
timerelative bunch time
currentOffsetcurrent offset
currentOffsetErroruncertainty of current offset
averageOffsetaverage offset
averageOffsetErroruncertainty of average offset
fineSearchfine search flag

Definition at line 63 of file TOPRecBunch.h.

◆ setRevo9Counter()

void setRevo9Counter ( unsigned short  revo9Counter)
inline

Sets number of global clock tics since last revo9 flag.

Parameters
revo9Countercounter state

Definition at line 95 of file TOPRecBunch.h.

◆ setSimulated()

void setSimulated ( int  bunchNo,
double  time 
)
inline

Set simulated relative bunch number and time.

Parameters
bunchNorelative bunch number
timerelative bunch time

Definition at line 111 of file TOPRecBunch.h.


The documentation for this class was generated from the following file: