- Timestamp:
- Mar 16, 2015, 4:39:51 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 986d9d5
- Parents:
- 666d795
- Location:
- modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/FastJetFinder.cc
r666d795 rde6d698 66 66 #include "fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh" 67 67 68 #include "fastjet/tools/Filter.hh" 69 #include "fastjet/tools/Pruner.hh" 70 #include "fastjet/contribs/RecursiveTools/SoftDrop.hh" 71 68 72 using namespace std; 69 73 using namespace fastjet; … … 121 125 fN = GetInt("N", 2); // used only if Njettiness is used as jet clustering algo (case 8) 122 126 127 //-- Trimming parameters -- 128 129 fComputeTrimming = GetBool("ComputeTrimming", false); 130 fRTrim = GetDouble("RTrim", 0.2); 131 fPtFracTrim = GetDouble("PtFracTrim", 0.05); 132 133 134 //-- Pruning parameters -- 135 136 fComputePruning = GetBool("ComputePruning", false); 137 fZcutPrun = GetDouble("ZcutPrun", 0.1); 138 fRcutPrun = GetDouble("RcutPrun", 0.5); 139 fRPrun = GetDouble("RPrun", 0.8); 140 141 //-- SoftDrop parameters -- 142 143 fComputeSoftDrop = GetBool("ComputeSoftDrop", false); 144 fBetaSoftDrop = GetDouble("BetaSoftDrop", 0.0); 145 fSymmetryCutSoftDrop = GetDouble("SymmetryCutSoftDrop", 0.1); 146 fR0SoftDrop= GetDouble("R0SoftDrop=", 0.8); 147 148 123 149 // --- Jet Area Parameters --- 124 150 fAreaAlgorithm = GetInt("AreaAlgorithm", 0); … … 260 286 PseudoJet jet, area; 261 287 ClusterSequence *sequence; 262 vector< PseudoJet > inputList, outputList ;288 vector< PseudoJet > inputList, outputList, subjets; 263 289 vector< PseudoJet >::iterator itInputList, itOutputList; 264 290 vector< TEstimatorStruct >::iterator itEstimators; … … 352 378 candidate->DeltaEta = detaMax; 353 379 candidate->DeltaPhi = dphiMax; 354 380 381 //------------------------------------ 382 // Trimming 383 //------------------------------------ 384 385 if(fComputeTrimming) 386 { 387 388 fastjet::Filter trimmer(fastjet::JetDefinition(fastjet::kt_algorithm,fRTrim),fastjet::SelectorPtFractionMin(fPtFracTrim)); 389 fastjet::PseudoJet trimmed_jet = trimmer(*itOutputList); 390 391 trimmed_jet = join(trimmed_jet.constituents()); 392 393 candidate->TrimmedP4[0].SetPtEtaPhiM(trimmed_jet.pt(), trimmed_jet.eta(), trimmed_jet.phi(), trimmed_jet.m()); 394 395 // four hardest subjets 396 subjets.clear(); 397 subjets = trimmed_jet.pieces(); 398 subjets = sorted_by_pt(subjets); 399 400 candidate->NSubJetsTrimmed = subjets.size(); 401 402 for (size_t i = 0; i < subjets.size() and i < 4; i++){ 403 if(subjets.at(i).pt() < 0) continue ; 404 candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 405 } 406 } 407 408 409 //------------------------------------ 410 // Pruning 411 //------------------------------------ 412 413 414 if(fComputePruning) 415 { 416 417 fastjet::Pruner pruner(fastjet::JetDefinition(fastjet::cambridge_algorithm,fRPrun),fZcutPrun,fRcutPrun); 418 fastjet::PseudoJet pruned_jet = pruner(*itOutputList); 419 420 candidate->PrunedP4[0].SetPtEtaPhiM(pruned_jet.pt(), pruned_jet.eta(), pruned_jet.phi(), pruned_jet.m()); 421 422 // four hardest subjet 423 subjets.clear(); 424 subjets = pruned_jet.pieces(); 425 subjets = sorted_by_pt(subjets); 426 427 candidate->NSubJetsPruned = subjets.size(); 428 429 for (size_t i = 0; i < subjets.size() and i < 4; i++){ 430 if(subjets.at(i).pt() < 0) continue ; 431 candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 432 } 433 434 } 435 436 //------------------------------------ 437 // SoftDrop 438 //------------------------------------ 439 440 if(fComputeSoftDrop) 441 { 442 443 contrib::SoftDrop softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop); 444 fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList); 445 446 candidate->SoftDroppedP4[0].SetPtEtaPhiM(softdrop_jet.pt(), softdrop_jet.eta(), softdrop_jet.phi(), softdrop_jet.m()); 447 448 // four hardest subjet 449 450 subjets.clear(); 451 subjets = softdrop_jet.pieces(); 452 subjets = sorted_by_pt(subjets); 453 candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size(); 454 455 for (size_t i = 0; i < subjets.size() and i < 4; i++){ 456 if(subjets.at(i).pt() < 0) continue ; 457 candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 458 } 459 } 460 355 461 // --- compute N-subjettiness with N = 1,2,3,4,5 ---- 356 462 -
modules/FastJetFinder.h
r666d795 rde6d698 83 83 Int_t fN ; 84 84 85 //-- Trimming parameters -- 86 87 Bool_t fComputeTrimming; 88 Double_t fRTrim; 89 Double_t fPtFracTrim; 90 91 //-- Pruning parameters -- 92 93 Bool_t fComputePruning; 94 Double_t fZcutPrun; 95 Double_t fRcutPrun; 96 Double_t fRPrun; 97 98 //-- SoftDrop parameters -- 99 100 Bool_t fComputeSoftDrop; 101 Double_t fBetaSoftDrop; 102 Double_t fSymmetryCutSoftDrop; 103 Double_t fR0SoftDrop; 104 85 105 // --- FastJet Area method -------- 86 106 -
modules/TreeWriter.cc
r666d795 rde6d698 533 533 Double_t ecalEnergy, hcalEnergy; 534 534 const Double_t c_light = 2.99792458E8; 535 Int_t i; 535 536 536 537 array->Sort(); … … 592 593 entry->MeanSqDeltaR = candidate->MeanSqDeltaR; 593 594 entry->PTD = candidate->PTD; 594 entry->FracPt[0] = candidate->FracPt[0];595 entry->FracPt[1] = candidate->FracPt[1];596 entry->FracPt[2] = candidate->FracPt[2];597 entry->FracPt[3] = candidate->FracPt[3];598 entry->FracPt[4] = candidate->FracPt[4];599 600 //--- N-subjettiness variables ----601 595 602 entry->Tau[0] = candidate->Tau[0]; 603 entry->Tau[1] = candidate->Tau[1]; 604 entry->Tau[2] = candidate->Tau[2]; 605 entry->Tau[3] = candidate->Tau[3]; 606 entry->Tau[4] = candidate->Tau[4]; 596 //--- Sub-structure variables ---- 597 598 entry->NSubJetsTrimmed = candidate->NSubJetsTrimmed; 599 entry->NSubJetsPruned = candidate->NSubJetsPruned; 600 entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped; 601 602 for(i = 0; i < 5; i++) 603 { 604 entry->FracPt[i] = candidate -> FracPt[i]; 605 entry->Tau[i] = candidate -> Tau[i]; 606 entry->TrimmedP4[i] = candidate -> TrimmedP4[i]; 607 entry->PrunedP4[i] = candidate -> PrunedP4[i]; 608 entry->SoftDroppedP4[i] = candidate -> SoftDroppedP4[i]; 609 } 607 610 608 611 FillParticles(candidate, &entry->Particles);
Note:
See TracChangeset
for help on using the changeset viewer.