CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
TBLayer Class Referenceabstract

#include <TBLayer.h>

Inheritance diagram for TBLayer:
BarrelDetLayer DetLayer GeometricSearchDet TBPLayer TIBLayer Phase2OTtiltedBarrelLayer

Public Member Functions

const std::vector< const GeomDet * > & basicComponents () const final
 
const std::vector< const GeometricSearchDet * > & components () const final __attribute__((cold))
 Returns basic components, if any. More...
 
void groupedCompatibleDetsV (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
 
SubDetector subDetector () const final
 The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap) More...
 
template<typename TDET >
 TBLayer (std::vector< const TDET * > &inner, std::vector< const TDET * > &outer, GeomDetEnumerators::SubDetector ime)
 
 ~TBLayer () override __attribute__((cold))
 
- Public Member Functions inherited from BarrelDetLayer
 BarrelDetLayer (bool doHaveGroup)
 
std::pair< bool, TrajectoryStateOnSurfacecompatible (const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const final
 
bool contains (const Local3DPoint &p) const
 
Location location () const final
 DetLayer interface. More...
 
virtual const BoundCylinderspecificSurface () const final
 Extension of the interface. More...
 
const BoundSurfacesurface () const final
 GeometricSearchDet interface. More...
 
 ~BarrelDetLayer () override
 
- Public Member Functions inherited from DetLayer
 DetLayer (bool doHaveGroup, bool ibar)
 
bool isBarrel () const
 
bool isForward () const
 
int seqNum () const
 
void setSeqNum (int sq)
 
 ~DetLayer () override
 
- Public Member Functions inherited from GeometricSearchDet
virtual std::vector< DetWithStatecompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 
virtual void compatibleDetsV (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
 
 GeometricSearchDet (bool doHaveGroups)
 
virtual std::vector< DetGroupgroupedCompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
 
bool hasGroups () const
 
virtual const Surface::PositionTypeposition () const
 Returns position of the surface. More...
 
virtual ~GeometricSearchDet ()
 

Protected Member Functions

bool addClosest (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
 
SubLayerCrossings computeCrossings (const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
 
virtual std::tuple< bool, int, int > computeIndexes (GlobalPoint gInnerPoint, GlobalPoint gOuterPoint) const =0
 
virtual float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const =0
 
bool isPhase2OT () const
 
bool isPixel () const
 
bool isTIB () const
 
bool isTOB () const
 
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
 
const std::vector< const GeometricSearchDet * > & subLayer (int ind) const
 
- Protected Member Functions inherited from BarrelDetLayer
SimpleCylinderBounds const & bounds () const
 
virtual BoundCylindercomputeSurface ()
 
virtual void initialize ()
 
void setSurface (BoundCylinder *cp)
 

Protected Attributes

GeomDetEnumerators::SubDetector me
 
std::vector< const GeomDet * > theBasicComps
 
std::vector< const GeometricSearchDet * > theComps
 
std::vector< const GeometricSearchDet * > theInnerComps
 
ReferenceCountingPointer< BoundCylindertheInnerCylinder
 
std::vector< const GeometricSearchDet * > theOuterComps
 
ReferenceCountingPointer< BoundCylindertheOuterCylinder
 
- Protected Attributes inherited from GeometricSearchDet
bool haveGroups
 
GeomDetCompatibilityChecker theCompatibilityChecker
 

Additional Inherited Members

- Public Types inherited from DetLayer
typedef GeomDetEnumerators::Location Location
 
typedef GeomDetEnumerators::SubDetector SubDetector
 
- Public Types inherited from GeometricSearchDet
typedef std::pair< const GeomDet *, TrajectoryStateOnSurfaceDetWithState
 
typedef BoundSurface::PositionType PositionType
 
typedef BoundSurface::RotationType RotationType
 
typedef TrajectoryStateOnSurface TrajectoryState
 

Detailed Description

Definition at line 10 of file TBLayer.h.

Constructor & Destructor Documentation

◆ TBLayer()

template<typename TDET >
TBLayer::TBLayer ( std::vector< const TDET * > &  inner,
std::vector< const TDET * > &  outer,
GeomDetEnumerators::SubDetector  ime 
)
inline

Definition at line 13 of file TBLayer.h.

14  : BarrelDetLayer(true),
15  theInnerComps(inner.begin(), inner.end()),
16  theOuterComps(outer.begin(), outer.end()),
17  me(ime) {}

◆ ~TBLayer()

TBLayer::~TBLayer ( )
override

Definition at line 10 of file TBLayer.cc.

10  {
11  for (auto i : theComps)
12  delete i;
13 }

References mps_fire::i, and theComps.

Member Function Documentation

◆ addClosest()

bool TBLayer::addClosest ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
const SubLayerCrossing crossing,
std::vector< DetGroup > &  result 
) const
protected

Definition at line 79 of file TBLayer.cc.

83  {
84  auto const& sub = subLayer(crossing.subLayerIndex());
85  auto det = sub[crossing.closestDetIndex()];
86  return CompatibleDetToGroupAdder().add(*det, tsos, prop, est, result);
87 }

References CompatibleDetToGroupAdder::add(), SubLayerCrossing::closestDetIndex(), mps_fire::result, subLayer(), and SubLayerCrossing::subLayerIndex().

Referenced by groupedCompatibleDetsV().

◆ basicComponents()

const std::vector<const GeomDet*>& TBLayer::basicComponents ( ) const
inlinefinalvirtual

Implements GeometricSearchDet.

Definition at line 23 of file TBLayer.h.

23 { return theBasicComps; }

References theBasicComps.

◆ components()

const std::vector<const GeometricSearchDet*>& TBLayer::components ( ) const
inlinefinalvirtual

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 25 of file TBLayer.h.

25 { return theComps; }

References theComps.

Referenced by Phase2OTtiltedBarrelLayer::Phase2OTtiltedBarrelLayer().

◆ computeCrossings()

SubLayerCrossings TBLayer::computeCrossings ( const TrajectoryStateOnSurface startingState,
PropagationDirection  propDir 
) const
protected

Definition at line 46 of file TBLayer.cc.

47  {
48  GlobalPoint startPos(startingState.globalPosition());
49  GlobalVector startDir(startingState.globalMomentum());
50  double rho(startingState.transverseCurvature());
51 
52  HelixBarrelCylinderCrossing innerCrossing(
53  startPos, startDir, rho, propDir, *theInnerCylinder, HelixBarrelCylinderCrossing::onlyPos);
54  if (!innerCrossing.hasSolution())
55  return SubLayerCrossings();
56 
57  HelixBarrelCylinderCrossing outerCrossing(
58  startPos, startDir, rho, propDir, *theOuterCylinder, HelixBarrelCylinderCrossing::onlyPos);
59  if (!outerCrossing.hasSolution())
60  return SubLayerCrossings();
61 
62  GlobalPoint gInnerPoint(innerCrossing.position());
63  GlobalPoint gOuterPoint(outerCrossing.position());
64 
65  int innerIndex, outerIndex;
66  bool inLess;
67  std::tie(inLess, innerIndex, outerIndex) = computeIndexes(gInnerPoint, gOuterPoint);
68 
69  SubLayerCrossing innerSLC(0, innerIndex, gInnerPoint);
70  SubLayerCrossing outerSLC(1, outerIndex, gOuterPoint);
71 
72  if (inLess) {
73  return SubLayerCrossings(innerSLC, outerSLC, 0);
74  } else {
75  return SubLayerCrossings(outerSLC, innerSLC, 1);
76  }
77 }

References computeIndexes(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), HelixBarrelCylinderCrossing::hasSolution(), HelixBarrelCylinderCrossing::onlyPos, HelixBarrelCylinderCrossing::position(), rho, theInnerCylinder, theOuterCylinder, and TrajectoryStateOnSurface::transverseCurvature().

Referenced by groupedCompatibleDetsV().

◆ computeIndexes()

virtual std::tuple<bool, int, int> TBLayer::computeIndexes ( GlobalPoint  gInnerPoint,
GlobalPoint  gOuterPoint 
) const
protectedpure virtual

Implemented in TBPLayer, and TIBLayer.

Referenced by computeCrossings().

◆ computeWindowSize()

virtual float TBLayer::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
) const
protectedpure virtual

Implemented in TBPLayer, and TIBLayer.

Referenced by groupedCompatibleDetsV().

◆ groupedCompatibleDetsV()

void TBLayer::groupedCompatibleDetsV ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetGroup > &  result 
) const
overridevirtual

Reimplemented from GeometricSearchDet.

Definition at line 15 of file TBLayer.cc.

18  {
19  SubLayerCrossings crossings;
20  crossings = computeCrossings(tsos, prop.propagationDirection());
21  if (!crossings.isValid())
22  return;
23 
24  std::vector<DetGroup> closestResult;
25  addClosest(tsos, prop, est, crossings.closest(), closestResult);
26  // for TIB this differs from compatibleDets logic, which checks next in such cases!!!
27  if (closestResult.empty()) {
28  if (!isTIB())
29  addClosest(tsos, prop, est, crossings.other(), result);
30  return;
31  }
32 
33  DetGroupElement closestGel(closestResult.front().front());
34  float window = computeWindowSize(closestGel.det(), closestGel.trajectoryState(), est);
35 
36  searchNeighbors(tsos, prop, est, crossings.closest(), window, closestResult, false);
37 
38  std::vector<DetGroup> nextResult;
39  searchNeighbors(tsos, prop, est, crossings.other(), window, nextResult, true);
40 
41  int crossingSide = LayerCrossingSide().barrelSide(closestGel.trajectoryState(), prop);
43  std::move(closestResult), std::move(nextResult), result, crossings.closestIndex(), crossingSide);
44 }

References addClosest(), LayerCrossingSide::barrelSide(), SubLayerCrossings::closest(), SubLayerCrossings::closestIndex(), computeCrossings(), computeWindowSize(), isTIB(), SubLayerCrossings::isValid(), eostools::move(), DetGroupMerger::orderAndMergeTwoLevels(), SubLayerCrossings::other(), Propagator::propagationDirection(), mps_fire::result, searchNeighbors(), and svgfig::window().

Referenced by Phase2OTtiltedBarrelLayer::groupedCompatibleDetsV().

◆ isPhase2OT()

bool TBLayer::isPhase2OT ( ) const
inlineprotected

Definition at line 58 of file TBLayer.h.

58 { return me == GeomDetEnumerators::P2OTB; }

References me, and GeomDetEnumerators::P2OTB.

◆ isPixel()

bool TBLayer::isPixel ( ) const
inlineprotected

Definition at line 57 of file TBLayer.h.

References me, and GeomDetEnumerators::PixelBarrel.

◆ isTIB()

bool TBLayer::isTIB ( ) const
inlineprotected

Definition at line 55 of file TBLayer.h.

55 { return me == GeomDetEnumerators::TIB; }

References me, and GeomDetEnumerators::TIB.

Referenced by groupedCompatibleDetsV().

◆ isTOB()

bool TBLayer::isTOB ( ) const
inlineprotected

Definition at line 56 of file TBLayer.h.

56 { return me == GeomDetEnumerators::TOB; }

References me, and GeomDetEnumerators::TOB.

◆ searchNeighbors()

virtual void TBLayer::searchNeighbors ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
const SubLayerCrossing crossing,
float  window,
std::vector< DetGroup > &  result,
bool  checkClosest 
) const
protectedpure virtual

Implemented in TBPLayer, and TIBLayer.

Referenced by groupedCompatibleDetsV().

◆ subDetector()

SubDetector TBLayer::subDetector ( ) const
inlinefinalvirtual

The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)

Implements DetLayer.

Definition at line 33 of file TBLayer.h.

References me, and GeomDetEnumerators::subDetGeom.

◆ subLayer()

const std::vector<const GeometricSearchDet*>& TBLayer::subLayer ( int  ind) const
inlineprotected

Definition at line 51 of file TBLayer.h.

51  {
52  return (ind == 0 ? theInnerComps : theOuterComps);
53  }

References theInnerComps, and theOuterComps.

Referenced by addClosest(), and TIBLayer::searchNeighbors().

Member Data Documentation

◆ me

GeomDetEnumerators::SubDetector TBLayer::me
protected

Definition at line 77 of file TBLayer.h.

Referenced by isPhase2OT(), isPixel(), isTIB(), isTOB(), and subDetector().

◆ theBasicComps

std::vector<const GeomDet*> TBLayer::theBasicComps
protected

◆ theComps

std::vector<const GeometricSearchDet*> TBLayer::theComps
protected

◆ theInnerComps

std::vector<const GeometricSearchDet*> TBLayer::theInnerComps
protected

Definition at line 70 of file TBLayer.h.

Referenced by TIBLayer::computeIndexes(), subLayer(), and TIBLayer::TIBLayer().

◆ theInnerCylinder

ReferenceCountingPointer<BoundCylinder> TBLayer::theInnerCylinder
protected

Definition at line 74 of file TBLayer.h.

Referenced by computeCrossings(), and TIBLayer::TIBLayer().

◆ theOuterComps

std::vector<const GeometricSearchDet*> TBLayer::theOuterComps
protected

Definition at line 71 of file TBLayer.h.

Referenced by TIBLayer::computeIndexes(), subLayer(), and TIBLayer::TIBLayer().

◆ theOuterCylinder

ReferenceCountingPointer<BoundCylinder> TBLayer::theOuterCylinder
protected

Definition at line 75 of file TBLayer.h.

Referenced by computeCrossings(), and TIBLayer::TIBLayer().

Vector3DBase
Definition: Vector3DBase.h:8
SubLayerCrossings::isValid
bool isValid()
Definition: SubLayerCrossings.h:28
mps_fire.i
i
Definition: mps_fire.py:355
HelixBarrelCylinderCrossing::onlyPos
Definition: HelixBarrelCylinderCrossing.h:18
LayerCrossingSide
Definition: LayerCrossingSide.h:15
BarrelDetLayer::BarrelDetLayer
BarrelDetLayer(bool doHaveGroup)
Definition: BarrelDetLayer.h:24
SubLayerCrossings::closestIndex
int closestIndex() const
Definition: SubLayerCrossings.h:31
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
GeomDetEnumerators::TIB
Definition: GeomDetEnumerators.h:13
svgfig.window
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
GeomDetEnumerators::P2OTB
Definition: GeomDetEnumerators.h:23
GeomDetEnumerators::TOB
Definition: GeomDetEnumerators.h:14
TrajectoryStateOnSurface::transverseCurvature
double transverseCurvature() const
Definition: TrajectoryStateOnSurface.h:70
TBLayer::theInnerCylinder
ReferenceCountingPointer< BoundCylinder > theInnerCylinder
Definition: TBLayer.h:74
TBLayer::searchNeighbors
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
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
TBLayer::computeIndexes
virtual std::tuple< bool, int, int > computeIndexes(GlobalPoint gInnerPoint, GlobalPoint gOuterPoint) const =0
SurfaceOrientation::inner
Definition: Surface.h:19
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
Point3DBase< float, GlobalTag >
DetGroupMerger::orderAndMergeTwoLevels
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
Definition: DetGroupMerger.cc:6
DDAxes::rho
TBLayer::theComps
std::vector< const GeometricSearchDet * > theComps
Definition: TBLayer.h:69
CompatibleDetToGroupAdder::add
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
Definition: CompatibleDetToGroupAdder.cc:7
SubLayerCrossings::closest
const SubLayerCrossing & closest() const
Definition: SubLayerCrossings.h:29
TBLayer::theBasicComps
std::vector< const GeomDet * > theBasicComps
Definition: TBLayer.h:72
TBLayer::theOuterComps
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TBLayer.h:71
TBLayer::addClosest
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
Definition: TBLayer.cc:79
SubLayerCrossing::closestDetIndex
int closestDetIndex() const
Definition: SubLayerCrossings.h:13
DetGroupElement
Definition: DetGroup.h:10
TBLayer::subLayer
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TBLayer.h:51
TBLayer::theOuterCylinder
ReferenceCountingPointer< BoundCylinder > theOuterCylinder
Definition: TBLayer.h:75
TBLayer::computeWindowSize
virtual float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const =0
TBLayer::me
GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:77
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
eostools.move
def move(src, dest)
Definition: eostools.py:511
GeomDetEnumerators::subDetGeom
constexpr SubDetector subDetGeom[21]
Definition: GeomDetEnumerators.h:40
TBLayer::theInnerComps
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TBLayer.h:70
CompatibleDetToGroupAdder
Definition: CompatibleDetToGroupAdder.h:13
LayerCrossingSide::barrelSide
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
Definition: LayerCrossingSide.h:18
SubLayerCrossings::other
const SubLayerCrossing & other() const
Definition: SubLayerCrossings.h:30
SubLayerCrossing
Definition: SubLayerCrossings.h:7
SubLayerCrossing::subLayerIndex
int subLayerIndex() const
Definition: SubLayerCrossings.h:12
HelixBarrelCylinderCrossing
Definition: HelixBarrelCylinderCrossing.h:16
mps_fire.result
result
Definition: mps_fire.py:303
TBLayer::computeCrossings
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
Definition: TBLayer.cc:46
SurfaceOrientation::outer
Definition: Surface.h:19
TBLayer::isTIB
bool isTIB() const
Definition: TBLayer.h:55
SubLayerCrossings
Definition: SubLayerCrossings.h:22