5 |
|
#include <map> |
6 |
|
#include <string> |
7 |
|
#include <vector> |
8 |
+ |
#include <algorithm> |
9 |
|
|
10 |
+ |
#include "TH1.h" |
11 |
+ |
#include "TH2.h" |
12 |
|
#include "TH1D.h" |
13 |
|
#include "TH2D.h" |
14 |
|
#include "TLorentzVector.h" |
21 |
|
#include "DataFormats/Common/interface/Handle.h" |
22 |
|
#include "CommonTools/UtilAlgos/interface/TFileService.h" |
23 |
|
#include "FWCore/Framework/interface/MakerMacros.h" |
24 |
+ |
#include "DataFormats/Math/interface/deltaPhi.h" |
25 |
+ |
#include "DataFormats/Math/interface/deltaR.h" |
26 |
|
|
27 |
|
#include "ProductArea/BNcollections/interface/BNbxlumi.h" |
28 |
|
#include "ProductArea/BNcollections/interface/BNelectron.h" |
42 |
|
#include "ProductArea/BNcollections/interface/BNgenjet.h" |
43 |
|
|
44 |
|
#include "OSUT3Analysis/AnaTools/interface/CutFlow.h" |
45 |
+ |
#include "OSUT3Analysis/AnaTools/interface/PUWeight.h" |
46 |
|
|
47 |
|
|
48 |
|
|
60 |
|
bool evaluateTriggers (vector<string>,const BNtriggerCollection*); |
61 |
|
double applyFunction(string, double); |
62 |
|
|
63 |
< |
double valueLookup (const BNjet*, string, string); |
64 |
< |
double valueLookup (const BNmuon*, string, string); |
65 |
< |
double valueLookup (const BNelectron*, string, string); |
66 |
< |
double valueLookup (const BNevent*, string, string); |
67 |
< |
double valueLookup (const BNtau*, string, string); |
68 |
< |
double valueLookup (const BNmet*, string, string); |
69 |
< |
double valueLookup (const BNtrack*, string, string); |
70 |
< |
double valueLookup (const BNgenjet*, string, string); |
71 |
< |
double valueLookup (const BNmcparticle*, string, string); |
72 |
< |
double valueLookup (const BNprimaryvertex*, string, string); |
73 |
< |
double valueLookup (const BNbxlumi*, string, string); |
74 |
< |
double valueLookup (const BNphoton*, string, string); |
75 |
< |
double valueLookup (const BNsupercluster*, string, string); |
63 |
> |
double valueLookup (const BNjet* object, string variable, string function = ""); |
64 |
> |
double valueLookup (const BNmuon* object, string variable, string function = ""); |
65 |
> |
double valueLookup (const BNmuon* object1, const BNmuon* object2, string variable, string function = ""); |
66 |
> |
double valueLookup (const BNelectron* object, string variable, string function = ""); |
67 |
> |
double valueLookup (const BNelectron* object1, const BNelectron* object2, string variable, string function = ""); |
68 |
> |
double valueLookup (const BNelectron* object1, const BNmuon* object2, string variable, string function = ""); |
69 |
> |
double valueLookup (const BNevent* object, string variable, string function = ""); |
70 |
> |
double valueLookup (const BNtau* object, string variable, string function = ""); |
71 |
> |
double valueLookup (const BNmet* object, string variable, string function = ""); |
72 |
> |
double valueLookup (const BNtrack* object, string variable, string function = ""); |
73 |
> |
double valueLookup (const BNgenjet* object, string variable, string function = ""); |
74 |
> |
double valueLookup (const BNmcparticle* object, string variable, string function = ""); |
75 |
> |
double valueLookup (const BNprimaryvertex* object, string variable, string function = ""); |
76 |
> |
double valueLookup (const BNbxlumi* object, string variable, string function = ""); |
77 |
> |
double valueLookup (const BNphoton* object, string variable, string function = ""); |
78 |
> |
double valueLookup (const BNsupercluster* object, string variable, string function = ""); |
79 |
|
//BNskimbits |
71 |
– |
//BNtrigger |
80 |
|
//BNtrigobj |
81 |
|
|
82 |
|
vector<string> splitString (string); |
112 |
|
edm::InputTag photons_; |
113 |
|
edm::InputTag superclusters_; |
114 |
|
edm::InputTag triggers_; |
115 |
+ |
std::string puFile_; |
116 |
+ |
std::string dataPU_; |
117 |
+ |
std::string dataset_; |
118 |
+ |
std::string datasetType_; |
119 |
+ |
vector<edm::ParameterSet> channels_; |
120 |
+ |
vector<edm::ParameterSet> histogramSets_; |
121 |
+ |
bool plotAllObjectsInPassingEvents_; |
122 |
|
|
123 |
+ |
edm::Handle<BNtriggerCollection> triggers; |
124 |
+ |
edm::Handle<BNjetCollection> jets; |
125 |
+ |
edm::Handle<BNmuonCollection> muons; |
126 |
+ |
edm::Handle<BNelectronCollection> electrons; |
127 |
+ |
edm::Handle<BNeventCollection> events; |
128 |
+ |
edm::Handle<BNtauCollection> taus; |
129 |
+ |
edm::Handle<BNmetCollection> mets; |
130 |
+ |
edm::Handle<BNtrackCollection> tracks; |
131 |
+ |
edm::Handle<BNgenjetCollection> genjets; |
132 |
+ |
edm::Handle<BNmcparticleCollection> mcparticles; |
133 |
+ |
edm::Handle<BNprimaryvertexCollection> primaryvertexs; |
134 |
+ |
edm::Handle<BNbxlumiCollection> bxlumis; |
135 |
+ |
edm::Handle<BNphotonCollection> photons; |
136 |
+ |
edm::Handle<BNsuperclusterCollection> superclusters; |
137 |
+ |
|
138 |
+ |
const BNprimaryvertex *chosenPrimaryVertex; |
139 |
|
|
109 |
– |
vector<edm::ParameterSet> channels_; |
140 |
|
|
141 |
|
vector<map<string, TH1D*> > oneDHists_; |
142 |
+ |
vector<map<string, TH2D*> > twoDHists_; |
143 |
|
|
144 |
|
edm::Service<TFileService> fs_; |
145 |
|
|
146 |
|
CutFlow *masterCutFlow_; |
147 |
|
vector<CutFlow *> cutFlows_; |
148 |
|
|
149 |
+ |
typedef struct { |
150 |
+ |
string name; |
151 |
+ |
string title; |
152 |
+ |
vector<double> bins; |
153 |
+ |
string inputCollection; |
154 |
+ |
vector<string> inputVariables; |
155 |
+ |
} histogram; |
156 |
|
|
157 |
|
struct cut { |
158 |
|
string inputCollection; |
159 |
< |
string variable; |
160 |
< |
string comparativeOperator; |
161 |
< |
string function; |
162 |
< |
double cutValue; |
159 |
> |
vector<string> functions; |
160 |
> |
vector<string> variables; |
161 |
> |
vector<string> comparativeOperators;// >, <, =, etc. |
162 |
> |
vector<double> cutValues; |
163 |
> |
vector<string> logicalOperators;//and, or |
164 |
> |
int numSubcuts; |
165 |
|
int numberRequired; |
166 |
|
string eventComparativeOperator; |
167 |
|
string name; |
171 |
|
string name; |
172 |
|
vector<string> triggers; |
173 |
|
vector<cut> cuts; |
134 |
– |
vector<string> inputCollections; |
174 |
|
}; |
175 |
|
|
176 |
< |
vector<string> allNecessaryObjects; |
176 |
> |
vector<string> objectsToGet; |
177 |
> |
vector<string> objectsToCut; |
178 |
> |
vector<string> objectsToPlot; |
179 |
|
vector<channel> channels; |
180 |
+ |
vector<histogram> histograms; |
181 |
|
|
182 |
< |
template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string); |
182 |
> |
PUWeight *puWeight_; |
183 |
|
|
184 |
+ |
template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string); |
185 |
+ |
template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, vector<bool>, vector<bool>, string); |
186 |
|
|
187 |
+ |
template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, vector<bool>, double); |
188 |
+ |
template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double); |
189 |
+ |
template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, vector<bool>, double); |
190 |
+ |
template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double); |
191 |
+ |
|
192 |
+ |
template <class InputObject> int getGenMatchedParticleIndex(InputObject); |
193 |
+ |
int getPdgIdBinValue(int); |
194 |
+ |
int findTauMotherIndex(const BNmcparticle*); |
195 |
|
|
196 |
|
}; |
197 |
|
|