Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • converters/pileup2root.cpp

    r341014c r7d0eb75  
    1717 */
    1818
     19
     20#include <stdexcept>
    1921#include <iostream>
    2022#include <sstream>
    21 #include <stdexcept>
    22 
     23
     24#include <stdlib.h>
    2325#include <signal.h>
    2426#include <stdio.h>
    25 #include <stdlib.h>
    26 
     27
     28#include "TROOT.h"
    2729#include "TApplication.h"
    28 #include "TROOT.h"
    29 
     30
     31#include "TFile.h"
     32#include "TObjArray.h"
     33#include "TStopwatch.h"
    3034#include "TDatabasePDG.h"
    31 #include "TFile.h"
     35#include "TParticlePDG.h"
    3236#include "TLorentzVector.h"
    33 #include "TObjArray.h"
    34 #include "TParticlePDG.h"
    35 #include "TStopwatch.h"
    36 
     37
     38#include "classes/DelphesStream.h"
    3739#include "classes/DelphesClasses.h"
    3840#include "classes/DelphesFactory.h"
    3941#include "classes/DelphesPileUpReader.h"
    40 #include "classes/DelphesStream.h"
    41 
     42
     43#include "ExRootAnalysis/ExRootTreeWriter.h"
     44#include "ExRootAnalysis/ExRootTreeBranch.h"
    4245#include "ExRootAnalysis/ExRootProgressBar.h"
    43 #include "ExRootAnalysis/ExRootTreeBranch.h"
    44 #include "ExRootAnalysis/ExRootTreeWriter.h"
    4546
    4647using namespace std;
     
    6162  while(reader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    6263  {
    63     particle = static_cast<GenParticle *>(branch->NewEntry());
     64    particle = static_cast<GenParticle*>(branch->NewEntry());
    6465
    6566    particle->PID = pid;
     
    8384
    8485    pdgParticle = pdg->GetParticle(pid);
    85     particle->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
     86    particle->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
    8687
    8788    particle->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
     
    9192    cosTheta = TMath::Abs(momentum.CosTheta());
    9293    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
    93     eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
    94     rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
     94    eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
     95    rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
    9596
    9697    particle->Eta = eta;
     
    125126  if(argc != 3)
    126127  {
    127     cout << " Usage: " << appName << " output_file"
    128          << " input_file" << endl;
     128    cout << " Usage: " << appName << " output_file" << " input_file" << endl;
    129129    cout << " output_file - output file in ROOT format," << endl;
    130130    cout << " input_file - input binary pile-up file." << endl;
     
    199199  }
    200200}
     201
     202
Note: See TracChangeset for help on using the changeset viewer.