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

const FinalStataccepted () const
 
const FinalStatacceptedBr () const
 
void addOthers (const ProcessInfo &other)
 
const FinalStatkilled () const
 
const XSeclheXSec () const
 
unsigned int nPassNeg () const
 
unsigned int nPassPos () const
 
unsigned int nTotalNeg () const
 
unsigned int nTotalPos () const
 
int process () const
 
 ProcessInfo ()
 
 ProcessInfo (int id)
 
const FinalStatselected () 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)
 
const FinalStattried () 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 86 of file GenLumiInfoProduct.h.

Constructor & Destructor Documentation

◆ ProcessInfo() [1/2]

GenLumiInfoProduct::ProcessInfo::ProcessInfo ( )
inline

Definition at line 88 of file GenLumiInfoProduct.h.

88 : process_(-1), nPassPos_(0), nPassNeg_(0), nTotalPos_(0), nTotalNeg_(0) {}

◆ ProcessInfo() [2/2]

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

Definition at line 89 of file GenLumiInfoProduct.h.

89 : process_(id), nPassPos_(0), nPassNeg_(0), nTotalPos_(0), nTotalNeg_(0) {}

Member Function Documentation

◆ accepted()

const FinalStat& GenLumiInfoProduct::ProcessInfo::accepted ( ) const
inline

Definition at line 103 of file GenLumiInfoProduct.h.

103 { return accepted_; }

References accepted_.

Referenced by operator==().

◆ acceptedBr()

const FinalStat& GenLumiInfoProduct::ProcessInfo::acceptedBr ( ) const
inline

Definition at line 104 of file GenLumiInfoProduct.h.

104 { return acceptedBr_; }

References acceptedBr_.

Referenced by operator==().

◆ addOthers()

void GenLumiInfoProduct::ProcessInfo::addOthers ( const ProcessInfo other)
inline

Definition at line 107 of file GenLumiInfoProduct.h.

107  {
108  mergeXSec(other.lheXSec(), other.selected().sum());
109  nPassPos_ += other.nPassPos();
110  nPassNeg_ += other.nPassNeg();
111  nTotalPos_ += other.nTotalPos();
112  nTotalNeg_ += other.nTotalNeg();
113  tried_.add(other.tried());
114  selected_.add(other.selected());
115  killed_.add(other.killed());
116  accepted_.add(other.accepted());
117  acceptedBr_.add(other.acceptedBr());
118  }

References accepted_, acceptedBr_, GenLumiInfoProduct::FinalStat::add(), killed_, mergeXSec(), nPassNeg_, nPassPos_, nTotalNeg_, nTotalPos_, trackingPlots::other, selected_, and tried_.

◆ killed()

const FinalStat& GenLumiInfoProduct::ProcessInfo::killed ( ) const
inline

Definition at line 102 of file GenLumiInfoProduct.h.

102 { return killed_; }

References killed_.

Referenced by operator==().

◆ lheXSec()

const XSec& GenLumiInfoProduct::ProcessInfo::lheXSec ( ) const
inline

Definition at line 93 of file GenLumiInfoProduct.h.

93 { return lheXSec_; }

References lheXSec_.

Referenced by operator!=(), and operator==().

◆ mergeXSec()

void GenLumiInfoProduct::ProcessInfo::mergeXSec ( XSec const &  iXSec,
double  iWeight 
)
inlineprivate

Definition at line 132 of file GenLumiInfoProduct.h.

132  {
133  if (iWeight <= 0.) {
134  return;
135  }
136  if (lheXSec_.value() <= 0.) {
137  lheXSec_ = iXSec;
138  } else {
139  bool useWeights = (lheXSec_.error() <= 0. || iXSec.error() <= 0.);
140  double wgt1 = useWeights ? selected().sum() : 1. / (lheXSec_.error() * lheXSec_.error());
141  double wgt2 = useWeights ? iWeight : 1. / (iXSec.error() * iXSec.error());
142  double xsec = (wgt1 * lheXSec_.value() + wgt2 * iXSec.value()) / (wgt1 + wgt2);
143  double err = useWeights ? 0. : 1.0 / std::sqrt(wgt1 + wgt2);
144  lheXSec_ = XSec(xsec, err);
145  }
146  }

References runTheMatrix::err, GenLumiInfoProduct::XSec::error(), lheXSec_, selected(), mathSSE::sqrt(), GenLumiInfoProduct::FinalStat::sum(), and GenLumiInfoProduct::XSec::value().

Referenced by addOthers().

◆ nPassNeg()

unsigned int GenLumiInfoProduct::ProcessInfo::nPassNeg ( ) const
inline

Definition at line 96 of file GenLumiInfoProduct.h.

96 { return nPassNeg_; }

References nPassNeg_.

Referenced by operator==().

◆ nPassPos()

unsigned int GenLumiInfoProduct::ProcessInfo::nPassPos ( ) const
inline

Definition at line 95 of file GenLumiInfoProduct.h.

95 { return nPassPos_; }

References nPassPos_.

Referenced by operator==().

◆ nTotalNeg()

unsigned int GenLumiInfoProduct::ProcessInfo::nTotalNeg ( ) const
inline

Definition at line 98 of file GenLumiInfoProduct.h.

98 { return nTotalNeg_; }

References nTotalNeg_.

Referenced by operator==().

◆ nTotalPos()

unsigned int GenLumiInfoProduct::ProcessInfo::nTotalPos ( ) const
inline

Definition at line 97 of file GenLumiInfoProduct.h.

97 { return nTotalPos_; }

References nTotalPos_.

Referenced by operator==().

◆ process()

int GenLumiInfoProduct::ProcessInfo::process ( ) const
inline

Definition at line 92 of file GenLumiInfoProduct.h.

92 { return process_; }

References process_.

Referenced by operator!=(), operator<(), and operator==().

◆ selected()

const FinalStat& GenLumiInfoProduct::ProcessInfo::selected ( ) const
inline

Definition at line 101 of file GenLumiInfoProduct.h.

101 { return selected_; }

References selected_.

Referenced by mergeXSec(), and operator==().

◆ setAccepted()

void GenLumiInfoProduct::ProcessInfo::setAccepted ( unsigned int  n,
double  sum,
double  sum2 
)
inline

Definition at line 128 of file GenLumiInfoProduct.h.

128 { accepted_ = FinalStat(n, sum, sum2); }

References accepted_, dqmiodumpmetadata::n, and combinedConstraintHelpers::sum2().

◆ setAcceptedBr()

void GenLumiInfoProduct::ProcessInfo::setAcceptedBr ( unsigned int  n,
double  sum,
double  sum2 
)
inline

Definition at line 129 of file GenLumiInfoProduct.h.

129 { acceptedBr_ = FinalStat(n, sum, sum2); }

References acceptedBr_, dqmiodumpmetadata::n, and combinedConstraintHelpers::sum2().

◆ setKilled()

void GenLumiInfoProduct::ProcessInfo::setKilled ( unsigned int  n,
double  sum,
double  sum2 
)
inline

Definition at line 127 of file GenLumiInfoProduct.h.

127 { killed_ = FinalStat(n, sum, sum2); }

References killed_, dqmiodumpmetadata::n, and combinedConstraintHelpers::sum2().

◆ setLheXSec()

void GenLumiInfoProduct::ProcessInfo::setLheXSec ( double  value,
double  err 
)
inline

Definition at line 120 of file GenLumiInfoProduct.h.

120 { lheXSec_ = XSec(value, err); }

References runTheMatrix::err, and lheXSec_.

◆ setNPassNeg()

void GenLumiInfoProduct::ProcessInfo::setNPassNeg ( unsigned int  n)
inline

Definition at line 122 of file GenLumiInfoProduct.h.

122 { nPassNeg_ = n; }

References dqmiodumpmetadata::n, and nPassNeg_.

◆ setNPassPos()

void GenLumiInfoProduct::ProcessInfo::setNPassPos ( unsigned int  n)
inline

Definition at line 121 of file GenLumiInfoProduct.h.

121 { nPassPos_ = n; }

References dqmiodumpmetadata::n, and nPassPos_.

◆ setNTotalNeg()

void GenLumiInfoProduct::ProcessInfo::setNTotalNeg ( unsigned int  n)
inline

Definition at line 124 of file GenLumiInfoProduct.h.

124 { nTotalNeg_ = n; }

References dqmiodumpmetadata::n, and nTotalNeg_.

◆ setNTotalPos()

void GenLumiInfoProduct::ProcessInfo::setNTotalPos ( unsigned int  n)
inline

Definition at line 123 of file GenLumiInfoProduct.h.

123 { nTotalPos_ = n; }

References dqmiodumpmetadata::n, and nTotalPos_.

◆ setProcess()

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

Definition at line 119 of file GenLumiInfoProduct.h.

119 { process_ = id; }

References triggerObjects_cff::id, and process_.

◆ setSelected()

void GenLumiInfoProduct::ProcessInfo::setSelected ( unsigned int  n,
double  sum,
double  sum2 
)
inline

Definition at line 126 of file GenLumiInfoProduct.h.

126 { selected_ = FinalStat(n, sum, sum2); }

References dqmiodumpmetadata::n, selected_, and combinedConstraintHelpers::sum2().

◆ setTried()

void GenLumiInfoProduct::ProcessInfo::setTried ( unsigned int  n,
double  sum,
double  sum2 
)
inline

Definition at line 125 of file GenLumiInfoProduct.h.

125 { tried_ = FinalStat(n, sum, sum2); }

References dqmiodumpmetadata::n, combinedConstraintHelpers::sum2(), and tried_.

◆ tried()

const FinalStat& GenLumiInfoProduct::ProcessInfo::tried ( ) const
inline

Definition at line 100 of file GenLumiInfoProduct.h.

100 { return tried_; }

References tried_.

Referenced by operator==().

Member Data Documentation

◆ accepted_

FinalStat GenLumiInfoProduct::ProcessInfo::accepted_
private

Definition at line 156 of file GenLumiInfoProduct.h.

Referenced by accepted(), addOthers(), and setAccepted().

◆ acceptedBr_

FinalStat GenLumiInfoProduct::ProcessInfo::acceptedBr_
private

Definition at line 157 of file GenLumiInfoProduct.h.

Referenced by acceptedBr(), addOthers(), and setAcceptedBr().

◆ killed_

FinalStat GenLumiInfoProduct::ProcessInfo::killed_
private

Definition at line 155 of file GenLumiInfoProduct.h.

Referenced by addOthers(), killed(), and setKilled().

◆ lheXSec_

XSec GenLumiInfoProduct::ProcessInfo::lheXSec_
private

Definition at line 148 of file GenLumiInfoProduct.h.

Referenced by lheXSec(), mergeXSec(), and setLheXSec().

◆ nPassNeg_

unsigned int GenLumiInfoProduct::ProcessInfo::nPassNeg_
private

Definition at line 150 of file GenLumiInfoProduct.h.

Referenced by addOthers(), nPassNeg(), and setNPassNeg().

◆ nPassPos_

unsigned int GenLumiInfoProduct::ProcessInfo::nPassPos_
private

Definition at line 149 of file GenLumiInfoProduct.h.

Referenced by addOthers(), nPassPos(), and setNPassPos().

◆ nTotalNeg_

unsigned int GenLumiInfoProduct::ProcessInfo::nTotalNeg_
private

Definition at line 152 of file GenLumiInfoProduct.h.

Referenced by addOthers(), nTotalNeg(), and setNTotalNeg().

◆ nTotalPos_

unsigned int GenLumiInfoProduct::ProcessInfo::nTotalPos_
private

Definition at line 151 of file GenLumiInfoProduct.h.

Referenced by addOthers(), nTotalPos(), and setNTotalPos().

◆ process_

int GenLumiInfoProduct::ProcessInfo::process_
private

Definition at line 147 of file GenLumiInfoProduct.h.

Referenced by process(), and setProcess().

◆ selected_

FinalStat GenLumiInfoProduct::ProcessInfo::selected_
private

Definition at line 154 of file GenLumiInfoProduct.h.

Referenced by addOthers(), selected(), and setSelected().

◆ tried_

FinalStat GenLumiInfoProduct::ProcessInfo::tried_
private

Definition at line 153 of file GenLumiInfoProduct.h.

Referenced by addOthers(), setTried(), and tried().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GenLumiInfoProduct::ProcessInfo::mergeXSec
void mergeXSec(XSec const &iXSec, double iWeight)
Definition: GenLumiInfoProduct.h:132
GenLumiInfoProduct::XSec::error
double error() const
Definition: GenLumiInfoProduct.h:41
GenLumiInfoProduct::ProcessInfo::process_
int process_
Definition: GenLumiInfoProduct.h:147
GenLumiInfoProduct::ProcessInfo::tried_
FinalStat tried_
Definition: GenLumiInfoProduct.h:153
GenLumiInfoProduct::XSec::value
double value() const
Definition: GenLumiInfoProduct.h:40
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
trackingPlots.other
other
Definition: trackingPlots.py:1465
runTheMatrix.err
err
Definition: runTheMatrix.py:288
GenLumiInfoProduct::ProcessInfo::accepted_
FinalStat accepted_
Definition: GenLumiInfoProduct.h:156
GenLumiInfoProduct::ProcessInfo::nPassPos_
unsigned int nPassPos_
Definition: GenLumiInfoProduct.h:149
GenLumiInfoProduct::ProcessInfo::selected
const FinalStat & selected() const
Definition: GenLumiInfoProduct.h:101
value
Definition: value.py:1
combinedConstraintHelpers::sum2
void sum2(T &x, T y)
Definition: CombinedKinematicConstraintT.h:74
GenLumiInfoProduct::ProcessInfo::selected_
FinalStat selected_
Definition: GenLumiInfoProduct.h:154
GenLumiInfoProduct::FinalStat::sum
double sum() const
Definition: GenLumiInfoProduct.h:63
GenLumiInfoProduct::ProcessInfo::nTotalNeg_
unsigned int nTotalNeg_
Definition: GenLumiInfoProduct.h:152
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
GenLumiInfoProduct::ProcessInfo::killed_
FinalStat killed_
Definition: GenLumiInfoProduct.h:155
GenLumiInfoProduct::ProcessInfo::nTotalPos_
unsigned int nTotalPos_
Definition: GenLumiInfoProduct.h:151
GenLumiInfoProduct::ProcessInfo::acceptedBr_
FinalStat acceptedBr_
Definition: GenLumiInfoProduct.h:157
GenLumiInfoProduct::FinalStat::add
void add(const FinalStat &other)
Definition: GenLumiInfoProduct.h:66
GenLumiInfoProduct::ProcessInfo::nPassNeg_
unsigned int nPassNeg_
Definition: GenLumiInfoProduct.h:150
GenLumiInfoProduct::ProcessInfo::lheXSec_
XSec lheXSec_
Definition: GenLumiInfoProduct.h:148