|
[Rivet-svn] r3383 - in trunk: include/Rivet/Projections src/Analyses src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Sep 22 13:53:45 BST 2011
Author: dgrell Date: Thu Sep 22 13:53:44 2011 New Revision: 3383 Log: VisibleFS: removed explicit exclusion list, replaced with physical criteria Modified: trunk/include/Rivet/Projections/VisibleFinalState.hh trunk/src/Analyses/ATLAS_2010_S8919674.cc trunk/src/Analyses/ATLAS_2011_CONF_2011_090.cc trunk/src/Analyses/ATLAS_2011_S8983313.cc trunk/src/Analyses/ATLAS_2011_S9019561.cc trunk/src/Analyses/ATLAS_2011_S9041966.cc trunk/src/Analyses/MC_PHOTONJETS.cc trunk/src/Projections/VisibleFinalState.cc Modified: trunk/include/Rivet/Projections/VisibleFinalState.hh ============================================================================== --- trunk/include/Rivet/Projections/VisibleFinalState.hh Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/include/Rivet/Projections/VisibleFinalState.hh Thu Sep 22 13:53:44 2011 (r3383) @@ -8,7 +8,6 @@ #include "Rivet/Event.hh" #include "Rivet/Projection.hh" #include "Rivet/Projections/FinalState.hh" -#include "Rivet/Projections/VetoedFinalState.hh" namespace Rivet { @@ -20,16 +19,21 @@ /// @name Constructors //@{ - /// Default constructor. - VisibleFinalState(); - /// Constructor with min and max pseudorapidity \f$ \eta \f$ and min \f$ p_T \f$ (in GeV). VisibleFinalState(double mineta = -MAXRAPIDITY, double maxeta = MAXRAPIDITY, - double minpt = 0.0*GeV); + double minpt = 0.0*GeV) + { + setName("VisibleFinalState"); + addProjection(FinalState(mineta, maxeta, minpt), "FS"); + } /// Constructor with specific FinalState. - VisibleFinalState(const FinalState& fsp); + VisibleFinalState(const FinalState& fsp) + { + setName("VisibleFinalState"); + addProjection(fsp, "FS"); + } /// Clone on the heap. virtual const Projection* clone() const { Modified: trunk/src/Analyses/ATLAS_2010_S8919674.cc ============================================================================== --- trunk/src/Analyses/ATLAS_2010_S8919674.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Analyses/ATLAS_2010_S8919674.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -3,6 +3,7 @@ #include "Rivet/RivetAIDA.hh" #include "Rivet/Tools/Logging.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" +#include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/MissingMomentum.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/ClusteredPhotons.hh" Modified: trunk/src/Analyses/ATLAS_2011_CONF_2011_090.cc ============================================================================== --- trunk/src/Analyses/ATLAS_2011_CONF_2011_090.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Analyses/ATLAS_2011_CONF_2011_090.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -7,6 +7,7 @@ #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Projections/VisibleFinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" +#include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/FastJets.hh" namespace Rivet { Modified: trunk/src/Analyses/ATLAS_2011_S8983313.cc ============================================================================== --- trunk/src/Analyses/ATLAS_2011_S8983313.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Analyses/ATLAS_2011_S8983313.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -6,6 +6,7 @@ #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Projections/VisibleFinalState.hh" +#include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Tools/RivetMT2.hh" Modified: trunk/src/Analyses/ATLAS_2011_S9019561.cc ============================================================================== --- trunk/src/Analyses/ATLAS_2011_S9019561.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Analyses/ATLAS_2011_S9019561.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -8,6 +8,7 @@ #include "Rivet/Projections/VisibleFinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" #include "Rivet/Projections/FastJets.hh" +#include "Rivet/Projections/VetoedFinalState.hh" namespace Rivet { Modified: trunk/src/Analyses/ATLAS_2011_S9041966.cc ============================================================================== --- trunk/src/Analyses/ATLAS_2011_S9041966.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Analyses/ATLAS_2011_S9041966.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -7,6 +7,7 @@ #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Projections/VisibleFinalState.hh" #include "Rivet/Projections/IdentifiedFinalState.hh" +#include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/FastJets.hh" namespace Rivet { Modified: trunk/src/Analyses/MC_PHOTONJETS.cc ============================================================================== --- trunk/src/Analyses/MC_PHOTONJETS.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Analyses/MC_PHOTONJETS.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -1,6 +1,7 @@ // -*- C++ -*- #include "Rivet/Analyses/MC_JetAnalysis.hh" #include "Rivet/Projections/LeadingParticlesFinalState.hh" +#include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Tools/Logging.hh" #include "Rivet/RivetAIDA.hh" Modified: trunk/src/Projections/VisibleFinalState.cc ============================================================================== --- trunk/src/Projections/VisibleFinalState.cc Thu Sep 22 13:53:43 2011 (r3382) +++ trunk/src/Projections/VisibleFinalState.cc Thu Sep 22 13:53:44 2011 (r3383) @@ -1,56 +1,45 @@ // -*- C++ -*- #include "Rivet/Rivet.hh" +#include "Rivet/Tools/ParticleIdUtils.hh" #include "Rivet/Projections/VisibleFinalState.hh" #include "Rivet/Cmp.hh" -#include "Rivet/Tools/Utils.hh" #include <algorithm> namespace Rivet { - namespace { - void _setup_vfs(VetoedFinalState& vfs) { - vfs.vetoNeutrinos(); - vfs.addVetoId(1000022); // lightest neutralino - vfs.addVetoId(1000039); // gravitino - /// @todo More? - } + int VisibleFinalState::compare(const Projection& p) const { + return FinalState::compare(p); } - VisibleFinalState::VisibleFinalState() { - setName("VisibleFinalState"); - VetoedFinalState vfs; - _setup_vfs(vfs); - addProjection(vfs, "VetoedFS"); - } + // Since we remove inivisibles from the FinalState in project(), + // we need a filter where invisible --> true + bool isInvisibleFilter(const Particle& p) { + // charged particles are visible + if ( PID::threeCharge( p.pdgId() ) != 0 ) + return false; + // neutral hadrons are visible + if ( PID::isHadron( p.pdgId() ) ) + return false; - VisibleFinalState::VisibleFinalState(double mineta, double maxeta, double minpt) { - setName("VisibleFinalState"); - VetoedFinalState vfs(FinalState(mineta, maxeta, minpt)); - _setup_vfs(vfs); - addProjection(vfs, "VetoedFS"); - } + // photons are visible + if ( p.pdgId() == PHOTON ) + return false; - - VisibleFinalState::VisibleFinalState(const FinalState& fsp) { - setName("VisibleFinalState"); - VetoedFinalState vfs(fsp); - _setup_vfs(vfs); - addProjection(vfs, "VetoedFS"); - } - - - int VisibleFinalState::compare(const Projection& p) const { - return mkNamedPCmp(p, "VetoedFS"); + // everything else is invisible + return true; } void VisibleFinalState::project(const Event& e) { - const FinalState& vfs = applyProjection<FinalState>(e, "VetoedFS"); - _theParticles = vfs.particles(); + const FinalState& fs = applyProjection<FinalState>(e, "FS"); + _theParticles.clear(); + std::remove_copy_if(fs.particles().begin(), fs.particles().end(), + std::back_inserter(_theParticles), isInvisibleFilter); + MSG_DEBUG("Number of visible final-state particles = " + << _theParticles.size()); } - }
More information about the Rivet-svn mailing list |