|
[Rivet-svn] r3277 - in branches/2011-07-aida2yoda: . data/anainfo data/plotinfo include/Rivet/Math include/Rivet/Projections src/Analyses src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Aug 5 14:22:25 BST 2011
Author: hoeth Date: Fri Aug 5 14:22:24 2011 New Revision: 3277 Log: merge r3253-r3258 from trunk Modified: branches/2011-07-aida2yoda/ChangeLog branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9120807.info branches/2011-07-aida2yoda/data/plotinfo/ATLAS_2011_S9120807.plot branches/2011-07-aida2yoda/data/plotinfo/MC_TTBAR.plot branches/2011-07-aida2yoda/include/Rivet/Math/Vector4.hh branches/2011-07-aida2yoda/include/Rivet/Projections/InvMassFinalState.hh branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh branches/2011-07-aida2yoda/src/Analyses/MC_TTBAR.cc branches/2011-07-aida2yoda/src/Projections/InvMassFinalState.cc branches/2011-07-aida2yoda/src/Projections/WFinder.cc Modified: branches/2011-07-aida2yoda/ChangeLog ============================================================================== --- branches/2011-07-aida2yoda/ChangeLog Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/ChangeLog Fri Aug 5 14:22:24 2011 (r3277) @@ -1,3 +1,17 @@ +2011-07-27 David Mallows <dave.mallows at gmail.com> + + * Updated MC_TTBAR.plot to reflect updated analysis. + +2011-07-25 Andy Buckley <andy at insectnation.org> + + * Adding a useTransverseMass flag method and implementation to + InvMassFinalState, and using it in the WFinder, after feedback + from Gavin Hesketh. This was the neatest way I could do it :S Some + other tidying up happened along the way. + + * Adding transverse mass massT and massT2 methods and functions + for FourMomentum. + 2011-07-22 Frank Siegert <frank.siegert at cern.ch> * Added ATLAS_2011_S9120807 Modified: branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9120807.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9120807.info Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9120807.info Fri Aug 5 14:22:24 2011 (r3277) @@ -12,12 +12,12 @@ RunInfo: Inclusive diphoton+X events at $\sqrt{s} = 7$~TeV. NumEvents: 1000000 -Beams: [p+, p+] -Energies: [7000] +Beams: [p+, p+] +Energies: [7000] PtCuts: [16] Description: - 'A measurement of the cross section for inclusive isolated photon production at $sqrt{s} = 7$ TeV. - The measurement is done in bins of $M_\gamma\gamma$, $p_{T\gamma\gamma}, and $\Delta\phi_{\gamma\gamma}$, + 'A measurement of the cross section for inclusive isolated photon production at $sqrt{s} = 7$ TeV. + The measurement is done in bins of $M_{\gamma\gamma}$, $p_{T\gamma\gamma}$, and $\Delta\phi_{\gamma\gamma}$, for isolated photons with $|\eta|<2.37$ and $E_T^\gamma>16$~GeV. The measurement uses 37 pb$^{-1}$ of integrated luminosity collected with the ATLAS detector.' Modified: branches/2011-07-aida2yoda/data/plotinfo/ATLAS_2011_S9120807.plot ============================================================================== --- branches/2011-07-aida2yoda/data/plotinfo/ATLAS_2011_S9120807.plot Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/data/plotinfo/ATLAS_2011_S9120807.plot Fri Aug 5 14:22:24 2011 (r3277) @@ -1,17 +1,18 @@ # BEGIN PLOT /ATLAS_2011_S9120807/d01-x01-y01 -Title=Isolated diphoton cross-section vs diphoton invariant mass +Title=Invariant mass of the diphoton system XLabel=$M_{\gamma\gamma}$ [GeV] YLabel=$\mathrm{d}\sigma/\mathrm{d}M_{\gamma\gamma}$ [pb/GeV] # END PLOT # BEGIN PLOT /ATLAS_2011_S9120807/d02-x01-y01 -Title=Isolated diphoton cross-section vs diphoton transverse momentum +Title=Transverse momentum of the diphoton system XLabel=$p_{\perp\gamma\gamma}$ [GeV] YLabel=$\mathrm{d}\sigma/\mathrm{d}p_{\perp\gamma\gamma}$ [pb/GeV] # END PLOT # BEGIN PLOT /ATLAS_2011_S9120807/d03-x01-y01 -Title=Isolated diphoton cross-section vs diphoton azimuthal separation +Title=Azimuthal separation of the photons XLabel=$\Delta\phi_{\gamma\gamma}$ [rad] YLabel=$\mathrm{d}\sigma/\mathrm{d}\Delta\phi_{\gamma\gamma}$ [pb/rad] +LegendXPos=0.1 # END PLOT Modified: branches/2011-07-aida2yoda/data/plotinfo/MC_TTBAR.plot ============================================================================== --- branches/2011-07-aida2yoda/data/plotinfo/MC_TTBAR.plot Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/data/plotinfo/MC_TTBAR.plot Fri Aug 5 14:22:24 2011 (r3277) @@ -1,19 +1,78 @@ -# BEGIN PLOT /MC_TTBAR/nch-eta -Title=Pseudorapidity distribution -XLabel=$\eta$ -YLabel=$\frac{dN}{d\eta}$ -LogY=0 +# BEGIN PLOT /MC_TTBAR/jet_1_pT +Title=Transverse momentum distribution for Jet 1 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/jet_2_pT +Title=Transverse momentum distribution for Jet 2 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/jet_3_pT +Title=Transverse momentum distribution for Jet 3 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/jet_4_pT +Title=Transverse momentum distribution for Jet 4 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/jetb_1_pT +Title=Transverse momentum distribution for b-jet 1 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] # END PLOT -# BEGIN PLOT /MC_TTBAR/nch-pt -Title=Transverse momentum distribution +# BEGIN PLOT /MC_TTBAR/jetb_2_pT +Title=Transverse momentum distribution for b-jet 2 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] +# END PLOT +# +# BEGIN PLOT /MC_TTBAR/jetl_1_pT +Title=Transverse momentum distribution for light jet 1 XLabel=$p_\perp$ YLabel=$\frac{dN}{d p_\perp}$ [GeV] # END PLOT -# BEGIN PLOT /MC_TTBAR/nch-phi -Title=Azimuthal angle distribution -XLabel=$\Phi$ -YLabel=$\frac{dN}{d \Phi}$ -LogY=0 +# BEGIN PLOT /MC_TTBAR/jetl_2_pT +Title=Transverse momentum distribution for light jet 2 +XLabel=$p_\perp$ +YLabel=$\frac{dN}{d p_\perp}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/W_mass +Title=Mass distribution for W bosons +XLabel=$m_W$ +YLabel=$\frac{dN}{d m_W}$ [GeV] # END PLOT + +# BEGIN PLOT /MC_TTBAR/t_mass +Title=Mass distribution for reconstructed top quark +XLabel=$m_t$ +YLabel=$\frac{dN}{d m_t}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/t_mass_W_cut +Title=Mass distribution for reconstructed top quark after $m_W$ cut +XLabel=$m_t$ +YLabel=$\frac{dN}{d m_t}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/W_comb_mass +Title=Combinatoric W mass +XLabel=$m_W$ +YLabel=$\frac{dN}{d m_W}$ [GeV] +# END PLOT + +# BEGIN PLOT /MC_TTBAR/t_comb_mass +Title=Combinatoric t mass +XLabel=$m_t$ +YLabel=$\frac{dN}{d m_t}$ [GeV] +# END PLOT + Modified: branches/2011-07-aida2yoda/include/Rivet/Math/Vector4.hh ============================================================================== --- branches/2011-07-aida2yoda/include/Rivet/Math/Vector4.hh Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/include/Rivet/Math/Vector4.hh Fri Aug 5 14:22:24 2011 (r3277) @@ -375,12 +375,7 @@ /// Set z-component of momentum \f$ p_z \f$. FourMomentum& setPz(double pz) { setZ(pz); return *this; } - /// Get squared mass \f$ m^2 = E^2 - p^2 \f$ (the Lorentz self-invariant). - double mass2() const { - return invariant(); - } - - /// Get mass \f$ m = \sqrt{E^2 - p^2} \f$ (the Lorentz self-invariant). + /// Get the mass \f$ m = \sqrt{E^2 - p^2} \f$ (the Lorentz self-invariant). double mass() const { assert(Rivet::isZero(mass2()) || mass2() > 0); if (Rivet::isZero(mass2())) { @@ -390,32 +385,47 @@ } } - /// Calculate rapidity. + /// Calculate the transverse mass \f$ m_T = m \sin{\theta} \f$. + double massT() const { + return mass() * sin(polarAngle()); + } + + /// Get the squared mass \f$ m^2 = E^2 - p^2 \f$ (the Lorentz self-invariant). + double mass2() const { + return invariant(); + } + + /// Calculate the squared transverse mass \f$ m_T^2 = m^2 \sin^2{\theta} \f$. + double massT2() const { + return massT() * massT(); + } + + /// Calculate the rapidity. double rapidity() const { return 0.5 * std::log( (E() + pz()) / (E() - pz()) ); } - /// Calculate squared transverse momentum \f$ p_T^2 \f$. + /// Calculate the squared transverse momentum \f$ p_T^2 \f$. double pT2() const { return vector3().polarRadius2(); } - /// Calculate transverse momentum \f$ p_T \f$. + /// Calculate the transverse momentum \f$ p_T \f$. double pT() const { return sqrt(pT2()); } - /// Calculate transverse energy \f$ E_T^2 = E^2 \sin^2{\theta} \f$. + /// Calculate the transverse energy \f$ E_T^2 = E^2 \sin^2{\theta} \f$. double Et2() const { return Et() * Et(); } - /// Calculate transverse energy \f$ E_T = E \sin{\theta} \f$. + /// Calculate the transverse energy \f$ E_T = E \sin{\theta} \f$. double Et() const { return E() * sin(polarAngle()); } - /// Calculate boost vector (in units of \f$ \beta \f$). + /// Calculate the boost vector (in units of \f$ \beta \f$). Vector3 boostVector() const { // const Vector3 p3 = vector3(); // const double m2 = mass2(); @@ -526,41 +536,51 @@ - /// Get squared mass \f$ m^2 = E^2 - p^2 \f$ (the Lorentz self-invariant) of a momentum 4-vector. + /// Get the mass \f$ m = \sqrt{E^2 - p^2} \f$ (the Lorentz self-invariant) of a momentum 4-vector. + inline double mass(const FourMomentum& v) { + return v.mass(); + } + + /// Get the transverse mass \f$ m_T = m \sin{\theta} \f$ of a momentum 4-vector. + inline double massT(const FourMomentum& v) { + return v.massT(); + } + + /// Get the squared mass \f$ m^2 = E^2 - p^2 \f$ (the Lorentz self-invariant) of a momentum 4-vector. inline double mass2(const FourMomentum& v) { return v.mass2(); } - /// Get mass \f$ m = \sqrt{E^2 - p^2} \f$ (the Lorentz self-invariant) of a momentum 4-vector. - inline double mass(const FourMomentum& v) { - return v.mass(); + /// Get the squared transverse mass \f$ m_T^2 = m^2 \sin^2{\theta} \f$ of a momentum 4-vector. + inline double massT2(const FourMomentum& v) { + return v.massT2(); } - /// Calculate rapidity of a momentum 4-vector. + /// Calculate the rapidity of a momentum 4-vector. inline double rapidity(const FourMomentum& v) { return v.rapidity(); } - /// Calculate squared transverse momentum \f$ p_T^2 \f$ of a momentum 4-vector. + /// Calculate the squared transverse momentum \f$ p_T^2 \f$ of a momentum 4-vector. inline double pT2(const FourMomentum& v) { return v.pT2(); } - /// Calculate transverse momentum \f$ p_T \f$ of a momentum 4-vector. + /// Calculate the transverse momentum \f$ p_T \f$ of a momentum 4-vector. inline double pT(const FourMomentum& v) { return v.pT(); } - /// Calculate transverse energy squared, \f$ E_T^2 = E^2 \sin^2{\theta} \f$ of a momentum 4-vector. + /// Calculate the transverse energy squared, \f$ E_T^2 = E^2 \sin^2{\theta} \f$ of a momentum 4-vector. inline double Et2(const FourMomentum& v) { return v.Et2();} - /// Calculate transverse energy \f$ E_T = E \sin{\theta} \f$ of a momentum 4-vector. + /// Calculate the transverse energy \f$ E_T = E \sin{\theta} \f$ of a momentum 4-vector. inline double Et(const FourMomentum& v) { return v.Et(); } - /// Calculate velocity boost vector of a momentum 4-vector. + /// Calculate the velocity boost vector of a momentum 4-vector. inline Vector3 boostVector(const FourMomentum& v) { return v.boostVector(); } Modified: branches/2011-07-aida2yoda/include/Rivet/Projections/InvMassFinalState.hh ============================================================================== --- branches/2011-07-aida2yoda/include/Rivet/Projections/InvMassFinalState.hh Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/include/Rivet/Projections/InvMassFinalState.hh Fri Aug 5 14:22:24 2011 (r3277) @@ -11,7 +11,7 @@ class InvMassFinalState : public FinalState { public: - // Constructor for a single inv-mass pair + /// Constructor for a single inv-mass pair. InvMassFinalState(const FinalState& fsp, const std::pair<PdgId, PdgId>& idpair, // pair of decay products double minmass, // min inv mass @@ -19,6 +19,7 @@ double masstarget=-1.0); + /// Constructor for multiple inv-mass pairs. InvMassFinalState(const FinalState& fsp, const std::vector<std::pair<PdgId, PdgId> >& idpairs, // vector of pairs of decay products double minmass, // min inv mass @@ -34,10 +35,16 @@ public: - /// Constituent pairs + /// Constituent pairs. const std::vector<std::pair<Particle, Particle> >& particlePairs() const; + /// Choose whether to use the full inv mass or just the transverse mass. + void useTransverseMass(bool usetrans=true) { + _useTransverseMass = usetrans; + } + + protected: /// Apply the projection on the supplied event. @@ -49,21 +56,23 @@ private: - /// IDs of the decay products + /// IDs of the decay products. std::vector<PdgIdPair> _decayids; - /// Constituent pairs + /// Constituent pairs. std::vector<std::pair<Particle, Particle> > _particlePairs; - /// Min inv mass + /// Min inv mass. double _minmass; - /// Max inv mass + /// Max inv mass. double _maxmass; - /// Target mass if only one pair should be returned + /// Target mass if only one pair should be returned. double _masstarget; + /// Flag to decide whether to use the full inv mass or just the transverse mass. + bool _useTransverseMass; }; Modified: branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh ============================================================================== --- branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh Fri Aug 5 14:22:24 2011 (r3277) @@ -32,7 +32,7 @@ // double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS); - /// Constructor taking single eta/pT bounds and type of the charged lepton, mass + /// Constructor taking single eta/pT bounds and type of the charged lepton, transverse mass /// window, and maximum dR of photons around the charged lepton to take into account /// for W reconstruction. WFinder(double etaMin, double etaMax, @@ -43,7 +43,7 @@ double dRmax, bool clusterPhotons=true, bool excludePhotonsFromRFS=false); - /// Constructor taking multiple eta/pT bounds and type of the charged lepton, mass + /// Constructor taking multiple eta/pT bounds and type of the charged lepton, transverse mass /// window, and maximum dR of photons around the charged lepton to take into account /// for W reconstruction. WFinder(const std::vector<std::pair<double, double> >& etaRanges, @@ -85,7 +85,9 @@ public: /// Clear the projection - void clear(); + void clear() { + _theParticles.clear(); + } private: Modified: branches/2011-07-aida2yoda/src/Analyses/MC_TTBAR.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_TTBAR.cc Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/src/Analyses/MC_TTBAR.cc Fri Aug 5 14:22:24 2011 (r3277) @@ -24,10 +24,10 @@ addProjection(ChargedLeptons(FinalState(-4.2, 4.2, 30*GeV)), "LFS"); addProjection(FastJets(FinalState(-4.2, 4.2, 0*GeV), FastJets::ANTIKT, 0.4), "Jets"); - _h_jet_1_pT = bookHisto1D("jet_1_pT", 50, 0, 250); - _h_jet_2_pT = bookHisto1D("jet_2_pT", 50, 0, 250); - _h_jet_3_pT = bookHisto1D("jet_3_pT", 50, 0, 250); - _h_jet_4_pT = bookHisto1D("jet_4_pT", 50, 0, 250); + _h_jet_1_pT = bookHisto1D("jet_1_pT", 50, 0, 500); + _h_jet_2_pT = bookHisto1D("jet_2_pT", 50, 0, 400); + _h_jet_3_pT = bookHisto1D("jet_3_pT", 50, 0, 300); + _h_jet_4_pT = bookHisto1D("jet_4_pT", 50, 0, 200); _h_bjet_1_pT = bookHisto1D("jetb_1_pT", 50, 0, 250); _h_bjet_2_pT = bookHisto1D("jetb_2_pT", 50, 0, 250); Modified: branches/2011-07-aida2yoda/src/Projections/InvMassFinalState.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Projections/InvMassFinalState.cc Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/src/Projections/InvMassFinalState.cc Fri Aug 5 14:22:24 2011 (r3277) @@ -41,7 +41,9 @@ fscmp = FinalState::compare(other); if (fscmp != EQUIVALENT) return fscmp; - // Then compare the mass limits + // Compare the mass limits + int masstypecmp = cmp(_useTransverseMass, other._useTransverseMass); + if (masstypecmp != EQUIVALENT) return masstypecmp; int massllimcmp = cmp(_minmass, other._minmass); if (massllimcmp != EQUIVALENT) return massllimcmp; int masshlimcmp = cmp(_maxmass, other._maxmass); @@ -92,27 +94,32 @@ closestPair.first = 1e30; foreach (const Particle* i1, type1) { foreach (const Particle* i2, type2) { - // check this is actually a pair - // (if more than one pair in vector particles can be unrelated) - bool found = false; - foreach (const PdgIdPair& ipair, _decayids) { - if (i1->pdgId() == ipair.first && - i2->pdgId() == ipair.second) { - found=true; - break; - } - } - if(!found) continue; + // check this is actually a pair + // (if more than one pair in vector particles can be unrelated) + bool found = false; + foreach (const PdgIdPair& ipair, _decayids) { + if (i1->pdgId() == ipair.first && i2->pdgId() == ipair.second) { + found = true; + break; + } + } + if (!found) continue; FourMomentum v4 = i1->momentum() + i2->momentum(); if (v4.mass2() < 0) { - getLog() << Log::DEBUG << "Constructed negative inv mass2: skipping!" << endl; + MSG_DEBUG("Constructed negative inv mass2: skipping!"); continue; } - if (v4.mass() > _minmass && v4.mass() < _maxmass) { - getLog() << Log::DEBUG << "Selecting particles with IDs " - << i1->pdgId() << " & " << i2->pdgId() - << " and mass = " << v4.mass()/GeV << " GeV" << endl; + bool passedMassCut = false; + if (_useTransverseMass) { + passedMassCut = inRange(v4.mass(), _minmass, _maxmass); + } else { + passedMassCut = inRange(v4.massT(), _minmass, _maxmass); + } + + if (passedMassCut) { + MSG_DEBUG("Selecting particles with IDs " << i1->pdgId() << " & " << i2->pdgId() + << " and mass = " << v4.mass()/GeV << " GeV"); // Store accepted particles, avoiding duplicates if (find(tmp.begin(), tmp.end(), i1) == tmp.end()) { tmp.push_back(i1); @@ -134,7 +141,7 @@ } } } - if (_masstarget>0.0&&closestPair.first<1e30) { + if (_masstarget > 0.0 && closestPair.first < 1e30) { _theParticles.clear(); _particlePairs.clear(); _theParticles += closestPair.second.first; @@ -142,12 +149,10 @@ _particlePairs += closestPair.second; } - getLog() << Log::DEBUG << "Selected " << _theParticles.size() << " particles " - << "(" << _particlePairs.size() << " pairs)" << endl; + MSG_DEBUG("Selected " << _theParticles.size() << " particles " << "(" << _particlePairs.size() << " pairs)"); if (getLog().isActive(Log::TRACE)) { foreach (const Particle& p, _theParticles) { - getLog() << Log::TRACE << "ID: " << p.pdgId() - << ", barcode: " << p.genParticle().barcode() << endl; + MSG_TRACE("ID: " << p.pdgId() << ", barcode: " << p.genParticle().barcode()); } } } Modified: branches/2011-07-aida2yoda/src/Projections/WFinder.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Projections/WFinder.cc Wed Aug 3 15:16:21 2011 (r3276) +++ branches/2011-07-aida2yoda/src/Projections/WFinder.cc Fri Aug 5 14:22:24 2011 (r3277) @@ -41,13 +41,10 @@ PdgId pid, double m2_min, double m2_max, double missingET, - double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS) + double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS) { setName("WFinder"); - - - // Check that the arguments are legal assert(abs(pid) == ELECTRON || abs(pid) == MUON); PdgId nu_pid = abs(pid) + 1; @@ -57,7 +54,7 @@ IdentifiedFinalState fs_nu; fs_nu.acceptNeutrinos(); - // lepton clusters + // Lepton clusters FinalState fs; IdentifiedFinalState bareleptons(fs); bareleptons.acceptIdPair(pid); @@ -66,7 +63,6 @@ etaRanges, pTmin); addProjection(leptons, "LeptonClusters"); - // Make a merged final state projection for charged and neutral leptons MergedFinalState mergedFS(leptons, fs_nu); @@ -75,6 +71,7 @@ l_nu_ids += make_pair(abs(pid), -abs(nu_pid)); l_nu_ids += make_pair(-abs(pid), abs(nu_pid)); InvMassFinalState imfs(mergedFS, l_nu_ids, m2_min, m2_max, 80.403); + imfs.useTransverseMass(); addProjection(imfs, "IMFS"); // Add MissingMomentum proj to calc MET @@ -95,12 +92,15 @@ const FinalState& WFinder::remainingFinalState() const { + /// @todo This must already have been applied to be useful return getProjection<FinalState>("RFS"); } Particle WFinder::constituentLepton() const { + /// @todo Is this safe? This isn't applying the rest of the selection cuts const InvMassFinalState& imfs = getProjection<InvMassFinalState>("IMFS"); + /// @todo Is this really meant to be _impossible_? assert(imfs.particles().size()==2); Particle p1,p2; @@ -116,7 +116,9 @@ Particle WFinder::constituentNeutrino() const { + /// @todo Is this safe? This isn't applying the rest of the selection cuts const InvMassFinalState& imfs = getProjection<InvMassFinalState>("IMFS"); + /// @todo Is this really meant to be _impossible_? assert(imfs.particles().size()==2); Particle p1,p2; @@ -131,23 +133,14 @@ } - const FinalState& WFinder::originalLeptonFinalState() const - { + const FinalState& WFinder::originalLeptonFinalState() const { const LeptonClusters& leptons=getProjection<LeptonClusters>("LeptonClusters"); return leptons.constituentsFinalState(); } int WFinder::compare(const Projection& p) const { - PCmp cmp = mkNamedPCmp(p, "IMFS"); - if (cmp != EQUIVALENT) return cmp; - - return EQUIVALENT; - } - - - void WFinder::clear() { - _theParticles.clear(); + return mkNamedPCmp(p, "IMFS"); } @@ -155,9 +148,11 @@ clear(); const InvMassFinalState& imfs = applyProjection<InvMassFinalState>(e, "IMFS"); - applyProjection<FinalState>(e, "RFS"); if (imfs.particles().size() != 2) return; + /// Apply the RFS here so that it can be acquired later via the remainingFinalState method + applyProjection<FinalState>(e, "RFS"); + Particle p1,p2; p1 = imfs.particles()[0]; p2 = imfs.particles()[1];
More information about the Rivet-svn mailing list |