Fork me on GitHub

Changeset 6cdc544 in git for modules/PdgCodeFilter.cc


Ignore:
Timestamp:
Dec 21, 2014, 12:07:11 PM (10 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
38bf1ae
Parents:
1d1f6a4
Message:

fix formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/PdgCodeFilter.cc

    r1d1f6a4 r6cdc544  
    1919/** \class PdgCodeFilter
    2020 *
    21  *  Removes particles with specific pdg codes
     21 *  Removes particles with specific PDG codes
    2222 *
    2323 *  \author M. Selvaggi
     
    4040#include "TRandom3.h"
    4141#include "TObjArray.h"
    42 //#include "TDatabasePDG.h"
     42#include "TDatabasePDG.h"
    4343#include "TLorentzVector.h"
    4444
     
    6767void PdgCodeFilter::Init()
    6868{
    69  
     69
    7070  ExRootConfParam param;
    7171  Size_t i, size;
    72  
     72
    7373  // PT threshold
    7474  fPTMin = GetDouble("PTMin", 0.0);
     
    7777  fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
    7878  fItInputArray = fInputArray->MakeIterator();
    79  
     79
    8080  param = GetParam("PdgCode");
    8181  size = param.GetSize();
    8282
    8383  // read PdgCodes to be filtered out from the data card
    84  
     84
    8585  fPdgCodes.clear();
    8686  for(i = 0; i < size; ++i)
     
    8888    fPdgCodes.push_back(param[i].GetInt());
    8989  }
    90  
     90
    9191  // create output array
    9292  fOutputArray = ExportArray(GetString("OutputArray", "filteredParticles"));
     
    115115    const TLorentzVector &candidateMomentum = candidate->Momentum;
    116116    pt = candidateMomentum.Pt();
    117    
     117
    118118    pass = kTRUE;
    119119
    120     if( pt < fPTMin ) pass = kFALSE;
    121     if( find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end() ) pass = kFALSE;
     120    if(pt < fPTMin) pass = kFALSE;
     121    if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;
    122122
    123     if (pass) fOutputArray->Add(candidate);
     123    if(pass) fOutputArray->Add(candidate);
    124124  }
    125125}
Note: See TracChangeset for help on using the changeset viewer.