AnalysisInfo.hh
// -*- C++ -*-
#ifndef RIVET_AnalysisInfo_HH
#define RIVET_AnalysisInfo_HH
#include "Rivet/Rivet.hh"
#include <ostream>
namespace Rivet {
class AnalysisInfo {
public:
static AnalysisInfo* make(const std::string& name);
AnalysisInfo() { clear(); }
~AnalysisInfo() { }
public:
std::string name() const {
if (!_name.empty()) return _name;
if (!experiment().empty() && !year().empty()) {
if (!inspireId().empty()) {
return experiment() + "_" + year() + "_I" + inspireId();
} else if (!spiresId().empty()) {
return experiment() + "_" + year() + "_S" + spiresId();
}
}
return "";
}
void setName(const std::string& name) { _name = name; }
const std::string& inspireId() const { return _inspireId; }
void setInspireId(const std::string& inspireId) { _inspireId = inspireId; }
const std::string& spiresId() const { return _spiresId; }
void setSpiresId(const std::string& spiresId) { _spiresId = spiresId; }
const std::vector<std::string>& authors() const { return _authors; }
void setAuthors(const std::vector<std::string>& authors) { _authors = authors; }
const std::string& summary() const { return _summary; }
void setSummary(const std::string& summary) { _summary = summary; }
const std::string& description() const { return _description; }
void setDescription(const std::string& description) { _description = description; }
const std::string& runInfo() const { return _runInfo; }
void setRunInfo(const std::string& runInfo) { _runInfo = runInfo; }
const std::vector<PdgIdPair>& beams() const { return _beams; }
void setBeams(const std::vector<PdgIdPair>& beams) { _beams = beams; }
const std::vector<std::pair<double,double> >& energies() const { return _energies; }
void setEnergies(const std::vector<std::pair<double, double> >& energies) { _energies = energies; }
const std::string& experiment() const { return _experiment; }
void setExperiment(const std::string& experiment) { _experiment = experiment; }
const std::string& collider() const { return _collider; }
void setCollider(const std::string& collider) { _collider = collider; }
const std::string& year() const { return _year; }
void setYear(const std::string& year) { _year = year; }
const std::vector<std::string>& references() const { return _references; }
void setReferences(const std::vector<std::string>& references) { _references = references; }
const std::string& bibKey() const { return _bibKey;}
void setBibKey(const std::string& bibKey) { _bibKey = bibKey; }
const std::string& bibTeX() const { return _bibTeX; }
void setBibTeX(const std::string& bibTeX) { _bibTeX = bibTeX; }
const std::string& status() const { return _status; }
void setStatus(const std::string& status) { _status = status; }
const std::vector<std::string>& todos() const { return _todos; }
void setTodos(const std::vector<std::string>& todos) { _todos = todos; }
bool needsCrossSection() const { return _needsCrossSection; }
void setNeedsCrossSection(bool needXsec) { _needsCrossSection = needXsec; }
private:
std::string _name;
std::string _spiresId, _inspireId;
std::vector<std::string> _authors;
std::string _summary;
std::string _description;
std::string _runInfo;
std::string _experiment;
std::string _collider;
std::vector<std::pair<PdgId, PdgId> > _beams;
std::vector<std::pair<double, double> > _energies;
std::string _year;
std::vector<std::string> _references;
std::string _bibKey;
std::string _bibTeX;
//std::string _bibTeXBody; //< Was thinking of avoiding duplication of BibKey...
std::string _status;
std::vector<std::string> _todos;
bool _needsCrossSection;
void clear() {
_name = "";
_spiresId = "";
_inspireId = "";
_authors.clear();
_summary = "";
_description = "";
_runInfo = "";
_experiment = "";
_collider = "";
_beams.clear();
_energies.clear();
_year = "";
_references.clear();
_bibKey = "";
_bibTeX = "";
//_bibTeXBody = "";
_status = "";
_todos.clear();
_needsCrossSection = false;
}
};
std::string toString(const AnalysisInfo& ai);
inline std::ostream& operator<<(std::ostream& os, const AnalysisInfo& ai) {
os << toString(ai);
return os;
}
}
#endif
Rivet
Definition: MC_JetAnalysis.hh:9
Rivet::AnalysisInfo::summary
const std::string & summary() const
Get a short description of the analysis. Short (one sentence) description used as an index entry...
Definition: AnalysisInfo.hh:81
Rivet::AnalysisInfo::AnalysisInfo
AnalysisInfo()
The default constructor.
Definition: AnalysisInfo.hh:21
Rivet::AnalysisInfo::setSpiresId
void setSpiresId(const std::string &spiresId)
Set the SPIRES ID code for this analysis.
Definition: AnalysisInfo.hh:65
Rivet::AnalysisInfo::setNeedsCrossSection
void setNeedsCrossSection(bool needXsec)
Return true if this analysis needs to know the process cross-section.
Definition: AnalysisInfo.hh:184
Rivet::AnalysisInfo
Definition: AnalysisInfo.hh:11
Rivet::AnalysisInfo::status
const std::string & status() const
Whether this analysis is trusted (in any way!)
Definition: AnalysisInfo.hh:167
Rivet::AnalysisInfo::setDescription
void setDescription(const std::string &description)
Set the full description for this analysis.
Definition: AnalysisInfo.hh:95
Rivet::AnalysisInfo::~AnalysisInfo
~AnalysisInfo()
The destructor.
Definition: AnalysisInfo.hh:24
Rivet::AnalysisInfo::setBibTeX
void setBibTeX(const std::string &bibTeX)
Set the BibTeX citation entry for this article.
Definition: AnalysisInfo.hh:163
Rivet::AnalysisInfo::bibTeX
const std::string & bibTeX() const
BibTeX citation entry for this article.
Definition: AnalysisInfo.hh:160
Rivet::AnalysisInfo::setExperiment
void setExperiment(const std::string &experiment)
Set the experiment which performed and published this analysis.
Definition: AnalysisInfo.hh:126
Rivet::AnalysisInfo::setYear
void setYear(const std::string &year)
Set the year in which the original experimental analysis was published.
Definition: AnalysisInfo.hh:142
Rivet::AnalysisInfo::bibKey
const std::string & bibKey() const
BibTeX citation key for this article.
Definition: AnalysisInfo.hh:153
Rivet::AnalysisInfo::name
std::string name() const
Definition: AnalysisInfo.hh:38
Rivet::AnalysisInfo::todos
const std::vector< std::string > & todos() const
Any work to be done on this analysis.
Definition: AnalysisInfo.hh:174
Rivet::AnalysisInfo::setRunInfo
void setRunInfo(const std::string &runInfo)
Set the full description for this analysis.
Definition: AnalysisInfo.hh:105
Rivet::AnalysisInfo::setTodos
void setTodos(const std::vector< std::string > &todos)
Set the to-do list.
Definition: AnalysisInfo.hh:177
Rivet::AnalysisInfo::authors
const std::vector< std::string > & authors() const
Names & emails of paper/analysis authors. Names and email of authors in &#39;NAME <EMAIL>&#39; format...
Definition: AnalysisInfo.hh:71
Rivet::AnalysisInfo::beams
const std::vector< PdgIdPair > & beams() const
Beam particle types.
Definition: AnalysisInfo.hh:109
Rivet::AnalysisInfo::make
static AnalysisInfo * make(const std::string &name)
Static factory method: returns null pointer if no metadata found.
Definition: AnalysisInfo.cc:23
Rivet::AnalysisInfo::experiment
const std::string & experiment() const
Experiment which performed and published this analysis.
Definition: AnalysisInfo.hh:123
Rivet::AnalysisInfo::spiresId
const std::string & spiresId() const
Get the SPIRES ID code for this analysis.
Definition: AnalysisInfo.hh:62
Rivet::AnalysisInfo::setStatus
void setStatus(const std::string &status)
Set the analysis code status.
Definition: AnalysisInfo.hh:170
Rivet::AnalysisInfo::setReferences
void setReferences(const std::vector< std::string > &references)
Set the journal and preprint reference list.
Definition: AnalysisInfo.hh:149
Rivet::AnalysisInfo::setName
void setName(const std::string &name)
Set the name of the analysis.
Definition: AnalysisInfo.hh:51
Rivet::AnalysisInfo::setInspireId
void setInspireId(const std::string &inspireId)
Set the Inspire (SPIRES replacement) ID code for this analysis.
Definition: AnalysisInfo.hh:58
Rivet::AnalysisInfo::setCollider
void setCollider(const std::string &collider)
Set the collider on which the experiment ran.
Definition: AnalysisInfo.hh:133
Rivet::AnalysisInfo::references
const std::vector< std::string > & references() const
Journal and preprint references.
Definition: AnalysisInfo.hh:146
Rivet::AnalysisInfo::needsCrossSection
bool needsCrossSection() const
Return true if this analysis needs to know the process cross-section.
Definition: AnalysisInfo.hh:181
Rivet::AnalysisInfo::setBibKey
void setBibKey(const std::string &bibKey)
Set the BibTeX citation key for this article.
Definition: AnalysisInfo.hh:156
Rivet::AnalysisInfo::year
const std::string & year() const
When the original experimental analysis was published. When the refereed paper on which this is based...
Definition: AnalysisInfo.hh:139
Rivet::AnalysisInfo::description
const std::string & description() const
Get a full description of the analysis. Full textual description of this analysis, what it is useful for, what experimental techniques are applied, etc. Should be treated as a chunk of restructuredText (http://docutils.sourceforge.net/rst.html), with equations to be rendered as LaTeX with amsmath operators.
Definition: AnalysisInfo.hh:92
Rivet::AnalysisInfo::setSummary
void setSummary(const std::string &summary)
Set the short description for this analysis.
Definition: AnalysisInfo.hh:84
Rivet::toString
std::string toString(const AnalysisInfo &ai)
String representation.
Definition: AnalysisInfo.cc:234
Rivet::AnalysisInfo::runInfo
const std::string & runInfo() const
Information about the events needed as input for this analysis. Event types, energies, kinematic cuts, particles to be considered stable, etc. etc. Should be treated as a restructuredText bullet list (http://docutils.sourceforge.net/rst.html)
Definition: AnalysisInfo.hh:102
Rivet::operator<<
std::ostream & operator<<(std::ostream &os, const AnalysisInfo &ai)
Stream an AnalysisInfo as a text description.
Definition: AnalysisInfo.hh:239
Rivet::AnalysisInfo::setBeams
void setBeams(const std::vector< PdgIdPair > &beams)
Set beam particle types.
Definition: AnalysisInfo.hh:112
Rivet::AnalysisInfo::inspireId
const std::string & inspireId() const
Get the Inspire (SPIRES replacement) ID code for this analysis.
Definition: AnalysisInfo.hh:55
Rivet::AnalysisInfo::collider
const std::string & collider() const
Collider on which the experiment ran.
Definition: AnalysisInfo.hh:130
Rivet::AnalysisInfo::setAuthors
void setAuthors(const std::vector< std::string > &authors)
Set the author list.
Definition: AnalysisInfo.hh:74
Rivet::AnalysisInfo::setEnergies
void setEnergies(const std::vector< std::pair< double, double > > &energies)
Set the valid beam energies.
Definition: AnalysisInfo.hh:119
Rivet::AnalysisInfo::energies
const std::vector< std::pair< double, double > > & energies() const
Sets of valid beam energies.
Definition: AnalysisInfo.hh:116