Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackletCalculatorDisplaced_h
0002 #define L1Trigger_TrackFindingTracklet_interface_TrackletCalculatorDisplaced_h
0003 
0004 #include "L1Trigger/TrackFindingTracklet/interface/ProcessBase.h"
0005 #include "L1Trigger/TrackFindingTracklet/interface/TrackletProjectionsMemory.h"
0006 #include "L1Trigger/TrackFindingTracklet/interface/StubTripletsMemory.h"
0007 #include "L1Trigger/TrackFindingTracklet/interface/AllStubsMemory.h"
0008 #include "L1Trigger/TrackFindingTracklet/interface/TrackletParametersMemory.h"
0009 
0010 #include <vector>
0011 
0012 namespace trklet {
0013 
0014   class Settings;
0015   class Globals;
0016   class MemoryBase;
0017   class Stub;
0018   class L1TStub;
0019 
0020   class TrackletCalculatorDisplaced : public ProcessBase {
0021   public:
0022     TrackletCalculatorDisplaced(std::string name, Settings const& settings, Globals* global);
0023 
0024     ~TrackletCalculatorDisplaced() override = default;
0025 
0026     void addOutputProjection(TrackletProjectionsMemory*& outputProj, MemoryBase* memory);
0027 
0028     void addOutput(MemoryBase* memory, std::string output) override;
0029     void addInput(MemoryBase* memory, std::string input) override;
0030 
0031     void execute(unsigned int iSector, double phimin, double phimax);
0032 
0033     void addDiskProj(Tracklet* tracklet, int disk);
0034     bool addLayerProj(Tracklet* tracklet, int layer);
0035 
0036     void addProjection(int layer, int iphi, TrackletProjectionsMemory* trackletprojs, Tracklet* tracklet);
0037     void addProjectionDisk(int disk, int iphi, TrackletProjectionsMemory* trackletprojs, Tracklet* tracklet);
0038 
0039     bool LLLSeeding(const Stub* innerFPGAStub,
0040                     const L1TStub* innerStub,
0041                     const Stub* middleFPGAStub,
0042                     const L1TStub* middleStub,
0043                     const Stub* outerFPGAStub,
0044                     const L1TStub* outerStub);
0045     bool DDLSeeding(const Stub* innerFPGAStub,
0046                     const L1TStub* innerStub,
0047                     const Stub* middleFPGAStub,
0048                     const L1TStub* middleStub,
0049                     const Stub* outerFPGAStub,
0050                     const L1TStub* outerStub);
0051     bool LLDSeeding(const Stub* innerFPGAStub,
0052                     const L1TStub* innerStub,
0053                     const Stub* middleFPGAStub,
0054                     const L1TStub* middleStub,
0055                     const Stub* outerFPGAStub,
0056                     const L1TStub* outerStub);
0057 
0058     void exactproj(double rproj,
0059                    double rinv,
0060                    double phi0,
0061                    double d0,
0062                    double t,
0063                    double z0,
0064                    double r0,
0065                    double& phiproj,
0066                    double& zproj,
0067                    double& phider,
0068                    double& zder);
0069 
0070     void exactprojdisk(double zproj,
0071                        double rinv,
0072                        double,
0073                        double,  //phi0 and d0 are not used.
0074                        double t,
0075                        double z0,
0076                        double x0,
0077                        double y0,
0078                        double& phiproj,
0079                        double& rproj,
0080                        double& phider,
0081                        double& rder);
0082 
0083     void exacttracklet(double r1,
0084                        double z1,
0085                        double phi1,
0086                        double r2,
0087                        double z2,
0088                        double phi2,
0089                        double r3,
0090                        double z3,
0091                        double phi3,
0092                        int take3,
0093                        double& rinv,
0094                        double& phi0,
0095                        double& d0,
0096                        double& t,
0097                        double& z0,
0098                        double phiproj[N_LAYER - 2],
0099                        double zproj[N_LAYER - 2],
0100                        double phiprojdisk[N_DISK],
0101                        double rprojdisk[N_DISK],
0102                        double phider[N_LAYER - 2],
0103                        double zder[N_LAYER - 2],
0104                        double phiderdisk[N_DISK],
0105                        double rderdisk[N_DISK]);
0106 
0107     void approxproj(double halfRinv,
0108                     double phi0,
0109                     double d0,
0110                     double t,
0111                     double z0,
0112                     double halfRinv_0,
0113                     double d0_0,  // zeroeth order result for higher order terms calculation
0114                     double rmean,
0115                     double& phiproj,
0116                     double& phiprojder,
0117                     double& zproj,
0118                     double& zprojder);
0119 
0120     void approxprojdisk(double halfRinv,
0121                         double phi0,
0122                         double d0,
0123                         double t,
0124                         double z0,
0125                         double halfRinv_0,
0126                         double d0_0,  // zeroeth order result for higher order terms calculation
0127                         double zmean,
0128                         double& phiproj,
0129                         double& phiprojder,
0130                         double& rproj,
0131                         double& rprojder);
0132 
0133     void approxtracklet(double r1,
0134                         double z1,
0135                         double phi1,
0136                         double r2,
0137                         double z2,
0138                         double phi2,
0139                         double r3,
0140                         double z3,
0141                         double phi3,
0142                         bool take3,
0143                         unsigned ndisks,
0144                         double& rinv,
0145                         double& phi0,
0146                         double& d0,
0147                         double& t,
0148                         double& z0,
0149                         double phiproj[4],
0150                         double zproj[4],
0151                         double phider[4],
0152                         double zder[4],
0153                         double phiprojdisk[5],
0154                         double rprojdisk[5],
0155                         double phiderdisk[5],
0156                         double rderdisk[5]);
0157 
0158   protected:
0159     int TCIndex_;
0160     int layer_;
0161     int disk_;
0162     unsigned int iSeed_;
0163     double rproj_[N_LAYER - 2];
0164     int lproj_[N_LAYER - 2];
0165     double zproj_[N_DISK - 2];
0166     int dproj_[N_DISK - 2];
0167     double rzmeanInv_[N_DISK - 2];
0168 
0169     unsigned int iSector_;
0170     double phimin_, phimax_;
0171 
0172     std::vector<double> toR_;
0173     std::vector<double> toZ_;
0174 
0175     std::vector<AllStubsMemory*> innerallstubs_;
0176     std::vector<AllStubsMemory*> middleallstubs_;
0177     std::vector<AllStubsMemory*> outerallstubs_;
0178     std::vector<StubTripletsMemory*> stubtriplets_;
0179 
0180     TrackletParametersMemory* trackletpars_;
0181 
0182     //First index is layer/disk second is phi region
0183     std::vector<std::vector<TrackletProjectionsMemory*> > trackletprojlayers_;
0184     std::vector<std::vector<TrackletProjectionsMemory*> > trackletprojdisks_;
0185   };
0186 
0187 };  // namespace trklet
0188 #endif