Fork me on GitHub

Changeset e2339af in git for modules


Ignore:
Timestamp:
Jun 6, 2016, 4:35:02 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
740d430
Parents:
f8299bc
Message:

added UseMiniCone option in isolation

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/Isolation.cc

    rf8299bc re2339af  
    110110
    111111  fUseRhoCorrection = GetBool("UseRhoCorrection", true);
     112
     113  fDeltaRMin = GetDouble("DeltaRMin", 0.01);
     114  fUseMiniCone = GetBool("UseMiniCone", false);
    112115
    113116  fClassifier->fPTMin = GetDouble("PTMin", 0.5);
     
    157160  Double_t sumChargedNoPU, sumChargedPU, sumNeutral, sumAllParticles;
    158161  Double_t sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr, sum, ratio;
    159   Int_t counter;
     162  Bool_t pass = kFALSE;
    160163  Double_t eta = 0.0;
    161164  Double_t rho = 0.0;
     
    197200    sumAllParticles = 0.0;
    198201
    199     counter = 0;
    200202    itIsolationArray.Reset();
    201 
    202203    while((isolation = static_cast<Candidate*>(itIsolationArray.Next())))
    203204    {
    204205      const TLorentzVector &isolationMomentum = isolation->Momentum;
    205206
    206       if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
    207          candidate->GetUniqueID() != isolation->GetUniqueID())
    208       {
     207      if(fUseMiniCone)
     208      {
     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
    209221        sumAllParticles += isolationMomentum.Pt();
    210222        if(isolation->Charge != 0)
     
    223235          sumNeutral += isolationMomentum.Pt();
    224236        }
    225         ++counter;
    226       }
     237      }
     238
    227239    }
    228240
    229     // find rho
     241   // find rho
    230242    rho = 0.0;
    231243    if(fRhoInputArray)
     
    240252      }
    241253    }
     254
     255
    242256
    243257    // correct sum for pile-up contamination
  • modules/Isolation.h

    rf8299bc re2339af  
    5757  Double_t fPTSumMax;
    5858
     59  Double_t fDeltaRMin;
     60
    5961  Bool_t fUsePTSum;
    6062
    6163  Bool_t fUseRhoCorrection;
     64
     65  Bool_t fUseMiniCone;
    6266
    6367  IsolationClassifier *fClassifier; //!
Note: See TracChangeset for help on using the changeset viewer.