HeavyHadrons.hh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef RIVET_HeavyHadrons_HH 00003 #define RIVET_HeavyHadrons_HH 00004 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/UnstableFinalState.hh" 00007 #include "Rivet/Particle.hh" 00008 #include "Rivet/Event.hh" 00009 00010 namespace Rivet { 00011 00012 00013 /// @brief Project out the last pre-decay b and c hadrons. 00014 /// 00015 /// This currently defines a c-hadron as one which contains a @a c quark and 00016 /// @a{not} a @a b quark. 00017 /// 00018 /// @todo This assumes that the heavy hadrons are unstable... should we also look for stable ones in case the decays are disabled? 00019 class HeavyHadrons : public FinalState { 00020 public: 00021 00022 /// @name Constructors and destructors. 00023 //@{ 00024 00025 /// Constructor with specification of the minimum and maximum pseudorapidity 00026 /// \f$ \eta \f$ and the min \f$ p_T \f$ (in GeV). 00027 HeavyHadrons(double mineta = -MAXRAPIDITY, 00028 double maxeta = MAXRAPIDITY, 00029 double minpt = 0.0*GeV) { 00030 setName("HeavyHadrons"); 00031 addProjection(UnstableFinalState(mineta, maxeta, minpt), "UFS"); 00032 } 00033 00034 /// Clone on the heap. 00035 virtual const Projection* clone() const { 00036 return new HeavyHadrons(*this); 00037 } 00038 00039 //@} 00040 00041 00042 /// @name Particle accessors 00043 //@{ 00044 00045 /// Get the pre-decay b hadrons (return by reference) 00046 const Particles& bHadrons() const { 00047 return _theBs; 00048 } 00049 00050 /// Get pre-decay b hadrons with a pTmin cut (return by value) 00051 Particles bHadrons(double pTmin) const { 00052 Particles rtn; 00053 foreach (const Particle& p, bHadrons()) rtn += p; 00054 return rtn; 00055 } 00056 00057 /// Get the pre-decay c hadrons (return by reference) 00058 const Particles& cHadrons() const { 00059 return _theCs; 00060 } 00061 00062 /// Get the pre-decay c hadrons with a pTmin cut (return by value) 00063 const Particles cHadrons(double pTmin) const { 00064 Particles rtn; 00065 foreach (const Particle& p, cHadrons()) rtn += p; 00066 return rtn; 00067 } 00068 00069 //@} 00070 00071 00072 protected: 00073 00074 /// Apply the projection to the event. 00075 virtual void project(const Event& e); 00076 00077 /// b and c hadron containers 00078 Particles _theBs, _theCs; 00079 00080 }; 00081 00082 00083 } 00084 00085 00086 #endif Generated on Thu Feb 6 2014 17:38:44 for The Rivet MC analysis system by ![]() |