Public Member Functions | Public Attributes | List of all members
evwgh::Weight_t Struct Reference

#include <Weight_t.h>

Public Member Functions

 Weight_t ()
 
std::vector< std::vector< double > > GetWeight (art::Event &e)
 

Public Attributes

std::string fName
 
WeightCalcfWeightCalc
 
std::string fWeightCalcType
 
double fMinWeight
 
double fMaxWeight
 
double fAvgWeight
 
long fNcalls
 
int fNmultisims
 

Detailed Description

Definition at line 9 of file Weight_t.h.

Constructor & Destructor Documentation

evwgh::Weight_t::Weight_t ( )
inline

Definition at line 11 of file Weight_t.h.

11  :
14  fAvgWeight(0),
15  fNcalls(0)
16  {}
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
double fMaxWeight
Definition: Weight_t.h:36
double fMinWeight
Definition: Weight_t.h:35
double fAvgWeight
Definition: Weight_t.h:37

Member Function Documentation

std::vector<std::vector<double> > evwgh::Weight_t::GetWeight ( art::Event e)
inline

Definition at line 18 of file Weight_t.h.

18  {
19  std::vector<std::vector<double> >wgh=fWeightCalc->GetWeight(e);
20  for (unsigned int inu=0;inu<wgh.size();inu++) {
21  double avgwgh=std::accumulate(wgh[inu].begin(),wgh[inu].end(),0.0)/wgh[inu].size();
22  fAvgWeight=(fAvgWeight*fNcalls+avgwgh)/float(fNcalls+1);
24  *std::min_element(wgh[inu].begin(),wgh[inu].end()));
26  *std::max_element(wgh[inu].begin(),wgh[inu].end()));
27  fNcalls++;
28  }
29 
30  return wgh;
31  }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
WeightCalc * fWeightCalc
Definition: Weight_t.h:33
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
double fMaxWeight
Definition: Weight_t.h:36
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
virtual std::vector< std::vector< double > > GetWeight(art::Event &e)=0
double fMinWeight
Definition: Weight_t.h:35
double fAvgWeight
Definition: Weight_t.h:37

Member Data Documentation

double evwgh::Weight_t::fAvgWeight

Definition at line 37 of file Weight_t.h.

double evwgh::Weight_t::fMaxWeight

Definition at line 36 of file Weight_t.h.

double evwgh::Weight_t::fMinWeight

Definition at line 35 of file Weight_t.h.

std::string evwgh::Weight_t::fName

Definition at line 32 of file Weight_t.h.

long evwgh::Weight_t::fNcalls

Definition at line 38 of file Weight_t.h.

int evwgh::Weight_t::fNmultisims

Definition at line 39 of file Weight_t.h.

WeightCalc* evwgh::Weight_t::fWeightCalc

Definition at line 33 of file Weight_t.h.

std::string evwgh::Weight_t::fWeightCalcType

Definition at line 34 of file Weight_t.h.


The documentation for this struct was generated from the following file: