Rivet  3.1.4
RivetYODA.hh
1 #ifndef RIVET_RIVETYODA_HH
2 #define RIVET_RIVETYODA_HH
3 
4 #include "Rivet/Config/RivetCommon.hh"
5 #include "YODA/AnalysisObject.h"
6 #include "YODA/Counter.h"
7 #include "YODA/Histo1D.h"
8 #include "YODA/Histo2D.h"
9 #include "YODA/Profile1D.h"
10 #include "YODA/Profile2D.h"
11 #include "YODA/Scatter1D.h"
12 #include "YODA/Scatter2D.h"
13 #include "YODA/Scatter3D.h"
14 
15 #include <map>
16 #include <valarray>
17 
18 namespace YODA {
19 
20  typedef std::shared_ptr<YODA::AnalysisObject> AnalysisObjectPtr;
21 
22  typedef std::shared_ptr<YODA::Counter> CounterPtr;
23  typedef std::shared_ptr<YODA::Histo1D> Histo1DPtr;
24  typedef std::shared_ptr<YODA::Histo2D> Histo2DPtr;
25  typedef std::shared_ptr<YODA::Profile1D> Profile1DPtr;
26  typedef std::shared_ptr<YODA::Profile2D> Profile2DPtr;
27  typedef std::shared_ptr<YODA::Scatter1D> Scatter1DPtr;
28  typedef std::shared_ptr<YODA::Scatter2D> Scatter2DPtr;
29  typedef std::shared_ptr<YODA::Scatter3D> Scatter3DPtr;
30 
31 }
32 
33 
34 namespace Rivet {
35 
36 
43 
45  using Weight = double;
46 
48  template <class T>
49  using Fill = pair<typename T::FillType, Weight>;
50 
53  template <class T>
54  using Fills = multiset<Fill<T>>;
55 
56 
57 
66  template <class T>
67  class TupleWrapper;
68 
69 
71  template <>
72  class TupleWrapper<YODA::Counter> : public YODA::Counter {
73  public:
74 
76  typedef shared_ptr<TupleWrapper<YODA::Counter>> Ptr;
77 
79  TupleWrapper(const YODA::Counter& h) : YODA::Counter(h) {}
80 
84  void fill(double weight=1.0, double fraction=1.0) {
85  (void)fraction; //< ???
86  _fills.insert( { YODA::Counter::FillType(), weight } );
87  }
88 
90  void reset() { _fills.clear(); }
91 
93  const Fills<YODA::Counter>& fills() const { return _fills; }
94 
95  private:
96 
97  Fills<YODA::Counter> _fills;
98 
99  };
100 
101 
103  template <>
104  class TupleWrapper<YODA::Histo1D> : public YODA::Histo1D {
105  public:
106 
108  typedef shared_ptr<TupleWrapper<YODA::Histo1D>> Ptr;
109 
111  TupleWrapper(const YODA::Histo1D& h) : YODA::Histo1D(h) {}
112 
116  void fill( double x, double weight=1.0, double fraction=1.0 ) {
117  (void)fraction; //< ???
118  if ( std::isnan(x) ) throw YODA::RangeError("X is NaN"); //< efficient?
119  _fills.insert( { x, weight } );
120  }
121 
123  void reset() { _fills.clear(); }
124 
126  const Fills<YODA::Histo1D>& fills() const { return _fills; }
127 
128  private:
129 
130  Fills<YODA::Histo1D> _fills;
131 
132  };
133 
134 
136  template <>
137  class TupleWrapper<YODA::Profile1D> : public YODA::Profile1D {
138  public:
139 
141  typedef shared_ptr<TupleWrapper<YODA::Profile1D>> Ptr;
142 
144  TupleWrapper(const YODA::Profile1D& h) : YODA::Profile1D(h) {}
145 
149  void fill( double x, double y, double weight=1.0, double fraction=1.0 ) {
150  (void)fraction; //< ???
151  if ( std::isnan(x) ) throw YODA::RangeError("X is NaN"); //< efficient?
152  if ( std::isnan(y) ) throw YODA::RangeError("Y is NaN"); //< efficient?
153  _fills.insert( { YODA::Profile1D::FillType{x,y}, weight } );
154  }
155 
157  void reset() { _fills.clear(); }
158 
160  const Fills<YODA::Profile1D>& fills() const { return _fills; }
161 
162  private:
163 
164  Fills<YODA::Profile1D> _fills;
165 
166  };
167 
168 
170  template <>
171  class TupleWrapper<YODA::Histo2D> : public YODA::Histo2D {
172  public:
173 
175  typedef shared_ptr<TupleWrapper<YODA::Histo2D>> Ptr;
176 
178  TupleWrapper(const YODA::Histo2D& h) : YODA::Histo2D(h) {}
179 
183  void fill( double x, double y, double weight=1.0, double fraction=1.0 ) {
184  (void)fraction; //< ???
185  if ( std::isnan(x) ) throw YODA::RangeError("X is NaN"); //< efficient?
186  if ( std::isnan(y) ) throw YODA::RangeError("Y is NaN"); //< efficient?
187  _fills.insert( { YODA::Histo2D::FillType{x,y}, weight } );
188  }
189 
191  void reset() { _fills.clear(); }
192 
194  const Fills<YODA::Histo2D>& fills() const { return _fills; }
195 
196  private:
197 
198  Fills<YODA::Histo2D> _fills;
199 
200  };
201 
202 
204  template <>
205  class TupleWrapper<YODA::Profile2D> : public YODA::Profile2D {
206  public:
207 
209  typedef shared_ptr<TupleWrapper<YODA::Profile2D>> Ptr;
210 
212  TupleWrapper(const YODA::Profile2D& h) : YODA::Profile2D(h) {}
213 
217  void fill( double x, double y, double z, double weight=1.0, double fraction=1.0 ) {
218  (void)fraction; //< ???
219  if ( std::isnan(x) ) throw YODA::RangeError("X is NaN"); //< efficient?
220  if ( std::isnan(y) ) throw YODA::RangeError("Y is NaN"); //< efficient?
221  if ( std::isnan(z) ) throw YODA::RangeError("Z is NaN"); //< efficient?
222  _fills.insert( { YODA::Profile2D::FillType{x,y,z}, weight } );
223  }
224 
226  void reset() { _fills.clear(); }
227 
229  const Fills<YODA::Profile2D>& fills() const { return _fills; }
230 
231  private:
232 
233  Fills<YODA::Profile2D> _fills;
234 
235  };
236 
237 
239  template <>
240  class TupleWrapper<YODA::Scatter1D> : public YODA::Scatter1D {
241  public:
242 
244  typedef shared_ptr<TupleWrapper<YODA::Scatter1D>> Ptr;
245 
247  TupleWrapper(const YODA::Scatter1D& h) : YODA::Scatter1D(h) {}
248 
249  };
250 
251 
253  template <>
254  class TupleWrapper<YODA::Scatter2D> : public YODA::Scatter2D {
255  public:
256 
258  typedef shared_ptr<TupleWrapper<YODA::Scatter2D>> Ptr;
259 
261  TupleWrapper(const YODA::Scatter2D& h) : YODA::Scatter2D(h) {}
262 
263  };
264 
265 
267  template <>
268  class TupleWrapper<YODA::Scatter3D> : public YODA::Scatter3D {
269  public:
270 
272  typedef shared_ptr<TupleWrapper<YODA::Scatter3D>> Ptr;
273 
275  TupleWrapper(const YODA::Scatter3D& h) : YODA::Scatter3D(h) {}
276 
277  };
278 
280 
281 
282 
283 
284 
294  class AnalysisObjectWrapper {
295  public:
296 
297  virtual ~AnalysisObjectWrapper() {}
298 
300  virtual YODA::AnalysisObject* operator -> () = 0;
302  virtual YODA::AnalysisObject* operator -> () const = 0;
304  virtual const YODA::AnalysisObject& operator * () const = 0;
305 
307  virtual void setActiveWeightIdx(size_t iWeight) = 0;
308 
310  virtual void setActiveFinalWeightIdx(size_t iWeight) = 0;
311 
315  virtual void unsetActiveWeight() = 0;
316 
318  bool operator == (const AnalysisObjectWrapper& p) { return (this == &p); }
320  bool operator != (const AnalysisObjectWrapper& p) { return (this != &p); }
321 
322  };
323 
324 
325 
329  /*
330  class Scatter1DPtr : public AnalysisObjectPtr {
331  public:
332  Scatter1DPtr() : _persistent() { }
333 
334  Scatter1DPtr(size_t len_of_weightvec, const YODA::Scatter1D& p) {
335  for (size_t m = 0; m < len_of_weightvec; ++m)
336  _persistent.push_back(make_shared<YODA::Scatter1D>(p));
337  }
338 
339  bool operator!() const { return !_persistent; }
340  explicit operator bool() const { return bool(_persistent); }
341 
342  YODA::Scatter1D* operator->() { return _persistent.get(); }
343 
344  YODA::Scatter1D* operator->() const { return _persistent.get(); }
345 
346  YODA::Scatter1D & operator*() { return *_persistent; }
347 
348  const YODA::Scatter1D & operator*() const { return *_persistent; }
349 
350  protected:
351  vector<YODA::Scatter1DPtr> _persistent;
352  };
353 
354  class Scatter2DPtr : public AnalysisObjectPtr {
355  public:
356  Scatter2DPtr(size_t len_of_weightvec, const YODA::Scatter2D& p) {
357  for (size_t m = 0; m < len_of_weightvec; ++m)
358  _persistent.push_back(make_shared<YODA::Scatter2D>(p));
359  }
360 
361  Scatter2DPtr() : _persistent() { }
362 
363  bool operator!() { return !_persistent; }
364  explicit operator bool() { return bool(_persistent); }
365 
366  YODA::Scatter2D* operator->() { return _persistent.get(); }
367 
368  YODA::Scatter2D* operator->() const { return _persistent.get(); }
369 
370  YODA::Scatter2D & operator*() { return *_persistent; }
371 
372  const YODA::Scatter2D & operator*() const { return *_persistent; }
373 
374  protected:
375  vector<YODA::Scatter2DPtr> _persistent;
376  };
377 
378  class Scatter3DPtr : public AnalysisObjectPtr {
379  public:
380  Scatter3DPtr(size_t len_of_weightvec, const YODA::Scatter3D& p) {
381  for (size_t m = 0; m < len_of_weightvec; ++m)
382  _persistent.push_back(make_shared<YODA::Scatter3D>(p));
383  }
384 
385  Scatter3DPtr() : _persistent() { }
386 
387  bool operator!() { return !_persistent; }
388  explicit operator bool() { return bool(_persistent); }
389 
390  YODA::Scatter3D* operator->() { return _persistent.get(); }
391 
392  YODA::Scatter3D* operator->() const { return _persistent.get(); }
393 
394  YODA::Scatter3D & operator*() { return *_persistent; }
395 
396  const YODA::Scatter3D & operator*() const { return *_persistent; }
397 
398  protected:
399  vector<YODA::Scatter3DPtr> _persistent;
400  };
401  */
402 
403 
409  class MultiweightAOWrapper : public AnalysisObjectWrapper {
410  public:
411 
413  using Inner = YODA::AnalysisObject;
414 
416  virtual void newSubEvent() = 0;
417 
419  virtual void pushToPersistent(const vector<std::valarray<double> >& weight, double nlowfrac=0.0) = 0;
420 
422  virtual void pushToFinal() = 0;
423 
425  virtual YODA::AnalysisObjectPtr activeYODAPtr() const = 0;
426 
428  virtual string basePath() const = 0;
429 
430  };
431 
432 
433 
447  template <class T>
448  class Wrapper : public MultiweightAOWrapper {
449  public:
450 
451  friend class Analysis;
452  friend class AnalysisHandler;
453 
455  using Inner = T;
458  using TPtr = shared_ptr<T>;
459 
460 
461  Wrapper() = default;
462 
463  Wrapper(const vector<string>& weightnames, const T& p);
464 
465  ~Wrapper();
466 
467 
469  shared_ptr<T> active() const;
470 
472  string basePath() const { return _basePath; }
473 
475  string baseName() const { return _baseName; }
476 
477 
479  explicit operator bool() const { return static_cast<bool>(_active); } // Don't use active() here, assert will catch
480 
482  bool operator ! () const { return !_active; } // Don't use active() here, assert will catch
483 
484 
486  T* operator -> () { return active().get(); }
487 
489  T* operator -> () const { return active().get(); }
490 
492  T& operator * () { return *active(); }
493 
495  const T& operator * () const { return *active(); }
496 
497 
500  friend bool operator == (Wrapper a, Wrapper b){
501  if (a._persistent.size() != b._persistent.size())
502  return false;
503 
504  for (size_t i = 0; i < a._persistent.size(); i++) {
505  if (a._persistent.at(i) != b._persistent.at(i)) {
506  return false;
507  }
508  }
509  return true;
510  }
511 
513  friend bool operator != (Wrapper a, Wrapper b) {
514  return !(a == b);
515  }
516 
518  friend bool operator < (Wrapper a, Wrapper b) {
519  if (a._persistent.size() >= b._persistent.size())
520  return false;
521  for (size_t i = 0; i < a._persistent.size(); i++) {
522  if (*(a._persistent.at(i)) >= *(b._persistent.at(i))) {
523  return false;
524  }
525  }
526  return true;
527  }
528 
529 
538  T* _getPersistent(size_t iWeight) { return _persistent.at(iWeight).get(); }
539 
540 
541 
542  private:
543 
556 
558  void setActiveWeightIdx(size_t iWeight) {
559  _active = _persistent.at(iWeight);
560  }
561 
563  void setActiveFinalWeightIdx(size_t iWeight) {
564  _active = _final.at(iWeight);
565  }
566 
568  void unsetActiveWeight() { _active.reset(); }
569 
571  void reset() { active()->reset(); }
572 
573 
578  void newSubEvent();
579 
581  void pushToPersistent(const vector<std::valarray<double> >& weight, double nlowfrac=0.0);
582 
584  void pushToFinal();
585 
586 
588  const vector<shared_ptr<T>>& persistent() const { return _persistent; }
589 
591  const vector<shared_ptr<T>>& final() const { return _final; }
592 
594  virtual YODA::AnalysisObjectPtr activeYODAPtr() const { return _active; }
595 
597  // operator typename TPtr () { return _active; }
598 
600 
601 
604 
606  vector<shared_ptr<T>> _persistent;
607 
609  vector<shared_ptr<T>> _final;
610 
612  vector<shared_ptr<TupleWrapper<T>>> _evgroup;
613 
615  shared_ptr<T> _active;
616 
618  string _basePath;
619 
621  string _baseName;
622 
623  };
624 
625 
626 
636  template <typename T>
637  class rivet_shared_ptr {
638  public:
639  typedef T value_type;
640 
641  rivet_shared_ptr() = default;
642 
643  rivet_shared_ptr(decltype(nullptr)) : _p(nullptr) {}
644 
646  rivet_shared_ptr(const vector<string>& weightNames, const typename T::Inner& p)
647  : _p( make_shared<T>(weightNames, p) )
648  {}
649 
651  template <typename U>
652  rivet_shared_ptr(const shared_ptr<U>& p)
653  : _p(p)
654  {}
655 
657  template <typename U>
658  rivet_shared_ptr(const rivet_shared_ptr<U>& p)
659  : _p(p.get())
660  {}
661 
663  T& operator -> () {
664  if (_p == nullptr) throw Error("Dereferencing null AnalysisObject pointer. Is there an unbooked histogram variable?");
665  return *_p;
666  }
667 
669  const T& operator -> () const {
670  if (_p == nullptr) throw Error("Dereferencing null AnalysisObject pointer. Is there an unbooked histogram variable?");
671  return *_p;
672  }
673 
675  typename T::Inner & operator * () { return **_p; }
676  const typename T::Inner & operator * () const { return **_p; }
677 
679  explicit operator bool() const { return _p && bool(*_p); }
680 
682  bool operator ! () const { return !_p || !(*_p); }
683 
685  template <typename U>
686  bool operator == (const rivet_shared_ptr<U>& other) const {
687  return _p == other._p;
688  }
689 
691  template <typename U>
692  bool operator != (const rivet_shared_ptr<U>& other) const {
693  return _p != other._p;
694  }
695 
697  template <typename U>
698  bool operator < (const rivet_shared_ptr<U>& other) const {
699  return _p < other._p;
700  }
701 
703  template <typename U>
704  bool operator > (const rivet_shared_ptr<U>& other) const {
705  return _p > other._p;
706  }
707 
709  template <typename U>
710  bool operator <= (const rivet_shared_ptr<U> & other) const {
711  return _p <= other._p;
712  }
713 
715  template <typename U>
716  bool operator >= (const rivet_shared_ptr<U> & other) const {
717  return _p >= other._p;
718  }
719 
721  shared_ptr<T> get() const { return _p; }
722 
723  private:
724 
726  shared_ptr<T> _p;
727 
728  };
729 
730 
737 
738  using MultiweightAOPtr = rivet_shared_ptr<MultiweightAOWrapper>;
739 
740  using Histo1DPtr = rivet_shared_ptr<Wrapper<YODA::Histo1D>>;
741  using Histo2DPtr = rivet_shared_ptr<Wrapper<YODA::Histo2D>>;
742  using Profile1DPtr = rivet_shared_ptr<Wrapper<YODA::Profile1D>>;
743  using Profile2DPtr = rivet_shared_ptr<Wrapper<YODA::Profile2D>>;
744  using CounterPtr = rivet_shared_ptr<Wrapper<YODA::Counter>>;
745  using Scatter1DPtr = rivet_shared_ptr<Wrapper<YODA::Scatter1D>>;
746  using Scatter2DPtr = rivet_shared_ptr<Wrapper<YODA::Scatter2D>>;
747  using Scatter3DPtr = rivet_shared_ptr<Wrapper<YODA::Scatter3D>>;
748 
749  using YODA::Counter;
750  using YODA::Histo1D;
751  using YODA::HistoBin1D;
752  using YODA::Histo2D;
753  using YODA::HistoBin2D;
754  using YODA::Profile1D;
755  using YODA::ProfileBin1D;
756  using YODA::Profile2D;
757  using YODA::ProfileBin2D;
758  using YODA::Scatter1D;
759  using YODA::Point1D;
760  using YODA::Scatter2D;
761  using YODA::Point2D;
762  using YODA::Scatter3D;
763  using YODA::Point3D;
764 
766 
767 
768 
769 
770 
773 
776  map<string, YODA::AnalysisObjectPtr> getRefData(const string& papername);
777 
779 
781  string getDatafilePath(const string& papername);
782 
783 
785  template<typename T> struct ReferenceTraits {};
786  template <> struct ReferenceTraits<Counter> { typedef Counter RefT; };
787  template <> struct ReferenceTraits<Scatter1D> { typedef Scatter1D RefT; };
788  template <> struct ReferenceTraits<Histo1D> { typedef Scatter2D RefT; };
789  template <> struct ReferenceTraits<Profile1D> { typedef Scatter2D RefT; };
790  template <> struct ReferenceTraits<Scatter2D> { typedef Scatter2D RefT; };
791  template <> struct ReferenceTraits<Histo2D> { typedef Scatter3D RefT; };
792  template <> struct ReferenceTraits<Profile2D> { typedef Scatter3D RefT; };
793  template <> struct ReferenceTraits<Scatter3D> { typedef Scatter3D RefT; };
794 
798  template <typename T>
799  inline bool aocopy(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst) {
800  shared_ptr<T> tsrc = dynamic_pointer_cast<T>(src);
801  if ( !tsrc ) return false;
802  shared_ptr<T> tdst = dynamic_pointer_cast<T>(dst);
803  if ( !tdst ) return false;
804  *tdst = *tsrc;
805  return true;
806  }
807 
812  template <typename T>
813  inline bool aocopy(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, double scale) {
814  if (!aocopy<T>(src, dst)) return false;
815  dynamic_pointer_cast<T>(dst)->scaleW(scale);
816  return true;
817  }
818 
822  template <typename T>
823  inline bool aoadd(YODA::AnalysisObjectPtr dst, YODA::AnalysisObjectPtr src, double scale) {
824  shared_ptr<T> tsrc = dynamic_pointer_cast<T>(src);
825  if ( !tsrc ) return false;
826  shared_ptr<T> tdst = dynamic_pointer_cast<T>(dst);
827  if ( !tdst ) return false;
828  tsrc->scaleW(scale); //< note semi-accidental modification of the input
829  try {
830  *tdst += *tsrc;
831  } catch (YODA::LogicError&) {
832  return false;
833  }
834  return true;
835  }
836 
839  bool copyao(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, double scale=1.0);
840 
844  bool addaos(YODA::AnalysisObjectPtr dst, YODA::AnalysisObjectPtr src, double scale);
845 
848  template <typename TPtr>
849  inline bool bookingCompatible(TPtr a, TPtr b) {
850  return a->sameBinning(*b);
851  }
852  inline bool bookingCompatible(CounterPtr, CounterPtr) {
853  return true;
854  }
855  inline bool bookingCompatible(Scatter1DPtr a, Scatter1DPtr b) {
856  return a->numPoints() == b->numPoints();
857  }
858  inline bool bookingCompatible(Scatter2DPtr a, Scatter2DPtr b) {
859  return a->numPoints() == b->numPoints();
860  }
861  inline bool bookingCompatible(Scatter3DPtr a, Scatter3DPtr b) {
862  return a->numPoints() == b->numPoints();
863  }
864  inline bool bookingCompatible(YODA::CounterPtr, YODA::CounterPtr) {
865  return true;
866  }
867  inline bool bookingCompatible(YODA::Scatter1DPtr a, YODA::Scatter1DPtr b) {
868  return a->numPoints() == b->numPoints();
869  }
870  inline bool bookingCompatible(YODA::Scatter2DPtr a, YODA::Scatter2DPtr b) {
871  return a->numPoints() == b->numPoints();
872  }
873  inline bool bookingCompatible(YODA::Scatter3DPtr a, YODA::Scatter3DPtr b) {
874  return a->numPoints() == b->numPoints();
875  }
876 
878 
879 
880 
882  class AOPath {
883  public:
884 
886  AOPath(string fullpath)
887  : _valid(false), _path(fullpath), _raw(false), _tmp(false), _ref(false) {
888  _valid = init(fullpath);
889  }
890 
892  string path() const { return _path; }
893 
895  string analysis() const { return _analysis; }
896 
898  string analysisWithOptions() const { return _analysis + _optionstring; }
899 
901  string name() const { return _name; }
902 
904  string weight() const { return _weight; }
905 
907  string weightComponent() const {
908  if (_weight == "") return _weight;
909  return "[" + _weight + "]";
910  }
911 
913  bool isRaw() const { return _raw; }
914 
915  // Is This a temporary (filling) object?
916  bool isTmp() const { return _tmp; }
917 
919  bool isRef() const { return _ref; }
920 
922  string optionString() const { return _optionstring; }
923 
925  bool hasOptions() const { return !_options.empty(); }
926 
928  void removeOption(string opt) { _options.erase(opt); fixOptionString(); }
929 
931  void setOption(string opt, string val) { _options[opt] = val; fixOptionString();}
932 
934  bool hasOption(string opt) const { return _options.find(opt) != _options.end(); }
935 
937  string getOption(string opt) const {
938  auto it = _options.find(opt);
939  if ( it != _options.end() ) return it->second;
940  return "";
941  }
942 
944  void fixOptionString();
945 
947  string mkPath() const;
948  string setPath() { return _path = mkPath(); }
949 
951  void debug() const;
952 
954  bool operator<(const AOPath & other) const {
955  return _path < other._path;
956  }
957 
959  bool valid() const { return _valid; };
960  bool operator!() const { return !valid(); }
961 
962  private:
963 
965  bool init(string fullpath);
966  bool chopweight(string & fullpath);
967  bool chopoptions(string & anal);
968 
969  bool _valid;
970  string _path;
971  string _analysis;
972  string _optionstring;
973  string _name;
974  string _weight;
975  bool _raw;
976  bool _tmp;
977  bool _ref;
978  map<string,string> _options;
979 
980  };
981 
982 }
983 
984 #endif
Definition: MC_Cent_pPb.hh:10
bool aoadd(YODA::AnalysisObjectPtr dst, YODA::AnalysisObjectPtr src, double scale)
Definition: RivetYODA.hh:823
bool bookingCompatible(TPtr a, TPtr b)
Definition: RivetYODA.hh:849
bool copyao(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, double scale=1.0)
Generic runtime Rivet error.
Definition: Exceptions.hh:12
This is the base class of all analysis classes in Rivet.
Definition: Analysis.hh:64
Definition: RivetYODA.hh:18
bool aocopy(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, double scale)
Definition: RivetYODA.hh:813
pair< typename T::FillType, Weight > Fill
A single fill is a (FillType, Weight) pair.
Definition: RivetYODA.hh:49
The key class for coordination of Analysis objects and the event loop.
Definition: AnalysisHandler.hh:23
multiset< Fill< T > > Fills
Definition: RivetYODA.hh:54
map< string, YODA::AnalysisObjectPtr > getRefData(const string &papername)
BoolJetNOT operator!(const JetSelector &a)
Operator syntactic sugar for NOT construction.
Definition: JetUtils.hh:97
bool addaos(YODA::AnalysisObjectPtr dst, YODA::AnalysisObjectPtr src, double scale)
double Weight
Typedef for weights.
Definition: RivetYODA.hh:45
string getDatafilePath(const string &papername)
Get the file system path to the reference file for this paper.