Changeset 01f9722 in git for classes/DelphesLHEFReader.cc
- Timestamp:
- Aug 13, 2018, 3:01:20 PM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 1d9c62a, 9047a02
- Parents:
- cdbca0d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/DelphesLHEFReader.cc
rcdbca0d r01f9722 31 31 #include <iostream> 32 32 #include <sstream> 33 #include <string> 33 34 34 35 #include <stdio.h> … … 54 55 DelphesLHEFReader::DelphesLHEFReader() : 55 56 fInputFile(0), fBuffer(0), fPDG(0), 56 fEventReady(kFALSE), fEventCounter(-1), fParticleCounter(-1) 57 fEventReady(kFALSE), fEventCounter(-1), fParticleCounter(-1), fCrossSection(1) 58 57 59 { 58 60 fBuffer = new char[kBufferSize]; … … 105 107 if(!fgets(fBuffer, kBufferSize, fInputFile)) return kFALSE; 106 108 109 // read cross section string from LHE file header (meant to work on Wizard output only) 110 if(strstr(fBuffer, "<xsecinfo ") && fEventCounter < 0) 111 { 112 DelphesStream bufferStream(fBuffer); 113 114 string buf = fBuffer; 115 string xsecstr="totxsec"; 116 117 if (buf.find(xsecstr) != string::npos) 118 { 119 buf = buf.substr(buf.find(xsecstr) + xsecstr.length()+1); 120 unsigned first = buf.find_first_of("\"")+1; 121 unsigned last = buf.find_last_of("\""); 122 xsecstr = buf.substr(first,last-first); 123 fCrossSection = stod(xsecstr); 124 } 125 } 126 107 127 if(strstr(fBuffer, "<event>")) 108 128 { … … 110 130 fEventCounter = 1; 111 131 } 132 112 133 else if(fEventCounter > 0) 113 134 { … … 206 227 element->ProcessID = fProcessID; 207 228 element->Weight = fWeight; 229 element->CrossSection = fCrossSection; 230 208 231 element->ScalePDF = fScalePDF; 209 232 element->AlphaQED = fAlphaQED;
Note:
See TracChangeset
for help on using the changeset viewer.