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; |
150 |
|
//******************************************************** |
151 |
|
vector<SimpleLepton> lepvec; |
152 |
|
|
122 |
– |
// do something hacky for vetos for now |
153 |
|
vector<const mithep::Muon*> muonsToVeto; |
154 |
|
vector<const mithep::Electron*> electronsToVeto; |
155 |
< |
if( ctrl.debug ) cout << "looping for isolation ..." << endl; |
126 |
< |
for(Int_t i=0; i<muonArr->GetEntries(); i++) |
127 |
< |
{ |
128 |
< |
const mithep::Muon *mu = (mithep::Muon*)((*muonArr)[i]); |
129 |
< |
SelectionStatus musel; |
130 |
< |
musel |= (*MuonPreSelector)(ctrl,mu,vtx,pfCandidates); |
131 |
< |
if( !(musel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
132 |
< |
musel |= (*MuonIDSelector)(ctrl,mu,vtx ); |
133 |
< |
if(ctrl.debug) cout << "status : " << musel.getStatus() << endl; |
134 |
< |
if( musel.tightIDAndPre() ) { |
135 |
< |
if(ctrl.debug) cout << "pushing mu for isol veto ... " << endl; |
136 |
< |
muonsToVeto.push_back( mu ); |
137 |
< |
} |
138 |
< |
} |
139 |
< |
for(Int_t i=0; i<electronArr->GetEntries(); i++) |
140 |
< |
{ |
141 |
< |
const mithep::Electron *ele = (mithep::Electron*)((*electronArr)[i]); |
142 |
< |
SelectionStatus esel; |
143 |
< |
esel |= (*ElectronPreSelector)(ctrl,ele,vtx); |
144 |
< |
if( !(esel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
145 |
< |
esel |= (*ElectronIDSelector)(ctrl,ele,vtx ); |
146 |
< |
if(ctrl.debug) cout << "status : " << esel.getStatus() << endl; |
147 |
< |
if( esel.tightIDAndPre() ) { |
148 |
< |
if(ctrl.debug) cout << "pushing ele for isol veto ... " << endl; |
149 |
< |
electronsToVeto.push_back( ele ); |
150 |
< |
} |
151 |
< |
} |
152 |
< |
if( ctrl.debug ) cout << "done looping for isolation ..." << endl << endl;; |
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, |