Changes in readers/DelphesPythia8.cpp [341014c:78d1846] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesPythia8.cpp
r341014c r78d1846 17 17 */ 18 18 19 #include <stdexcept> 19 20 #include <iostream> 20 21 #include <sstream> 21 #include <stdexcept>22 22 #include <string> 23 23 … … 27 27 #include "Pythia8Plugins/CombineMatchingInput.h" 28 28 29 #include "TROOT.h" 29 30 #include "TApplication.h" 30 #include "TROOT.h" 31 31 32 #include "TFile.h" 33 #include "TObjArray.h" 34 #include "TStopwatch.h" 32 35 #include "TDatabasePDG.h" 33 #include "T File.h"36 #include "TParticlePDG.h" 34 37 #include "TLorentzVector.h" 35 #include "TObjArray.h" 36 #include "TParticlePDG.h" 37 #include "TStopwatch.h" 38 38 39 #include "modules/Delphes.h" 39 40 #include "classes/DelphesClasses.h" 40 41 #include "classes/DelphesFactory.h" 41 42 #include "classes/DelphesLHEFReader.h" 42 #include "modules/Delphes.h" 43 43 44 #include "ExRootAnalysis/ExRootTreeWriter.h" 45 #include "ExRootAnalysis/ExRootTreeBranch.h" 44 46 #include "ExRootAnalysis/ExRootProgressBar.h" 45 #include "ExRootAnalysis/ExRootTreeBranch.h"46 #include "ExRootAnalysis/ExRootTreeWriter.h"47 47 48 48 using namespace std; … … 98 98 pid = particle.id(); 99 99 status = particle.statusHepMC(); 100 px = particle.px(); 101 py = particle.py(); 102 pz = particle.pz(); 103 e = particle.e(); 104 mass = particle.m(); 105 x = particle.xProd(); 106 y = particle.yProd(); 107 z = particle.zProd(); 108 t = particle.tProd(); 100 px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.e(); mass = particle.m(); 101 x = particle.xProd(); y = particle.yProd(); z = particle.zProd(); t = particle.tProd(); 109 102 110 103 candidate = factory->NewCandidate(); … … 122 115 123 116 pdgParticle = pdg->GetParticle(pid); 124 candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() /3.0) : -999;117 candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999; 125 118 candidate->Mass = mass; 126 119 … … 173 166 174 167 // pMin = 0.1 GeV for single particles 175 pp = pow(10, - 1.0 + (log10(pMax) + 1.0) * rndm.flat());168 pp = pow(10, - 1.0 + (log10(pMax) + 1.0) * rndm.flat()); 176 169 eta = (2.0 * rndm.flat() - 1.0) * etaMax; 177 170 phi = 2.0 * M_PI * rndm.flat(); 178 171 mm = pdt.mSel(id); 179 ee = Pythia8::sqrtpos(pp * pp + mm *mm);172 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 180 173 pt = pp / cosh(eta); 181 174 … … 200 193 phi = 2.0 * M_PI * rndm.flat(); 201 194 mm = pdt.mSel(id); 202 ee = Pythia8::sqrtpos(pp * pp + mm *mm);195 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 203 196 pt = pp / cosh(eta); 204 197 205 if( (id == 4 || id == 5) && pt < 10.0) return;198 if( (id == 4 || id == 5) && pt < 10.0) return; 206 199 207 200 if(id == 21) … … 245 238 // for matching 246 239 Pythia8::CombineMatchingInput *combined = 0; 247 Pythia8::UserHooks *matching = 0;240 Pythia8::UserHooks* matching = 0; 248 241 249 242 if(argc != 4) 250 243 { 251 cout << " Usage: " << appName << " config_file" 252 << " pythia_card" 253 << " output_file" << endl; 244 cout << " Usage: " << appName << " config_file" << " pythia_card" << " output_file" << endl; 254 245 cout << " config_file - configuration file in Tcl format," << endl; 255 246 cout << " pythia_card - Pythia8 configuration file," << endl; … … 302 293 } 303 294 pythia->setUserHooksPtr(matching); 295 304 296 305 297 if(pythia == NULL) … … 356 348 for(eventCounter = 0; eventCounter < numberOfEvents && !interrupted; ++eventCounter) 357 349 { 358 while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF, stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady())359 ;350 while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF, 351 stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady()); 360 352 361 353 if(spareFlag1)
Note:
See TracChangeset
for help on using the changeset viewer.