Fork me on GitHub

Changeset 723b77d in git


Ignore:
Timestamp:
Nov 20, 2015, 11:33:36 AM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
b9e210d
Parents:
8e2bc10 (diff), 004aa60 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:delphes/delphes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Isolation.cc

    r8e2bc10 r723b77d  
    153153  Candidate *candidate, *isolation, *object;
    154154  TObjArray *isolationArray;
    155   Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr;
     155  Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU;
     156  Double_t sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr, sum, ratio;
    156157  Int_t counter;
    157158  Double_t eta = 0.0;
     
    188189
    189190    // loop over all input tracks
    190    
     191
    191192    sumNeutral = 0.0;
    192193    sumCharged = 0.0;
    193194    sumChargedPU = 0.0;
    194195    sumAllParticles = 0.0;
    195    
     196
    196197    counter = 0;
    197198    itIsolationArray.Reset();
    198    
     199
    199200    while((isolation = static_cast<Candidate*>(itIsolationArray.Next())))
    200201    {
     
    205206      {
    206207        sumAllParticles += isolationMomentum.Pt();
    207         if(isolation->Charge !=0) 
    208         {
    209           sumCharged += isolationMomentum.Pt();
     208        if(isolation->Charge !=0)
     209        {
     210          sumCharged += isolationMomentum.Pt();
    210211          if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt();
    211         }
     212        }
    212213        else
    213         {
    214           sumNeutral += isolationMomentum.Pt();
     214        {
     215          sumNeutral += isolationMomentum.Pt();
    215216        }
    216217        ++counter;
     
    232233    }
    233234
    234      // correct sum for pile-up contamination
    235     sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU,0.0);
    236     sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho,0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0);
     235    // correct sum for pile-up contamination
     236    sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU, 0.0);
     237    sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho, 0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(), 0.0);
    237238    ratioDBeta = sumDBeta/candidateMomentum.Pt();
    238239    ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt();
    239    
     240
    240241    candidate->IsolationVar = ratioDBeta;
    241242    candidate->IsolationVarRhoCorr = ratioRhoCorr;
     
    245246    candidate->SumPt = sumAllParticles;
    246247
    247     if((fUsePTSum && sumRhoCorr > fPTSumMax) || (!fUsePTSum && ratioRhoCorr > fPTRatioMax)) continue;
     248    sum = fRhoInputArray ? sumRhoCorr : sumDBeta;
     249    if(fUsePTSum && sum > fPTSumMax) continue;
     250
     251    ratio = fRhoInputArray ? ratioRhoCorr : ratioDBeta;
     252    if(!fUsePTSum && ratio > fPTRatioMax) continue;
     253
    248254    fOutputArray->Add(candidate);
    249255  }
Note: See TracChangeset for help on using the changeset viewer.