26 |
|
m_bcc = NULL; |
27 |
|
m_lumi = NULL; |
28 |
|
m_primlep = NULL; |
29 |
+ |
m_ttgen = NULL; |
30 |
|
} |
31 |
|
|
32 |
|
EventCalc::~EventCalc() |
49 |
|
// reset booleans |
50 |
|
b_HT = false; |
51 |
|
b_HTlep = false; |
52 |
+ |
b_Reconstruction = false; |
53 |
|
|
54 |
+ |
m_TotalWeight = 1.; |
55 |
+ |
|
56 |
|
m_primlep = NULL; |
57 |
+ |
m_ttgen = NULL; |
58 |
|
|
59 |
|
} |
60 |
|
|
157 |
|
return m_primlep; |
158 |
|
} |
159 |
|
|
160 |
+ |
TTbarGen* EventCalc::GetTTbarGen(){ |
161 |
+ |
|
162 |
+ |
if(!m_ttgen){ |
163 |
+ |
m_ttgen = new TTbarGen(); |
164 |
+ |
} |
165 |
+ |
|
166 |
+ |
return m_ttgen; |
167 |
+ |
} |
168 |
+ |
|
169 |
|
|
170 |
|
std::vector<LorentzVector> EventCalc::NeutrinoReconstruction(const LorentzVector lepton, const LorentzVector met){ |
171 |
|
|
229 |
|
|
230 |
|
void EventCalc::FillHighMassTTbarHypotheses(){ |
231 |
|
|
232 |
+ |
if(b_Reconstruction) return; |
233 |
+ |
b_Reconstruction=true; |
234 |
+ |
|
235 |
|
//clear hypothesis list |
236 |
|
m_bcc->recoHyps->clear(); |
237 |
|
|
285 |
|
num /= 3; |
286 |
|
} |
287 |
|
|
288 |
+ |
//search jet with highest pt assigned to leptonic top |
289 |
+ |
float maxpt=-999; |
290 |
+ |
int maxind=-1; |
291 |
+ |
for(unsigned int i=0; i<hyp.toplep_jets_indices().size(); ++i){ |
292 |
+ |
float pt = m_bcc->jets->at(hyp.toplep_jets_indices().at(i)).pt(); |
293 |
+ |
if(pt>maxpt){ |
294 |
+ |
maxpt=pt; |
295 |
+ |
maxind=hyp.toplep_jets_indices().at(i); |
296 |
+ |
} |
297 |
+ |
} |
298 |
+ |
hyp.set_blep_index(maxind); |
299 |
+ |
|
300 |
|
|
301 |
< |
//fill only hypotheses with at least on ejet assigned to each top quark |
301 |
> |
//fill only hypotheses with at least one jet assigned to each top quark |
302 |
|
if(hadjets>0 && lepjets>0){ |
303 |
|
hyp.set_tophad_v4(tophad_v4); |
304 |
|
hyp.set_toplep_v4(toplep_v4); |
352 |
|
} |
353 |
|
} |
354 |
|
} |
355 |
+ |
|
356 |
+ |
|
357 |
+ |
void EventCalc::ProduceWeight(double weight) |
358 |
+ |
{ |
359 |
+ |
m_TotalWeight = m_TotalWeight * weight; |
360 |
+ |
} |
361 |
+ |
|
362 |
+ |
double EventCalc::GetWeight() |
363 |
+ |
{ |
364 |
+ |
|
365 |
+ |
return m_TotalWeight; |
366 |
+ |
} |
367 |
+ |
|