2 #ifndef RIVET_Analysis_HH
3 #define RIVET_Analysis_HH
5 #include "Rivet/Rivet.hh"
6 #include "Rivet/Analysis.fhh"
7 #include "Rivet/AnalysisInfo.hh"
8 #include "Rivet/Event.hh"
9 #include "Rivet/Projection.hh"
10 #include "Rivet/ProjectionApplier.hh"
11 #include "Rivet/ProjectionHandler.hh"
12 #include "Rivet/Constraints.hh"
13 #include "Rivet/AnalysisHandler.fhh"
14 #include "Rivet/AnalysisLoader.hh"
15 #include "Rivet/Tools/Logging.fhh"
16 #include "Rivet/RivetAIDA.fhh"
22 do { MSG_DEBUG("Vetoing event on line " << __LINE__ << " of " << __FILE__); return; } while(0)
26 #define DECLARE_RIVET_PLUGIN(clsname) Rivet::AnalysisBuilder<clsname> plugin_ ## clsname
109 assert(_info.get() != 0 &&
"No AnalysisInfo object :O");
118 virtual std::string
name()
const {
136 virtual std::vector<std::string>
authors()
const {
179 virtual std::string
year()
const {
204 virtual std::vector<std::string>
todos()
const {
249 assert(_info.get() != 0 &&
"No AnalysisInfo object :O");
257 return setRequiredBeams(std::vector<PdgIdPair>(1, make_pair(beam1, beam2)));
273 double sqrtS()
const;
305 void normalize(AIDA::IHistogram1D*& histo,
double norm=1.0);
312 void scale(AIDA::IHistogram1D*& histo,
double scale);
321 void normalize(AIDA::IHistogram2D*& histo,
double norm=1.0);
328 void scale(AIDA::IHistogram2D*& histo,
double scale);
375 const std::string
histoPath(
const std::string& hname)
const;
378 const std::string
histoPath(
size_t datasetId,
size_t xAxisId,
size_t yAxisId)
const;
381 const std::string
makeAxisCode(
size_t datasetId,
size_t xAxisId,
size_t yAxisId)
const;
393 const BinEdges&
binEdges(
size_t datasetId,
size_t xAxisId,
size_t yAxisId)
const;
403 size_t nbins,
double lower,
double upper,
404 const std::string& title=
"",
405 const std::string& xtitle=
"",
const std::string& ytitle=
"");
412 const std::vector<double>& binedges,
const std::string& title=
"",
413 const std::string& xtitle=
"",
const std::string& ytitle=
"");
424 size_t nxbins,
double xlower,
double xupper,
425 size_t nybins,
double ylower,
double yupper,
426 const std::string& title=
"",
const std::string& xtitle=
"",
427 const std::string& ytitle=
"",
const std::string& ztitle=
"");
437 const std::vector<double>& xbinedges,
438 const std::vector<double>& ybinedges,
439 const std::string& title=
"",
const std::string& xtitle=
"",
440 const std::string& ytitle=
"",
const std::string& ztitle=
"");
446 const std::string& xtitle=
"",
const std::string& ytitle=
"");
451 AIDA::IHistogram1D*
bookHistogram1D(
size_t datasetId,
size_t xAxisId,
size_t yAxisId,
452 const std::string& title=
"",
453 const std::string& xtitle=
"",
const std::string& ytitle=
"");
466 size_t nbins,
double lower,
double upper,
467 const std::string& title=
"",
468 const std::string& xtitle=
"",
const std::string& ytitle=
"");
475 const std::vector<double>& binedges,
476 const std::string& title=
"",
477 const std::string& xtitle=
"",
const std::string& ytitle=
"");
482 AIDA::IProfile1D*
bookProfile1D(
const std::string&
name,
const std::string& title=
"",
483 const std::string& xtitle=
"",
const std::string& ytitle=
"");
488 AIDA::IProfile1D*
bookProfile1D(
size_t datasetId,
size_t xAxisId,
size_t yAxisId,
489 const std::string& title=
"",
490 const std::string& xtitle=
"",
const std::string& ytitle=
"");
502 const std::string& xtitle=
"",
const std::string& ytitle=
"");
510 size_t npts,
double lower,
double upper,
511 const std::string& title=
"",
512 const std::string& xtitle=
"",
const std::string& ytitle=
"");
523 AIDA::IDataPointSet*
bookDataPointSet(
size_t datasetId,
size_t xAxisId,
size_t yAxisId,
524 const std::string& title=
"",
525 const std::string& xtitle=
"",
const std::string& ytitle=
"");
536 void _makeHistoDir();
539 void _cacheBinEdges()
const;
542 void _cacheXAxisData()
const;
553 shared_ptr<AnalysisInfo> _info;
560 double _crossSection;
561 bool _gotCrossSection;
568 mutable bool _madeHistoDir;
573 mutable map<string, vector<DPSXPoint> > _dpsData;
578 mutable map<string, BinEdges> _histBinEdges;
594 #include "Rivet/AnalysisBuilder.hh"