test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Public Member Functions

virtual const std::vector
< const GeomDet * > & 
basicComponents () const final
 
virtual 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 final __attribute__((hot))
 
virtual 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 () __attribute__((cold))
 
- Public Member Functions inherited from BarrelDetLayer
 BarrelDetLayer (bool doHaveGroup)
 
virtual std::pair< bool,
TrajectoryStateOnSurface
compatible (const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const final
 
bool contains (const Local3DPoint &p) const
 
virtual Location location () const final
 DetLayer interface. More...
 
virtual const BoundCylinderspecificSurface () const final
 Extension of the interface. More...
 
virtual const BoundSurfacesurface () const final
 GeometricSearchDet interface. More...
 
virtual ~BarrelDetLayer ()
 
- Public Member Functions inherited from DetLayer
 DetLayer (bool doHaveGroup, bool ibar)
 
bool isBarrel () const
 
bool isForward () const
 
int seqNum () const
 
void setSeqNum (int sq)
 
virtual ~DetLayer ()
 
- 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::PositionType
position () 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
< BoundCylinder
theInnerCylinder
 
std::vector< const
GeometricSearchDet * > 
theOuterComps
 
ReferenceCountingPointer
< BoundCylinder
theOuterCylinder
 
- 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
*, TrajectoryStateOnSurface
DetWithState
 
typedef BoundSurface::PositionType PositionType
 
typedef BoundSurface::RotationType RotationType
 
typedef TrajectoryStateOnSurface TrajectoryState
 

Detailed Description

Definition at line 13 of file TBLayer.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file TBLayer.h.

18  :
19  BarrelDetLayer(true),
20  theInnerComps(inner.begin(),inner.end()),
21  theOuterComps(outer.begin(),outer.end()), me(ime){}
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TBLayer.h:84
BarrelDetLayer(bool doHaveGroup)
GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:91
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TBLayer.h:85
TBLayer::~TBLayer ( )

Definition at line 11 of file TBLayer.cc.

References i, and theComps.

11  {
12  for ( auto i : theComps) delete i;
13 }
int i
Definition: DBlmapReader.cc:9
std::vector< const GeometricSearchDet * > theComps
Definition: TBLayer.h:83

Member Function Documentation

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

Definition at line 86 of file TBLayer.cc.

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

Referenced by groupedCompatibleDetsV().

91 {
92 
93  auto const & sub = subLayer( crossing.subLayerIndex());
94  auto det = sub[crossing.closestDetIndex()];
95  return CompatibleDetToGroupAdder().add( *det, tsos, prop, est, result);
96 }
int closestDetIndex() const
tuple result
Definition: mps_fire.py:84
int subLayerIndex() const
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
const std::vector< const GeometricSearchDet * > & subLayer(int ind) const
Definition: TBLayer.h:64
virtual const std::vector<const GeomDet*>& TBLayer::basicComponents ( ) const
inlinefinalvirtual

Implements GeometricSearchDet.

Definition at line 28 of file TBLayer.h.

References theBasicComps.

28 {return theBasicComps;}
std::vector< const GeomDet * > theBasicComps
Definition: TBLayer.h:86
virtual const std::vector<const GeometricSearchDet*>& TBLayer::components ( ) const
inlinefinalvirtual

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 30 of file TBLayer.h.

References theComps.

30 {return theComps;}
std::vector< const GeometricSearchDet * > theComps
Definition: TBLayer.h:83
SubLayerCrossings TBLayer::computeCrossings ( const TrajectoryStateOnSurface startingState,
PropagationDirection  propDir 
) const
protected

Definition at line 50 of file TBLayer.cc.

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

Referenced by groupedCompatibleDetsV().

52 {
53  GlobalPoint startPos( startingState.globalPosition());
54  GlobalVector startDir( startingState.globalMomentum());
55  double rho( startingState.transverseCurvature());
56 
57  HelixBarrelCylinderCrossing innerCrossing( startPos, startDir, rho,
58  propDir,*theInnerCylinder,
60  if (!innerCrossing.hasSolution()) return SubLayerCrossings();
61 
62  HelixBarrelCylinderCrossing outerCrossing( startPos, startDir, rho,
63  propDir,*theOuterCylinder,
65  if (!outerCrossing.hasSolution()) return SubLayerCrossings();
66 
67 
68  GlobalPoint gInnerPoint( innerCrossing.position());
69  GlobalPoint gOuterPoint( outerCrossing.position());
70 
71 
72  int innerIndex, outerIndex; bool inLess;
73  std::tie(inLess,innerIndex, outerIndex) = computeIndexes(gInnerPoint,gOuterPoint);
74 
75  SubLayerCrossing innerSLC( 0, innerIndex, gInnerPoint);
76  SubLayerCrossing outerSLC( 1, outerIndex, gOuterPoint);
77 
78  if (inLess) {
79  return SubLayerCrossings( innerSLC, outerSLC, 0);
80  }
81  else {
82  return SubLayerCrossings( outerSLC, innerSLC, 1);
83  }
84 }
ReferenceCountingPointer< BoundCylinder > theOuterCylinder
Definition: TBLayer.h:89
GlobalPoint globalPosition() const
virtual std::tuple< bool, int, int > computeIndexes(GlobalPoint gInnerPoint, GlobalPoint gOuterPoint) const =0
GlobalVector globalMomentum() const
ReferenceCountingPointer< BoundCylinder > theInnerCylinder
Definition: TBLayer.h:88
virtual std::tuple<bool,int,int> TBLayer::computeIndexes ( GlobalPoint  gInnerPoint,
GlobalPoint  gOuterPoint 
) const
protectedpure virtual

Implemented in TBPLayer, and TIBLayer.

Referenced by computeCrossings().

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

Implemented in TBPLayer, and TIBLayer.

Referenced by groupedCompatibleDetsV().

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

Reimplemented from GeometricSearchDet.

Definition at line 18 of file TBLayer.cc.

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().

21  {
22  SubLayerCrossings crossings;
23  crossings = computeCrossings( tsos, prop.propagationDirection());
24  if(! crossings.isValid()) return;
25 
26  std::vector<DetGroup> closestResult;
27  addClosest( tsos, prop, est, crossings.closest(), closestResult);
28  // for TIB this differs from compatibleDets logic, which checks next in such cases!!!
29  if (closestResult.empty()){
30  if (!isTIB()) addClosest( tsos, prop, est, crossings.other(), result);
31  return;
32  }
33 
34  DetGroupElement closestGel( closestResult.front().front());
35  float window = computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est);
36 
37  searchNeighbors( tsos, prop, est, crossings.closest(), window,
38  closestResult, false);
39 
40  std::vector<DetGroup> nextResult;
41  searchNeighbors( tsos, prop, est, crossings.other(), window,
42  nextResult, true);
43 
44  int crossingSide = LayerCrossingSide().barrelSide( closestGel.trajectoryState(), prop);
46  crossings.closestIndex(), crossingSide);
47 }
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
Definition: TBLayer.cc:50
def window
Definition: svgfig.py:642
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
int closestIndex() const
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
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
tuple result
Definition: mps_fire.py:84
virtual float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const =0
def move
Definition: eostools.py:510
const SubLayerCrossing & other() const
const SubLayerCrossing & closest() const
bool isTIB() const
Definition: TBLayer.h:68
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
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
bool TBLayer::isPhase2OT ( ) const
inlineprotected

Definition at line 71 of file TBLayer.h.

References me, and GeomDetEnumerators::P2OTB.

71 { return me==GeomDetEnumerators::P2OTB;}
GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:91
bool TBLayer::isPixel ( ) const
inlineprotected

Definition at line 70 of file TBLayer.h.

References me, and GeomDetEnumerators::PixelBarrel.

GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:91
bool TBLayer::isTIB ( ) const
inlineprotected

Definition at line 68 of file TBLayer.h.

References me, and GeomDetEnumerators::TIB.

Referenced by groupedCompatibleDetsV().

68 { return me==GeomDetEnumerators::TIB;}
GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:91
bool TBLayer::isTOB ( ) const
inlineprotected

Definition at line 69 of file TBLayer.h.

References me, and GeomDetEnumerators::TOB.

69 { return me==GeomDetEnumerators::TOB;}
GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:91
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().

virtual SubDetector TBLayer::subDetector ( ) const
inlinefinalvirtual

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

Implements DetLayer.

Definition at line 39 of file TBLayer.h.

References me, and GeomDetEnumerators::subDetGeom.

GeomDetEnumerators::SubDetector me
Definition: TBLayer.h:91
SubDetector subDetGeom[18]
const std::vector<const GeometricSearchDet*>& TBLayer::subLayer ( int  ind) const
inlineprotected

Definition at line 64 of file TBLayer.h.

References theInnerComps, and theOuterComps.

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

64  {
65  return (ind==0 ? theInnerComps : theOuterComps);
66  }
std::vector< const GeometricSearchDet * > theInnerComps
Definition: TBLayer.h:84
std::vector< const GeometricSearchDet * > theOuterComps
Definition: TBLayer.h:85

Member Data Documentation

GeomDetEnumerators::SubDetector TBLayer::me
protected

Definition at line 91 of file TBLayer.h.

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

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

Definition at line 86 of file TBLayer.h.

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

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

Definition at line 83 of file TBLayer.h.

Referenced by components(), TIBLayer::TIBLayer(), and ~TBLayer().

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

Definition at line 84 of file TBLayer.h.

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

ReferenceCountingPointer<BoundCylinder> TBLayer::theInnerCylinder
protected

Definition at line 88 of file TBLayer.h.

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

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

Definition at line 85 of file TBLayer.h.

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

ReferenceCountingPointer<BoundCylinder> TBLayer::theOuterCylinder
protected

Definition at line 89 of file TBLayer.h.

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