CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
GenLumiInfoProduct::ProcessInfo Struct Reference

#include <GenLumiInfoProduct.h>

Public Member Functions

FinalStat const & accepted () const
 
FinalStat const & acceptedBr () const
 
void addOthers (const ProcessInfo &other)
 
FinalStat const & killed () const
 
XSec const & lheXSec () const
 
unsigned int nPassNeg () const
 
unsigned int nPassPos () const
 
unsigned int nTotalNeg () const
 
unsigned int nTotalPos () const
 
int process () const
 
 ProcessInfo ()
 
 ProcessInfo (int id)
 
FinalStat const & selected () const
 
void setAccepted (unsigned int n, double sum, double sum2)
 
void setAcceptedBr (unsigned int n, double sum, double sum2)
 
void setKilled (unsigned int n, double sum, double sum2)
 
void setLheXSec (double value, double err)
 
void setNPassNeg (unsigned int n)
 
void setNPassPos (unsigned int n)
 
void setNTotalNeg (unsigned int n)
 
void setNTotalPos (unsigned int n)
 
void setProcess (int id)
 
void setSelected (unsigned int n, double sum, double sum2)
 
void setTried (unsigned int n, double sum, double sum2)
 
FinalStat const & tried () const
 

Private Member Functions

void mergeXSec (XSec const &iXSec, double iWeight)
 

Private Attributes

FinalStat accepted_
 
FinalStat acceptedBr_
 
FinalStat killed_
 
XSec lheXSec_
 
unsigned int nPassNeg_
 
unsigned int nPassPos_
 
unsigned int nTotalNeg_
 
unsigned int nTotalPos_
 
int process_
 
FinalStat selected_
 
FinalStat tried_
 

Detailed Description

Definition at line 90 of file GenLumiInfoProduct.h.

Constructor & Destructor Documentation

GenLumiInfoProduct::ProcessInfo::ProcessInfo ( )
inline
GenLumiInfoProduct::ProcessInfo::ProcessInfo ( int  id)
inline

Member Function Documentation

FinalStat const& GenLumiInfoProduct::ProcessInfo::accepted ( ) const
inline
FinalStat const& GenLumiInfoProduct::ProcessInfo::acceptedBr ( ) const
inline
void GenLumiInfoProduct::ProcessInfo::addOthers ( const ProcessInfo other)
inline

Definition at line 111 of file GenLumiInfoProduct.h.

References accepted(), acceptedBr(), killed(), lheXSec(), nPassNeg(), nPassPos(), nTotalNeg(), nTotalPos(), selected(), GenLumiInfoProduct::FinalStat::sum(), and tried().

Referenced by GenLumiInfoProduct::mergeProduct().

111  {
112  mergeXSec(other.lheXSec(), other.selected().sum());
113  nPassPos_ += other.nPassPos();
114  nPassNeg_ += other.nPassNeg();
115  nTotalPos_ += other.nTotalPos();
116  nTotalNeg_ += other.nTotalNeg();
117  tried_.add(other.tried());
118  selected_.add(other.selected());
119  killed_.add(other.killed());
120  accepted_.add(other.accepted());
121  acceptedBr_.add(other.acceptedBr());
122  }
void add(const FinalStat &other)
void mergeXSec(XSec const &iXSec, double iWeight)
FinalStat const& GenLumiInfoProduct::ProcessInfo::killed ( ) const
inline
XSec const& GenLumiInfoProduct::ProcessInfo::lheXSec ( ) const
inline
void GenLumiInfoProduct::ProcessInfo::mergeXSec ( XSec const &  iXSec,
double  iWeight 
)
inlineprivate

Definition at line 136 of file GenLumiInfoProduct.h.

References GenLumiInfoProduct::XSec::error(), mathSSE::sqrt(), GenLumiInfoProduct::XSec::value(), and GenLumiInfoProduct::XSec::XSec().

136  {
137  if (iWeight <= 0.) {
138  return;
139  }
140  if (lheXSec_.value() <= 0.) {
141  lheXSec_ = iXSec;
142  } else {
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);
149  }
150  }
T sqrt(T t)
Definition: SSEVec.h:18
FinalStat const & selected() const
unsigned int GenLumiInfoProduct::ProcessInfo::nPassNeg ( ) const
inline
unsigned int GenLumiInfoProduct::ProcessInfo::nPassPos ( ) const
inline
unsigned int GenLumiInfoProduct::ProcessInfo::nTotalNeg ( ) const
inline
unsigned int GenLumiInfoProduct::ProcessInfo::nTotalPos ( ) const
inline
int GenLumiInfoProduct::ProcessInfo::process ( ) const
inline
FinalStat const& GenLumiInfoProduct::ProcessInfo::selected ( ) const
inline
void GenLumiInfoProduct::ProcessInfo::setAccepted ( unsigned int  n,
double  sum,
double  sum2 
)
inline
void GenLumiInfoProduct::ProcessInfo::setAcceptedBr ( unsigned int  n,
double  sum,
double  sum2 
)
inline
void GenLumiInfoProduct::ProcessInfo::setKilled ( unsigned int  n,
double  sum,
double  sum2 
)
inline
void GenLumiInfoProduct::ProcessInfo::setLheXSec ( double  value,
double  err 
)
inline
void GenLumiInfoProduct::ProcessInfo::setNPassNeg ( unsigned int  n)
inline
void GenLumiInfoProduct::ProcessInfo::setNPassPos ( unsigned int  n)
inline
void GenLumiInfoProduct::ProcessInfo::setNTotalNeg ( unsigned int  n)
inline
void GenLumiInfoProduct::ProcessInfo::setNTotalPos ( unsigned int  n)
inline
void GenLumiInfoProduct::ProcessInfo::setProcess ( int  id)
inline
void GenLumiInfoProduct::ProcessInfo::setSelected ( unsigned int  n,
double  sum,
double  sum2 
)
inline
void GenLumiInfoProduct::ProcessInfo::setTried ( unsigned int  n,
double  sum,
double  sum2 
)
inline
FinalStat const& GenLumiInfoProduct::ProcessInfo::tried ( ) const
inline

Member Data Documentation

FinalStat GenLumiInfoProduct::ProcessInfo::accepted_
private

Definition at line 160 of file GenLumiInfoProduct.h.

FinalStat GenLumiInfoProduct::ProcessInfo::acceptedBr_
private

Definition at line 161 of file GenLumiInfoProduct.h.

FinalStat GenLumiInfoProduct::ProcessInfo::killed_
private

Definition at line 159 of file GenLumiInfoProduct.h.

XSec GenLumiInfoProduct::ProcessInfo::lheXSec_
private

Definition at line 152 of file GenLumiInfoProduct.h.

unsigned int GenLumiInfoProduct::ProcessInfo::nPassNeg_
private

Definition at line 154 of file GenLumiInfoProduct.h.

unsigned int GenLumiInfoProduct::ProcessInfo::nPassPos_
private

Definition at line 153 of file GenLumiInfoProduct.h.

unsigned int GenLumiInfoProduct::ProcessInfo::nTotalNeg_
private

Definition at line 156 of file GenLumiInfoProduct.h.

unsigned int GenLumiInfoProduct::ProcessInfo::nTotalPos_
private

Definition at line 155 of file GenLumiInfoProduct.h.

int GenLumiInfoProduct::ProcessInfo::process_
private

Definition at line 151 of file GenLumiInfoProduct.h.

FinalStat GenLumiInfoProduct::ProcessInfo::selected_
private

Definition at line 158 of file GenLumiInfoProduct.h.

FinalStat GenLumiInfoProduct::ProcessInfo::tried_
private

Definition at line 157 of file GenLumiInfoProduct.h.