Changes in converters/pileup2root.cpp [341014c:7d0eb75] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
converters/pileup2root.cpp
r341014c r7d0eb75 17 17 */ 18 18 19 20 #include <stdexcept> 19 21 #include <iostream> 20 22 #include <sstream> 21 #include <stdexcept> 22 23 24 #include <stdlib.h> 23 25 #include <signal.h> 24 26 #include <stdio.h> 25 #include <stdlib.h> 26 27 28 #include "TROOT.h" 27 29 #include "TApplication.h" 28 #include "TROOT.h" 29 30 31 #include "TFile.h" 32 #include "TObjArray.h" 33 #include "TStopwatch.h" 30 34 #include "TDatabasePDG.h" 31 #include "T File.h"35 #include "TParticlePDG.h" 32 36 #include "TLorentzVector.h" 33 #include "TObjArray.h" 34 #include "TParticlePDG.h" 35 #include "TStopwatch.h" 36 37 38 #include "classes/DelphesStream.h" 37 39 #include "classes/DelphesClasses.h" 38 40 #include "classes/DelphesFactory.h" 39 41 #include "classes/DelphesPileUpReader.h" 40 #include "classes/DelphesStream.h" 41 42 43 #include "ExRootAnalysis/ExRootTreeWriter.h" 44 #include "ExRootAnalysis/ExRootTreeBranch.h" 42 45 #include "ExRootAnalysis/ExRootProgressBar.h" 43 #include "ExRootAnalysis/ExRootTreeBranch.h"44 #include "ExRootAnalysis/ExRootTreeWriter.h"45 46 46 47 using namespace std; … … 61 62 while(reader->ReadParticle(pid, x, y, z, t, px, py, pz, e)) 62 63 { 63 particle = static_cast<GenParticle 64 particle = static_cast<GenParticle*>(branch->NewEntry()); 64 65 65 66 particle->PID = pid; … … 83 84 84 85 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; 86 87 87 88 particle->Mass = pdgParticle ? pdgParticle->Mass() : -999.9; … … 91 92 cosTheta = TMath::Abs(momentum.CosTheta()); 92 93 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()); 95 96 96 97 particle->Eta = eta; … … 125 126 if(argc != 3) 126 127 { 127 cout << " Usage: " << appName << " output_file" 128 << " input_file" << endl; 128 cout << " Usage: " << appName << " output_file" << " input_file" << endl; 129 129 cout << " output_file - output file in ROOT format," << endl; 130 130 cout << " input_file - input binary pile-up file." << endl; … … 199 199 } 200 200 } 201 202
Note:
See TracChangeset
for help on using the changeset viewer.