Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-07 22:33:27

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_MatchProcessor_h
0002 #define L1Trigger_TrackFindingTracklet_interface_MatchProcessor_h
0003 
0004 #include "L1Trigger/TrackFindingTracklet/interface/ProcessBase.h"
0005 #include "L1Trigger/TrackFindingTracklet/interface/MatchEngineUnit.h"
0006 #include "L1Trigger/TrackFindingTracklet/interface/ProjectionTemp.h"
0007 #include "L1Trigger/TrackFindingTracklet/interface/CircularBuffer.h"
0008 #include "L1Trigger/TrackFindingTracklet/interface/FullMatchMemory.h"
0009 #include "L1Trigger/TrackFindingTracklet/interface/TrackletProjectionsMemory.h"
0010 #include "L1Trigger/TrackFindingTracklet/interface/VMStubsMEMemory.h"
0011 #include "L1Trigger/TrackFindingTracklet/interface/AllStubsMemory.h"
0012 #include "L1Trigger/TrackFindingTracklet/interface/TrackletLUT.h"
0013 
0014 #include <vector>
0015 
0016 namespace trklet {
0017 
0018   class Settings;
0019   class Globals;
0020   class MemoryBase;
0021   class Stub;
0022   class L1TStub;
0023   class Tracklet;
0024 
0025   class MatchProcessor : public ProcessBase {
0026   public:
0027     MatchProcessor(std::string name, Settings const& settings, Globals* global);
0028 
0029     ~MatchProcessor() override = default;
0030 
0031     void addOutput(MemoryBase* memory, std::string output) override;
0032     void addInput(MemoryBase* memory, std::string input) override;
0033 
0034     void execute(unsigned int iSector, double phimin);
0035 
0036     bool matchCalculator(Tracklet* tracklet, const Stub* fpgastub, bool print, unsigned int istep);
0037 
0038   private:
0039     unsigned int layerdisk_;
0040     bool barrel_;
0041 
0042     unsigned int phiregion_;
0043 
0044     int nvm_;      //VMs in sector
0045     int nvmbits_;  //# of bits for VMs in sector
0046     int nvmbins_;  //VMs in in phi region
0047     int nrinv_;    //# of bits for rinv
0048 
0049     int dzshift_;
0050     int icorrshift_;
0051     int icorzshift_;
0052     int phishift_;
0053 
0054     TrackletLUT phimatchcuttable_;
0055     TrackletLUT zmatchcuttable_;
0056 
0057     TrackletLUT rphicutPStable_;
0058     TrackletLUT rphicut2Stable_;
0059     TrackletLUT rcutPStable_;
0060     TrackletLUT rcut2Stable_;
0061 
0062     int nrbits_;
0063     int nphiderbits_;
0064 
0065     AllStubsMemory* allstubs_;
0066     std::vector<VMStubsMEMemory*> vmstubs_;
0067     std::vector<TrackletProjectionsMemory*> inputprojs_;
0068 
0069     int ialphafactinner_[N_DSS_MOD * 2];
0070     int ialphafactouter_[N_DSS_MOD * 2];
0071 
0072     //Memory for the full matches
0073     std::vector<FullMatchMemory*> fullmatches_;
0074 
0075     //disk projectionrinv table
0076     TrackletLUT rinvbendlut_;
0077 
0078     //LUT for bend consistency
0079     TrackletLUT luttable_;
0080 
0081     double phimin_;
0082 
0083     unsigned int nMatchEngines_;
0084     std::vector<MatchEngineUnit> matchengines_;
0085 
0086     CircularBuffer<ProjectionTemp> inputProjBuffer_;
0087   };
0088 
0089 };  // namespace trklet
0090 #endif