Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesPythia8.cpp

    r78d1846 r341014c  
    1717 */
    1818
    19 #include <stdexcept>
    2019#include <iostream>
    2120#include <sstream>
     21#include <stdexcept>
    2222#include <string>
    2323
     
    2727#include "Pythia8Plugins/CombineMatchingInput.h"
    2828
     29#include "TApplication.h"
    2930#include "TROOT.h"
    30 #include "TApplication.h"
    31 
     31
     32#include "TDatabasePDG.h"
    3233#include "TFile.h"
     34#include "TLorentzVector.h"
    3335#include "TObjArray.h"
     36#include "TParticlePDG.h"
    3437#include "TStopwatch.h"
    35 #include "TDatabasePDG.h"
    36 #include "TParticlePDG.h"
    37 #include "TLorentzVector.h"
    38 
    39 #include "modules/Delphes.h"
     38
    4039#include "classes/DelphesClasses.h"
    4140#include "classes/DelphesFactory.h"
    4241#include "classes/DelphesLHEFReader.h"
    43 
     42#include "modules/Delphes.h"
     43
     44#include "ExRootAnalysis/ExRootProgressBar.h"
     45#include "ExRootAnalysis/ExRootTreeBranch.h"
    4446#include "ExRootAnalysis/ExRootTreeWriter.h"
    45 #include "ExRootAnalysis/ExRootTreeBranch.h"
    46 #include "ExRootAnalysis/ExRootProgressBar.h"
    4747
    4848using namespace std;
     
    9898    pid = particle.id();
    9999    status = particle.statusHepMC();
    100     px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.e(); mass = particle.m();
    101     x = particle.xProd(); y = particle.yProd(); z = particle.zProd(); t = particle.tProd();
     100    px = particle.px();
     101    py = particle.py();
     102    pz = particle.pz();
     103    e = particle.e();
     104    mass = particle.m();
     105    x = particle.xProd();
     106    y = particle.yProd();
     107    z = particle.zProd();
     108    t = particle.tProd();
    102109
    103110    candidate = factory->NewCandidate();
     
    115122
    116123    pdgParticle = pdg->GetParticle(pid);
    117     candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
     124    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
    118125    candidate->Mass = mass;
    119126
     
    166173
    167174  // pMin = 0.1 GeV for single particles
    168   pp = pow(10, - 1.0 + (log10(pMax) + 1.0) * rndm.flat());
     175  pp = pow(10, -1.0 + (log10(pMax) + 1.0) * rndm.flat());
    169176  eta = (2.0 * rndm.flat() - 1.0) * etaMax;
    170177  phi = 2.0 * M_PI * rndm.flat();
    171178  mm = pdt.mSel(id);
    172   ee = Pythia8::sqrtpos(pp*pp + mm*mm);
     179  ee = Pythia8::sqrtpos(pp * pp + mm * mm);
    173180  pt = pp / cosh(eta);
    174181
     
    193200  phi = 2.0 * M_PI * rndm.flat();
    194201  mm = pdt.mSel(id);
    195   ee = Pythia8::sqrtpos(pp*pp + mm*mm);
     202  ee = Pythia8::sqrtpos(pp * pp + mm * mm);
    196203  pt = pp / cosh(eta);
    197204
    198   if( (id == 4 || id == 5) && pt < 10.0) return;
     205  if((id == 4 || id == 5) && pt < 10.0) return;
    199206
    200207  if(id == 21)
     
    238245  // for matching
    239246  Pythia8::CombineMatchingInput *combined = 0;
    240   Pythia8::UserHooks* matching = 0;
     247  Pythia8::UserHooks *matching = 0;
    241248
    242249  if(argc != 4)
    243250  {
    244     cout << " Usage: " << appName << " config_file" << " pythia_card" << " output_file" << endl;
     251    cout << " Usage: " << appName << " config_file"
     252         << " pythia_card"
     253         << " output_file" << endl;
    245254    cout << " config_file - configuration file in Tcl format," << endl;
    246255    cout << " pythia_card - Pythia8 configuration file," << endl;
     
    293302    }
    294303    pythia->setUserHooksPtr(matching);
    295 
    296304
    297305    if(pythia == NULL)
     
    348356    for(eventCounter = 0; eventCounter < numberOfEvents && !interrupted; ++eventCounter)
    349357    {
    350       while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF,
    351         stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady());
     358      while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF, stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady())
     359        ;
    352360
    353361      if(spareFlag1)
Note: See TracChangeset for help on using the changeset viewer.