Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:13

0001 //
0002 // ConstituentSubtractor package
0003 // Questions/comments: peter.berta@cern.ch
0004 //
0005 // Copyright (c) 2018-, Peter Berta
0006 //
0007 //----------------------------------------------------------------------
0008 // This file is part of FastJet contrib.
0009 //
0010 // It is free software; you can redistribute it and/or modify it under
0011 // the terms of the GNU General Public License as published by the
0012 // Free Software Foundation; either version 2 of the License, or (at
0013 // your option) any later version.
0014 //
0015 // It is distributed in the hope that it will be useful, but WITHOUT
0016 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
0017 // or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
0018 // License for more details.
0019 //
0020 // You should have received a copy of the GNU General Public License
0021 // along with this code. If not, see <http://www.gnu.org/licenses/>.
0022 //----------------------------------------------------------------------
0023 
0024 #ifndef __FASTJET_CONTRIB_ITERATIVECONSTITUENTSUBTRACTOR_HH__
0025 #define __FASTJET_CONTRIB_ITERATIVECONSTITUENTSUBTRACTOR_HH__
0026 
0027 
0028 #include "ConstituentSubtractor.hh"
0029 
0030 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
0031 
0032 namespace contrib{
0033 
0034 //------------------------------------------------------------------------
0035 /// \class IterativeConstituentSubtractor
0036 /// A class to perform subtraction of background, e.g. pileup, from a set of input particles from whole event. The output is a vector of corrected PseudoJets. More info on the algorithm can be found in
0037 /// https://arxiv.org/abs/1905.03470
0038 ///
0039 /// For usage, see
0040 /// example_iterative.cc
0041 ///
0042 
0043   class IterativeConstituentSubtractor : public fastjet::contrib::ConstituentSubtractor{
0044   public:
0045 
0046     ///
0047     /// default ctor which should be used before the event loop
0048     IterativeConstituentSubtractor();
0049 
0050     ///
0051     /// initialization (construction of ghosts and some checks if the provided parameters make sense). This should be used before the event loop.
0052     virtual void initialize();
0053 
0054 
0055     ///
0056     /// default dtor
0057     virtual ~IterativeConstituentSubtractor(){}
0058     
0059     ///
0060     /// a description of what this class does
0061     virtual std::string description() const;
0062     
0063     
0064     
0065     ///
0066     /// do iterative subtraction. The particles with |eta|>max_eta are discarded at the beginning, i.e. they are not used, nor returned. The ghosts are added automatically inside this function up to max_eta.
0067     virtual std::vector<fastjet::PseudoJet> subtract_event(std::vector<fastjet::PseudoJet> const &particles, std::vector<fastjet::PseudoJet> const *hard_proxies=0);
0068 
0069     ///
0070     /// this should be not used
0071     virtual std::vector<fastjet::PseudoJet> subtract_event(std::vector<fastjet::PseudoJet> const &particles, double max_eta);
0072     
0073     ///
0074     /// function to set the _ghost_removal member. If set to true, then the proxies with non-zero remaining pt are discarded for the next iteration
0075     void set_ghost_removal(bool ghost_removal);
0076 
0077     ///
0078     /// Set maximal distance and alpha parameters for the iterative CS
0079     void set_parameters(std::vector<double> const &max_distances, std::vector<double> const &alphas);
0080 
0081     void set_nearby_hard_parameters(std::vector<double> const &nearby_hard_radii, std::vector<double> const &nearby_hard_factors);
0082 
0083 
0084   protected:
0085     std::vector<double> _max_distances;
0086     std::vector<double> _alphas;
0087     std::vector<double> _nearby_hard_radii;
0088     std::vector<double> _nearby_hard_factors;
0089     bool _use_nearby_hard_iterative;
0090     bool _ghost_removal;
0091   };
0092   
0093 
0094 } // namespace contrib
0095 
0096 FASTJET_END_NAMESPACE
0097 
0098 #endif  // __FASTJET_CONTRIB_ITERATIVECONSTITUENTSUBTRACTOR_HH__