1 #ifndef AnalysisManager_hxx_seen 2 #define AnalysisManager_hxx_seen 5 #include "SystematicManager.hxx" 6 #include "EventWeightManager.hxx" 7 #include "EventVariationManager.hxx" 8 #include "InputManager.hxx" 9 #include "SelectionManager.hxx" 10 #include "Experiment.hxx" 11 #include "FluxWeighting.hxx" 14 typedef std::string SelEnum;
15 typedef std::string SystEnum;
27 void DefineProduction();
28 void DefineInputConverters();
29 void DefineSelections();
30 void DefineSystematics();
73 bool ProcessEvent(
const ToyExperiment& toy,
AnaEventB& event, std::vector<Weight_h>& totalWeightSystVector, std::vector<Weight_h>& fluxWeightSystVector, Float_t& POTweight);
84 bool ReadEvents(
const std::string& inputFile, Int_t nmax=-1);
123 void PreloadEvents(
bool preloadData = 1,
bool preloadMC = 1);
124 bool PreloadMCEvents(std::vector<std::string> inputFiles, std::vector<float> POT_weights);
125 bool PreloadDataEvents(std::vector<std::string> inputFiles);
128 void CreateMCEventArray(Int_t nmax);
129 void CreateDataEventArray(Int_t nmax);
132 bool Initialize(Int_t nmax);
133 void InitialiseDataTChain();
134 void InitialiseMCTChain();
136 void ResetEventsProcessed();
196 std::vector<DataSample*>::iterator _currentSample;
200 std::vector<DataSample*> _samples;
221 std::string _fluxTuning;
222 std::string _fluxVersion;
bool ReadEvents(const std::string &inputFile, Int_t nmax=-1)
Read the specified number of events from the file and save them into an array. Default(-1) is all eve...
ToyExperiment _toy
The Toy Experiment.
bool _applyEventVariations
whether to apply detector event variation or not
This class is the Top level interface for the library.
SelectionManager _sel
An instance of the selection manager.
InputManager _input
An instance of the input manager.
std::vector< Float_t > _POT_weights
The POT weight for each MC file loaded into the Analysis Manager.
bool _applyFluxWeightSystematic
whether to apply Flux weight systematic or not
SystematicManager _syst
An instance of the systematic manager.
bool CheckSelectionAgainstRunPeriod(SelectionBase *selec, int RunPeriod)
EventVariationManager _var
An instance of the EventVariation manager.
UInt_t _nEventsInArray
the number of events in the array
void SetExperiment(Experiment *exp)
Sets the Experiment.
InputManager & input()
Returns the input manager.
bool _applyFluxWeight
Flag to enable/disable flux weight.
AnaEventB * GetNextEvent()
Returns The next Event.
AnaSuperEventB ** _dataEventArray
The array of preloaded Data events.
The maximum number of systematics that is supported.
bool LoadEvent(Long64_t &entry)
UInt_t _nEventsInMCArray
the number of events in the preloaded MC array
SelectionManager & sel()
Returns the selection manager.
Experiment * _exp
The Experiment.
EventVariationManager & evar()
Returns the EventVariation manager.
bool ProcessEvent(const ToyExperiment &toy, AnaEventB &event, std::vector< Weight_h > &totalWeightSystVector, std::vector< Weight_h > &fluxWeightSystVector)
AnaSuperEventB * LoadSuperEvent(Long64_t &evtIndex)
AnaSuperEventB * GetNextSuperEvent()
Returns The next SuperEvent.
UInt_t GetNPreloadedEvents() const
Return the number of preloaded events.
AnaSuperEventB ** _eventArray
The array of events.
EventWeightManager _weight
An instance of the EventWeight manager.
bool _initialisePionSystematics
AnaEventB * GetEvent(Int_t eventIndex)
Returns The Event with a given index from the array.
void CreateEventArray(Int_t nmax)
Create the evevt array for preloading events.
UInt_t GetEntries()
Returns the number of entries in the input tree.
Int_t _nEventsProcessed
the number of events processed so far
Int_t _currentEvent
The current event in the event array.
void SetNEventsToProcess(Int_t nmax)
Set the maximum number of events to process.
UInt_t _nEventsInDataArray
the number of events in the preloaded Data array
std::string _fluxFile
Flux file and option.
AnaSuperEventB ** _mcEventArray
The array of preloaded MC events.
FluxWeighting * _flux
Access to the flux weighting.
SystematicManager & syst()
Returns the systematic manager.
EventWeightManager & eweight()
Returns the EventWeight manager.
Int_t _nEventsToProcess
the maximum number of events to process
AnaSuperEventB * GetSuperEvent(Int_t eventIndex)
Returns The SuperEvent with a given index from the array.
bool _applyEventWeights
whether to apply detector event weight or not