|
[Rivet-svn] r2919 - in trunk: data/anainfo include/Rivet include/Rivet/Projections src/Analyses src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Feb 9 15:47:25 GMT 2011
Author: fsiegert Date: Wed Feb 9 15:47:24 2011 New Revision: 2919 Log: ZFinder improvements/rewrite, part 3/3: Use clustered lepton objects for all cuts. Allow for flexibility in what to do with the clustered photons. Add information about Z decay channel to .info files. I have validated all analyses using a jetfinder against r2917 and they are basically identical. Added: trunk/include/Rivet/Projections/LeptonClusters.hh - copied, changed from r2917, trunk/include/Rivet/Projections/ClusteredPhotons.hh trunk/src/Projections/LeptonClusters.cc - copied, changed from r2917, trunk/src/Projections/ClusteredPhotons.cc Modified: trunk/data/anainfo/D0_2007_S7075677.info trunk/data/anainfo/D0_2008_S7554427.info trunk/data/anainfo/D0_2008_S7863608.info trunk/data/anainfo/D0_2009_S8349509.info trunk/data/anainfo/D0_2010_S8821313.info trunk/include/Rivet/Makefile.am trunk/include/Rivet/Projections/ZFinder.hh trunk/src/Analyses/ALICE_2010_S8625980.cc trunk/src/Analyses/CDF_2000_S4155203.cc trunk/src/Analyses/CDF_2009_S8383952.cc trunk/src/Analyses/D0_2007_S7075677.cc trunk/src/Analyses/D0_2008_S7554427.cc trunk/src/Analyses/D0_2008_S7863608.cc trunk/src/Analyses/D0_2009_S8202443.cc trunk/src/Analyses/D0_2009_S8349509.cc trunk/src/Analyses/D0_2010_S8671338.cc trunk/src/Analyses/D0_2010_S8821313.cc trunk/src/Analyses/LHCB_2010_S8758301.cc trunk/src/Analyses/MC_HJETS.cc trunk/src/Analyses/MC_ZJETS.cc trunk/src/Analyses/MC_ZZJETS.cc trunk/src/Projections/FinalState.cc trunk/src/Projections/InvMassFinalState.cc trunk/src/Projections/Makefile.am trunk/src/Projections/ZFinder.cc Modified: trunk/data/anainfo/D0_2007_S7075677.info ============================================================================== --- trunk/data/anainfo/D0_2007_S7075677.info Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/data/anainfo/D0_2007_S7075677.info Wed Feb 9 15:47:24 2011 (r2919) @@ -20,7 +20,7 @@ Energies: [1960] PtCuts: [0] Description: - Cross sections as a function of boson rapidity in $p \bar{p}$ + Cross sections as a function of di-electron rapidity $p \bar{p}$ collisions at $\sqrt{s}$ = 1.96 TeV, based on an integrated luminosity of $0.4~\text{fb}^{-1}$. BibKey: Abazov:2007jy Modified: trunk/data/anainfo/D0_2008_S7554427.info ============================================================================== --- trunk/data/anainfo/D0_2008_S7554427.info Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/data/anainfo/D0_2008_S7554427.info Wed Feb 9 15:47:24 2011 (r2919) @@ -20,7 +20,8 @@ PtCuts: [0] Description: Cross sections as a function of pT of the vector boson inclusive and - in forward region ($|y| > 2$, $pT<30$ GeV) in $p \bar{p}$ collisions + in forward region ($|y| > 2$, $pT<30$ GeV) in the di-electron channel + in $p \bar{p}$ collisions at $\sqrt{s}$ = 1.96 TeV, based on an integrated luminosity of 0.98~fb$^{-1}$. BibKey: :2007nt BibTeX: '@Article{:2007nt, Modified: trunk/data/anainfo/D0_2008_S7863608.info ============================================================================== --- trunk/data/anainfo/D0_2008_S7863608.info Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/data/anainfo/D0_2008_S7863608.info Wed Feb 9 15:47:24 2011 (r2919) @@ -16,14 +16,15 @@ RunInfo: $p \bar{p} \to \mu^+ \mu^-$ + jets at 1960~GeV. Needs mass cut on lepton pair to avoid photon singularity, - looser than $65 < m_{ee} < 115$ GeV. + looser than $65 < m_{\mu\mu} < 115$ GeV. NumEvents: 1000000 Beams: [p-, p+] Energies: [1960] PtCuts: [0] Description: Cross sections as a function of pT and rapidity of the boson and pT - and rapidity of the leading jet in $p \bar{p}$ collisions at $\sqrt{s}$ = 1.96 + and rapidity of the leading jet in the di-muon channel in + $p \bar{p}$ collisions at $\sqrt{s}$ = 1.96 TeV, based on an integrated luminosity of 1.0 fb$^{-1}$. BibKey: Abazov:2008ez BibTeX: '@Article{Abazov:2008ez, Modified: trunk/data/anainfo/D0_2009_S8349509.info ============================================================================== --- trunk/data/anainfo/D0_2009_S8349509.info Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/data/anainfo/D0_2009_S8349509.info Wed Feb 9 15:47:24 2011 (r2919) @@ -19,7 +19,7 @@ PtCuts: [0] Description: First measurements at a hadron collider of differential cross - sections for $Z$+jet+X production in $\Delta\phi(Z, j)$, + sections for $Z (\to \mu\mu)$+jet+X production in $\Delta\phi(Z, j)$, $|\Delta y(Z, j)|$ and $|y_\mathrm{boost}(Z, j)|$. Vector boson production in association with jets is an excellent probe of QCD and constitutes the main background to many small Modified: trunk/data/anainfo/D0_2010_S8821313.info ============================================================================== --- trunk/data/anainfo/D0_2010_S8821313.info Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/data/anainfo/D0_2010_S8821313.info Wed Feb 9 15:47:24 2011 (r2919) @@ -19,7 +19,8 @@ Using 7.3 pb-1 the distribution of the variable $\phi^*$ is measured, which probes the same physical effects as the $Z/\gamma^*$ boson transverse momentum, but is less susceptible to the effects of experimental resolution - and efficiency. + and efficiency. Results are presented for both the di-electron and di-muon + channel. BibKey: Abazov:2010mk BibTeX: '@Article{Abazov:2010mk, author = "Abazov, Victor Mukhamedovich and others", Modified: trunk/include/Rivet/Makefile.am ============================================================================== --- trunk/include/Rivet/Makefile.am Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/include/Rivet/Makefile.am Wed Feb 9 15:47:24 2011 (r2919) @@ -55,6 +55,7 @@ Projections/JetAlg.hh \ Projections/JetShape.hh \ Projections/LeadingParticlesFinalState.hh \ + Projections/LeptonClusters.hh \ Projections/LossyFinalState.hh \ Projections/MergedFinalState.hh \ Projections/MissingMomentum.hh \ Copied and modified: trunk/include/Rivet/Projections/LeptonClusters.hh (from r2917, trunk/include/Rivet/Projections/ClusteredPhotons.hh) ============================================================================== --- trunk/include/Rivet/Projections/ClusteredPhotons.hh Mon Feb 7 13:40:58 2011 (r2917, copy source) +++ trunk/include/Rivet/Projections/LeptonClusters.hh Wed Feb 9 15:47:24 2011 (r2919) @@ -1,6 +1,6 @@ // -*- C++ -*- -#ifndef RIVET_ClusteredPhotons_HH -#define RIVET_ClusteredPhotons_HH +#ifndef RIVET_LeptonClusters_HH +#define RIVET_LeptonClusters_HH #include "Rivet/Tools/Logging.hh" #include "Rivet/Rivet.hh" @@ -12,19 +12,20 @@ namespace Rivet { - - /// @brief Find final state photons which in a cone around any particle in the "signal" final state - class ClusteredPhotons : public FinalState { + /// @brief Cluster photons from fs to all charged particles (typically + /// leptons) from signal and store the original charged particles and photons + /// as particles() while the newly created clustered lepton objects are + /// accessible as clusteredLeptons() + class LeptonClustersConstituents : public FinalState { public: /// @name Constructors //@{ - /// Constructor with the two final states, and the maximum separation in dR - /// for clustered photons - ClusteredPhotons(const FinalState& fs, const FinalState& signal, double dRmax) - : _dRmax(dRmax) + LeptonClustersConstituents(const FinalState& fs, const FinalState& signal, + double dRmax, bool cluster, bool track) + : _dRmax(dRmax), _cluster(cluster), _track(track) { - setName("ClusteredPhotons"); + setName("LeptonClustersConstituents"); IdentifiedFinalState photonfs(fs); photonfs.acceptId(PHOTON); addProjection(photonfs, "Photons"); @@ -34,13 +35,15 @@ /// Clone on the heap. virtual const Projection* clone() const { - return new ClusteredPhotons(*this); + return new LeptonClustersConstituents(*this); } //@} public: + const ParticleVector& clusteredLeptons() const { return _clusteredLeptons; } + protected: /// Apply the projection on the supplied event. @@ -54,7 +57,49 @@ /// maximum cone radius to find photons in double _dRmax; + /// whether to actually add the photon momenta to clusteredLeptons + bool _cluster; + /// whether to add the photons to the particles() vector + bool _track; + ParticleVector _clusteredLeptons; + + }; + + + + /// @brief Use LeptonClustersConstituents projection to cluster all photons to + /// leptons. This projection here makes the clustered objects available + /// in a FinalState manner, i.e. as particles(). The given pT and eta cuts are + /// applied to those objects. The underlying (original) leptons and photons + /// are available by means of the constituentsFinalState() method. + class LeptonClusters : public FinalState { + + public: + + LeptonClusters(const FinalState& fs, const FinalState& signal, double dRmax, + bool cluster, bool track, + const std::vector<std::pair<double, double> >& etaRanges, + double pTmin) : + FinalState(etaRanges, pTmin) + { + setName("LeptonClusters"); + LeptonClustersConstituents constituents(fs, signal, dRmax, cluster, track); + addProjection(constituents, "Constituents"); + } + virtual const Projection* clone() const { + return new LeptonClusters(*this); + } + + const FinalState& constituentsFinalState() const; + + protected: + + /// Apply the projection on the supplied event. + void project(const Event& e); + + /// Compare projections. + int compare(const Projection& p) const; }; Modified: trunk/include/Rivet/Projections/ZFinder.hh ============================================================================== --- trunk/include/Rivet/Projections/ZFinder.hh Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/include/Rivet/Projections/ZFinder.hh Wed Feb 9 15:47:24 2011 (r2919) @@ -23,36 +23,30 @@ /// @name Constructors //@{ - /// Constructor taking a FinalState and type of the leptons, mass window, - /// and maximum dR of photons around leptons to take into account for Z - /// reconstruction (both for clustering to leptons, and exclusion from jets). - ZFinder(const FinalState& fs, - PdgId pid, - double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion); - - /// Constructor taking single eta/pT bounds and type of the leptons, mass /// window, and maximum dR of photons around leptons to take into account - /// for Z reconstruction (both for clustering to leptons, and exclusion from jets). + /// for Z reconstruction. + /// It has to be specified separately whether such photons are + /// supposed to be clustered to the lepton objects and whether they should + /// be excluded from the remaining FS. ZFinder(double etaMin, double etaMax, double pTmin, PdgId pid, double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion); + double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS); /// Constructor taking multiple eta/pT bounds and type of the leptons, mass /// window, and maximum dR of photons around leptons to take into account - /// for Z reconstruction (both for clustering to leptons, and exclusion from jets). + /// for Z reconstruction. + /// It has to be specified separately whether such photons are + /// supposed to be clustered to the lepton objects and whether they should + /// be excluded from the remaining FS. ZFinder(const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double m2_min, const double m2_max, - double dRmax_clustering, - double dRmax_exclusion); + double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS); /// Clone on the heap. @@ -67,12 +61,11 @@ /// (e.g. for running a jet finder on it) const FinalState& remainingFinalState() const; - /// Access to the Z constituent leptons final state - /// (e.g. for more fine-grained cuts on the leptons) + /// Access to the Z constituent clustered leptons final state + /// (e.g. for more fine-grained cuts on the clustered leptons) const FinalState& constituentsFinalState() const; - /// Access to the photons which have been clustered to the leptons - const FinalState& clusteredPhotonsFinalState() const; + const FinalState& originalConstituentsFinalState() const; protected: @@ -88,15 +81,7 @@ void _init(const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion); - - /// Common implementation of constructor operation, taking FS. - void _init(const FinalState& fs, - PdgId pid, - double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion); + double dRmax, bool clusterPhotons, bool excludePhotonsFromJets); }; Modified: trunk/src/Analyses/ALICE_2010_S8625980.cc ============================================================================== --- trunk/src/Analyses/ALICE_2010_S8625980.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/ALICE_2010_S8625980.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -3,7 +3,6 @@ #include "Rivet/RivetAIDA.hh" #include "Rivet/Tools/Logging.hh" #include "Rivet/Projections/ChargedFinalState.hh" -/// @todo Include more projections as required, e.g. ChargedFinalState, FastJets, ZFinder... namespace Rivet { Modified: trunk/src/Analyses/CDF_2000_S4155203.cc ============================================================================== --- trunk/src/Analyses/CDF_2000_S4155203.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/CDF_2000_S4155203.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -28,7 +28,8 @@ void init() { // Set up projections - ZFinder zfinder(FinalState(), ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, 0.0); + ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + 66.0*GeV, 116.0*GeV, 0.0, false, false); addProjection(zfinder, "ZFinder"); // Book histogram Modified: trunk/src/Analyses/CDF_2009_S8383952.cc ============================================================================== --- trunk/src/Analyses/CDF_2009_S8383952.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/CDF_2009_S8383952.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -38,7 +38,7 @@ // this seems to have been corrected completely for all selection cuts, // i.e. eta cuts and pT cuts on leptons. ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, - 66.0*GeV, 116.0*GeV, 0.0, 0.0); + 66.0*GeV, 116.0*GeV, 0.0, false, false); addProjection(zfinder, "ZFinder"); Modified: trunk/src/Analyses/D0_2007_S7075677.cc ============================================================================== --- trunk/src/Analyses/D0_2007_S7075677.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2007_S7075677.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -28,14 +28,8 @@ /// Book histograms void init() { - /// @todo Ask Gavin Hesketh about his first implemention without eta cuts. - vector<pair<double, double> > etaRanges; - // Remove eta cuts for the moment, because it seems like they have been - // corrected for. - // etaRanges.push_back(make_pair(-3.2, -1.5)); - // etaRanges.push_back(make_pair(-0.9, 0.9)); - // etaRanges.push_back(make_pair(1.5, 3.2)); - ZFinder zfinder(etaRanges, 15.0*GeV, ELECTRON, 71.0*GeV, 111.0*GeV, 0.2); + ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + 71.0*GeV, 111.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); _h_yZ = bookHistogram1D(1, 1, 1); Modified: trunk/src/Analyses/D0_2008_S7554427.cc ============================================================================== --- trunk/src/Analyses/D0_2008_S7554427.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2008_S7554427.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -30,7 +30,7 @@ /// Book histograms void init() { ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, - 40.0*GeV, 200.0*GeV, 0.2, 0.2); + 40.0*GeV, 200.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); _h_ZpT = bookHistogram1D(1, 1, 1); Modified: trunk/src/Analyses/D0_2008_S7863608.cc ============================================================================== --- trunk/src/Analyses/D0_2008_S7863608.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2008_S7863608.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -30,7 +30,7 @@ /// Book histograms void init() { - ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.0, 0.2); + ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); addProjection(zfinder, "ZFinder"); FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); Modified: trunk/src/Analyses/D0_2009_S8202443.cc ============================================================================== --- trunk/src/Analyses/D0_2009_S8202443.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2009_S8202443.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -36,14 +36,15 @@ etaRanges.push_back(make_pair(-1.1, 1.1)); etaRanges.push_back(make_pair(1.5, 2.5)); ZFinder zfinder_constrained(etaRanges, 25.0*GeV, ELECTRON, - 65.0*GeV, 115.0*GeV, 0.2, 0.2); + 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zfinder_constrained, "ZFinderConstrained"); FastJets conefinder_constrained(zfinder_constrained.remainingFinalState(), FastJets::D0ILCONE, 0.5); addProjection(conefinder_constrained, "ConeFinderConstrained"); // Unconstrained leptons - ZFinder zfinder(FinalState(), ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, 0.2); + ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); addProjection(conefinder, "ConeFinder"); Modified: trunk/src/Analyses/D0_2009_S8349509.cc ============================================================================== --- trunk/src/Analyses/D0_2009_S8349509.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2009_S8349509.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -32,7 +32,7 @@ /// Book histograms void init() { - ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.0, 0.2); + ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); addProjection(zfinder, "ZFinder"); FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); Modified: trunk/src/Analyses/D0_2010_S8671338.cc ============================================================================== --- trunk/src/Analyses/D0_2010_S8671338.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2010_S8671338.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -32,7 +32,7 @@ /// Add projections and book histograms void init() { - ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.0, 0.2); + ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); addProjection(zfinder, "ZFinder"); _h_Z_pT_normalised = bookHistogram1D(1, 1, 1); Modified: trunk/src/Analyses/D0_2010_S8821313.cc ============================================================================== --- trunk/src/Analyses/D0_2010_S8821313.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/D0_2010_S8821313.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -40,10 +40,10 @@ etaRanges_ee.push_back(make_pair(-3.0, -1.5)); etaRanges_ee.push_back(make_pair(-1.1, 1.1)); etaRanges_ee.push_back(make_pair(1.5, 3.0)); - ZFinder zfinder_ee(etaRanges_ee, 20.0*GeV, ELECTRON, 70.0*GeV, 110.0*GeV, 0.2, 0.0); + ZFinder zfinder_ee(etaRanges_ee, 20.0*GeV, ELECTRON, 70.0*GeV, 110.0*GeV, 0.2, true, true); addProjection(zfinder_ee, "zfinder_ee"); - ZFinder zfinder_mm(-2.0, 2.0, 15.0*GeV, MUON, 70.0*GeV, 110.0*GeV, 0.0, 0.0); + ZFinder zfinder_mm(-2.0, 2.0, 15.0*GeV, MUON, 70.0*GeV, 110.0*GeV, 0.0, false, false); addProjection(zfinder_mm, "zfinder_mm"); /// Book histograms here Modified: trunk/src/Analyses/LHCB_2010_S8758301.cc ============================================================================== --- trunk/src/Analyses/LHCB_2010_S8758301.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/LHCB_2010_S8758301.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -4,7 +4,6 @@ #include "Rivet/Tools/Logging.hh" #include "Rivet/Projections/UnstableFinalState.hh" #include "Rivet/Tools/ParticleIdUtils.hh" -/// @todo Include more projections as required, e.g. ChargedFinalState, FastJets, ZFinder... namespace Rivet { Modified: trunk/src/Analyses/MC_HJETS.cc ============================================================================== --- trunk/src/Analyses/MC_HJETS.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/MC_HJETS.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -25,7 +25,7 @@ /// Book histograms void init() { - ZFinder hfinder(-3.5, 3.5, 25.0*GeV, TAU, 115.0*GeV, 125.0*GeV, 0.0, 0.0); + ZFinder hfinder(-3.5, 3.5, 25.0*GeV, TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false); addProjection(hfinder, "Hfinder"); FastJets jetpro(hfinder.remainingFinalState(), FastJets::KT, 0.7); addProjection(jetpro, "Jets"); Modified: trunk/src/Analyses/MC_ZJETS.cc ============================================================================== --- trunk/src/Analyses/MC_ZJETS.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/MC_ZJETS.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -25,7 +25,7 @@ /// Book histograms void init() { - ZFinder zfinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, 0.2); + ZFinder zfinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); FastJets jetpro(zfinder.remainingFinalState(), FastJets::KT, 0.7); addProjection(jetpro, "Jets"); Modified: trunk/src/Analyses/MC_ZZJETS.cc ============================================================================== --- trunk/src/Analyses/MC_ZZJETS.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Analyses/MC_ZZJETS.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -26,16 +26,14 @@ /// Book histograms void init() { - ZFinder zeefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, 0.2); + ZFinder zeefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zeefinder, "ZeeFinder"); - ZFinder zmmfinder(-3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, 0.2); + ZFinder zmmfinder(-3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zmmfinder, "ZmmFinder"); VetoedFinalState jetinput; jetinput .addVetoOnThisFinalState(zeefinder.constituentsFinalState()) - .addVetoOnThisFinalState(zeefinder.clusteredPhotonsFinalState()) - .addVetoOnThisFinalState(zmmfinder.constituentsFinalState()) - .addVetoOnThisFinalState(zmmfinder.clusteredPhotonsFinalState()); + .addVetoOnThisFinalState(zmmfinder.constituentsFinalState()); FastJets jetpro(jetinput, FastJets::KT, 0.7); addProjection(jetpro, "Jets"); @@ -170,12 +168,6 @@ foreach (const Jet& jet, jets) { HT+=jet.momentum().pT(); } - foreach (const Particle& p, zeefinder.clusteredPhotonsFinalState().particles()) { - HT+=p.momentum().pT(); - } - foreach (const Particle& p, zmmfinder.clusteredPhotonsFinalState().particles()) { - HT+=p.momentum().pT(); - } if (HT>0.0) _h_HT->fill(HT, weight); MC_JetAnalysis::analyze(e); Modified: trunk/src/Projections/FinalState.cc ============================================================================== --- trunk/src/Projections/FinalState.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Projections/FinalState.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -98,7 +98,7 @@ /// Decide if a particle is to be accepted or not. bool FinalState::accept(const Particle& p) const { // Not having s.c. == 1 should never happen! - assert(p.genParticle().status() == 1); + assert(!p.hasGenParticle() || p.genParticle().status() == 1); // Check pT cut if (_ptmin > 0.0) { Modified: trunk/src/Projections/InvMassFinalState.cc ============================================================================== --- trunk/src/Projections/InvMassFinalState.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Projections/InvMassFinalState.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -68,11 +68,11 @@ // Loop around possible particle pairs (typedef needed to keep BOOST_FOREACH happy) foreach (const PdgIdPair& ipair, _decayids) { if (ipart.pdgId() == ipair.first) { - if (accept(ipart.genParticle())) { + if (accept(ipart)) { type1 += &ipart; } } else if (ipart.pdgId() == ipair.second) { - if (accept(ipart.genParticle())) { + if (accept(ipart)) { type2 += &ipart; } } Copied and modified: trunk/src/Projections/LeptonClusters.cc (from r2917, trunk/src/Projections/ClusteredPhotons.cc) ============================================================================== --- trunk/src/Projections/ClusteredPhotons.cc Mon Feb 7 13:40:58 2011 (r2917, copy source) +++ trunk/src/Projections/LeptonClusters.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -1,49 +1,90 @@ // -*- C++ -*- -#include "Rivet/Projections/ClusteredPhotons.hh" +#include "Rivet/Projections/LeptonClusters.hh" #include "Rivet/Tools/Logging.hh" #include "Rivet/Tools/ParticleIdUtils.hh" #include "Rivet/Cmp.hh" namespace Rivet { + const FinalState& LeptonClusters::constituentsFinalState() const + { + return getProjection<FinalState>("Constituents"); + } + + + int LeptonClusters::compare(const Projection& p) const { + // Compare the two as final states (for pT and eta cuts) + const LeptonClusters& other = dynamic_cast<const LeptonClusters&>(p); + int fscmp = FinalState::compare(other); + if (fscmp != EQUIVALENT) return fscmp; + + fscmp = mkNamedPCmp(p, "Constituents"); + return fscmp; + } - int ClusteredPhotons::compare(const Projection& p) const { + + void LeptonClusters::project(const Event& e) { + _theParticles.clear(); + + const LeptonClustersConstituents& constituents = + applyProjection<LeptonClustersConstituents>(e, "Constituents"); + + foreach (const Particle& p, constituents.clusteredLeptons()) { + if (accept(p)) { + _theParticles.push_back(p); + } + } + } + + + + int LeptonClustersConstituents::compare(const Projection& p) const { const PCmp fscmp = mkNamedPCmp(p, "Photons"); if (fscmp != EQUIVALENT) return fscmp; const PCmp sigcmp = mkNamedPCmp(p, "Signal"); if (sigcmp != EQUIVALENT) return sigcmp; - const ClusteredPhotons& other = dynamic_cast<const ClusteredPhotons&>(p); - int rcmp = cmp(_dRmax, other._dRmax); - return rcmp; + const LeptonClustersConstituents& other = dynamic_cast<const LeptonClustersConstituents&>(p); + return (cmp(_dRmax, other._dRmax) || cmp(_cluster, other._cluster) || + cmp(_track, other._track)); } - void ClusteredPhotons::project(const Event& e) { + void LeptonClustersConstituents::project(const Event& e) { _theParticles.clear(); - if (!_dRmax > 0.0) return; + _clusteredLeptons.clear(); - const FinalState& photons = applyProjection<FinalState>(e, "Photons"); const FinalState& signal = applyProjection<FinalState>(e, "Signal"); + ParticleVector bareleptons=signal.particles(); + if (bareleptons.size()==0) return; + + for (size_t i=0; i<bareleptons.size(); ++i) { + _theParticles.push_back(bareleptons[i]); + _clusteredLeptons.push_back(Particle(bareleptons[i].pdgId(), bareleptons[i].momentum())); + } + const FinalState& photons = applyProjection<FinalState>(e, "Photons"); foreach (const Particle& p, photons.particles()) { - bool clustered = false; - foreach (const Particle& l, signal.particles()) { + const FourMomentum p_P = p.momentum(); + double dRmin=_dRmax; + int idx=-1; + for (size_t i=0; i<bareleptons.size(); ++i) { + FourMomentum p_l = bareleptons[i].momentum(); // Only cluster photons around *charged* signal particles - if (PID::threeCharge(l.pdgId()) == 0) continue; + if (PID::threeCharge(bareleptons[i].pdgId()) == 0) continue; // Geometrically match momentum vectors - const FourMomentum p_l = l.momentum(); - const FourMomentum p_P = p.momentum(); - if (deltaR(p_l.pseudorapidity(), p_l.azimuthalAngle(), - p_P.pseudorapidity(), p_P.azimuthalAngle()) < _dRmax) { - clustered = true; + double dR=deltaR(p_l, p_P); + if (dR < dRmin) { + dRmin=dR; + idx=i; } } - if (clustered) _theParticles.push_back(p); + if (idx>-1) { + if (_cluster) _clusteredLeptons[idx].setMomentum(_clusteredLeptons[idx].momentum()+p_P); + if (_track) _theParticles.push_back(p); + } } - getLog() << Log::DEBUG << name() << " found " << _theParticles.size() - << " matching photons." << endl; } } Modified: trunk/src/Projections/Makefile.am ============================================================================== --- trunk/src/Projections/Makefile.am Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Projections/Makefile.am Wed Feb 9 15:47:24 2011 (r2919) @@ -19,6 +19,7 @@ JetAlg.cc \ JetShape.cc \ LeadingParticlesFinalState.cc \ + LeptonClusters.cc \ MergedFinalState.cc \ MissingMomentum.cc \ Multiplicity.cc \ Modified: trunk/src/Projections/ZFinder.cc ============================================================================== --- trunk/src/Projections/ZFinder.cc Mon Feb 7 14:45:15 2011 (r2918) +++ trunk/src/Projections/ZFinder.cc Wed Feb 9 15:47:24 2011 (r2919) @@ -2,6 +2,7 @@ #include "Rivet/Projections/ZFinder.hh" #include "Rivet/Projections/InvMassFinalState.hh" #include "Rivet/Projections/ClusteredPhotons.hh" +#include "Rivet/Projections/LeptonClusters.hh" #include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Tools/ParticleIdUtils.hh" #include "Rivet/Tools/Logging.hh" @@ -10,24 +11,14 @@ namespace Rivet { - ZFinder::ZFinder(const FinalState& fs, - PdgId pid, - double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion) { - _init(fs, pid, m2_min, m2_max, dRmax_clustering, dRmax_exclusion); - } - - ZFinder::ZFinder(double etaMin, double etaMax, double pTmin, PdgId pid, double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion) { + double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS) { vector<pair<double, double> > etaRanges; etaRanges += std::make_pair(etaMin, etaMax); - _init(etaRanges, pTmin, pid, m2_min, m2_max, dRmax_clustering, dRmax_exclusion); + _init(etaRanges, pTmin, pid, m2_min, m2_max, dRmax, clusterPhotons, excludePhotonsFromRFS); } @@ -35,41 +26,30 @@ double pTmin, PdgId pid, double m2_min, const double m2_max, - double dRmax_clustering, - double dRmax_exclusion) { - _init(etaRanges, pTmin, pid, m2_min, m2_max, dRmax_clustering, dRmax_exclusion); + double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS) { + _init(etaRanges, pTmin, pid, m2_min, m2_max, dRmax, clusterPhotons, excludePhotonsFromRFS); } void ZFinder::_init(const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion) { - FinalState fs(etaRanges, pTmin); - _init(fs, pid, m2_min, m2_max, dRmax_clustering, dRmax_exclusion); - } - - - void ZFinder::_init(const FinalState& fs, - PdgId pid, - double m2_min, double m2_max, - double dRmax_clustering, - double dRmax_exclusion) + double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS) { setName("ZFinder"); - addProjection(fs, "FS"); - - InvMassFinalState imfs(fs, std::make_pair(pid, -pid), m2_min, m2_max); + FinalState fs; + IdentifiedFinalState bareleptons(fs); + bareleptons.acceptIdPair(pid); + LeptonClusters leptons(fs, bareleptons, dRmax, + clusterPhotons, excludePhotonsFromRFS, + etaRanges, pTmin); + addProjection(leptons, "LeptonClusters"); + InvMassFinalState imfs(leptons, std::make_pair(pid, -pid), m2_min, m2_max); addProjection(imfs, "IMFS"); - - ClusteredPhotons cphotons(FinalState(), imfs, dRmax_clustering); - addProjection(cphotons, "CPhotons"); VetoedFinalState remainingFS; - remainingFS.addVetoOnThisFinalState(imfs); - remainingFS.addVetoOnThisFinalState(ClusteredPhotons(FinalState(), imfs, dRmax_exclusion)); + remainingFS.addVetoOnThisFinalState(leptons.constituentsFinalState()); addProjection(remainingFS, "RFS"); } @@ -88,16 +68,16 @@ return getProjection<FinalState>("IMFS"); } - const FinalState& ZFinder::clusteredPhotonsFinalState() const + const FinalState& ZFinder::originalConstituentsFinalState() const { - return getProjection<FinalState>("CPhotons"); + const LeptonClusters& leptons=getProjection<LeptonClusters>("LeptonClusters"); + return leptons.constituentsFinalState(); } int ZFinder::compare(const Projection& p) const { + //std::cout<<"Comparing ZFinder"<<std::endl; PCmp cmp = mkNamedPCmp(p, "IMFS"); - if (cmp != EQUIVALENT) return cmp; - - cmp = mkNamedPCmp(p, "CPhotons"); + //std::cout<<"Result "<<(int)cmp<<std::endl; if (cmp != EQUIVALENT) return cmp; return EQUIVALENT; @@ -108,6 +88,7 @@ _theParticles.clear(); const FinalState& imfs=applyProjection<FinalState>(e, "IMFS"); + applyProjection<FinalState>(e, "RFS"); if (imfs.particles().size() != 2) return; FourMomentum pZ = imfs.particles()[0].momentum() + imfs.particles()[1].momentum(); const int z3charge = PID::threeCharge(imfs.particles()[0].pdgId()) + PID::threeCharge(imfs.particles()[1].pdgId()); @@ -118,20 +99,10 @@ << " " << imfs.particles()[0].momentum() << " " << imfs.particles()[0].pdgId() << endl << " + " << imfs.particles()[1].momentum() << " " << imfs.particles()[1].pdgId() << endl; - // Add in clustered photons - const FinalState& photons = applyProjection<FinalState>(e, "CPhotons"); - foreach (const Particle& photon, photons.particles()) { - msg << " + " << photon.momentum() << " " << photon.pdgId() << endl; - pZ += photon.momentum(); - } - msg << " = " << pZ; - getLog() << Log::DEBUG << msg.str() << endl; - Particle Z; Z.setMomentum(pZ); _theParticles.push_back(Z); - getLog() << Log::DEBUG << name() << " found " << _theParticles.size() - << " particles." << endl; + getLog() << Log::DEBUG << name() << " found one Z." << endl; }
More information about the Rivet-svn mailing list |