Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:42

0001 #ifndef CSCTrackFinder_CSCTFSPCoreLogic_h
0002 #define CSCTrackFinder_CSCTFSPCoreLogic_h
0003 
0004 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0005 #include <DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h>
0006 #include <DataFormats/L1CSCTrackFinder/interface/TrackStub.h>
0007 #include <DataFormats/L1CSCTrackFinder/interface/L1Track.h>
0008 
0009 // different cores
0010 #include <L1Trigger/CSCTrackFinder/src/core_2010_01_22/vpp_generated.h>
0011 #include <L1Trigger/CSCTrackFinder/src/core_2010_07_28/vpp_generated.h>
0012 #include <L1Trigger/CSCTrackFinder/src/core_2010_09_01/vpp_generated.h>
0013 #include <L1Trigger/CSCTrackFinder/src/core_2010_10_11/vpp_generated.h>
0014 #include <L1Trigger/CSCTrackFinder/src/core_2010_12_10/vpp_generated.h>
0015 #include <L1Trigger/CSCTrackFinder/src/core_2011_01_18/vpp_generated.h>
0016 #include <L1Trigger/CSCTrackFinder/src/core_2012_01_31/vpp_generated.h>
0017 #include <L1Trigger/CSCTrackFinder/src/core_2012_03_13/vpp_generated.h>
0018 #include <L1Trigger/CSCTrackFinder/src/core_2012_07_30/vpp_generated.h>
0019 #include <L1Trigger/CSCTrackFinder/src/core_2014_04_24/vpp_generated.h>
0020 #include <L1Trigger/CSCTrackFinder/src/core_2014_05_15/vpp_generated.h>
0021 
0022 class vpp_generated_2010_01_22;
0023 class vpp_generated_2010_07_28;
0024 class vpp_generated_2010_09_01;
0025 class vpp_generated_2010_10_11;
0026 class vpp_generated_2010_12_10;
0027 class vpp_generated_2011_01_18;
0028 class vpp_generated_2012_01_31;
0029 class vpp_generated_2012_03_13;
0030 class vpp_generated_2012_07_30;
0031 class vpp_generated_2014_04_24;
0032 class vpp_generated_2014_05_15;
0033 
0034 class CSCTFSPCoreLogic {
0035   /**change input and output to Signal   */
0036   struct SPio {
0037     unsigned me1aVp;
0038     unsigned me1aQp;
0039     unsigned me1aEtap;
0040     unsigned me1aPhip;
0041     unsigned me1aAmp;
0042     unsigned me1aCSCIdp;
0043     unsigned me1aCLCTp;
0044     unsigned me1bVp;
0045     unsigned me1bQp;
0046     unsigned me1bEtap;
0047     unsigned me1bPhip;
0048     unsigned me1bAmp;
0049     unsigned me1bCSCIdp;
0050     unsigned me1bCLCTp;
0051     unsigned me1cVp;
0052     unsigned me1cQp;
0053     unsigned me1cEtap;
0054     unsigned me1cPhip;
0055     unsigned me1cAmp;
0056     unsigned me1cCSCIdp;
0057     unsigned me1cCLCTp;
0058     unsigned me1dVp;
0059     unsigned me1dQp;
0060     unsigned me1dEtap;
0061     unsigned me1dPhip;
0062     unsigned me1dAmp;
0063     unsigned me1dCSCIdp;
0064     unsigned me1dCLCTp;
0065     unsigned me1eVp;
0066     unsigned me1eQp;
0067     unsigned me1eEtap;
0068     unsigned me1ePhip;
0069     unsigned me1eAmp;
0070     unsigned me1eCSCIdp;
0071     unsigned me1eCLCTp;
0072     unsigned me1fVp;
0073     unsigned me1fQp;
0074     unsigned me1fEtap;
0075     unsigned me1fPhip;
0076     unsigned me1fAmp;
0077     unsigned me1fCSCIdp;
0078     unsigned me1fCLCTp;
0079 
0080     unsigned me2aVp;
0081     unsigned me2aQp;
0082     unsigned me2aEtap;
0083     unsigned me2aPhip;
0084     unsigned me2aAmp;
0085     unsigned me2bVp;
0086     unsigned me2bQp;
0087     unsigned me2bEtap;
0088     unsigned me2bPhip;
0089     unsigned me2bAmp;
0090     unsigned me2cVp;
0091     unsigned me2cQp;
0092     unsigned me2cEtap;
0093     unsigned me2cPhip;
0094     unsigned me2cAmp;
0095 
0096     unsigned me3aVp;
0097     unsigned me3aQp;
0098     unsigned me3aEtap;
0099     unsigned me3aPhip;
0100     unsigned me3aAmp;
0101     unsigned me3bVp;
0102     unsigned me3bQp;
0103     unsigned me3bEtap;
0104     unsigned me3bPhip;
0105     unsigned me3bAmp;
0106     unsigned me3cVp;
0107     unsigned me3cQp;
0108     unsigned me3cEtap;
0109     unsigned me3cPhip;
0110     unsigned me3cAmp;
0111 
0112     unsigned me4aVp;
0113     unsigned me4aQp;
0114     unsigned me4aEtap;
0115     unsigned me4aPhip;
0116     unsigned me4aAmp;
0117     unsigned me4bVp;
0118     unsigned me4bQp;
0119     unsigned me4bEtap;
0120     unsigned me4bPhip;
0121     unsigned me4bAmp;
0122     unsigned me4cVp;
0123     unsigned me4cQp;
0124     unsigned me4cEtap;
0125     unsigned me4cPhip;
0126     unsigned me4cAmp;
0127 
0128     unsigned mb1aVp;
0129     unsigned mb1aQp;
0130     unsigned mb1aPhip;
0131     unsigned mb1aBendp;
0132     unsigned mb1bVp;
0133     unsigned mb1bQp;
0134     unsigned mb1bPhip;
0135     unsigned mb1bBendp;
0136     unsigned mb1cVp;
0137     unsigned mb1cQp;
0138     unsigned mb1cPhip;
0139     unsigned mb1cBendp;
0140     unsigned mb1dVp;
0141     unsigned mb1dQp;
0142     unsigned mb1dPhip;
0143     unsigned mb1dBendp;
0144 
0145     unsigned mb2aVp;
0146     unsigned mb2aQp;
0147     unsigned mb2aPhip;
0148     unsigned mb2bVp;
0149     unsigned mb2bQp;
0150     unsigned mb2bPhip;
0151     unsigned mb2cVp;
0152     unsigned mb2cQp;
0153     unsigned mb2cPhip;
0154     unsigned mb2dVp;
0155     unsigned mb2dQp;
0156     unsigned mb2dPhip;
0157 
0158     unsigned ptHp;
0159     unsigned signHp;
0160     unsigned modeMemHp;
0161     unsigned etaPTHp;
0162     unsigned FRHp;
0163     unsigned phiHp;
0164     unsigned phdiff_aHp;
0165     unsigned phdiff_bHp;
0166     unsigned ptMp;
0167     unsigned signMp;
0168     unsigned modeMemMp;
0169     unsigned etaPTMp;
0170     unsigned FRMp;
0171     unsigned phiMp;
0172     unsigned phdiff_aMp;
0173     unsigned phdiff_bMp;
0174     unsigned ptLp;
0175     unsigned signLp;
0176     unsigned modeMemLp;
0177     unsigned etaPTLp;
0178     unsigned FRLp;
0179     unsigned phiLp;
0180     unsigned phdiff_aLp;
0181     unsigned phdiff_bLp;
0182 
0183     unsigned me1idH;
0184     unsigned me2idH;
0185     unsigned me3idH;
0186     unsigned me4idH;
0187     unsigned mb1idH;
0188     unsigned mb2idH;
0189     unsigned me1idM;
0190     unsigned me2idM;
0191     unsigned me3idM;
0192     unsigned me4idM;
0193     unsigned mb1idM;
0194     unsigned mb2idM;
0195     unsigned me1idL;
0196     unsigned me2idL;
0197     unsigned me3idL;
0198     unsigned me4idL;
0199     unsigned mb1idL;
0200     unsigned mb2idL;
0201   };
0202 
0203 public:
0204   CSCTFSPCoreLogic() : runme(false), spFirmwareVersion(0), coreFirmwareVersion(0), verboseCore(false) {}
0205 
0206   void loadData(const CSCTriggerContainer<csctf::TrackStub>&,
0207                 const unsigned& endcap,
0208                 const unsigned& sector,
0209                 const int& minBX,
0210                 const int& maxBX,
0211                 const bool gangedME1a);
0212 
0213   bool run(const unsigned& endcap,
0214            const unsigned& sector,
0215            const unsigned& latency,
0216            const unsigned& etamin1,
0217            const unsigned& etamin2,
0218            const unsigned& etamin3,
0219            const unsigned& etamin4,
0220            const unsigned& etamin5,
0221            const unsigned& etamin6,
0222            const unsigned& etamin7,
0223            const unsigned& etamin8,
0224            const unsigned& etamax1,
0225            const unsigned& etamax2,
0226            const unsigned& etamax3,
0227            const unsigned& etamax4,
0228            const unsigned& etamax5,
0229            const unsigned& etamax6,
0230            const unsigned& etamax7,
0231            const unsigned& etamax8,
0232            const unsigned& etawin1,
0233            const unsigned& etawin2,
0234            const unsigned& etawin3,
0235            const unsigned& etawin4,
0236            const unsigned& etawin5,
0237            const unsigned& etawin6,
0238            const unsigned& etawin7,
0239            const unsigned& mindphip,
0240            const unsigned& mindetap,
0241            const unsigned& mindeta12_accp,
0242            const unsigned& maxdeta12_accp,
0243            const unsigned& maxdphi12_accp,
0244            const unsigned& mindeta13_accp,
0245            const unsigned& maxdeta13_accp,
0246            const unsigned& maxdphi13_accp,
0247            const unsigned& mindeta112_accp,
0248            const unsigned& maxdeta112_accp,
0249            const unsigned& maxdphi112_accp,
0250            const unsigned& mindeta113_accp,
0251            const unsigned& maxdeta113_accp,
0252            const unsigned& maxdphi113_accp,
0253            const unsigned& mindphip_halo,
0254            const unsigned& mindetap_halo,
0255            const unsigned& straightp,
0256            const unsigned& curvedp,
0257            const unsigned& mbaPhiOff,
0258            const unsigned& mbbPhiOff,
0259            const unsigned& m_extend_length,
0260            const unsigned& m_allowALCTonly,
0261            const unsigned& m_allowCLCTonly,
0262            const unsigned& m_preTrigger,
0263            const unsigned& m_widePhi,
0264            const int& minBX,
0265            const int& maxBX);
0266 
0267   CSCTriggerContainer<csc::L1Track> tracks();
0268 
0269   void SetSPFirmwareVersion(const unsigned int fwVer) { spFirmwareVersion = fwVer; }
0270   unsigned int GetSPFirmwareVersion() { return spFirmwareVersion; }
0271 
0272   void SetCoreFirmwareVersion(const unsigned int fwVer) { coreFirmwareVersion = fwVer; }
0273   unsigned int GetCoreFirmwareVersion() { return coreFirmwareVersion; }
0274 
0275   void SetVerbose(const bool verb) { verboseCore = verb; }
0276   bool IsVerbose() { return verboseCore; }
0277   void setNLBTables();
0278 
0279 private:
0280   static vpp_generated_2010_01_22 sp_2010_01_22_;
0281   static vpp_generated_2010_07_28 sp_2010_07_28_;
0282   static vpp_generated_2010_09_01 sp_2010_09_01_;
0283   static vpp_generated_2010_10_11 sp_2010_10_11_;
0284   static vpp_generated_2010_12_10 sp_2010_12_10_;
0285   static vpp_generated_2011_01_18 sp_2011_01_18_;
0286   static vpp_generated_2012_01_31 sp_2012_01_31_;
0287   static vpp_generated_2012_03_13 sp_2012_03_13_;
0288   static vpp_generated_2012_07_30 sp_2012_07_30_;
0289   static vpp_generated_2014_04_24 sp_2014_04_24_;
0290   static vpp_generated_2014_05_15 sp_2014_05_15_;
0291 
0292   std::vector<SPio> io_;
0293   bool runme;
0294   CSCTriggerContainer<csc::L1Track> mytracks;
0295   unsigned int spFirmwareVersion;
0296   unsigned int coreFirmwareVersion;
0297   bool verboseCore;
0298 };
0299 
0300 #endif