CMS 3D CMS Logo

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 f, objects.autophobj::float, runTauDisplay::gp, MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::perp(), EnergyCorrector::pt, mathSSE::sqrt(), Vector3DBase< T, FrameTag >::unit(), 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  auto BInTesla = magField.inTesla(xmeas).z();
29  GlobalVector xdiff = xmeas - xvert;
30  auto mom = momentum*xdiff.unit();
31  auto pt = mom.perp();
32  auto pz = mom.z();
33  auto pxOld = mom.x();
34  auto pyOld = mom.y();
35 
36 
37  auto curv = (BInTesla*0.29979f*0.01f)/pt;
38 
39  // stays as doc...
40  // auto alpha = std::asin(0.5f*xdiff.perp()*curv);
41  // auto ca = std::cos(float(charge)*alpha);
42  // auto sa = std::sin(float(charge)*alpha);
43 
44  auto sa = 0.5f*xdiff.perp()*curv*float(charge);
45  auto ca = sqrt(1.f-sa*sa);
46 
47  auto pxNew = ca*pxOld + sa*pyOld;
48  auto pyNew = -sa*pxOld + ca*pyOld;
49  GlobalVector pNew(pxNew, pyNew, pz);
50 
51  GlobalTrajectoryParameters gp(xmeas, pNew, charge, & magField);
52 
53  return FreeTrajectoryState(gp);
54 }
T perp() const
Definition: PV3DBase.h:72
T sqrt(T t)
Definition: SSEVec.h:18
double f[11][100]
Vector3DBase unit() const
Definition: Vector3DBase.h:57