Fork me on GitHub

Changeset 770f080 in git for modules/EnergyScale.cc


Ignore:
Timestamp:
Nov 21, 2013, 11:38:22 AM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
8555f6d
Parents:
cc331b2
Message:

fix comments and formatting in EnergyScale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/EnergyScale.cc

    rcc331b2 r770f080  
    22/** \class EnergyScale
    33 *
    4  *  Performs transverse momentum resolution smearing.
     4 *  Applies energy scale.
    55 *
    66 *  $Date$
     
    6262  // import input array
    6363
    64   fInputArray = ImportArray(GetString("InputArray", "ParticlePropagator/stableParticles"));
     64  fInputArray = ImportArray(GetString("InputArray", "FastJetFinder/jets"));
    6565  fItInputArray = fInputArray->MakeIterator();
    6666
    6767  // create output array
    6868
    69   fOutputArray = ExportArray(GetString("OutputArray", "stableParticles"));
     69  fOutputArray = ExportArray(GetString("OutputArray", "jets"));
    7070}
    7171
     
    8888  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    8989  {
    90    momentum = candidate->Momentum;
    91    
    92    scale = fFormula->Eval(momentum.Pt(),momentum.Eta());
    93    
    94    if(scale>0)momentum *= scale;
    95    
    96    candidate = static_cast<Candidate*>(candidate->Clone());
    97    candidate->Momentum = momentum;
     90    momentum = candidate->Momentum;
    9891
    99    fOutputArray->Add(candidate);
     92    scale = fFormula->Eval(momentum.Pt(), momentum.Eta());
    10093
     94    if(scale > 0.0) momentum *= scale;
     95
     96    candidate = static_cast<Candidate*>(candidate->Clone());
     97    candidate->Momentum = momentum;
     98
     99    fOutputArray->Add(candidate);
    101100  }
    102101}
Note: See TracChangeset for help on using the changeset viewer.