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