6 |
|
#include <string> |
7 |
|
#include <vector> |
8 |
|
|
9 |
+ |
#include <fstream> |
10 |
+ |
#include <iostream> |
11 |
+ |
#include <algorithm> |
12 |
|
#include "TH1.h" |
13 |
+ |
#include "TH2.h" |
14 |
|
#include "TH1D.h" |
15 |
|
#include "TH2D.h" |
16 |
|
#include "TLorentzVector.h" |
23 |
|
#include "DataFormats/Common/interface/Handle.h" |
24 |
|
#include "CommonTools/UtilAlgos/interface/TFileService.h" |
25 |
|
#include "FWCore/Framework/interface/MakerMacros.h" |
26 |
+ |
#include "DataFormats/Math/interface/deltaPhi.h" |
27 |
+ |
#include "DataFormats/Math/interface/deltaR.h" |
28 |
|
|
29 |
|
#include "ProductArea/BNcollections/interface/BNbxlumi.h" |
30 |
|
#include "ProductArea/BNcollections/interface/BNelectron.h" |
44 |
|
#include "ProductArea/BNcollections/interface/BNgenjet.h" |
45 |
|
|
46 |
|
#include "OSUT3Analysis/AnaTools/interface/CutFlow.h" |
47 |
+ |
#include "OSUT3Analysis/AnaTools/interface/PUWeight.h" |
48 |
|
|
49 |
|
|
50 |
|
|
64 |
|
|
65 |
|
double valueLookup (const BNjet* object, string variable, string function = ""); |
66 |
|
double valueLookup (const BNmuon* object, string variable, string function = ""); |
67 |
+ |
double valueLookup (const BNmuon* object1, const BNmuon* object2, string variable, string function = ""); |
68 |
|
double valueLookup (const BNelectron* object, string variable, string function = ""); |
69 |
+ |
double valueLookup (const BNelectron* object1, const BNelectron* object2, string variable, string function = ""); |
70 |
+ |
double valueLookup (const BNelectron* object1, const BNmuon* object2, string variable, string function = ""); |
71 |
+ |
//added for isolation by jdb |
72 |
+ |
//double valueLookup (const BNtrack* track1, const BNtrackCollection & trackColl, string variable, string function = ""); |
73 |
|
double valueLookup (const BNevent* object, string variable, string function = ""); |
74 |
|
double valueLookup (const BNtau* object, string variable, string function = ""); |
75 |
|
double valueLookup (const BNmet* object, string variable, string function = ""); |
80 |
|
double valueLookup (const BNbxlumi* object, string variable, string function = ""); |
81 |
|
double valueLookup (const BNphoton* object, string variable, string function = ""); |
82 |
|
double valueLookup (const BNsupercluster* object, string variable, string function = ""); |
83 |
+ |
|
84 |
+ |
int getTrkIsIso (const BNtrack* track1, const BNtrackCollection* trackColl); |
85 |
+ |
void WriteDeadEcal (); |
86 |
+ |
int getTrkIsMatchedDeadEcal (const BNtrack* track1); |
87 |
+ |
|
88 |
|
//BNskimbits |
89 |
|
//BNtrigobj |
90 |
|
|
121 |
|
edm::InputTag photons_; |
122 |
|
edm::InputTag superclusters_; |
123 |
|
edm::InputTag triggers_; |
124 |
< |
|
125 |
< |
TVector3 vertexPosition; |
126 |
< |
|
124 |
> |
std::string puFile_; |
125 |
> |
std::string deadEcalFile_; |
126 |
> |
std::string dataPU_; |
127 |
> |
std::string dataset_; |
128 |
> |
std::string datasetType_; |
129 |
|
vector<edm::ParameterSet> channels_; |
130 |
|
vector<edm::ParameterSet> histogramSets_; |
131 |
+ |
bool plotAllObjectsInPassingEvents_; |
132 |
+ |
|
133 |
+ |
struct DeadEcal { |
134 |
+ |
double etaEcal; |
135 |
+ |
double phiEcal; |
136 |
+ |
}; |
137 |
+ |
|
138 |
+ |
std::vector<DeadEcal> DeadEcalVec; |
139 |
+ |
|
140 |
+ |
//Collections |
141 |
+ |
edm::Handle<BNtriggerCollection> triggers; |
142 |
+ |
edm::Handle<BNjetCollection> jets; |
143 |
+ |
edm::Handle<BNmuonCollection> muons; |
144 |
+ |
edm::Handle<BNelectronCollection> electrons; |
145 |
+ |
edm::Handle<BNeventCollection> events; |
146 |
+ |
edm::Handle<BNtauCollection> taus; |
147 |
+ |
edm::Handle<BNmetCollection> mets; |
148 |
+ |
edm::Handle<BNtrackCollection> tracks; |
149 |
+ |
edm::Handle<BNgenjetCollection> genjets; |
150 |
+ |
edm::Handle<BNmcparticleCollection> mcparticles; |
151 |
+ |
edm::Handle<BNprimaryvertexCollection> primaryvertexs; |
152 |
+ |
edm::Handle<BNbxlumiCollection> bxlumis; |
153 |
+ |
edm::Handle<BNphotonCollection> photons; |
154 |
+ |
edm::Handle<BNsuperclusterCollection> superclusters; |
155 |
+ |
|
156 |
+ |
const BNprimaryvertex *chosenPrimaryVertex; |
157 |
+ |
|
158 |
|
|
159 |
|
vector<map<string, TH1D*> > oneDHists_; |
160 |
|
vector<map<string, TH2D*> > twoDHists_; |
170 |
|
vector<double> bins; |
171 |
|
string inputCollection; |
172 |
|
vector<string> inputVariables; |
127 |
– |
string function; |
173 |
|
} histogram; |
174 |
|
|
175 |
|
struct cut { |
176 |
|
string inputCollection; |
177 |
< |
string variable; |
178 |
< |
string comparativeOperator; |
179 |
< |
string function; |
180 |
< |
double cutValue; |
177 |
> |
vector<string> functions; |
178 |
> |
vector<string> variables; |
179 |
> |
vector<string> comparativeOperators;// >, <, =, etc. |
180 |
> |
vector<double> cutValues; |
181 |
> |
vector<string> logicalOperators;//and, or |
182 |
> |
int numSubcuts; |
183 |
|
int numberRequired; |
184 |
|
string eventComparativeOperator; |
185 |
|
string name; |
191 |
|
vector<cut> cuts; |
192 |
|
}; |
193 |
|
|
194 |
+ |
vector<string> objectsToGet; |
195 |
+ |
vector<string> objectsToCut; |
196 |
|
vector<string> objectsToPlot; |
148 |
– |
vector<string> allNecessaryObjects; |
197 |
|
vector<channel> channels; |
198 |
|
vector<histogram> histograms; |
199 |
|
|
200 |
+ |
PUWeight *puWeight_; |
201 |
+ |
|
202 |
|
template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string); |
203 |
< |
template <class InputCollection> void fillHistogram(TH1*, histogram, InputCollection); |
203 |
> |
template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, vector<bool>, vector<bool>, string); |
204 |
|
|
205 |
+ |
template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, vector<bool>, double); |
206 |
+ |
template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double); |
207 |
+ |
template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, vector<bool>, double); |
208 |
+ |
template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double); |
209 |
+ |
|
210 |
+ |
template <class InputObject> int getGenMatchedParticleIndex(InputObject); |
211 |
+ |
int getPdgIdBinValue(int); |
212 |
+ |
int findTauMotherIndex(const BNmcparticle*); |
213 |
|
|
214 |
|
|
215 |
|
}; |