Rivet API documentation

Rivet 4.1.3
AnalysisHandler.hh
1// -*- C++ -*-
2#ifndef RIVET_RivetHandler_HH
3#define RIVET_RivetHandler_HH
4
5#include "Rivet/Config/RivetCommon.hh"
6#include "Rivet/Particle.hh"
7#include "Rivet/AnalysisLoader.hh"
8#include "Rivet/Tools/RivetYODA.hh"
9#include "Rivet/Tools/Utils.hh"
10#include "Rivet/ProjectionHandler.hh"
11#include "YODA/ReaderYODA.h"
12
13#include <fstream>
14#include <unordered_map>
15
16namespace Rivet {
17
18
19 // Forward declaration and smart pointer for Analysis
20 class Analysis;
21 using AnaHandle = std::shared_ptr<Analysis>;
22
23
30
31 using TypeHandlePtr = std::shared_ptr<TypeBaseHandle>;
32 using TypeRegister = std::unordered_map<string, TypeHandlePtr>;
33 using TypeRegisterItr = typename TypeRegister::const_iterator;
34
35 public:
36
37 using Annotations = std::map<std::string, std::string>;
38
41
44
47
50
51
54
60 size_t numEvents() const {
61 const double N = _eventCounter.get()->persistent(defaultWeightIndex())->numEntries();
62 return size_t(N + 0.5 - (N<0)); // round to nearest integer
63 }
64
70 double effNumEvents() const {
71 if ((bool)_eventCounter) { return _eventCounter->effNumEntries(); }
72 return _eventCounter.get()->persistent(defaultWeightIndex())->effNumEntries();
73 }
74
79 double sumW() const {
80 if ((bool)_eventCounter) { return _eventCounter->sumW(); }
81 return _eventCounter.get()->persistent(defaultWeightIndex())->sumW();
82 }
83
84 double sumW2() const {
85 if ((bool)_eventCounter) { return _eventCounter->sumW2(); }
86 return _eventCounter.get()->persistent(defaultWeightIndex())->sumW2();
87 }
88
90
91
94
96 const vector<string>& weightNames() const { return _weightNames; }
97
99 size_t numWeights() const { return _weightNames.size(); }
100
102 bool haveNamedWeights() const;
103
105 void setWeightNames(const GenEvent& ge);
106
108 void setWeightNames(const vector<string>& weightNames);
109
111 size_t defaultWeightIndex() const { return _rivetDefaultWeightIdx; }
112
114 vector<double> weightSumWs() const;
115
117 void setWeightCap(const double maxWeight) { _weightCap = maxWeight; }
118
120 void setNominalWeightName(const std::string& name) { _nominalWeightName = name; }
121
123 void skipMultiWeights(bool skip=false) { _skipMultiWeights = skip; }
124
126 void matchWeightNames(const std::string& patterns) { _matchWeightNames = patterns; }
127
129 void unmatchWeightNames(const std::string& patterns) { _unmatchWeightNames = patterns; }
130
132 void setNLOSmearing(double frac) { _NLOSmearing = frac; }
133
135
136
139
141 Estimate0DPtr crossSection() const { return _xs; }
142
144 void setCrossSection(const vector<pair<double,double>>& xsecs, bool isUserSupplied = false);
145
147 void setCrossSection(const pair<double, double>& xsec, bool isUserSupplied=false);
148
150 void setCrossSection(double xsec, double xsecerr, bool isUserSupplied=false) {
151 setCrossSection({xsec, xsecerr}, isUserSupplied);
152 }
153
158
160 void notifyEndOfFile() { _isEndOfFile = true; }
161
163 double nominalCrossSection() const;
164
167
169
170
173
176
178 const ParticlePair& runBeams() const { return _beams; }
179
181 PdgIdPair runBeamIDs() const;
182
184 pair<double,double> runBeamEnergies() const;
185
187 double runSqrtS() const;
188
190 void setCheckBeams(bool check=true) { _checkBeams = check; }
191
193 // void setCheckConsistency(bool check=true) { _checkConsistency = check; }
194 // Check event consistency with the run, usually determined from the first event
195 // bool consistentWithRun(Event& event) {
196
198
199
202
203 // Get all the annotation names
204 std::vector<std::string> annotations() const {
205 return _beaminfo->annotations();
206 }
207
209 bool hasAnnotation(const std::string& name) const {
210 return _beaminfo->hasAnnotation(name);
211 }
212
214 const std::string& annotation(const std::string& name) const {
215 return _beaminfo->annotation(name);
216 }
217
219 const std::string& annotation(const std::string& name, const std::string& defaultreturn) const {
220 return _beaminfo->annotation(name, defaultreturn);
221 }
222
226 template <typename T>
227 const T annotation(const std::string& name) const {
228 return _beaminfo->annotation<T>(name);
229 }
230
234 template <typename T>
235 const T annotation(const std::string& name, T&& defaultreturn) const {
236 return _beaminfo->annotation<T>(name, std::forward<T>(defaultreturn));
237 }
238
242 template <typename T>
243 void setAnnotation(const std::string& name, T&& value) {
244 _beaminfo->setAnnotation<T>(name, std::forward<T>(value));
245 }
246
247
249 void setAnnotations(const Annotations& anns) {
250 _beaminfo->setAnnotations(anns);
251 }
252
254 void rmAnnotation(const std::string& name) {
255 _beaminfo->rmAnnotation(name);
256 }
257
258
261 _beaminfo->clearAnnotations();
262 }
263
265
266
269
271 template<typename T>
273 const std::string name = T().type();
274 const TypeRegisterItr& res = _register.find(name);
275 if (res == _register.end()) {
276 _register[name] = make_shared<TypeHandle<T>>();
277 }
278 _reader.registerType<T>(); // also let YODA know
279 }
280
283 bool copyAO(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, const double scale=1.0);
284
287 bool addAO(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr& dst, const double scale);
288
290
291
294
296 std::vector<std::string> analysisNames() const;
297
299 std::vector<std::string> stdAnalysisNames() const;
300
302 const std::map<std::string, AnaHandle>& analysesMap() const {
303 return _analyses;
304 }
305
307 std::vector<AnaHandle> analyses() const {
308 std::vector<AnaHandle> rtn;
309 rtn.reserve(_analyses.size());
310 for (const auto& apair : _analyses) rtn.push_back(apair.second);
311 return rtn;
312 }
313
315 AnaHandle analysis(const std::string& analysisname) {
316 if ( _analyses.find(analysisname) == _analyses.end() )
317 throw LookupError("No analysis named '" + analysisname + "' registered in AnalysisHandler");
318 try {
319 return _analyses[analysisname];
320 } catch (...) {
321 throw LookupError("No analysis named '" + analysisname + "' registered in AnalysisHandler");
322 }
323 }
324
327
333 AnalysisHandler& addAnalysis(const std::string& analysisname);
334
336 AnalysisHandler& addAnalysis(const std::string& analysisname, std::map<string, string> pars);
337
344 AnalysisHandler& addAnalyses(const std::vector<std::string>& analysisnames);
345
346
348 AnalysisHandler& removeAnalysis(const std::string& analysisname);
349
351 AnalysisHandler& removeAnalyses(const std::vector<std::string>& analysisnames);
352
354
355
358
360 void init(const GenEvent& event);
361
368 void analyze(GenEvent& event);
369
374 void analyze(GenEvent* event);
375
378 void finalize();
379
381
382
385
389
393 void readData(std::istream& istr, const string& fmt, bool preload = true);
394
396 void readData(const std::string& filename, bool preload = true);
397
401 vector<YODA::AnalysisObjectPtr> getYodaAOs(const bool includeraw=false, const bool mkinert=true) const;
402
404 vector<YODA::AnalysisObjectPtr> getRawAOs() const;
405
407 vector<std::string> getRawAOPaths() const;
408
411 const YODA::AnalysisObjectPtr getPreload(const string& path) const {
412 auto it = _preloads.find(path);
413 if ( it == _preloads.end() ) return nullptr;
414 return it->second;
415 }
416
420 void writeData(std::ostream& ostr, const string& fmt) const;
421
423 void writeData(const string& filename) const;
424
430 void setFinalizePeriod(const string& dumpfile, int period) {
431 _dumpPeriod = period;
432 _dumpFile = dumpfile;
433 }
434
436 setFinalizePeriod("DUMMY", -1);
437 }
438
440 void setBootstrapFilename(const string& filename) {
441 _bootstrapfilename = filename;
442 }
443
445 vector<pair<string,size_t>> fillLayout() const;
446
448 vector<bool> fillOutcomes() const;
449
451 vector<double> fillFractions() const;
452
467
468 void mergeYODAs(const vector<string>& aofiles,
469 const vector<string>& delopts=vector<string>(),
470 const vector<string>& addopts=vector<string>(),
471 const vector<string>& matches=vector<string>(),
472 const vector<string>& unmatches=vector<string>(),
473 const bool equiv=false,
474 const bool reentrantOnly = true,
475 const bool checkbeams = true);
476
478 void merge(AnalysisHandler &other);
479
485 void loadAOs(const vector<string>& aoPaths, const vector<double>& aoData);
486
488
491
492 vector<double> serializeContent(bool fixed_length = false) {
493 if (!_initialised)
494 throw Error("AnalysisHandler has not been initialised!");
495
497
498 // Loop over raw AOs and work out the size of the content data
499 const vector<YODA::AnalysisObjectPtr> raos = getRawAOs();
500 size_t total = 0;
501 for (size_t i = 0; i < raos.size(); ++i) {
502 total += raos[i]->lengthContent(fixed_length)+1;
503 }
504 total += _beaminfo->numBins()+1;
505
506 // Loop over raw AOs and retrieve the content data
507 std::vector<double> data; // serialized data vector
508 data.reserve(total); // pre-allocate enough memory
509 // Add beam IDs
510 data.push_back(_beaminfo->numBins());
511 for (const string& beamID : _beaminfo->xEdges()) {
512 data.push_back(_beamInfoLabelToID(beamID));
513 }
514 // Add raw YODA AO content
515 for (size_t i = 0; i < raos.size(); ++i) {
516 vector<double> tmp = raos[i]->serializeContent(fixed_length);
517 data.push_back(tmp.size()); // length of the AO
518 data.insert(std::end(data),
519 std::make_move_iterator(std::begin(tmp)),
520 std::make_move_iterator(std::end(tmp)));
521 }
522 return data;
523 }
524
525 void deserializeContent(const vector<double>& data, size_t nprocs = 0) {
526 if (!_initialised)
527 throw Error("AnalysisHandler has not been initialised!");
528
530
531 // get Rivet AOs for access to raw AO pointers
532 vector<MultiplexAOPtr> raos = getRivetAOs();
533
534
535 // beam info first
536 size_t iAO = 0, iW = 0, nBeams = data[0], offset = 1;
537 if (nprocs) nBeams /= nprocs;
538 const auto itr = data.cbegin();
539 // set beam IDs
540 vector<int> edges{itr+offset, itr+offset+nBeams};
541 vector<string> labels; labels.reserve(edges.size());
542 size_t id = 0;
543 for (int edge : edges) {
544 if (nprocs >= 2) edge /= nprocs;
545 labels.push_back(_mkBeamInfoLabel(++id, edge));
546 }
547
548 _beaminfo = make_shared<YODA::BinnedEstimate<string>>(labels, "/TMP/_BEAMPZ");
549 offset += nBeams;
550 // set beam momenta
551 size_t beamLen = *(itr + offset); ++offset;
552 if (nprocs) beamLen /= nprocs;
553 std::vector<double> energies{itr+offset, itr+offset+beamLen};
554 if (nprocs >= 2) {
555 for (double& e : energies) { e /= nprocs; }
556 }
557 _beaminfo->deserializeContent(energies);
558 for (auto& b : _beaminfo->bins(true)) b.rmErrs();
559 offset += beamLen;
560
561 // then the multiweighted AOs
562 while (offset < data.size()) {
563 if (iW < numWeights()) raos[iAO].get()->setActiveWeightIdx(iW);
564 else {
565 raos[iAO].get()->unsetActiveWeight();
566 iW = 0; ++iAO; // move on to next AO
567 raos[iAO].get()->setActiveWeightIdx(iW);
568 }
569
570 // obtain content length and set content iterators
571 size_t aoLen = *(itr + offset); ++offset;
572 if (nprocs) aoLen /= nprocs;
573 auto first = itr + offset;
574 auto last = first + aoLen;
575 // load data into AO
576 raos[iAO].get()->activeAO()->deserializeContent(std::vector<double>{first, last});
577
578 ++iW; offset += aoLen; // increment offset
579 }
580 raos[iAO].get()->unsetActiveWeight();
581 // Reset cross-section bookkeeping
582 _ntrials = 0.0;
583 _fileCounter = CounterPtr(weightNames(), Counter("_FILECOUNT"));
584 _xserr = CounterPtr(weightNames(), Counter("XSECERR"));
585 if (nprocs >= 2) {
586 for (size_t iW = 0; iW < numWeights(); ++iW) {
587 *_fileCounter.get()->persistent(iW) = *_eventCounter.get()->persistent(iW);
588 _xs.get()->persistent(iW)->scale(1.0/nprocs);
589 }
590 }
591 }
592
594
595
598
601 enum class Stage { OTHER, INIT, FINALIZE };
602
604 Stage stage() const { return _stage; }
605
607
608 private:
609
612
614 Log& getLog() const;
615
617 vector<MultiplexAOPtr> getRivetAOs() const;
618
620 void stripOptions(YODA::AnalysisObjectPtr ao, const vector<string>& delopts) const;
621
623 void mergeAOS(map<string, YODA::AnalysisObjectPtr> &allaos,
624 const map<string, YODA::AnalysisObjectPtr> &newaos,
625 map<string, std::array<double,4>> &allxsecs,
626 const vector<string>& delopts=vector<string>(),
627 const vector<string>& optAnas=vector<string>(),
628 const vector<string>& optKeys=vector<string>(),
629 const vector<string>& optVals=vector<string>(),
630 const bool equiv=false,
631 const bool overwrite_xsec = false,
632 const double user_xsec = 1.0);
633
634
639 void loadAOs(const map<string, YODA::AnalysisObjectPtr>& allAOs,
640 const bool unscale = false, const bool reentrantOnly = true);
641
643 void _setRunBeamInfo(const ParticlePair& beams);
644
646 string _mkBeamInfoLabel(size_t n, PdgId id) {
647 return "BEAM"+std::to_string(n)+"("+std::to_string(id)+")";
648 }
649
651 PdgId _beamInfoLabelToID(const string& label) {
652 size_t pos = label.find("(");
653 string beamID = label.substr(pos+1, label.size()-pos-2);
654 return std::stoi(beamID);
655 }
656
657
659
660
661 private:
662
664 Stage _stage = Stage::OTHER;
665
667 std::map<std::string, AnaHandle> _analyses;
668
672 map<string,YODA::AnalysisObjectPtr> _preloads;
673
675 vector<YODA::AnalysisObjectPtr> _finalizedAOs;
676
678 template<typename... Args>
679 void registerDefaultTypes();
680
682 TypeRegister _register;
683
685 YODA::Reader& _reader = YODA::ReaderYODA::create();
686
687
690
692 std::vector<std::string> _weightNames;
693 std::vector<std::valarray<double> > _subEventWeights;
694 //size_t _numWeightTypes; // always == WeightVector.size()
695
697 std::vector<size_t> _weightIndices;
698
700 CounterPtr _eventCounter;
701
703 Estimate0DPtr _xs;
704
706 CounterPtr _xserr;
707
709 YODA::BinnedEstimatePtr<string> _beaminfo;
710
712 double _ntrials;
713
715 CounterPtr _fileCounter;
716
718 bool _isEndOfFile;
719
721 bool _subeventWarning;
722
724 std::pair<double,double> _userxs;
725
727 ParticlePair _beams;
728
730 bool _initialised;
731
733 bool _checkBeams{true};
734
738 bool _ignoreEventGroups{false};
739
741 bool _skipMultiWeights{false};
742
744 std::string _matchWeightNames;
745
747 std::string _unmatchWeightNames;
748
750 std::string _nominalWeightName;
751
753 double _weightCap;
754
758 double _NLOSmearing;
759
761 int _eventNumber;
762
764 size_t _defaultWeightIdx;
765
767 size_t _rivetDefaultWeightIdx;
768
770 int _customDefaultWeightIdx;
771
773 int _dumpPeriod;
774
776 string _dumpFile;
777
779 bool _dumping;
780
782 ofstream _fbootstrap;
783
785 std::string _bootstrapfilename;
786
788 ProjectionHandler _projHandler;
789
791
792 };
793
794
795}
796
797#endif
Estimate0DPtr crossSection() const
Get the cross-section known to the handler.
Definition AnalysisHandler.hh:141
const T annotation(const std::string &name, T &&defaultreturn) const
Get an annotation by name (copied to another type) with a default in case the annotation is not found...
Definition AnalysisHandler.hh:235
AnalysisHandler & addAnalysis(const std::string &analysisname, std::map< string, string > pars)
Add an analysis with a map of analysis options.
void setNLOSmearing(double frac)
Set the relative width of the NLO smearing window.
Definition AnalysisHandler.hh:132
void matchWeightNames(const std::string &patterns)
Specify weight-name patterns to accept.
Definition AnalysisHandler.hh:126
std::vector< std::string > stdAnalysisNames() const
Get a list of the official analysis names for this release.
vector< bool > fillOutcomes() const
Return a vector of the binary fill outcome (was/wasn't filled) at each fill position.
size_t defaultWeightIndex() const
Get the index of the nominal weight-stream.
Definition AnalysisHandler.hh:111
void setNominalWeightName(const std::string &name)
Set the name of the nominal weight stream.
Definition AnalysisHandler.hh:120
void writeData(const string &filename) const
Write all analyses' plots (via getData) to the named file.
AnalysisHandler & setRunBeams(const ParticlePair &beams)
Set the beam particles for this run.
void setCrossSection(double xsec, double xsecerr, bool isUserSupplied=false)
Set the cross-section for the process being generated (alternative signature).
Definition AnalysisHandler.hh:150
void init(const GenEvent &event)
Initialize a run, with the run beams taken from the example event.
AnalysisHandler & addAnalyses(const std::vector< std::string > &analysisnames)
Add analyses to the run list using their names.
AnalysisHandler & removeAnalyses(const std::vector< std::string > &analysisnames)
Remove analyses from the run list using their names.
size_t numWeights() const
Are any of the weights non-numeric?
Definition AnalysisHandler.hh:99
void setAnnotation(const std::string &name, T &&value)
Add or set an annotation by name (templated for remaining types).
Definition AnalysisHandler.hh:243
void analyze(GenEvent &event)
Analyze the given event by reference.
vector< YODA::AnalysisObjectPtr > getYodaAOs(const bool includeraw=false, const bool mkinert=true) const
vector< double > fillFractions() const
Return a vector of the fill fraction at each fill position.
void setCrossSection(const pair< double, double > &xsec, bool isUserSupplied=false)
Set all cross-sections for the process being generated, based on nominal weight.
void registerType()
Register an AO type handle into type map and YODA reader.
Definition AnalysisHandler.hh:272
pair< double, double > runBeamEnergies() const
Get beam IDs for this run, usually determined from the first event.
const YODA::AnalysisObjectPtr getPreload(const string &path) const
Definition AnalysisHandler.hh:411
void analyze(GenEvent *event)
Analyze the given event by pointer.
const std::string & annotation(const std::string &name, const std::string &defaultreturn) const
Get an annotation by name (as a string) with a default in case the annotation is not found.
Definition AnalysisHandler.hh:219
~AnalysisHandler()
The destructor is not virtual, as this class should not be inherited from.
void merge(AnalysisHandler &other)
A method to merge another AnalysisHandler into the current one.
void readData(const std::string &filename, bool preload=true)
Read analysis plots into the histo collection (via addData) from the named file.
bool copyAO(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, const double scale=1.0)
const vector< string > & weightNames() const
Names of event weight categories.
Definition AnalysisHandler.hh:96
void setFinalizePeriod(const string &dumpfile, int period)
Configure the AnalysisObject dump rate and destination.
Definition AnalysisHandler.hh:430
void setCrossSection(const vector< pair< double, double > > &xsecs, bool isUserSupplied=false)
Set all cross-sections for the process being generated specifically (preferred).
double nominalCrossSectionError() const
Get the nominal cross-section.
void mergeYODAs(const vector< string > &aofiles, const vector< string > &delopts=vector< string >(), const vector< string > &addopts=vector< string >(), const vector< string > &matches=vector< string >(), const vector< string > &unmatches=vector< string >(), const bool equiv=false, const bool reentrantOnly=true, const bool checkbeams=true)
Merge the vector of YODA files, using the cross-section and weight information provided in each.
void readData(std::istream &istr, const string &fmt, bool preload=true)
Read analysis plots into the histo collection from the given stream.
void notifyEndOfFile()
Toggle to signal a change in HepMC input file.
Definition AnalysisHandler.hh:160
void clearAnnotations()
Delete an annotation by name.
Definition AnalysisHandler.hh:260
Stage stage() const
Return the current processing stage.
Definition AnalysisHandler.hh:604
const T annotation(const std::string &name) const
Get an annotation by name (copied to another type).
Definition AnalysisHandler.hh:227
double sumW2() const
Access to the sum of squared-weights.
Definition AnalysisHandler.hh:84
AnalysisHandler & addAnalysis(Analysis *analysis)
Add an analysis to the run list by object.
PdgIdPair runBeamIDs() const
Get beam IDs for this run, usually determined from the first event.
bool addAO(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr &dst, const double scale)
double runSqrtS() const
Get energy for this run, usually determined from the first event.
bool haveNamedWeights() const
Are any of the weights non-numeric?
void setCheckBeams(bool check=true)
Option to disable analysis-compatibility checks.
Definition AnalysisHandler.hh:190
void setWeightNames(const GenEvent &ge)
Set the weight names from a GenEvent.
size_t numEvents() const
Definition AnalysisHandler.hh:60
void loadAOs(const vector< string > &aoPaths, const vector< double > &aoData)
A method to prepare a re-entrant run for a given set of AO paths and serialized AO data.
void rmAnnotation(const std::string &name)
Delete an annotation by name.
Definition AnalysisHandler.hh:254
vector< double > weightSumWs() const
Access the array of sum of the event weights seen.
AnalysisHandler()
Preferred / default constructor.
std::vector< AnaHandle > analyses() const
Get the collection of currently registered analyses.
Definition AnalysisHandler.hh:307
const std::string & annotation(const std::string &name) const
Get an annotation by name (as a string).
Definition AnalysisHandler.hh:214
void setWeightCap(const double maxWeight)
Set the weight cap.
Definition AnalysisHandler.hh:117
AnaHandle analysis(const std::string &analysisname)
Get a registered analysis by name.
Definition AnalysisHandler.hh:315
void writeData(std::ostream &ostr, const string &fmt) const
Write all analyses' plots (via getData) to the given stream.
const std::map< std::string, AnaHandle > & analysesMap() const
Get the collection of currently registered analyses.
Definition AnalysisHandler.hh:302
AnalysisHandler & addAnalysis(const std::string &analysisname)
Add an analysis to the run list using its name.
Stage
Definition AnalysisHandler.hh:601
AnalysisHandler & removeAnalysis(const std::string &analysisname)
Remove an analysis from the run list using its name.
vector< pair< string, size_t > > fillLayout() const
Return a vector of (AO path, AO numBins) pairs to decode the fills layout.
AnalysisHandler(const AnalysisHandler &)=delete
The copy constructor is deleted, so it can never be called.
void skipMultiWeights(bool skip=false)
Ignore all weight streams other than the nominal.
Definition AnalysisHandler.hh:123
const ParticlePair & runBeams() const
Get the beam particles for this run, usually determined from the first event.
Definition AnalysisHandler.hh:178
vector< std::string > getRawAOPaths() const
Get all raw YODA analysis object paths (across all weights).
double effNumEvents() const
Definition AnalysisHandler.hh:70
vector< YODA::AnalysisObjectPtr > getRawAOs() const
Get all raw YODA analysis objects (across all weights).
void unmatchWeightNames(const std::string &patterns)
Specify weight-name patterns to reject.
Definition AnalysisHandler.hh:129
void setWeightNames(const vector< string > &weightNames)
Set the weight names from a vector<string>.
void setBootstrapFilename(const string &filename)
Set filename of the bootstrap file.
Definition AnalysisHandler.hh:440
double nominalCrossSection() const
Get the nominal cross-section.
bool hasAnnotation(const std::string &name) const
Check if an annotation is defined.
Definition AnalysisHandler.hh:209
void setNoFinalizePeriod()
Configure the AnalysisObject dump rate and destination.
Definition AnalysisHandler.hh:435
void setAnnotations(const Annotations &anns)
Set all annotations at once.
Definition AnalysisHandler.hh:249
double sumW() const
Access the sum of the event weights seen.
Definition AnalysisHandler.hh:79
AnalysisHandler & operator=(const AnalysisHandler &)=delete
The assignment operator is deleted, so it can never be called.
std::vector< std::string > analysisNames() const
Get a list of the currently registered analyses' names.
This is the base class of all analysis classes in Rivet.
Definition Analysis.hh:69
Logging system for controlled & formatted writing to stdout.
Definition Logging.hh:10
STL class.
ParticlePair beams(const Event &e)
Get beam particles from an event.
Definition MC_CENT_PPB_Projections.hh:10
std::pair< Particle, Particle > ParticlePair
Typedef for a pair of Particle objects.
Definition Particle.hh:38
Generic runtime Rivet error.
Definition Exceptions.hh:12
Error relating to looking up analysis objects in the register.
Definition Exceptions.hh:73