Rivet API documentation
![]() |
Rivet 4.1.3
|
AnalysisHandler.hh
219 const std::string& annotation(const std::string& name, const std::string& defaultreturn) const {
401 vector<YODA::AnalysisObjectPtr> getYodaAOs(const bool includeraw=false, const bool mkinert=true) const;
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
void collapseEventGroup()
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.
void finalize()
AnalysisHandler & setRunBeams(const ParticlePair &beams)
Set the beam particles for this run.
void updateCrossSection()
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
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
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.
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.
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.
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).
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.
STL class.
Definition MC_CENT_PPB_Projections.hh:10
std::pair< Particle, Particle > ParticlePair
Typedef for a pair of Particle objects.
Definition Particle.hh:38
Error relating to looking up analysis objects in the register.
Definition Exceptions.hh:73
Generated on for Rivet by
