CbmRoot
|
Class deciding whether to store an MC event. More...
#include <CbmMCEventFilter.h>
Public Member Functions | |
CbmMCEventFilter () | |
virtual | ~CbmMCEventFilter () |
Destructor. | |
Int_t | GetNofInputEvents () const |
Number of processed events. | |
void | SetMinNofData (ECbmDataType type, Int_t value) |
Set a cut on the minimum number of data of a given type. | |
Protected Member Functions | |
TObject * | GetData (ECbmDataType type, Int_t index) const |
Get a data object by index. | |
Int_t | GetNofData (ECbmDataType type) const |
Number of data in a branch. | |
Bool_t | SelectEvent () const |
Event selector method. | |
Private Member Functions | |
virtual void | Exec (Option_t *) |
Execution. | |
virtual void | Finish () |
Finish (end of run) | |
virtual InitStatus | Init () |
Initialisation. | |
void | GetBranch (ECbmDataType type) |
Get a branch from FairRootManager. | |
std::string | Statistics () const |
Info on number of MC objects in the arrays. | |
TString | GetBranchName (ECbmDataType type) const |
Get branch name from data type. | |
ClassDef (CbmMCEventFilter, 2) | |
Private Attributes | |
std::map< ECbmDataType, TClonesArray * > | fData |
std::map< ECbmDataType, Int_t > | fMinNofData |
Data arrays. | |
Int_t | fNofEventsIn |
Counter: input events. | |
Int_t | fNofEventsOut |
Counter: output events. | |
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 41 of file CbmMCEventFilter.h.
CbmMCEventFilter::CbmMCEventFilter | ( | ) |
brief Constructor
Definition at line 24 of file CbmMCEventFilter.cxx.
|
inlinevirtual |
Destructor.
Definition at line 49 of file CbmMCEventFilter.h.
|
private |
|
privatevirtual |
Execution.
Sets the storage of current event in FairMCApplication according to the outcome of SeelectEvent().
Definition at line 45 of file CbmMCEventFilter.cxx.
References fNofEventsIn, fNofEventsOut, and SelectEvent().
|
privatevirtual |
Finish (end of run)
Prints event statistics
Definition at line 62 of file CbmMCEventFilter.cxx.
References fNofEventsIn, and fNofEventsOut.
|
private |
Get a branch from FairRootManager.
type | CBM data type |
Definition at line 94 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 110 of file CbmMCEventFilter.cxx.
References kFsdPoint, 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 36 of file CbmMCEventFilter.cxx.
References fData, and GetNofData().
|
inlineprotected |
Number of data in a branch.
type | CBM data type |
Definition at line 80 of file CbmMCEventFilter.h.
References fData.
Referenced by GetData(), SelectEvent(), and Statistics().
|
inline |
Number of processed events.
Definition at line 55 of file CbmMCEventFilter.h.
References fNofEventsIn.
|
privatevirtual |
Initialisation.
Gets MC data branches from FairRootManager
Definition at line 75 of file CbmMCEventFilter.cxx.
References GetBranch(), kFsdPoint, kMCTrack, kMuchPoint, kMvdPoint, kPsdPoint, kRichPoint, kStsPoint, kTofPoint, and kTrdPoint.
|
protected |
Event selector method.
Definition at line 133 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 65 of file CbmMCEventFilter.h.
References fMinNofData.
|
private |
Info on number of MC objects in the arrays.
Definition at line 153 of file CbmMCEventFilter.cxx.
References fData, GetNofData(), kFsdPoint, kMCTrack, kMuchPoint, kMvdPoint, kPsdPoint, kRichPoint, kStsPoint, kTofPoint, and kTrdPoint.
Referenced by SelectEvent().
|
private |
Definition at line 93 of file CbmMCEventFilter.h.
Referenced by GetBranch(), GetData(), GetNofData(), and Statistics().
|
private |
Data arrays.
Cut values
Definition at line 95 of file CbmMCEventFilter.h.
Referenced by SelectEvent(), and SetMinNofData().
|
private |
Counter: input events.
Definition at line 96 of file CbmMCEventFilter.h.
Referenced by Exec(), Finish(), and GetNofInputEvents().
|
private |
Counter: output events.
Definition at line 97 of file CbmMCEventFilter.h.