27 |
|
|
28 |
|
vector<int> photonIndices; |
29 |
|
for( int i=0; i<pfArr->GetEntries(); i++ ) { |
30 |
+ |
|
31 |
|
if( !(PFnoPUflag[i])) continue; // my PF no PU hack |
32 |
|
const mithep::PFCandidate *pf = (mithep::PFCandidate*)((*pfArr)[i]); |
33 |
|
if( abs(pf->PFType()) == mithep::PFCandidate::eGamma && |
64 |
|
if( flagEleSC ) continue; |
65 |
|
if( ctrl.debug ) std::cerr << "FSR :: not matched to an ele SC ... " << std::endl; |
66 |
|
|
66 |
– |
|
67 |
|
// |
68 |
|
// check that input electron is the closest lepton to this photon |
69 |
|
// |
108 |
|
// |
109 |
|
// "need tighter cuts for other photons ..." |
110 |
|
// |
111 |
< |
// if( dR < 0.5 && pf->Pt() > 4. && dbetaCorrectedIsoDr03(ctrl, pf, el, pfArr) < 1.0) { |
111 |
> |
//if( dR < 0.5 && pf->Pt() > 4. && dbetaCorrectedIsoDr03(ctrl, pf, el, pfArr) < 1.0) { |
112 |
|
if( dR < 0.5 && pf->Pt() > 4. && nonCorrectedIsoDr03(ctrl, pf, el, pfArr) < 1.0) { |
113 |
|
if( ctrl.debug ) std::cerr << "FSR :: tighter cuts, pushing ... " << std::endl; |
114 |
|
photonIndices.push_back(i); |
183 |
|
vector<const mithep::PFCandidate*> &photonsToVeto ) |
184 |
|
//-------------------------------------------------------------------------------------------------- |
185 |
|
{ |
186 |
+ |
|
187 |
|
if( lepvec[muonIndex].fsrRecoveryAttempted ) return false; |
188 |
|
|
189 |
|
vector<int> photonIndices; |
190 |
|
for( int i=0; i<pfArr->GetEntries(); i++ ) { |
191 |
+ |
|
192 |
|
if( !(PFnoPUflag[i])) continue; // my PF no PU hack |
193 |
+ |
|
194 |
|
const mithep::PFCandidate *pf = (mithep::PFCandidate*)((*pfArr)[i]); |
195 |
|
if( abs(pf->PFType()) == mithep::PFCandidate::eGamma && |
196 |
|
pf->Pt() > 2.0 && fabs(pf->Eta()) < 2.4 ) { |
197 |
< |
|
197 |
> |
|
198 |
|
if( ctrl.debug ) std::cerr << "FSR :: pass preselection ... pt: "<< pf->Pt() << std::endl; |
199 |
|
// float dR = mithep::MathUtils::DeltaR(pf->Phi(),pf->Eta(), mu->Phi(), mu->Eta()); |
200 |
|
float dR = mithep::MathUtils::DeltaR(pf->Phi(),pf->Eta(), |
201 |
|
lepvec[muonIndex].vec.Phi(), lepvec[muonIndex].vec.Eta()); |
202 |
|
if( ctrl.debug ) std::cerr << "FSR :: dR = " << dR << std::endl; |
200 |
– |
|
203 |
|
// |
204 |
|
// veto if close to an electron SC |
205 |
|
// |
217 |
|
<< "\tetaELH: " << eeta |
218 |
|
<< "\tdR:" << dR << endl; |
219 |
|
if( (dPhi<2.&& dEta<0.05) || dR<0.15 ) { |
220 |
< |
flagEleSC = true; |
221 |
< |
break; |
220 |
> |
flagEleSC = true; |
221 |
> |
break; |
222 |
|
} |
223 |
|
if( flagEleSC ) break; |
224 |
|
} |
225 |
|
if( flagEleSC ) continue; |
226 |
|
if( ctrl.debug ) std::cerr << "FSR :: not matched to an ele SC ... " << std::endl; |
227 |
< |
|
228 |
< |
|
227 |
> |
|
228 |
> |
|
229 |
|
// |
230 |
|
// check that input muon is the closest lepton to this photon |
231 |
|
// |
244 |
|
} |
245 |
|
if( found_closer_lepton ) continue; |
246 |
|
|
247 |
< |
|
248 |
< |
|
247 |
> |
|
248 |
> |
|
249 |
|
// |
250 |
|
// Z mass OK? |
251 |
|
// |
258 |
|
) ) continue; |
259 |
|
if( ctrl.debug ) std::cerr << "FSR :: improved Zmass ... " << |
260 |
|
Zvec->M() << " -> " << newMass << std::endl; |
261 |
< |
|
261 |
> |
|
262 |
|
// |
263 |
|
// "keep all photons close to one of the 4L muons ..." |
264 |
|
// |
272 |
|
// |
273 |
|
if( ctrl.debug ) std::cerr << "FSR :: pass tighter?, pT: " << pf->Pt() << std::endl; |
274 |
|
// if( dR < 0.5 && pf->Pt() > 4. && dbetaCorrectedIsoDr03(ctrl, pf, mu, pfArr) < 1.0) { |
275 |
+ |
|
276 |
+ |
|
277 |
|
if( dR < 0.5 && pf->Pt() > 4. && nonCorrectedIsoDr03(ctrl, pf, mu, pfArr) < 1.0) { |
278 |
|
if( ctrl.debug ) std::cerr << "FSR :: tighter cuts, pushing index= " << i << std::endl; |
279 |
|
photonIndices.push_back(i); |
280 |
|
} |
281 |
|
} |
282 |
|
} |
283 |
< |
|
283 |
> |
|
284 |
|
float highest_pt = -1; int highest_pt_index=-1; |
285 |
|
float smallest_dR = 999.; int smallest_dR_index=-1; |
286 |
|
for( int i=0; i<photonIndices.size(); i++ ) { |
354 |
|
bool foundPF=false; |
355 |
|
const mithep::PFCandidate * thepf; |
356 |
|
for( int i=0; i<pfArr->GetEntries(); i++ ) { |
357 |
+ |
|
358 |
|
if( !(PFnoPUflag[i]) ) continue; // my PF no PU hack |
359 |
|
const mithep::PFCandidate *pf = (mithep::PFCandidate*)((*pfArr)[i]); |
360 |
|
if( abs(pf->PFType()) == mithep::PFCandidate::eMuon |