Changeset 341014c in git for readers/DelphesProMC.cpp
- Timestamp:
- Feb 12, 2019, 9:29:17 PM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, llp, master
- Children:
- 6455202
- Parents:
- 45e58be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesProMC.cpp
r45e58be 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 particle127 candidate->IsPU = 0; 128 if(mutableParticles->barcode(i) > 0) candidate->IsPU = 1; // pileup particle 129 129 130 130 candidate->M1 = mutableParticles->mother1(i); … … 135 135 136 136 pdgParticle = pdg->GetParticle(pid); 137 candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() /3.0) : -999;137 candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999; 138 138 candidate->Mass = mass; 139 139 … … 187 187 if(argc < 4) 188 188 { 189 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; 190 192 cout << " config_file - configuration file in Tcl format," << endl; 191 193 cout << " output_file - output file in ROOT format," << endl; … … 234 236 cout << "** Reading " << argv[i] << endl; 235 237 236 // use 64 bit 238 // use 64 bit 237 239 //inputFile = new ProMCBook(argv[i], "r", true); 238 240 … … 244 246 momentumUnit = static_cast<double>(header.momentumunit()); 245 247 positionUnit = static_cast<double>(header.lengthunit()); 246 247 248 248 249 249 if(inputFile == NULL)
Note:
See TracChangeset
for help on using the changeset viewer.