TauFinder.hh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef RIVET_TauFinder_HH 00003 #define RIVET_TauFinder_HH 00004 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/UnstableFinalState.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief Convenience finder of unstable taus 00012 /// @todo Inherit directly from ParticleFinder, not FinalState 00013 class TauFinder : public FinalState { 00014 public: 00015 00016 enum DecayType { ANY=0, LEPTONIC=1, HADRONIC }; 00017 00018 /// @name Constructors 00019 //@{ 00020 00021 /// @todo Why accept a FinalState? Find taus which decay to particles in this FS? Document the logic. 00022 TauFinder(const FinalState& inputfs, DecayType decaytype=ANY) { 00023 _init(inputfs, decaytype); 00024 } 00025 00026 TauFinder(DecayType decaytype=ANY) { 00027 _init(UnstableFinalState(), decaytype); 00028 } 00029 00030 00031 /// Clone on the heap. 00032 virtual const Projection* clone() const { 00033 return new TauFinder(*this); 00034 } 00035 00036 //@} 00037 00038 00039 /// Access to the found bosons 00040 /// 00041 /// @note Currently either 0 or 1 boson can be found. 00042 const Particles& taus() const { return _taus; } 00043 00044 00045 protected: 00046 00047 /// Apply the projection on the supplied event. 00048 void project(const Event& e); 00049 00050 /// Compare projections. 00051 //int compare(const Projection& p) const; 00052 00053 00054 public: 00055 00056 /// Clear the projection 00057 void clear() { 00058 _theParticles.clear(); 00059 _taus.clear(); 00060 } 00061 00062 00063 00064 private: 00065 00066 /// Common implementation of constructor operation, taking FS params. 00067 void _init(const FinalState& inputfs, DecayType decaytype); 00068 00069 /// List of found taus 00070 /// @todo Fill _theParticles instead, when inheriting from ParticleFinder? 00071 Particles _taus; 00072 00073 }; 00074 00075 00076 } 00077 00078 00079 #endif Generated on Tue Sep 30 2014 19:45:47 for The Rivet MC analysis system by ![]() |