1 |
#ifndef SELECTION_UTILFUNCS
|
2 |
#define SELECTION_UTILFUNCS
|
3 |
|
4 |
// System headers
|
5 |
//
|
6 |
#include <vector> // STL vector class
|
7 |
#include <iostream> // standard I/O
|
8 |
#include <iomanip> // functions to format standard I/O
|
9 |
#include <fstream> // functions for file I/O
|
10 |
#include <string> // C++ string class
|
11 |
#include <sstream> // class for parsing strings
|
12 |
#include <assert.h>
|
13 |
#include <stdlib.h>
|
14 |
#include <getopt.h>
|
15 |
using namespace std;
|
16 |
|
17 |
//
|
18 |
// ROOT headers
|
19 |
//
|
20 |
#include <TROOT.h> // access to gROOT, entry point to ROOT system
|
21 |
#include <TClonesArray.h> // ROOT array class
|
22 |
#include <TFile.h>
|
23 |
#include <TH1F.h>
|
24 |
|
25 |
#include "MuonTools.h"
|
26 |
#include "ElectronTools.h"
|
27 |
#include "RunLumiRangeMap.h"
|
28 |
|
29 |
//
|
30 |
// ntuple format headers
|
31 |
//
|
32 |
#include "Vertex.h"
|
33 |
#include "PFCandidateCol.h"
|
34 |
|
35 |
#include "ParseArgs.h"
|
36 |
#include "EventData.h"
|
37 |
#include "WeightStruct.h"
|
38 |
#include "PileupInfoCol.h"
|
39 |
#include "EfficiencyWeightsInterface.h"
|
40 |
#include "FOArgs.h"
|
41 |
|
42 |
using namespace mithep;
|
43 |
|
44 |
bool setPV(ControlFlags ctrl,
|
45 |
const mithep::Array<mithep::Vertex> * vtxArr,
|
46 |
const mithep::Vertex* &vtx);
|
47 |
|
48 |
void writeEntries(ControlFlags ctrl, unsigned total_unskimmed);
|
49 |
void writeEntries(FOFlags foctrl, unsigned total_unskimmed);
|
50 |
void getEATargets(ControlFlags &ctrl, mithep::MuonTools::EMuonEffectiveAreaTarget &eraMu, mithep::ElectronTools::EElectronEffectiveAreaTarget &eraEle);
|
51 |
void getEATargets(FOFlags foctrl, mithep::MuonTools::EMuonEffectiveAreaTarget &eraMu, mithep::ElectronTools::EElectronEffectiveAreaTarget &eraEle);
|
52 |
unsigned makePFnoPUArray(const mithep::Array<PFCandidate> * fPFCandidates,
|
53 |
vector<bool> &pfNoPileUpFlag,
|
54 |
const mithep::Array<mithep::Vertex> * vtxArr );
|
55 |
void setEffiencyWeights(unsigned era,
|
56 |
EventData & evtdat,
|
57 |
std::bitset<1024> triggerBits,
|
58 |
mithep::TriggerTable *hltTable,
|
59 |
mithep::Array<mithep::TriggerObject> *hltObjArr,
|
60 |
mithep::TriggerObjectsTable *fTrigObjs,
|
61 |
WeightStruct & weights ) ;
|
62 |
void initEvtRhoMap(map<unsigned,float> &);
|
63 |
void setEra(string, ControlFlags&);
|
64 |
unsigned getNPU(mithep::Array<mithep::PileupInfo> *puArr, int bx=0);
|
65 |
void initPUWeights();
|
66 |
double getPUWeight(unsigned era, unsigned npu);
|
67 |
#endif
|