Fork me on GitHub

Ignore:
Timestamp:
Sep 3, 2014, 3:18:54 PM (10 years ago)
Author:
Pavel Demin <demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
be2222c
Parents:
5b5a56b
Message:

upgrade FastJet to version 3.1.0-beta.1, upgrade Nsubjettiness to version 2.1.0, add SoftKiller version 1.0.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh

    r5b5a56b r35cdc46  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
     7//  $Id: Nsubjettiness.hh 670 2014-06-06 01:24:42Z jthaler $
    78//----------------------------------------------------------------------
    89// This file is part of FastJet contrib.
     
    3233#include <string>
    3334#include <climits>
    34 
    3535
    3636FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    4949public:
    5050
    51    // Main constructor, which takes N, axes/measure modes,
    52    // and up to four parameters for parameters (i.e. beta, Rcutoff, etc depending on measure)
     51   
     52   // Main constructor, which takes N, the AxesDefiniation, and the MeasureDefinition.
     53   // The Definitions are given in NjettinessDefinition.hh
     54   //
     55   // The recommended AxesDefinitions are (more are available as listed in the README
     56   // and defined in NjettinessDefinition.hh):
     57   //   KT_Axes             : exclusive kt axes
     58   //   WTA_KT_Axes         : exclusive kt with winner-take-all recombination
     59   //   OnePass_KT_Axes     : one-pass minimization from kt starting point
     60   //   OnePass_WTA_KT_Axes : one-pass min. from wta_kt starting point
     61   //
     62   // The recommended measure definitions are (with the corresponding parameters)
     63   //   NormalizedMeasure(beta,R0)
     64   //      :  This was the original N-subjettiness measure (dimensionless)
     65   //   UnnormalizedMeasure(beta)
     66   //      :  This is the new recommended default, same as above but without
     67   //      :  the normalization factor, and hence has units of GeV
     68   //   NormalizedCutoffMeasure(beta,R0,Rcutoff)
     69   //      :  Same as normalized_measure, but cuts off at Rcutoff
     70   //   UnnormalizedCutoffMeasure(beta,Rcutoff)
     71   //      :  Same as unnormalized_measure, but cuts off at Rcutoff
     72   Nsubjettiness(int N,
     73                 const AxesDefinition& axes_def,
     74                 const MeasureDefinition& measure_def)
     75   : _njettinessFinder(axes_def,measure_def), _N(N) {}
     76   
     77   
     78   // Alternative constructors that define the measure via enums and parameters
     79   // These constructors are likely be removed
     80   // Zero parameter arguments
     81   // (Currently, no measure uses this)
     82   Nsubjettiness(int N,
     83                 Njettiness::AxesMode axes_mode,
     84                 Njettiness::MeasureMode measure_mode)
     85   : _njettinessFinder(axes_mode, measure_mode, 0), _N(N) {}
     86
     87   // One parameter argument
     88   // (for unnormalized_measure, para1=beta)
    5389   Nsubjettiness(int N,
    5490                 Njettiness::AxesMode axes_mode,
    5591                 Njettiness::MeasureMode measure_mode,
    56                  double para1 = NAN,
    57                  double para2 = NAN,
    58                  double para3 = NAN,
    59                  double para4 = NAN)
    60    : _njettinessFinder(axes_mode, measure_mode, para1, para2, para3, para4), _N(N) {}
     92                 double para1)
     93   : _njettinessFinder(axes_mode, measure_mode, 1, para1), _N(N) {}
     94
     95   // Two parameter arguments
     96   // (for normalized_measure, para1=beta, para2=R0)
     97   // (for unnormalized_cutoff_measure, para1=beta, para2=Rcutoff)
     98   Nsubjettiness(int N,
     99                 Njettiness::AxesMode axes_mode,
     100                 Njettiness::MeasureMode measure_mode,
     101                 double para1,
     102                 double para2)
     103   : _njettinessFinder(axes_mode, measure_mode, 2, para1, para2), _N(N) {}
     104
     105   // Three parameter arguments
     106   // (for unnormalized_cutoff_measure, para1=beta, para2=R0, para3=Rcutoff)
     107   Nsubjettiness(int N,
     108                 Njettiness::AxesMode axes_mode,
     109                 Njettiness::MeasureMode measure_mode,
     110                 double para1,
     111                 double para2,
     112                 double para3)
     113   : _njettinessFinder(axes_mode, measure_mode, 3, para1, para2, para3), _N(N) {}
    61114
    62115   // Old constructor for backwards compatibility with v1.0,
     
    67120                 double R0,
    68121                 double Rcutoff=std::numeric_limits<double>::max())
    69    : _njettinessFinder(axes_mode, Njettiness::normalized_cutoff_measure, beta, R0, Rcutoff), _N(N) {}
    70 
    71 
     122   : _njettinessFinder(axes_mode, NormalizedCutoffMeasure(beta,R0,Rcutoff)), _N(N) {}
     123   
    72124   /// returns tau_N, measured on the constituents of this jet
    73125   double result(const PseudoJet& jet) const;
     
    86138   }
    87139   
     140   /// returns subjet regions found by result() calculation (these have valid constituents)
     141   /// Note that the axes and the subjets are not the same
     142   std::vector<fastjet::PseudoJet> currentSubjets() const {
     143      return _njettinessFinder.currentJets();
     144   }
     145
     146   /// returns components of tau_N without recalculating anything
     147   TauComponents currentTauComponents() const {
     148      return _njettinessFinder.currentTauComponents();
     149   }
     150   
    88151   // To set axes for manual use
    89    void setAxes(std::vector<fastjet::PseudoJet> myAxes) {
     152   void setAxes(const std::vector<fastjet::PseudoJet> & myAxes) {
    90153      // Cross check that manual axes are being used is in Njettiness
    91154        _njettinessFinder.setAxes(myAxes);
     
    95158private:
    96159   
    97    mutable Njettiness _njettinessFinder; // TODO:  should muck with this so result can be const without this mutable
     160   Njettiness _njettinessFinder; // TODO:  should muck with this so result can be const without this mutable
    98161   int _N;
    99162
     
    112175   NsubjettinessRatio(int N,
    113176                      int M,
     177                      const AxesDefinition & axes_def,
     178                      const MeasureDefinition & measure_def)
     179   : _nsub_numerator(N,axes_def,measure_def),
     180   _nsub_denominator(M,axes_def,measure_def) {}
     181   
     182   // Alternative constructor with enums and parameters
     183   // Again, likely to be removed
     184   NsubjettinessRatio(int N,
     185                      int M,
     186                      Njettiness::AxesMode axes_mode,
     187                      Njettiness::MeasureMode measure_mode)
     188   : _nsub_numerator(N, axes_mode, measure_mode),
     189   _nsub_denominator(M, axes_mode, measure_mode) {}
     190
     191   
     192   NsubjettinessRatio(int N,
     193                      int M,
    114194                      Njettiness::AxesMode axes_mode,
    115195                      Njettiness::MeasureMode measure_mode,
    116                       double para1 = NAN,
    117                       double para2 = NAN,
    118                       double para3 = NAN,
    119                       double para4 = NAN)
    120    : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3, para4),
    121    _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3, para4) {}
    122 
    123    //returns tau_N/tau_M based off the input jet using result function from Nsubjettiness
     196                      double para1)
     197   : _nsub_numerator(N, axes_mode, measure_mode, para1),
     198   _nsub_denominator(M, axes_mode, measure_mode, para1) {}
     199
     200   NsubjettinessRatio(int N,
     201                      int M,
     202                      Njettiness::AxesMode axes_mode,
     203                      Njettiness::MeasureMode measure_mode,
     204                      double para1,
     205                      double para2)
     206   : _nsub_numerator(N, axes_mode, measure_mode, para1, para2),
     207   _nsub_denominator(M, axes_mode, measure_mode, para1, para2) {}
     208   
     209   NsubjettinessRatio(int N,
     210                      int M,
     211                      Njettiness::AxesMode axes_mode,
     212                      Njettiness::MeasureMode measure_mode,
     213                      double para1,
     214                      double para2,
     215                      double para3)
     216   : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3),
     217   _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3) {}
     218
     219   //returns tau_N/tau_M based off the input jet using result function from Nsubjettiness
    124220   double result(const PseudoJet& jet) const;
    125221
Note: See TracChangeset for help on using the changeset viewer.