Changeset d612dec in git for readers/DelphesCMSFWLite.cpp
- 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. - File:
-
- 1 edited
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);
Note:
See TracChangeset
for help on using the changeset viewer.