ATLAS Offline Software
Loading...
Searching...
No Matches
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< doubleeventCount

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}
void resizeVectors(unsigned nlep)

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}
constexpr int pow(int base, int exp) noexcept
std::vector< std::vector< std::vector< FakeBkgTools::Efficiency > > > coeffs_num
std::vector< double > eventCount
std::vector< std::vector< FakeBkgTools::Efficiency > > normterms
std::vector< std::vector< double > > OSfrac_denom
std::vector< std::vector< double > > event_sumw2
std::vector< std::vector< double > > OSfrac_num
std::vector< std::vector< double > > event_cat

◆ 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
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: