1 #ifndef SimDataFormats_GeneratorProducts_GenLumiInfoProduct_h 2 #define SimDataFormats_GeneratorProducts_GenLumiInfoProduct_h 48 operator double()
const {
return value_; }
63 FinalStat(
unsigned int n1,
double sum1,
double sum21) :
64 n_(n1), sum_(sum1), sum2_(sum21) {}
66 n_(other.n_), sum_(other.sum_), sum2_(other.sum2_) {}
68 unsigned int n()
const {
return n_; }
69 double sum()
const {
return sum_; }
70 double sum2()
const{
return sum2_; }
73 if (other.
n() != 0 and other.
sum_ != -1. and other.
sum2() != -1.) {
76 sum2_ += other.
sum2();
81 {
return n_ == other.
n_ && sum_ == other.
sum_ && sum2_ == other.
sum2_; }
92 ProcessInfo():process_(-1),nPassPos_(0),nPassNeg_(0),nTotalPos_(0),nTotalNeg_(0){}
93 ProcessInfo(
int id):process_(id),nPassPos_(0),nPassNeg_(0),nTotalPos_(0),nTotalNeg_(0){}
99 unsigned int nPassPos()
const {
return nPassPos_;}
117 tried_.add(other.
tried());
119 killed_.add(other.
killed());
140 if (lheXSec_.value() <= 0.) {
143 bool useWeights = (lheXSec_.error() <= 0. || iXSec.
error() <= 0.);
144 double wgt1 = useWeights ? selected().sum() : 1. / (lheXSec_.error() * lheXSec_.error());
145 double wgt2 = useWeights ? iWeight : 1. / (iXSec.
error() * iXSec.
error());
146 double xsec = (wgt1 * lheXSec_.value() + wgt2 * iXSec.
value()) / (wgt1 + wgt2);
147 double err = useWeights ? 0. : 1.0 /
std::sqrt(wgt1 + wgt2);
148 lheXSec_ =
XSec(xsec, err);
179 #endif // SimDataFormats_GeneratorProducts_GenLumiInfoProduct_h void setNPassNeg(unsigned int n)
const std::vector< ProcessInfo > & getProcessInfos() const
void add(const FinalStat &other)
void setTried(unsigned int n, double sum, double sum2)
void setNTotalNeg(unsigned int n)
unsigned int nTotalNeg() const
bool operator!=(const XSec &other) const
void setSelected(unsigned int n, double sum, double sum2)
virtual ~GenLumiInfoProduct()
unsigned int nPassPos() const
void mergeXSec(XSec const &iXSec, double iWeight)
void setKilled(unsigned int n, double sum, double sum2)
void swap(GenLumiInfoProduct &other)
unsigned int nPassNeg() const
FinalStat const & tried() const
XSec const & lheXSec() const
void setAccepted(unsigned int n, double sum, double sum2)
FinalStat(unsigned int n1, double sum1, double sum21)
void setAcceptedBr(unsigned int n, double sum, double sum2)
XSec(double v, double e=-1.)
void setNTotalPos(unsigned int n)
virtual bool isProductEqual(const GenLumiInfoProduct &other) const
FinalStat const & killed() const
virtual bool mergeProduct(const GenLumiInfoProduct &other)
void setLheXSec(double value, double err)
void setHEPIDWTUP(const int id)
bool operator==(const XSec &other) const
FinalStat const & accepted() const
void setNPassPos(unsigned int n)
FinalStat const & acceptedBr() const
void addOthers(const ProcessInfo &other)
unsigned int nTotalPos() const
FinalStat(const FinalStat &other)
void setProcessInfo(const std::vector< ProcessInfo > &processes)
std::vector< ProcessInfo > internalProcesses_
const int getHEPIDWTUP() const
FinalStat const & selected() const