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/DressedLeptons.hh" 00007 #include "Rivet/Projections/VetoedFinalState.hh" 00008 00009 namespace Rivet { 00010 00011 00012 /// @brief Convenience finder of leptonically decaying Zs 00013 /// 00014 /// Chain together different projections as convenience for finding Z's 00015 /// from two leptons in the final state, including photon clustering. 00016 /// 00017 /// @todo Inherit directly from ParticleFinder, not FinalState 00018 /// @todo Alias then rename as Dileptons 00019 class ZFinder : public FinalState { 00020 public: 00021 00022 enum ClusterPhotons { NOCLUSTER=0, CLUSTERNODECAY=1, CLUSTERALL }; 00023 enum PhotonTracking { NOTRACK=0, TRACK=1 }; 00024 00025 /// @name Constructors 00026 //@{ 00027 00028 /// Constructor taking cuts object 00029 /// @param inputfs Input final state 00030 /// @param cuts lepton cuts 00031 /// @param pid type of the leptons 00032 /// @param minmass,maxmass mass window 00033 /// @param dRmax maximum dR of photons around leptons to take into account 00034 /// for Z reconstruction (only relevant if one of the following are true) 00035 /// @param clusterPhotons whether such photons are supposed to be 00036 /// clustered to the lepton objects and thus Z mom 00037 /// @param trackPhotons whether such photons should be added to _theParticles 00038 /// (cf. _trackPhotons) 00039 ZFinder(const FinalState& inputfs, 00040 const Cut & cuts, 00041 PdgId pid, 00042 double minmass, double maxmass, 00043 double dRmax=0.1, 00044 ClusterPhotons clusterPhotons=CLUSTERNODECAY, 00045 PhotonTracking trackPhotons=NOTRACK, 00046 double masstarget=91.2*GeV); 00047 00048 /// Clone on the heap. 00049 DEFAULT_RIVET_PROJ_CLONE(ZFinder); 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 all DressedLeptons in the fiducial region. 00080 /// 00081 /// This includes those DressedLeptons that could not 00082 /// be paired up with any other DressedLepton to form a Z candidate. 00083 const vector<DressedLepton>& allLeptons() const { return _allLeptons; } 00084 00085 /// Access to the particles other than the Z leptons and clustered photons 00086 /// 00087 /// Useful for e.g. input to a jet finder 00088 const VetoedFinalState& remainingFinalState() const; 00089 00090 00091 protected: 00092 00093 /// Apply the projection on the supplied event. 00094 void project(const Event& e); 00095 00096 /// Compare projections. 00097 int compare(const Projection& p) const; 00098 00099 00100 public: 00101 00102 /// Clear the projection 00103 void clear() { 00104 _theParticles.clear(); 00105 _bosons.clear(); 00106 _constituents.clear(); 00107 _allLeptons.clear(); 00108 } 00109 00110 00111 private: 00112 /// Mass cuts to apply to clustered leptons (cf. InvMassFinalState) 00113 double _minmass, _maxmass, _masstarget; 00114 00115 /// Switch for tracking of photons (whether to add them to _theParticles) 00116 /// This is relevant when the ZFinder::_theParticles are to be excluded 00117 /// from e.g. the input to a jet finder, to specify whether the clustered 00118 /// photons are to be excluded as well. 00119 /// (Yes, some experiments make a difference between clusterPhotons and 00120 /// trackPhotons!) 00121 PhotonTracking _trackPhotons; 00122 00123 /// Lepton flavour 00124 PdgId _pid; 00125 00126 /// list of found bosons (currently either 0 or 1) 00127 Particles _bosons; 00128 00129 /// Clustered leptons 00130 vector<Particle> _constituents; 00131 00132 ///Dressed leptons 00133 vector<DressedLepton> _allLeptons; 00134 00135 }; 00136 00137 00138 } 00139 00140 00141 00142 #endif Generated on Tue Dec 13 2016 16:32:41 for The Rivet MC analysis system by ![]() |