// -*- C++ -*- #ifndef __SCHOOL_mc_integral_H__ #define __SCHOOL_mc_integral_H__ 1 #include "event.h" #include "matrix-element.h" #include "qcd-pdf.h" #include "analysis-handler.h" namespace school { class mc_integral { public: // constructor mc_integral(double Ecm, const qcd_hadron *pdf1, const qcd_hadron *pdf2, const matrix_element *me) : _M_Ecm(Ecm), _M_pdf1(pdf1), _M_pdf2(pdf2), _M_me(me) {} // generate one event and DON'T analyse it void operator()(); // generate one event and analyse it void operator()(analysis_handler *ah) { this->operator()(); ah -> analyze(_TMP_p, _TMP_weight); } private: // collider energy double _M_Ecm; // pdfs of the incoming hadrons const qcd_hadron *_M_pdf1, *_M_pdf2; // Matrix element const matrix_element *_M_me; // temporary variable to avoid allocations and deallocations // this is always the last generated event mutable event _TMP_p; mutable double _TMP_weight; }; } #endif