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 const double eta = p.momentum().pseudorapidity(); 00021 if (inRange(eta, -4.7, -3.7)) n_trig_1++; 00022 else if (inRange(eta, 3.7, 4.7)) n_trig_2++; 00023 } 00024 00025 // Require at least one charged particle in both -4.7 < eta < -3.7 and 3.7 < eta < 4.7 00026 if (n_trig_1 == 0 || n_trig_2 == 0) return; 00027 getLog() << Log::DEBUG << "Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2 << endl; 00028 00029 // Trigger success: 00030 _decision_mb = true; 00031 } 00032 00033 00034 }