25 |
|
|
26 |
|
//-------------------------------------------------------------------------------------------------- |
27 |
|
Float_t computePFMuonIso(const mithep::Muon *muon, |
28 |
< |
const mithep::Vertex & vtx, |
28 |
> |
const mithep::Vertex * vtx, |
29 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
30 |
|
const Double_t dRMax) |
31 |
|
//-------------------------------------------------------------------------------------------------- |
34 |
|
const Double_t neuPtMin = 1.0; |
35 |
|
const Double_t dzMax = 0.1; |
36 |
|
|
37 |
< |
Double_t zLepton = (muon->BestTrk()) ? muon->BestTrk()->DzCorrected(vtx) : 0.0; |
37 |
> |
Double_t zLepton = (muon->BestTrk()) ? muon->BestTrk()->DzCorrected(*vtx) : 0.0; |
38 |
|
|
39 |
|
Float_t iso=0; |
40 |
|
for(UInt_t ipf=0; ipf<fPFCandidates->GetEntries(); ipf++) { |
46 |
|
if(pfcand->TrackerTrk() && muon->TrackerTrk() && (pfcand->TrackerTrk()==muon->TrackerTrk())) continue; |
47 |
|
|
48 |
|
// dz cut |
49 |
< |
Double_t dz = (pfcand->BestTrk()) ? fabs(pfcand->BestTrk()->DzCorrected(vtx) - zLepton) : 0; |
49 |
> |
Double_t dz = (pfcand->BestTrk()) ? fabs(pfcand->BestTrk()->DzCorrected(*vtx) - zLepton) : 0; |
50 |
|
if(dz >= dzMax) continue; |
51 |
|
|
52 |
|
// check iso cone |
60 |
|
|
61 |
|
//-------------------------------------------------------------------------------------------------- |
62 |
|
Float_t computePFEleIso(const mithep::Electron *electron, |
63 |
< |
const mithep::Vertex & fVertex, |
63 |
> |
const mithep::Vertex * fVertex, |
64 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
65 |
|
const Double_t dRMax) |
66 |
|
//-------------------------------------------------------------------------------------------------- |
69 |
|
const Double_t neuPtMin = 1.0; |
70 |
|
const Double_t dzMax = 0.1; |
71 |
|
|
72 |
< |
Double_t zLepton = (electron->BestTrk()) ? electron->BestTrk()->DzCorrected(fVertex) : 0.0; |
72 |
> |
Double_t zLepton = (electron->BestTrk()) ? electron->BestTrk()->DzCorrected(*fVertex) : 0.0; |
73 |
|
|
74 |
|
Float_t iso=0; |
75 |
|
for(UInt_t ipf=0; ipf<fPFCandidates->GetEntries(); ipf++) { |
78 |
|
if(!pfcand->HasTrk() && (pfcand->Pt()<=neuPtMin)) continue; // pT cut on neutral particles |
79 |
|
|
80 |
|
// dz cut |
81 |
< |
Double_t dz = (pfcand->BestTrk()) ? fabs(pfcand->BestTrk()->DzCorrected(fVertex) - zLepton) : 0; |
81 |
> |
Double_t dz = (pfcand->BestTrk()) ? fabs(pfcand->BestTrk()->DzCorrected(*fVertex) - zLepton) : 0; |
82 |
|
if(dz >= dzMax) continue; |
83 |
|
|
84 |
|
// remove THE electron |
182 |
|
//-------------------------------------------------------------------------------------------------- |
183 |
|
SelectionStatus muonIsoSelection(ControlFlags &ctrl, |
184 |
|
const mithep::Muon * mu, |
185 |
< |
const mithep::Vertex & vtx, |
185 |
> |
const mithep::Vertex * vtx, |
186 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidateCol ) |
187 |
|
//-------------------------------------------------------------------------------------------------- |
188 |
|
{ |
212 |
|
//-------------------------------------------------------------------------------------------------- |
213 |
|
SelectionStatus electronIsoSelection(ControlFlags &ctrl, |
214 |
|
const mithep::Electron * ele, |
215 |
< |
const mithep::Vertex &fVertex, |
215 |
> |
const mithep::Vertex *fVertex, |
216 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates) |
217 |
|
//-------------------------------------------------------------------------------------------------- |
218 |
|
{ |
254 |
|
//-------------------------------------------------------------------------------------------------- |
255 |
|
SelectionStatus muonIsoMVASelection(ControlFlags &ctrl, |
256 |
|
const mithep::Muon * mu, |
257 |
< |
const mithep::Vertex & vtx, |
257 |
> |
const mithep::Vertex * vtx, |
258 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
259 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
260 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
595 |
|
//-------------------------------------------------------------------------------------------------- |
596 |
|
SelectionStatus muonIsoMVASelection(ControlFlags &ctrl, |
597 |
|
const mithep::Muon * mu, |
598 |
< |
const mithep::Vertex & vtx, |
598 |
> |
const mithep::Vertex * vtx, |
599 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
600 |
|
float rho, |
601 |
|
//const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
957 |
|
//-------------------------------------------------------------------------------------------------- |
958 |
|
double muonPFIso04(ControlFlags &ctrl, |
959 |
|
const mithep::Muon * mu, |
960 |
< |
const mithep::Vertex & vtx, |
960 |
> |
const mithep::Vertex * vtx, |
961 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
962 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
963 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
1137 |
|
// hacked version |
1138 |
|
double muonPFIso04(ControlFlags &ctrl, |
1139 |
|
const mithep::Muon * mu, |
1140 |
< |
const mithep::Vertex & vtx, |
1140 |
> |
const mithep::Vertex * vtx, |
1141 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
1142 |
|
float rho, |
1143 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
1313 |
|
//-------------------------------------------------------------------------------------------------- |
1314 |
|
SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl, |
1315 |
|
const mithep::Muon * mu, |
1316 |
< |
const mithep::Vertex & vtx, |
1316 |
> |
const mithep::Vertex * vtx, |
1317 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
1318 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
1319 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
1349 |
|
// hacked version |
1350 |
|
SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl, |
1351 |
|
const mithep::Muon * mu, |
1352 |
< |
const mithep::Vertex & vtx, |
1352 |
> |
const mithep::Vertex * vtx, |
1353 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
1354 |
|
float rho, |
1355 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
1386 |
|
//-------------------------------------------------------------------------------------------------- |
1387 |
|
SelectionStatus electronIsoMVASelection(ControlFlags &ctrl, |
1388 |
|
const mithep::Electron * ele, |
1389 |
< |
const mithep::Vertex & vtx, |
1389 |
> |
const mithep::Vertex * vtx, |
1390 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
1391 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
1392 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
1478 |
|
|
1479 |
|
if(ctrl.debug) { |
1480 |
|
cout << "pf :: type: " << pf->PFType() << "\tpt: " << pf->Pt(); |
1481 |
< |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(vtx); |
1481 |
> |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(*vtx); |
1482 |
|
cout << endl; |
1483 |
|
} |
1484 |
|
|
1805 |
|
//-------------------------------------------------------------------------------------------------- |
1806 |
|
SelectionStatus electronIsoMVASelection(ControlFlags &ctrl, |
1807 |
|
const mithep::Electron * ele, |
1808 |
< |
const mithep::Vertex & vtx, |
1808 |
> |
const mithep::Vertex * vtx, |
1809 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
1810 |
|
float rho, |
1811 |
|
//const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
1902 |
|
|
1903 |
|
if(ctrl.debug) { |
1904 |
|
cout << "pf :: type: " << pf->PFType() << "\tpt: " << pf->Pt(); |
1905 |
< |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(vtx); |
1905 |
> |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(*vtx); |
1906 |
|
cout << endl; |
1907 |
|
} |
1908 |
|
|
2247 |
|
// hacked version |
2248 |
|
float electronPFIso04(ControlFlags &ctrl, |
2249 |
|
const mithep::Electron * ele, |
2250 |
< |
const mithep::Vertex & vtx, |
2250 |
> |
const mithep::Vertex * vtx, |
2251 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
2252 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
2253 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
2301 |
|
|
2302 |
|
if(ctrl.debug) { |
2303 |
|
cout << "pf :: type: " << pf->PFType() << "\tpt: " << pf->Pt() << "\tdR: " << dr; |
2304 |
< |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(vtx) |
2304 |
> |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(*vtx) |
2305 |
|
<< "\ttrk: " << pf->HasTrackerTrk() |
2306 |
|
<< "\tgsf: " << pf->HasGsfTrk(); |
2307 |
|
|
2467 |
|
// hacked version |
2468 |
|
float electronPFIso04(ControlFlags &ctrl, |
2469 |
|
const mithep::Electron * ele, |
2470 |
< |
const mithep::Vertex & vtx, |
2470 |
> |
const mithep::Vertex * vtx, |
2471 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
2472 |
|
float rho, |
2473 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
2521 |
|
|
2522 |
|
if(ctrl.debug) { |
2523 |
|
cout << "pf :: type: " << pf->PFType() << "\tpt: " << pf->Pt() << "\tdR: " << dr; |
2524 |
< |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(vtx) |
2524 |
> |
if( pf->HasTrackerTrk() ) cout << "\tdZ: " << pf->TrackerTrk()->DzCorrected(*vtx) |
2525 |
|
<< "\ttrk: " << pf->HasTrackerTrk() |
2526 |
|
<< "\tgsf: " << pf->HasGsfTrk(); |
2527 |
|
|
2684 |
|
//-------------------------------------------------------------------------------------------------- |
2685 |
|
SelectionStatus electronReferenceIsoSelection(ControlFlags &ctrl, |
2686 |
|
const mithep::Electron * ele, |
2687 |
< |
const mithep::Vertex & vtx, |
2687 |
> |
const mithep::Vertex * vtx, |
2688 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
2689 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
2690 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
2720 |
|
// hacked version |
2721 |
|
SelectionStatus electronReferenceIsoSelection(ControlFlags &ctrl, |
2722 |
|
const mithep::Electron * ele, |
2723 |
< |
const mithep::Vertex & vtx, |
2723 |
> |
const mithep::Vertex * vtx, |
2724 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
2725 |
|
float rho, |
2726 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |