CMS 3D CMS Logo

TBLayer.h
Go to the documentation of this file.
1 #ifndef TkDetLayers_TBLayer_h
2 #define TkDetLayers_TBLayer_h
3 
5 #include "SubLayerCrossings.h"
6 #include <tuple>
7 
8 // A base class for Barrel Layers
9 #pragma GCC visibility push(hidden)
10 class TBLayer : public BarrelDetLayer {
11 public:
12  template <typename TDET>
13  TBLayer(std::vector<const TDET*>& inner, std::vector<const TDET*>& outer, GeomDetEnumerators::SubDetector ime)
15  theInnerComps(inner.begin(), inner.end()),
16  theOuterComps(outer.begin(), outer.end()),
17  me(ime) {}
18 
19  ~TBLayer() override __attribute__((cold));
20 
21  // GeometricSearchDet interface
22 
24 
25  const std::vector<const GeometricSearchDet*>& components() const final __attribute__((cold)) { return theComps; }
26 
28  const Propagator& prop,
29  const MeasurementEstimator& est,
30  std::vector<DetGroup>& result) const override __attribute__((hot));
31 
32  // DetLayer interface
34 
35 protected:
37  __attribute__((hot));
38 
39  virtual std::tuple<bool, int, int> computeIndexes(GlobalPoint gInnerPoint, GlobalPoint gOuterPoint) const = 0;
40 
41  virtual float computeWindowSize(const GeomDet* det,
42  const TrajectoryStateOnSurface& tsos,
43  const MeasurementEstimator& est) const = 0;
44 
45  bool addClosest(const TrajectoryStateOnSurface& tsos,
46  const Propagator& prop,
47  const MeasurementEstimator& est,
48  const SubLayerCrossing& crossing,
49  std::vector<DetGroup>& result) const __attribute__((hot));
50 
51  const std::vector<const GeometricSearchDet*>& subLayer(int ind) const {
52  return (ind == 0 ? theInnerComps : theOuterComps);
53  }
54 
55  bool isTIB() const { return me == GeomDetEnumerators::TIB; }
56  bool isTOB() const { return me == GeomDetEnumerators::TOB; }
57  bool isPixel() const { return me == GeomDetEnumerators::PixelBarrel; }
58  bool isPhase2OT() const { return me == GeomDetEnumerators::P2OTB; }
59 
60  virtual void searchNeighbors(const TrajectoryStateOnSurface& tsos,
61  const Propagator& prop,
62  const MeasurementEstimator& est,
63  const SubLayerCrossing& crossing,
64  float window,
65  std::vector<DetGroup>& result,
66  bool checkClosest) const = 0;
67 
68 protected:
69  std::vector<const GeometricSearchDet*> theComps;
70  std::vector<const GeometricSearchDet*> theInnerComps;
71  std::vector<const GeometricSearchDet*> theOuterComps;
72  std::vector<const GeomDet*> theBasicComps;
73 
76 
78 };
79 
80 #pragma GCC visibility pop
81 
82 #endif
ReferenceCountingPointer< BoundCylinder > theOuterCylinder
Definition: TBLayer.h:75
const std::vector< const GeometricSearchDet * > & components() const final __attribute__((cold))
Returns basic components, if any.
Definition: TBLayer.h:25
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
Definition: TBLayer.cc:46
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TBLayer.h:70
constexpr SubDetector subDetGeom[21]
std::vector< const GeometricSearchDet * > theComps
Definition: TBLayer.h:69
virtual std::tuple< bool, int, int > computeIndexes(GlobalPoint gInnerPoint, GlobalPoint gOuterPoint) const =0
PropagationDirection
bool isPhase2OT() const
Definition: TBLayer.h:58
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
Definition: TBLayer.cc:86
virtual float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const =0
bool isTIB() const
Definition: TBLayer.h:55
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TBLayer.h:51
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
~TBLayer() override __attribute__((cold))
Definition: TBLayer.cc:10
SubDetector subDetector() const final
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
Definition: TBLayer.h:33
GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:77
const std::vector< const GeomDet * > & basicComponents() const final
Definition: TBLayer.h:23
bool isTOB() const
Definition: TBLayer.h:56
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
Definition: TBLayer.cc:15
virtual void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const =0
TBLayer(std::vector< const TDET *> &inner, std::vector< const TDET *> &outer, GeomDetEnumerators::SubDetector ime)
Definition: TBLayer.h:13
bool isPixel() const
Definition: TBLayer.h:57
std::vector< const GeomDet * > theBasicComps
Definition: TBLayer.h:72
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TBLayer.h:71
ReferenceCountingPointer< BoundCylinder > theInnerCylinder
Definition: TBLayer.h:74