Changeset 8c3ac78 in git
- Timestamp:
- Apr 11, 2018, 6:26:41 PM (7 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 58cfe91, 900ad95
- Parents:
- a670493 (diff), b1d948c (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. - git-author:
- Michele Selvaggi <michele.selvaggi@…> (04/11/18 18:26:41)
- git-committer:
- GitHub <noreply@…> (04/11/18 18:26:41)
- Files:
-
- 15 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
ra670493 r8c3ac78 1754 1754 external/fastjet/internal/numconsts.hh \ 1755 1755 external/fastjet/PseudoJet.hh \ 1756 external/fastjet/internal/deprecated.hh \ 1757 external/fastjet/ClusterSequence.hh 1756 external/fastjet/internal/deprecated.hh 1758 1757 @touch $@ 1759 1758 … … 1902 1901 display/DelphesBranchElement.h: \ 1903 1902 display/DelphesCaloData.h 1903 @touch $@ 1904 1905 external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.hh: \ 1906 external/fastjet/ClusterSequence.hh \ 1907 external/fastjet/JetDefinition.hh 1904 1908 @touch $@ 1905 1909 -
classes/DelphesClasses.cc
ra670493 r8c3ac78 157 157 NSubJetsPruned(0), 158 158 NSubJetsSoftDropped(0), 159 ExclYmerge23(0), 160 ExclYmerge34(0), 161 ExclYmerge45(0), 162 ExclYmerge56(0), 159 163 fFactory(0), 160 164 fArray(0) -
classes/DelphesClasses.h
ra670493 r8c3ac78 396 396 TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 397 397 398 398 399 Int_t NSubJetsTrimmed; // number of subjets trimmed 399 400 Int_t NSubJetsPruned; // number of subjets pruned 400 401 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped 401 402 403 Double_t ExclYmerge23; 404 Double_t ExclYmerge34; 405 Double_t ExclYmerge45; 406 Double_t ExclYmerge56; 407 402 408 TRefArray Constituents; // references to constituents 403 409 TRefArray Particles; // references to generated particles … … 641 647 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped 642 648 643 649 // Exclusive clustering variables 650 Double_t ExclYmerge23; 651 Double_t ExclYmerge34; 652 Double_t ExclYmerge45; 653 Double_t ExclYmerge56; 654 644 655 static CompBase *fgCompare; //! 645 656 const CompBase *GetCompare() const { return fgCompare; } -
converters/root2lhco.cpp
ra670493 r8c3ac78 56 56 { 57 57 public: 58 LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile );58 LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile, string JetBranchName); 59 59 ~LHCOWriter(); 60 60 … … 107 107 //------------------------------------------------------------------------------ 108 108 109 LHCOWriter::LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile ) :109 LHCOWriter::LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile, string JetBranchName) : 110 110 fTriggerWord(0), fEventNumber(1), fTreeReader(0), fOutputFile(0), 111 111 fBranchEvent(0), fBranchTrack(0), fBranchTower(0), fBranchPhoton(0), … … 128 128 fBranchMuon = fTreeReader->UseBranch("Muon"); 129 129 // reconstructed jets 130 fBranchJet = fTreeReader->UseBranch( "Jet");130 fBranchJet = fTreeReader->UseBranch(JetBranchName.c_str()); 131 131 // missing transverse energy 132 132 fBranchMissingET = fTreeReader->UseBranch("MissingET"); … … 349 349 350 350 counter = 1; 351 351 352 352 /* 353 353 fItTrack->Reset(); … … 436 436 //--------------------------------------------------------------------------- 437 437 438 pair<string,string> stringToOption(string s) { 439 440 string delimiter = "="; 441 442 vector<string> vs; 443 pair<string,string> res; 444 445 size_t pos = 0; 446 string token; 447 while ((pos = s.find(delimiter)) != std::string::npos) { 448 token = s.substr(0, pos); 449 //cout << token << std::endl; 450 vs.push_back(token); 451 s.erase(0, pos + delimiter.length()); 452 } 453 454 //std::cout << s << std::endl; 455 vs.push_back(s); 456 457 if (vs.size()==2){ 458 res.first=vs[0]; 459 res.second=vs[1]; 460 } 461 462 return res; 463 464 } 465 466 438 467 int main(int argc, char *argv[]) 439 468 { … … 445 474 ExRootTreeReader *treeReader = 0; 446 475 Long64_t entry, allEntries; 447 448 if(argc < 2 || argc > 3) 449 { 450 cerr << " Usage: " << appName << " input_file" << " [output_file]" << endl; 476 string JetBranchName="Jet"; 477 478 if(argc < 2 || argc > 4) 479 { 480 cerr << " Usage: " << appName << " input_file" << " [output_file] [--jet-branch=Jet]" << endl; 451 481 cerr << " input_file - input file in ROOT format," << endl; 452 482 cerr << " output_file - output file in LHCO format," << endl; 453 483 cerr << " with no output_file, or when output_file is -, write to standard output." << endl; 484 cerr << " in order to specify the jet-branch name the output_file cannot be omitted." << endl; 454 485 return 1; 455 486 } 487 488 for(int iarg=3; iarg< argc ; iarg++){ 489 490 string argument=argv[iarg]; 491 pair<string,string> option; 492 option=stringToOption(argument); 493 494 if ( option.first == "--jet-branch" ) { 495 JetBranchName = option.second; 496 cout << " Using the jet branch named " << JetBranchName << endl; 497 } 498 } 499 cout << " Using the default jet branch named " << JetBranchName << endl; 500 456 501 457 502 signal(SIGINT, SignalHandler); … … 494 539 { 495 540 // Create LHC Olympics converter: 496 writer = new LHCOWriter(treeReader, outputFile );541 writer = new LHCOWriter(treeReader, outputFile, JetBranchName); 497 542 498 543 ExRootProgressBar progressBar(allEntries - 1); … … 531 576 } 532 577 } 533 534 -
modules/FastJetFinder.cc
ra670493 r8c3ac78 80 80 81 81 FastJetFinder::FastJetFinder() : 82 fPlugin(0), fRecomb(0), fAxesDef(0), fMeasureDef(0), fNjettinessPlugin(0), 83 fDefinition(0), fAreaDefinition(0), fItInputArray(0) , fValenciaPlugin(0)82 fPlugin(0), fRecomb(0), fAxesDef(0), fMeasureDef(0), fNjettinessPlugin(0), fValenciaPlugin(0), 83 fDefinition(0), fAreaDefinition(0), fItInputArray(0) 84 84 { 85 85 … … 332 332 vector< PseudoJet >::iterator itInputList, itOutputList; 333 333 vector< TEstimatorStruct >::iterator itEstimators; 334 334 Double_t excl_ymerge23 = 0.0; 335 Double_t excl_ymerge34 = 0.0; 336 Double_t excl_ymerge45 = 0.0; 337 Double_t excl_ymerge56 = 0.0; 338 335 339 DelphesFactory *factory = GetFactory(); 336 340 … … 377 381 outputList.clear(); 378 382 383 379 384 if(fExclusiveClustering) 380 385 { 381 outputList = sorted_by_pt(sequence->exclusive_jets( fNJets )); 386 try{ 387 outputList = sorted_by_pt(sequence->exclusive_jets( fNJets )); 388 } 389 catch(fastjet::Error) 390 { 391 outputList.clear(); 392 } 393 394 excl_ymerge23 = sequence->exclusive_ymerge( 2 ); 395 excl_ymerge34 = sequence->exclusive_ymerge( 3 ); 396 excl_ymerge45 = sequence->exclusive_ymerge( 4 ); 397 excl_ymerge56 = sequence->exclusive_ymerge( 5 ); 382 398 } 383 399 else … … 400 416 if(fAreaDefinition) area = itOutputList->area_4vector(); 401 417 418 419 402 420 candidate = factory->NewCandidate(); 403 421 … … 443 461 candidate->NNeutrals = nneutrals; 444 462 candidate->NCharged = ncharged; 463 464 465 //for exclusive clustering, access y_n,n+1 as exclusive_ymerge (fNJets); 466 candidate->ExclYmerge23 = excl_ymerge23; 467 candidate->ExclYmerge34 = excl_ymerge34; 468 candidate->ExclYmerge45 = excl_ymerge45; 469 candidate->ExclYmerge56 = excl_ymerge56; 445 470 446 471 //------------------------------------ -
modules/TreeWriter.cc
ra670493 r8c3ac78 696 696 } 697 697 698 //--- exclusive clustering variables --- 699 entry->ExclYmerge23 = candidate->ExclYmerge23; 700 entry->ExclYmerge34 = candidate->ExclYmerge34; 701 entry->ExclYmerge45 = candidate->ExclYmerge45; 702 entry->ExclYmerge56 = candidate->ExclYmerge56; 703 704 698 705 FillParticles(candidate, &entry->Particles); 699 706 }
Note:
See TracChangeset
for help on using the changeset viewer.