Changeset 59abd43 in git for classes/DelphesHepMCReader.cc
- Timestamp:
- May 1, 2013, 7:29:33 PM (12 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 9f6c8c4
- Parents:
- 52db26b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/DelphesHepMCReader.cc
r52db26b r59abd43 20 20 21 21 #include <map> 22 #include <vector> 22 23 23 24 #include <stdio.h> … … 69 70 void DelphesHepMCReader::Clear() 70 71 { 72 fStateSize = 0; 73 fState.clear(); 74 fWeightSize = 0; 75 fWeight.clear(); 71 76 fVertexCounter = -1; 72 77 fInCounter = -1; … … 94 99 map< int, pair< int, int > >::iterator itDaughterMap; 95 100 char key; 96 int rc; 101 int i, rc, state; 102 double weight; 97 103 98 104 if(!fgets(fBuffer, kBufferSize, fInputFile)) return kFALSE; … … 113 119 && bufferStream.ReadInt(fProcessID) 114 120 && bufferStream.ReadInt(fSignalCode) 115 && bufferStream.ReadInt(fVertexCounter); 121 && bufferStream.ReadInt(fVertexCounter) 122 && bufferStream.ReadInt(fBeamCode[0]) 123 && bufferStream.ReadInt(fBeamCode[1]) 124 && bufferStream.ReadInt(fStateSize); 125 126 if(!rc) 127 { 128 cerr << "** ERROR: " << "invalid event format" << endl; 129 return kFALSE; 130 } 131 132 for(i = 0; i < fStateSize; ++i) 133 { 134 rc = rc && bufferStream.ReadInt(state); 135 fState.push_back(state); 136 } 137 138 rc = rc && bufferStream.ReadInt(fWeightSize); 139 140 if(!rc) 141 { 142 cerr << "** ERROR: " << "invalid event format" << endl; 143 return kFALSE; 144 } 145 146 for(i = 0; i < fWeightSize; ++i) 147 { 148 rc = rc && bufferStream.ReadDbl(weight); 149 fWeight.push_back(weight); 150 } 116 151 117 152 if(!rc) … … 236 271 element->ProcessID = fProcessID; 237 272 element->MPI = fMPI; 273 element->Weight = fWeight.size() > 0 ? fWeight[0] : 1.0; 238 274 element->Scale = fScale; 239 275 element->AlphaQED = fAlphaQED;
Note:
See TracChangeset
for help on using the changeset viewer.