Fork me on GitHub

Changeset 8abab33 in git


Ignore:
Timestamp:
Oct 16, 2015, 2:03:01 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
5e4c40d
Parents:
0bbf248
Message:

updated code to match Nsubjettiness recommendation

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/FastJetFinder.cc

    r0bbf248 r8abab33  
    7878
    7979FastJetFinder::FastJetFinder() :
    80   fPlugin(0), fRecomb(0), fNjettinessPlugin(0), fDefinition(0), fAreaDefinition(0), fItInputArray(0)
     80  fPlugin(0), fRecomb(0), fAxesDef(0), fMeasureDef(0), fNjettinessPlugin(0),
     81  fDefinition(0), fAreaDefinition(0), fItInputArray(0)
    8182{
    8283
     
    124125  fRcutOff = GetDouble("RcutOff", 0.8); // used only if Njettiness is used as jet clustering algo (case 8)
    125126  fN = GetInt("N", 2);                  // used only if Njettiness is used as jet clustering algo (case 8)
     127     
     128  fMeasureDef = new UnnormalizedMeasure(fBeta);
     129   
     130  switch(fAxisMode)
     131  {
     132    default:
     133      case 1:
     134        fAxesDef = new WTA_KT_Axes();
     135        break;
     136      case 2:
     137        fAxesDef = new OnePass_WTA_KT_Axes();
     138        break;
     139      case 3:
     140        fAxesDef = new KT_Axes();
     141        break;
     142      case 4:
     143        fAxesDef = new OnePass_KT_Axes();
     144   }
    126145
    127146  //-- Trimming parameters --
     
    219238  }
    220239
     240   
     241
    221242  fPlugin = plugin;
    222243  fRecomb = recomb;
     
    271292  if(fRecomb) delete static_cast<JetDefinition::Recombiner*>(fRecomb);
    272293  if(fNjettinessPlugin) delete static_cast<JetDefinition::Plugin*>(fNjettinessPlugin);
     294  if(fAxesDef) delete fAxesDef;
     295  if(fMeasureDef) delete fMeasureDef;
    273296}
    274297
     
    399422    //------------------------------------
    400423
    401      if(fComputeTrimming)
     424    if(fComputeTrimming)
    402425    {
    403426
     
    416439      candidate->NSubJetsTrimmed = subjets.size();
    417440
    418       for (size_t i = 0; i < subjets.size() and i < 4; i++){
    419         if(subjets.at(i).pt() < 0) continue ;
    420         candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     441      for (size_t i = 0; i < subjets.size() and i < 4; i++)
     442      {
     443            if(subjets.at(i).pt() < 0) continue ;
     444            candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    421445      }
    422446    }
     
    443467      candidate->NSubJetsPruned = subjets.size();
    444468
    445       for (size_t i = 0; i < subjets.size() and i < 4; i++){
    446         if(subjets.at(i).pt() < 0) continue ;
    447         candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     469      for (size_t i = 0; i < subjets.size() and i < 4; i++)
     470      {
     471            if(subjets.at(i).pt() < 0) continue ;
     472            candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    448473      }
    449474
     
    457482    {
    458483   
    459       contrib::SoftDrop  softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
     484      contrib::SoftDrop softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
    460485      fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList);
    461486     
     
    469494      candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size();
    470495
    471       for (size_t i = 0; i < subjets.size()  and i < 4; i++){
    472         if(subjets.at(i).pt() < 0) continue ;
    473         candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     496      for (size_t i = 0; i < subjets.size()  and i < 4; i++)
     497      {
     498            if(subjets.at(i).pt() < 0) continue ;
     499            candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
    474500      }
    475501    }
     
    479505    if(fComputeNsubjettiness)
    480506    {
    481       Njettiness::AxesMode axisMode;
    482 
    483       switch(fAxisMode)
    484       {
    485         default:
    486         case 1:
    487           axisMode = Njettiness::wta_kt_axes;
    488           break;
    489         case 2:
    490           axisMode = Njettiness::onepass_wta_kt_axes;
    491           break;
    492         case 3:
    493           axisMode = Njettiness::kt_axes;
    494           break;
    495         case 4:
    496           axisMode = Njettiness::onepass_kt_axes;
    497           break;
    498       }
    499 
    500       Njettiness::MeasureMode measureMode = Njettiness::unnormalized_measure;
    501 
    502       Nsubjettiness nSub1(1, axisMode, measureMode, fBeta);
    503       Nsubjettiness nSub2(2, axisMode, measureMode, fBeta);
    504       Nsubjettiness nSub3(3, axisMode, measureMode, fBeta);
    505       Nsubjettiness nSub4(4, axisMode, measureMode, fBeta);
    506       Nsubjettiness nSub5(5, axisMode, measureMode, fBeta);
    507 
     507     
     508      Nsubjettiness nSub1(1, *fAxesDef, *fMeasureDef);
     509      Nsubjettiness nSub2(2, *fAxesDef, *fMeasureDef);
     510      Nsubjettiness nSub3(3, *fAxesDef, *fMeasureDef);
     511      Nsubjettiness nSub4(4, *fAxesDef, *fMeasureDef);
     512      Nsubjettiness nSub5(5, *fAxesDef, *fMeasureDef);
     513     
    508514      candidate->Tau[0] = nSub1(*itOutputList);
    509515      candidate->Tau[1] = nSub2(*itOutputList);
     
    511517      candidate->Tau[3] = nSub4(*itOutputList);
    512518      candidate->Tau[4] = nSub5(*itOutputList);
     519         
    513520    }
    514521
  • modules/FastJetFinder.h

    r0bbf248 r8abab33  
    4141  namespace contrib {
    4242    class NjettinessPlugin;
     43    class AxesDefinition;
     44    class MeasureDefinition;   
    4345  }
    4446}
     
    7880
    7981  Bool_t fComputeNsubjettiness;
     82  fastjet::contrib::AxesDefinition *fAxesDef;
     83  fastjet::contrib::MeasureDefinition *fMeasureDef;   
    8084  Double_t fBeta;
    8185  Int_t fAxisMode;
Note: See TracChangeset for help on using the changeset viewer.