HighLAND
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
baseAnalysis Class Referenceabstract

#include <baseAnalysis.hxx>

Inheritance diagram for baseAnalysis:
AnalysisAlgorithm baseP0DAnalysis baseTrackerAnalysis p0dExampleAnalysis antiNumuCCAnalysis gammaAnalysis nueCCAnalysis numuBkgInAntiNuModeAnalysis numuCC4piAnalysis numuCCAnalysis numuCCMultiPiAnalysis numuCCMultiTargetAnalysis p0dNumuCCAnalysis p0dNumuCCQEAnalysis tutorialAnalysis useTutorialAnalysis

Public Types

enum  enumStandardMicroTrees_baseAnalysis {
  run = enumStandardMicroTreesLast_AnalysisAlgorithm+1, subrun, evt, evt_time,
  bunch, NWEIGHTS, weight, TruthVertexID,
  TruthVertexNB, RooVtxIndex, RooVtxEntry, RooVtxEntry2,
  RooVtxFile, nu_pdg, nu_trueE, nu_truereac,
  nu_truedir, truelepton_mom, truelepton_costheta, truelepton_dir,
  truevtx_pos, selvtx_det, selvtx_pos, selvtx_truepos,
  true_signal, weight_syst_total_noflux, enumStandardMicroTreesLast_baseAnalysis
}
 
enum  enumConf_baseAnalysis {
  sipion_syst =ConfigurationManager::enumConfLast_ConfigurationManager+1, siproton_syst, nuflux_syst, antinuflux_syst,
  all_syst, zero_var, enumConfLast_baseAnalysis
}
 
- Public Types inherited from AnalysisAlgorithm
enum  enumAnalysisPoint {
  kInitialize =0, kDefineProductions, kDefineInputConverters, kDefineSelections,
  kDefineCorrections, kDefineSystematics, kDefineConfigurations, kDefineMicroTrees,
  kDefineTruthTree, kFillConfigTree, kInitializeSpill, kInitializeBunch,
  kInitializeConfiguration, kInitializeToy, kInitializeSelection, kFinalizeSelection,
  kFinalizeToy, kFillToyVarsInMicroTrees, kFinalizeConfiguration, kFillCategories,
  kFillMicroTrees, kFinalizeBunch, kFillTruthTree, kFinalizeSpill,
  kFinalize
}
 
enum  enumStandardMicroTrees_AnalysisAlgorithm {
  firstCategory = OutputManager::enumStandardMicroTreesLast_OutputManager+1, firstCategoryCounter = firstCategory+NMAXCATEG, entry = firstCategoryCounter + NMAXCATEGCOUNTERS, toy_ref,
  toy_index, toy_par_weight, toy_par_var, NWEIGHTSYST,
  weight_syst, weight_syst_total, weight_corr, weight_corr_total,
  redo, accum_level, first_cut, last_cut =first_cut+NMAXSTEPS,
  enumStandardMicroTreesLast_AnalysisAlgorithm
}
 
enum  enumConfigTree_AnalysisAlgorithm {
  SoftwareVersion =0, HOSTNAME, CMTPATH, INPUTFILE,
  OriginalFile, MinAccumLevelToSave, enumConfigTreeLast_AnalysisAlgorithm
}
 

Public Member Functions

 baseAnalysis (AnalysisAlgorithm *ana=NULL)
 
virtual bool Initialize ()
 [AnalysisAlgorithm_mandatory]
 
virtual bool InitializeSpill ()
 
virtual bool FinalizeConfiguration ()
 
virtual void DefineProductions ()
 
virtual void DefineInputConverters ()
 
virtual void DefineCorrections ()
 
virtual void DefineSystematics ()
 
virtual void DefineConfigurations ()
 
virtual void DefineMicroTrees (bool addBase=true)
 
virtual void DefineTruthTree ()
 
virtual bool CheckFillTruthTree (const AnaTrueVertex &vtx)=0
 
virtual void FillTruthTree (const AnaTrueVertex &vtx)=0
 
void FillMicroTreesBase (bool addBase=true)
 
void FillToyVarsInMicroTreesBase (bool addBase=true)
 
void FillTruthTree ()
 
void FillTruthTreeBase (const AnaTrueVertex &vtx, const SubDetId::SubDetEnum det=SubDetId::kFGD1, bool IsAntinu=false)
 
AnaSpillGetSpill ()
 Get a casted AnaSpillC to AnaSpill from the InputManager.
 
AnaBunchGetBunch ()
 Get a casted AnaBunchBB to AnaBunch from the InputManager (TODO the protection)
 
AnaEventGetEvent ()
 Get a casted AnaEventC to AnaEvent.
 
virtual AnaEventCMakeEvent ()
 Create the appropriate event time from an Spill and a Bunch in that spill.
 
virtual AnaVertexBGetVertex () const =0
 
virtual AnaTrueVertexBGetTrueVertex () const =0
 
void SetSaveRooTracker (bool save)
 Set whether to save the RooTrackerVtx tree or not.
 
void SetRooVtxManager (RooTrackerVtxManager *man)
 Set the RooTrackerVtxManager.
 
- Public Member Functions inherited from AnalysisAlgorithm
 AnalysisAlgorithm (AnalysisAlgorithm *ana=NULL)
 
virtual void Finalize ()
 [AnalysisAlgorithm_optional]
 
virtual void FinalizeSpill ()
 
virtual void InitializeBunch ()
 
virtual void FinalizeBunch ()
 
virtual void InitializeConfiguration ()
 
virtual void InitializeToy ()
 
virtual void FinalizeToy ()
 
virtual void InitializeSelection (const SelectionBase &)
 
virtual void FinalizeSelection (const SelectionBase &)
 
virtual void FillCategories ()
 
virtual void FillConfigTree ()
 
virtual void DefineSelections ()=0
 
virtual void FillMicroTrees (bool addBase=true)=0
 
virtual void FillToyVarsInMicroTrees (bool addBase=true)=0
 
void FinalizeToyBase ()
 [AnalysisAlgorithm_mandatory] More...
 
void SetFillSuccessOnly (bool fill)
 Fill trees and process weight systematics only when any of the branches is successful.
 
bool GetFillSuccessOnly ()
 
void SetInitializeTrees (bool ini)
 Initialize trees at the beginning of each configuration.
 
bool GetInitializeTrees ()
 
void SetMinAccumCutLevelToSave (Int_t level)
 Set the minimum accumulated cut level to save an event into the micro-tree.
 
Int_t GetMinAccumCutLevelToSave ()
 Get the minimum accumulated cut level to save an event into the micro-tree.
 
bool CheckAccumLevelToSave ()
 Check if the condition is fulfilled for at least one branch.
 
void SetEvent (AnaEventC *event)
 Set the current event into the algorithm and all used algorithms.
 
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 another.
 
void UseAnalysis (AnalysisAlgorithm *ana)
 Used a given analysis.
 
void SetSelectedSelection (Int_t sel)
 Select one of the selections.
 
void SetVersionCheck (bool check)
 Set version checking.
 
void SetAnalysisPoint (enumAnalysisPoint point)
 Set the point of the analysis at which AnalysisLoop is.
 
HighlandInputManagerinput ()
 
SelectionManagersel ()
 
CorrectionManagercorr ()
 
SystematicManagersyst ()
 
EventWeightManagereweight ()
 
EventVariationManagerevar ()
 
OutputManageroutput ()
 
ConfigurationManagerconf ()
 
CategoryManagercat ()
 
DocStringManagerdoc ()
 
virtual const ToyBoxBboxB (Int_t isel=-1) const
 

Protected Member Functions

void AddZeroVarConfiguration ()
 

Protected Attributes

RooTrackerVtxManager_rooVtxManager
 the manager of the RooTrackerVtx
 
bool _saveRooTrackerVtxTree
 Save RooTracker tree in output file.
 
FluxWeighting_flux
 Access to the flux weighting.
 
bool _applyFluxWeight
 Flag to enable/disable flux weight.
 
std::string _fluxFile
 Flux file and option.
 
std::string _fluxTuning
 
bool _enableSingleVariationSystConf
 
bool _enableSingleWeightSystConf
 
bool _enableAllSystConfig
 
bool _enableZeroVarConfig
 
Int_t _ntoys
 
Int_t _randomSeed
 
- Protected Attributes inherited from AnalysisAlgorithm
HighlandInputManager_inputManager
 Input Manager: access to the current Event.
 
CorrectionManager_corrManager
 Correction Manager.
 
SystematicManager_systManager
 Systematics Manager.
 
EventWeightManager_weightManager
 EventWeight Manager.
 
EventVariationManager_variationManager
 EventVariation Manager.
 
OutputManager_outputManager
 Output Manager.
 
ConfigurationManager_confManager
 Configuration Manager.
 
SelectionManager_selManager
 
CategoryManager_categManager
 
DocStringManager_docManager
 
const ToyBoxB_box [NMAXSELECTIONS]
 The analysis box.
 
Int_t _min_accum_cut_level
 the minimum accumulated cut level to save an event into the micro-tree
 
bool _fillSuccessOnly
 Fill trees and process weight systematics only when any of the branches is succesful.
 
bool _initializeTrees
 Initialize trees at the beginning of each configuration.
 
AnaEventC_event
 The current event.
 
std::vector< AnalysisAlgorithm * > _usedAnalyses
 The Vector of used analysis.
 
Int_t _selectedSelection
 The selected selection.
 
bool _setMethodCalled
 Boolean parameter to know whether nny of the methods that sets things into used analysis has been called.
 
bool _versionCheck
 
enumAnalysisPoint _analysisPoint
 

Detailed Description

This class provides a base for user analyses. It handles many common functions, and provides a structure so that users don't have to write too much "boiler-plate" code.

User analyses should inherit from this class.

Definition at line 24 of file baseAnalysis.hxx.

Constructor & Destructor Documentation

§ baseAnalysis()

baseAnalysis::baseAnalysis ( AnalysisAlgorithm ana = NULL)

Constructor, which instantiates the necessary converters for converting input files to the AnaSpill format.

TODO

Definition at line 20 of file baseAnalysis.cxx.

20  : AnalysisAlgorithm(ana){
21  //********************************************************************
22 
23  // Add the package version
24  // Add package versions
25  ND::versioning().AddPackage("psychePolicy", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHEPOLICYROOT")));
26  ND::versioning().AddPackage("psycheEventModel", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHEEVENTMODELROOT")));
27  ND::versioning().AddPackage("psycheCore", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHECOREROOT")));
28  ND::versioning().AddPackage("psycheUtils", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHEUTILSROOT")));
29  ND::versioning().AddPackage("psycheND280Utils", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHEND280UTILSROOT")));
30  ND::versioning().AddPackage("psycheIO", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHEIOROOT")));
31  ND::versioning().AddPackage("psycheSelections", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHESELECTIONSROOT")));
32  ND::versioning().AddPackage("psycheSystematics", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("PSYCHESYSTEMATICSROOT")));
33  ND::versioning().AddPackage("highlandEventModel", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("HIGHLANDEVENTMODELROOT")));
34  ND::versioning().AddPackage("highlandTools", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("HIGHLANDTOOLSROOT")));
35  ND::versioning().AddPackage("highlandCore", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("HIGHLANDCOREROOT")));
36  ND::versioning().AddPackage("highlandCorrections", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("HIGHLANDCORRECTIONSROOT")));
37  ND::versioning().AddPackage("highlandIO", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("HIGHLANDIOROOT")));
38 
39  ND::versioning().AddPackage("baseAnalysis", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("BASEANALYSISROOT")));
40 
41  /// TODO
42  versionUtils::prod6_POT = false;
43 #if VERSION_HAS_OFFICIAL_POT
44  versionUtils::prod6_POT = true;
45 #endif
46 }
void AddPackage(const std::string &name, const std::string &version)
Add a package.
std::string GetSoftwareVersionFromPath(const std::string &path)
Get The software version from the path of the package.
AnalysisAlgorithm(AnalysisAlgorithm *ana=NULL)

Member Data Documentation

§ _enableZeroVarConfig

bool baseAnalysis::_enableZeroVarConfig
protected

Whether to use zero-variation configuration: no variation will be applied to systematics, i.e. those relevant will work as correction

Definition at line 116 of file baseAnalysis.hxx.


The documentation for this class was generated from the following files: