forked from h2gglobe/h2gglobe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SampleContainer.h
57 lines (42 loc) · 1.28 KB
/
SampleContainer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef SAMPLECONTAINER
#define SAMPLECONTAINER
#include <string>
#include <map>
#include <vector>
class SampleContainer {
static float defaultextw;
public:
SampleContainer(const float * extw=0);
~SampleContainer();
void computeWeight(float);
/** adds a lumi section range to 'goodLumis' (typically
taken from a 'json' file containing the list of
certified luminosity sections).
@param run the run to be added
@param lumi1 the first lumi section to be added
@param lumi2 the last lumi secetion to be added */
void addGoodLumi(int run, int lumi1, int lumi2 );
void addEventToList(int run, int lumi, int event );
bool isdata() const { return itype == 0; };
float weight() const { return ( (extweight!=0 && *extweight > 0 && ! isdata()) ? (*extweight)*intweight : intweight); };
int itype;
int ind;
int histoplotit;
std::string filesshortnam;
long long int ntot;
int nred;
float lumi;
float xsec;
float kfactor;
float scale;
int forceVersion;
float lumireal;
bool hasLumiSelection, hasEventList;
std::map<int, std::vector<std::pair<int,int> > > goodLumis;
std::map<int, std::vector<std::pair<int,int> > > eventList;
std::string pileup;
private:
const float * extweight;
float intweight;
};
#endif