4 |
|
// |
5 |
|
//*************************************************************************************************** |
6 |
|
|
7 |
+ |
// system headers |
8 |
+ |
#include <map> |
9 |
+ |
#include <utility> |
10 |
+ |
|
11 |
+ |
// mit headers |
12 |
+ |
#include "Vertex.h" |
13 |
+ |
|
14 |
+ |
// 4L stuff |
15 |
|
#include "SelectionStatus.h" |
16 |
|
#include "EventData.h" |
17 |
|
#include "SimpleLepton.h" |
18 |
|
#include "EfficiencyWeightsInterface.h" |
11 |
– |
|
19 |
|
#include "ElectronSelection.h" |
20 |
|
#include "MuonSelection.h" |
21 |
|
#include "IsolationSelection.h" |
22 |
|
#include "ReferenceSelection.h" |
23 |
|
#include "Selection.h" |
24 |
< |
#include "Vertex.h" |
18 |
< |
|
19 |
< |
|
20 |
< |
//#include "RunLumiRangeMap.h" |
21 |
< |
//#include "ExternData.h" |
24 |
> |
#include "CommonDefs.h" |
25 |
|
#include "SelectionDefs.h" |
26 |
+ |
#ifdef FSR_RECOVERY |
27 |
+ |
#include "FSR.h" |
28 |
+ |
#endif |
29 |
|
|
24 |
– |
#include <map> |
25 |
– |
#include <utility> |
30 |
|
|
31 |
|
extern vector<SimpleLepton> failingLeptons; |
32 |
|
extern vector<SimpleLepton> passingLeptons; |
158 |
|
eraMu = mithep::MuonTools::kMuEAData2012; |
159 |
|
eraEle = mithep::ElectronTools::kEleEAData2012; |
160 |
|
} else if( ctrl.mc && ctrl.era == 2011 ) { |
161 |
< |
// !!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!! |
162 |
< |
// MC hardwired to data EA for sync |
159 |
< |
// !!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!! |
160 |
< |
eraMu = mithep::MuonTools::kMuEAData2012; |
161 |
< |
eraEle = mithep::ElectronTools::kEleEAData2012; |
161 |
> |
eraMu = mithep::MuonTools::kMuEAFall11MC; |
162 |
> |
eraEle = mithep::ElectronTools::kEleEAFall11MC; |
163 |
|
} else if( ctrl.mc && ctrl.era == 2012 ) { |
163 |
– |
// !!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!! |
164 |
– |
// MC hardwired to data EA for sync |
165 |
– |
// !!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!! |
164 |
|
eraMu = mithep::MuonTools::kMuEAData2012; |
165 |
|
eraEle = mithep::ElectronTools::kEleEAData2012; |
166 |
|
} else { |
311 |
|
if(ctrl.debug) cout << "musel.status after ID: " << musel.getStatus() << endl; |
312 |
|
if( ctrl.debug ) cout << endl; |
313 |
|
|
314 |
+ |
#ifdef FSR_RECOVERY |
315 |
+ |
float old_pt = mu->Pt(); |
316 |
+ |
mithep::Muon * newmu = const_cast<mithep::Muon *>(mu); |
317 |
+ |
if( recover_typeI_Photon( newmu, pfCandidates ) ) { |
318 |
+ |
cout << "FSR TYPEI :: oldpt: " << old_pt << "\tnewpt: " << mu->Pt() << endl; |
319 |
+ |
old_pt = mu->Pt(); |
320 |
+ |
} |
321 |
+ |
if( recover_typeII_Photon( newmu, pfCandidates ) ) { |
322 |
+ |
cout << "FSR TYPEII :: oldpt: " << old_pt << "\tnewpt: " << mu->Pt() << endl; |
323 |
+ |
old_pt = mu->Pt(); |
324 |
+ |
} |
325 |
+ |
#endif |
326 |
+ |
|
327 |
|
#ifdef HACKED_RHOS |
328 |
|
musel |= (*MuonIsoSelector)(ctrl,mu,vtx,pfCandidates,rho,eraMu,muonsToVeto,electronsToVeto); |
329 |
|
#else |
421 |
|
SimpleLepton tmplep; |
422 |
|
float pt = ele->Pt(); |
423 |
|
tmplep.vec.SetPtEtaPhiM( pt, |
424 |
< |
ele->Eta(), |
425 |
< |
ele->Phi(), |
426 |
< |
ELECTRON_MASS ); |
424 |
> |
ele->Eta(), |
425 |
> |
ele->Phi(), |
426 |
> |
ELECTRON_MASS ); |
427 |
|
|
428 |
|
tmplep.type = 11; |
429 |
|
tmplep.index = i; |
801 |
|
ret.status.setStatus(SelectionStatus::FAIL); |
802 |
|
return ret; |
803 |
|
} |
804 |
< |
|
804 |
> |
|
805 |
> |
//*************************************************************** |
806 |
> |
// finish |
807 |
> |
//*************************************************************** |
808 |
|
|
809 |
|
TLorentzVector theZ1 = (lepvec[ZCandidates[best_Z1_index].first].vec) + |
810 |
|
(lepvec[ZCandidates[best_Z1_index].second].vec); |
825 |
|
// << "\ttrigbits: " << hex << info->triggerBits << dec |
826 |
|
// << "\ttree: " << inputFiles[q][f] |
827 |
|
<< endl; |
814 |
– |
|
815 |
– |
|
816 |
– |
|
817 |
– |
//*************************************************************** |
818 |
– |
// finish |
819 |
– |
//*************************************************************** |
828 |
|
|
829 |
|
if( !evtfail ) { |
830 |
|
ret.status.setStatus(SelectionStatus::EVTPASS); |
837 |
|
|
838 |
|
return ret; |
839 |
|
} |
840 |
< |
const mithep::Vertex *bestPV = 0; |
833 |
< |
const mithep::Vertex *pv =0 ; |
840 |
> |
|
841 |
|
//---------------------------------------------------------------------------- |
842 |
|
// |
843 |
|
// Get primary vertices |
850 |
|
const mithep::Vertex* &vtx) |
851 |
|
//---------------------------------------------------------------------------- |
852 |
|
{ |
853 |
< |
bestPV = 0; |
854 |
< |
pv = 0; |
853 |
> |
|
854 |
> |
const mithep::Vertex *bestPV = 0; |
855 |
|
float best_sumpt=-1; |
856 |
|
|
857 |
|
// good PV requirements |
861 |
|
const Double_t fMaxRho = 2; |
862 |
|
|
863 |
|
for(int i=0; i<vtxArr->GetEntries(); ++i) { |
864 |
< |
pv = (mithep::Vertex*)(vtxArr->At(i)); |
864 |
> |
const mithep::Vertex *pv = (mithep::Vertex*)(vtxArr->At(i)); |
865 |
|
if( ctrl.debug ) cout << "vertex :: " << i << "\tntrks: " << pv->NTracks() << endl; |
866 |
|
|
867 |
|
// Select best PV for corrected d0; if no PV passing cuts, the first PV in the collection will be used |
897 |
|
}; |
898 |
|
|
899 |
|
|
893 |
– |
|