1 #include "AnalysisAlgorithm.hxx" 4 bool _allowNonExclusiveSelections =
false;
12 _selManager = &(ana->sel());
19 _categManager = &(ana->cat());
20 _docManager = &(ana->doc());
37 anaUtils::_categ = &cat();
39 for (UInt_t i=0;i<NMAXSELECTIONS;i++)
66 std::cout <<
"ERROR. AnalysisAlgorithm::UseAnalysis() cannot be called after setting some analysis dependent parameters" << std::endl;
78 for (std::vector<SelectionBase*>::iterator it=sel().GetSelections().begin();it!=sel().
GetSelections().end();it++){
89 _analysisPoint = point;
93 (*it)->SetAnalysisPoint(point);
109 (*it)->SetMinAccumCutLevelToSave(level);
141 (*it)->SetToyBox(box, isel);
146 const ToyBoxB& AnalysisAlgorithm::boxB(Int_t isel)
const{
149 if (_analysisPoint == kFillTruthTree){
150 std::cout <<
"ERROR. AnalysisAlgorithm::boxB(). The ToyBox cannot be accessed from FillTruthTree method !!!" << std::endl;
156 std::cout <<
"ERROR. AnalysisAlgorithm::boxB(). No ToyBox exist for selection 0. Probably because no selection has been added to the manager !!!" << std::endl;
178 (*it)->SetSelectedSelection(sel);
191 static bool first =
true;
193 Int_t maxAccumLevel=-1;
196 for (std::vector<SelectionBase*>::iterator it=sel().GetSelections().begin();it!=sel().
GetSelections().end();it++){
198 if (!selec->IsEnabled())
continue;
221 std::cout <<
"AnalysisAlgorithm::FinalizeToyBase(). Selections are not mutually exclusive !!! Run/Subrun/Event/Bunch " 224 <<
" Results for first selection being passed will be saved in micro-trees for this event. " << std::endl;
225 if (!_allowNonExclusiveSelections){
226 std::cout <<
"Non exclusive selections are in general problematic. THE PROGRAM WILL STOP NOW !!!!" << std::endl;
227 std::cout <<
"Set '_allowNonExclusiveSelections=true' at the begining of highlandTools/vXrY/src/AnalysisAlgorithm.cxx to allow non-exclusive selections" << std::endl;
EventVariationManager * _variationManager
EventVariation Manager.
void SetSelectedSelection(Int_t sel)
Select one of the selections.
void SetMinAccumCutLevelToSave(Int_t level)
Set the minimum accumulated cut level to save an event into the micro-tree.
const std::string & Name() const
Return the name of this selection.
ConfigurationManager * _confManager
Configuration Manager.
bool _setMethodCalled
Boolean parameter to know whether nny of the methods that sets things into used analysis has been cal...
void SetToyBox(const ToyBoxB *box, Int_t isel=0)
Set the current box into the algorithm and all used algorithms. This is useful when one Analysis uses...
Int_t _selectedSelection
The selected selection.
const ToyBoxB & GetPreviousToyBox(const AnaEventC &event) const
Get the ToyBox of the last processed toy for a particular event.
const ToyBoxB * _box[NMAXSELECTIONS]
The analysis box.
void SetEvent(AnaEventC *event)
Set the current event into the algorithm and all used algorithms.
std::vector< SelectionBase * > & GetSelections()
Return the map of selections.
OutputManager * _outputManager
Output Manager.
AnaEventC * _event
The current event.
HighlandInputManager * _inputManager
Input Manager: access to the current Event.
The maximum number of systematics that is supported.
AnalysisAlgorithm(AnalysisAlgorithm *ana=NULL)
bool _fillSuccessOnly
Fill trees and process weight systematics only when any of the branches is succesful.
CorrectionManager * _corrManager
Correction Manager.
Int_t SuccessfulBranch
The branch that is successful for this toy in the selection this ToyBox belongs to.
SystematicManager * _systManager
Systematics Manager.
void SetAnalysisPoint(enumAnalysisPoint point)
Set the point of the analysis at which AnalysisLoop is.
Int_t _min_accum_cut_level
the minimum accumulated cut level to save an event into the micro-tree
EventWeightManager * _weightManager
EventWeight Manager.
std::vector< AnalysisAlgorithm * > _usedAnalyses
The Vector of used analysis.
bool CheckAccumLevelToSave()
Check if the condition is fulfilled for at least one branch.
void UseAnalysis(AnalysisAlgorithm *ana)
Used a given analysis.
Int_t GetMinAccumCutLevelToSave()
Get the minimum accumulated cut level to save an event into the micro-tree.
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...
void FinalizeToyBase()
[AnalysisAlgorithm_mandatory]
virtual std::string GetEventInfoString() const
User-frienly method to get event info (run,subrun,etc)
bool _initializeTrees
Initialize trees at the beginning of each configuration.
Int_t GetMaxAccumCutLevel() const
Get the maximum cut level for this event and the last processed toy.
Int_t GetEnabledIndex() const
Get the Selection index.