17 |
|
const mithep::Array<mithep::Vertex> * vtxArr, |
18 |
|
const mithep::Vertex* &vtx) |
19 |
|
//---------------------------------------------------------------------------- |
20 |
< |
{ |
20 |
> |
{ |
21 |
|
|
22 |
|
const mithep::Vertex *bestPV = 0; |
23 |
|
float best_sumpt=-1; |
260 |
|
} |
261 |
|
|
262 |
|
//---------------------------------------------------------------------------------------- |
263 |
< |
int getNPU(mithep::Array<mithep::PileupInfo> *puArr, int bx) |
263 |
> |
unsigned getNPU(mithep::Array<mithep::PileupInfo> *puArr, int bx) |
264 |
|
//---------------------------------------------------------------------------------------- |
265 |
|
{ |
266 |
|
|
267 |
– |
cout << "size of puarr: " << puArr->GetEntries() << endl; |
267 |
|
// Identify bunch crossing 0 in PU info |
268 |
|
int ibx0=-1, ibxm=-1, ibxp=-1; |
270 |
– |
cout<< "before: " << ibx0<< "\t" << ibxm<<"\t"<<ibxp<<endl; |
269 |
|
assert(puArr); |
270 |
|
for(unsigned i=0; i<puArr->GetEntries(); ++i) { |
271 |
|
if(puArr->At(i)->GetBunchCrossing() == 0) ibx0=i; |
272 |
|
if(puArr->At(i)->GetBunchCrossing() ==-1) ibxm=i; |
273 |
|
if(puArr->At(i)->GetBunchCrossing() == 1) ibxp=i; |
274 |
|
} |
277 |
– |
cout<< "after: " << ibx0<< "\t" << ibxm<<"\t"<<ibxp<<endl; |
275 |
|
|
276 |
|
if(bx==0) return puArr->At(ibx0)->GetPU_NumInteractions(); |
277 |
|
else if(bx==-1) return puArr->At(ibxm)->GetPU_NumInteractions(); |
278 |
|
else if(bx== 1) return puArr->At(ibxp)->GetPU_NumInteractions(); |
279 |
|
else assert(0); |
280 |
|
|
281 |
< |
return -1; |
281 |
> |
return 0; |
282 |
|
} |
283 |
|
|
284 |
|
|