CMS 3D CMS Logo

TrackletCalculatorDisplaced.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_TrackletCalculatorDisplaced_h
2 #define L1Trigger_TrackFindingTracklet_interface_TrackletCalculatorDisplaced_h
3 
9 
10 #include <vector>
11 
12 namespace trklet {
13 
14  class Settings;
15  class Globals;
16  class MemoryBase;
17  class Stub;
18  class L1TStub;
19 
21  public:
22  TrackletCalculatorDisplaced(std::string name, Settings const& settings, Globals* global);
23 
24  ~TrackletCalculatorDisplaced() override = default;
25 
27 
28  void addOutput(MemoryBase* memory, std::string output) override;
29  void addInput(MemoryBase* memory, std::string input) override;
30 
31  void execute(unsigned int iSector, double phimin, double phimax);
32 
33  void addDiskProj(Tracklet* tracklet, int disk);
34  bool addLayerProj(Tracklet* tracklet, int layer);
35 
36  void addProjection(int layer, int iphi, TrackletProjectionsMemory* trackletprojs, Tracklet* tracklet);
37  void addProjectionDisk(int disk, int iphi, TrackletProjectionsMemory* trackletprojs, Tracklet* tracklet);
38 
39  bool LLLSeeding(const Stub* innerFPGAStub,
40  const L1TStub* innerStub,
41  const Stub* middleFPGAStub,
42  const L1TStub* middleStub,
43  const Stub* outerFPGAStub,
44  const L1TStub* outerStub);
45  bool DDLSeeding(const Stub* innerFPGAStub,
46  const L1TStub* innerStub,
47  const Stub* middleFPGAStub,
48  const L1TStub* middleStub,
49  const Stub* outerFPGAStub,
50  const L1TStub* outerStub);
51  bool LLDSeeding(const Stub* innerFPGAStub,
52  const L1TStub* innerStub,
53  const Stub* middleFPGAStub,
54  const L1TStub* middleStub,
55  const Stub* outerFPGAStub,
56  const L1TStub* outerStub);
57 
58  void exactproj(double rproj,
59  double rinv,
60  double phi0,
61  double d0,
62  double t,
63  double z0,
64  double r0,
65  double& phiproj,
66  double& zproj,
67  double& phider,
68  double& zder);
69 
70  void exactprojdisk(double zproj,
71  double rinv,
72  double,
73  double, //phi0 and d0 are not used.
74  double t,
75  double z0,
76  double x0,
77  double y0,
78  double& phiproj,
79  double& rproj,
80  double& phider,
81  double& rder);
82 
83  void exacttracklet(double r1,
84  double z1,
85  double phi1,
86  double r2,
87  double z2,
88  double phi2,
89  double r3,
90  double z3,
91  double phi3,
92  int take3,
93  double& rinv,
94  double& phi0,
95  double& d0,
96  double& t,
97  double& z0,
98  double phiproj[N_LAYER - 2],
99  double zproj[N_LAYER - 2],
100  double phiprojdisk[N_DISK],
101  double rprojdisk[N_DISK],
102  double phider[N_LAYER - 2],
103  double zder[N_LAYER - 2],
104  double phiderdisk[N_DISK],
105  double rderdisk[N_DISK]);
106 
107  void approxproj(double halfRinv,
108  double phi0,
109  double d0,
110  double t,
111  double z0,
112  double halfRinv_0,
113  double d0_0, // zeroeth order result for higher order terms calculation
114  double rmean,
115  double& phiproj,
116  double& phiprojder,
117  double& zproj,
118  double& zprojder);
119 
120  void approxprojdisk(double halfRinv,
121  double phi0,
122  double d0,
123  double t,
124  double z0,
125  double halfRinv_0,
126  double d0_0, // zeroeth order result for higher order terms calculation
127  double zmean,
128  double& phiproj,
129  double& phiprojder,
130  double& rproj,
131  double& rprojder);
132 
133  void approxtracklet(double r1,
134  double z1,
135  double phi1,
136  double r2,
137  double z2,
138  double phi2,
139  double r3,
140  double z3,
141  double phi3,
142  bool take3,
143  unsigned ndisks,
144  double& rinv,
145  double& phi0,
146  double& d0,
147  double& t,
148  double& z0,
149  double phiproj[4],
150  double zproj[4],
151  double phider[4],
152  double zder[4],
153  double phiprojdisk[5],
154  double rprojdisk[5],
155  double phiderdisk[5],
156  double rderdisk[5]);
157 
158  protected:
159  int TCIndex_;
160  int layer_;
161  int disk_;
162  unsigned int iSeed_;
163  double rproj_[N_LAYER - 2];
164  int lproj_[N_LAYER - 2];
165  double zproj_[N_DISK - 2];
166  int dproj_[N_DISK - 2];
167  double rzmeanInv_[N_DISK - 2];
168 
169  unsigned int iSector_;
170  double phimin_, phimax_;
171 
172  std::vector<double> toR_;
173  std::vector<double> toZ_;
174 
175  std::vector<AllStubsMemory*> innerallstubs_;
176  std::vector<AllStubsMemory*> middleallstubs_;
177  std::vector<AllStubsMemory*> outerallstubs_;
178  std::vector<StubTripletsMemory*> stubtriplets_;
179 
181 
182  //First index is layer/disk second is phi region
183  std::vector<std::vector<TrackletProjectionsMemory*> > trackletprojlayers_;
184  std::vector<std::vector<TrackletProjectionsMemory*> > trackletprojdisks_;
185  };
186 
187 }; // namespace trklet
188 #endif
std::vector< AllStubsMemory * > middleallstubs_
constexpr int N_DISK
Definition: Settings.h:22
std::vector< StubTripletsMemory * > stubtriplets_
void exactproj(double rproj, double rinv, double phi0, double d0, double t, double z0, double r0, double &phiproj, double &zproj, double &phider, double &zder)
bool addLayerProj(Tracklet *tracklet, int layer)
std::vector< AllStubsMemory * > innerallstubs_
void addInput(MemoryBase *memory, std::string input) override
void addProjection(int layer, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
static std::string const input
Definition: EdmProvDump.cc:50
void exactprojdisk(double zproj, double rinv, double, double, double t, double z0, double x0, double y0, double &phiproj, double &rproj, double &phider, double &rder)
bool LLDSeeding(const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *middleFPGAStub, const L1TStub *middleStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
void exacttracklet(double r1, double z1, double phi1, double r2, double z2, double phi2, double r3, double z3, double phi3, int take3, double &rinv, double &phi0, double &d0, double &t, double &z0, double phiproj[N_LAYER - 2], double zproj[N_LAYER - 2], double phiprojdisk[N_DISK], double rprojdisk[N_DISK], double phider[N_LAYER - 2], double zder[N_LAYER - 2], double phiderdisk[N_DISK], double rderdisk[N_DISK])
void approxprojdisk(double halfRinv, double phi0, double d0, double t, double z0, double halfRinv_0, double d0_0, double zmean, double &phiproj, double &phiprojder, double &rproj, double &rprojder)
bool LLLSeeding(const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *middleFPGAStub, const L1TStub *middleStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
void execute(unsigned int iSector, double phimin, double phimax)
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
void approxtracklet(double r1, double z1, double phi1, double r2, double z2, double phi2, double r3, double z3, double phi3, bool take3, unsigned ndisks, double &rinv, double &phi0, double &d0, double &t, double &z0, double phiproj[4], double zproj[4], double phider[4], double zder[4], double phiprojdisk[5], double rprojdisk[5], double phiderdisk[5], double rderdisk[5])
static constexpr float d0
bool DDLSeeding(const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *middleFPGAStub, const L1TStub *middleStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
void approxproj(double halfRinv, double phi0, double d0, double t, double z0, double halfRinv_0, double d0_0, double rmean, double &phiproj, double &phiprojder, double &zproj, double &zprojder)
void addDiskProj(Tracklet *tracklet, int disk)
double rinv(double phi1, double phi2, double r1, double r2)
Definition: Util.h:49
TrackletCalculatorDisplaced(std::string name, Settings const &settings, Globals *global)
~TrackletCalculatorDisplaced() override=default
std::vector< AllStubsMemory * > outerallstubs_
void addOutputProjection(TrackletProjectionsMemory *&outputProj, MemoryBase *memory)
void addProjectionDisk(int disk, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
void addOutput(MemoryBase *memory, std::string output) override
constexpr int N_LAYER
Definition: Settings.h:21