HighLAND
|
#include <SelectionManager.hxx>
Public Member Functions | |
SelectionBase * | GetSelection (const std::string &name, bool print_error=true) |
Return the selection that was registered with the given name. NULL if it does not exist. | |
SelectionBase * | GetSelection (Int_t, bool print_error=true) |
Return the selection that was registered with the given index. NULL if it does not exist. | |
void | AddSelection (const std::string &name, const std::string &title, SelectionBase *sel, Int_t presel=-1) |
Add a user selection to the selection manager. | |
bool | ApplySelection (const std::string &name, AnaEventC &event, bool &redo) |
Apply the selection that was registered with the given name. | |
std::vector< SelectionBase * > & | GetSelections () |
Return the map of selections. | |
void | DisableSelection (const std::string &sel) |
Disable a selection. | |
void | EnableSelection (const std::string &sel) |
Enable a selection. | |
void | ReadSelections (const std::string &file) |
void | DumpSelections () |
Print out the index, name and title of each selection for a given branch (no argument for all branches) | |
void | PrintStatistics () |
Print #events passing cuts. More... | |
UInt_t | GetNEnabledSelections () |
Returns the number of enabled selections. | |
UInt_t | GetNMaxBranches () |
Returns the maximum number of branches in all selections. | |
UInt_t | GetNMaxCuts () |
Returns the maximum number of cuts in all selections. | |
void | SetForceFillEventSummary (bool force) |
void | SetValidRunPeriods (const std::string &ssel1, const std::string validRunPeriods) |
Method to set the valid run periods for this selection (e.g. Anti-neutrino selections should only be valid when looking at anti-neutrino data or MC) | |
bool | PreSelectionPassed (const AnaEventC &event) |
Chek if preselection cuts have been passed;. | |
void | InitializeEvent (AnaEventC &event) |
Initialize the EventBox for all enabled selections. | |
void | CreateToyBoxArray (Int_t nevents) |
Create the array of PreviousToyBox for all enabled selections. | |
void | FinalizeEvent (const AnaEventC &event) |
Delete the PreviousToyBox pointer for the last toy of the event for all enabled selections. | |
![]() | |
HLClonesArray (const std::string &tree_name, const std::string &tcarray_name, const std::string &class_name, const UInt_t size) | |
void | ReadClonesArray (const std::string &file) |
void | WriteClonesArray (TTree &tree) |
Int_t & | GetNObjects () |
Return the number of steps that have been added. | |
TClonesArray * | GetClonesArray () |
const std::string & | GetClonesArrayName () const |
Return the name of the TClonesArray. | |
const std::string & | GetTreeName () const |
Return the name of the tree. | |
Protected Attributes | |
std::vector< SelectionBase * > | _eventSelections |
Internal storage fo the selections that were added. | |
UInt_t | _nMaxBranches |
maximum number of branches | |
UInt_t | _nMaxCuts |
maximum number of cuts | |
UInt_t | _nEnabledSelections |
number of enabled selections | |
![]() | |
TChain * | _chain |
TChain used to read the "config" tree from the output file. | |
Int_t | _NObjects |
The number of steps that were added. | |
TClonesArray * | _objects |
std::string | _tcArrayName |
Name of the TClonesArray in the tree. | |
std::string | _treeName |
Name of the Tree. | |
std::string | _fileName |
Name of the last file read. | |
This class holds a collection of SelectionBase. It allows us to have multiple selections
Definition at line 10 of file SelectionManager.hxx.
void SelectionManager::PrintStatistics | ( | ) |
Print #events passing cuts.
Loop over selections
Definition at line 200 of file SelectionManager.cxx.
void SelectionManager::ReadSelections | ( | const std::string & | file | ) |
Read the "config" tree from the given file, to read the selections that were used when running the analysis. This is used so we can access the selections in the DrawingTools.
Definition at line 139 of file SelectionManager.cxx.
void SelectionManager::SetForceFillEventSummary | ( | bool | force | ) |
By default EventSummary class is created and filled when the selection is passed. But this might be necessary also for events not passing the selection The user can force the EventSummary to be filled always. This function enables/disables this option for all selections in the manager
Definition at line 247 of file SelectionManager.cxx.