- Timestamp:
- Dec 9, 2021, 7:52:15 AM (3 years ago)
- Children:
- 29b722a
- Parents:
- a5af1df (diff), 0c0c9af (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- readers
- Files:
-
- 1 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesCMSFWLite.cpp
ra5af1df rd612dec 217 217 // Prevent duplicated particle. 218 218 if(!isMiniAOD) stableParticleOutputArray->Add(candidate); 219 } 220 else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15) 219 if (pdgCode == 11 || pdgCode == 13) partonOutputArray->Add(candidate); 220 } 221 //else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15) 222 else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 11 || pdgCode == 13 || pdgCode == 15) 221 223 { 222 224 partonOutputArray->Add(candidate); … … 309 311 DelphesFactory *factory = 0; 310 312 TObjArray *allParticleOutputArray = 0, *stableParticleOutputArray = 0, *partonOutputArray = 0; 311 Int_t i ;313 Int_t i, maxEvents, skipEvents; 312 314 Long64_t eventCounter, numberOfEvents; 313 315 Bool_t firstEvent = kTRUE; … … 351 353 confReader = new ExRootConfReader; 352 354 confReader->ReadFile(argv[1]); 355 356 maxEvents = confReader->GetInt("::MaxEvents", 0); 357 skipEvents = confReader->GetInt("::SkipEvents", 0); 358 359 if(maxEvents < 0) 360 { 361 throw runtime_error("MaxEvents must be zero or positive"); 362 } 363 364 if(skipEvents < 0) 365 { 366 throw runtime_error("SkipEvents must be zero or positive"); 367 } 353 368 354 369 modularDelphes = new Delphes("Delphes"); … … 389 404 treeWriter->Clear(); 390 405 391 for(event.toBegin(); !event.atEnd() && !interrupted ; ++event)406 for(event.toBegin(); !event.atEnd() && !interrupted && (maxEvents <= 0 || eventCounter-skipEvents < maxEvents); ++event) 392 407 { 393 ConvertInput(event, eventCounter, branchEvent, branchWeight, factory, 394 allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent); 395 modularDelphes->ProcessTask(); 396 397 firstEvent = kFALSE; 398 399 treeWriter->Fill(); 400 401 modularDelphes->Clear(); 402 treeWriter->Clear(); 408 if(eventCounter >= skipEvents){ 409 ConvertInput(event, eventCounter, branchEvent, branchWeight, factory, 410 allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent); 411 modularDelphes->ProcessTask(); 412 413 firstEvent = kFALSE; 414 415 treeWriter->Fill(); 416 417 modularDelphes->Clear(); 418 treeWriter->Clear(); 419 } 403 420 404 421 progressBar.Update(eventCounter, eventCounter); -
readers/DelphesHepMC2.cpp
ra5af1df rd612dec 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(); -
readers/DelphesPythia8.cpp
ra5af1df rd612dec 296 296 297 297 // jet matching 298 #if PYTHIA_VERSION_INTEGER < 8300 298 299 matching = combined->getHook(*pythia); 299 300 if(!matching) … … 302 303 } 303 304 pythia->setUserHooksPtr(matching); 305 #endif 304 306 305 307 if(pythia == NULL)
Note:
See TracChangeset
for help on using the changeset viewer.