Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackletCalculatorBase_h
0002 #define L1Trigger_TrackFindingTracklet_interface_TrackletCalculatorBase_h
0003 
0004 #include "L1Trigger/TrackFindingTracklet/interface/ProcessBase.h"
0005 #include "L1Trigger/TrackFindingTracklet/interface/TrackletParametersMemory.h"
0006 #include "L1Trigger/TrackFindingTracklet/interface/TrackletProjectionsMemory.h"
0007 
0008 #include <vector>
0009 
0010 namespace trklet {
0011 
0012   class Settings;
0013   class Globals;
0014   class Stub;
0015   class L1TStub;
0016   class Tracklet;
0017 
0018   class TrackletCalculatorBase : public ProcessBase {
0019   public:
0020     TrackletCalculatorBase(std::string name, Settings const& settings, Globals* global);
0021 
0022     ~TrackletCalculatorBase() override = default;
0023 
0024     void exacttracklet(double r1,
0025                        double z1,
0026                        double phi1,
0027                        double r2,
0028                        double z2,
0029                        double phi2,
0030                        double,
0031                        double& rinv,
0032                        double& phi0,
0033                        double& t,
0034                        double& z0,
0035                        double phiproj[N_LAYER - 2],  //=4
0036                        double zproj[N_LAYER - 2],
0037                        double phider[N_LAYER - 2],
0038                        double zder[N_LAYER - 2],
0039                        double phiprojdisk[N_DISK],  //=5
0040                        double rprojdisk[N_DISK],
0041                        double phiderdisk[N_DISK],
0042                        double rderdisk[N_DISK]);
0043 
0044     void exacttrackletdisk(double r1,
0045                            double z1,
0046                            double phi1,
0047                            double r2,
0048                            double z2,
0049                            double phi2,
0050                            double,
0051                            double& rinv,
0052                            double& phi0,
0053                            double& t,
0054                            double& z0,
0055                            double phiprojLayer[N_PSLAYER],  //=3
0056                            double zprojLayer[N_PSLAYER],
0057                            double phiderLayer[N_PSLAYER],
0058                            double zderLayer[N_PSLAYER],
0059                            double phiproj[N_DISK - 2],  //=3
0060                            double rproj[N_DISK - 2],
0061                            double phider[N_DISK - 2],
0062                            double rder[N_DISK - 2]);
0063 
0064     void exacttrackletOverlap(double r1,
0065                               double z1,
0066                               double phi1,
0067                               double r2,
0068                               double z2,
0069                               double phi2,
0070                               double,
0071                               double& rinv,
0072                               double& phi0,
0073                               double& t,
0074                               double& z0,
0075                               double phiprojLayer[N_PSLAYER],  //=3
0076                               double zprojLayer[N_PSLAYER],
0077                               double phiderLayer[N_PSLAYER],
0078                               double zderLayer[N_PSLAYER],
0079                               double phiproj[N_DISK - 2],  //=3
0080                               double rproj[N_DISK - 2],
0081                               double phider[N_DISK - 2],
0082                               double rder[N_DISK - 2]);
0083 
0084     void exactproj(double rproj,
0085                    double rinv,
0086                    double phi0,
0087                    double t,
0088                    double z0,
0089                    double& phiproj,
0090                    double& zproj,
0091                    double& phider,
0092                    double& zder);
0093 
0094     void exactprojdisk(double zproj,
0095                        double rinv,
0096                        double phi0,
0097                        double t,
0098                        double z0,
0099                        double& phiproj,
0100                        double& rproj,
0101                        double& phider,
0102                        double& rder);
0103 
0104     void addDiskProj(Tracklet* tracklet, int disk);
0105     bool addLayerProj(Tracklet* tracklet, int layer);
0106 
0107     void addProjection(int layer, int iphi, TrackletProjectionsMemory* trackletprojs, Tracklet* tracklet);
0108     void addProjectionDisk(int disk, int iphi, TrackletProjectionsMemory* trackletprojs, Tracklet* tracklet);
0109 
0110     bool goodTrackPars(bool goodrinv, bool goodz0);
0111 
0112     bool inSector(int iphi0, int irinv, double phi0approx, double rinvapprox);
0113 
0114     bool barrelSeeding(const Stub* innerFPGAStub,
0115                        const L1TStub* innerStub,
0116                        const Stub* outerFPGAStub,
0117                        const L1TStub* outerStub);
0118     bool diskSeeding(const Stub* innerFPGAStub,
0119                      const L1TStub* innerStub,
0120                      const Stub* outerFPGAStub,
0121                      const L1TStub* outerStub);
0122     bool overlapSeeding(const Stub* innerFPGAStub,
0123                         const L1TStub* innerStub,
0124                         const Stub* outerFPGAStub,
0125                         const L1TStub* outerStub);
0126 
0127   protected:
0128     unsigned int iSeed_;
0129     unsigned int layerdisk1_;
0130     unsigned int layerdisk2_;
0131 
0132     int TCIndex_;
0133 
0134     unsigned int iSector_;
0135     double phimin_, phimax_;
0136 
0137     TrackletParametersMemory* trackletpars_;
0138 
0139     //First index is layer/disk second is phi region
0140     std::vector<std::vector<TrackletProjectionsMemory*> > trackletprojlayers_;
0141     std::vector<std::vector<TrackletProjectionsMemory*> > trackletprojdisks_;
0142   };
0143 
0144 };  // namespace trklet
0145 #endif