CbmRoot
|
Class deciding whether to store an MC event. More...
#include <CbmMCEventFilter.h>
Public Member Functions | |
CbmMCEventFilter () | |
virtual | ~CbmMCEventFilter () |
Destructor. More... | |
Int_t | GetNofInputEvents () const |
Number of processed events. More... | |
void | SetMinNofData (ECbmDataType type, Int_t value) |
Set a cut on the minimum number of data of a given type. More... | |
Protected Member Functions | |
TObject * | GetData (ECbmDataType type, Int_t index) const |
Get a data object by index. More... | |
Int_t | GetNofData (ECbmDataType type) const |
Number of data in a branch. More... | |
Bool_t | SelectEvent () const |
Event selector method. More... | |
Private Member Functions | |
virtual void | Exec (Option_t *) |
Execution. More... | |
virtual void | Finish () |
Finish (end of run) More... | |
virtual InitStatus | Init () |
Initialisation. More... | |
void | GetBranch (ECbmDataType type) |
Get a branch from FairRootManager. More... | |
std::string | Statistics () const |
Info on number of MC objects in the arrays. More... | |
TString | GetBranchName (ECbmDataType type) const |
Get branch name from data type. More... | |
ClassDef (CbmMCEventFilter, 2) | |
Private Attributes | |
std::map< ECbmDataType, TClonesArray * > | fData |
std::map< ECbmDataType, Int_t > | fMinNofData |
Data arrays. More... | |
Int_t | fNofEventsIn |
Counter: input events. More... | |
Int_t | fNofEventsOut |
Counter: output events. More... | |
Class deciding whether to store an MC event.
The event selection is performed in the method SelectEvent() (nomen est omen...). If this method returns false, the event will not be filled to the output tree.
SelectEvent() can be re-implemented in derived classes. Here, the selection is based on the number of MC data objects (MCTrack, MCPoints), on which the user can specify a minimum by SetMinNofObjects.
Definition at line 34 of file CbmMCEventFilter.h.
CbmMCEventFilter::CbmMCEventFilter | ( | ) |
brief Constructor
Definition at line 18 of file CbmMCEventFilter.cxx.
|
inlinevirtual |
Destructor.
Definition at line 42 of file CbmMCEventFilter.h.
|
private |
|
privatevirtual |
Execution.
Sets the storage of current event in FairMCApplication according to the outcome of SeelectEvent().
Definition at line 36 of file CbmMCEventFilter.cxx.
References fNofEventsIn, fNofEventsOut, and SelectEvent().
|
privatevirtual |
Finish (end of run)
Prints event statistics
Definition at line 54 of file CbmMCEventFilter.cxx.
References fNofEventsIn, and fNofEventsOut.
|
private |
Get a branch from FairRootManager.
type | CBM data type |
Definition at line 84 of file CbmMCEventFilter.cxx.
References fData, and GetBranchName().
Referenced by Init().
|
private |
Get branch name from data type.
type | CBM data type |
Definition at line 101 of file CbmMCEventFilter.cxx.
References kMCTrack, kMuchPoint, kMvdPoint, kPsdPoint, kRichPoint, kStsPoint, kTofPoint, and kTrdPoint.
Referenced by GetBranch(), and SelectEvent().
|
protected |
Get a data object by index.
type | CBM data type |
index | Index in data array |
Definition at line 28 of file CbmMCEventFilter.cxx.
References fData, and GetNofData().
|
inlineprotected |
Number of data in a branch.
type | CBM data type |
Definition at line 75 of file CbmMCEventFilter.h.
References fData.
Referenced by GetData(), SelectEvent(), and Statistics().
|
inline |
Number of processed events.
Definition at line 48 of file CbmMCEventFilter.h.
References fNofEventsIn.
|
privatevirtual |
Initialisation.
Gets MC data branches from FairRootManager
Definition at line 67 of file CbmMCEventFilter.cxx.
References GetBranch(), kMCTrack, kMuchPoint, kMvdPoint, kPsdPoint, kRichPoint, kStsPoint, kTofPoint, and kTrdPoint.
|
protected |
Event selector method.
Definition at line 122 of file CbmMCEventFilter.cxx.
References fMinNofData, GetBranchName(), GetNofData(), and Statistics().
Referenced by Exec().
|
inline |
Set a cut on the minimum number of data of a given type.
type | CBM data type |
value | Minimum for number of objects in array |
In case cuts are defined for more than one data type, they are logically additive (each of them has to be passed).
Definition at line 58 of file CbmMCEventFilter.h.
References fMinNofData.
|
private |
Info on number of MC objects in the arrays.
Definition at line 142 of file CbmMCEventFilter.cxx.
References fData, GetNofData(), kMCTrack, kMuchPoint, kMvdPoint, kPsdPoint, kRichPoint, kStsPoint, kTofPoint, and kTrdPoint.
Referenced by SelectEvent().
|
private |
Definition at line 87 of file CbmMCEventFilter.h.
Referenced by GetBranch(), GetData(), GetNofData(), and Statistics().
|
private |
Data arrays.
Cut values
Definition at line 89 of file CbmMCEventFilter.h.
Referenced by SelectEvent(), and SetMinNofData().
|
private |
Counter: input events.
Definition at line 90 of file CbmMCEventFilter.h.
Referenced by Exec(), Finish(), and GetNofInputEvents().
|
private |
Counter: output events.
Definition at line 91 of file CbmMCEventFilter.h.