Fork me on GitHub

Changeset 341014c in git for modules/Merger.cc


Ignore:
Timestamp:
Feb 12, 2019, 9:29:17 PM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
6455202
Parents:
45e58be
Message:

apply .clang-format to all .h, .cc and .cpp files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Merger.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class Merger
    2120 *
     
    3332#include "classes/DelphesFormula.h"
    3433
     34#include "ExRootAnalysis/ExRootClassifier.h"
     35#include "ExRootAnalysis/ExRootFilter.h"
    3536#include "ExRootAnalysis/ExRootResult.h"
    36 #include "ExRootAnalysis/ExRootFilter.h"
    37 #include "ExRootAnalysis/ExRootClassifier.h"
    3837
     38#include "TDatabasePDG.h"
     39#include "TFormula.h"
     40#include "TLorentzVector.h"
    3941#include "TMath.h"
     42#include "TObjArray.h"
     43#include "TRandom3.h"
    4044#include "TString.h"
    41 #include "TFormula.h"
    42 #include "TRandom3.h"
    43 #include "TObjArray.h"
    44 #include "TDatabasePDG.h"
    45 #include "TLorentzVector.h"
    4645
    47 #include <algorithm>
    48 #include <stdexcept>
     46#include <algorithm>
    4947#include <iostream>
    5048#include <sstream>
     49#include <stdexcept>
    5150
    5251using namespace std;
     
    8988
    9089  fMomentumOutputArray = ExportArray(GetString("MomentumOutputArray", "momentum"));
    91  
     90
    9291  fEnergyOutputArray = ExportArray(GetString("EnergyOutputArray", "energy"));
    9392}
     
    9796void Merger::Finish()
    9897{
    99   vector< TIterator * >::iterator itInputList;
     98  vector<TIterator *>::iterator itInputList;
    10099  TIterator *iterator;
    101100
     
    113112  Candidate *candidate;
    114113  TLorentzVector momentum;
    115   Double_t sumPT, sumE; 
    116   vector< TIterator * >::iterator itInputList;
     114  Double_t sumPT, sumE;
     115  vector<TIterator *>::iterator itInputList;
    117116  TIterator *iterator;
    118117
    119118  DelphesFactory *factory = GetFactory();
    120  
     119
    121120  momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
    122121  sumPT = 0;
     
    130129    // loop over all candidates
    131130    iterator->Reset();
    132     while((candidate = static_cast<Candidate*>(iterator->Next())))
     131    while((candidate = static_cast<Candidate *>(iterator->Next())))
    133132    {
    134133      const TLorentzVector &candidateMomentum = candidate->Momentum;
     
    143142
    144143  candidate = factory->NewCandidate();
    145  
     144
    146145  candidate->Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
    147146  candidate->Momentum = momentum;
    148  
     147
    149148  fMomentumOutputArray->Add(candidate);
    150149
    151150  candidate = factory->NewCandidate();
    152  
     151
    153152  candidate->Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
    154153  candidate->Momentum.SetPtEtaPhiE(sumPT, 0.0, 0.0, sumE);
    155  
     154
    156155  fEnergyOutputArray->Add(candidate);
    157156}
Note: See TracChangeset for help on using the changeset viewer.