CMS 3D CMS Logo

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

#include <CosmicTrackingRegion.h>

Inheritance diagram for CosmicTrackingRegion:
TrackingRegion

Public Member Functions

std::unique_ptr< HitRZCompatibilitycheckRZ (const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer=nullptr, float lr=0, float gz=0, float dr=0, float dz=0) const override
 
std::unique_ptr< TrackingRegionclone () const override
 
 CosmicTrackingRegion (const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, const edm::ParameterSet &extra, const MeasurementTrackerEvent *measurementTracker=nullptr)
 
 CosmicTrackingRegion (const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, float dummy=0., const MeasurementTrackerEvent *measurementTracker=nullptr)
 
 CosmicTrackingRegion (CosmicTrackingRegion const &rh)
 
TrackingRegion::Hits hits (const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const override
 get hits from layer compatible with region constraints More...
 
std::string name () const override
 
 ~CosmicTrackingRegion () override
 
- Public Member Functions inherited from TrackingRegion
GlobalVector const & direction () const
 the direction around which region is constructed More...
 
Range invPtRange () const
 inverse pt range More...
 
GlobalPoint const & origin () const
 
float originRBound () const
 bounds the particle vertex in the transverse plane More...
 
float originZBound () const
 bounds the particle vertex in the longitudinal plane More...
 
float phiDirection () const
 
virtual std::string print () const
 
float ptMin () const
 minimal pt of interest More...
 
std::unique_ptr< TrackingRegionrestrictedRegion (const GlobalPoint &originPos, const float &originRBound, const float &originZBound) const
 clone region with new vertex position More...
 
 TrackingRegion (const GlobalVector &direction, const GlobalPoint &originPos, const Range &invPtRange, const float &originRBound, const float &originZBound)
 
GlobalVector const & unitDirection () const
 
virtual ~TrackingRegion ()
 

Private Types

using cacheHitPointer = mayown_ptr< BaseTrackerRecHit >
 
using cacheHits = std::vector< cacheHitPointer >
 

Private Member Functions

template<typename T >
void hits_ (const edm::EventSetup &es, const T &layer, TrackingRegion::Hits &result) const
 

Private Attributes

cacheHits cache
 
std::string measurementTrackerName_
 
const MeasurementTrackerEventtheMeasurementTracker_
 

Additional Inherited Members

- Public Types inherited from TrackingRegion
typedef SeedingLayerSetsHits::ConstRecHitPointer Hit
 
typedef SeedingLayerSetsHits::Hits Hits
 
typedef PixelRecoRange< float > Range
 

Detailed Description

A concrete implementation of TrackingRegion. Apart of vertex constraint from TrackingRegion in this implementation the region of interest is further constrainted in phi and eta around the direction of the region

Definition at line 24 of file CosmicTrackingRegion.h.

Member Typedef Documentation

◆ cacheHitPointer

Definition at line 108 of file CosmicTrackingRegion.h.

◆ cacheHits

using CosmicTrackingRegion::cacheHits = std::vector<cacheHitPointer>
private

Definition at line 109 of file CosmicTrackingRegion.h.

Constructor & Destructor Documentation

◆ ~CosmicTrackingRegion()

CosmicTrackingRegion::~CosmicTrackingRegion ( )
inlineoverride

Definition at line 26 of file CosmicTrackingRegion.h.

26 {}

◆ CosmicTrackingRegion() [1/3]

CosmicTrackingRegion::CosmicTrackingRegion ( const GlobalVector dir,
const GlobalPoint vertexPos,
float  ptMin,
float  rVertex,
float  zVertex,
float  deltaEta,
float  deltaPhi,
float  dummy = 0.,
const MeasurementTrackerEvent measurementTracker = nullptr 
)
inline

constructor (symmetric eta and phi margins).
dir - the direction around which region is constructed
the initial direction of the momentum of the particle should be in the range
phi of dir +- deltaPhi
eta of dir +- deltaEta

vertexPos - the position of the vertex (origin) of the of the region.
It is a centre of cylinder constraind with rVertex, zVertex. The track of the particle should cross the cylinder
WARNING: in the current implementaion the vertexPos is supposed to be placed on the beam line, i.e. to be of the form (0,0,float)

ptMin - minimal pt of interest
rVertex - radius of the cylinder around beam line where the tracks of interest should point to.
zVertex - half height of the cylinder around the beam line where the tracks of interest should point to.
deltaEta - allowed deviation of the initial direction of particle in eta in respect to direction of the region
deltaPhi - allowed deviation of the initial direction of particle in phi in respect to direction of the region

Definition at line 52 of file CosmicTrackingRegion.h.

◆ CosmicTrackingRegion() [2/3]

CosmicTrackingRegion::CosmicTrackingRegion ( const GlobalVector dir,
const GlobalPoint vertexPos,
float  ptMin,
float  rVertex,
float  zVertex,
float  deltaEta,
float  deltaPhi,
const edm::ParameterSet extra,
const MeasurementTrackerEvent measurementTracker = nullptr 
)
inline

◆ CosmicTrackingRegion() [3/3]

CosmicTrackingRegion::CosmicTrackingRegion ( CosmicTrackingRegion const &  rh)
inline

Definition at line 79 of file CosmicTrackingRegion.h.

80  : TrackingRegionBase(rh),
81  theMeasurementTracker_(rh.theMeasurementTracker_),
82  measurementTrackerName_(rh.measurementTrackerName_) {}

Member Function Documentation

◆ checkRZ()

std::unique_ptr<HitRZCompatibility> CosmicTrackingRegion::checkRZ ( const DetLayer layer,
const Hit outerHit,
const edm::EventSetup iSetup,
const DetLayer outerlayer = nullptr,
float  lr = 0,
float  gz = 0,
float  dr = 0,
float  dz = 0 
) const
inlineoverridevirtual

utility to check eta/theta hit compatibility with region constraints and outer hit constraint

Implements TrackingRegion.

Definition at line 86 of file CosmicTrackingRegion.h.

93  {
94  return nullptr;
95  }

◆ clone()

std::unique_ptr<TrackingRegion> CosmicTrackingRegion::clone ( void  ) const
inlineoverridevirtual

Implements TrackingRegion.

Definition at line 97 of file CosmicTrackingRegion.h.

97 { return std::make_unique<CosmicTrackingRegion>(*this); }

◆ hits()

TrackingRegion::Hits CosmicTrackingRegion::hits ( const edm::EventSetup es,
const SeedingLayerSetsHits::SeedingLayer layer 
) const
overridevirtual

get hits from layer compatible with region constraints

Implements TrackingRegion.

Definition at line 27 of file CosmicTrackingRegion.cc.

28  {
30  hits_(es, layer, result);
31  return result;
32 }

References mps_fire::result.

◆ hits_()

template<typename T >
void CosmicTrackingRegion::hits_ ( const edm::EventSetup es,
const T layer,
TrackingRegion::Hits result 
) const
private

Definition at line 35 of file CosmicTrackingRegion.cc.

35  {
36  //get and name collections
37  //++++++++++++++++++++++++
38 
39  //detector layer
40  const DetLayer* detLayer = layer.detLayer();
41  LogDebug("CosmicTrackingRegion") << "Looking at hits on subdet/layer " << layer.name();
42  EtaPhiMeasurementEstimator est(0.3, 0.3);
43 
44  //magnetic field
46  es.get<IdealMagneticFieldRecord>().get(field);
47  const MagneticField* magField = field.product();
48 
49  //region
50  const GlobalPoint vtx = origin();
52  LogDebug("CosmicTrackingRegion") << "The initial region characteristics are:"
53  << "\n"
54  << " Origin = " << origin() << "\n"
55  << " Direction = " << direction() << "\n"
56  << " Eta = " << origin().eta() << "\n"
57  << " Phi = " << origin().phi();
58 
59  //trajectory state on surface
60  float phi = dir.phi();
61  Surface::RotationType rot(sin(phi), -cos(phi), 0, 0, 0, -1, cos(phi), sin(phi), 0);
62 
65  TrajectoryStateOnSurface tsos(fts, *surface);
66  LogDebug("CosmicTrackingRegion") << "The state used to find measurement with the measurement tracker is:\n" << tsos;
67 
68  //propagator
69  AnalyticalPropagator prop(magField, alongMomentum);
70 
71  //propagation verification (debug)
72  //++++++++++++++++++++++++++++++++
73 
74  //creation of the state
75  TrajectoryStateOnSurface stateOnLayer = prop.propagate(*tsos.freeState(), detLayer->surface());
76 
77  //verification of the state
78  if (stateOnLayer.isValid()) {
79  LogDebug("CosmicTrackingRegion") << "The initial state propagates to the layer surface: \n"
80  << stateOnLayer << "R = " << stateOnLayer.globalPosition().perp() << "\n"
81  << "Eta = " << stateOnLayer.globalPosition().eta() << "\n"
82  << "Phi = " << stateOnLayer.globalPosition().phi();
83 
84  } else {
85  LogDebug("CosmicTrackingRegion") << "The initial state does not propagate to the layer surface.";
86  }
87 
88  //number of compatible dets
90  vector<DetWithState> compatDets = detLayer->compatibleDets(tsos, prop, est);
91  LogDebug("CosmicTrackingRegion") << "Compatible dets = " << compatDets.size();
92 
93  //get hits
94  //++++++++
95 
96  //measurement tracker (find hits)
98  vector<TrajectoryMeasurement> meas = lm.measurements(*detLayer, tsos, prop, est);
99  LogDebug("CosmicTrackingRegion") << "Number of Trajectory measurements = " << meas.size()
100  << " but the last one is always an invalid hit, by construction.";
101 
102  //trajectory measurement
103 
104  // std::cout <<"CRegion b " << cache.size() << std::endl;
105 
106  // waiting for a migration at LayerMeasurements level and at seed builder level
107  for (auto const& im : meas) {
108  if (!im.recHit()->isValid())
109  continue;
110  assert(!trackerHitRTTI::isUndef(*im.recHit()->hit()));
111  auto ptrHit = (BaseTrackerRecHit*)(im.recHit()->hit()->clone());
112  cache.emplace_back(ptrHit);
113  result.emplace_back(ptrHit);
114  }
115 
116  // std::cout <<"CRegion a " << cache.size() << std::endl;
117 }

References alongMomentum, AnalyticalPropagator_cfi::AnalyticalPropagator, cms::cuda::assert(), Plane::build(), utilities::cache(), GeometricSearchDet::compatibleDets(), funct::cos(), DeadROC_duringRun::dir, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::freeState(), edm::EventSetup::get(), get, TrajectoryStateOnSurface::globalPosition(), trackerHitRTTI::isUndef(), TrajectoryStateOnSurface::isValid(), LogDebug, LayerMeasurements::measurements(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), edm::ESHandle< T >::product(), mps_fire::result, makeMuonMisalignmentScenario::rot, funct::sin(), GeometricSearchDet::surface(), and badGlobalMuonTaggersAOD_cff::vtx.

◆ name()

std::string CosmicTrackingRegion::name ( void  ) const
inlineoverridevirtual

Reimplemented from TrackingRegion.

Definition at line 99 of file CosmicTrackingRegion.h.

99 { return "CosmicTrackingRegion"; }

Referenced by config.CFG::__str__(), and validation.Sample::digest().

Member Data Documentation

◆ cache

cacheHits CosmicTrackingRegion::cache
mutableprivate

Definition at line 114 of file CosmicTrackingRegion.h.

◆ measurementTrackerName_

std::string CosmicTrackingRegion::measurementTrackerName_
private

Definition at line 106 of file CosmicTrackingRegion.h.

Referenced by CosmicTrackingRegion().

◆ theMeasurementTracker_

const MeasurementTrackerEvent* CosmicTrackingRegion::theMeasurementTracker_
private

Definition at line 105 of file CosmicTrackingRegion.h.

Vector3DBase
Definition: Vector3DBase.h:8
TrackingRegion::origin
GlobalPoint const & origin() const
Definition: TrackingRegion.h:71
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TkRotation< float >
LayerMeasurements::measurements
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Definition: LayerMeasurements.cc:122
CosmicTrackingRegion::measurementTrackerName_
std::string measurementTrackerName_
Definition: CosmicTrackingRegion.h:106
HLTSiStripMonitoring_cff.measurementTracker
measurementTracker
Definition: HLTSiStripMonitoring_cff.py:178
DetLayer
Definition: DetLayer.h:21
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
HLT_FULL_cff.rVertex
rVertex
Definition: HLT_FULL_cff.py:109727
cms::cuda::assert
assert(be >=bs)
trackerHitRTTI::isUndef
bool isUndef(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:23
CosmicTrackingRegion::hits_
void hits_(const edm::EventSetup &es, const T &layer, TrackingRegion::Hits &result) const
Definition: CosmicTrackingRegion.cc:35
GeometricSearchDet::compatibleDets
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Definition: GeometricSearchDet.cc:35
ReferenceCountingPointer< Plane >
HLT_FULL_cff.zVertex
zVertex
Definition: HLT_FULL_cff.py:109725
CosmicTrackingRegion::theMeasurementTracker_
const MeasurementTrackerEvent * theMeasurementTracker_
Definition: CosmicTrackingRegion.h:105
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
LayerMeasurements
Definition: LayerMeasurements.h:18
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
TrackingRegion::Hits
SeedingLayerSetsHits::Hits Hits
Definition: TrackingRegion.h:44
BaseTrackerRecHit
Definition: BaseTrackerRecHit.h:15
edm::ESHandle< MagneticField >
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
TrackingRegion::ptMin
float ptMin() const
minimal pt of interest
Definition: TrackingRegion.h:80
Point3DBase< float, GlobalTag >
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AnalyticalPropagator_cfi.AnalyticalPropagator
AnalyticalPropagator
Definition: AnalyticalPropagator_cfi.py:3
Plane::build
static PlanePointer build(Args &&... args)
Definition: Plane.h:33
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
TrackingRegion::direction
GlobalVector const & direction() const
the direction around which region is constructed
Definition: TrackingRegion.h:62
EtaPhiMeasurementEstimator
Definition: EtaPhiMeasurementEstimator.h:15
TrackingRegion::Range
PixelRecoRange< float > Range
Definition: TrackingRegion.h:42
DetWithState
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
Definition: RPCRecHitFilter.h:58
GeometricSearchDet::DetWithState
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
Definition: GeometricSearchDet.h:19
get
#define get
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
GeometricSearchDet::surface
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
CosmicTrackingRegion::cache
cacheHits cache
Definition: CosmicTrackingRegion.h:114
mps_fire.result
result
Definition: mps_fire.py:303
MagneticField
Definition: MagneticField.h:19
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
alongMomentum
Definition: PropagationDirection.h:4
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
TrackingRegionBase
TrackingRegion TrackingRegionBase
Definition: TrackingRegion.h:133
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23