Belle II Software  release-08-01-10
TOPRecBunch Class Reference

Class to store results of TOPBunchFinder. More...

#include <TOPRecBunch.h>

Inheritance diagram for TOPRecBunch:
Collaboration diagram for TOPRecBunch:

Public Types

enum  EBucketStatus {
  c_Unknown = -1 ,
  c_Empty = 0 ,
  c_Filled = 1
}
 Reconstructed bucket status. More...
 

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, Const::EDetector detector)
 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 system clock tics since last revo9 marker. More...
 
void setMinChi2 (double minChi2)
 Sets chi2 value at minimum. More...
 
void addHistogram (const TH1F &histo)
 Add histogram. More...
 
void setSimulated (int bunchNo, double time)
 Set simulated relative bunch number and time. More...
 
void setBucketNumber (int bucketNumber)
 Sets reconstructed bucket number. More...
 
void setBucketFillStatus (bool isFilled)
 Sets reconstructed bucket fill status. More...
 
int getBunchNo () const
 Returns reconstructed bunch number relative to L1 trigger signal at TOP note: depends on the "look back" setting. More...
 
int getBucketNumber (int offset, unsigned RFBucketsPerRevolution=5120) const
 Returns reconstructed bucket number within the ring. More...
 
int getBucketNumber () const
 Returns reconstructed bucket number stored in private member. More...
 
EBucketStatus getBucketFillStatus () const
 Returns bucket fill status. 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 getMinChi2 () const
 Returns chi2 value at minimum. 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...
 
Const::EDetector getSeedingDetector () const
 Returns detector component which provided the time seed. 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.
 

Static Public Member Functions

static int getBucketNumber (int recBunchNo, int revo9Count, int offset, int RFBucketsPerRevolution)
 Returns reconstructed bucket number within the ring. More...
 

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, 7)
 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 = 0xFFFF
 number of system clocks since last revo9 marker
 
float m_minChi2 = 0
 chi2 value at minimum
 
Const::EDetector m_detector = Const::invalidDetector
 component providing the time seed
 
int m_bucketNumber = c_Unknown
 reconstructed bucket number
 
EBucketStatus m_isBucketFilled = c_Unknown
 reconstructed bucket status
 
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 26 of file TOPRecBunch.h.

Member Enumeration Documentation

◆ EBucketStatus

Reconstructed bucket status.

Enumerator
c_Unknown 

not known

c_Empty 

bucket is empty

c_Filled 

bucket is filled

Definition at line 32 of file TOPRecBunch.h.

32  {
33  c_Unknown = -1,
34  c_Empty = 0,
35  c_Filled = 1,
36  };
@ c_Empty
bucket is empty
Definition: TOPRecBunch.h:34
@ c_Unknown
not known
Definition: TOPRecBunch.h:33
@ c_Filled
bucket is filled
Definition: TOPRecBunch.h:35

Member Function Documentation

◆ addHistogram()

void addHistogram ( const TH1F &  histo)
inline

Add histogram.

Parameters
histoone dimensional histogram

Definition at line 122 of file TOPRecBunch.h.

◆ 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.

◆ getAverageOffset()

double getAverageOffset ( ) const
inline

Returns average offset to reconstructed bunch.

Returns
offset

Definition at line 225 of file TOPRecBunch.h.

◆ getAverageOffsetError()

double getAverageOffsetError ( ) const
inline

Returns uncertainly of average offset.

Returns
uncertainly

Definition at line 231 of file TOPRecBunch.h.

◆ getBucketFillStatus()

EBucketStatus getBucketFillStatus ( ) const
inline

Returns bucket fill status.

Returns
bucket fill status

Definition at line 194 of file TOPRecBunch.h.

◆ getBucketNumber() [1/3]

int getBucketNumber ( ) const
inline

Returns reconstructed bucket number stored in private member.

Returns
buncket number

Definition at line 188 of file TOPRecBunch.h.

◆ getBucketNumber() [2/3]

int getBucketNumber ( int  offset,
unsigned  RFBucketsPerRevolution = 5120 
) const
inline

Returns reconstructed bucket number within the ring.

Parameters
offsetcalibrated offset [RF clock ticks]
RFBucketsPerRevolutionnumber of RF buckets per beam revolution
Returns
buncket number

Definition at line 179 of file TOPRecBunch.h.

◆ getBucketNumber() [3/3]

static int getBucketNumber ( int  recBunchNo,
int  revo9Count,
int  offset,
int  RFBucketsPerRevolution 
)
inlinestatic

Returns reconstructed bucket number within the ring.

Parameters
recBunchNoreconstructed bunch number relative to L1 trigger
revo9Countnumber of system clock tics since last revo9 marker at L1 trigger
offsetcalibrated offset [RF clock ticks]
RFBucketsPerRevolutionnumber of RF buckets per beam revolution
Returns
bucket number

Definition at line 166 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 156 of file TOPRecBunch.h.

◆ getCurrentOffset()

double getCurrentOffset ( ) const
inline

Returns current offset to reconstructed bunch.

Returns
offset

Definition at line 207 of file TOPRecBunch.h.

◆ getCurrentOffsetError()

double getCurrentOffsetError ( ) const
inline

Returns uncertainly of current offset.

Returns
uncertainly

Definition at line 213 of file TOPRecBunch.h.

◆ getHistograms()

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

Returns histograms.

Returns
1D histograms

Definition at line 255 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:24
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 273 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 279 of file TOPRecBunch.h.

◆ getMinChi2()

double getMinChi2 ( ) const
inline

Returns chi2 value at minimum.

Returns
chi2 at minimum

Definition at line 219 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 249 of file TOPRecBunch.h.

◆ getNumTracks()

int getNumTracks ( ) const
inline

Returns number of tracks in acceptance of TOP.

Returns
number of tracks

Definition at line 237 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 291 of file TOPRecBunch.h.

◆ getSeedingDetector()

Const::EDetector getSeedingDetector ( ) const
inline

Returns detector component which provided the time seed.

Returns
detector component

Definition at line 297 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 201 of file TOPRecBunch.h.

◆ getUsedTracks()

int getUsedTracks ( ) const
inline

Returns number of tracks used for bunch reconstruction.

Returns
number of tracks

Definition at line 243 of file TOPRecBunch.h.

◆ isFineSearch()

bool isFineSearch ( ) const
inline

Check if fine search is done.

Returns
true on fine search

Definition at line 267 of file TOPRecBunch.h.

◆ isReconstructed()

bool isReconstructed ( ) const
inline

Check if reconstructed return values are valid.

Returns
true on valid

Definition at line 261 of file TOPRecBunch.h.

◆ isSimulated()

bool isSimulated ( ) const
inline

Check if simulated return values are valid.

Returns
true on valid

Definition at line 285 of file TOPRecBunch.h.

◆ setBucketFillStatus()

void setBucketFillStatus ( bool  isFilled)
inline

Sets reconstructed bucket fill status.

Parameters
isFilledfill status

Definition at line 149 of file TOPRecBunch.h.

◆ setBucketNumber()

void setBucketNumber ( int  bucketNumber)
inline

Sets reconstructed bucket number.

Parameters
bucketNumberbucket number

Definition at line 143 of file TOPRecBunch.h.

◆ setMinChi2()

void setMinChi2 ( double  minChi2)
inline

Sets chi2 value at minimum.

Parameters
minChi2value at minimum

Definition at line 116 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 99 of file TOPRecBunch.h.

◆ setReconstructed()

void setReconstructed ( int  bunchNo,
double  time,
double  currentOffset,
double  currentOffsetError,
double  averageOffset,
double  averageOffsetError,
Const::EDetector  detector 
)
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
detectora component providing the time seed

Definition at line 77 of file TOPRecBunch.h.

◆ setRevo9Counter()

void setRevo9Counter ( unsigned short  revo9Counter)
inline

Sets number of system clock tics since last revo9 marker.

Parameters
revo9Countercounter state when L1 trigger is issued

Definition at line 110 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 132 of file TOPRecBunch.h.


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