ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/src/SelectionFuncs.cc
(Generate patch)

Comparing UserCode/MitHzz4l/Selection/src/SelectionFuncs.cc (file contents):
Revision 1.5 by khahn, Wed Jun 20 19:17:30 2012 UTC vs.
Revision 1.6 by dkralph, Thu Jun 21 21:50:39 2012 UTC

# Line 17 | Line 17 | bool setPV(ControlFlags ctrl,
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;
# Line 260 | Line 260 | void setEra(string fname, ControlFlags &
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines