CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
StartingLayerFinder Class Reference

#include <StartingLayerFinder.h>

Public Member Functions

std::vector< const DetLayer * > operator() (const FreeTrajectoryState &aFts, float dr, float dz) const
 
 StartingLayerFinder (Propagator const &aPropagator, MeasurementTracker const &tracker)
 

Private Member Functions

void checkPixelLayers () const
 
const std::vector< const ForwardDetLayer * > firstNegPixelFwdLayer () const
 
const BarrelDetLayerfirstPixelBarrelLayer () const
 
const std::vector< const ForwardDetLayer * > firstPosPixelFwdLayer () const
 

Private Attributes

std::vector< const ForwardDetLayer * > theFirstNegPixelFwdLayer
 
const BarrelDetLayertheFirstPixelBarrelLayer = nullptr
 
std::vector< const ForwardDetLayer * > theFirstPosPixelFwdLayer
 
MeasurementTracker const & theMeasurementTracker
 
bool thePixelLayersValid = false
 
Propagator const & thePropagator
 

Detailed Description

Finds the nearest navigable layer. Needed to start trajectory building in case the seed does not have a DetLayer

Definition at line 25 of file StartingLayerFinder.h.

Constructor & Destructor Documentation

◆ StartingLayerFinder()

StartingLayerFinder::StartingLayerFinder ( Propagator const &  aPropagator,
MeasurementTracker const &  tracker 
)
inline

Definition at line 27 of file StartingLayerFinder.h.

Member Function Documentation

◆ checkPixelLayers()

void StartingLayerFinder::checkPixelLayers ( ) const
private

Definition at line 93 of file StartingLayerFinder.cc.

93  {
94  if (!thePixelLayersValid) {
95  const GeometricSearchTracker* theGeometricSearchTracker = theMeasurementTracker.geometricSearchTracker();
96 
97  theFirstPixelBarrelLayer = theGeometricSearchTracker->pixelBarrelLayers().front();
98  theFirstNegPixelFwdLayer = theGeometricSearchTracker->negPixelForwardLayers();
99  theFirstPosPixelFwdLayer = theGeometricSearchTracker->posPixelForwardLayers();
100  thePixelLayersValid = true;
101  }
102 }

References GeometricSearchTracker::negPixelForwardLayers(), GeometricSearchTracker::pixelBarrelLayers(), and GeometricSearchTracker::posPixelForwardLayers().

◆ firstNegPixelFwdLayer()

const vector< const ForwardDetLayer * > StartingLayerFinder::firstNegPixelFwdLayer ( ) const
private

Definition at line 83 of file StartingLayerFinder.cc.

83  {
86 }

◆ firstPixelBarrelLayer()

const BarrelDetLayer * StartingLayerFinder::firstPixelBarrelLayer ( ) const
private

Definition at line 78 of file StartingLayerFinder.cc.

78  {
81 }

◆ firstPosPixelFwdLayer()

const vector< const ForwardDetLayer * > StartingLayerFinder::firstPosPixelFwdLayer ( ) const
private

Definition at line 88 of file StartingLayerFinder.cc.

88  {
91 }

◆ operator()()

vector< const DetLayer * > StartingLayerFinder::operator() ( const FreeTrajectoryState aFts,
float  dr,
float  dz 
) const

Definition at line 30 of file StartingLayerFinder.cc.

30  {
31  vector<const DetLayer*> mylayers;
32  mylayers.reserve(3);
33 
34  FreeTrajectoryState fastFts(aFts.parameters());
35 
36  //barrel pixel
38 
39  if (pTsos.isValid()) {
40  Range barrZRange(
41  firstPixelBarrelLayer()->position().z() - 0.5 * (firstPixelBarrelLayer()->surface().bounds().length()),
42  firstPixelBarrelLayer()->position().z() + 0.5 * (firstPixelBarrelLayer()->surface().bounds().length()));
43  Range trajZRange(pTsos.globalPosition().z() - dz, pTsos.globalPosition().z() + dz);
44 
45  if (rangesIntersect(trajZRange, barrZRange)) {
46  mylayers.push_back(firstPixelBarrelLayer());
47  }
48  }
49 
50  //negative fwd pixel
51 
52  for (auto infwd : firstPosPixelFwdLayer()) {
53  pTsos = thePropagator.propagate(fastFts, infwd->surface());
54  if (pTsos.isValid()) {
55  Range nfwdRRange(infwd->specificSurface().innerRadius(), infwd->specificSurface().outerRadius());
56  Range trajRRange(pTsos.globalPosition().perp() - dr, pTsos.globalPosition().perp() + dr);
57  if (rangesIntersect(trajRRange, nfwdRRange)) {
58  mylayers.push_back(infwd);
59  }
60  }
61  }
62 
63  //positive fwd pixel
64  for (auto ipfwd : firstPosPixelFwdLayer()) {
65  pTsos = thePropagator.propagate(fastFts, ipfwd->surface());
66  if (pTsos.isValid()) {
67  Range pfwdRRange(ipfwd->specificSurface().innerRadius(), ipfwd->specificSurface().outerRadius());
68  Range trajRRange(pTsos.globalPosition().perp() - dr, pTsos.globalPosition().perp() + dr);
69  if (rangesIntersect(trajRRange, pfwdRRange)) {
70  mylayers.push_back(ipfwd);
71  }
72  }
73  }
74 
75  return mylayers;
76 }

References flavorHistoryFilter_cfi::dr, PVValHelper::dz, FreeTrajectoryState::parameters(), position, and rangesIntersect().

Member Data Documentation

◆ theFirstNegPixelFwdLayer

std::vector<const ForwardDetLayer*> StartingLayerFinder::theFirstNegPixelFwdLayer
mutableprivate

Definition at line 44 of file StartingLayerFinder.h.

◆ theFirstPixelBarrelLayer

const BarrelDetLayer* StartingLayerFinder::theFirstPixelBarrelLayer = nullptr
mutableprivate

Definition at line 43 of file StartingLayerFinder.h.

◆ theFirstPosPixelFwdLayer

std::vector<const ForwardDetLayer*> StartingLayerFinder::theFirstPosPixelFwdLayer
mutableprivate

Definition at line 45 of file StartingLayerFinder.h.

◆ theMeasurementTracker

MeasurementTracker const& StartingLayerFinder::theMeasurementTracker
private

Definition at line 41 of file StartingLayerFinder.h.

◆ thePixelLayersValid

bool StartingLayerFinder::thePixelLayersValid = false
mutableprivate

Definition at line 42 of file StartingLayerFinder.h.

◆ thePropagator

Propagator const& StartingLayerFinder::thePropagator
private

Definition at line 40 of file StartingLayerFinder.h.

StartingLayerFinder::theMeasurementTracker
MeasurementTracker const & theMeasurementTracker
Definition: StartingLayerFinder.h:41
StartingLayerFinder::theFirstPixelBarrelLayer
const BarrelDetLayer * theFirstPixelBarrelLayer
Definition: StartingLayerFinder.h:43
Range
PixelRecoRange< float > Range
Definition: PixelTripletHLTGenerator.cc:31
StartingLayerFinder::thePixelLayersValid
bool thePixelLayersValid
Definition: StartingLayerFinder.h:42
StartingLayerFinder::theFirstNegPixelFwdLayer
std::vector< const ForwardDetLayer * > theFirstNegPixelFwdLayer
Definition: StartingLayerFinder.h:44
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
DDAxes::z
StartingLayerFinder::thePropagator
Propagator const & thePropagator
Definition: StartingLayerFinder.h:40
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
GeometricSearchTracker::posPixelForwardLayers
std::vector< ForwardDetLayer const * > const & posPixelForwardLayers() const
Definition: GeometricSearchTracker.h:52
StartingLayerFinder::firstPixelBarrelLayer
const BarrelDetLayer * firstPixelBarrelLayer() const
Definition: StartingLayerFinder.cc:78
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
StartingLayerFinder::firstPosPixelFwdLayer
const std::vector< const ForwardDetLayer * > firstPosPixelFwdLayer() const
Definition: StartingLayerFinder.cc:88
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
GeometricSearchTracker::negPixelForwardLayers
std::vector< ForwardDetLayer const * > const & negPixelForwardLayers() const
Definition: GeometricSearchTracker.h:48
PVValHelper::dz
Definition: PVValidationHelpers.h:51
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
GeometricSearchTracker
Definition: GeometricSearchTracker.h:15
rangesIntersect
bool rangesIntersect(const Range &a, const Range &b)
Definition: rangesIntersect.h:14
StartingLayerFinder::checkPixelLayers
void checkPixelLayers() const
Definition: StartingLayerFinder.cc:93
StartingLayerFinder::theFirstPosPixelFwdLayer
std::vector< const ForwardDetLayer * > theFirstPosPixelFwdLayer
Definition: StartingLayerFinder.h:45
GeometricSearchTracker::pixelBarrelLayers
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
Definition: GeometricSearchTracker.h:44