9 |
|
#include "MitPhysics/Init/interface/ModNames.h" |
10 |
|
#include "MitAna/DataCont/interface/ObjArray.h" |
11 |
|
#include "MitCommon/MathTools/interface/MathUtils.h" |
12 |
+ |
#include "MitPhysics/Utils/interface/JetTools.h" |
13 |
+ |
#include "MitPhysics/Utils/interface/MetTools.h" |
14 |
|
#include "MitAna/DataTree/interface/ParticleCol.h" |
15 |
|
#include "TFile.h" |
16 |
|
#include "TTree.h" |
25 |
|
fMetName("NoDefaultNameSet"), |
26 |
|
fCleanJetsName("NoDefaultNameSet"), |
27 |
|
fCleanJetsNoPtCutName("NoDefaultNameSet"), |
26 |
– |
fCaloJetName0("AKt5Jets"), |
28 |
|
fVertexName(ModNames::gkGoodVertexesName), |
29 |
+ |
fPFCandidatesName(Names::gkPFCandidatesBrn), |
30 |
|
fMuons(0), |
31 |
|
fMet(0), |
32 |
|
fVertices(0), |
33 |
< |
fCaloJet0(0) |
33 |
> |
fPFCandidates(0), |
34 |
> |
fPFJetName0("AKt5PFJets"), |
35 |
> |
fPFJet0(0), |
36 |
> |
fNEventsSelected(0) |
37 |
|
{ |
38 |
|
// Constructor. |
39 |
|
} |
53 |
|
// branches. For this module, we request a branch of the MitTree. |
54 |
|
|
55 |
|
// Load Branches |
56 |
< |
ReqBranch(fMuonBranchName, fMuons); |
57 |
< |
ReqBranch(fCaloJetName0, fCaloJet0); |
56 |
> |
ReqBranch(fMuonBranchName, fMuons); |
57 |
> |
ReqBranch(fPFCandidatesName, fPFCandidates); |
58 |
> |
ReqBranch(fPFJetName0, fPFJet0); |
59 |
|
|
60 |
|
//Create your histograms here |
61 |
|
|
62 |
|
//************************************************************************************************* |
63 |
|
// Selection Histograms |
64 |
|
//************************************************************************************************* |
65 |
< |
AddTH1(fHWWSelection,"hHWWSelection", ";Cut Number;Number of Events", 11, -1.5, 9.5); |
66 |
< |
AddTH1(fHWWToEESelection,"hHWWToEESelection", ";Cut Number;Number of Events", 11, -1.5, 9.5); |
67 |
< |
AddTH1(fHWWToMuMuSelection,"hHWWToMuMuSelection", ";Cut Number;Number of Events", 11, -1.5, 9.5); |
68 |
< |
AddTH1(fHWWToEMuSelection,"hHWWToEMuSelection", ";Cut Number;Number of Events", 11, -1.5, 9.5); |
65 |
> |
AddTH1(fHWWSelection,"hHWWSelection", ";Cut Number;Number of Events", 17, -1.5, 15.5); |
66 |
> |
AddTH1(fHWWToEESelection,"hHWWToEESelection", ";Cut Number;Number of Events", 17, -1.5, 15.5); |
67 |
> |
AddTH1(fHWWToMuMuSelection,"hHWWToMuMuSelection", ";Cut Number;Number of Events", 17, -1.5, 15.5); |
68 |
> |
AddTH1(fHWWToEMuSelection,"hHWWToEMuSelection", ";Cut Number;Number of Events", 17, -1.5, 15.5); |
69 |
> |
AddTH1(fHWWToMuESelection,"hHWWToMuESelection", ";Cut Number;Number of Events", 17, -1.5, 15.5); |
70 |
|
|
71 |
|
//*********************************************************************************************** |
72 |
|
// Histograms after preselection |
130 |
|
{ |
131 |
|
// Process entries of the tree. For this module, we just load the branches and |
132 |
|
LoadBranch(fMuonBranchName); |
133 |
< |
LoadBranch(fCaloJetName0); |
134 |
< |
|
133 |
> |
LoadBranch(fPFCandidatesName); |
134 |
> |
LoadBranch(fPFJetName0); |
135 |
> |
|
136 |
|
//Obtain all the good objects from the event cleaning module |
137 |
|
fVertices = GetObjThisEvt<VertexOArr>(fVertexName); |
138 |
|
ObjArray<Muon> *CleanMuons = dynamic_cast<ObjArray<Muon>* >(FindObjThisEvt(ModNames::gkCleanMuonsName)); |
146 |
|
TParameter<Double_t> *NNLOWeight = GetObjThisEvt<TParameter<Double_t> >("NNLOWeight"); |
147 |
|
|
148 |
|
MetCol *met = dynamic_cast<ObjArray<Met>* >(FindObjThisEvt(fMetName)); |
149 |
< |
const Met *caloMet = 0; |
149 |
> |
const Met *stdMet = 0; |
150 |
|
if (met) { |
151 |
< |
caloMet = met->At(0); |
151 |
> |
stdMet = met->At(0); |
152 |
|
} else { |
153 |
|
cout << "Error: Met Collection " << fMetName << " could not be loaded.\n"; |
154 |
|
return; |
174 |
|
ObjArray<Muon> *SoftMuons = new ObjArray<Muon>; |
175 |
|
for (UInt_t i=0; i<fMuons->GetEntries(); ++i) { |
176 |
|
const Muon *mu = fMuons->At(i); |
177 |
< |
if(!MuonTools::PassSoftMuonCut(mu, fVertices)) continue; |
177 |
> |
if(!MuonTools::PassSoftMuonCut(mu, fVertices, 0.2)) continue; |
178 |
|
|
179 |
|
bool isCleanMuon = kFALSE; |
180 |
|
for (UInt_t j=0; j<CleanMuons->GetEntries(); j++) { |
187 |
|
//*********************************************************************************************** |
188 |
|
//|Z_vert-Z_l| maximum |
189 |
|
//*********************************************************************************************** |
190 |
+ |
std::vector<double> leptonsDz; |
191 |
|
double zDiffMax = 0.0; |
192 |
|
if(fVertices->GetEntries() > 0) { |
193 |
|
for (UInt_t j=0; j<CleanMuons->GetEntries(); j++) { |
194 |
< |
double pDz = 0.0; |
195 |
< |
for(uint i0 = 0; i0 < fVertices->GetEntries(); i0++) { |
187 |
< |
if(fVertices->At(i0)->NTracks() > 0){ |
188 |
< |
pDz = TMath::Abs(CleanMuons->At(j)->BestTrk()->DzCorrected(*fVertices->At(i0))); |
189 |
< |
break; |
190 |
< |
} |
191 |
< |
} |
192 |
< |
if(pDz > zDiffMax) zDiffMax = pDz; |
194 |
> |
double pDz = CleanMuons->At(j)->BestTrk()->DzCorrected(*fVertices->At(0)); |
195 |
> |
leptonsDz.push_back(pDz); |
196 |
|
} |
197 |
|
for (UInt_t j=0; j<CleanElectrons->GetEntries(); j++) { |
198 |
< |
double pDz = 0.0; |
199 |
< |
for(uint i0 = 0; i0 < fVertices->GetEntries(); i0++) { |
200 |
< |
if(fVertices->At(i0)->NTracks() > 0){ |
201 |
< |
pDz = TMath::Abs(CleanElectrons->At(j)->GsfTrk()->DzCorrected(*fVertices->At(i0))); |
202 |
< |
break; |
203 |
< |
} |
198 |
> |
double pDz = CleanElectrons->At(j)->GsfTrk()->DzCorrected(*fVertices->At(0)); |
199 |
> |
leptonsDz.push_back(pDz); |
200 |
> |
} |
201 |
> |
for(UInt_t t=0; t<leptonsDz.size(); t++) { |
202 |
> |
for(UInt_t i=t+1; i<leptonsDz.size(); i++) { |
203 |
> |
if(TMath::Abs(leptonsDz[t]-leptonsDz[i]) > zDiffMax) zDiffMax = TMath::Abs(leptonsDz[t]-leptonsDz[i]); |
204 |
|
} |
202 |
– |
if(pDz > zDiffMax) zDiffMax = pDz; |
205 |
|
} |
206 |
+ |
leptonsDz.clear(); |
207 |
|
} |
208 |
|
|
209 |
|
//*********************************************************************************************** |
215 |
|
|
216 |
|
double deltaEtaLeptons = CleanLeptons->At(0)->Eta() - CleanLeptons->At(1)->Eta(); |
217 |
|
|
218 |
< |
double deltaPhiDileptonMet = MathUtils::DeltaPhi(caloMet->Phi(), |
218 |
> |
double deltaPhiDileptonMet = MathUtils::DeltaPhi(stdMet->Phi(), |
219 |
|
dilepton->Phi())*180.0 / TMath::Pi(); |
220 |
|
|
221 |
< |
double mtHiggs = TMath::Sqrt(2.0*dilepton->Pt() * caloMet->Pt()* |
221 |
> |
double mtHiggs = TMath::Sqrt(2.0*dilepton->Pt() * stdMet->Pt()* |
222 |
|
(1.0 - cos(deltaPhiDileptonMet * TMath::Pi() / 180.0))); |
223 |
|
|
224 |
|
//angle between MET and closest lepton |
225 |
< |
double deltaPhiMetLepton[2] = {MathUtils::DeltaPhi(caloMet->Phi(), CleanLeptons->At(0)->Phi()), |
226 |
< |
MathUtils::DeltaPhi(caloMet->Phi(), CleanLeptons->At(1)->Phi())}; |
225 |
> |
double deltaPhiMetLepton[2] = {MathUtils::DeltaPhi(stdMet->Phi(), CleanLeptons->At(0)->Phi()), |
226 |
> |
MathUtils::DeltaPhi(stdMet->Phi(), CleanLeptons->At(1)->Phi())}; |
227 |
|
|
228 |
< |
double mTW[2] = {TMath::Sqrt(2.0*CleanLeptons->At(0)->Pt()*caloMet->Pt()* |
228 |
> |
double mTW[2] = {TMath::Sqrt(2.0*CleanLeptons->At(0)->Pt()*stdMet->Pt()* |
229 |
|
(1.0 - cos(deltaPhiMetLepton[0]))), |
230 |
< |
TMath::Sqrt(2.0*CleanLeptons->At(1)->Pt()*caloMet->Pt()* |
230 |
> |
TMath::Sqrt(2.0*CleanLeptons->At(1)->Pt()*stdMet->Pt()* |
231 |
|
(1.0 - cos(deltaPhiMetLepton[1])))}; |
232 |
|
|
233 |
|
double minDeltaPhiMetLepton = (deltaPhiMetLepton[0] < deltaPhiMetLepton[1])? |
234 |
|
deltaPhiMetLepton[0]:deltaPhiMetLepton[1]; |
235 |
|
|
236 |
< |
double METdeltaPhilEt = caloMet->Pt(); |
237 |
< |
if(minDeltaPhiMetLepton < TMath::Pi()/2.) |
238 |
< |
METdeltaPhilEt = METdeltaPhilEt * sin(minDeltaPhiMetLepton); |
236 |
> |
MetTools metTools(CleanMuons, CleanElectrons, fPFCandidates, fVertices->At(0), 0.1, 8.0, 5.0); |
237 |
> |
double pMET[2] = {metTools.GetProjectedMet(CleanLeptons,stdMet), |
238 |
> |
metTools.GetProjectedTrackMet(CleanLeptons)}; |
239 |
> |
|
240 |
> |
double METdeltaPhilEt = TMath::Min(pMET[0],pMET[1]); |
241 |
|
|
242 |
|
//count the number of central Jets for vetoing and b-tagging |
243 |
|
vector<Jet*> sortedJetsAll; |
244 |
|
vector<Jet*> sortedJets; |
245 |
|
vector<Jet*> sortedJetsLowPt; |
246 |
|
for(UInt_t i=0; i<CleanJetsNoPtCut->GetEntries(); i++){ |
247 |
+ |
if(CleanJetsNoPtCut->At(i)->RawMom().Pt() <= 7) continue; |
248 |
|
Jet* jet_a = new Jet(CleanJetsNoPtCut->At(i)->Px(), |
249 |
|
CleanJetsNoPtCut->At(i)->Py(), |
250 |
|
CleanJetsNoPtCut->At(i)->Pz(), |
251 |
|
CleanJetsNoPtCut->At(i)->E() ); |
252 |
< |
|
253 |
< |
int nCloseStdJet = -1; |
254 |
< |
double deltaRMin = 999.; |
255 |
< |
for(UInt_t nj=0; nj<fCaloJet0->GetEntries(); nj++){ |
256 |
< |
const CaloJet *jet = fCaloJet0->At(nj); |
257 |
< |
Double_t deltaR = MathUtils::DeltaR(jet_a->Mom(),jet->Mom()); |
258 |
< |
if(deltaR < deltaRMin) { |
259 |
< |
nCloseStdJet = nj; |
260 |
< |
deltaRMin = deltaR; |
261 |
< |
} |
256 |
< |
} |
257 |
< |
if(nCloseStdJet >= 0 && deltaRMin < 0.5){ |
258 |
< |
jet_a->SetMatchedMCFlavor(fCaloJet0->At(nCloseStdJet)->MatchedMCFlavor()); |
259 |
< |
jet_a->SetCombinedSecondaryVertexBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->CombinedSecondaryVertexBJetTagsDisc()); |
260 |
< |
jet_a->SetCombinedSecondaryVertexMVABJetTagsDisc(fCaloJet0->At(nCloseStdJet)->CombinedSecondaryVertexMVABJetTagsDisc()); |
261 |
< |
jet_a->SetJetProbabilityBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->JetProbabilityBJetTagsDisc()); |
262 |
< |
jet_a->SetJetBProbabilityBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->JetBProbabilityBJetTagsDisc()); |
263 |
< |
jet_a->SetTrackCountingHighEffBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->TrackCountingHighEffBJetTagsDisc()); |
264 |
< |
jet_a->SetTrackCountingHighPurBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->TrackCountingHighPurBJetTagsDisc()); |
265 |
< |
jet_a->SetSimpleSecondaryVertexBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->SimpleSecondaryVertexBJetTagsDisc()); |
266 |
< |
jet_a->SetSimpleSecondaryVertexHighEffBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->SimpleSecondaryVertexHighEffBJetTagsDisc()); |
267 |
< |
jet_a->SetSimpleSecondaryVertexHighPurBJetTagsDisc(fCaloJet0->At(nCloseStdJet)->SimpleSecondaryVertexHighPurBJetTagsDisc()); |
268 |
< |
} |
269 |
< |
else { |
270 |
< |
jet_a->SetMatchedMCFlavor(CleanJetsNoPtCut->At(i)->MatchedMCFlavor()); |
271 |
< |
jet_a->SetCombinedSecondaryVertexBJetTagsDisc(CleanJetsNoPtCut->At(i)->CombinedSecondaryVertexBJetTagsDisc()); |
272 |
< |
jet_a->SetCombinedSecondaryVertexMVABJetTagsDisc(CleanJetsNoPtCut->At(i)->CombinedSecondaryVertexMVABJetTagsDisc()); |
273 |
< |
jet_a->SetJetProbabilityBJetTagsDisc(CleanJetsNoPtCut->At(i)->JetProbabilityBJetTagsDisc()); |
274 |
< |
jet_a->SetJetBProbabilityBJetTagsDisc(CleanJetsNoPtCut->At(i)->JetBProbabilityBJetTagsDisc()); |
275 |
< |
jet_a->SetTrackCountingHighEffBJetTagsDisc(CleanJetsNoPtCut->At(i)->TrackCountingHighEffBJetTagsDisc()); |
276 |
< |
jet_a->SetTrackCountingHighPurBJetTagsDisc(CleanJetsNoPtCut->At(i)->TrackCountingHighPurBJetTagsDisc()); |
277 |
< |
jet_a->SetSimpleSecondaryVertexBJetTagsDisc(CleanJetsNoPtCut->At(i)->SimpleSecondaryVertexBJetTagsDisc()); |
278 |
< |
jet_a->SetSimpleSecondaryVertexHighEffBJetTagsDisc(CleanJetsNoPtCut->At(i)->SimpleSecondaryVertexHighEffBJetTagsDisc()); |
279 |
< |
jet_a->SetSimpleSecondaryVertexHighPurBJetTagsDisc(CleanJetsNoPtCut->At(i)->SimpleSecondaryVertexHighPurBJetTagsDisc()); |
280 |
< |
} |
252 |
> |
jet_a->SetMatchedMCFlavor(CleanJetsNoPtCut->At(i)->MatchedMCFlavor()); |
253 |
> |
jet_a->SetCombinedSecondaryVertexBJetTagsDisc(CleanJetsNoPtCut->At(i)->CombinedSecondaryVertexBJetTagsDisc()); |
254 |
> |
jet_a->SetCombinedSecondaryVertexMVABJetTagsDisc(CleanJetsNoPtCut->At(i)->CombinedSecondaryVertexMVABJetTagsDisc()); |
255 |
> |
jet_a->SetJetProbabilityBJetTagsDisc(CleanJetsNoPtCut->At(i)->JetProbabilityBJetTagsDisc()); |
256 |
> |
jet_a->SetJetBProbabilityBJetTagsDisc(CleanJetsNoPtCut->At(i)->JetBProbabilityBJetTagsDisc()); |
257 |
> |
jet_a->SetTrackCountingHighEffBJetTagsDisc(CleanJetsNoPtCut->At(i)->TrackCountingHighEffBJetTagsDisc()); |
258 |
> |
jet_a->SetTrackCountingHighPurBJetTagsDisc(CleanJetsNoPtCut->At(i)->TrackCountingHighPurBJetTagsDisc()); |
259 |
> |
jet_a->SetSimpleSecondaryVertexBJetTagsDisc(CleanJetsNoPtCut->At(i)->SimpleSecondaryVertexBJetTagsDisc()); |
260 |
> |
jet_a->SetSimpleSecondaryVertexHighEffBJetTagsDisc(CleanJetsNoPtCut->At(i)->SimpleSecondaryVertexHighEffBJetTagsDisc()); |
261 |
> |
jet_a->SetSimpleSecondaryVertexHighPurBJetTagsDisc(CleanJetsNoPtCut->At(i)->SimpleSecondaryVertexHighPurBJetTagsDisc()); |
262 |
|
sortedJetsAll.push_back(jet_a); |
263 |
|
} |
264 |
|
|
265 |
|
for(UInt_t i=0; i<CleanJets->GetEntries(); i++){ |
266 |
|
if(TMath::Abs(CleanJets->At(i)->Eta()) < 5.0 && |
267 |
< |
CleanJets->At(i)->Pt() > 25.0){ |
267 |
> |
CleanJets->At(i)->Pt() > 30.0){ |
268 |
|
Jet* jet_b = new Jet(CleanJets->At(i)->Px(), |
269 |
|
CleanJets->At(i)->Py(), |
270 |
|
CleanJets->At(i)->Pz(), |
300 |
|
} |
301 |
|
} |
302 |
|
double maxBtag = -99999.; |
322 |
– |
double imaxBtag = -1; |
303 |
|
for(UInt_t i=0; i<sortedJetsLowPt.size(); i++){ |
304 |
|
if(sortedJetsLowPt[i]->TrackCountingHighEffBJetTagsDisc() > maxBtag){ |
305 |
< |
maxBtag = sortedJetsLowPt[i]->TrackCountingHighEffBJetTagsDisc(); |
306 |
< |
imaxBtag = i; |
305 |
> |
double dZAverageJetPt = 0.0; |
306 |
> |
double sumJetPt = 0.0; |
307 |
> |
double jetPt = 0.0; |
308 |
> |
for(UInt_t iPF=0; iPF<fPFJet0->GetEntries(); iPF++){ |
309 |
> |
const PFJet *jet = fPFJet0->At(iPF); |
310 |
> |
if(MathUtils::DeltaR(jet->Mom(),sortedJetsLowPt[i]->Mom()) < 0.01){ |
311 |
> |
jetPt = jet->Pt(); |
312 |
> |
for (UInt_t npf=0; npf<jet->NPFCands();npf++) { |
313 |
> |
const PFCandidate *pf = jet->PFCand(npf); |
314 |
> |
if(pf->BestTrk()) { |
315 |
> |
dZAverageJetPt = dZAverageJetPt + pf->Pt()*pf->Pt()*pf->BestTrk()->DzCorrected(*fVertices->At(0)); |
316 |
> |
sumJetPt = sumJetPt + pf->Pt()*pf->Pt(); |
317 |
> |
} |
318 |
> |
} |
319 |
> |
if(sumJetPt > 0) dZAverageJetPt = TMath::Abs(dZAverageJetPt)/sumJetPt; |
320 |
> |
break; |
321 |
> |
} |
322 |
> |
} // loop over PF jets |
323 |
> |
if(dZAverageJetPt < 2.0 && jetPt > 10){ |
324 |
> |
maxBtag = sortedJetsLowPt[i]->TrackCountingHighEffBJetTagsDisc(); |
325 |
> |
} |
326 |
|
} |
327 |
|
} |
328 |
|
|
332 |
|
finalstateType = 10; |
333 |
|
} else if(CleanLeptons->At(0)->ObjType() == kElectron && CleanLeptons->At(1)->ObjType() == kElectron ){ // ee |
334 |
|
finalstateType = 11; |
335 |
< |
} else if((CleanLeptons->At(0)->ObjType() == kElectron && CleanLeptons->At(1)->ObjType() == kMuon) || |
337 |
< |
(CleanLeptons->At(1)->ObjType() == kElectron && CleanLeptons->At(0)->ObjType() == kMuon)) { |
335 |
> |
} else if(CleanLeptons->At(0)->ObjType() == kElectron && CleanLeptons->At(1)->ObjType() == kMuon) { |
336 |
|
finalstateType = 12; |
337 |
+ |
} else if(CleanLeptons->At(1)->ObjType() == kElectron && CleanLeptons->At(0)->ObjType() == kMuon) { |
338 |
+ |
finalstateType = 13; |
339 |
|
} else { |
340 |
|
cerr << "Error: finalstate lepton type not supported\n"; |
341 |
|
} |
342 |
|
|
343 |
+ |
double deltaPhiLLJet = 0.0; |
344 |
+ |
if(sortedJetsAll.size() > 0 && sortedJetsAll[0]->Pt() > 15.0 && (finalstateType == 10 || finalstateType == 11)){ |
345 |
+ |
deltaPhiLLJet = MathUtils::DeltaPhi(dilepton->Phi(), sortedJetsAll[0]->Phi())*180.0/TMath::Pi(); |
346 |
+ |
} |
347 |
+ |
|
348 |
|
//********************************************************************************************* |
349 |
|
//Define Cuts |
350 |
|
//********************************************************************************************* |
351 |
< |
const int nCuts = 10; |
351 |
> |
const int nCuts = 16; |
352 |
|
bool passCut[nCuts] = {false, false, false, false, false, |
353 |
< |
false, false, false, false, false}; |
353 |
> |
false, false, false, false, false, |
354 |
> |
false, false, false, false, false, |
355 |
> |
false}; |
356 |
|
|
357 |
< |
if(CleanLeptons->At(0)->Pt() > 20.0 && |
358 |
< |
CleanLeptons->At(1)->Pt() >= 20.0) passCut[0] = true; |
357 |
> |
Bool_t PreselPtCut = kTRUE; |
358 |
> |
if(CleanLeptons->At(0)->Pt() <= 20) PreselPtCut = kFALSE; |
359 |
> |
if(CleanLeptons->At(1)->Pt() <= 10) PreselPtCut = kFALSE; |
360 |
> |
//if(CleanLeptons->At(1)->ObjType() == kElectron && CleanLeptons->At(1)->Pt() <= 15) PreselPtCut = kFALSE; |
361 |
> |
if(PreselPtCut == kTRUE) passCut[0] = true; |
362 |
|
|
363 |
< |
if(zDiffMax < 1.0) passCut[1] = true; |
363 |
> |
if(stdMet->Pt() > 20.0) passCut[1] = true; |
364 |
|
|
365 |
< |
if(caloMet->Pt() > 20.0) passCut[2] = true; |
365 |
> |
if(dilepton->Mass() > 12.0) passCut[2] = true; |
366 |
|
|
367 |
< |
if(dilepton->Mass() > 12.0) passCut[3] = true; |
368 |
< |
|
369 |
< |
if(sortedJets.size() < 1) passCut[6] = true; |
367 |
> |
if(sortedJets.size() < 1) passCut[5] = true; |
368 |
> |
|
369 |
> |
if(deltaPhiLLJet < 165.0) passCut[6] = true; |
370 |
|
|
371 |
|
if(SoftMuons->GetEntries() == 0) passCut[7] = true; |
372 |
|
|
375 |
|
if(maxBtag < 2.1) passCut[9] = true; |
376 |
|
|
377 |
|
if (finalstateType == 10 || finalstateType == 11){ // mumu/ee |
378 |
< |
if(fabs(dilepton->Mass()-91.1876) > 15.0) passCut[4] = true; |
379 |
< |
if(METdeltaPhilEt > 35) passCut[5] = true; |
378 |
> |
if(fabs(dilepton->Mass()-91.1876) > 15.0) passCut[3] = true; |
379 |
> |
if(METdeltaPhilEt > 37.0 + fVertices->GetEntries()/2.0) passCut[4] = true; |
380 |
|
} |
381 |
< |
else if(finalstateType == 12) { // emu |
382 |
< |
passCut[4] = true; |
383 |
< |
if(METdeltaPhilEt > 20) passCut[5] = true; |
381 |
> |
else { // mue/emu |
382 |
> |
passCut[3] = true; |
383 |
> |
if(METdeltaPhilEt > 20) passCut[4] = true; |
384 |
|
} |
385 |
< |
|
385 |
> |
|
386 |
> |
if(CleanLeptons->At(0)->Pt() > 30) passCut[10] = true; |
387 |
> |
|
388 |
> |
if(CleanLeptons->At(1)->Pt() > 25) passCut[11] = true; |
389 |
> |
|
390 |
> |
if(dilepton->Mass() < 50) passCut[12] = true; |
391 |
> |
|
392 |
> |
if(mtHiggs > 90.0 && mtHiggs < 160.0) passCut[13] = true; |
393 |
> |
|
394 |
> |
if(deltaPhiLeptons < 60.0) passCut[14] = true; |
395 |
> |
|
396 |
> |
if(dilepton->Pt() > 45.0) passCut[15] = true; |
397 |
> |
|
398 |
|
//********************************************************************************************* |
399 |
|
//Make Selection Histograms. Number of events passing each level of cut |
400 |
|
//********************************************************************************************* |
401 |
|
bool passAllCuts = true; |
402 |
|
for(int c=0; c<nCuts; c++) passAllCuts = passAllCuts & passCut[c]; |
403 |
< |
|
403 |
> |
if(passAllCuts) fNEventsSelected++; |
404 |
> |
|
405 |
|
//Cut Selection Histograms |
406 |
|
fHWWSelection->Fill(-1,NNLOWeight->GetVal()); |
407 |
|
if (finalstateType == 10 ) |
410 |
|
fHWWToEESelection->Fill(-1,NNLOWeight->GetVal()); |
411 |
|
else if(finalstateType == 12 ) |
412 |
|
fHWWToEMuSelection->Fill(-1,NNLOWeight->GetVal()); |
413 |
+ |
else if(finalstateType == 13 ) |
414 |
+ |
fHWWToMuESelection->Fill(-1,NNLOWeight->GetVal()); |
415 |
|
|
416 |
|
for (int k=0;k<nCuts;k++) { |
417 |
|
bool pass = true; |
430 |
|
fHWWToEESelection->Fill(k,NNLOWeight->GetVal()); |
431 |
|
else if(finalstateType == 12) |
432 |
|
fHWWToEMuSelection->Fill(k,NNLOWeight->GetVal()); |
433 |
+ |
else if(finalstateType == 13) |
434 |
+ |
fHWWToMuESelection->Fill(k,NNLOWeight->GetVal()); |
435 |
|
} |
436 |
|
} |
437 |
|
|
442 |
|
fLeptonEta->Fill(CleanLeptons->At(1)->Eta(),NNLOWeight->GetVal()); |
443 |
|
fLeptonPtMax->Fill(CleanLeptons->At(0)->Pt(),NNLOWeight->GetVal()); |
444 |
|
fLeptonPtMin->Fill(CleanLeptons->At(1)->Pt(),NNLOWeight->GetVal()); |
445 |
< |
fMetPtHist->Fill(caloMet->Pt(),NNLOWeight->GetVal()); |
446 |
< |
fMetPhiHist->Fill(caloMet->Phi(),NNLOWeight->GetVal()); |
445 |
> |
fMetPtHist->Fill(stdMet->Pt(),NNLOWeight->GetVal()); |
446 |
> |
fMetPhiHist->Fill(stdMet->Phi(),NNLOWeight->GetVal()); |
447 |
|
fDeltaPhiLeptons->Fill(deltaPhiLeptons,NNLOWeight->GetVal()); |
448 |
|
fDeltaEtaLeptons->Fill(deltaEtaLeptons,NNLOWeight->GetVal()); |
449 |
|
fDileptonMass->Fill(dilepton->Mass(),NNLOWeight->GetVal()); |
456 |
|
//N Jet Veto |
457 |
|
pass = true; |
458 |
|
for (int k=0;k<nCuts;k++) { |
459 |
< |
if (k != 5) { |
433 |
< |
pass = (pass && passCut[k]); |
434 |
< |
} |
459 |
> |
if (k != 5) pass = (pass && passCut[k]); |
460 |
|
} |
461 |
|
if (pass) { |
462 |
|
fNCentralJets_NMinusOne->Fill(sortedJets.size(),NNLOWeight->GetVal()); |
465 |
|
// Final Met Cut |
466 |
|
pass = true; |
467 |
|
for (int k=0;k<nCuts;k++) { |
468 |
< |
if (k != 4) { |
444 |
< |
pass = (pass && passCut[k]); |
445 |
< |
} |
468 |
> |
if (k != 4) pass = (pass && passCut[k]); |
469 |
|
} |
470 |
|
if (pass) { |
471 |
< |
fMetPtHist_NMinusOne->Fill(caloMet->Pt(),NNLOWeight->GetVal()); |
471 |
> |
fMetPtHist_NMinusOne->Fill(stdMet->Pt(),NNLOWeight->GetVal()); |
472 |
|
} |
473 |
|
|
474 |
|
// dilepton mass |
475 |
|
pass = true; |
476 |
|
for (int k=0;k<nCuts;k++) { |
477 |
< |
if (k != 2 && k != 3) |
455 |
< |
pass = (pass && passCut[k]); |
477 |
> |
if (k != 2 && k != 3) pass = (pass && passCut[k]); |
478 |
|
} |
479 |
|
if (pass) { |
480 |
|
fDileptonMass_NMinusOne->Fill(dilepton->Mass(),NNLOWeight->GetVal()); |
483 |
|
// Lepton Pt Max, Lepton Pt Min, DeltaPhiLeptons |
484 |
|
pass = true; |
485 |
|
for (int k=0;k<nCuts;k++) { |
486 |
< |
pass = (pass && passCut[k]); |
486 |
> |
if (k != 0) |
487 |
> |
pass = (pass && passCut[k]); |
488 |
|
} |
489 |
|
if (pass) { |
490 |
|
fLeptonPtMax_NMinusOne->Fill(CleanLeptons->At(0)->Pt(),NNLOWeight->GetVal()); |
495 |
|
// NSoftMuons |
496 |
|
pass = true; |
497 |
|
for (int k=0;k<nCuts;k++) { |
498 |
< |
if (k != 6) |
476 |
< |
pass = (pass && passCut[k]); |
498 |
> |
if (k != 7) pass = (pass && passCut[k]); |
499 |
|
} |
500 |
|
if (pass) { |
501 |
|
fNSoftMuonsHist_NMinusOne->Fill(SoftMuons->GetEntries(),NNLOWeight->GetVal()); |
509 |
|
fMtLepton1_afterCuts->Fill(mTW[0],NNLOWeight->GetVal()); |
510 |
|
fMtLepton2_afterCuts->Fill(mTW[1],NNLOWeight->GetVal()); |
511 |
|
fMtHiggs_afterCuts->Fill(mtHiggs,NNLOWeight->GetVal()); |
512 |
< |
fLeptonPtPlusMet_afterCuts->Fill(CleanLeptons->At(0)->Pt()+CleanLeptons->At(1)->Pt()+caloMet->Pt(),NNLOWeight->GetVal()); |
512 |
> |
fLeptonPtPlusMet_afterCuts->Fill(CleanLeptons->At(0)->Pt()+CleanLeptons->At(1)->Pt()+stdMet->Pt(),NNLOWeight->GetVal()); |
513 |
|
} |
514 |
|
|
515 |
|
delete dilepton; |
525 |
|
|
526 |
|
// Run finishing code on the computer (slave) that did the analysis. For this |
527 |
|
// module, we dont do anything here. |
528 |
+ |
cout << "selected events on HwwExampleAnalysisMod: " << fNEventsSelected << endl; |
529 |
|
|
530 |
|
} |
531 |
|
//-------------------------------------------------------------------------------------------------- |