Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:56:20

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     TrackletLUT alphainner_;
0062     TrackletLUT alphaouter_;
0063     TrackletLUT rSSinner_;
0064     TrackletLUT rSSouter_;
0065 
0066     TrackletLUT diskRadius_;
0067 
0068     int nrbits_;
0069     int nphiderbits_;
0070 
0071     //Number of r bits for the projection to use in LUT for disk
0072     int nrprojbits_;
0073 
0074     AllStubsMemory* allstubs_;
0075     std::vector<VMStubsMEMemory*> vmstubs_;
0076     std::vector<TrackletProjectionsMemory*> inputprojs_;
0077 
0078     int ialphafactinner_[N_DSS_MOD * 2];
0079     int ialphafactouter_[N_DSS_MOD * 2];
0080 
0081     //Memory for the full matches
0082     std::vector<FullMatchMemory*> fullmatches_;
0083 
0084     //disk projectionrinv table
0085     TrackletLUT rinvbendlut_;
0086 
0087     //LUT for bend consistency
0088     TrackletLUT luttable_;
0089 
0090     double phimin_;
0091 
0092     unsigned int nMatchEngines_;
0093     std::vector<MatchEngineUnit> matchengines_;
0094 
0095     int best_ideltaphi_barrel;
0096     int best_ideltaz_barrel;
0097     int best_ideltaphi_disk;
0098     int best_ideltar_disk;
0099     Tracklet* curr_tracklet;
0100     Tracklet* next_tracklet;
0101 
0102     CircularBuffer<ProjectionTemp> inputProjBuffer_;
0103   };
0104 
0105 };  // namespace trklet
0106 #endif