Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-05-12 09:05:02

0001 // -*- C++ -*-
0002 #ifndef RIVET_HeavyHadrons_HH
0003 #define RIVET_HeavyHadrons_HH
0004 
0005 #include "Rivet/Projections/FinalState.hh"
0006 #include "Rivet/Projections/UnstableParticles.hh"
0007 #include "Rivet/Particle.hh"
0008 #include "Rivet/Event.hh"
0009 
0010 namespace Rivet {
0011 
0012 
0013   /// @brief Project out the last pre-decay b and c hadrons.
0014   ///
0015   /// This currently defines a c-hadron as one which contains a @a c quark and
0016   /// @b not a @a b quark.
0017   ///
0018   /// @todo This assumes that the heavy hadrons are unstable... should we also look for stable ones in case the decays are disabled?
0019   class HeavyHadrons : public FinalState {
0020   public:
0021 
0022     /// @name Constructors and destructors.
0023     /// @{
0024 
0025     /// Constructor with specification of the minimum and maximum pseudorapidity
0026     /// \f$ \eta \f$ and the min \f$ p_T \f$ (in GeV).
0027     HeavyHadrons(const Cut& c=Cuts::open()) {
0028       setName("HeavyHadrons");
0029       declare(UnstableParticles(c), "UFS");
0030     }
0031 
0032     /// Clone on the heap.
0033     RIVET_DEFAULT_PROJ_CLONE(HeavyHadrons);
0034 
0035     /// @}
0036 
0037     /// Import to avoid warnings about overload-hiding
0038     using Projection::operator =;
0039 
0040 
0041     /// @name b hadron accessors
0042     /// @{
0043 
0044     /// Get all weakly decaying b hadrons (return by reference)
0045     const Particles& bHadrons() const {
0046       return _theBs;
0047     }
0048 
0049     /// Get weakly decaying b hadrons with a Cut applied (return by value)
0050     Particles bHadrons(const Cut& c) const {
0051       return select(bHadrons(), c);
0052     }
0053 
0054     /// Get weakly decaying b hadrons with a general filter function applied (return by value)
0055     Particles bHadrons(const ParticleSelector& s) const {
0056       return select(bHadrons(), s);
0057     }
0058 
0059     /// @}
0060 
0061 
0062 
0063     /// @name b hadron accessors
0064     /// @{
0065 
0066     /// Get all weakly decaying c hadrons (return by reference)
0067     const Particles& cHadrons() const {
0068       return _theCs;
0069     }
0070 
0071     /// Get weakly decaying c hadrons with a Cut applied (return by value)
0072     Particles cHadrons(const Cut& c) const {
0073       return select(cHadrons(), c);
0074     }
0075 
0076     /// Get weakly decaying c hadrons with a general filter function applied (return by value)
0077     Particles cHadrons(const ParticleSelector& s) const {
0078       return select(cHadrons(), s);
0079     }
0080 
0081     /// @}
0082 
0083 
0084   protected:
0085 
0086     /// Apply the projection to the event.
0087     virtual void project(const Event& e);
0088 
0089     /// Compare projections (only difference is in UFS definition)
0090     virtual CmpState compare(const Projection& p) const {
0091       return mkNamedPCmp(p, "UFS");
0092     }
0093 
0094     /// b and c hadron containers
0095     Particles _theBs, _theCs;
0096 
0097   };
0098 
0099 
0100 }
0101 
0102 
0103 #endif