31 |
|
fMet(0), |
32 |
|
fVertices(0), |
33 |
|
fPFCandidates(0), |
34 |
+ |
fPFJetName0("AKt5PFJets"), |
35 |
+ |
fPFJet0(0), |
36 |
|
fNEventsSelected(0) |
37 |
|
{ |
38 |
|
// Constructor. |
55 |
|
// Load Branches |
56 |
|
ReqBranch(fMuonBranchName, fMuons); |
57 |
|
ReqBranch(fPFCandidatesName, fPFCandidates); |
58 |
+ |
ReqBranch(fPFJetName0, fPFJet0); |
59 |
|
|
60 |
|
//Create your histograms here |
61 |
|
|
131 |
|
// Process entries of the tree. For this module, we just load the branches and |
132 |
|
LoadBranch(fMuonBranchName); |
133 |
|
LoadBranch(fPFCandidatesName); |
134 |
+ |
LoadBranch(fPFJetName0); |
135 |
|
|
136 |
|
//Obtain all the good objects from the event cleaning module |
137 |
|
fVertices = GetObjThisEvt<VertexOArr>(fVertexName); |
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, 0.1)) 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++) { |
300 |
|
} |
301 |
|
} |
302 |
|
double maxBtag = -99999.; |
299 |
– |
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 |
|
|