CbmRoot
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 (Int_t number, Double_t startTime=0., Double_t endTime=0.)
 
 CbmEvent (CbmEvent &&)=default
 
virtual ~CbmEvent ()
 
void Clear (Option_t *)
 
void AddData (ECbmDataType type, UInt_t index)
 
void AddStsTrack (UInt_t index)
 
UInt_t GetIndex (ECbmDataType type, UInt_t iData)
 
CbmMatchGetMatch () const
 
Int_t GetNofData () const
 
Int_t GetNofData (ECbmDataType type) const
 
Int_t GetNofStsTracks () const
 
Int_t GetNumber () const
 
Int_t GetStsTrackIndex (Int_t iTrack)
 
Double_t GetEndTime () const
 
Double_t GetStartTime () const
 
void SetEndTime (Double_t endTime)
 
void SetMatch (CbmMatch *match)
 
void SetStartTime (Double_t startTime)
 
void SetStsTracks (std::vector< UInt_t > &indexVector)
 Sets the index array for STS tracks. Old content will be overwritten. More...
 
void SetVertex (Double_t x, Double_t y, Double_t z, Double_t chi2, Int_t ndf, Int_t nTracks, const TMatrixFSym &covMat)
 
std::string ToString () const
 
CbmVertexGetVertex ()
 

Private Member Functions

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

Private Attributes

Int_t fNumber
 Event number. More...
 
Double_t fTimeStart
 Event start time [ns]. More...
 
Double_t fTimeEnd
 Event end time [ns]. More...
 
Int_t fNofData
 Number of data objects in the event. More...
 
CbmVertex fVertex
 Primary Vertex. More...
 
CbmMatchfMatch
 Match object to MCEvent. More...
 
std::map< ECbmDataType, std::vector< UInt_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 30 of file CbmEvent.h.

Constructor & Destructor Documentation

◆ CbmEvent() [1/4]

CbmEvent::CbmEvent ( )
inline

Default constructor

Definition at line 34 of file CbmEvent.h.

◆ CbmEvent() [2/4]

CbmEvent::CbmEvent ( Int_t  number,
Double_t  startTime = 0.,
Double_t  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 41 of file CbmEvent.h.

◆ CbmEvent() [3/4]

CbmEvent::CbmEvent ( CbmEvent &&  )
default

◆ ~CbmEvent()

virtual CbmEvent::~CbmEvent ( )
inlinevirtual

Destructor

Definition at line 54 of file CbmEvent.h.

References fMatch.

◆ CbmEvent() [4/4]

CbmEvent::CbmEvent ( const CbmEvent )
private

Member Function Documentation

◆ AddData()

void CbmEvent::AddData ( ECbmDataType  type,
UInt_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

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 15 of file CbmEvent.cxx.

References fIndexMap, and fNofData.

Referenced by CbmMcbm2018EventBuilder::AddDigiToEvent(), CbmMcbm2019TimeWinEventBuilderAlgo::AddDigiToEvent(), AddStsTrack(), CbmTofFindTracks::Exec(), CbmTofEventClusterizer::Exec(), and CbmBuildEventsSimple::FillEvent().

◆ AddStsTrack()

void CbmEvent::AddStsTrack ( UInt_t  index)
inline

Add an STS track to the event

Parameters
Indexof STS track in its TClonesArray

Definition at line 72 of file CbmEvent.h.

References AddData(), and kStsTrack.

◆ ClassDef()

CbmEvent::ClassDef ( CbmEvent  ,
 
)
private

◆ Clear()

void CbmEvent::Clear ( Option_t *  )
inline

Overload TObject Clear to clear the map!

Definition at line 59 of file CbmEvent.h.

References fIndexMap.

◆ GetEndTime()

Double_t CbmEvent::GetEndTime ( ) const
inline

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

Definition at line 125 of file CbmEvent.h.

References fTimeEnd.

Referenced by compareEventDataMembers().

◆ GetIndex()

UInt_t CbmEvent::GetIndex ( ECbmDataType  type,
UInt_t  iData 
)

Get the index of a data object in its TClonesArray

Parameters
DataTypeType of data (for values see CbmDetectorList.h)
iDataRunning number of data object in event @value Index of data object in its TClonesArray

Definition at line 24 of file CbmEvent.cxx.

References fIndexMap.

Referenced by CbmRichMCbmQaRichOnly::analyseRing(), CbmRichMCbmQaReal::analyseRing(), compareEventMap(), CbmRichMCbmSEDisplay::DrawEvent(), CbmPsdMCbmQaReal::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmRichMCbmQaReal::Exec(), CbmTofAnaTestbeam::Exec(), CbmTofFindTracks::Exec(), CbmTofEventClusterizer::Exec(), CbmHadronAnalysis::Exec(), and GetStsTrackIndex().

◆ GetMatch()

CbmMatch* CbmEvent::GetMatch ( ) const
inline

Get match object @value Pointer to match object

Definition at line 86 of file CbmEvent.h.

References fMatch.

Referenced by compareEventDataMembers().

◆ GetNofData() [1/2]

◆ GetNofData() [2/2]

Int_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. -1 is data type is not registered.

Definition at line 34 of file CbmEvent.cxx.

References fIndexMap.

◆ GetNofStsTracks()

Int_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 104 of file CbmEvent.h.

References GetNofData(), and kStsTrack.

◆ GetNumber()

Int_t CbmEvent::GetNumber ( ) const
inline

Get event number @value Event number

Definition at line 110 of file CbmEvent.h.

References fNumber.

Referenced by CbmRichMCbmQaRichOnly::analyseRing(), and compareEventDataMembers().

◆ GetStartTime()

Double_t CbmEvent::GetStartTime ( ) const
inline

Get event start time @value Start time of event [ns]

Definition at line 131 of file CbmEvent.h.

References fTimeStart.

Referenced by CbmRichMCbmQaRichOnly::analyseRing(), CbmRichMCbmQaReal::analyseRing(), compareEventDataMembers(), CbmRichMCbmSEDisplay::DrawEvent(), and CbmRichMCbmQaReal::Exec().

◆ GetStsTrackIndex()

Int_t CbmEvent::GetStsTrackIndex ( Int_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 117 of file CbmEvent.h.

References GetIndex(), and kStsTrack.

Referenced by CbmEventBuilderQA::Exec().

◆ GetVertex()

CbmVertex* CbmEvent::GetVertex ( )
inline

Get event vertex @value Pointer to vertex object

Definition at line 189 of file CbmEvent.h.

References fVertex.

Referenced by compareEventDataMembers().

◆ operator=()

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

◆ SetEndTime()

void CbmEvent::SetEndTime ( Double_t  endTime)
inline

Set end time

Parameters
endTimeEnd time of event [ns]

Definition at line 137 of file CbmEvent.h.

References fTimeEnd.

Referenced by CbmMcbm2018EventBuilder::BuildEvents(), CbmMcbm2019TimeWinEventBuilderAlgo::CheckSeed(), and CbmMcbm2019TimeWinEventBuilderAlgo::ProcessTs().

◆ SetMatch()

void CbmEvent::SetMatch ( CbmMatch match)
inline

Set a match object

Parameters
matchPointer to a match object

Definition at line 143 of file CbmEvent.h.

References fMatch.

◆ SetStartTime()

void CbmEvent::SetStartTime ( Double_t  startTime)
inline

Set start time

Parameters
endTimeStart time of event [ns]

Definition at line 149 of file CbmEvent.h.

References fTimeStart.

◆ SetStsTracks()

void CbmEvent::SetStsTracks ( std::vector< UInt_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 157 of file CbmEvent.h.

References fIndexMap, fNofData, and kStsTrack.

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

◆ SetVertex()

void CbmEvent::SetVertex ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  chi2,
Int_t  ndf,
Int_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 45 of file CbmEvent.cxx.

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

Referenced by TEST().

◆ ToString()

std::string CbmEvent::ToString ( ) const

String output

Definition at line 58 of file CbmEvent.cxx.

References fIndexMap, fMatch, fNofData, fNumber, and fTimeStart.

Member Data Documentation

◆ fIndexMap

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

Arrays of indices to data types

Definition at line 202 of file CbmEvent.h.

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

◆ fMatch

CbmMatch* CbmEvent::fMatch
private

Match object to MCEvent.

Definition at line 199 of file CbmEvent.h.

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

◆ fNofData

Int_t CbmEvent::fNofData
private

Number of data objects in the event.

Definition at line 197 of file CbmEvent.h.

Referenced by AddData(), GetNofData(), SetStsTracks(), and ToString().

◆ fNumber

Int_t CbmEvent::fNumber
private

Event number.

Event meta data

Definition at line 194 of file CbmEvent.h.

Referenced by GetNumber(), and ToString().

◆ fTimeEnd

Double_t CbmEvent::fTimeEnd
private

Event end time [ns].

Definition at line 196 of file CbmEvent.h.

Referenced by GetEndTime(), and SetEndTime().

◆ fTimeStart

Double_t CbmEvent::fTimeStart
private

Event start time [ns].

Definition at line 195 of file CbmEvent.h.

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

◆ fVertex

CbmVertex CbmEvent::fVertex
private

Primary Vertex.

Definition at line 198 of file CbmEvent.h.

Referenced by GetVertex(), and SetVertex().


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