CbmRoot
|
Class characterising one event by a collection of links (indices) to data objects,. More...
#include <CbmEvent.h>
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) |
CbmMatch * | GetMatch () 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 |
CbmVertex * | GetVertex () |
Private Member Functions | |
CbmEvent (const CbmEvent &) | |
CbmEvent & | operator= (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... | |
CbmMatch * | fMatch |
Match object to MCEvent. More... | |
std::map< ECbmDataType, std::vector< UInt_t > > | fIndexMap |
Class characterising one event by a collection of links (indices) to data objects,.
Definition at line 30 of file CbmEvent.h.
|
inline |
Default constructor
Definition at line 34 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 41 of file CbmEvent.h.
|
default |
|
inlinevirtual |
|
private |
void CbmEvent::AddData | ( | ECbmDataType | type, |
UInt_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 15 of file CbmEvent.cxx.
References fIndexMap, and fNofData.
Referenced by CbmMcbm2018EventBuilder::AddDigiToEvent(), CbmMcbm2019TimeWinEventBuilderAlgo::AddDigiToEvent(), AddStsTrack(), CbmTofFindTracks::Exec(), CbmTofEventClusterizer::Exec(), and CbmBuildEventsSimple::FillEvent().
|
inline |
Add an STS track to the event
Index | of STS track in its TClonesArray |
Definition at line 72 of file CbmEvent.h.
|
private |
|
inline |
Overload TObject Clear to clear the map!
Definition at line 59 of file CbmEvent.h.
References fIndexMap.
|
inline |
Get event end time @value End time of event [ns]
Definition at line 125 of file CbmEvent.h.
References fTimeEnd.
Referenced by compareEventDataMembers().
UInt_t CbmEvent::GetIndex | ( | ECbmDataType | type, |
UInt_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 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().
|
inline |
Get match object @value Pointer to match object
Definition at line 86 of file CbmEvent.h.
References fMatch.
Referenced by compareEventDataMembers().
|
inline |
Get total number of data (of all types) in the event
Definition at line 90 of file CbmEvent.h.
References fNofData.
Referenced by CbmRichMCbmQaRichOnly::analyseRing(), CbmRichMCbmQaReal::analyseRing(), compareEventDataMembers(), compareEventMap(), CbmRichMCbmSEDisplay::DrawEvent(), CbmMvdDigiToHitTB::Exec(), CbmMvdClusterfinderTB::Exec(), CbmPsdMCbmQaReal::Exec(), CbmRichMCbmAerogelAna::Exec(), CbmRichMCbmQaRichOnly::Exec(), CbmRichMCbmQaReal::Exec(), CbmTofAnaTestbeam::Exec(), CbmEventBuilderQA::Exec(), CbmTofFindTracks::Exec(), CbmTofEventClusterizer::Exec(), CbmHadronAnalysis::Exec(), and GetNofStsTracks().
Int_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. -1 is data type is not registered. |
Definition at line 34 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 104 of file CbmEvent.h.
References GetNofData(), and kStsTrack.
|
inline |
Get event number @value Event number
Definition at line 110 of file CbmEvent.h.
References fNumber.
Referenced by CbmRichMCbmQaRichOnly::analyseRing(), and compareEventDataMembers().
|
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().
|
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 117 of file CbmEvent.h.
References GetIndex(), and kStsTrack.
Referenced by CbmEventBuilderQA::Exec().
|
inline |
Get event vertex @value Pointer to vertex object
Definition at line 189 of file CbmEvent.h.
References fVertex.
Referenced by compareEventDataMembers().
|
inline |
Set end time
endTime | End time of event [ns] |
Definition at line 137 of file CbmEvent.h.
References fTimeEnd.
Referenced by CbmMcbm2018EventBuilder::BuildEvents(), CbmMcbm2019TimeWinEventBuilderAlgo::CheckSeed(), and CbmMcbm2019TimeWinEventBuilderAlgo::ProcessTs().
|
inline |
Set a match object
match | Pointer to a match object |
Definition at line 143 of file CbmEvent.h.
References fMatch.
|
inline |
Set start time
endTime | Start time of event [ns] |
Definition at line 149 of file CbmEvent.h.
References fTimeStart.
|
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 157 of file CbmEvent.h.
References fIndexMap, fNofData, and kStsTrack.
Referenced by CbmBuildEventsFromTracksReal::Exec(), and CbmBuildEventsFromTracksIdeal::Exec().
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
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 45 of file CbmEvent.cxx.
References fVertex, CbmVertex::SetVertex(), x, and y.
Referenced by TEST().
std::string CbmEvent::ToString | ( | ) | const |
String output
Definition at line 58 of file CbmEvent.cxx.
References fIndexMap, fMatch, fNofData, fNumber, and fTimeStart.
|
private |
Arrays of indices to data types
Definition at line 202 of file CbmEvent.h.
Referenced by AddData(), Clear(), GetIndex(), GetNofData(), SetStsTracks(), and ToString().
|
private |
Match object to MCEvent.
Definition at line 199 of file CbmEvent.h.
Referenced by GetMatch(), SetMatch(), ToString(), and ~CbmEvent().
|
private |
Number of data objects in the event.
Definition at line 197 of file CbmEvent.h.
Referenced by AddData(), GetNofData(), SetStsTracks(), and ToString().
|
private |
Event number.
Event meta data
Definition at line 194 of file CbmEvent.h.
Referenced by GetNumber(), and ToString().
|
private |
Event end time [ns].
Definition at line 196 of file CbmEvent.h.
Referenced by GetEndTime(), and SetEndTime().
|
private |
Event start time [ns].
Definition at line 195 of file CbmEvent.h.
Referenced by GetStartTime(), SetStartTime(), and ToString().
|
private |
Primary Vertex.
Definition at line 198 of file CbmEvent.h.
Referenced by GetVertex(), and SetVertex().