CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
FTSFromVertexToPointFactory Class Reference

#include <FTSFromVertexToPointFactory.h>

Static Public Member Functions

static FreeTrajectoryState get (MagneticField const &magField, GlobalPoint const &xmeas, GlobalPoint const &xvert, float momentum, TrackCharge charge)
 

Detailed Description

Description: Utility class to create FTS from supercluster

Implementation: should go somewhere else in the future

Definition at line 29 of file FTSFromVertexToPointFactory.h.

Member Function Documentation

FreeTrajectoryState FTSFromVertexToPointFactory::get ( MagneticField const &  magField,
GlobalPoint const &  xmeas,
GlobalPoint const &  xvert,
float  momentum,
TrackCharge  charge 
)
static

Definition at line 22 of file FTSFromVertexToPointFactory.cc.

References alpha, funct::C, funct::cos(), MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::perp(), phi, PV3DBase< T, PVType, FrameType >::phi(), EnergyCorrector::pt, funct::sin(), PV3DBase< T, PVType, FrameType >::theta(), theta(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), ElectronSeedAnalyzer::analyze(), HLTPMMassFilter::approxMomAtVtx(), PixelHitMatcher::compatibleHits(), PixelHitMatcher::compatibleSeeds(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), and SeedFilter::seeds().

27 {
28  double BInTesla = magField.inTesla(xmeas).z();
29  GlobalVector xdiff = xmeas - xvert;
30  double theta = xdiff.theta();
31  double phi= xdiff.phi();
32  double pt = momentum*sin(theta);
33  double pz = momentum*cos(theta);
34  double pxOld = pt*cos(phi);
35  double pyOld = pt*sin(phi);
36 
37  double RadCurv = 100*pt/(BInTesla*0.29979);
38  double alpha = asin(0.5*xdiff.perp()/RadCurv);
39 
40  float ca = cos(charge*alpha);
41  float sa = sin(charge*alpha);
42  double pxNew = ca*pxOld + sa*pyOld;
43  double pyNew = -sa*pxOld + ca*pyOld;
44  GlobalVector pNew(pxNew, pyNew, pz);
45 
46  GlobalTrajectoryParameters gp(xmeas, pNew, charge, & magField);
47 
50 
51  return VertexToPoint;
52 }
float alpha
Definition: AMPTWrapper.h:95
T perp() const
Definition: PV3DBase.h:72
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
Geom::Theta< T > theta() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
Cos< T >::type cos(const T &t)
Definition: Cos.h:22