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

◆ SimpleTrackPropagator() [1/2]

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

Definition at line 36 of file HGCalTriggerNtupleGen.cc.

37  ROOT::Math::SMatrixIdentity id;
39  const float uncert = 0.001;
40  C *= uncert;
42  }

References gen::C, err_, and triggerObjects_cff::id.

◆ SimpleTrackPropagator() [2/2]

HGCal_helpers::SimpleTrackPropagator::SimpleTrackPropagator ( )
inlineprivate

Definition at line 60 of file HGCalTriggerNtupleGen.cc.

60 : field_(nullptr), prod_(field_, alongMomentum), absz_target_(0) {}

Member Function Documentation

◆ propagate() [1/2]

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.

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  }

References Plane::build(), ALCARECOTkAlJpsiMuMu_cff::charge, err_, PV3DBase< T, PVType, FrameType >::eta(), field_, TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), convertSQLitetoXML_cfg::output, PV3DBase< T, PVType, FrameType >::phi(), RKPropagatorInS::propagate(), multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, RKProp(), targetPlaneBackward_, targetPlaneForward_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by HGCalTriggerNtupleGen::fill(), and propagate().

◆ propagate() [2/2]

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.

111  {
112  return propagate(
113  momentum.px(), momentum.py(), momentum.pz(), position.x(), position.y(), position.z(), charge, output);
114  }

References ALCARECOTkAlJpsiMuMu_cff::charge, convertSQLitetoXML_cfg::output, position, and propagate().

◆ RKProp()

const RKPropagatorInS& HGCal_helpers::SimpleTrackPropagator::RKProp ( ) const
inlineprivate

Definition at line 61 of file HGCalTriggerNtupleGen.cc.

61 { return prod_.propagator; }

References prod_, and defaultRKPropagator::Product::propagator.

Referenced by propagate().

◆ setPropagationTargetZ()

void HGCal_helpers::SimpleTrackPropagator::setPropagationTargetZ ( const float &  z)

Member Data Documentation

◆ absz_target_

float HGCal_helpers::SimpleTrackPropagator::absz_target_
private

Definition at line 66 of file HGCalTriggerNtupleGen.cc.

Referenced by setPropagationTargetZ().

◆ err_

CurvilinearTrajectoryError HGCal_helpers::SimpleTrackPropagator::err_
private

Definition at line 64 of file HGCalTriggerNtupleGen.cc.

Referenced by propagate(), and SimpleTrackPropagator().

◆ field_

const MagneticField* HGCal_helpers::SimpleTrackPropagator::field_
private

Definition at line 63 of file HGCalTriggerNtupleGen.cc.

Referenced by propagate().

◆ prod_

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

Definition at line 65 of file HGCalTriggerNtupleGen.cc.

Referenced by RKProp().

◆ targetPlaneBackward_

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

Definition at line 62 of file HGCalTriggerNtupleGen.cc.

Referenced by propagate(), and setPropagationTargetZ().

◆ targetPlaneForward_

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

Definition at line 62 of file HGCalTriggerNtupleGen.cc.

Referenced by propagate(), and setPropagationTargetZ().

Vector3DBase
Definition: Vector3DBase.h:8
TkRotation< float >
DDAxes::y
RKPropagatorInS::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
HGCal_helpers::SimpleTrackPropagator::prod_
defaultRKPropagator::Product prod_
Definition: HGCalTriggerNtupleGen.cc:65
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
HGCal_helpers::SimpleTrackPropagator::absz_target_
float absz_target_
Definition: HGCalTriggerNtupleGen.cc:66
ReferenceCountingPointer< Plane >
DDAxes::x
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
HGCal_helpers::SimpleTrackPropagator::propagate
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
Definition: HGCalTriggerNtupleGen.cc:74
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
DDAxes::z
HGCal_helpers::SimpleTrackPropagator::targetPlaneForward_
Plane::PlanePointer targetPlaneForward_
Definition: HGCalTriggerNtupleGen.cc:62
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
HGCal_helpers::SimpleTrackPropagator::field_
const MagneticField * field_
Definition: HGCalTriggerNtupleGen.cc:63
HGCal_helpers::SimpleTrackPropagator::targetPlaneBackward_
Plane::PlanePointer targetPlaneBackward_
Definition: HGCalTriggerNtupleGen.cc:62
Plane::build
static PlanePointer build(Args &&... args)
Definition: Plane.h:33
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
HGCal_helpers::SimpleTrackPropagator::RKProp
const RKPropagatorInS & RKProp() const
Definition: HGCalTriggerNtupleGen.cc:61
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
HGCal_helpers::SimpleTrackPropagator::err_
CurvilinearTrajectoryError err_
Definition: HGCalTriggerNtupleGen.cc:64
gen::C
C
Definition: PomwigHadronizer.cc:76
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
defaultRKPropagator::Product::propagator
RKPropagator propagator
Definition: defaultRKPropagator.h:48
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
TSOS
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
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