Fork me on GitHub

Changeset 1368 in svn


Ignore:
Timestamp:
Apr 16, 2014, 4:32:53 PM (11 years ago)
Author:
Michele Selvaggi
Message:

added nsubjettiness

Location:
trunk
Files:
15 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r1367 r1368  
    494494        external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh \
    495495        external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh \
    496         external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh
     496        external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh \
     497        external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh \
     498        external/fastjet/contribs/Nsubjettiness/Njettiness.hh \
     499        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
     500        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
    497501tmp/modules/BTagging.$(ObjSuf): \
    498502        modules/BTagging.$(SrcSuf) \
     
    10191023tmp/external/Hector/H_OpticalElement.$(ObjSuf): \
    10201024        external/Hector/H_OpticalElement.$(SrcSuf)
     1025tmp/external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(ObjSuf): \
     1026        external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(SrcSuf)
     1027tmp/external/fastjet/contribs/Nsubjettiness/AxesFinder.$(ObjSuf): \
     1028        external/fastjet/contribs/Nsubjettiness/AxesFinder.$(SrcSuf)
     1029tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf): \
     1030        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(SrcSuf)
     1031tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf): \
     1032        external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(SrcSuf)
     1033tmp/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(ObjSuf): \
     1034        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(SrcSuf)
     1035tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf): \
     1036        external/fastjet/contribs/Nsubjettiness/Njettiness.$(SrcSuf)
    10211037DELPHES_OBJ +=  \
    10221038        tmp/classes/DelphesFormula.$(ObjSuf) \
     
    11671183        tmp/external/Hector/H_Parameters.$(ObjSuf) \
    11681184        tmp/external/Hector/H_Marker.$(ObjSuf) \
    1169         tmp/external/Hector/H_OpticalElement.$(ObjSuf)
     1185        tmp/external/Hector/H_OpticalElement.$(ObjSuf) \
     1186        tmp/external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(ObjSuf) \
     1187        tmp/external/fastjet/contribs/Nsubjettiness/AxesFinder.$(ObjSuf) \
     1188        tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf) \
     1189        tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \
     1190        tmp/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(ObjSuf) \
     1191        tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf)
    11701192
    11711193ifeq ($(HAS_PYTHIA8),true)
     
    13631385        @touch $@
    13641386
     1387external/fastjet/contribs/Nsubjettiness/Njettiness.hh: \
     1388        external/fastjet/PseudoJet.hh
     1389        @touch $@
     1390
    13651391modules/Efficiency.h: \
    13661392        classes/DelphesModule.h
     
    14031429        @touch $@
    14041430
     1431external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh: \
     1432        external/fastjet/ClusterSequence.hh \
     1433        external/fastjet/JetDefinition.hh
     1434        @touch $@
     1435
    14051436modules/Cloner.h: \
    14061437        classes/DelphesModule.h
     
    15061537        @touch $@
    15071538
     1539external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh: \
     1540        external/fastjet/PseudoJet.hh \
     1541        external/fastjet/JetDefinition.hh
     1542        @touch $@
     1543
    15081544modules/ImpactParameterSmearing.h: \
    15091545        classes/DelphesModule.h
     
    15581594        external/fastjet/SharedPtr.hh \
    15591595        external/fastjet/PseudoJetStructureBase.hh
     1596        @touch $@
     1597
     1598external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh: \
     1599        external/fastjet/FunctionOfPseudoJet.hh
    15601600        @touch $@
    15611601
  • trunk/classes/DelphesClasses.cc

    r1367 r1368  
    112112  Position(0.0, 0.0, 0.0, 0.0),
    113113  Dxy(0),SDxy(0),Xd(0),Yd(0),Zd(0),
     114  Tau1(0.0), Tau2(0.0), Tau3(0.0), Tau4(0.0), Tau5(0.0),
    114115  Area(0.0, 0.0, 0.0, 0.0),
    115116  NCharged(0),
     
    235236  object.FracPt[3] = FracPt[3];
    236237  object.FracPt[4] = FracPt[4];
    237 
     238  object.Tau1 = Tau1;
     239  object.Tau2 = Tau2;
     240  object.Tau3 = Tau3;
     241  object.Tau4 = Tau4;
     242  object.Tau5 = Tau5;
     243 
    238244  object.fFactory = fFactory;
    239245  object.fArray = 0;
     
    292298  FracPt[3] = 0.0;
    293299  FracPt[4] = 0.0;
    294 
     300  Tau1 = 0.0;
     301  Tau2 = 0.0;
     302  Tau3 = 0.0;
     303  Tau4 = 0.0;
     304  Tau5 = 0.0;
     305 
    295306  fArray = 0;
    296307}
  • trunk/classes/DelphesClasses.h

    r1367 r1368  
    318318  Float_t  FracPt[5];
    319319
    320 
     320 // -- Nsubjettiness variables ---
     321 
     322  Float_t Tau1;
     323  Float_t Tau2;
     324  Float_t Tau3;
     325  Float_t Tau4;
     326  Float_t Tau5;
    321327
    322328  ClassDef(Jet, 2)
     
    466472  Float_t  PTD;
    467473  Float_t  FracPt[5];
    468 
     474 
     475  // -- Nsubjettiness variables ---
     476 
     477  Float_t Tau1;
     478  Float_t Tau2;
     479  Float_t Tau3;
     480  Float_t Tau4;
     481  Float_t Tau5;
     482 
    469483  static CompBase *fgCompare; //!
    470484  const CompBase *GetCompare() const { return fgCompare; }
  • trunk/doc/genMakefile.tcl

    r1360 r1368  
    273273dictDeps {DISPLAY_DICT} {display/DisplayLinkDef.h}
    274274
    275 sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/Hector/*.cc}
     275sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/Hector/*.cc} {external/fastjet/contribs/Nsubjettiness/*.cc}
    276276
    277277sourceDeps {DISPLAY} {display/*.cc}
  • trunk/modules/FastJetFinder.cc

    r1345 r1368  
    4747#include "fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh"
    4848
     49#include "fastjet/contribs/Nsubjettiness/Nsubjettiness.hh"
     50#include "fastjet/contribs/Nsubjettiness/Njettiness.hh"
     51#include "fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh"
     52#include "fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh"
     53
    4954using namespace std;
    5055using namespace fastjet;
     56using namespace fastjet::contrib;
     57
    5158
    5259//------------------------------------------------------------------------------
    5360
    5461FastJetFinder::FastJetFinder() :
    55   fPlugin(0), fDefinition(0), fAreaDefinition(0), fItInputArray(0)
     62  fPlugin(0), fDefinition(0), fAreaDefinition(0), fItInputArray(0), fRecomb(0), fNjettinessPlugin(0)
    5663{
    5764
     
    6976void FastJetFinder::Init()
    7077{
     78 
    7179  JetDefinition::Plugin *plugin = NULL;
    72 
     80  JetDefinition::Recombiner *recomb = NULL;
     81  NjettinessPlugin *njet_plugin = NULL;
     82 
    7383  // read eta ranges
    7484
     
    99109  fJetPTMin = GetDouble("JetPTMin", 10.0);
    100110
     111  //-- N(sub)jettiness parameters --
     112 
     113  fComputeNsubjettiness = GetBool("ComputeNsubjettiness", false);
     114  fBeta = GetDouble("Beta", 1.0);
     115  fAxisMode = GetInt("AxisMode", 1);
     116  fRcutOff = GetDouble("RcutOff", 0.8); //used only if Njettiness is used as jet clustering algo (case 8)
     117  fN = GetInt("N", 2);                  //used only if Njettiness is used as jet clustering algo (case 8)
     118 
    101119  // ---  Jet Area Parameters ---
    102120  fAreaAlgorithm = GetInt("AreaAlgorithm", 0);
    103121  fComputeRho = GetBool("ComputeRho", false);
     122 
    104123  // - ghost based areas -
    105124  fGhostEtaMax = GetDouble("GhostEtaMax", 5.0);
     
    109128  fPtScatter = GetDouble("PtScatter", 0.1);
    110129  fMeanGhostPt = GetDouble("MeanGhostPt", 1.0E-100);
     130 
    111131  // - voronoi based areas -
    112132  fEffectiveRfact = GetDouble("EffectiveRfact", 1.0);
     
    159179      fDefinition = new fastjet::JetDefinition(fastjet::antikt_algorithm, fParameterR);
    160180      break;
    161   }
     181    case 7:
     182      recomb = new fastjet::contrib::WinnerTakeAllRecombiner();
     183      fDefinition = new fastjet::JetDefinition(fastjet::antikt_algorithm, fParameterR, recomb, Best);
     184      break;
     185    case 8:
     186      njet_plugin = new fastjet::contrib::NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
     187      fDefinition = new fastjet::JetDefinition(njet_plugin);
     188      break;
     189  }
     190 
    162191
    163192  fPlugin = plugin;
    164 
     193  fRecomb = recomb;
     194  fNjettinessPlugin = njet_plugin;
     195 
    165196  ClusterSequence::print_banner();
    166197
     
    184215  if(fAreaDefinition) delete fAreaDefinition;
    185216  if(fPlugin) delete static_cast<JetDefinition::Plugin*>(fPlugin);
     217  if(fRecomb) delete static_cast<JetDefinition::Recombiner*>(fRecomb);
     218  if(fNjettinessPlugin) delete static_cast<JetDefinition::Plugin*>(fNjettinessPlugin);
    186219}
    187220
     
    248281  outputList = sorted_by_pt(sequence->inclusive_jets(fJetPTMin));
    249282
     283
    250284  // loop over all jets and export them
    251285  detaMax = 0.0;
     
    265299    inputList.clear();
    266300    inputList = sequence->constituents(*itOutputList);
     301     
    267302    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    268303    {
     
    289324    candidate->DeltaPhi = dphiMax;
    290325
     326    // --- compute N-subjettiness with N = 1,2,3,4,5 ----
     327   
     328    if(fComputeNsubjettiness)
     329    {
     330      Njettiness::AxesMode axisMode;
     331     
     332      if (fAxisMode == 1) axisMode = Njettiness::wta_kt_axes;
     333      if (fAxisMode == 2) axisMode = Njettiness::onepass_wta_kt_axes;
     334      if (fAxisMode == 3) axisMode = Njettiness::kt_axes;
     335      if (fAxisMode == 4) axisMode = Njettiness::onepass_kt_axes;
     336       
     337      Njettiness::MeasureMode measureMode = Njettiness::unnormalized_measure;
     338     
     339      Nsubjettiness nSub1(1, axisMode, measureMode, fBeta);
     340      Nsubjettiness nSub2(2, axisMode, measureMode, fBeta);
     341      Nsubjettiness nSub3(3, axisMode, measureMode, fBeta);
     342      Nsubjettiness nSub4(4, axisMode, measureMode, fBeta);
     343      Nsubjettiness nSub5(5, axisMode, measureMode, fBeta);
     344   
     345      candidate -> Tau1 = nSub1(*itOutputList);
     346      candidate -> Tau2 = nSub2(*itOutputList);
     347      candidate -> Tau3 = nSub3(*itOutputList);
     348      candidate -> Tau4 = nSub4(*itOutputList);
     349      candidate -> Tau5 = nSub5(*itOutputList);
     350    }
     351
     352
    291353    fOutputArray->Add(candidate);
    292354  }
  • trunk/modules/FastJetFinder.h

    r1337 r1368  
    4141
    4242  void *fPlugin; //!
     43  void *fRecomb; //!
     44  void *fNjettinessPlugin; //!
     45 
    4346  fastjet::JetDefinition *fDefinition; //!
    4447
     
    5558  Double_t fOverlapThreshold;
    5659
     60  //-- N (sub)jettiness parameters --
     61 
     62  Bool_t fComputeNsubjettiness;
     63  Double_t fBeta;
     64  Int_t fAxisMode;
     65  Double_t fRcutOff;
     66  Int_t fN ;
     67 
    5768  // --- FastJet Area method --------
    5869
  • trunk/modules/TreeWriter.cc

    r1367 r1368  
    554554    entry->FracPt[3] = candidate->FracPt[3];
    555555    entry->FracPt[4] = candidate->FracPt[4];
    556 
     556   
     557    //--- N-subjettiness variables ----
     558   
     559    entry->Tau1 = candidate->Tau1;
     560    entry->Tau2 = candidate->Tau2;
     561    entry->Tau3 = candidate->Tau3;
     562    entry->Tau4 = candidate->Tau4;
     563    entry->Tau5 = candidate->Tau5;
     564   
    557565    FillParticles(candidate, &entry->Particles);
    558566  }
Note: See TracChangeset for help on using the changeset viewer.