rivet is hosted by Hepforge, IPPP Durham
TauFinder.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Projections/TauFinder.hh"
00003 #include "Rivet/Projections/InvMassFinalState.hh"
00004 #include "Rivet/Projections/MissingMomentum.hh"
00005 #include "Rivet/Projections/MergedFinalState.hh"
00006 #include "Rivet/Projections/DressedLeptons.hh"
00007 #include "Rivet/Projections/UnstableFinalState.hh"
00008 #include "Rivet/Projections/VetoedFinalState.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// @todo Not necessary in C++11, where constructors can be chained
00014   void TauFinder::_init(const FinalState& inputfs, DecayType decaytype) {
00015     setName("TauFinder");
00016 
00017     _taus.clear();
00018 
00019     addProjection(UnstableFinalState(), "UFS");
00020 
00021     //VetoedFinalState remainingFS;
00022     //remainingFS.addVetoOnThisFinalState(*this);
00023     //addProjection(remainingFS, "RFS");
00024   }
00025 
00026 
00027   void TauFinder::project(const Event& e) {
00028     clear();
00029 
00030     const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");
00031     foreach (const Particle& p, ufs.particles()) {
00032       if (p.abspid() != PID::TAU) continue;
00033       _taus.push_back(p);
00034 
00035     }
00036   }
00037 
00038 
00039 
00040 }
00041