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

81  {
82  output = Coordinates();
83 
85  GlobalPoint startingPosition(x, y, z);
86  GlobalVector startingMomentum(px, py, pz);
88  TSOS startingStateP(
89  GlobalTrajectoryParameters(startingPosition, startingMomentum, charge, field_), err_, *startingPlane);
90 
91  TSOS trackStateP;
92  if (pz > 0) {
93  trackStateP = RKProp().propagate(startingStateP, *targetPlaneForward_);
94  } else {
95  trackStateP = RKProp().propagate(startingStateP, *targetPlaneBackward_);
96  }
97  if (trackStateP.isValid()) {
98  output.x = trackStateP.globalPosition().x();
99  output.y = trackStateP.globalPosition().y();
100  output.z = trackStateP.globalPosition().z();
101  output.phi = trackStateP.globalPosition().phi();
102  output.eta = trackStateP.globalPosition().eta();
103  return true;
104  }
105  return false;
106  }
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 108 of file HGCalTriggerNtupleGen.cc.

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

111  {
112  return propagate(
113  momentum.px(), momentum.py(), momentum.pz(), position.x(), position.y(), position.z(), charge, output);
114  }
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 61 of file HGCalTriggerNtupleGen.cc.

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

Member Data Documentation

float HGCal_helpers::SimpleTrackPropagator::absz_target_
private

Definition at line 66 of file HGCalTriggerNtupleGen.cc.

CurvilinearTrajectoryError HGCal_helpers::SimpleTrackPropagator::err_
private

Definition at line 64 of file HGCalTriggerNtupleGen.cc.

const MagneticField* HGCal_helpers::SimpleTrackPropagator::field_
private

Definition at line 63 of file HGCalTriggerNtupleGen.cc.

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

Definition at line 65 of file HGCalTriggerNtupleGen.cc.

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

Definition at line 62 of file HGCalTriggerNtupleGen.cc.

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

Definition at line 62 of file HGCalTriggerNtupleGen.cc.