9 #ifndef THEPEG_XSecStat_H
10 #define THEPEG_XSecStat_H
15 #include "ThePEG/Config/ThePEG.h"
81 for(
unsigned int ix=0;ix<5;++ix) {
131 void reweight(
double oldWeight,
double newWeight) {
long theVetoed
Number of events vetoed after being accepted.
void reset()
Reset the statistics.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
void select(double weight)
An event of the corresponding class has been attempted.
void accept()
An event of the corresponding class has been accepted.
long attempts() const
Number of attempts so far.
double sumWeights2() const
The sum of the squared weights so far.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
CrossSection xSecErr() const
The current estimate of the error in the cross section for the corresponding class of events...
void output(PersistentOStream &os) const
Output to a persistent stream.
XSecStat()
The default constructor.
void input(PersistentIStream &is)
Input from a persistent stream.
CrossSection xSecNoReweight() const
The current estimate of the cross section for the corresponding class of events, excluding reweightin...
This is the main namespace within which all identifiers in ThePEG are declared.
long theAccepted
Number of accepted events so far.
XSecStat & operator=(const XSecStat &x)
The assignment operator.
CrossSection theMaxXSec
The overestimated cross section.
void reject(double weight=1.0)
Reject the event which was last accepted with accept() or selected with select(double).
vector< double > theSumWeights
The sum of the weights so far.
double theLastWeight
The last selected weight, ignoring reweighting.
void reweight(double oldWeight, double newWeight)
Reweight a selected and accepted event.
void maxXSec(CrossSection x)
Set the overestimated cross section.
vector< T > & operator>>(vector< T > &tv, U &u)
Overload the right shift operator for vector to pop objects from a vector.
double sumWeightsNoReweight() const
The sum of the weights so far, excluding reweighting.
long accepted() const
Number of attempts so far.
const ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
long theAttempts
Number of attempts so far.
double sumWeights2NoReweight() const
The sum of the squared weights so far, excluding reweighting.
CrossSection xSec() const
The current estimate of the cross section for the corresponding class of events.
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
CrossSection maxXSec() const
The overestimated cross section.
CrossSection xSecErrNoReweight() const
The current estimate of the error in the cross section for the corresponding class of events...
This template class allows the compiler to check calculations with physical quantities for dimensiona...
vector< double > theSumWeights2
The sum of the squared weights so far.
double sumWeights() const
The sum of the weights so far.
XSecStat & operator+=(const XSecStat &x)
Add the contents of another XSecStat.
XSecStat(CrossSection xsecmax)
Constructor taking the overestimated cross section, xsecmax, as argument.
XSecStat is a concrete helper class used to collect statistics about the cross section for a specific...