Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:34

0001 #ifndef L1Trigger_CSCTriggerPrimitives_CSCBaseboard_h
0002 #define L1Trigger_CSCTriggerPrimitives_CSCBaseboard_h
0003 
0004 #include "DataFormats/MuonDetId/interface/CSCTriggerNumbering.h"
0005 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
0009 #include "DataFormats/CSCDigi/interface/CSCConstants.h"
0010 #include "L1Trigger/CSCTriggerPrimitives/interface/CSCPatternBank.h"
0011 #include "CondFormats/CSCObjects/interface/CSCDBL1TPParameters.h"
0012 
0013 class CSCBaseboard {
0014 public:
0015   struct Parameters {
0016     Parameters(edm::ParameterSet const& conf);
0017 
0018     edm::ParameterSet const& conf() const { return *conf_; }
0019 
0020     edm::ParameterSet const& commonParams() const { return commonParams_; }
0021     edm::ParameterSet const& showerParams() const { return showerParams_; }
0022     edm::ParameterSet const& tmbParams() const { return tmbParams_; }
0023     edm::ParameterSet const& alctParams() const { return alctParams_; }
0024     edm::ParameterSet const& clctParams() const { return clctParams_; }
0025 
0026     void chooseParams(std::string_view tmb, std::string_view alct, std::string_view clct);
0027 
0028   private:
0029     edm::ParameterSet const* conf_;
0030 
0031     // Parameters common for all boards
0032     edm::ParameterSet const commonParams_;
0033 
0034     // Shower Trigger parameters:
0035     edm::ParameterSet const showerParams_;
0036 
0037     // Motherboard parameters:
0038     edm::ParameterSet tmbParams_;
0039 
0040     // ALCT Processor parameters:
0041     edm::ParameterSet alctParams_;
0042 
0043     // CLCT Processor parameters:
0044     edm::ParameterSet clctParams_;
0045 
0046     std::string tmbName_;
0047     std::string alctName_;
0048     std::string clctName_;
0049   };
0050 
0051   /** Normal constructor. */
0052   CSCBaseboard(
0053       unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, Parameters& conf);
0054 
0055   /** Constructor for use during testing. */
0056   CSCBaseboard();
0057 
0058   /** Default destructor. */
0059   virtual ~CSCBaseboard() = default;
0060 
0061   std::string getCSCName() const { return theCSCName_; }
0062 
0063   CSCDetId id() const { return cscId_; }
0064 
0065 protected:
0066   const CSCChamber* cscChamber(CSCGeometry const&) const;
0067 
0068   void checkConfigParameters(unsigned int& var,
0069                              const unsigned int var_max,
0070                              const unsigned int var_def,
0071                              const std::string& var_str);
0072 
0073   /** Chamber id (trigger-type labels). */
0074   const unsigned theEndcap;
0075   const unsigned theStation;
0076   const unsigned theSector;
0077   const unsigned theSubsector;
0078   const unsigned theTrigChamber;
0079   int theRegion;
0080   unsigned theRing;
0081   unsigned theChamber;
0082 
0083   // is this an ME11 chamber?
0084   bool isME11_;
0085   bool isME21_;
0086   bool isME31_;
0087   bool isME41_;
0088   bool isME12_;
0089   bool isME22_;
0090   bool isME32_;
0091   bool isME42_;
0092   bool isME13_;
0093 
0094   // CSCDetId for this chamber
0095   CSCDetId cscId_;
0096 
0097   /** Verbosity level: 0: no print (default).
0098    *                   1: print only ALCTs found.
0099    *                   2: info at every step of the algorithm.
0100    *                   3: add special-purpose prints. */
0101   int infoV;
0102 
0103   // chamber name, e.g. ME+1/1/9
0104   std::string theCSCName_;
0105 
0106   /** Flag for Phase2 studies. */
0107   bool runPhase2_;
0108   bool enableAlctPhase2_;
0109 
0110   /** Phase2: special configuration parameters for ME1a treatment */
0111   bool disableME1a_, gangedME1a_;
0112 
0113   /** Phase2: run the upgrade for the Phase-II ME1/1 integrated local trigger */
0114   bool runME11ILT_;
0115 
0116   /** Phase2: run the upgrade for the Phase-II ME2/1 integrated local trigger */
0117   bool runME21ILT_;
0118 
0119   /** Phase2: run the upgrade local trigger (without GEMs) */
0120   bool runME11Up_;
0121   bool runME21Up_;
0122   bool runME31Up_;
0123   bool runME41Up_;
0124 
0125   bool run3_;
0126   bool runCCLUT_;
0127   bool runCCLUT_TMB_;
0128   bool runCCLUT_OTMB_;
0129 };
0130 #endif