Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:49

0001 #ifndef L1Trigger_L1TGEM_ME0Motherboard_h
0002 #define L1Trigger_L1TGEM_ME0Motherboard_h
0003 
0004 /** \class ME0TriggerBuilder
0005  *
0006  * Does pattern recognition of ME0 pads to build ME0 triggers
0007  *
0008  * \author Sven Dildick (TAMU)
0009  *
0010  */
0011 
0012 #include "DataFormats/GEMDigi/interface/ME0TriggerDigi.h"
0013 #include "DataFormats/GEMDigi/interface/ME0PadDigiCollection.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 
0016 class ME0Geometry;
0017 
0018 class ME0Motherboard {
0019 public:
0020   /** Normal constructor. */
0021   ME0Motherboard(unsigned endcap, unsigned chamber, const edm::ParameterSet& conf);
0022 
0023   /** Constructor for use during testing. */
0024   ME0Motherboard();
0025 
0026   /** Default destructor. */
0027   ~ME0Motherboard();
0028 
0029   /** set geometry for the matching needs */
0030   void setME0Geometry(const ME0Geometry* g) { me0_g = g; }
0031 
0032   /** Run function for normal usage. */
0033   void run(const ME0PadDigiCollection*);
0034 
0035   /** Returns vector of Triggers in the read-out time window, if any. */
0036   std::vector<ME0TriggerDigi> readoutTriggers();
0037 
0038   /** Returns vector of all found correlated Triggers, if any. */
0039   std::vector<ME0TriggerDigi> getTriggers();
0040 
0041   /** Clears Triggers. */
0042   void clear();
0043 
0044 private:
0045   /** Verbosity level: 0: no print (default).
0046    *                   1: print Triggers found. */
0047   int infoV;
0048 
0049   /** Chamber id (trigger-type labels). */
0050   const unsigned theEndcap;
0051   const unsigned theChamber;
0052 
0053   const ME0Geometry* me0_g;
0054 
0055   /** Maximum number of time bins. */
0056   enum { MAX_TRIGGER_BINS = 1, MAX_TRIGGERS = 8 };
0057 
0058   /** Container for Triggers. */
0059   ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS];
0060 
0061   // utilities for sorting
0062   static bool sortByQuality(const ME0TriggerDigi&, const ME0TriggerDigi&);
0063   static bool sortByME0Dphi(const ME0TriggerDigi&, const ME0TriggerDigi&);
0064 };
0065 #endif