Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:12:51

0001 /*
0002  * ProcConfigurationBase.h
0003  *
0004  *  Created on: Jan 30, 2019
0005  *      Author: Karol Bunkowski kbunkow@cern.ch
0006  */
0007 
0008 #ifndef L1T_OmtfP1_PROCCONFIGURATIONBASE_H_
0009 #define L1T_OmtfP1_PROCCONFIGURATIONBASE_H_
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 
0012 class ProcConfigurationBase {
0013 public:
0014   ProcConfigurationBase();
0015   virtual ~ProcConfigurationBase();
0016 
0017   /**configuration from the edm::ParameterSet
0018    * the parameters are set (i.e. overwritten) only if their exist in the edmParameterSet
0019    */
0020   virtual void configureFromEdmParameterSet(const edm::ParameterSet& edmParameterSet);
0021 
0022   virtual unsigned int nPhiBins() const = 0;
0023 
0024   virtual double hwPtToGev(int hwPt) const = 0;
0025 
0026   ///uGMT pt scale conversion: [0GeV, 0.5GeV) = 1 [0.5GeV, 1 Gev) = 2
0027   virtual int ptGevToHw(double ptGev) const = 0;
0028 
0029   //processor internal phi scale
0030   virtual int getProcScalePhi(double phiRad, double procPhiZeroRad = 0) const = 0;
0031 
0032   virtual int etaToHwEta(double eta) const = 0;
0033 
0034   //returns address for the  pdf LUTs
0035   virtual unsigned int ptHwToPtBin(int ptHw) const { return 0; }
0036 
0037   virtual unsigned int ptGeVToPtBin(float ptGeV) const { return 0; }
0038 
0039   //returns address for the  pdf LUTs
0040   virtual unsigned int etaHwToEtaBin(int etaHw) const { return 0; }
0041 
0042   virtual int foldPhi(int phi) const;
0043 
0044   virtual unsigned int nLayers() const = 0;
0045 
0046   virtual bool isBendingLayer(unsigned int iLayer) const = 0;
0047 
0048   virtual unsigned int getBxToProcess() const { return 1; }
0049 
0050   virtual int cscLctCentralBx() const { return cscLctCentralBx_; }
0051 
0052   virtual void setCscLctCentralBx(int lctCentralBx) { this->cscLctCentralBx_ = lctCentralBx; }
0053 
0054   virtual bool getRpcDropAllClustersIfMoreThanMax() const { return rpcDropAllClustersIfMoreThanMax; }
0055 
0056   virtual void setRpcDropAllClustersIfMoreThanMax(bool rpcDropAllClustersIfMoreThanMax = true) {
0057     this->rpcDropAllClustersIfMoreThanMax = rpcDropAllClustersIfMoreThanMax;
0058   }
0059 
0060   virtual unsigned int getRpcMaxClusterCnt() const { return rpcMaxClusterCnt; }
0061 
0062   virtual void setRpcMaxClusterCnt(unsigned int rpcMaxClusterCnt = 2) { this->rpcMaxClusterCnt = rpcMaxClusterCnt; }
0063 
0064   virtual unsigned int getRpcMaxClusterSize() const { return rpcMaxClusterSize; }
0065 
0066   virtual void setRpcMaxClusterSize(unsigned int rpcMaxClusterSize = 4) { this->rpcMaxClusterSize = rpcMaxClusterSize; }
0067 
0068   virtual int getMinDtPhiQuality() const { return minDtPhiQuality; }
0069 
0070   virtual void setMinDtPhiQuality(int minDtPhiQuality = 2) { this->minDtPhiQuality = minDtPhiQuality; }
0071 
0072   virtual int getMinDtPhiBQuality() const { return minDtPhiBQuality; }
0073 
0074   virtual void setMinDtPhiBQuality(int minDtPhiBQuality = 2) { this->minDtPhiBQuality = minDtPhiBQuality; }
0075 
0076   virtual bool getFixCscGeometryOffset() const { return fixCscGeometryOffset; }
0077 
0078   virtual bool setFixCscGeometryOffset(bool fixCscGeometryOffset) {
0079     return this->fixCscGeometryOffset = fixCscGeometryOffset;
0080   }
0081 
0082 private:
0083   int cscLctCentralBx_ = 8;  //CSCConstants::LCT_CENTRAL_BX;
0084 
0085   //parameters of the RpcClusterization
0086   unsigned int rpcMaxClusterSize = 3;
0087   unsigned int rpcMaxClusterCnt = 2;
0088 
0089   bool rpcDropAllClustersIfMoreThanMax = false;
0090   // if true no  cluster is return if there is more clusters then maxClusterCnt (counted regardless of the size)
0091 
0092   int minDtPhiQuality = 2;
0093 
0094   int minDtPhiBQuality = 2;  //used on the top of the minDtPhiQuality
0095 
0096   bool fixCscGeometryOffset = false;
0097 };
0098 
0099 #endif /* L1T_OmtfP1_PROCCONFIGURATIONBASE_H_ */