rivet is hosted by Hepforge, IPPP Durham
TriggerCDFRun0Run1.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/TriggerCDFRun0Run1.hh"
00007 
00008 namespace Rivet {
00009 
00010 
00011   void TriggerCDFRun0Run1::project(const Event& evt) {
00012     // Start with the assumption that the trigger fails
00013     _decision_mb = false;
00014 
00015     // Minimum Bias trigger requirements from the BBC counters
00016     int n_trig_1 = 0;
00017     int n_trig_2 = 0;
00018     // Event selection based on tracks in VTPC (time projection chambers)
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       if (inRange(p.eta(), -5.9, -3.2)) n_trig_1++;
00025       else if (inRange(p.eta(), 3.2, 5.9)) n_trig_2++;
00026       if (inRange(p.eta(), -3.0, 0.0)) n_backward++;
00027       else if (inRange(p.eta(), 0.0, 3.0)) n_forward++;
00028     }
00029 
00030     // Require at least 4 tracks with at least one in each of the forward
00031     // and backward hemispheres:
00032     if (n_trig_1 == 0 || n_trig_2 == 0) return;
00033     MSG_DEBUG("Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2);
00034     if (n_backward + n_forward < 4 || n_backward == 0 || n_forward == 0) return;
00035     MSG_DEBUG(" Num. forward: " << n_forward  << ", Num. backward: " << n_backward);
00036 
00037     // Trigger success:
00038     _decision_mb = true;
00039   }
00040 
00041 
00042 }