Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:55

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     bool first_;
0042 
0043     unsigned int phiregion_;
0044 
0045     int nvm_;      //VMs in sector
0046     int nvmbits_;  //# of bits for VMs in sector
0047     int nvmbins_;  //VMs in in phi region
0048     int nrinv_;    //# of bits for rinv
0049 
0050     int dzshift_;
0051     int icorrshift_;
0052     int icorzshift_;
0053     int phishift_;
0054 
0055     TrackletLUT phimatchcuttable_;
0056     TrackletLUT zmatchcuttable_;
0057 
0058     TrackletLUT rphicutPStable_;
0059     TrackletLUT rphicut2Stable_;
0060     TrackletLUT rcutPStable_;
0061     TrackletLUT rcut2Stable_;
0062     TrackletLUT alphainner_;
0063     TrackletLUT alphaouter_;
0064     TrackletLUT rSSinner_;
0065     TrackletLUT rSSouter_;
0066 
0067     TrackletLUT diskRadius_;
0068 
0069     int nrbits_;
0070     int nphiderbits_;
0071 
0072     //Number of r bits for the projection to use in LUT for disk
0073     int nrprojbits_;
0074 
0075     AllStubsMemory* allstubs_;
0076     std::vector<VMStubsMEMemory*> vmstubs_;
0077     std::vector<TrackletProjectionsMemory*> inputprojs_;
0078 
0079     int ialphafactinner_[N_DSS_MOD * 2];
0080     int ialphafactouter_[N_DSS_MOD * 2];
0081 
0082     //Memory for the full matches
0083     std::vector<FullMatchMemory*> fullmatches_;
0084 
0085     //disk projectionrinv table
0086     TrackletLUT rinvbendlut_;
0087 
0088     //LUT for bend consistency
0089     TrackletLUT luttable_;
0090 
0091     double phimin_;
0092 
0093     unsigned int nMatchEngines_;
0094     std::vector<MatchEngineUnit> matchengines_;
0095 
0096     int best_ideltaphi_barrel;
0097     int best_ideltaz_barrel;
0098     int best_ideltaphi_disk;
0099     int best_ideltar_disk;
0100     Tracklet* curr_tracklet;
0101     Tracklet* next_tracklet;
0102 
0103     CircularBuffer<ProjectionTemp> inputProjBuffer_;
0104   };
0105 
0106 };  // namespace trklet
0107 #endif