Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Isolation.cc

    re2339af r844a970  
    110110
    111111  fUseRhoCorrection = GetBool("UseRhoCorrection", true);
    112 
    113   fDeltaRMin = GetDouble("DeltaRMin", 0.01);
    114   fUseMiniCone = GetBool("UseMiniCone", false);
    115112
    116113  fClassifier->fPTMin = GetDouble("PTMin", 0.5);
     
    160157  Double_t sumChargedNoPU, sumChargedPU, sumNeutral, sumAllParticles;
    161158  Double_t sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr, sum, ratio;
    162   Bool_t pass = kFALSE;
     159  Int_t counter;
    163160  Double_t eta = 0.0;
    164161  Double_t rho = 0.0;
     
    200197    sumAllParticles = 0.0;
    201198
     199    counter = 0;
    202200    itIsolationArray.Reset();
     201
    203202    while((isolation = static_cast<Candidate*>(itIsolationArray.Next())))
    204203    {
    205204      const TLorentzVector &isolationMomentum = isolation->Momentum;
    206205
    207       if(fUseMiniCone)
     206      if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
     207         candidate->GetUniqueID() != isolation->GetUniqueID())
    208208      {
    209          pass = candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
    210          candidateMomentum.DeltaR(isolationMomentum) > fDeltaRMin;
    211       }
    212       else
    213       {
    214          pass = candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
    215          candidate->GetUniqueID() != isolation->GetUniqueID();
    216       }
    217 
    218       if(pass)
    219       {
    220 
    221209        sumAllParticles += isolationMomentum.Pt();
    222210        if(isolation->Charge != 0)
     
    235223          sumNeutral += isolationMomentum.Pt();
    236224        }
     225        ++counter;
    237226      }
    238 
    239227    }
    240228
    241    // find rho
     229    // find rho
    242230    rho = 0.0;
    243231    if(fRhoInputArray)
     
    253241    }
    254242
    255 
    256 
    257243    // correct sum for pile-up contamination
    258244    sumDBeta = sumChargedNoPU + TMath::Max(sumNeutral - 0.5*sumChargedPU, 0.0);
Note: See TracChangeset for help on using the changeset viewer.