42 |
|
// when they are accessed |
43 |
|
|
44 |
|
// (re-)set the pointers using the ObjectHandler |
45 |
< |
ObjectHandler* objs = ObjectHandler::Instance(); |
46 |
< |
m_bcc = objs->GetBaseCycleContainer(); |
47 |
< |
m_lumi = objs->GetLumiHandler(); |
45 |
> |
|
46 |
> |
//m_bcc = ? |
47 |
> |
//m_lumi = ? |
48 |
|
|
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 |
+ |
delete m_ttgen; |
58 |
|
m_ttgen = NULL; |
59 |
+ |
|
60 |
+ |
} |
61 |
+ |
|
62 |
+ |
void EventCalc::SetBaseCycleContainer(BaseCycleContainer* bcc) |
63 |
+ |
{ |
64 |
+ |
// set the internal pointer to the container with all objects |
65 |
+ |
m_bcc = bcc; |
66 |
+ |
m_logger << DEBUG << "Pointer to BaseCycleContainer set." << SLogger::endmsg; |
67 |
+ |
} |
68 |
+ |
|
69 |
+ |
void EventCalc::SetLumiHandler(LuminosityHandler* lh) |
70 |
+ |
{ |
71 |
+ |
// set the internal pointer to the container with all objects |
72 |
+ |
m_lumi = lh; |
73 |
+ |
m_logger << DEBUG << "Pointer to LumiHandler set." << SLogger::endmsg; |
74 |
|
} |
75 |
|
|
76 |
|
BaseCycleContainer* EventCalc::GetBaseCycleContainer() |
175 |
|
TTbarGen* EventCalc::GetTTbarGen(){ |
176 |
|
|
177 |
|
if(!m_ttgen){ |
178 |
< |
m_ttgen = new TTbarGen(); |
178 |
> |
m_ttgen = new TTbarGen(m_bcc); |
179 |
|
} |
180 |
|
|
181 |
|
return m_ttgen; |
267 |
|
LorentzVector wlep_v4 = lepton->v4()+neutrinos[i]; |
268 |
|
|
269 |
|
unsigned int n_jets = m_bcc->jets->size(); |
270 |
+ |
if(n_jets>10) n_jets=10; //avoid crashes in events with many jets |
271 |
|
unsigned int max_j = myPow(3, n_jets); |
272 |
|
for (unsigned int j=0; j < max_j; j++) { |
273 |
|
LorentzVector tophad_v4(0,0,0,0); |
368 |
|
} |
369 |
|
} |
370 |
|
} |
371 |
+ |
|
372 |
+ |
|
373 |
+ |
void EventCalc::ProduceWeight(double weight) |
374 |
+ |
{ |
375 |
+ |
m_TotalWeight = m_TotalWeight * weight; |
376 |
+ |
} |
377 |
+ |
|
378 |
+ |
double EventCalc::GetWeight() |
379 |
+ |
{ |
380 |
+ |
|
381 |
+ |
return m_TotalWeight; |
382 |
+ |
} |
383 |
+ |
|