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