ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
CP::LhoodMMFitInfo Struct Reference

#include <LhoodMMFitInfo.h>

Collaboration diagram for CP::LhoodMMFitInfo:

Public Member Functions

 LhoodMMFitInfo (int nlep=1)
 
void add (LhoodMMFitInfo &rhs, int nLepMax)
 
void resizeVectors (unsigned nlep)
 
void reset ()
 

Public Attributes

std::vector< std::vector< std::vector< FakeBkgTools::Efficiency > > > coeffs_num
 
std::vector< std::vector< FakeBkgTools::Efficiency > > normterms
 
std::vector< std::vector< double > > event_cat
 
std::vector< std::vector< double > > event_sumw2
 
std::vector< std::vector< double > > OSfrac_num
 
std::vector< std::vector< double > > OSfrac_denom
 
int totEvents
 
std::vector< double > eventCount
 

Detailed Description

Definition at line 13 of file LhoodMMFitInfo.h.

Constructor & Destructor Documentation

◆ LhoodMMFitInfo()

LhoodMMFitInfo::LhoodMMFitInfo ( int  nlep = 1)

Definition at line 12 of file LhoodMMFitInfo.cxx.

12  {
13  reset();
14  resizeVectors(nlep);
15 }

Member Function Documentation

◆ add()

void LhoodMMFitInfo::add ( LhoodMMFitInfo rhs,
int  nLepMax 
)

Definition at line 35 of file LhoodMMFitInfo.cxx.

35  {
36 
37 
38  totEvents += rhs.totEvents;
39 
40  for (int ilep = 0; ilep < nLepMax; ilep++) {
41  eventCount[ilep] += rhs.eventCount[ilep];
42  }
43 
44  for (int ilep = 0; ilep < nLepMax; ilep++) {
45  for (int jlep = 0; jlep < (0x1 << (ilep+1)); jlep++) {
46  for (int klep = 0; klep < (0x1 << (ilep+1)); klep++) {
47  coeffs_num[ilep][jlep][klep].add(rhs.coeffs_num[ilep][jlep][klep]);
48  }
49  }
50 
51  for (int ientry = 0; ientry < (0x1 << (ilep+1)); ientry++) {
52  event_cat[ilep][ientry] += rhs.event_cat[ilep][ientry];
53  event_sumw2[ilep][ientry] += rhs.event_sumw2[ilep][ientry];
54  }
55 
56  }
57 
58  for (int ilep = 0; ilep <nLepMax; ilep++) {
59  for (int jlep = 0; jlep < pow(2,2*(ilep+1)); jlep++) {
60  normterms[ilep][jlep].add(rhs.normterms[ilep][jlep]);
61  }
62  }
63 
64  for (int ilep = 0; ilep <nLepMax; ilep++) {
65  for (int jlep = 0; jlep < ilep; jlep++) {
66  OSfrac_num[ilep][jlep]+=rhs.OSfrac_num[ilep][jlep];
67  OSfrac_denom[ilep][jlep]+=rhs.OSfrac_denom[ilep][jlep];
68  }
69  }
70 
71 }

◆ reset()

void LhoodMMFitInfo::reset ( )

Definition at line 17 of file LhoodMMFitInfo.cxx.

17  {
18 
19  totEvents = 0;
20 
21  event_cat.clear();
22  event_sumw2.clear();
23  coeffs_num.clear();
24 
25  normterms.clear();
26 
27  OSfrac_num.clear();
28  OSfrac_denom.clear();
29 
30  // start out with vectors large enough to hold info from single-lepton events
31  resizeVectors(1);
32 
33 }

◆ resizeVectors()

void LhoodMMFitInfo::resizeVectors ( unsigned  nlep)

Definition at line 73 of file LhoodMMFitInfo.cxx.

73  {
74 
75  // check that we're not being asked to shrink...
76  if (nlep < event_cat.size()) {
77  return;
78  }
79 
80  event_cat.resize(nlep);
81  event_sumw2.resize(nlep);
82  coeffs_num.resize(nlep);
83  eventCount.resize(nlep);
84 
85  for (unsigned ilep = 0; ilep < nlep; ilep++) {
86  coeffs_num[ilep].resize(pow(2,ilep+1));
87  event_cat[ilep].resize(pow(2,ilep+1));
88  event_sumw2[ilep].resize(pow(2,ilep+1));
89  for (int jlep = 0; jlep < pow(2,ilep+1); jlep++) {
90  coeffs_num[ilep][jlep].resize(pow(2,ilep+1));
91  }
92  }
93 
94  normterms.resize(nlep);
95  for (unsigned ilep = 0; ilep <nlep; ilep++) {
96  normterms[ilep].resize(pow(2,2*(ilep+1)));
97  }
98 
99  OSfrac_num.resize(nlep);
100  OSfrac_denom.resize(nlep);
101  for (unsigned ilep = 0; ilep <nlep; ilep++) {
102  OSfrac_num[ilep].resize(ilep+2);
103  OSfrac_denom[ilep].resize(ilep+2);
104  }
105 
106 }

Member Data Documentation

◆ coeffs_num

std::vector< std::vector < std::vector< FakeBkgTools::Efficiency> > > CP::LhoodMMFitInfo::coeffs_num

Definition at line 17 of file LhoodMMFitInfo.h.

◆ event_cat

std::vector<std::vector<double> > CP::LhoodMMFitInfo::event_cat

Definition at line 19 of file LhoodMMFitInfo.h.

◆ event_sumw2

std::vector<std::vector<double> > CP::LhoodMMFitInfo::event_sumw2

Definition at line 20 of file LhoodMMFitInfo.h.

◆ eventCount

std::vector<double> CP::LhoodMMFitInfo::eventCount

Definition at line 24 of file LhoodMMFitInfo.h.

◆ normterms

std::vector< std::vector< FakeBkgTools::Efficiency> > CP::LhoodMMFitInfo::normterms

Definition at line 18 of file LhoodMMFitInfo.h.

◆ OSfrac_denom

std::vector< std::vector < double > > CP::LhoodMMFitInfo::OSfrac_denom

Definition at line 22 of file LhoodMMFitInfo.h.

◆ OSfrac_num

std::vector< std::vector < double > > CP::LhoodMMFitInfo::OSfrac_num

Definition at line 21 of file LhoodMMFitInfo.h.

◆ totEvents

int CP::LhoodMMFitInfo::totEvents

Definition at line 23 of file LhoodMMFitInfo.h.


The documentation for this struct was generated from the following files:
CP::LhoodMMFitInfo::totEvents
int totEvents
Definition: LhoodMMFitInfo.h:23
CP::LhoodMMFitInfo::OSfrac_denom
std::vector< std::vector< double > > OSfrac_denom
Definition: LhoodMMFitInfo.h:22
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CP::LhoodMMFitInfo::resizeVectors
void resizeVectors(unsigned nlep)
Definition: LhoodMMFitInfo.cxx:73
CP::LhoodMMFitInfo::eventCount
std::vector< double > eventCount
Definition: LhoodMMFitInfo.h:24
CP::LhoodMMFitInfo::OSfrac_num
std::vector< std::vector< double > > OSfrac_num
Definition: LhoodMMFitInfo.h:21
CP::LhoodMMFitInfo::event_sumw2
std::vector< std::vector< double > > event_sumw2
Definition: LhoodMMFitInfo.h:20
CP::LhoodMMFitInfo::event_cat
std::vector< std::vector< double > > event_cat
Definition: LhoodMMFitInfo.h:19
CP::LhoodMMFitInfo::coeffs_num
std::vector< std::vector< std::vector< FakeBkgTools::Efficiency > > > coeffs_num
Definition: LhoodMMFitInfo.h:17
CP::LhoodMMFitInfo::reset
void reset()
Definition: LhoodMMFitInfo.cxx:17
CP::LhoodMMFitInfo::normterms
std::vector< std::vector< FakeBkgTools::Efficiency > > normterms
Definition: LhoodMMFitInfo.h:18