CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HGCal_helpers::SimpleTrackPropagator Class Reference

Public Member Functions

bool propagate (const double px, const double py, const double pz, const double x, const double y, const double z, const float charge, Coordinates &coords) const
 
bool propagate (const math::XYZTLorentzVectorD &momentum, const math::XYZTLorentzVectorD &position, const float charge, Coordinates &coords) const
 
void setPropagationTargetZ (const float &z)
 
 SimpleTrackPropagator (const MagneticField *f)
 

Private Member Functions

const RKPropagatorInSRKProp () const
 
 SimpleTrackPropagator ()
 

Private Attributes

float absz_target_
 
CurvilinearTrajectoryError err_
 
const MagneticFieldfield_
 
defaultRKPropagator::Product prod_
 
Plane::PlanePointer targetPlaneBackward_
 
Plane::PlanePointer targetPlaneForward_
 

Detailed Description

Definition at line 39 of file HGCalTriggerNtupleGen.cc.

Constructor & Destructor Documentation

HGCal_helpers::SimpleTrackPropagator::SimpleTrackPropagator ( const MagneticField f)
inline
HGCal_helpers::SimpleTrackPropagator::SimpleTrackPropagator ( )
inlineprivate

Member Function Documentation

bool HGCal_helpers::SimpleTrackPropagator::propagate ( const double  px,
const double  py,
const double  pz,
const double  x,
const double  y,
const double  z,
const float  charge,
Coordinates coords 
) const

Definition at line 73 of file HGCalTriggerNtupleGen.cc.

References Plane::build(), HGCal_helpers::Coordinates::Coordinates(), HGCal_helpers::Coordinates::eta, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), HGCal_helpers::Coordinates::phi, PV3DBase< T, PVType, FrameType >::phi(), HGCal_helpers::Coordinates::x, PV3DBase< T, PVType, FrameType >::x(), HGCal_helpers::Coordinates::y, PV3DBase< T, PVType, FrameType >::y(), HGCal_helpers::Coordinates::z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by HGCalTriggerNtupleGen::fill().

75  {
76  output = Coordinates();
77 
79  GlobalPoint startingPosition(x, y, z);
80  GlobalVector startingMomentum(px, py, pz);
81  Plane::PlanePointer startingPlane =
83  TSOS startingStateP(
84  GlobalTrajectoryParameters(startingPosition, startingMomentum, charge, field_), err_,
85  *startingPlane);
86 
87  TSOS trackStateP;
88  if (pz > 0) {
89  trackStateP = RKProp().propagate(startingStateP, *targetPlaneForward_);
90  } else {
91  trackStateP = RKProp().propagate(startingStateP, *targetPlaneBackward_);
92  }
93  if (trackStateP.isValid()) {
94  output.x = trackStateP.globalPosition().x();
95  output.y = trackStateP.globalPosition().y();
96  output.z = trackStateP.globalPosition().z();
97  output.phi = trackStateP.globalPosition().phi();
98  output.eta = trackStateP.globalPosition().eta();
99  return true;
100  }
101  return false;
102  }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
static PlanePointer build(Args &&...args)
Definition: Plane.h:33
T z() const
Definition: PV3DBase.h:64
const RKPropagatorInS & RKProp() const
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
T eta() const
Definition: PV3DBase.h:76
T x() const
Definition: PV3DBase.h:62
bool HGCal_helpers::SimpleTrackPropagator::propagate ( const math::XYZTLorentzVectorD momentum,
const math::XYZTLorentzVectorD position,
const float  charge,
Coordinates coords 
) const

Definition at line 104 of file HGCalTriggerNtupleGen.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, and convertSQLitetoXML_cfg::output.

106  {
107  return propagate(momentum.px(), momentum.py(), momentum.pz(), position.x(), position.y(),
108  position.z(), charge, output);
109  }
bool propagate(const double px, const double py, const double pz, const double x, const double y, const double z, const float charge, Coordinates &coords) const
static int position[264][3]
Definition: ReadPGInfo.cc:509
const RKPropagatorInS& HGCal_helpers::SimpleTrackPropagator::RKProp ( ) const
inlineprivate

Definition at line 59 of file HGCalTriggerNtupleGen.cc.

59 { return prod_.propagator; }
void HGCal_helpers::SimpleTrackPropagator::setPropagationTargetZ ( const float &  z)

Member Data Documentation

float HGCal_helpers::SimpleTrackPropagator::absz_target_
private

Definition at line 64 of file HGCalTriggerNtupleGen.cc.

CurvilinearTrajectoryError HGCal_helpers::SimpleTrackPropagator::err_
private

Definition at line 62 of file HGCalTriggerNtupleGen.cc.

const MagneticField* HGCal_helpers::SimpleTrackPropagator::field_
private

Definition at line 61 of file HGCalTriggerNtupleGen.cc.

defaultRKPropagator::Product HGCal_helpers::SimpleTrackPropagator::prod_
private

Definition at line 63 of file HGCalTriggerNtupleGen.cc.

Plane::PlanePointer HGCal_helpers::SimpleTrackPropagator::targetPlaneBackward_
private

Definition at line 60 of file HGCalTriggerNtupleGen.cc.

Plane::PlanePointer HGCal_helpers::SimpleTrackPropagator::targetPlaneForward_
private

Definition at line 60 of file HGCalTriggerNtupleGen.cc.