-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedNtpFinalizer.h
More file actions
81 lines (54 loc) · 2.12 KB
/
RedNtpFinalizer.h
File metadata and controls
81 lines (54 loc) · 2.12 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef RedNtpFinalizer_h
#define RedNtpFinalizer_h
// ------------------------------------------------------------
//
// RedNtpFinalizer - Base class for finalizing the analysis
// Used in the Ntp1 tree workflow, after a Ntp1Analyzer
// class has produced 2nd level trees
// (and merge_and_setWeights has done its job)
//
// It is an abstract class: the method 'finalize' has to be
// implemented.
//
// ------------------------------------------------------------
#include <vector>
#include "TChain.h"
#include "TH1F.h"
#include "TFile.h"
#include "AnalysisJet.h"
#include "BTagSFUtil/interface/BTagSFUtil.h"
class RedNtpFinalizer {
public:
RedNtpFinalizer( const std::string& analyzerType, const std::string& dataset, const std::string& flags="" );
virtual ~RedNtpFinalizer();
void createOutputFile( const std::string& additionalFlags="" );
virtual void addFile(const std::string& dataseti, const std::string& selection="");
TChain* get_tree() { return tree_; };
TFile* get_outFile() { return outFile_; };
bool get_DEBUG() { return DEBUG_; };
int get_nBTags( const AnalysisJet& jet1, const AnalysisJet& jet2, BTagSFUtil* btsfutil, bool losebtags=true );
float get_crossSection(const std::string& dataset) const;
void clear();
void set_outFile( const std::string& fileName="", const std::string& suffix="" );
void set_outputDir( const std::string& outputDir ) { outputDir_ = outputDir; };
void set_dataset( const std::string& dataset ) { dataset_ = dataset; };
//void set_inputAnalyzerType( const std::string& analyzerType ) { inputAnalyzerType_ = analyzerType; };
void set_redNtpDir( const std::string& redNtpDir ) { redNtpDir_ = redNtpDir; };
void set_flags( const std::string& flags ) { flags_ = flags; };
void set_DEBUG( bool DEBUG ) { DEBUG_ = DEBUG; };
virtual void finalize() = 0;
TChain* tree_;
float nGenEvents_;
float xSection_;
TH1F* h1_nPU_gen_;
std::string analyzerType_;
//std::string inputAnalyzerType_;
std::string outputDir_;
std::string redNtpDir_;
std::string dataset_;
std::string flags_;
TFile* outFile_;
bool DEBUG_;
private:
};
#endif