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 |
#include "TriggerObjectsTable.h"
|
29 |
#include "TriggerObject.h"
|
30 |
#include "TriggerObjectRel.h"
|
31 |
|
32 |
//
|
33 |
// ntuple format headers
|
34 |
//
|
35 |
#include "Vertex.h"
|
36 |
#include "PFCandidateCol.h"
|
37 |
|
38 |
#include "ParseArgs.h"
|
39 |
#include "EventData.h"
|
40 |
#include "WeightStruct.h"
|
41 |
#include "PileupInfoCol.h"
|
42 |
#include "EfficiencyWeightsInterface.h"
|
43 |
#include "FOArgs.h"
|
44 |
|
45 |
using namespace mithep;
|
46 |
|
47 |
bool setPV(ControlFlags ctrl,
|
48 |
const mithep::Array<mithep::Vertex> * vtxArr,
|
49 |
const mithep::Vertex* &vtx);
|
50 |
|
51 |
void writeEntries(ControlFlags ctrl, unsigned total_unskimmed);
|
52 |
void writeEntries(FOFlags foctrl, unsigned total_unskimmed);
|
53 |
void getEATargets(ControlFlags &ctrl, mithep::MuonTools::EMuonEffectiveAreaTarget &eraMu, mithep::ElectronTools::EElectronEffectiveAreaTarget &eraEle);
|
54 |
void getEATargets(FOFlags foctrl, mithep::MuonTools::EMuonEffectiveAreaTarget &eraMu, mithep::ElectronTools::EElectronEffectiveAreaTarget &eraEle);
|
55 |
unsigned makePFnoPUArray(mithep::Array<PFCandidate> * fPFCandidates,
|
56 |
vector<bool> &pfNoPileUpFlag,
|
57 |
const mithep::Array<mithep::Vertex> * vtxArr );
|
58 |
void setEffiencyWeights(EventData&, WeightStruct& );
|
59 |
void initEvtRhoMap(map<unsigned,float> &);
|
60 |
void setEra(string, ControlFlags&);
|
61 |
int getNPU(mithep::Array<mithep::PileupInfo> *puArr, int bx=0);
|
62 |
void setHLTObjectRelations( mithep::Array<mithep::TriggerObject> *hltObjArr,
|
63 |
mithep::Array<mithep::TriggerObjectRel> *hltRelsArr,
|
64 |
vector<string> * fHLTTab,
|
65 |
vector<string> * fHLTLab,
|
66 |
TriggerObjectsTable *fTrigObjs);
|
67 |
void printTriggerObjs( mithep::TriggerTable *hltTable, mithep::TriggerObjectsTable *fTrigObjs);
|
68 |
#endif
|