TriggerUA5.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/TriggerUA5.hh" 00007 00008 namespace Rivet { 00009 00010 00011 TriggerUA5::TriggerUA5() { 00012 setName("TriggerUA5"); 00013 00014 addProjection(Beam(), "Beam"); 00015 addProjection(ChargedFinalState(-5.6, 5.6), "CFS"); 00016 } 00017 00018 00019 void TriggerUA5::project(const Event& evt) { 00020 _n_plus = 0; 00021 _n_minus = 0; 00022 00023 // Start with the assumption that the trigger fails 00024 _decision_sd = false; 00025 _decision_nsd_1 = false; 00026 _decision_nsd_2 = false; 00027 00028 // Triggers can be different for pp and ppbar running 00029 const Beam& b = applyProjection<Beam>(evt, "Beam"); 00030 _samebeams = (b.beams().first.pdgId() == b.beams().second.pdgId()); 00031 00032 // Count hodoscope hits 00033 const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(evt, "CFS"); 00034 foreach (const Particle& p, cfs.particles()) { 00035 if (inRange(p.eta(), -5.6, -2.0)) _n_minus++; 00036 else if (inRange(p.eta(), 2.0, 5.6)) _n_plus++; 00037 } 00038 MSG_DEBUG("Trigger -: " << _n_minus << ", Trigger +: " << _n_plus); 00039 00040 // Common SD/NSD trigger requirement: must activate at least one hodoscope 00041 if (_n_minus == 0 && _n_plus == 0) return; 00042 _decision_sd = true; 00043 00044 // Extra NSD trigger requirements 00045 if (_n_minus == 0 || _n_plus == 0) return; 00046 _decision_nsd_1 = true; 00047 if (_n_minus < 2 || _n_plus < 2) return; 00048 _decision_nsd_2 = true; 00049 } 00050 00051 00052 } Generated on Thu Feb 6 2014 17:38:46 for The Rivet MC analysis system by ![]() |