Fork me on GitHub

Changeset 1338 in svn


Ignore:
Timestamp:
Nov 21, 2013, 11:38:22 AM (11 years ago)
Author:
Pavel Demin
Message:

fix comments and formatting in EnergyScale

Location:
trunk/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/EnergyScale.cc

    r1141 r1338  
    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}
  • trunk/modules/EnergyScale.h

    r1141 r1338  
    22#define EnergyScale_h
    33
    4 /** \class MomentumSmearing
     4/** \class EnergyScale
    55 *
    6  *  Performs transverse momentum resolution smearing.
     6 *  Applies energy scale.
    77 *
    88 *  $Date$
Note: See TracChangeset for help on using the changeset viewer.