CbmRoot
|
Class characterising one event by a collection of links (indices) to data objects,. More...
#include <CbmEvent.h>
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) |
CbmMatch * | GetMatch () 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 |
CbmVertex * | GetVertex () |
void | Swap (CbmEvent &e) |
Private Member Functions | |
CbmEvent & | operator= (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. | |
CbmMatch * | fMatch = nullptr |
Match object to MCEvent. | |
std::map< ECbmDataType, std::vector< uint32_t > > | fIndexMap |
Class characterising one event by a collection of links (indices) to data objects,.
Definition at line 34 of file CbmEvent.h.
|
inline |
Default constructor
Definition at line 38 of file CbmEvent.h.
|
inline |
Constructor with event number and time
[in] | number | Event number |
[in] | startTime | Event start time [ns] |
[in] | endTime | Event start time [ns] |
Definition at line 45 of file CbmEvent.h.
CbmEvent::CbmEvent | ( | const CbmEvent & | rhs | ) |
|
default |
|
inlinevirtual |
void CbmEvent::AddData | ( | ECbmDataType | type, |
uint32_t | index ) |
Add a data object to the index map
DataType | Type of data (for values see CbmDetectorList.h) |
Index | Index 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().
|
inline |
Add an STS track to the event
Index | of STS track in its TClonesArray |
Definition at line 84 of file CbmEvent.h.
|
private |
|
inline |
Overload TObject Clear to clear the map!
Definition at line 67 of file CbmEvent.h.
References fIndexMap.
Referenced by CbmTsPointSetArrayDraw::GotoEvent().
void CbmEvent::ClearData | ( | ECbmDataType | type | ) |
Clear a specific data branch in the index map
DataType | Type of data (for values see CbmDetectorList.h) |
Definition at line 37 of file CbmEvent.cxx.
References fIndexMap.
Referenced by cbm::ca::IdealHitProducerDet< DetID >::Exec().
|
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().
uint32_t CbmEvent::GetIndex | ( | ECbmDataType | type, |
uint32_t | iData ) |
Get the index of a data object in its TClonesArray
DataType | Type of data (for values see CbmDetectorList.h) |
iData | Running number of data object in event @value Index of data object in its TClonesArray |
Definition at line 42 of file CbmEvent.cxx.
References fIndexMap, and size().
Referenced by CbmRichMCbmQaReal::analyseRing(), CbmRichMCbmQaRichOnly::analyseRing(), compareEventMap(), CbmRichMCbmSEDisplay::DrawEvent(), CbmRichEventDisplay::DrawOnePmtPlane(), CbmHadronAnalysis::Exec(), CbmPsdMCbmQaReal::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQaReal::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmTaskTofClusterizer::Exec(), CbmTofAnaTestbeam::Exec(), CbmTofEventClusterizer::Exec(), CbmTofFindTracks::Exec(), CbmTofHitMaker::Exec(), CbmTofExtendTracks::ExecExtend(), CbmTofExtendTracks::FillHistograms(), CbmTofCalibrator::FillHitCalHist(), GetStsTrackIndex(), and cbm::ca::TimeSliceReader::ReadRecoTracks().
|
inline |
Get match object @value Pointer to match object
Definition at line 98 of file CbmEvent.h.
References fMatch.
Referenced by compareEventDataMembers(), cbm::ca::MCModule::InitEvent(), CbmStsTracksConverter::MapTracks(), CbmRecEventHeaderConverter::ProcessData(), CbmSimEventHeaderConverter::ProcessData(), CbmSimTracksConverter::ProcessData(), and CbmTofHitsConverter::ProcessData().
size_t CbmEvent::GetNofData | ( | ) | const |
Get total number of data (of all types) in the event
Definition at line 53 of file CbmEvent.cxx.
References fIndexMap.
Referenced by CbmRecoQaTask::EventFilter::Accept(), CbmRichMCbmQaReal::analyseRing(), CbmRichMCbmQaRichOnly::analyseRing(), compareEventDataMembers(), compareEventMap(), CbmRichMCbmSEDisplay::DrawEvent(), CbmEventBuilderQa::Exec(), CbmHadronAnalysis::Exec(), CbmMvdClusterfinderTB::Exec(), CbmMvdDigiToHitTB::Exec(), CbmPsdMCbmQaReal::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQaReal::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmTaskTofClusterizer::Exec(), CbmTofAnaTestbeam::Exec(), CbmTofEventClusterizer::Exec(), CbmTofExtendTracks::Exec(), CbmTofFindTracks::Exec(), CbmTofHitMaker::Exec(), CbmTofExtendTracks::ExecExtend(), CbmTofExtendTracks::FillHistograms(), CbmTofCalibrator::FillHitCalHist(), GetNofStsTracks(), CbmTimesliceManager::GotoEvent(), CbmTimeslicePixelHitSetDraw::GotoEvent(), CbmTimesliceRecoTracks::GotoEvent(), CbmTsDisTofTracklets::GotoEvent(), cbm::ca::TimeSliceReader::ReadHits(), cbm::ca::TimeSliceReader::ReadRecoTracks(), and ToString().
size_t CbmEvent::GetNofData | ( | ECbmDataType | type | ) | const |
Get number of data objects of a given type in this event
DataType | Type 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.
|
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().
|
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().
|
inline |
Get event start time @value Start time of event [ns]
Definition at line 140 of file CbmEvent.h.
References fTimeStart.
Referenced by CbmRichMCbmQaReal::analyseRing(), CbmRichMCbmQaRichOnly::analyseRing(), compareEventDataMembers(), CbmRichMCbmSEDisplay::DrawEvent(), CbmRichMCbmQaReal::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmRecoQaTask::FilterEvent(), CbmRecoQaTask::View::Load(), and CbmSimEventHeaderConverter::ProcessData().
|
inline |
Get STS track index
iTrack | Running 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().
|
inline |
Get t0 @value Reconstructed t0 [ns]
Definition at line 146 of file CbmEvent.h.
References fTzero.
Referenced by CbmTimesliceManager::GetEventTime(), and CbmKFParticleFinderPID::SetRecoPID().
|
inline |
Get event vertex @value Pointer to vertex object
Definition at line 210 of file CbmEvent.h.
References fVertex.
Referenced by compareEventDataMembers().
|
inline |
Set end time
endTime | End time of event [ns] |
Definition at line 157 of file CbmEvent.h.
References fTimeEnd.
Referenced by CbmMcbm2018EventBuilder::BuildEvents(), CbmAlgoBuildRawEvents::CheckSeed(), CbmMcbm2019TimeWinEventBuilderAlgo::CheckSeed(), CbmBuildEventsIdeal::Exec(), CbmAlgoBuildRawEvents::ProcessTs(), and CbmMcbm2019TimeWinEventBuilderAlgo::ProcessTs().
|
inline |
Set a match object
match | Pointer to a match object |
Definition at line 163 of file CbmEvent.h.
References fMatch.
|
inline |
Set event number @value Event number
Definition at line 152 of file CbmEvent.h.
References fNumber.
Referenced by CbmBuildEventsIdeal::Exec().
|
inline |
Set start time
endTime | Start time of event [ns] |
Definition at line 169 of file CbmEvent.h.
References fTimeStart.
Referenced by CbmBuildEventsIdeal::Exec(), and TEST().
|
inline |
Sets the index array for STS tracks. Old content will be overwritten.
Set the STS track index array
indexVector | Vector with indices of STS tracks |
Definition at line 183 of file CbmEvent.h.
References fIndexMap, and kStsTrack.
Referenced by CbmBuildEventsFromTracksIdeal::Exec(), and CbmBuildEventsFromTracksReal::Exec().
|
inline |
Set t0
tZero | Bmon measurement [ns] |
Definition at line 175 of file CbmEvent.h.
References fTzero.
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
x | x coordinate [cm] |
y | y coordinate [cm] |
z | z coordinate [cm] |
chi2 | chi square of vertex fit |
ndf | Number of degrees of freedom of vertex fit |
nTracks | Number of tracks used for vertex fit |
covMat | Covariance Matrix (symmetric, 3x3) |
Definition at line 76 of file CbmEvent.cxx.
References fVertex, CbmVertex::SetVertex(), x, and y.
Referenced by TEST().
void CbmEvent::SortIndices | ( | ) |
Sort the indices from smallest to biffest for each data type
Definition at line 109 of file CbmEvent.cxx.
References fIndexMap.
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().
std::string CbmEvent::ToString | ( | ) | const |
String output
Definition at line 96 of file CbmEvent.cxx.
References fIndexMap, fMatch, fNumber, fTimeStart, and GetNofData().
Referenced by CbmBuildEventsIdeal::Exec(), CbmHadronAnalysis::Exec(), CbmMcbm2018EventBuilder::FillOutput(), CbmMcbm2019TimeWinEventBuilderTask::FillOutput(), CbmTaskBuildRawEvents::FillOutput(), CbmDeviceBuildRawEvents::SendEvents(), and CbmDeviceMcbmEventBuilderWin::SendEvents().
|
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().
|
private |
Match object to MCEvent.
Definition at line 222 of file CbmEvent.h.
Referenced by CbmEvent(), GetMatch(), SetMatch(), Swap(), ToString(), and ~CbmEvent().
|
private |
Event number.
Event meta data
Definition at line 217 of file CbmEvent.h.
Referenced by GetNumber(), SetNumber(), Swap(), and ToString().
|
private |
Event end time [ns].
Definition at line 219 of file CbmEvent.h.
Referenced by GetEndTime(), SetEndTime(), and Swap().
|
private |
Event start time [ns].
Definition at line 218 of file CbmEvent.h.
Referenced by GetStartTime(), SetStartTime(), Swap(), and ToString().
|
private |
Bmon of event for TOF PID [ns].
Definition at line 220 of file CbmEvent.h.
Referenced by GetTzero(), and SetTzero().
|
private |
Primary Vertex.
Definition at line 221 of file CbmEvent.h.
Referenced by GetVertex(), SetVertex(), and Swap().