00001
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/TriggerCDFRun0Run1.hh"
00007
00008 namespace Rivet {
00009
00010
00011 void TriggerCDFRun0Run1::project(const Event& evt) {
00012
00013 _decision_mb = false;
00014
00015
00016 int n_trig_1 = 0;
00017 int n_trig_2 = 0;
00018
00019 int n_backward = 0;
00020 int n_forward = 0;
00021
00022 const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(evt, "CFS");
00023 foreach (const Particle& p, cfs.particles()) {
00024 const double eta = p.momentum().pseudorapidity();
00025 if (inRange(eta, -5.9, -3.2)) n_trig_1++;
00026 else if (inRange(eta, 3.2, 5.9)) n_trig_2++;
00027 if (inRange(eta, -3.0, 0.0)) n_backward++;
00028 else if (inRange(eta, 0.0, 3.0)) n_forward++;
00029 }
00030
00031
00032
00033 if (n_trig_1 == 0 || n_trig_2 == 0) return;
00034 getLog() << Log::DEBUG << "Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2 << endl;
00035 if (n_backward + n_forward < 4 || n_backward == 0 || n_forward == 0) return;
00036 getLog() << Log::DEBUG << " Num. forward: " << n_forward << ", Num. backward: " << n_backward << endl;
00037
00038
00039 _decision_mb = true;
00040 }
00041
00042
00043 }