ZFinder.hh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef RIVET_ZFinder_HH 00003 #define RIVET_ZFinder_HH 00004 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/VetoedFinalState.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief Convenience finder of leptonically decaying Zs 00012 /// 00013 /// Chain together different projections as convenience for finding Z's 00014 /// from two leptons in the final state, including photon clustering. 00015 /// 00016 /// @todo Inherit directly from ParticleFinder, not FinalState 00017 class ZFinder : public FinalState { 00018 public: 00019 00020 enum ClusterPhotons { NOCLUSTER=0, CLUSTERNODECAY=1, CLUSTERALL }; 00021 enum PhotonTracking { NOTRACK=0, TRACK=1 }; 00022 00023 /// @name Constructors 00024 //@{ 00025 00026 /// Constructor taking cuts object 00027 /// @param inputfs Input final state 00028 /// @param cuts lepton cuts 00029 /// @param pid type of the leptons 00030 /// @param minmass,maxmass mass window 00031 /// @param dRmax maximum dR of photons around leptons to take into account 00032 /// for Z reconstruction (only relevant if one of the following are true) 00033 /// @param clusterPhotons whether such photons are supposed to be 00034 /// clustered to the lepton objects and thus Z mom 00035 /// @param trackPhotons whether such photons should be added to _theParticles 00036 /// (cf. _trackPhotons) 00037 ZFinder(const FinalState& inputfs, 00038 const Cut & cuts, 00039 PdgId pid, 00040 double minmass, double maxmass, 00041 double dRmax=0.1, 00042 ClusterPhotons clusterPhotons=CLUSTERNODECAY, 00043 PhotonTracking trackPhotons=NOTRACK, 00044 double masstarget=91.2*GeV); 00045 00046 /// Clone on the heap. 00047 virtual const Projection* clone() const { 00048 return new ZFinder(*this); 00049 } 00050 00051 //@} 00052 00053 00054 /// Access to the found bosons 00055 /// 00056 /// @note Currently either 0 or 1 boson can be found. 00057 const Particles& bosons() const { return _bosons; } 00058 00059 /// Access to the found boson (assuming it exists). 00060 const Particle boson() const { return _bosons[0]; } 00061 00062 /// Access to the Z constituent clustered leptons 00063 /// 00064 /// For example, to make more fine-grained cuts on the clustered leptons. 00065 /// The positive charge constituent is first in the list (if not empty), and 00066 /// the negative one second. 00067 const Particles& constituents() const { return _constituents; } 00068 00069 /// Access to the Z constituent clustered leptons, sorted by a comparison functor 00070 /// 00071 /// Unlike the no-arg version, this returns by value (i.e. is less efficient) 00072 template <typename CMP> 00073 Particles constituents(const CMP& cmp) const { 00074 Particles rtn = constituents(); 00075 std::sort(rtn.begin(), rtn.end(), cmp); 00076 return rtn; 00077 } 00078 00079 /// Access to the particles other than the Z leptons and clustered photons 00080 /// 00081 /// Useful for e.g. input to a jet finder 00082 const VetoedFinalState& remainingFinalState() const; 00083 00084 00085 protected: 00086 00087 /// Apply the projection on the supplied event. 00088 void project(const Event& e); 00089 00090 /// Compare projections. 00091 int compare(const Projection& p) const; 00092 00093 00094 public: 00095 00096 /// Clear the projection 00097 void clear() { 00098 _theParticles.clear(); 00099 _bosons.clear(); 00100 _constituents.clear(); 00101 } 00102 00103 00104 private: 00105 /// Mass cuts to apply to clustered leptons (cf. InvMassFinalState) 00106 double _minmass, _maxmass, _masstarget; 00107 00108 /// Switch for tracking of photons (whether to add them to _theParticles) 00109 /// This is relevant when the ZFinder::_theParticles are to be excluded 00110 /// from e.g. the input to a jet finder, to specify whether the clustered 00111 /// photons are to be excluded as well. 00112 /// (Yes, some experiments make a difference between clusterPhotons and 00113 /// trackPhotons!) 00114 PhotonTracking _trackPhotons; 00115 00116 /// Lepton flavour 00117 PdgId _pid; 00118 00119 /// list of found bosons (currently either 0 or 1) 00120 Particles _bosons; 00121 00122 /// Clustered leptons 00123 vector<Particle> _constituents; 00124 00125 }; 00126 00127 00128 } 00129 00130 00131 00132 #endif Generated on Fri Jul 24 2015 15:47:57 for The Rivet MC analysis system by ![]() |