rivet is hosted by Hepforge, IPPP Durham
TriggerCDFRun2.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Rivet.hh"
00003 #include "Rivet/Tools/Logging.hh"
00004 #include "Rivet/Projections/Beam.hh"
00005 #include "Rivet/Projections/ChargedFinalState.hh"
00006 #include "Rivet/Projections/TriggerCDFRun2.hh"
00007 
00008 namespace Rivet {
00009 
00010 
00011   void TriggerCDFRun2::project(const Event& evt) {
00012     // Start with the assumption that the trigger fails
00013     _decision_mb = false;
00014 
00015     // Run 2 Minimum Bias trigger requirements:
00016     int n_trig_1 = 0;
00017     int n_trig_2 = 0;
00018     const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(evt, "CFS");
00019     foreach (const Particle& p, cfs.particles()) {
00020       if (inRange(p.eta(), -4.7, -3.7)) n_trig_1 += 1;
00021       else if (inRange(p.eta(), 3.7, 4.7)) n_trig_2 += 1;
00022     }
00023 
00024     // Require at least one charged particle in both -4.7 < eta < -3.7 and 3.7 < eta < 4.7
00025     if (n_trig_1 == 0 || n_trig_2 == 0) return;
00026     MSG_DEBUG("Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2);
00027 
00028     // Trigger success:
00029     _decision_mb = true;
00030   }
00031 
00032 
00033 }