Belle II Software development
TOPRecBunch Class Reference

Class to store results of TOPBunchFinder. More...

#include <TOPRecBunch.h>

Inheritance diagram for TOPRecBunch:
RelationsInterface< BASE >

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.
 
void setNumTracks (int numTracks, int usedTracks, int nodEdx)
 Set number of tracks.
 
void setRevo9Counter (unsigned short revo9Counter)
 Sets number of system clock tics since last revo9 marker.
 
void setMinChi2 (double minChi2)
 Sets chi2 value at minimum.
 
void addHistogram (const TH1F &histo)
 Add histogram.
 
void setSimulated (int bunchNo, double time)
 Set simulated relative bunch number and time.
 
void setBucketNumber (int bucketNumber)
 Sets reconstructed bucket number.
 
void setBucketFillStatus (bool isFilled)
 Sets reconstructed bucket fill status.
 
int getBunchNo () const
 Returns reconstructed bunch number relative to L1 trigger signal at TOP note: depends on the "look back" setting.
 
int getBucketNumber (int offset, unsigned RFBucketsPerRevolution=5120) const
 Returns reconstructed bucket number within the ring.
 
int getBucketNumber () const
 Returns reconstructed bucket number stored in private member.
 
EBucketStatus getBucketFillStatus () const
 Returns bucket fill status.
 
double getTime () const
 Returns reconstructed bunch time relative to L1 trigger signal at TOP (time to be subtracted to correct time of digits)
 
double getCurrentOffset () const
 Returns current offset to reconstructed bunch.
 
double getCurrentOffsetError () const
 Returns uncertainly of current offset.
 
double getMinChi2 () const
 Returns chi2 value at minimum.
 
double getAverageOffset () const
 Returns average offset to reconstructed bunch.
 
double getAverageOffsetError () const
 Returns uncertainly of average offset.
 
int getNumTracks () const
 Returns number of tracks in acceptance of TOP.
 
int getUsedTracks () const
 Returns number of tracks used for bunch reconstruction.
 
int getNodEdxTracks () const
 Returns number of used tracks without dEdx information.
 
const std::vector< TH1F > & getHistograms () const
 Returns histograms.
 
bool isReconstructed () const
 Check if reconstructed return values are valid.
 
bool isFineSearch () const
 Check if fine search is done.
 
int getMCBunchNo () const
 Returns simulated bunch number (= bunch used for the event start time)
 
double getMCTime () const
 Returns simulated bunch time (= time used as event start time)
 
bool isSimulated () const
 Check if simulated return values are valid.
 
unsigned short getRevo9Counter () const
 Returns 127 MHz clock ticks since last revo9 marker.
 
Const::EDetector getSeedingDetector () const
 Returns detector component which provided the time seed.
 
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).
 
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).
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
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.
 
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.
 
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.
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
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.
 
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.
 
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.
 
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.
 
virtual std::string getName () const
 Return a short name that describes this object, e.g.
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format.
 
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.
 

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

Constructor & Destructor Documentation

◆ TOPRecBunch()

TOPRecBunch ( )
inline

Default constructor.

Definition at line 41 of file TOPRecBunch.h.

42 {}

Member Function Documentation

◆ addHistogram()

void addHistogram ( const TH1F &  histo)
inline

Add histogram.

Parameters
histoone dimensional histogram

Definition at line 122 of file TOPRecBunch.h.

123 {
124 m_histograms.push_back(histo);
125 }
std::vector< TH1F > m_histograms
histograms, like chi2 vs t0
Definition: TOPRecBunch.h:311

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

143 {
144 if (object)
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }
void addRelation(const TObject *fromObject, StoreEntry *&fromEntry, int &fromIndex, const TObject *toObject, StoreEntry *&toEntry, int &toIndex, float weight, const std::string &namedRelation)
Add a relation from an object in a store array to another object in a store array.
Definition: DataStore.cc:492
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
DataStore::StoreEntry * m_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.

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

156 {
157 StoreEntry* toEntry = nullptr;
158 int toIndex = -1;
159 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex, object, toEntry, toIndex, weight, namedRelation);
160 }

◆ clearReconstructed()

void clearReconstructed ( )
inline

Clear reconstruction data members.

Definition at line 47 of file TOPRecBunch.h.

48 {
49 m_recBunchNo = 0;
50 m_recTime = 0;
55 m_numTracks = 0;
56 m_usedTracks = 0;
57 m_nodEdx = 0;
58 m_fineSearch = false;
59 m_histograms.clear();
60 m_recValid = false;
61 m_minChi2 = 0;
62 m_detector = Const::invalidDetector;
65 }
float m_recTime
reconstructed relative bunch time
Definition: TOPRecBunch.h:302
Const::EDetector m_detector
component providing the time seed
Definition: TOPRecBunch.h:320
int m_bucketNumber
reconstructed bucket number
Definition: TOPRecBunch.h:322
float m_currentOffset
current offset
Definition: TOPRecBunch.h:303
bool m_recValid
status of rec
Definition: TOPRecBunch.h:312
bool m_fineSearch
if true, fine search was done
Definition: TOPRecBunch.h:310
float m_averageOffset
running average of offset
Definition: TOPRecBunch.h:304
float m_minChi2
chi2 value at minimum
Definition: TOPRecBunch.h:319
int m_numTracks
number of tracks in acceptance of TOP
Definition: TOPRecBunch.h:307
int m_nodEdx
number of used tracks with no dEdx information
Definition: TOPRecBunch.h:309
EBucketStatus m_isBucketFilled
reconstructed bucket status
Definition: TOPRecBunch.h:323
float m_currentOffsetError
uncertainty of current offset
Definition: TOPRecBunch.h:305
int m_recBunchNo
reconstructed relative bunch number
Definition: TOPRecBunch.h:301
int m_usedTracks
number of tracks used for bunch reconstruction
Definition: TOPRecBunch.h:308
float m_averageOffsetError
uncertainty of running average of offset
Definition: TOPRecBunch.h:306

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

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }
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).

◆ getArrayIndex()

int getArrayIndex ( ) const
inlineinherited

Returns this object's array index (in StoreArray), or -1 if not found.

Definition at line 385 of file RelationsObject.h.

386 {
388 return m_cacheArrayIndex;
389 }
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
Definition: DataStore.cc:398

◆ getArrayName()

std::string getArrayName ( ) const
inlineinherited

Get name of array this object is stored in, or "" if not found.

Definition at line 377 of file RelationsObject.h.

◆ getArrayPointer()

TClonesArray * getArrayPointer ( ) const
inlineprotectedinherited

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

Definition at line 418 of file RelationsObject.h.

419 {
422 return nullptr;
424 }
TClonesArray * getPtrAsArray() const
Return ptr cast to TClonesArray.
Definition: StoreEntry.cc:83

◆ getAverageOffset()

double getAverageOffset ( ) const
inline

Returns average offset to reconstructed bunch.

Returns
offset

Definition at line 225 of file TOPRecBunch.h.

225{return m_averageOffset;}

◆ getAverageOffsetError()

double getAverageOffsetError ( ) const
inline

Returns uncertainly of average offset.

Returns
uncertainly

Definition at line 231 of file TOPRecBunch.h.

231{return m_averageOffsetError;}

◆ getBucketFillStatus()

EBucketStatus getBucketFillStatus ( ) const
inline

Returns bucket fill status.

Returns
bucket fill status

Definition at line 194 of file TOPRecBunch.h.

194{return m_isBucketFilled;}

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

188{return m_bucketNumber;}

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

180 {
181 return getBucketNumber(m_recBunchNo, m_revo9Counter, offset, RFBucketsPerRevolution);
182 }
int getBucketNumber() const
Returns reconstructed bucket number stored in private member.
Definition: TOPRecBunch.h:188
unsigned short m_revo9Counter
number of system clocks since last revo9 marker
Definition: TOPRecBunch.h:318

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

167 {
168 int bn = (recBunchNo + revo9Count * 4 - offset) % RFBucketsPerRevolution;
169 if (bn < 0) bn += RFBucketsPerRevolution;
170 return bn;
171 }

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

156{return m_recBunchNo;}

◆ getCurrentOffset()

double getCurrentOffset ( ) const
inline

Returns current offset to reconstructed bunch.

Returns
offset

Definition at line 207 of file TOPRecBunch.h.

207{return m_currentOffset;}

◆ getCurrentOffsetError()

double getCurrentOffsetError ( ) const
inline

Returns uncertainly of current offset.

Returns
uncertainly

Definition at line 213 of file TOPRecBunch.h.

213{return m_currentOffsetError;}

◆ getHistograms()

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

Returns histograms.

Returns
1D histograms

Definition at line 255 of file TOPRecBunch.h.

255{return m_histograms;}

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

371 {
373 }
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
std::string htmlToPlainText(const std::string &html)
See RelationsObject::getInfo()

◆ 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 Particle, Cluster, MCParticle, PIDLikelihood, SoftwareTriggerResult, Track, TrackFitResult, TRGSummary, and RecoTrack.

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

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

273{return m_simBunchNo;}
int m_simBunchNo
simulated relative bunch number
Definition: TOPRecBunch.h:314

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

279{return m_simTime;}
float m_simTime
simulated relative bunch time
Definition: TOPRecBunch.h:315

◆ getMinChi2()

double getMinChi2 ( ) const
inline

Returns chi2 value at minimum.

Returns
chi2 at minimum

Definition at line 219 of file TOPRecBunch.h.

219{return m_minChi2;}

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in Particle, MCParticle, and SpacePoint.

Definition at line 344 of file RelationsObject.h.

344{ return ""; }

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

249{return m_nodEdx;}

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

237{return m_numTracks;}

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

279 {
281 T::Class(), name, namedRelation).object);
282 }
@ c_BothSides
Combination of c_FromSide and c_ToSide.
Definition: DataStore.h:79
Belle2::RelationEntry getRelationWith(ESearchSide searchSide, const TObject *object, StoreEntry *&entry, int &index, const TClass *withClass, const std::string &withName, const std::string &namedRelation)
Get the first relation between an object and another object in a store array.
Definition: DataStore.cc:597
TObject * object
Pointer to the object.
Definition: RelationEntry.h:32

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

264 {
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }
@ c_FromSide
Return relations/objects pointed from (to a given object).
Definition: DataStore.h:77

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

316 {
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

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

249 {
251 TO::Class(), name, namedRelation).object);
252 }
@ c_ToSide
Return relations/objects pointed to (from a given object).
Definition: DataStore.h:78

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

299 {
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

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

333 {
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

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

214 {
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.

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

198 {
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

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

231 {
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

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

291{return m_revo9Counter;}

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

297{return m_detector;}

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

201{return m_recTime;}

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

243{return m_usedTracks;}

◆ isFineSearch()

bool isFineSearch ( ) const
inline

Check if fine search is done.

Returns
true on fine search

Definition at line 267 of file TOPRecBunch.h.

267{return m_fineSearch;}

◆ isReconstructed()

bool isReconstructed ( ) const
inline

Check if reconstructed return values are valid.

Returns
true on valid

Definition at line 261 of file TOPRecBunch.h.

261{return m_recValid;}

◆ isSimulated()

bool isSimulated ( ) const
inline

Check if simulated return values are valid.

Returns
true on valid

Definition at line 285 of file TOPRecBunch.h.

285{return m_simValid;}
bool m_simValid
status of sim
Definition: TOPRecBunch.h:316

◆ setBucketFillStatus()

void setBucketFillStatus ( bool  isFilled)
inline

Sets reconstructed bucket fill status.

Parameters
isFilledfill status

Definition at line 149 of file TOPRecBunch.h.

149{m_isBucketFilled = isFilled ? c_Filled : c_Empty;}

◆ setBucketNumber()

void setBucketNumber ( int  bucketNumber)
inline

Sets reconstructed bucket number.

Parameters
bucketNumberbucket number

Definition at line 143 of file TOPRecBunch.h.

143{m_bucketNumber = bucketNumber;}

◆ setMinChi2()

void setMinChi2 ( double  minChi2)
inline

Sets chi2 value at minimum.

Parameters
minChi2value at minimum

Definition at line 116 of file TOPRecBunch.h.

116{m_minChi2 = minChi2;}

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

100 {
101 m_numTracks = numTracks;
102 m_usedTracks = usedTracks;
103 m_nodEdx = nodEdx;
104 }

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

81 {
82 m_recBunchNo = bunchNo;
83 m_recTime = time;
84 m_currentOffset = currentOffset;
85 m_averageOffset = averageOffset;
86 m_currentOffsetError = currentOffsetError;
87 m_averageOffsetError = averageOffsetError;
88 m_fineSearch = true;
89 m_recValid = true;
90 m_detector = detector;
91 }

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

110{m_revo9Counter = revo9Counter;}

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

133 {
134 m_simBunchNo = bunchNo;
135 m_simTime = time;
136 m_simValid = true;
137 }

Member Data Documentation

◆ m_averageOffset

float m_averageOffset = 0
private

running average of offset

Definition at line 304 of file TOPRecBunch.h.

◆ m_averageOffsetError

float m_averageOffsetError = 0
private

uncertainty of running average of offset

Definition at line 306 of file TOPRecBunch.h.

◆ m_bucketNumber

int m_bucketNumber = c_Unknown
private

reconstructed bucket number

Definition at line 322 of file TOPRecBunch.h.

◆ m_cacheArrayIndex

int m_cacheArrayIndex
mutableprivateinherited

Cache of the index in the TClonesArray to which this object belongs.

Definition at line 432 of file RelationsObject.h.

◆ m_cacheDataStoreEntry

DataStore::StoreEntry* m_cacheDataStoreEntry
mutableprivateinherited

Cache of the data store entry to which this object belongs.

Definition at line 429 of file RelationsObject.h.

◆ m_currentOffset

float m_currentOffset = 0
private

current offset

Definition at line 303 of file TOPRecBunch.h.

◆ m_currentOffsetError

float m_currentOffsetError = 0
private

uncertainty of current offset

Definition at line 305 of file TOPRecBunch.h.

◆ m_detector

Const::EDetector m_detector = Const::invalidDetector
private

component providing the time seed

Definition at line 320 of file TOPRecBunch.h.

◆ m_fineSearch

bool m_fineSearch = false
private

if true, fine search was done

Definition at line 310 of file TOPRecBunch.h.

◆ m_histograms

std::vector<TH1F> m_histograms
private

histograms, like chi2 vs t0

Definition at line 311 of file TOPRecBunch.h.

◆ m_isBucketFilled

EBucketStatus m_isBucketFilled = c_Unknown
private

reconstructed bucket status

Definition at line 323 of file TOPRecBunch.h.

◆ m_minChi2

float m_minChi2 = 0
private

chi2 value at minimum

Definition at line 319 of file TOPRecBunch.h.

◆ m_nodEdx

int m_nodEdx = 0
private

number of used tracks with no dEdx information

Definition at line 309 of file TOPRecBunch.h.

◆ m_numTracks

int m_numTracks = 0
private

number of tracks in acceptance of TOP

Definition at line 307 of file TOPRecBunch.h.

◆ m_recBunchNo

int m_recBunchNo = 0
private

reconstructed relative bunch number

Definition at line 301 of file TOPRecBunch.h.

◆ m_recTime

float m_recTime = 0
private

reconstructed relative bunch time

Definition at line 302 of file TOPRecBunch.h.

◆ m_recValid

bool m_recValid = false
private

status of rec

Definition at line 312 of file TOPRecBunch.h.

◆ m_revo9Counter

unsigned short m_revo9Counter = 0xFFFF
private

number of system clocks since last revo9 marker

Definition at line 318 of file TOPRecBunch.h.

◆ m_simBunchNo

int m_simBunchNo = 0
private

simulated relative bunch number

Definition at line 314 of file TOPRecBunch.h.

◆ m_simTime

float m_simTime = 0
private

simulated relative bunch time

Definition at line 315 of file TOPRecBunch.h.

◆ m_simValid

bool m_simValid = false
private

status of sim

Definition at line 316 of file TOPRecBunch.h.

◆ m_usedTracks

int m_usedTracks = 0
private

number of tracks used for bunch reconstruction

Definition at line 308 of file TOPRecBunch.h.


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