Fork me on GitHub

Changeset 84733ae in git for modules


Ignore:
Timestamp:
Jan 25, 2017, 1:10:58 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
d6ce231
Parents:
5e728c7
Message:

fix IsRecoPU variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackPileUpSubtractor.cc

    r5e728c7 r84733ae  
    5353//------------------------------------------------------------------------------
    5454
    55 TrackPileUpSubtractor::TrackPileUpSubtractor() :
    56 fFormula(0)
     55TrackPileUpSubtractor::TrackPileUpSubtractor()
    5756{
    58   fFormula = new DelphesFormula;
    5957}
    6058
     
    6361TrackPileUpSubtractor::~TrackPileUpSubtractor()
    6462{
    65   if(fFormula) delete fFormula;
    6663}
    6764
     
    7572  fItVertexInputArray = fVertexInputArray->MakeIterator();
    7673
    77   // read resolution formula in m
    78   fFormula->Compile(GetString("ZVertexResolution", "0.001"));
     74  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    7975
    8076  fPTMin = GetDouble("PTMin", 0.);
     
    123119  TObjArray *array;
    124120  Double_t z, zvtx=0;
    125   Double_t pt, eta, phi, e;
    126121
    127122
     
    149144    {
    150145      particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    151       const TLorentzVector &candidateMomentum = particle->Momentum;
    152 
    153       eta = candidateMomentum.Eta();
    154       pt = candidateMomentum.Pt();
    155       phi = candidateMomentum.Phi();
    156       e = candidateMomentum.E();
    157      
    158146      z = particle->Position.Z();
    159147
     
    161149      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    162150
    163       if(candidate->IsPU && TMath::Abs(z-zvtx) > fFormula->Eval(pt, eta, phi, e)* 1.0e3)
     151      if(candidate->Charge !=0 && TMath::Abs(z-zvtx) > fZVertexResolution)
    164152      {
    165153        candidate->IsRecoPU = 1;
Note: See TracChangeset for help on using the changeset viewer.