31 |
|
#include "DataFormats/GeometryVector/interface/GlobalPoint.h" |
32 |
|
#include "Geometry/Records/interface/CaloGeometryRecord.h" |
33 |
|
|
34 |
+ |
// Jet and vertex functions |
35 |
|
#include "DataFormats/JetReco/interface/CaloJet.h" |
36 |
|
#include "DataFormats/JetReco/interface/CaloJetCollection.h" |
37 |
|
#include "DataFormats/JetReco/interface/PFJet.h" |
42 |
|
#include "DataFormats/VertexReco/interface/Vertex.h" |
43 |
|
#include "DataFormats/VertexReco/interface/VertexFwd.h" |
44 |
|
|
45 |
+ |
// Need to get correctors |
46 |
+ |
#include "JetMETCorrections/Objects/interface/JetCorrector.h" |
47 |
+ |
|
48 |
+ |
// ntuple storage classes |
49 |
+ |
#include "TCJet.h" |
50 |
+ |
#include "TCPrimaryVtx.h" |
51 |
+ |
|
52 |
|
// Need for HLT trigger info: |
53 |
|
#include "FWCore/Common/interface/TriggerNames.h" |
54 |
|
#include "DataFormats/Common/interface/TriggerResults.h" |
55 |
|
#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" |
48 |
– |
// |
56 |
|
|
57 |
+ |
//Root stuff |
58 |
|
#include "TROOT.h" |
59 |
|
#include "TFile.h" |
60 |
|
#include "TTree.h" |
90 |
|
// ----------member data --------------------------- |
91 |
|
|
92 |
|
edm::InputTag PFJetHandle_; |
85 |
– |
edm::InputTag CaloJetHandle_; |
86 |
– |
edm::InputTag PFJetHandle_corr; |
87 |
– |
edm::InputTag CaloJetHandle_corr; |
93 |
|
edm::InputTag GenJetHandle_; |
94 |
|
edm::InputTag PrimaryVtxHandle_; |
95 |
+ |
edm::InputTag triggerResultsTag_; |
96 |
|
|
97 |
|
|
98 |
|
// Counting variables // |
102 |
|
TTree *sTree; |
103 |
|
TFile* ntupleFile; |
104 |
|
|
105 |
< |
TClonesArray* jetP4_ak5PF; |
100 |
< |
TClonesArray* jetP4_ak5PF_corr; |
101 |
< |
TClonesArray* jetVtx3_ak5PF; |
102 |
< |
TClonesArray* jetVtx3_ak5PF_corr; |
103 |
< |
TClonesArray* jetP4_ak5Calo; |
104 |
< |
TClonesArray* jetP4_ak5Calo_corr; |
105 |
< |
TClonesArray* jetVtx3_ak5Calo; |
106 |
< |
TClonesArray* jetVtx3_ak5Calo_corr; |
105 |
> |
TClonesArray* jet_ak5PF; |
106 |
|
TClonesArray* jetP4_ak5Gen; |
107 |
< |
TClonesArray* jetVtx3_ak5Gen; |
109 |
< |
TClonesArray* PrimaryVtx3; |
107 |
> |
TClonesArray* vtx_offline; |
108 |
|
|
109 |
|
bool doGenJets_; |
112 |
– |
bool doCaloJets_; |
110 |
|
bool doPFJets_; |
111 |
|
|
112 |
|
string rootfilename; |
113 |
|
|
114 |
|
//Triggers |
115 |
< |
std::string hlTriggerResults_; |
116 |
< |
edm::TriggerNames triggerNames; |
120 |
< |
std::string hltName_; |
121 |
< |
std::string triggerName_; |
115 |
> |
string hlTriggerResults_, hltName_, triggerName_; |
116 |
> |
TriggerNames triggerNames; |
117 |
|
HLTConfigProvider hltConfig_; |
118 |
< |
edm::InputTag triggerResultsTag_; |
124 |
< |
std::vector<std::string> hlNames; |
118 |
> |
vector<string> hlNames; |
119 |
|
|
120 |
|
|
121 |
|
}; |
123 |
|
MPIntuple::MPIntuple(const edm::ParameterSet& iConfig): |
124 |
|
|
125 |
|
PFJetHandle_(iConfig.getUntrackedParameter<edm::InputTag>("PFJetTag")), |
132 |
– |
CaloJetHandle_(iConfig.getUntrackedParameter<edm::InputTag>("CaloJetTag")), |
133 |
– |
PFJetHandle_corr(iConfig.getUntrackedParameter<edm::InputTag>("PFJetTag_corr")), |
134 |
– |
CaloJetHandle_corr(iConfig.getUntrackedParameter<edm::InputTag>("CaloJetTag_corr")), |
126 |
|
GenJetHandle_(iConfig.getUntrackedParameter<edm::InputTag>("GenJetTag")), |
127 |
|
PrimaryVtxHandle_(iConfig.getUntrackedParameter<edm::InputTag>("PrimaryVtxTag")), |
128 |
|
doGenJets_(iConfig.getUntrackedParameter<bool>("doGenJets")), |
138 |
– |
doCaloJets_(iConfig.getUntrackedParameter<bool>("doCaloJets")), |
129 |
|
doPFJets_(iConfig.getUntrackedParameter<bool>("doPFJets")), |
130 |
|
rootfilename(iConfig.getUntrackedParameter<string>("rootfilename")), |
131 |
|
hlTriggerResults_(iConfig.getUntrackedParameter<string>("HLTriggerResults","TriggerResults")), |
142 |
|
|
143 |
|
} |
144 |
|
|
155 |
– |
|
145 |
|
// |
146 |
|
// member functions |
147 |
|
// |
155 |
|
lumiSection = (unsigned int)iEvent.getLuminosityBlock().luminosityBlock(); |
156 |
|
|
157 |
|
int PFcount = 0; |
169 |
– |
int Calocount = 0; |
170 |
– |
int PFcount_corr = 0; |
171 |
– |
int Calocount_corr = 0; |
158 |
|
int Gencount = 0; |
159 |
|
int Vtxcount = 0; |
160 |
|
|
161 |
|
if(doPFJets_){ |
162 |
< |
|
162 |
> |
|
163 |
> |
const JetCorrector* correctorL2 = JetCorrector::getJetCorrector ("ak5PFL2Relative",iSetup); |
164 |
> |
const JetCorrector* correctorL3 = JetCorrector::getJetCorrector ("ak5PFL3Absolute",iSetup); |
165 |
> |
|
166 |
|
Handle<reco::PFJetCollection> PFJets; |
167 |
|
iEvent.getByLabel(PFJetHandle_, PFJets); |
168 |
|
|
171 |
|
for(PFJetCollection::const_iterator jet_iter = PFJets->begin(); jet_iter!= PFJets->end(); ++jet_iter){ |
172 |
|
|
173 |
|
reco::PFJet myJet = reco::PFJet(*jet_iter); |
174 |
< |
|
175 |
< |
if(myJet.et() > 5){ |
176 |
< |
|
177 |
< |
new ((*jetP4_ak5PF)[PFcount]) TLorentzVector(myJet.px(), myJet.py(), myJet.pz(), myJet.energy()); |
189 |
< |
new ((*jetVtx3_ak5PF)[PFcount]) TVector3(myJet.vx(), myJet.vy(), myJet.vz()); |
190 |
< |
|
191 |
< |
++PFcount; |
192 |
< |
} |
193 |
< |
|
194 |
< |
} |
195 |
< |
|
196 |
< |
|
197 |
< |
PFcount_corr = 0; |
198 |
< |
|
199 |
< |
Handle<reco::PFJetCollection> PFJets_corr; |
200 |
< |
iEvent.getByLabel(PFJetHandle_corr, PFJets_corr); |
201 |
< |
|
202 |
< |
for(PFJetCollection::const_iterator jet_iter = PFJets_corr->begin(); jet_iter!= PFJets_corr->end(); ++jet_iter){ |
203 |
< |
|
204 |
< |
reco::PFJet myJet = reco::PFJet(*jet_iter); |
205 |
< |
|
206 |
< |
if(myJet.et() > 5){ |
207 |
< |
|
208 |
< |
new ((*jetP4_ak5PF_corr)[PFcount_corr]) TLorentzVector(myJet.px(), myJet.py(), myJet.pz(), myJet.energy()); |
209 |
< |
new ((*jetVtx3_ak5PF_corr)[PFcount_corr]) TVector3(myJet.vx(), myJet.vy(), myJet.vz()); |
210 |
< |
|
211 |
< |
++PFcount_corr; |
212 |
< |
} |
213 |
< |
} |
214 |
< |
} |
215 |
< |
|
216 |
< |
if(doCaloJets_){ |
217 |
< |
|
218 |
< |
Calocount = 0; |
219 |
< |
|
220 |
< |
Handle<reco::CaloJetCollection> CaloJets; |
221 |
< |
iEvent.getByLabel(CaloJetHandle_, CaloJets); |
222 |
< |
|
223 |
< |
for(CaloJetCollection::const_iterator jet_iter = CaloJets->begin(); jet_iter!= CaloJets->end(); ++jet_iter){ |
224 |
< |
|
225 |
< |
reco::CaloJet myJet = reco::CaloJet(*jet_iter); |
226 |
< |
|
174 |
> |
|
175 |
> |
float scale2 = correctorL2->correction(myJet); |
176 |
> |
float scale3 = correctorL3->correction(myJet); |
177 |
> |
|
178 |
|
if(myJet.et() > 5){ |
179 |
|
|
180 |
< |
new ((*jetP4_ak5Calo)[Calocount]) TLorentzVector(myJet.px(), myJet.py(), myJet.pz(), myJet.energy()); |
230 |
< |
new ((*jetVtx3_ak5Calo)[Calocount]) TVector3(myJet.vx(), myJet.vy(), myJet.vz()); |
231 |
< |
|
232 |
< |
++Calocount; |
233 |
< |
|
234 |
< |
} |
235 |
< |
} |
236 |
< |
|
237 |
< |
Handle<reco::CaloJetCollection> CaloJets_corr; |
238 |
< |
iEvent.getByLabel(CaloJetHandle_corr, CaloJets_corr); |
239 |
< |
|
240 |
< |
Calocount_corr = 0; |
241 |
< |
|
242 |
< |
for(CaloJetCollection::const_iterator jet_iter = CaloJets_corr->begin(); jet_iter!= CaloJets_corr->end(); ++jet_iter){ |
243 |
< |
|
244 |
< |
reco::CaloJet myJet = reco::CaloJet(*jet_iter); |
245 |
< |
|
246 |
< |
if(myJet.et() > 5){ |
180 |
> |
TCJet jetCon; |
181 |
|
|
182 |
< |
new ((*jetP4_ak5Calo_corr)[Calocount_corr]) TLorentzVector(myJet.px(), myJet.py(), myJet.pz(), myJet.energy()); |
183 |
< |
new ((*jetVtx3_ak5Calo_corr)[Calocount_corr]) TVector3(myJet.vx(), myJet.vy(), myJet.vz()); |
182 |
> |
jetCon.SetP4(myJet.px(), myJet.py(), myJet.pz(), myJet.energy()); |
183 |
> |
jetCon.SetVtx(myJet.vx(), myJet.vy(), myJet.vz()); |
184 |
> |
|
185 |
> |
jetCon.SetChHadFrac(myJet.chargedHadronEnergyFraction()); |
186 |
> |
jetCon.SetNeuHadFrac(myJet.neutralHadronEnergyFraction()); |
187 |
> |
jetCon.SetChEmFrac(myJet.chargedEmEnergyFraction()); |
188 |
> |
jetCon.SetNeuEmFrac(myJet.neutralEmEnergyFraction()); |
189 |
> |
|
190 |
> |
jetCon.SetNumConstit(myJet.chargedMultiplicity() + myJet.neutralMultiplicity()); |
191 |
> |
jetCon.SetNumChPart(myJet.chargedMultiplicity()); |
192 |
> |
|
193 |
> |
jetCon.SetNumChPart(myJet.chargedMultiplicity()); |
194 |
> |
|
195 |
> |
jetCon.SetJetCorr(2, scale2); |
196 |
> |
jetCon.SetJetCorr(3, scale3); |
197 |
|
|
198 |
< |
++Calocount_corr; |
199 |
< |
} |
200 |
< |
} |
198 |
> |
new ((*jet_ak5PF)[PFcount]) TCJet(jetCon); |
199 |
> |
|
200 |
> |
++PFcount; |
201 |
> |
} |
202 |
> |
} |
203 |
|
} |
204 |
|
|
205 |
|
if(doGenJets_){ |
212 |
|
|
213 |
|
reco::GenJet myJet = reco::GenJet(*jet_iter); |
214 |
|
|
215 |
< |
if(myJet.et() > 5){ |
215 |
> |
if(myJet.pt() > 5){ |
216 |
|
|
217 |
|
new ((*jetP4_ak5Gen)[Gencount]) TLorentzVector(myJet.px(), myJet.py(), myJet.pz(), myJet.energy()); |
269 |
– |
new ((*jetVtx3_ak5Gen)[Gencount]) TVector3(myJet.vx(), myJet.vy(), myJet.vz()); |
218 |
|
|
219 |
|
++Gencount; |
220 |
|
|
221 |
|
} |
222 |
|
} |
223 |
|
} |
224 |
< |
|
225 |
< |
|
224 |
> |
|
225 |
> |
|
226 |
|
Handle<reco::VertexCollection> primaryVtx; |
227 |
|
iEvent.getByLabel(PrimaryVtxHandle_, primaryVtx); |
228 |
|
|
230 |
|
|
231 |
|
reco::Vertex myVtx = reco::Vertex(*vtx_iter); |
232 |
|
|
233 |
< |
new ((*PrimaryVtx3)[Vtxcount]) TVector3(myVtx.x(), myVtx.y(), myVtx.z()); |
234 |
< |
|
233 |
> |
TCPrimaryVtx vtxCon; |
234 |
> |
|
235 |
> |
vtxCon.SetPosition(myVtx.x(), myVtx.y(), myVtx.z()); |
236 |
> |
vtxCon.SetNDof(myVtx.ndof()); |
237 |
> |
vtxCon.SetChi2(myVtx.chi2()); |
238 |
> |
|
239 |
> |
new ((*vtx_offline)[Vtxcount]) TCPrimaryVtx(vtxCon); |
240 |
> |
|
241 |
|
++Vtxcount; |
242 |
|
|
243 |
|
} |
290 |
– |
|
291 |
– |
|
292 |
– |
if(Calocount > 0 || Calocount_corr >0 || PFcount_corr > 0 || PFcount > 0 || Gencount > 0) sTree -> Fill(); |
244 |
|
|
294 |
– |
jetP4_ak5PF->Clear(); |
295 |
– |
jetP4_ak5PF_corr->Clear(); |
296 |
– |
jetVtx3_ak5PF->Clear(); |
297 |
– |
jetP4_ak5Calo->Clear(); |
298 |
– |
jetP4_ak5Calo_corr->Clear(); |
299 |
– |
jetVtx3_ak5Calo->Clear(); |
300 |
– |
jetP4_ak5Gen->Clear(); |
301 |
– |
jetVtx3_ak5Gen->Clear(); |
302 |
– |
|
245 |
|
|
246 |
|
|
247 |
|
//---------- Filling HLT trigger bits! ------------ |
249 |
|
edm::Handle<TriggerResults> hltR; |
250 |
|
triggerResultsTag_ = InputTag(hlTriggerResults_,"",hltName_); |
251 |
|
iEvent.getByLabel(triggerResultsTag_,hltR); |
252 |
< |
const edm::TriggerNames & triggerNames = iEvent.triggerNames(*hltR); |
252 |
> |
|
253 |
> |
const TriggerNames & triggerNames = iEvent.triggerNames(*hltR); |
254 |
|
hlNames=triggerNames.triggerNames(); |
312 |
– |
bool triggerPassed = false; |
313 |
– |
|
314 |
– |
for (uint iT=0; iT<hlNames.size(); ++iT) |
315 |
– |
{ |
316 |
– |
triggerPassed = triggerDecision(hltR, iT); |
255 |
|
|
256 |
< |
if (hlNames[iT]=="HLT_PixelTracks_Multiplicity70") |
319 |
< |
{ |
320 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
321 |
< |
//And fill the bit here |
322 |
< |
} |
256 |
> |
string MPI_TriggerNames[32] = {"HLT_PixelTracks_Multiplicity70", "HLT_MinBiasBSC_NoBPTX", "HLT_PixelTracks_Multiplicity40","HLT_L1Tech_HCAL_HF", "HLT_IsoTrackHB_8E29", "HLT_IsoTrackHE_8E29", "HLT_L1Tech_RPC_TTU_RBst1_collisions", "HLT_L1_BscMinBiasOR_BptxPlusORMinus", "HLT_L1Tech_BSC_halo_forPhysicsBackground", "HLT_L1Tech_BSC_HighMultiplicity", "HLT_MinBiasPixel_DoubleIsoTrack5", "HLT_MinBiasPixel_DoubleTrack", "HLT_MinBiasPixel_SingleTrack", "HLT_ZeroBiasPixel_SingleTrack", "HLT_MinBiasBSC", "HLT_StoppedHSCP_8E29", "HLT_Jet15U_HcalNoiseFiltered", "HLT_QuadJet15U", "HLT_DiJetAve30U_8E29", "HLT_DiJetAve15U_8E29", "HLT_FwdJet20U", "HLT_Jet50U", "HLT_Jet30U", "HLT_Jet15U", "HLT_BTagMu_Jet10U", "HLT_DoubleJet15U_ForwardBackward", "HLT_BTagIP_Jet50U", "HLT_DoubleLooseIsoTau15", "HLT_SingleLooseIsoTau20", "HLT_HT100U", "HLT_MET100", "HLT_MET45"}; |
257 |
|
|
258 |
< |
if (hlNames[iT]=="HLT_MinBiasBSC_NoBPTX") |
259 |
< |
{ |
260 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
261 |
< |
//And fill the bit here |
328 |
< |
} |
258 |
> |
bool triggerPassed = false; |
259 |
> |
unsigned int triggerStatus = 0x0; |
260 |
> |
|
261 |
> |
for (uint iT=0; iT<hlNames.size(); ++iT) { |
262 |
|
|
263 |
< |
if (hlNames[iT]=="HLT_PixelTracks_Multiplicity40") |
264 |
< |
{ |
265 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
333 |
< |
} |
334 |
< |
if (hlNames[iT]=="HLT_L1Tech_HCAL_HF") |
335 |
< |
{ |
336 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
337 |
< |
} |
338 |
< |
if (hlNames[iT]=="HLT_IsoTrackHB_8E29") |
339 |
< |
{ |
340 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
341 |
< |
} |
342 |
< |
if (hlNames[iT]=="HLT_IsoTrackHE_8E29") |
343 |
< |
{ |
344 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
345 |
< |
} |
346 |
< |
if (hlNames[iT]=="HLT_L1Tech_RPC_TTU_RBst1_collisions") |
347 |
< |
{ |
348 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
349 |
< |
} |
350 |
< |
if (hlNames[iT]=="HLT_L1_BscMinBiasOR_BptxPlusORMinus") |
351 |
< |
{ |
352 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
353 |
< |
} |
354 |
< |
if (hlNames[iT]=="HLT_L1Tech_BSC_halo_forPhysicsBackground") |
355 |
< |
{ |
356 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
357 |
< |
} |
358 |
< |
if (hlNames[iT]=="HLT_L1Tech_BSC_HighMultiplicity") |
359 |
< |
{ |
360 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
361 |
< |
} |
362 |
< |
if (hlNames[iT]=="HLT_MinBiasPixel_DoubleIsoTrack5") |
363 |
< |
{ |
364 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
365 |
< |
} |
366 |
< |
if (hlNames[iT]=="HLT_MinBiasPixel_DoubleTrack") |
367 |
< |
{ |
368 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
369 |
< |
} |
370 |
< |
if (hlNames[iT]=="HLT_MinBiasPixel_SingleTrack") |
371 |
< |
{ |
372 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
373 |
< |
} |
374 |
< |
if (hlNames[iT]=="HLT_ZeroBiasPixel_SingleTrack") |
375 |
< |
{ |
376 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
377 |
< |
} |
378 |
< |
if (hlNames[iT]=="HLT_MinBiasBSC") |
379 |
< |
{ |
380 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
381 |
< |
} |
382 |
< |
if (hlNames[iT]=="HLT_StoppedHSCP_8E29") |
383 |
< |
{ |
384 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
385 |
< |
} |
386 |
< |
if (hlNames[iT]=="HLT_Jet15U_HcalNoiseFiltered") |
387 |
< |
{ |
388 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
389 |
< |
} |
390 |
< |
if (hlNames[iT]=="HLT_QuadJet15U") |
391 |
< |
{ |
392 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
393 |
< |
} |
394 |
< |
if (hlNames[iT]=="HLT_DiJetAve30U_8E29") |
395 |
< |
{ |
396 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
397 |
< |
} |
398 |
< |
if (hlNames[iT]=="HLT_DiJetAve15U_8E29") |
399 |
< |
{ |
400 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
401 |
< |
} |
402 |
< |
if (hlNames[iT]=="HLT_FwdJet20U") |
403 |
< |
{ |
404 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
405 |
< |
} |
406 |
< |
if (hlNames[iT]=="HLT_Jet50U") |
407 |
< |
{ |
408 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
409 |
< |
} |
410 |
< |
if (hlNames[iT]=="HLT_Jet30U") |
411 |
< |
{ |
412 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
413 |
< |
} |
414 |
< |
if (hlNames[iT]=="HLT_Jet15U") |
415 |
< |
{ |
416 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
417 |
< |
} |
418 |
< |
if (hlNames[iT]=="HLT_BTagMu_Jet10U") |
419 |
< |
{ |
420 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
421 |
< |
} |
422 |
< |
if (hlNames[iT]=="HLT_DoubleJet15U_ForwardBackward") |
423 |
< |
{ |
424 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
425 |
< |
} |
426 |
< |
if (hlNames[iT]=="HLT_BTagIP_Jet50U") |
427 |
< |
{ |
428 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
429 |
< |
} |
430 |
< |
if (hlNames[iT]=="HLT_DoubleLooseIsoTau15") |
431 |
< |
{ |
432 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
433 |
< |
} |
434 |
< |
if (hlNames[iT]=="HLT_SingleLooseIsoTau20") |
435 |
< |
{ |
436 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
437 |
< |
} |
438 |
< |
if (hlNames[iT]=="HLT_HT100U") |
439 |
< |
{ |
440 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
441 |
< |
} |
442 |
< |
if (hlNames[iT]=="HLT_MET100") |
443 |
< |
{ |
444 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
445 |
< |
} |
446 |
< |
if (hlNames[iT]=="HLT_MET45") |
447 |
< |
{ |
448 |
< |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
449 |
< |
} |
450 |
< |
|
263 |
> |
triggerPassed = triggerDecision(hltR, iT); |
264 |
> |
|
265 |
> |
if(triggerPassed){ |
266 |
|
|
267 |
< |
// ----------->> Fill them Here! <<---------------------- |
267 |
> |
for (int j = 0; j != 32; ++j){ |
268 |
> |
|
269 |
> |
if (hlNames[iT] == MPI_TriggerNames[j]) |
270 |
> |
{ |
271 |
> |
cout<<"trigger name: "<<hlNames[iT]<<" status: "<<triggerPassed<<endl; |
272 |
> |
triggerStatus |= 0x01 << j; |
273 |
> |
} |
274 |
> |
} |
275 |
|
} |
276 |
< |
//---------- ------------------ --------------- |
277 |
< |
|
276 |
> |
} |
277 |
> |
|
278 |
> |
cout<<triggerStatus<<endl; |
279 |
|
|
280 |
+ |
if(PFcount > 0 || Gencount > 0 || Vtxcount > 0); sTree -> Fill(); |
281 |
+ |
|
282 |
+ |
jet_ak5PF->Clear(); |
283 |
+ |
vtx_offline->Clear(); |
284 |
+ |
jetP4_ak5Gen->Clear(); |
285 |
|
|
286 |
|
} |
287 |
|
|
293 |
|
ntupleFile = new TFile(rootfilename.c_str(), "RECREATE"); |
294 |
|
sTree = new TTree("dpsTree", "Tree for Jets"); |
295 |
|
|
296 |
< |
jetP4_ak5PF = new TClonesArray("TLorentzVector"); |
469 |
< |
jetVtx3_ak5PF = new TClonesArray("TVector3"); |
470 |
< |
jetP4_ak5Calo = new TClonesArray("TLorentzVector"); |
471 |
< |
jetVtx3_ak5Calo = new TClonesArray("TVector3"); |
472 |
< |
jetP4_ak5PF_corr = new TClonesArray("TLorentzVector"); |
473 |
< |
jetVtx3_ak5PF_corr = new TClonesArray("TVector3"); |
474 |
< |
jetP4_ak5Calo_corr = new TClonesArray("TLorentzVector"); |
475 |
< |
jetVtx3_ak5Calo_corr = new TClonesArray("TVector3"); |
296 |
> |
jet_ak5PF = new TClonesArray("TCJet"); |
297 |
|
jetP4_ak5Gen = new TClonesArray("TLorentzVector"); |
298 |
< |
jetVtx3_ak5Gen = new TClonesArray("TVector3"); |
478 |
< |
PrimaryVtx3 = new TClonesArray("TVector3"); |
298 |
> |
vtx_offline = new TClonesArray("TCPrimaryVtx"); |
299 |
|
|
300 |
< |
sTree->Branch("jetP4_ak5PF",&jetP4_ak5PF, 6400, 0); |
481 |
< |
sTree->Branch("jetP4_ak5PF_corr",&jetP4_ak5PF_corr, 6400, 0); |
482 |
< |
sTree->Branch("jetVtx3_ak5PF",&jetVtx3_ak5PF, 6400, 0); |
483 |
< |
sTree->Branch("jetVtx3_ak5PF_corr",&jetVtx3_ak5PF, 6400, 0); |
484 |
< |
sTree->Branch("jetP4_ak5Calo",&jetP4_ak5Calo, 6400, 0); |
485 |
< |
sTree->Branch("jetP4_ak5Calo_corr",&jetP4_ak5Calo_corr, 6400, 0); |
486 |
< |
sTree->Branch("jetVtx3_ak5Calo",&jetVtx3_ak5Calo, 6400, 0); |
487 |
< |
sTree->Branch("jetVtx3_ak5Calo_corr",&jetVtx3_ak5Calo, 6400, 0); |
300 |
> |
sTree->Branch("jet_ak5PF",&jet_ak5PF, 6400, 0); |
301 |
|
sTree->Branch("jetP4_ak5Gen",&jetP4_ak5Gen, 6400, 0); |
302 |
< |
sTree->Branch("jetVtx3_ak5Gen",&jetVtx3_ak5Gen, 6400, 0); |
490 |
< |
sTree->Branch("PrimaryVtx",&PrimaryVtx3, 6400, 0); |
302 |
> |
sTree->Branch("vtx_offline",&vtx_offline, 6400, 0); |
303 |
|
|
304 |
|
sTree->Branch("eventNumber",&eventNumber, "eventNumber/I"); |
305 |
|
sTree->Branch("runNumber",&runNumber, "runNumber/I"); |