|
[Rivet-svn] r2484 - in trunk: include/Rivet include/Rivet/Projections src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Jun 11 11:20:22 BST 2010
Author: holsch Date: Fri Jun 11 11:20:25 2010 New Revision: 2484 Log: Add Trigger projection for Run2 Added: trunk/include/Rivet/Projections/TriggerCDFRun2.hh trunk/src/Projections/TriggerCDFRun2.cc Modified: trunk/include/Rivet/Makefile.am trunk/src/Projections/Makefile.am Modified: trunk/include/Rivet/Makefile.am ============================================================================== --- trunk/include/Rivet/Makefile.am Fri Jun 11 10:04:30 2010 (r2483) +++ trunk/include/Rivet/Makefile.am Fri Jun 11 11:20:25 2010 (r2484) @@ -68,6 +68,7 @@ Projections/Thrust.hh \ Projections/TotalVisibleMomentum.hh \ Projections/TriggerCDFRun0Run1.hh \ + Projections/TriggerCDFRun2.hh \ Projections/TriggerUA5.hh \ Projections/UnstableFinalState.hh \ Projections/VetoedFinalState.hh \ Added: trunk/include/Rivet/Projections/TriggerCDFRun2.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Projections/TriggerCDFRun2.hh Fri Jun 11 11:20:25 2010 (r2484) @@ -0,0 +1,59 @@ +// -*- C++ -*- +#ifndef RIVET_TriggerCDFRun2_HH +#define RIVET_TriggerCDFRun2_HH + +#include "Rivet/Projection.hh" +#include "Rivet/Event.hh" +#include "Rivet/Particle.hh" +#include "Rivet/Projections/Beam.hh" + +namespace Rivet { + + + /// @brief Access to the min bias triggers used by CDF in Run 0 and Run 1 + class TriggerCDFRun2 : public Projection { + public: + + /// Default constructor. + TriggerCDFRun2() { + setName("TriggerCDFRun2"); + + addProjection(ChargedFinalState(-4.7, 4.7), "CFS"); + } + + /// Clone on the heap. + virtual const Projection* clone() const { + return new TriggerCDFRun2(*this); + } + + + public: + + /// The trigger result + bool minBiasDecision() const { + return _decision_mb; + } + + /// Project on to the Event + void project(const Event& evt); + + + protected: + + /// Compare with other projections. + virtual int compare(const Projection& UNUSED(p)) const { + return EQUIVALENT; + } + + + private: + + /// The min bias trigger decision + bool _decision_mb; + + }; + + +} + +#endif Modified: trunk/src/Projections/Makefile.am ============================================================================== --- trunk/src/Projections/Makefile.am Fri Jun 11 10:04:30 2010 (r2483) +++ trunk/src/Projections/Makefile.am Fri Jun 11 11:20:25 2010 (r2484) @@ -30,6 +30,7 @@ Thrust.cc \ TotalVisibleMomentum.cc \ TriggerCDFRun0Run1.cc \ + TriggerCDFRun2.cc \ TriggerUA5.cc \ UnstableFinalState.cc \ VetoedFinalState.cc \ Added: trunk/src/Projections/TriggerCDFRun2.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Projections/TriggerCDFRun2.cc Fri Jun 11 11:20:25 2010 (r2484) @@ -0,0 +1,34 @@ +// -*- C++ -*- +#include "Rivet/Rivet.hh" +#include "Rivet/Tools/Logging.hh" +#include "Rivet/Projections/Beam.hh" +#include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/Projections/TriggerCDFRun2.hh" + +namespace Rivet { + + + void TriggerCDFRun2::project(const Event& evt) { + // Start with the assumption that the trigger fails + _decision_mb = false; + + // Run 2 Minimum Bias trigger requirements: + int n_trig_1 = 0; + int n_trig_2 = 0; + const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(evt, "CFS"); + foreach (const Particle& p, cfs.particles()) { + const double eta = p.momentum().pseudorapidity(); + if (inRange(eta, -4.7, -3.7)) n_trig_1++; + else if (inRange(eta, 3.7, 4.7)) n_trig_2++; + } + + // Require at least one charged particle in both -4.7 < eta < -3.7 and 3.7 < eta < 4.7 + if (n_trig_1 == 0 || n_trig_2 == 0) return; + getLog() << Log::DEBUG << "Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2 << endl; + + // Trigger success: + _decision_mb = true; + } + + +}
More information about the Rivet-svn mailing list |