Changes in readers/DelphesProMC.cpp [341014c:1fa50c2] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesProMC.cpp
r341014c r1fa50c2 17 17 */ 18 18 19 #include <stdexcept> 19 20 #include <iostream> 21 #include <sstream> 20 22 #include <memory> 21 #include <sstream>22 #include <stdexcept>23 23 24 24 #include <map> 25 25 26 #include <stdlib.h> 26 27 #include <signal.h> 27 28 #include <stdio.h> 28 #include <stdlib.h> 29 29 30 #include "TROOT.h" 30 31 #include "TApplication.h" 31 #include "TROOT.h" 32 32 33 #include "TFile.h" 34 #include "TObjArray.h" 35 #include "TStopwatch.h" 33 36 #include "TDatabasePDG.h" 34 #include "T File.h"37 #include "TParticlePDG.h" 35 38 #include "TLorentzVector.h" 36 #include "TObjArray.h" 37 #include "TParticlePDG.h" 38 #include "TStopwatch.h" 39 39 40 #include "modules/Delphes.h" 41 #include "classes/DelphesStream.h" 40 42 #include "classes/DelphesClasses.h" 41 43 #include "classes/DelphesFactory.h" 42 #include "classes/DelphesStream.h" 43 #include " modules/Delphes.h"44 44 45 #include "ExRootAnalysis/ExRootTreeWriter.h" 46 #include "ExRootAnalysis/ExRootTreeBranch.h" 45 47 #include "ExRootAnalysis/ExRootProgressBar.h" 46 #include "ExRootAnalysis/ExRootTreeBranch.h"47 #include "ExRootAnalysis/ExRootTreeWriter.h"48 48 49 49 #include "ProMC.pb.h" … … 109 109 status = mutableParticles->status(i); 110 110 111 px = mutableParticles->px(i) /momentumUnit;112 py = mutableParticles->py(i) /momentumUnit;113 pz = mutableParticles->pz(i) /momentumUnit;114 mass = mutableParticles->mass(i) /momentumUnit;115 x = mutableParticles->x(i) /positionUnit;116 y = mutableParticles->y(i) /positionUnit;117 z = mutableParticles->z(i) /positionUnit;118 t = mutableParticles->t(i) /positionUnit;111 px = mutableParticles->px(i)/momentumUnit; 112 py = mutableParticles->py(i)/momentumUnit; 113 pz = mutableParticles->pz(i)/momentumUnit; 114 mass = mutableParticles->mass(i)/momentumUnit; 115 x = mutableParticles->x(i)/positionUnit; 116 y = mutableParticles->y(i)/positionUnit; 117 z = mutableParticles->z(i)/positionUnit; 118 t = mutableParticles->t(i)/positionUnit; 119 119 120 120 candidate = factory->NewCandidate(); … … 125 125 candidate->Status = status; 126 126 127 candidate->IsPU = 0;128 if(mutableParticles->barcode(i) > 0) candidate->IsPU = 1; // pileup particle129 130 127 candidate->M1 = mutableParticles->mother1(i); 131 128 candidate->M2 = mutableParticles->mother2(i); … … 135 132 136 133 pdgParticle = pdg->GetParticle(pid); 137 candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() /3.0) : -999;134 candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999; 138 135 candidate->Mass = mass; 139 136 … … 187 184 if(argc < 4) 188 185 { 189 cout << " Usage: " << appName << " config_file" 190 << " output_file" 191 << " input_file(s)" << endl; 186 cout << " Usage: " << appName << " config_file" << " output_file" << " input_file(s)" << endl; 192 187 cout << " config_file - configuration file in Tcl format," << endl; 193 188 cout << " output_file - output file in ROOT format," << endl; … … 236 231 cout << "** Reading " << argv[i] << endl; 237 232 238 // use 64 bit239 //inputFile = new ProMCBook(argv[i], "r", true);240 241 //use 32 bit zip (faster but limitted to 64k events)242 233 inputFile = new ProMCBook(argv[i], "r"); 243 234 … … 246 237 momentumUnit = static_cast<double>(header.momentumunit()); 247 238 positionUnit = static_cast<double>(header.lengthunit()); 239 240 248 241 249 242 if(inputFile == NULL)
Note:
See TracChangeset
for help on using the changeset viewer.