Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-05-12 09:05:03

0001 // -*- C++ -*-
0002 #ifndef RIVET_TriggerUA5_HH
0003 #define RIVET_TriggerUA5_HH
0004 
0005 #include "Rivet/Projection.hh"
0006 #include "Rivet/Event.hh"
0007 #include "Rivet/Particle.hh"
0008 #include "Rivet/Projections/Beam.hh"
0009 
0010 namespace Rivet {
0011 
0012 
0013   /// @brief Access to the min bias triggers used by UA5
0014   class TriggerUA5 : public Projection {
0015   public:
0016 
0017     /// Default constructor.
0018     TriggerUA5();
0019 
0020     /// Clone on the heap.
0021     RIVET_DEFAULT_PROJ_CLONE(TriggerUA5);
0022 
0023     /// Import to avoid warnings about overload-hiding
0024     using Projection::operator =;
0025 
0026 
0027     /// The trigger result for non-single diffractive (2 arm) trigger
0028     bool sdDecision() const {
0029       return _decision_sd;
0030     }
0031 
0032     /// The trigger result for non-single diffractive (2 arm) trigger
0033     bool nsdDecision() const {
0034       return _decision_nsd_1;
0035     }
0036 
0037     /// The trigger result for non-single diffractive (2 arm) trigger
0038     /// with special ">= 2" trigger for ppbar bg rejection
0039     bool nsd2Decision() const {
0040       return _decision_nsd_2;
0041     }
0042 
0043     /// The trigger result
0044     bool samebeams() const {
0045       return _samebeams;
0046     }
0047 
0048     /// Number of hits in <-,+> eta hodoscopes
0049     pair<unsigned int, unsigned int> numHits() {
0050       return make_pair(_n_plus, _n_minus);
0051     }
0052 
0053     /// Project on to the event
0054     void project(const Event& evt);
0055 
0056 
0057   protected:
0058 
0059     /// Compare with other projections.
0060     virtual CmpState compare(const Projection&) const {
0061       return CmpState::EQ;
0062     }
0063 
0064 
0065   protected:
0066 
0067     /// The min-bias trigger decisions
0068     bool _decision_sd, _decision_nsd_1, _decision_nsd_2;
0069 
0070     /// Is it a pp collision?
0071     bool _samebeams;
0072 
0073     /// Number of hits in hodoscopes
0074     unsigned int _n_plus, _n_minus;
0075 
0076   };
0077 
0078 
0079 }
0080 
0081 #endif