Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGEM_ME0TriggerBuilder_h
0002 #define L1Trigger_L1TGEM_ME0TriggerBuilder_h
0003 
0004 /** \class ME0TriggerBuilder
0005  *
0006  * Builds ME0 trigger objects from ME0 pads
0007  *
0008  * \author Sven Dildick (TAMU)
0009  *
0010  */
0011 
0012 #include "DataFormats/GEMDigi/interface/ME0TriggerDigiCollection.h"
0013 #include "DataFormats/GEMDigi/interface/ME0PadDigiCollection.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "L1Trigger/L1TGEM/interface/ME0Motherboard.h"
0016 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0017 #include "Geometry/GEMGeometry/interface/ME0Geometry.h"
0018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0019 
0020 class ME0TriggerBuilder {
0021 public:
0022   /** Configure the algorithm via constructor.
0023    *  Receives ParameterSet percolated down from
0024    *  EDProducer which owns this Builder.
0025    */
0026   explicit ME0TriggerBuilder(const edm::ParameterSet&);
0027 
0028   ~ME0TriggerBuilder();
0029 
0030   /** Build Triggers from pads in each chamber and fill them into output collections. */
0031   void build(const ME0PadDigiCollection* me0Pads, ME0TriggerDigiCollection& oc_trig);
0032 
0033   /** set geometry for the matching needs */
0034   void setME0Geometry(const ME0Geometry* g) { me0_g = g; }
0035 
0036   /** Max values of trigger labels for all ME0s;
0037    *  used to construct TMB processors.
0038    */
0039   enum trig_me0s { MAX_ENDCAPS = 2, MAX_CHAMBERS = 18 };
0040 
0041 private:
0042   static const int min_endcap;
0043   static const int max_endcap;
0044   static const int min_chamber;
0045   static const int max_chamber;
0046 
0047   const ME0Geometry* me0_g;
0048 
0049   edm::ParameterSet config_;
0050 
0051   /** Pointers to TMB processors for all possible chambers. */
0052   std::unique_ptr<ME0Motherboard> tmb_[MAX_ENDCAPS][MAX_CHAMBERS];
0053 };
0054 
0055 #endif