12 |
|
#include "ExternData.h" |
13 |
|
#include "SelectionDefs.h" |
14 |
|
|
15 |
+ |
//-------------------------------------------------------------------------------------------------- |
16 |
+ |
void fillVetoArrays( ControlFlags & ctrl, |
17 |
+ |
const mithep::Array<mithep::Muon> *muonArr, |
18 |
+ |
vector< const mithep::Muon*> & muonsToVeto, |
19 |
+ |
const mithep::Array<mithep::Electron> *electronArr, |
20 |
+ |
vector< const mithep::Electron*> & electronsToVeto, |
21 |
+ |
const mithep::Vertex & vtx ) |
22 |
+ |
//-------------------------------------------------------------------------------------------------- |
23 |
+ |
{ |
24 |
+ |
if( ctrl.debug ) cout << "looping for isolation ..." << endl; |
25 |
+ |
for(int i=0; i<muonArr->GetEntries(); i++) |
26 |
+ |
{ |
27 |
+ |
const mithep::Muon *mu = (const mithep::Muon*)((*muonArr)[i]); |
28 |
+ |
SelectionStatus musel; |
29 |
+ |
// musel |= muonCutBasedVeto(ctrl,mu,vtx); |
30 |
+ |
musel |= muonDummyVeto(ctrl,mu,vtx); |
31 |
+ |
if( !(musel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
32 |
+ |
if(ctrl.debug) cout << "pushing mu for isol veto ... " << endl; |
33 |
+ |
muonsToVeto.push_back( mu ); |
34 |
+ |
} |
35 |
+ |
for(int i=0; i<electronArr->GetEntries(); i++) |
36 |
+ |
{ |
37 |
+ |
const mithep::Electron *ele = (const mithep::Electron*)((*electronArr)[i]); |
38 |
+ |
SelectionStatus esel; |
39 |
+ |
// esel |= electronCutBasedVeto(ctrl,ele,vtx); |
40 |
+ |
esel |= electronDummyVeto(ctrl,ele,vtx); |
41 |
+ |
if( !(esel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
42 |
+ |
if(ctrl.debug) cout << "pushing ele for isol veto ... " << endl; |
43 |
+ |
electronsToVeto.push_back( ele ); |
44 |
+ |
} |
45 |
+ |
if( ctrl.debug ) cout << "done selecting for isolation veto ..." << endl << endl;; |
46 |
+ |
} |
47 |
+ |
|
48 |
|
|
49 |
< |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
17 |
< |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
18 |
< |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
49 |
> |
//-------------------------------------------------------------------------------------------------- |
50 |
|
EventData apply_HZZ4L_selection(ControlFlags &ctrl, // input control |
51 |
|
const mithep::EventHeader *info, // input event info |
52 |
|
const mithep::Vertex & vtx, |
84 |
|
vector<const mithep::Muon*>, |
85 |
|
vector<const mithep::Electron*> ) |
86 |
|
) |
87 |
< |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
87 |
> |
//-------------------------------------------------------------------------------------------------- |
88 |
|
{ |
89 |
|
|
90 |
|
EventData ret; |
92 |
|
TRandom3 r; |
93 |
|
|
94 |
|
if( ctrl.debug ) { |
95 |
+ |
cout << "-----------------------------------------------------------------" << endl; |
96 |
+ |
cout << "-----------------------------------------------------------------" << endl; |
97 |
|
cout << "Run: " << info->RunNum() |
98 |
|
<< "\tEvt: " << info->EvtNum() |
99 |
|
<< "\tLumi: " << info->LumiSec() |
100 |
|
<< endl; |
101 |
+ |
cout << "-----------------------------------------------------------------" << endl; |
102 |
|
} |
103 |
|
|
104 |
|
if( !ctrl.mc ) { |
111 |
|
} |
112 |
|
} |
113 |
|
|
114 |
< |
mithep::MuonTools::EMuonEffectiveAreaTarget eraMu = mithep::MuonTools::kMuEAData2011; |
115 |
< |
mithep::ElectronTools::EElectronEffectiveAreaTarget eraEle = mithep::ElectronTools::kEleEAData2011; |
116 |
< |
if( ctrl.mc ) { |
117 |
< |
eraMu = mithep::MuonTools::kMuEAFall11MC; |
118 |
< |
eraEle = mithep::ElectronTools::kEleEAFall11MC; |
114 |
> |
mithep::MuonTools::EMuonEffectiveAreaTarget eraMu = mithep::MuonTools::kMuEAFall11MC; |
115 |
> |
mithep::ElectronTools::EElectronEffectiveAreaTarget eraEle = mithep::ElectronTools::kEleEAFall11MC; |
116 |
> |
if( !ctrl.mc ) { |
117 |
> |
eraMu = mithep::MuonTools::kMuEAData2011; |
118 |
> |
eraEle = mithep::ElectronTools::kEleEAData2011; |
119 |
|
} |
120 |
|
|
121 |
|
|
135 |
|
return ret; |
136 |
|
} |
137 |
|
} |
138 |
+ |
*/ |
139 |
+ |
|
140 |
|
if( ctrl.debug ) { |
141 |
|
cout << "presel nlep: " << muonArr->GetEntries() + electronArr->GetEntries() |
142 |
|
<< "\tnmuon: " << muonArr->GetEntries() |
143 |
|
<< "\tnelectron: " << electronArr->GetEntries() |
144 |
|
<< endl; |
145 |
|
} |
146 |
< |
*/ |
146 |
> |
|
147 |
|
|
148 |
|
//******************************************************** |
149 |
|
// Lepton Selection |
150 |
|
//******************************************************** |
151 |
|
vector<SimpleLepton> lepvec; |
152 |
|
|
117 |
– |
// do something hacky for vetos for now |
153 |
|
vector<const mithep::Muon*> muonsToVeto; |
154 |
|
vector<const mithep::Electron*> electronsToVeto; |
155 |
< |
for(Int_t i=0; i<muonArr->GetEntries(); i++) |
121 |
< |
{ |
122 |
< |
const mithep::Muon *mu = (mithep::Muon*)((*muonArr)[i]); |
123 |
< |
SelectionStatus musel; |
124 |
< |
musel |= (*MuonPreSelector)(ctrl,mu,vtx,pfCandidates); |
125 |
< |
if( !(musel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
126 |
< |
musel |= (*MuonIDSelector)(ctrl,mu,vtx ); |
127 |
< |
if( musel.getStatus() == SelectionStatus::TIGHTIDANDPRE ) |
128 |
< |
muonsToVeto.push_back( mu ); |
129 |
< |
} |
130 |
< |
for(Int_t i=0; i<electronArr->GetEntries(); i++) |
131 |
< |
{ |
132 |
< |
const mithep::Electron *ele = (mithep::Electron*)((*electronArr)[i]); |
133 |
< |
SelectionStatus esel; |
134 |
< |
esel |= (*ElectronPreSelector)(ctrl,ele,vtx); |
135 |
< |
if( !(esel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
136 |
< |
esel |= (*ElectronIDSelector)(ctrl,ele,vtx ); |
137 |
< |
if( esel.getStatus() == SelectionStatus::TIGHTIDANDPRE ) |
138 |
< |
electronsToVeto.push_back( ele ); |
139 |
< |
} |
155 |
> |
fillVetoArrays( ctrl, muonArr, muonsToVeto, electronArr, electronsToVeto, vtx ); |
156 |
|
|
157 |
|
// |
158 |
|
if( ctrl.debug ) cout << "\tnMuons: " << muonArr->GetEntries() << endl; |
179 |
|
} |
180 |
|
|
181 |
|
if ( musel.pass() ) { |
182 |
< |
|
182 |
> |
|
183 |
|
SimpleLepton tmplep; |
184 |
|
float pt = mu->Pt(); |
185 |
|
tmplep.vecorig->SetPtEtaPhiM(pt, |
354 |
|
|
355 |
|
float tmpZ1Mass = (*leptonPlus + *leptonMinus).M(); |
356 |
|
if( ctrl.debug ) cout << "Z1 selection, tmpZ1Mass: " << tmpZ1Mass << endl; |
357 |
< |
if( tmpZ1Mass > 60 ) { |
357 |
> |
if( tmpZ1Mass > 50 ) { |
358 |
|
if (fabs(tmpZ1Mass - Z_MASS) < fabs(BestZ1Mass - Z_MASS)) { |
359 |
|
BestZ1Mass = tmpZ1Mass; |
360 |
|
if( ctrl.debug ) cout << "Z1 selection, new BestZ1Mass: " << BestZ1Mass |