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 |
|
double valueLookup (const BNevent* object, string variable, string function = ""); |
72 |
|
double valueLookup (const BNtau* object, string variable, string function = ""); |
73 |
|
double valueLookup (const BNmet* object, string variable, string function = ""); |
78 |
|
double valueLookup (const BNbxlumi* object, string variable, string function = ""); |
79 |
|
double valueLookup (const BNphoton* object, string variable, string function = ""); |
80 |
|
double valueLookup (const BNsupercluster* object, string variable, string function = ""); |
81 |
+ |
|
82 |
+ |
int getTrkIsIso (const BNtrack* track1, const BNtrackCollection* trackColl); |
83 |
+ |
double getTrkPtTrue (const BNtrack* track1, const BNmcparticleCollection* genPartColl); |
84 |
+ |
double getTrkPtRes (const BNtrack* track1); |
85 |
+ |
double getTrkIsIso (const BNtrack* track1); |
86 |
+ |
void WriteDeadEcal (); |
87 |
+ |
int getTrkIsMatchedDeadEcal (const BNtrack* track1); |
88 |
+ |
|
89 |
|
//BNskimbits |
90 |
|
//BNtrigobj |
91 |
|
|
122 |
|
edm::InputTag photons_; |
123 |
|
edm::InputTag superclusters_; |
124 |
|
edm::InputTag triggers_; |
125 |
< |
|
126 |
< |
TVector3 vertexPosition; |
127 |
< |
|
125 |
> |
std::string puFile_; |
126 |
> |
std::string deadEcalFile_; |
127 |
> |
std::string dataPU_; |
128 |
> |
std::string dataset_; |
129 |
> |
std::string datasetType_; |
130 |
|
vector<edm::ParameterSet> channels_; |
131 |
|
vector<edm::ParameterSet> histogramSets_; |
132 |
+ |
bool plotAllObjectsInPassingEvents_; |
133 |
+ |
|
134 |
+ |
struct DeadEcal { |
135 |
+ |
double etaEcal; |
136 |
+ |
double phiEcal; |
137 |
+ |
}; |
138 |
+ |
|
139 |
+ |
std::vector<DeadEcal> DeadEcalVec; |
140 |
+ |
|
141 |
+ |
|
142 |
+ |
//Collections |
143 |
+ |
edm::Handle<BNtriggerCollection> triggers; |
144 |
+ |
edm::Handle<BNjetCollection> jets; |
145 |
+ |
edm::Handle<BNmuonCollection> muons; |
146 |
+ |
edm::Handle<BNelectronCollection> electrons; |
147 |
+ |
edm::Handle<BNeventCollection> events; |
148 |
+ |
edm::Handle<BNtauCollection> taus; |
149 |
+ |
edm::Handle<BNmetCollection> mets; |
150 |
+ |
edm::Handle<BNtrackCollection> tracks; |
151 |
+ |
edm::Handle<BNgenjetCollection> genjets; |
152 |
+ |
edm::Handle<BNmcparticleCollection> mcparticles; |
153 |
+ |
edm::Handle<BNprimaryvertexCollection> primaryvertexs; |
154 |
+ |
edm::Handle<BNbxlumiCollection> bxlumis; |
155 |
+ |
edm::Handle<BNphotonCollection> photons; |
156 |
+ |
edm::Handle<BNsuperclusterCollection> superclusters; |
157 |
+ |
|
158 |
+ |
const BNprimaryvertex *chosenPrimaryVertex; |
159 |
+ |
|
160 |
|
|
161 |
|
vector<map<string, TH1D*> > oneDHists_; |
162 |
|
vector<map<string, TH2D*> > twoDHists_; |
172 |
|
vector<double> bins; |
173 |
|
string inputCollection; |
174 |
|
vector<string> inputVariables; |
127 |
– |
string function; |
175 |
|
} histogram; |
176 |
|
|
177 |
|
struct cut { |
178 |
|
string inputCollection; |
179 |
< |
string variable; |
180 |
< |
string comparativeOperator; |
181 |
< |
string function; |
182 |
< |
double cutValue; |
179 |
> |
vector<string> functions; |
180 |
> |
vector<string> variables; |
181 |
> |
vector<string> comparativeOperators;// >, <, =, etc. |
182 |
> |
vector<double> cutValues; |
183 |
> |
vector<string> logicalOperators;//and, or |
184 |
> |
int numSubcuts; |
185 |
|
int numberRequired; |
186 |
|
string eventComparativeOperator; |
187 |
|
string name; |
193 |
|
vector<cut> cuts; |
194 |
|
}; |
195 |
|
|
196 |
+ |
vector<string> objectsToGet; |
197 |
+ |
vector<string> objectsToCut; |
198 |
|
vector<string> objectsToPlot; |
148 |
– |
vector<string> allNecessaryObjects; |
199 |
|
vector<channel> channels; |
200 |
|
vector<histogram> histograms; |
201 |
|
|
202 |
+ |
PUWeight *puWeight_; |
203 |
+ |
|
204 |
|
template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string); |
205 |
< |
template <class InputCollection> void fillHistogram(TH1*, histogram, InputCollection); |
205 |
> |
template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, vector<bool>, vector<bool>, string); |
206 |
|
|
207 |
+ |
template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, vector<bool>, double); |
208 |
+ |
template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double); |
209 |
+ |
template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, vector<bool>, double); |
210 |
+ |
template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double); |
211 |
+ |
|
212 |
+ |
template <class InputObject> int getGenMatchedParticleIndex(InputObject); |
213 |
+ |
int getPdgIdBinValue(int); |
214 |
+ |
int findTauMotherIndex(const BNmcparticle*); |
215 |
|
|
216 |
|
|
217 |
|
}; |