Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-21 08:23:37

0001 #ifndef SDFLAV_DEF
0002 #define SDFLAV_DEF
0003 #include "fastjet/contrib/SoftDrop.hh"
0004 #include "fastjet/JadePlugin.hh"
0005 #include "fastjet/contrib/Recluster.hh"
0006 #include <memory>
0007 
0008 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
0009 namespace contrib{
0010 
0011 /**
0012  * @class SDFlavourCalc
0013  * @brief A utility class applying SoftDrop algorithm with JADE reclustering
0014  * as required by the SDFPlugin algorithm.
0015  */
0016 
0017 
0018 class SDFlavourCalc {
0019 public:
0020 
0021   /** Constructor for SDFlavourCalc
0022    *
0023    * Initializes the SoftDrop algorithm with specified parameters for beta, zcut and R.
0024    * The constructor also sets up a reclusterign scheme using the JADE plugin.
0025    *
0026    * @param beta SoftDrop beta parameter, controlling the angular exponent. Must be strictly positive. Default is 2.
0027    * @param zcut SoftDrop zcut parameter, defining the energy fraction threshold. Default is 0.1.
0028    * @param R The jet rdius parameter. Default is 0.4.
0029    */
0030   SDFlavourCalc(const double beta = 2,
0031                 const double zcut = 0.1,
0032                 const double R = 0.4) : p_sd(new fastjet::contrib::SoftDrop(beta, zcut,
0033                                                                             fastjet::contrib::RecursiveSymmetryCutBase::SymmetryMeasure::scalar_z,
0034                                                                             R,
0035                                                                             std::numeric_limits<double>::infinity(),
0036                                                                             fastjet::contrib::RecursiveSymmetryCutBase::RecursionChoice::larger_pt,
0037                                                                             0)),
0038                                         p_plugin(new fastjet::JadePlugin()),
0039                                         p_recluster(new fastjet::Recluster(fastjet::JetDefinition(p_plugin.get()))){
0040     p_sd->set_reclustering(true,p_recluster.get());
0041   }
0042 
0043   /// Unique pointer to the SoftDrop instance
0044   std::unique_ptr<fastjet::contrib::SoftDrop> p_sd;
0045   /// Unique pointer to the JADE plugin for reclustering
0046   std::unique_ptr<fastjet::JetDefinition::Plugin> p_plugin;
0047   /// Unique pointer to the Recluster instance
0048   std::unique_ptr<fastjet::Recluster> p_recluster;
0049 
0050 
0051   /**
0052    * @brief Applies the SoftDrop procedure to a single jet.
0053    *
0054    * @param jets A reference to a PseudoJet to process.
0055    */
0056   void operator()(fastjet::PseudoJet& jet);
0057 
0058   /**
0059    * @brief Applies the SoftDrop procedure to a vector of jets.
0060    *
0061    * @param jets A vector of PseudoJets to process.
0062    */
0063   void operator()(std::vector<fastjet::PseudoJet>& jets);
0064 
0065 };
0066 
0067 } // namespace contrib 
0068 
0069 FASTJET_END_NAMESPACE
0070 
0071 #endif