Fork me on GitHub

Ignore:
Timestamp:
Nov 4, 2013, 1:14:33 PM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
4ad7b96
Parents:
e9065e7
Message:

fix loop in JetPileUpSubtractor and add rho eta ranges for Isolation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/JetPileUpSubtractor.cc

    re9065e7 re9023b9  
    8383void JetPileUpSubtractor::Process()
    8484{
    85   Candidate *candidate;
     85  Candidate *candidate, *object;
    8686  TLorentzVector momentum, area;
    8787  Double_t eta = 0.0;
    8888  Double_t rho = 0.0;
    89 
    90   if(!fRhoInputArray) return;
    9189
    9290  // loop over all input candidates
     
    10098    // find rho
    10199    rho = 0.0;
    102     while((candidate = static_cast<Candidate*>(fItRhoInputArray->Next())))
     100    if(fRhoInputArray)
    103101    {
    104       if(eta >= candidate->Edges[0] && eta < candidate->Edges[1])
     102      fItRhoInputArray->Reset();
     103      while((object = static_cast<Candidate*>(fItRhoInputArray->Next())))
    105104      {
    106         rho = candidate->Momentum.Pt();
     105        if(eta >= object->Edges[0] && eta < object->Edges[1])
     106        {
     107          rho = object->Momentum.Pt();
     108        }
    107109      }
    108     } 
     110    }
    109111
    110112    // apply pile-up correction
     
    112114
    113115    momentum -= rho * area;
    114  
     116
    115117    if(momentum.Pt() <= fJetPTMin) continue;
    116118
Note: See TracChangeset for help on using the changeset viewer.