Fork me on GitHub

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/PileUpMergerPythia8.cc

    r45e58be r341014c  
    2929#include "classes/DelphesClasses.h"
    3030#include "classes/DelphesFactory.h"
     31#include "classes/DelphesPileUpReader.h"
    3132#include "classes/DelphesTF2.h"
    32 #include "classes/DelphesPileUpReader.h"
    33 
     33
     34#include "ExRootAnalysis/ExRootClassifier.h"
     35#include "ExRootAnalysis/ExRootFilter.h"
    3436#include "ExRootAnalysis/ExRootResult.h"
    35 #include "ExRootAnalysis/ExRootFilter.h"
    36 #include "ExRootAnalysis/ExRootClassifier.h"
    3737
    3838#include "Pythia.h"
    3939
     40#include "TDatabasePDG.h"
     41#include "TFormula.h"
     42#include "TLorentzVector.h"
    4043#include "TMath.h"
     44#include "TObjArray.h"
     45#include "TRandom3.h"
    4146#include "TString.h"
    42 #include "TFormula.h"
    43 #include "TRandom3.h"
    44 #include "TObjArray.h"
    45 #include "TDatabasePDG.h"
    46 #include "TLorentzVector.h"
    4747
    4848#include <algorithm>
    49 #include <stdexcept>
    5049#include <iostream>
    5150#include <sstream>
     51#include <stdexcept>
    5252
    5353using namespace std;
     
    7676  fPileUpDistribution = GetInt("PileUpDistribution", 0);
    7777
    78   fMeanPileUp  = GetDouble("MeanPileUp", 10);
     78  fMeanPileUp = GetDouble("MeanPileUp", 10);
    7979
    8080  fZVertexSpread = GetDouble("ZVertexSpread", 0.15);
     
    133133  fFunction->GetRandom2(dz, dt);
    134134
    135   dt *= c_light*1.0E3; // necessary in order to make t in mm/c
     135  dt *= c_light * 1.0E3; // necessary in order to make t in mm/c
    136136  dz *= 1.0E3; // necessary in order to make z in mm
    137137  vx = 0.0;
    138138  vy = 0.0;
    139139  numberOfParticles = fInputArray->GetEntriesFast();
    140   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     140  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    141141  {
    142142    vx += candidate->Position.X();
     
    165165  switch(fPileUpDistribution)
    166166  {
    167     case 0:
    168       numberOfEvents = gRandom->Poisson(fMeanPileUp);
    169       break;
    170     case 1:
    171       numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1);
    172       break;
    173     default:
    174       numberOfEvents = gRandom->Poisson(fMeanPileUp);
    175       break;
     167  case 0:
     168    numberOfEvents = gRandom->Poisson(fMeanPileUp);
     169    break;
     170  case 1:
     171    numberOfEvents = gRandom->Integer(2 * fMeanPileUp + 1);
     172    break;
     173  default:
     174    numberOfEvents = gRandom->Poisson(fMeanPileUp);
     175    break;
    176176  }
    177177
    178178  for(event = 0; event < numberOfEvents; ++event)
    179179  {
    180     while(!fPythia->next());
    181 
    182    // --- Pile-up vertex smearing
     180    while(!fPythia->next())
     181      ;
     182
     183    // --- Pile-up vertex smearing
    183184
    184185    fFunction->GetRandom2(dz, dt);
    185186
    186     dt *= c_light*1.0E3; // necessary in order to make t in mm/c
     187    dt *= c_light * 1.0E3; // necessary in order to make t in mm/c
    187188    dz *= 1.0E3; // necessary in order to make z in mm
    188189
     
    201202
    202203      pid = particle.id();
    203       px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.e();
    204       x = particle.xProd(); y = particle.yProd(); z = particle.zProd(); t = particle.tProd();
     204      px = particle.px();
     205      py = particle.py();
     206      pz = particle.pz();
     207      e = particle.e();
     208      x = particle.xProd();
     209      y = particle.yProd();
     210      z = particle.zProd();
     211      t = particle.tProd();
    205212
    206213      candidate = factory->NewCandidate();
     
    211218
    212219      pdgParticle = pdg->GetParticle(pid);
    213       candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
     220      candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
    214221      candidate->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
    215222
Note: See TracChangeset for help on using the changeset viewer.