Changeset 341014c in git for classes/DelphesHepMCReader.cc
- 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
-
classes/DelphesHepMCReader.cc
r45e58be r341014c 17 17 */ 18 18 19 20 19 /** \class DelphesHepMCReader 21 20 * … … 28 27 #include "classes/DelphesHepMCReader.h" 29 28 30 #include <stdexcept>31 29 #include <iostream> 32 30 #include <sstream> 31 #include <stdexcept> 33 32 34 33 #include <map> … … 37 36 #include <stdio.h> 38 37 38 #include "TDatabasePDG.h" 39 #include "TLorentzVector.h" 39 40 #include "TObjArray.h" 41 #include "TParticlePDG.h" 40 42 #include "TStopwatch.h" 41 #include "TDatabasePDG.h"42 #include "TParticlePDG.h"43 #include "TLorentzVector.h"44 43 45 44 #include "classes/DelphesClasses.h" … … 111 110 TObjArray *partonOutputArray) 112 111 { 113 map< int, pair< int, int >>::iterator itMotherMap;114 map< int, pair< int, int >>::iterator itDaughterMap;112 map<int, pair<int, int>>::iterator itMotherMap; 113 map<int, pair<int, int>>::iterator itDaughterMap; 115 114 char key, momentumUnit[4], positionUnit[3]; 116 115 int i, rc, state; … … 141 140 if(!rc) 142 141 { 143 cerr << "** ERROR: " << "invalid event format" << endl; 142 cerr << "** ERROR: " 143 << "invalid event format" << endl; 144 144 return kFALSE; 145 145 } … … 155 155 if(!rc) 156 156 { 157 cerr << "** ERROR: " << "invalid event format" << endl; 157 cerr << "** ERROR: " 158 << "invalid event format" << endl; 158 159 return kFALSE; 159 160 } … … 167 168 if(!rc) 168 169 { 169 cerr << "** ERROR: " << "invalid event format" << endl; 170 cerr << "** ERROR: " 171 << "invalid event format" << endl; 170 172 return kFALSE; 171 173 } … … 177 179 if(rc != 2) 178 180 { 179 cerr << "** ERROR: " << "invalid units format" << endl; 181 cerr << "** ERROR: " 182 << "invalid units format" << endl; 180 183 return kFALSE; 181 184 } … … 189 192 fMomentumCoefficient = 0.001; 190 193 } 191 194 192 195 if(strncmp(positionUnit, "MM", 3) == 0) 193 196 { … … 199 202 } 200 203 } 201 204 202 205 else if(key == 'C') 203 206 { … … 205 208 && bufferStream.ReadDbl(fCrossSectionError); 206 209 } 207 210 208 211 else if(key == 'F') 209 212 { … … 218 221 if(!rc) 219 222 { 220 cerr << "** ERROR: " << "invalid PDF format" << endl; 223 cerr << "** ERROR: " 224 << "invalid PDF format" << endl; 221 225 return kFALSE; 222 226 } … … 235 239 if(!rc) 236 240 { 237 cerr << "** ERROR: " << "invalid vertex format" << endl; 241 cerr << "** ERROR: " 242 << "invalid vertex format" << endl; 238 243 return kFALSE; 239 244 } … … 256 261 if(!rc) 257 262 { 258 cerr << "** ERROR: " << "invalid particle format" << endl; 263 cerr << "** ERROR: " 264 << "invalid particle format" << endl; 259 265 return kFALSE; 260 266 } … … 345 351 { 346 352 Weight *element; 347 vector< double>::const_iterator itWeight;353 vector<double>::const_iterator itWeight; 348 354 349 355 for(itWeight = fWeight.begin(); itWeight != fWeight.end(); ++itWeight) … … 374 380 375 381 pdgParticle = fPDG->GetParticle(fPID); 376 candidate->Charge = pdgParticle ? int(pdgParticle->Charge() /3.0) : -999;382 candidate->Charge = pdgParticle ? int(pdgParticle->Charge() / 3.0) : -999; 377 383 candidate->Mass = fMass; 378 384 … … 427 433 { 428 434 Candidate *candidate; 429 map< int, pair< int, int >>::iterator itMotherMap;430 map< int, pair< int, int >>::iterator itDaughterMap;435 map<int, pair<int, int>>::iterator itMotherMap; 436 map<int, pair<int, int>>::iterator itDaughterMap; 431 437 int i; 432 438
Note:
See TracChangeset
for help on using the changeset viewer.