Changeset b4786d3 in git
- Timestamp:
- May 25, 2021, 7:33:19 PM (3 years ago)
- Branches:
- master
- Children:
- c1780a5
- Parents:
- f76741a
- Files:
-
- 3 added
- 5 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rf76741a rb4786d3 103 103 classes/DelphesClasses.h \ 104 104 classes/DelphesFactory.h \ 105 classes/DelphesHepMC Reader.h \105 classes/DelphesHepMC2Reader.h \ 106 106 classes/DelphesPileUpWriter.h \ 107 107 external/ExRootAnalysis/ExRootProgressBar.h \ … … 213 213 tmp/validation/DelphesValidation.$(ObjSuf) 214 214 215 DelphesHepMC$(ExeSuf): \ 216 tmp/readers/DelphesHepMC.$(ObjSuf) 217 218 tmp/readers/DelphesHepMC.$(ObjSuf): \ 219 readers/DelphesHepMC.cpp \ 220 classes/DelphesClasses.h \ 221 classes/DelphesFactory.h \ 222 classes/DelphesHepMCReader.h \ 215 DelphesHepMC2$(ExeSuf): \ 216 tmp/readers/DelphesHepMC2.$(ObjSuf) 217 218 tmp/readers/DelphesHepMC2.$(ObjSuf): \ 219 readers/DelphesHepMC2.cpp \ 220 classes/DelphesClasses.h \ 221 classes/DelphesFactory.h \ 222 classes/DelphesHepMC2Reader.h \ 223 modules/Delphes.h \ 224 external/ExRootAnalysis/ExRootProgressBar.h \ 225 external/ExRootAnalysis/ExRootTreeBranch.h \ 226 external/ExRootAnalysis/ExRootTreeWriter.h 227 DelphesHepMC3$(ExeSuf): \ 228 tmp/readers/DelphesHepMC3.$(ObjSuf) 229 230 tmp/readers/DelphesHepMC3.$(ObjSuf): \ 231 readers/DelphesHepMC3.cpp \ 232 classes/DelphesClasses.h \ 233 classes/DelphesFactory.h \ 234 classes/DelphesHepMC3Reader.h \ 223 235 modules/Delphes.h \ 224 236 external/ExRootAnalysis/ExRootProgressBar.h \ … … 263 275 external/ExRootAnalysis/ExRootTreeWriter.h 264 276 EXECUTABLE += \ 265 DelphesHepMC$(ExeSuf) \ 277 DelphesHepMC2$(ExeSuf) \ 278 DelphesHepMC3$(ExeSuf) \ 266 279 DelphesLHEF$(ExeSuf) \ 267 280 DelphesROOT$(ExeSuf) \ … … 269 282 270 283 EXECUTABLE_OBJ += \ 271 tmp/readers/DelphesHepMC.$(ObjSuf) \ 284 tmp/readers/DelphesHepMC2.$(ObjSuf) \ 285 tmp/readers/DelphesHepMC3.$(ObjSuf) \ 272 286 tmp/readers/DelphesLHEF.$(ObjSuf) \ 273 287 tmp/readers/DelphesROOT.$(ObjSuf) \ … … 516 530 classes/DelphesFormula.h \ 517 531 classes/DelphesClasses.h 518 tmp/classes/DelphesHepMCReader.$(ObjSuf): \ 519 classes/DelphesHepMCReader.$(SrcSuf) \ 520 classes/DelphesHepMCReader.h \ 532 tmp/classes/DelphesHepMC2Reader.$(ObjSuf): \ 533 classes/DelphesHepMC2Reader.$(SrcSuf) \ 534 classes/DelphesHepMC2Reader.h \ 535 classes/DelphesClasses.h \ 536 classes/DelphesFactory.h \ 537 classes/DelphesStream.h \ 538 external/ExRootAnalysis/ExRootTreeBranch.h 539 tmp/classes/DelphesHepMC3Reader.$(ObjSuf): \ 540 classes/DelphesHepMC3Reader.$(SrcSuf) \ 541 classes/DelphesHepMC3Reader.h \ 521 542 classes/DelphesClasses.h \ 522 543 classes/DelphesFactory.h \ … … 1145 1166 tmp/classes/DelphesFactory.$(ObjSuf) \ 1146 1167 tmp/classes/DelphesFormula.$(ObjSuf) \ 1147 tmp/classes/DelphesHepMCReader.$(ObjSuf) \ 1168 tmp/classes/DelphesHepMC2Reader.$(ObjSuf) \ 1169 tmp/classes/DelphesHepMC3Reader.$(ObjSuf) \ 1148 1170 tmp/classes/DelphesLHEFReader.$(ObjSuf) \ 1149 1171 tmp/classes/DelphesModule.$(ObjSuf) \ -
classes/DelphesHepMC2Reader.cc
rf76741a rb4786d3 17 17 */ 18 18 19 /** \class DelphesHepMC Reader19 /** \class DelphesHepMC2Reader 20 20 * 21 21 * Reads HepMC file … … 25 25 */ 26 26 27 #include "classes/DelphesHepMC Reader.h"27 #include "classes/DelphesHepMC2Reader.h" 28 28 29 29 #include <iostream> … … 54 54 //--------------------------------------------------------------------------- 55 55 56 DelphesHepMC Reader::DelphesHepMCReader() :56 DelphesHepMC2Reader::DelphesHepMC2Reader() : 57 57 fInputFile(0), fBuffer(0), fPDG(0), 58 58 fVertexCounter(-1), fInCounter(-1), fOutCounter(-1), … … 66 66 //--------------------------------------------------------------------------- 67 67 68 DelphesHepMC Reader::~DelphesHepMCReader()68 DelphesHepMC2Reader::~DelphesHepMC2Reader() 69 69 { 70 70 if(fBuffer) delete[] fBuffer; … … 73 73 //--------------------------------------------------------------------------- 74 74 75 void DelphesHepMC Reader::SetInputFile(FILE *inputFile)75 void DelphesHepMC2Reader::SetInputFile(FILE *inputFile) 76 76 { 77 77 fInputFile = inputFile; … … 80 80 //--------------------------------------------------------------------------- 81 81 82 void DelphesHepMC Reader::Clear()82 void DelphesHepMC2Reader::Clear() 83 83 { 84 84 fStateSize = 0; … … 98 98 //--------------------------------------------------------------------------- 99 99 100 bool DelphesHepMC Reader::EventReady()100 bool DelphesHepMC2Reader::EventReady() 101 101 { 102 102 return (fVertexCounter == 0) && (fInCounter == 0) && (fOutCounter == 0); … … 105 105 //--------------------------------------------------------------------------- 106 106 107 bool DelphesHepMC Reader::ReadBlock(DelphesFactory *factory,107 bool DelphesHepMC2Reader::ReadBlock(DelphesFactory *factory, 108 108 TObjArray *allParticleOutputArray, 109 109 TObjArray *stableParticleOutputArray, … … 202 202 } 203 203 } 204 205 204 else if(key == 'C') 206 205 { 207 206 rc = bufferStream.ReadDbl(fCrossSection) 208 207 && bufferStream.ReadDbl(fCrossSectionError); 209 } 210 208 209 if(!rc) 210 { 211 cerr << "** ERROR: " 212 << "invalid cross section format" << endl; 213 return kFALSE; 214 } 215 } 211 216 else if(key == 'F') 212 217 { … … 317 322 //--------------------------------------------------------------------------- 318 323 319 void DelphesHepMC Reader::AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,324 void DelphesHepMC2Reader::AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber, 320 325 TStopwatch *readStopWatch, TStopwatch *procStopWatch) 321 326 { … … 348 353 //--------------------------------------------------------------------------- 349 354 350 void DelphesHepMC Reader::AnalyzeWeight(ExRootTreeBranch *branch)355 void DelphesHepMC2Reader::AnalyzeWeight(ExRootTreeBranch *branch) 351 356 { 352 357 Weight *element; … … 363 368 //--------------------------------------------------------------------------- 364 369 365 void DelphesHepMC Reader::AnalyzeParticle(DelphesFactory *factory,370 void DelphesHepMC2Reader::AnalyzeParticle(DelphesFactory *factory, 366 371 TObjArray *allParticleOutputArray, 367 372 TObjArray *stableParticleOutputArray, … … 430 435 //--------------------------------------------------------------------------- 431 436 432 void DelphesHepMC Reader::FinalizeParticles(TObjArray *allParticleOutputArray)437 void DelphesHepMC2Reader::FinalizeParticles(TObjArray *allParticleOutputArray) 433 438 { 434 439 Candidate *candidate; -
classes/DelphesHepMC2Reader.h
rf76741a rb4786d3 17 17 */ 18 18 19 #ifndef DelphesHepMC Reader_h20 #define DelphesHepMC Reader_h19 #ifndef DelphesHepMC2Reader_h 20 #define DelphesHepMC2Reader_h 21 21 22 /** \class DelphesHepMC Reader22 /** \class DelphesHepMC2Reader 23 23 * 24 24 * Reads HepMC file … … 39 39 class DelphesFactory; 40 40 41 class DelphesHepMC Reader41 class DelphesHepMC2Reader 42 42 { 43 43 public: 44 DelphesHepMC Reader();45 ~DelphesHepMC Reader();44 DelphesHepMC2Reader(); 45 ~DelphesHepMC2Reader(); 46 46 47 47 void SetInputFile(FILE *inputFile); … … 102 102 }; 103 103 104 #endif // DelphesHepMC Reader_h104 #endif // DelphesHepMC2Reader_h -
classes/DelphesStream.cc
rf76741a rb4786d3 106 106 107 107 //------------------------------------------------------------------------------ 108 109 bool DelphesStream::FindChr(int value) 110 { 111 char *position; 112 bool result = false; 113 114 position = strchr(fBuffer, value); 115 116 if(position) 117 { 118 result = true; 119 fBuffer = position + 1; 120 } 121 122 return result; 123 } 124 125 //------------------------------------------------------------------------------ 126 127 bool DelphesStream::FindStr(const char *value) 128 { 129 char *position; 130 bool result = false; 131 132 position = strstr(fBuffer, value); 133 134 if(position) 135 { 136 result = true; 137 fBuffer = position + strlen(value); 138 } 139 140 return result; 141 } 142 143 //------------------------------------------------------------------------------ -
classes/DelphesStream.h
rf76741a rb4786d3 35 35 bool ReadDbl(double &value); 36 36 bool ReadInt(int &value); 37 bool FindChr(int value); 38 bool FindStr(const char *value); 37 39 38 40 private: -
converters/hepmc2pileup.cpp
rf76741a rb4786d3 35 35 #include "classes/DelphesClasses.h" 36 36 #include "classes/DelphesFactory.h" 37 #include "classes/DelphesHepMC Reader.h"37 #include "classes/DelphesHepMC2Reader.h" 38 38 #include "classes/DelphesPileUpWriter.h" 39 39 … … 65 65 Candidate *candidate = 0; 66 66 DelphesPileUpWriter *writer = 0; 67 DelphesHepMC Reader *reader = 0;67 DelphesHepMC2Reader *reader = 0; 68 68 Int_t i; 69 69 Long64_t length, eventCounter; … … 98 98 itParticle = stableParticleOutputArray->MakeIterator(); 99 99 100 reader = new DelphesHepMC Reader;100 reader = new DelphesHepMC2Reader; 101 101 102 102 i = 2; -
doc/genMakefile.tcl
rf76741a rb4786d3 292 292 executableDeps {converters/*.cpp} {examples/*.cpp} {validation/*.cpp} 293 293 294 executableDeps {readers/DelphesHepMC .cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} {readers/DelphesROOT.cpp}294 executableDeps {readers/DelphesHepMC2.cpp} {readers/DelphesHepMC3.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} {readers/DelphesROOT.cpp} 295 295 296 296 puts {ifeq ($(HAS_CMSSW),true)} -
readers/DelphesHepMC2.cpp
rf76741a rb4786d3 35 35 #include "classes/DelphesClasses.h" 36 36 #include "classes/DelphesFactory.h" 37 #include "classes/DelphesHepMC Reader.h"37 #include "classes/DelphesHepMC2Reader.h" 38 38 #include "modules/Delphes.h" 39 39 … … 57 57 int main(int argc, char *argv[]) 58 58 { 59 char appName[] = "DelphesHepMC ";59 char appName[] = "DelphesHepMC2"; 60 60 stringstream message; 61 61 FILE *inputFile = 0; … … 68 68 DelphesFactory *factory = 0; 69 69 TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0; 70 DelphesHepMC Reader *reader = 0;70 DelphesHepMC2Reader *reader = 0; 71 71 Int_t i, maxEvents, skipEvents; 72 72 Long64_t length, eventCounter; … … 132 132 partonOutputArray = modularDelphes->ExportArray("partons"); 133 133 134 reader = new DelphesHepMC Reader;134 reader = new DelphesHepMC2Reader; 135 135 136 136 modularDelphes->InitTask();
Note:
See TracChangeset
for help on using the changeset viewer.