CbmRoot
Loading...
Searching...
No Matches
CbmEvent Class Reference

Class characterising one event by a collection of links (indices) to data objects,. More...

#include <CbmEvent.h>

Inheritance diagram for CbmEvent:
[legend]
Collaboration diagram for CbmEvent:
[legend]

Public Member Functions

 CbmEvent ()
 
 CbmEvent (int32_t number, double startTime=0., double endTime=0.)
 
 CbmEvent (const CbmEvent &)
 
 CbmEvent (CbmEvent &&)=default
 
virtual ~CbmEvent ()
 
void Clear (Option_t *)
 
void ClearData (ECbmDataType type)
 
void AddData (ECbmDataType type, uint32_t index)
 
void AddStsTrack (uint32_t index)
 
uint32_t GetIndex (ECbmDataType type, uint32_t iData)
 
CbmMatchGetMatch () const
 
size_t GetNofData () const
 
size_t GetNofData (ECbmDataType type) const
 
int32_t GetNofStsTracks () const
 
int32_t GetNumber () const
 
int32_t GetStsTrackIndex (int32_t iTrack)
 
double GetEndTime () const
 
double GetStartTime () const
 
double GetTzero () const
 
void SetNumber (int32_t number)
 
void SetEndTime (double endTime)
 
void SetMatch (CbmMatch *match)
 
void SetStartTime (double startTime)
 
void SetTzero (double tZero)
 
void SetStsTracks (std::vector< uint32_t > &indexVector)
 Sets the index array for STS tracks. Old content will be overwritten.
 
void SetVertex (double x, double y, double z, double chi2, int32_t ndf, int32_t nTracks, const TMatrixFSym &covMat)
 
void SortIndices ()
 
std::string ToString () const
 
CbmVertexGetVertex ()
 
void Swap (CbmEvent &e)
 

Private Member Functions

CbmEventoperator= (const CbmEvent &)
 
 ClassDef (CbmEvent, 3)
 

Private Attributes

int32_t fNumber = -1
 Event number.
 
double fTimeStart = 0.
 Event start time [ns].
 
double fTimeEnd = 0.
 Event end time [ns].
 
double fTzero = -999999.
 Bmon of event for TOF PID [ns].
 
CbmVertex fVertex = {}
 Primary Vertex.
 
CbmMatchfMatch = nullptr
 Match object to MCEvent.
 
std::map< ECbmDataType, std::vector< uint32_t > > fIndexMap
 

Detailed Description

Class characterising one event by a collection of links (indices) to data objects,.

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Version
1.0

Definition at line 34 of file CbmEvent.h.

Constructor & Destructor Documentation

◆ CbmEvent() [1/4]

CbmEvent::CbmEvent ( )
inline

Default constructor

Definition at line 38 of file CbmEvent.h.

◆ CbmEvent() [2/4]

CbmEvent::CbmEvent ( int32_t number,
double startTime = 0.,
double endTime = 0. )
inline

Constructor with event number and time

Parameters
[in]numberEvent number
[in]startTimeEvent start time [ns]
[in]endTimeEvent start time [ns]

Definition at line 45 of file CbmEvent.h.

◆ CbmEvent() [3/4]

CbmEvent::CbmEvent ( const CbmEvent & rhs)

CbmEvent.cxx

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
17.09.2016
Version
1.0

Definition at line 19 of file CbmEvent.cxx.

References fMatch.

◆ CbmEvent() [4/4]

CbmEvent::CbmEvent ( CbmEvent && )
default

◆ ~CbmEvent()

virtual CbmEvent::~CbmEvent ( )
inlinevirtual

Destructor

Definition at line 61 of file CbmEvent.h.

References fMatch.

Member Function Documentation

◆ AddData()

void CbmEvent::AddData ( ECbmDataType type,
uint32_t index )

Add a data object to the index map

Parameters
DataTypeType of data (for values see CbmDetectorList.h)
IndexIndex of the data object in its TClonesArray

Definition at line 33 of file CbmEvent.cxx.

References fIndexMap.

Referenced by CbmAlgoBuildRawEvents::AddDigiToEvent(), CbmMcbm2018EventBuilder::AddDigiToEvent(), CbmMcbm2019TimeWinEventBuilderAlgo::AddDigiToEvent(), CbmTrdHitProducer::addModuleHits(), AddStsTrack(), CbmTaskTofClusterizer::Exec(), CbmTofEventClusterizer::Exec(), CbmTofFindTracks::Exec(), CbmTofHitMaker::Exec(), and CbmTaskMakeRecoEvents::FillTree().

◆ AddStsTrack()

void CbmEvent::AddStsTrack ( uint32_t index)
inline

Add an STS track to the event

Parameters
Indexof STS track in its TClonesArray

Definition at line 84 of file CbmEvent.h.

References AddData(), and kStsTrack.

◆ ClassDef()

CbmEvent::ClassDef ( CbmEvent ,
3  )
private

◆ Clear()

void CbmEvent::Clear ( Option_t * )
inline

Overload TObject Clear to clear the map!

Definition at line 67 of file CbmEvent.h.

References fIndexMap.

Referenced by CbmTsPointSetArrayDraw::GotoEvent().

◆ ClearData()

void CbmEvent::ClearData ( ECbmDataType type)

Clear a specific data branch in the index map

Parameters
DataTypeType of data (for values see CbmDetectorList.h)

Definition at line 37 of file CbmEvent.cxx.

References fIndexMap.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::Exec().

◆ GetEndTime()

double CbmEvent::GetEndTime ( ) const
inline

Get event end time @value End time of event [ns]

Definition at line 134 of file CbmEvent.h.

References fTimeEnd.

Referenced by compareEventDataMembers(), and CbmSimEventHeaderConverter::ProcessData().

◆ GetIndex()

◆ GetMatch()

◆ GetNofData() [1/2]

◆ GetNofData() [2/2]

size_t CbmEvent::GetNofData ( ECbmDataType type) const

Get number of data objects of a given type in this event

Parameters
DataTypeType of data (for values see CbmDetectorList.h) @value Number of objects of type DataType in the event.

Definition at line 65 of file CbmEvent.cxx.

References fIndexMap.

◆ GetNofStsTracks()

int32_t CbmEvent::GetNofStsTracks ( ) const
inline

Get number of STS tracks @value Number of STS tracks in the event. -1 if not registered.

Definition at line 115 of file CbmEvent.h.

References GetNofData(), and kStsTrack.

Referenced by CbmKFParticleFinder::Exec().

◆ GetNumber()

int32_t CbmEvent::GetNumber ( ) const
inline

Get event number @value Event number

Definition at line 121 of file CbmEvent.h.

References fNumber.

Referenced by CbmRichMCbmQaRichOnly::analyseRing(), compareEventDataMembers(), CbmTaskTofClusterizer::Exec(), and CbmTofEventClusterizer::Exec().

◆ GetStartTime()

◆ GetStsTrackIndex()

int32_t CbmEvent::GetStsTrackIndex ( int32_t iTrack)
inline

Get STS track index

Parameters
iTrackRunning number of STS track in the event @value index Index of STS track in TClonesArray

Definition at line 128 of file CbmEvent.h.

References GetIndex(), and kStsTrack.

Referenced by CbmEventBuilderQa::Exec().

◆ GetTzero()

double CbmEvent::GetTzero ( ) const
inline

Get t0 @value Reconstructed t0 [ns]

Definition at line 146 of file CbmEvent.h.

References fTzero.

Referenced by CbmTimesliceManager::GetEventTime(), and CbmKFParticleFinderPID::SetRecoPID().

◆ GetVertex()

CbmVertex * CbmEvent::GetVertex ( )
inline

Get event vertex @value Pointer to vertex object

Definition at line 210 of file CbmEvent.h.

References fVertex.

Referenced by compareEventDataMembers().

◆ operator=()

CbmEvent & CbmEvent::operator= ( const CbmEvent & )
private

◆ SetEndTime()

void CbmEvent::SetEndTime ( double endTime)
inline

◆ SetMatch()

void CbmEvent::SetMatch ( CbmMatch * match)
inline

Set a match object

Parameters
matchPointer to a match object

Definition at line 163 of file CbmEvent.h.

References fMatch.

◆ SetNumber()

void CbmEvent::SetNumber ( int32_t number)
inline

Set event number @value Event number

Definition at line 152 of file CbmEvent.h.

References fNumber.

Referenced by CbmBuildEventsIdeal::Exec().

◆ SetStartTime()

void CbmEvent::SetStartTime ( double startTime)
inline

Set start time

Parameters
endTimeStart time of event [ns]

Definition at line 169 of file CbmEvent.h.

References fTimeStart.

Referenced by CbmBuildEventsIdeal::Exec(), and TEST().

◆ SetStsTracks()

void CbmEvent::SetStsTracks ( std::vector< uint32_t > & indexVector)
inline

Sets the index array for STS tracks. Old content will be overwritten.

Set the STS track index array

Parameters
indexVectorVector with indices of STS tracks

Definition at line 183 of file CbmEvent.h.

References fIndexMap, and kStsTrack.

Referenced by CbmBuildEventsFromTracksIdeal::Exec(), and CbmBuildEventsFromTracksReal::Exec().

◆ SetTzero()

void CbmEvent::SetTzero ( double tZero)
inline

Set t0

Parameters
tZeroBmon measurement [ns]

Definition at line 175 of file CbmEvent.h.

References fTzero.

◆ SetVertex()

void CbmEvent::SetVertex ( double x,
double y,
double z,
double chi2,
int32_t ndf,
int32_t nTracks,
const TMatrixFSym & covMat )

Set the event vertex variables

Parameters
xx coordinate [cm]
yy coordinate [cm]
zz coordinate [cm]
chi2chi square of vertex fit
ndfNumber of degrees of freedom of vertex fit
nTracksNumber of tracks used for vertex fit
covMatCovariance Matrix (symmetric, 3x3)

Definition at line 76 of file CbmEvent.cxx.

References fVertex, CbmVertex::SetVertex(), x, and y.

Referenced by TEST().

◆ SortIndices()

void CbmEvent::SortIndices ( )

Sort the indices from smallest to biffest for each data type

Definition at line 109 of file CbmEvent.cxx.

References fIndexMap.

◆ Swap()

void CbmEvent::Swap ( CbmEvent & e)

Swap two events

Definition at line 84 of file CbmEvent.cxx.

References fIndexMap, fMatch, fNumber, fTimeEnd, fTimeStart, and fVertex.

Referenced by CbmBuildEventsIdeal::Exec().

◆ ToString()

Member Data Documentation

◆ fIndexMap

std::map<ECbmDataType, std::vector<uint32_t> > CbmEvent::fIndexMap
private

Arrays of indices to data types

Definition at line 225 of file CbmEvent.h.

Referenced by AddData(), Clear(), ClearData(), GetIndex(), GetNofData(), GetNofData(), SetStsTracks(), SortIndices(), Swap(), and ToString().

◆ fMatch

CbmMatch* CbmEvent::fMatch = nullptr
private

Match object to MCEvent.

Definition at line 222 of file CbmEvent.h.

Referenced by CbmEvent(), GetMatch(), SetMatch(), Swap(), ToString(), and ~CbmEvent().

◆ fNumber

int32_t CbmEvent::fNumber = -1
private

Event number.

Event meta data

Definition at line 217 of file CbmEvent.h.

Referenced by GetNumber(), SetNumber(), Swap(), and ToString().

◆ fTimeEnd

double CbmEvent::fTimeEnd = 0.
private

Event end time [ns].

Definition at line 219 of file CbmEvent.h.

Referenced by GetEndTime(), SetEndTime(), and Swap().

◆ fTimeStart

double CbmEvent::fTimeStart = 0.
private

Event start time [ns].

Definition at line 218 of file CbmEvent.h.

Referenced by GetStartTime(), SetStartTime(), Swap(), and ToString().

◆ fTzero

double CbmEvent::fTzero = -999999.
private

Bmon of event for TOF PID [ns].

Definition at line 220 of file CbmEvent.h.

Referenced by GetTzero(), and SetTzero().

◆ fVertex

CbmVertex CbmEvent::fVertex = {}
private

Primary Vertex.

Definition at line 221 of file CbmEvent.h.

Referenced by GetVertex(), SetVertex(), and Swap().


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