Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/FastJetFinder.cc

    r35807af r341014c  
    1717 */
    1818
    19 
    2019/** \class FastJetFinder
    2120 *
     
    3231#include "classes/DelphesFormula.h"
    3332
     33#include "ExRootAnalysis/ExRootClassifier.h"
     34#include "ExRootAnalysis/ExRootFilter.h"
    3435#include "ExRootAnalysis/ExRootResult.h"
    35 #include "ExRootAnalysis/ExRootFilter.h"
    36 #include "ExRootAnalysis/ExRootClassifier.h"
    37 
     36
     37#include "TDatabasePDG.h"
     38#include "TFormula.h"
     39#include "TLorentzVector.h"
    3840#include "TMath.h"
     41#include "TObjArray.h"
     42#include "TRandom3.h"
    3943#include "TString.h"
    40 #include "TFormula.h"
    41 #include "TRandom3.h"
    42 #include "TObjArray.h"
    43 #include "TDatabasePDG.h"
    44 #include "TLorentzVector.h"
    4544
    4645#include <algorithm>
    47 #include <stdexcept>
    4846#include <iostream>
    4947#include <sstream>
     48#include <stdexcept>
    5049#include <vector>
    5150
     51#include "fastjet/ClusterSequence.hh"
     52#include "fastjet/ClusterSequenceArea.hh"
     53#include "fastjet/JetDefinition.hh"
    5254#include "fastjet/PseudoJet.hh"
    53 #include "fastjet/JetDefinition.hh"
    54 #include "fastjet/ClusterSequence.hh"
    5555#include "fastjet/Selector.hh"
    56 #include "fastjet/ClusterSequenceArea.hh"
    5756#include "fastjet/tools/JetMedianBackgroundEstimator.hh"
    5857
     58#include "fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh"
     59#include "fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh"
    5960#include "fastjet/plugins/SISCone/fastjet/SISConePlugin.hh"
    60 #include "fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh"
    61 #include "fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh"
    62 
    63 #include "fastjet/contribs/Nsubjettiness/Nsubjettiness.hh"
     61
     62#include "fastjet/contribs/Nsubjettiness/ExtraRecombiners.hh"
    6463#include "fastjet/contribs/Nsubjettiness/Njettiness.hh"
    6564#include "fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh"
    66 #include "fastjet/contribs/Nsubjettiness/ExtraRecombiners.hh"
     65#include "fastjet/contribs/Nsubjettiness/Nsubjettiness.hh"
    6766
    6867#include "fastjet/contribs/ValenciaPlugin/ValenciaPlugin.hh"
    6968
     69#include "fastjet/contribs/RecursiveTools/SoftDrop.hh"
    7070#include "fastjet/tools/Filter.hh"
    7171#include "fastjet/tools/Pruner.hh"
    72 #include "fastjet/contribs/RecursiveTools/SoftDrop.hh"
    7372
    7473using namespace std;
    7574using namespace fastjet;
    7675using namespace fastjet::contrib;
    77 
    7876
    7977//------------------------------------------------------------------------------
     
    8381  fDefinition(0), fAreaDefinition(0), fItInputArray(0)
    8482{
    85 
    8683}
    8784
     
    9087FastJetFinder::~FastJetFinder()
    9188{
    92 
    9389}
    9490
     
    120116  fJetPTMin = GetDouble("JetPTMin", 10.0);
    121117
    122  
    123118  //-- N(sub)jettiness parameters --
    124119
     
    127122  fAxisMode = GetInt("AxisMode", 1);
    128123  fRcutOff = GetDouble("RcutOff", 0.8); // used only if Njettiness is used as jet clustering algo (case 8)
    129   fN = GetInt("N", 2);                  // used only if Njettiness is used as jet clustering algo (case 8)
     124  fN = GetInt("N", 2); // used only if Njettiness is used as jet clustering algo (case 8)
    130125
    131126  //-- Exclusive clustering for e+e- collisions --
    132  
    133   fNJets = GetInt("NJets",2);
     127
     128  fNJets = GetInt("NJets", 2);
    134129  fExclusiveClustering = GetBool("ExclusiveClustering", false);
    135130
    136131  //-- Valencia Linear Collider algorithm
     132
    137133  fGamma = GetDouble("Gamma", 1.0);
    138134  //fBeta parameter see above
    139  
     135
    140136  fMeasureDef = new NormalizedMeasure(fBeta, fParameterR);
    141    
     137
    142138  switch(fAxisMode)
    143139  {
    144     default:
    145       case 1:
    146         fAxesDef = new WTA_KT_Axes();
    147         break;
    148       case 2:
    149         fAxesDef = new OnePass_WTA_KT_Axes();
    150         break;
    151       case 3:
    152         fAxesDef = new KT_Axes();
    153         break;
    154       case 4:
    155         fAxesDef = new OnePass_KT_Axes();
    156    }
     140  default:
     141  case 1:
     142    fAxesDef = new WTA_KT_Axes();
     143    break;
     144  case 2:
     145    fAxesDef = new OnePass_WTA_KT_Axes();
     146    break;
     147  case 3:
     148    fAxesDef = new KT_Axes();
     149    break;
     150  case 4:
     151    fAxesDef = new OnePass_KT_Axes();
     152  }
    157153
    158154  //-- Trimming parameters --
    159  
     155
    160156  fComputeTrimming = GetBool("ComputeTrimming", false);
    161157  fRTrim = GetDouble("RTrim", 0.2);
    162158  fPtFracTrim = GetDouble("PtFracTrim", 0.05);
    163  
    164159
    165160  //-- Pruning parameters --
    166  
     161
    167162  fComputePruning = GetBool("ComputePruning", false);
    168163  fZcutPrun = GetDouble("ZcutPrun", 0.1);
    169164  fRcutPrun = GetDouble("RcutPrun", 0.5);
    170165  fRPrun = GetDouble("RPrun", 0.8);
    171  
     166
    172167  //-- SoftDrop parameters --
    173  
    174   fComputeSoftDrop     = GetBool("ComputeSoftDrop", false);
    175   fBetaSoftDrop        = GetDouble("BetaSoftDrop", 0.0);
     168
     169  fComputeSoftDrop = GetBool("ComputeSoftDrop", false);
     170  fBetaSoftDrop = GetDouble("BetaSoftDrop", 0.0);
    176171  fSymmetryCutSoftDrop = GetDouble("SymmetryCutSoftDrop", 0.1);
    177   fR0SoftDrop= GetDouble("R0SoftDrop=", 0.8);
    178  
     172  fR0SoftDrop = GetDouble("R0SoftDrop=", 0.8);
    179173
    180174  // ---  Jet Area Parameters ---
     175
    181176  fAreaAlgorithm = GetInt("AreaAlgorithm", 0);
    182177  fComputeRho = GetBool("ComputeRho", false);
     
    195190  switch(fAreaAlgorithm)
    196191  {
    197     case 1:
    198       fAreaDefinition = new AreaDefinition(active_area_explicit_ghosts, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    199       break;
    200     case 2:
    201       fAreaDefinition = new AreaDefinition(one_ghost_passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    202       break;
    203     case 3:
    204       fAreaDefinition = new AreaDefinition(passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    205       break;
    206     case 4:
    207       fAreaDefinition = new AreaDefinition(VoronoiAreaSpec(fEffectiveRfact));
    208       break;
    209     case 5:
    210       fAreaDefinition = new AreaDefinition(active_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
    211       break;
    212     default:
    213     case 0:
    214       fAreaDefinition = 0;
    215       break;
     192  default:
     193  case 0:
     194    fAreaDefinition = 0;
     195    break;
     196  case 1:
     197    fAreaDefinition = new AreaDefinition(active_area_explicit_ghosts, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     198    break;
     199  case 2:
     200    fAreaDefinition = new AreaDefinition(one_ghost_passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     201    break;
     202  case 3:
     203    fAreaDefinition = new AreaDefinition(passive_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     204    break;
     205  case 4:
     206    fAreaDefinition = new AreaDefinition(VoronoiAreaSpec(fEffectiveRfact));
     207    break;
     208  case 5:
     209    fAreaDefinition = new AreaDefinition(active_area, GhostedAreaSpec(fGhostEtaMax, fRepeat, fGhostArea, fGridScatter, fPtScatter, fMeanGhostPt));
     210    break;
    216211  }
    217212
    218213  switch(fJetAlgorithm)
    219214  {
    220     case 1:
    221       plugin = new CDFJetCluPlugin(fSeedThreshold, fConeRadius, fAdjacencyCut, fMaxIterations, fIratch, fOverlapThreshold);
    222       fDefinition = new JetDefinition(plugin);
    223       break;
    224     case 2:
    225       plugin = new CDFMidPointPlugin(fSeedThreshold, fConeRadius, fConeAreaFraction, fMaxPairSize, fMaxIterations, fOverlapThreshold);
    226       fDefinition = new JetDefinition(plugin);
    227       break;
    228     case 3:
    229       plugin = new SISConePlugin(fConeRadius, fOverlapThreshold, fMaxIterations, fJetPTMin);
    230       fDefinition = new JetDefinition(plugin);
    231       break;
    232     case 4:
    233       fDefinition = new JetDefinition(kt_algorithm, fParameterR);
    234       break;
    235     case 5:
    236       fDefinition = new JetDefinition(cambridge_algorithm, fParameterR);
    237       break;
    238     default:
    239     case 6:
    240       fDefinition = new JetDefinition(antikt_algorithm, fParameterR);
    241       break;
    242     case 7:
    243       recomb = new WinnerTakeAllRecombiner();
    244       fDefinition = new JetDefinition(antikt_algorithm, fParameterR, recomb, Best);
    245       break;
    246     case 8:
    247       fNjettinessPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
    248       fDefinition = new JetDefinition(fNjettinessPlugin);
    249       break;
     215  case 1:
     216    plugin = new CDFJetCluPlugin(fSeedThreshold, fConeRadius, fAdjacencyCut, fMaxIterations, fIratch, fOverlapThreshold);
     217    fDefinition = new JetDefinition(plugin);
     218    break;
     219  case 2:
     220    plugin = new CDFMidPointPlugin(fSeedThreshold, fConeRadius, fConeAreaFraction, fMaxPairSize, fMaxIterations, fOverlapThreshold);
     221    fDefinition = new JetDefinition(plugin);
     222    break;
     223  case 3:
     224    plugin = new SISConePlugin(fConeRadius, fOverlapThreshold, fMaxIterations, fJetPTMin);
     225    fDefinition = new JetDefinition(plugin);
     226    break;
     227  case 4:
     228    fDefinition = new JetDefinition(kt_algorithm, fParameterR);
     229    break;
     230  case 5:
     231    fDefinition = new JetDefinition(cambridge_algorithm, fParameterR);
     232    break;
     233  default:
     234  case 6:
     235    fDefinition = new JetDefinition(antikt_algorithm, fParameterR);
     236    break;
     237  case 7:
     238    recomb = new WinnerTakeAllRecombiner();
     239    fDefinition = new JetDefinition(antikt_algorithm, fParameterR, recomb, Best);
     240    break;
     241  case 8:
     242    fNjettinessPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
     243    fDefinition = new JetDefinition(fNjettinessPlugin);
     244    break;
    250245  case 9:
    251       fValenciaPlugin = new ValenciaPlugin(fParameterR, fBeta, fGamma);
    252       fDefinition = new JetDefinition(fValenciaPlugin);
    253       break;
    254 
    255   }
    256 
    257    
     246    fValenciaPlugin = new ValenciaPlugin(fParameterR, fBeta, fGamma);
     247    fDefinition = new JetDefinition(fValenciaPlugin);
     248    break;
     249  }
    258250
    259251  fPlugin = plugin;
     
    270262
    271263    fEstimators.clear();
    272     for(i = 0; i < size/2; ++i)
    273     {
    274       etaMin = param[i*2].GetDouble();
    275       etaMax = param[i*2 + 1].GetDouble();
     264    for(i = 0; i < size / 2; ++i)
     265    {
     266      etaMin = param[i * 2].GetDouble();
     267      etaMax = param[i * 2 + 1].GetDouble();
    276268      estimatorStruct.estimator = new JetMedianBackgroundEstimator(SelectorRapRange(etaMin, etaMax), *fDefinition, *fAreaDefinition);
    277269      estimatorStruct.etaMin = etaMin;
     
    290282  fOutputArray = ExportArray(GetString("OutputArray", "jets"));
    291283  fRhoOutputArray = ExportArray(GetString("RhoOutputArray", "rho"));
     284  fConstituentsOutputArray = ExportArray(GetString("ConstituentsOutputArray", "constituents"));
    292285}
    293286
     
    296289void FastJetFinder::Finish()
    297290{
    298   vector< TEstimatorStruct >::iterator itEstimators;
     291  vector<TEstimatorStruct>::iterator itEstimators;
    299292
    300293  for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)
     
    306299  if(fDefinition) delete fDefinition;
    307300  if(fAreaDefinition) delete fAreaDefinition;
    308   if(fPlugin) delete static_cast<JetDefinition::Plugin*>(fPlugin);
    309   if(fRecomb) delete static_cast<JetDefinition::Recombiner*>(fRecomb);
    310   if(fNjettinessPlugin) delete static_cast<JetDefinition::Plugin*>(fNjettinessPlugin);
     301  if(fPlugin) delete static_cast<JetDefinition::Plugin *>(fPlugin);
     302  if(fRecomb) delete static_cast<JetDefinition::Recombiner *>(fRecomb);
     303  if(fNjettinessPlugin) delete static_cast<JetDefinition::Plugin *>(fNjettinessPlugin);
    311304  if(fAxesDef) delete fAxesDef;
    312305  if(fMeasureDef) delete fMeasureDef;
    313   if(fValenciaPlugin) delete static_cast<JetDefinition::Plugin*>(fValenciaPlugin);
    314 
     306  if(fValenciaPlugin) delete static_cast<JetDefinition::Plugin *>(fValenciaPlugin);
    315307}
    316308
     
    325317  Double_t time, timeWeight;
    326318  Int_t number, ncharged, nneutrals;
    327   Int_t charge; 
     319  Int_t charge;
    328320  Double_t rho = 0.0;
    329321  PseudoJet jet, area;
    330322  ClusterSequence *sequence;
    331   vector< PseudoJet > inputList, outputList, subjets;
    332   vector< PseudoJet >::iterator itInputList, itOutputList;
    333   vector< TEstimatorStruct >::iterator itEstimators;
     323  vector<PseudoJet> inputList, outputList, subjets;
     324  vector<PseudoJet>::iterator itInputList, itOutputList;
     325  vector<TEstimatorStruct>::iterator itEstimators;
    334326  Double_t excl_ymerge23 = 0.0;
    335327  Double_t excl_ymerge34 = 0.0;
    336328  Double_t excl_ymerge45 = 0.0;
    337329  Double_t excl_ymerge56 = 0.0;
    338  
     330
    339331  DelphesFactory *factory = GetFactory();
    340332
     
    344336  fItInputArray->Reset();
    345337  number = 0;
    346   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     338  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    347339  {
    348340    momentum = candidate->Momentum;
     
    381373  outputList.clear();
    382374
    383  
    384375  if(fExclusiveClustering)
    385     {
    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 );
    398     }
     376  {
     377    try
     378    {
     379      outputList = sorted_by_pt(sequence->exclusive_jets(fNJets));
     380    }
     381    catch(fastjet::Error)
     382    {
     383      outputList.clear();
     384    }
     385
     386    excl_ymerge23 = sequence->exclusive_ymerge(2);
     387    excl_ymerge34 = sequence->exclusive_ymerge(3);
     388    excl_ymerge45 = sequence->exclusive_ymerge(4);
     389    excl_ymerge56 = sequence->exclusive_ymerge(5);
     390  }
    399391  else
    400     {
    401       outputList = sorted_by_pt(sequence->inclusive_jets(fJetPTMin));
    402     }
     392  {
     393    outputList = sorted_by_pt(sequence->inclusive_jets(fJetPTMin));
     394  }
    403395
    404396  // loop over all jets and export them
    405397  detaMax = 0.0;
    406398  dphiMax = 0.0;
    407  
     399
    408400  for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList)
    409401  {
     
    416408    if(fAreaDefinition) area = itOutputList->area_4vector();
    417409
    418 
    419    
    420410    candidate = factory->NewCandidate();
    421411
     
    434424    {
    435425      if(itInputList->user_index() < 0) continue;
    436       constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
     426      constituent = static_cast<Candidate *>(fInputArray->At(itInputList->user_index()));
    437427
    438428      deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta());
     
    441431      if(dphi > dphiMax) dphiMax = dphi;
    442432
    443       if(constituent->Charge == 0) nneutrals++;
    444       else ncharged++;
    445 
    446       time += TMath::Sqrt(constituent->Momentum.E())*(constituent->Position.T());
     433      if(constituent->Charge == 0)
     434        nneutrals++;
     435      else
     436        ncharged++;
     437
     438      time += TMath::Sqrt(constituent->Momentum.E()) * (constituent->Position.T());
    447439      timeWeight += TMath::Sqrt(constituent->Momentum.E());
    448440
    449441      charge += constituent->Charge;
    450442
     443      fConstituentsOutputArray->Add(constituent);
    451444      candidate->AddCandidate(constituent);
    452445    }
    453446
    454447    candidate->Momentum = momentum;
    455     candidate->Position.SetT(time/timeWeight);
     448    candidate->Position.SetT(time / timeWeight);
    456449    candidate->Area.SetPxPyPzE(area.px(), area.py(), area.pz(), area.E());
    457450
    458451    candidate->DeltaEta = detaMax;
    459452    candidate->DeltaPhi = dphiMax;
    460     candidate->Charge = charge; 
     453    candidate->Charge = charge;
    461454    candidate->NNeutrals = nneutrals;
    462455    candidate->NCharged = ncharged;
    463 
    464456
    465457    //for exclusive clustering, access y_n,n+1 as exclusive_ymerge (fNJets);
     
    468460    candidate->ExclYmerge45 = excl_ymerge45;
    469461    candidate->ExclYmerge56 = excl_ymerge56;
    470    
     462
    471463    //------------------------------------
    472464    // Trimming
     
    476468    {
    477469
    478       fastjet::Filter    trimmer(fastjet::JetDefinition(fastjet::kt_algorithm,fRTrim),fastjet::SelectorPtFractionMin(fPtFracTrim));
     470      fastjet::Filter trimmer(fastjet::JetDefinition(fastjet::kt_algorithm, fRTrim), fastjet::SelectorPtFractionMin(fPtFracTrim));
    479471      fastjet::PseudoJet trimmed_jet = trimmer(*itOutputList);
    480      
     472
    481473      trimmed_jet = join(trimmed_jet.constituents());
    482      
     474
    483475      candidate->TrimmedP4[0].SetPtEtaPhiM(trimmed_jet.pt(), trimmed_jet.eta(), trimmed_jet.phi(), trimmed_jet.m());
    484        
    485       // four hardest subjets 
     476
     477      // four hardest subjets
    486478      subjets.clear();
    487479      subjets = trimmed_jet.pieces();
    488480      subjets = sorted_by_pt(subjets);
    489      
     481
    490482      candidate->NSubJetsTrimmed = subjets.size();
    491483
    492       for (size_t i = 0; i < subjets.size() and i < 4; i++)
     484      for(size_t i = 0; i < subjets.size() and i < 4; i++)
    493485      {
    494             if(subjets.at(i).pt() < 0) continue ;
    495             candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     486        if(subjets.at(i).pt() < 0) continue;
     487        candidate->TrimmedP4[i + 1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    496488      }
    497489    }
    498    
    499    
     490
    500491    //------------------------------------
    501492    // Pruning
    502493    //------------------------------------
    503    
    504    
     494
    505495    if(fComputePruning)
    506496    {
    507497
    508       fastjet::Pruner    pruner(fastjet::JetDefinition(fastjet::cambridge_algorithm,fRPrun),fZcutPrun,fRcutPrun);
     498      fastjet::Pruner pruner(fastjet::JetDefinition(fastjet::cambridge_algorithm, fRPrun), fZcutPrun, fRcutPrun);
    509499      fastjet::PseudoJet pruned_jet = pruner(*itOutputList);
    510500
    511501      candidate->PrunedP4[0].SetPtEtaPhiM(pruned_jet.pt(), pruned_jet.eta(), pruned_jet.phi(), pruned_jet.m());
    512          
    513       // four hardest subjet 
     502
     503      // four hardest subjet
    514504      subjets.clear();
    515505      subjets = pruned_jet.pieces();
    516506      subjets = sorted_by_pt(subjets);
    517      
     507
    518508      candidate->NSubJetsPruned = subjets.size();
    519509
    520       for (size_t i = 0; i < subjets.size() and i < 4; i++)
     510      for(size_t i = 0; i < subjets.size() and i < 4; i++)
    521511      {
    522             if(subjets.at(i).pt() < 0) continue ;
    523             candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     512        if(subjets.at(i).pt() < 0) continue;
     513        candidate->PrunedP4[i + 1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    524514      }
    525 
    526     }
    527      
     515    }
     516
    528517    //------------------------------------
    529518    // SoftDrop
    530519    //------------------------------------
    531    
     520
    532521    if(fComputeSoftDrop)
    533522    {
    534    
    535       contrib::SoftDrop softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
     523
     524      contrib::SoftDrop softDrop(fBetaSoftDrop, fSymmetryCutSoftDrop, fR0SoftDrop);
    536525      fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList);
    537      
     526
    538527      candidate->SoftDroppedP4[0].SetPtEtaPhiM(softdrop_jet.pt(), softdrop_jet.eta(), softdrop_jet.phi(), softdrop_jet.m());
    539        
    540       // four hardest subjet 
    541      
     528
     529      // four hardest subjet
     530
    542531      subjets.clear();
    543       subjets    = softdrop_jet.pieces();
    544       subjets    = sorted_by_pt(subjets);
     532      subjets = softdrop_jet.pieces();
     533      subjets = sorted_by_pt(subjets);
    545534      candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size();
    546535
    547536      candidate->SoftDroppedJet = candidate->SoftDroppedP4[0];
    548537
    549       for (size_t i = 0; i < subjets.size() and i < 4; i++)
     538      for(size_t i = 0; i < subjets.size() and i < 4; i++)
    550539      {
    551             if(subjets.at(i).pt() < 0) continue ;
    552             candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    553             if(i==0) candidate->SoftDroppedSubJet1 = candidate->SoftDroppedP4[i+1];
    554             if(i==1) candidate->SoftDroppedSubJet2 = candidate->SoftDroppedP4[i+1];
     540        if(subjets.at(i).pt() < 0) continue;
     541        candidate->SoftDroppedP4[i + 1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     542        if(i == 0) candidate->SoftDroppedSubJet1 = candidate->SoftDroppedP4[i + 1];
     543        if(i == 1) candidate->SoftDroppedSubJet2 = candidate->SoftDroppedP4[i + 1];
    555544      }
    556545    }
    557  
     546
    558547    // --- compute N-subjettiness with N = 1,2,3,4,5 ----
    559548
    560549    if(fComputeNsubjettiness)
    561550    {
    562      
     551
    563552      Nsubjettiness nSub1(1, *fAxesDef, *fMeasureDef);
    564553      Nsubjettiness nSub2(2, *fAxesDef, *fMeasureDef);
     
    566555      Nsubjettiness nSub4(4, *fAxesDef, *fMeasureDef);
    567556      Nsubjettiness nSub5(5, *fAxesDef, *fMeasureDef);
    568      
     557
    569558      candidate->Tau[0] = nSub1(*itOutputList);
    570559      candidate->Tau[1] = nSub2(*itOutputList);
     
    572561      candidate->Tau[3] = nSub4(*itOutputList);
    573562      candidate->Tau[4] = nSub5(*itOutputList);
    574          
    575563    }
    576564
Note: See TracChangeset for help on using the changeset viewer.