2 #ifndef RIVET_RivetHandler_HH 3 #define RIVET_RivetHandler_HH 5 #include "Rivet/Rivet.hh" 6 #include "Rivet/RivetBoost.hh" 7 #include "Rivet/Tools/Logging.fhh" 8 #include "Rivet/AnalysisHandler.fhh" 9 #include "Rivet/Analysis.fhh" 10 #include "Rivet/Event.fhh" 11 #include "Rivet/AnalysisLoader.hh" 20 bool operator()(
const AnaHandle& a,
const AnaHandle& b) {
21 return a.get() < b.get();
65 void _setupFactories(
const string& basefilename,
HistoFormat storetype);
69 void _setupFactories();
73 void _normalizeTree(AIDA::ITree& tree);
85 string runName()
const;
90 size_t numEvents()
const;
95 double sumOfWeights()
const;
100 void setSumOfWeights(
const double& sum);
104 bool needCrossSection()
const;
115 bool hasCrossSection()
const;
121 MSG_DEBUG(
"Setting run beams = " << beams <<
" @ " <<
sqrtS()/GeV <<
" GeV");
134 double sqrtS()
const;
137 void setIgnoreBeams(
bool ignore=
true);
146 std::vector<std::string> analysisNames()
const;
149 const std::set<AnaHandle, AnaHandleLess>&
analyses()
const {
168 AnalysisHandler& addAnalyses(
const std::vector<std::string>& analysisnames);
171 AnalysisHandler& removeAnalyses(
const std::vector<std::string>& analysisnames);
188 void init(
const GenEvent& event);
193 void analyze(
const GenEvent& event);
211 AIDA::IAnalysisFactory& analysisFactory();
221 void writeData(
const std::string& filename);
231 AIDA::IHistogramFactory& histogramFactory();
236 AIDA::IDataPointSetFactory& datapointsetFactory();
244 set<AnaHandle, AnaHandleLess> _analyses;
251 std::string _runname;
257 double _sumOfWeights;
279 shared_ptr<AIDA::IAnalysisFactory> _theAnalysisFactory;
282 AIDA::ITreeFactory* _theTreeFactory;
285 AIDA::ITree* _theTree;
288 AIDA::IHistogramFactory* _theHistogramFactory;
291 AIDA::IDataPointSetFactory* _theDataPointSetFactory;
Definition: MC_JetAnalysis.hh:9
HistoFormat
Enumeration of available histogram output formats.
Definition: HistoFormat.hh:11
double crossSection() const
Get the cross-section known to the handler.
Definition: AnalysisHandler.hh:110
const std::set< AnaHandle, AnaHandleLess > & analyses() const
Get the collection of currently registered analyses.
Definition: AnalysisHandler.hh:149
ParticlePair beams(const Event &e)
Function to get beam particles from an event.
Definition: Beam.cc:9
const ParticlePair & beams() const
Get beam IDs for this run, usually determined from the first event.
Definition: AnalysisHandler.hh:126
Definition: AnalysisHandler.hh:19
This is the base class of all analysis classes in Rivet.
Definition: Analysis.hh:51
void init()
Definition: AnalysisHandler.hh:184
double sqrtS(const Event &e)
Function to get beam centre of mass energy from an event.
Definition: Beam.cc:25
Definition: AnalysisHandler.hh:29
PdgIdPair beamIds(const Event &e)
Function to get beam particle IDs from an event.
Definition: Beam.cc:15
shared_ptr< Analysis > AnaHandle
Typedef for Analysis (smart) pointer.
Definition: AnalysisHandler.hh:16
AnalysisHandler & setRunBeams(const ParticlePair &beams)
Set beams for this run.
Definition: AnalysisHandler.hh:119