CMS 3D CMS Logo

FTSFromVertexToPointFactory Class Reference

Description: Utility class to create FTS from supercluster. More...

#include <RecoEgamma/EgammaElectronAlgos/interface/FTSFromVertexToPointFactory.h>

List of all members.

Public Member Functions

 FTSFromVertexToPointFactory ()
FreeTrajectoryState operator() (const MagneticField *magField, const GlobalPoint &xmeas, const GlobalPoint &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 28 of file FTSFromVertexToPointFactory.h.


Constructor & Destructor Documentation

FTSFromVertexToPointFactory::FTSFromVertexToPointFactory (  )  [inline]

Definition at line 30 of file FTSFromVertexToPointFactory.h.

00030 { };


Member Function Documentation

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

Definition at line 23 of file FTSFromVertexToPointFactory.cc.

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

00027 {
00028   double BInTesla = magField->inTesla(xmeas).z();
00029   GlobalVector xdiff = xmeas -xvert;
00030   double theta = xdiff.theta();
00031   double phi= xdiff.phi();
00032   double pt = momentum*sin(theta);
00033   double pz = momentum*cos(theta);
00034   double pxOld = pt*cos(phi);
00035   double pyOld = pt*sin(phi);
00036 
00037   double RadCurv = 100*pt/(BInTesla*0.29979);
00038   double alpha = asin(0.5*xdiff.perp()/RadCurv);
00039 
00040   float ca = cos(charge*alpha);
00041   float sa = sin(charge*alpha);
00042   double pxNew =   ca*pxOld + sa*pyOld;
00043   double pyNew =  -sa*pxOld + ca*pyOld;
00044   GlobalVector pNew(pxNew, pyNew, pz);  
00045 
00046   GlobalTrajectoryParameters gp(xmeas, pNew, charge, magField);
00047   
00048   AlgebraicSymMatrix C(5,1);
00049   FreeTrajectoryState VertexToPoint(gp,CurvilinearTrajectoryError(C));
00050 
00051   return VertexToPoint;
00052 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:21:03 2009 for CMSSW by  doxygen 1.5.4