Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoEgamma
EgammaElectronAlgos
src
FTSFromVertexToPointFactory.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: EgammaElectronAlgos
4
// Class: FTSFromVertexToPointFactory
5
//
13
//
14
// Original Author: Ursula Berthon, Claude Charlot
15
// Created: Mon Mar 27 13:22:06 CEST 2006
16
// $Id: FTSFromVertexToPointFactory.cc,v 1.6 2011/03/21 17:10:32 innocent Exp $
17
//
18
//
19
#include "
RecoEgamma/EgammaElectronAlgos/interface/FTSFromVertexToPointFactory.h
"
20
#include "
MagneticField/Engine/interface/MagneticField.h
"
21
22
23
FreeTrajectoryState
FTSFromVertexToPointFactory::operator()
(
const
MagneticField
*magField,
const
GlobalPoint
& xmeas,
24
const
GlobalPoint
& xvert,
25
float
momentum,
26
TrackCharge
charge
)
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
48
AlgebraicSymMatrix55
C
=
AlgebraicMatrixID
();
49
FreeTrajectoryState
VertexToPoint(gp,
CurvilinearTrajectoryError
(C));
50
51
return
VertexToPoint;
52
}
53
54
55
56
57
58
alpha
float alpha
Definition:
AMPTWrapper.h:95
PV3DBase::perp
T perp() const
Definition:
PV3DBase.h:71
FTSFromVertexToPointFactory::operator()
FreeTrajectoryState operator()(const MagneticField *magField, const GlobalPoint &xmeas, const GlobalPoint &xvert, float momentum, TrackCharge charge)
Definition:
FTSFromVertexToPointFactory.cc:23
Vector3DBase
Definition:
Vector3DBase.h:9
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
AlgebraicMatrixID
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
Definition:
AlgebraicROOTObjects.h:70
funct::sin
Sin< T >::type sin(const T &t)
Definition:
Sin.h:22
GlobalTrajectoryParameters
Definition:
GlobalTrajectoryParameters.h:16
PV3DBase::phi
Geom::Phi< T > phi() const
Definition:
PV3DBase.h:68
theta
Geom::Theta< T > theta() const
Definition:
Basic3DVectorLD.h:165
MagneticField
Definition:
MagneticField.h:18
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition:
AlgebraicROOTObjects.h:21
funct::C
C
Definition:
Factorize.h:141
DeDxDiscriminatorTools::charge
double charge(const std::vector< uint8_t > &Ampls)
Definition:
DeDxDiscriminatorTools.cc:43
PV3DBase::theta
Geom::Theta< T > theta() const
Definition:
PV3DBase.h:74
MagneticField.h
TrackCharge
int TrackCharge
Definition:
TrackCharge.h:4
FreeTrajectoryState
Definition:
FreeTrajectoryState.h:31
PV3DBase::z
T z() const
Definition:
PV3DBase.h:63
funct::cos
Cos< T >::type cos(const T &t)
Definition:
Cos.h:22
FTSFromVertexToPointFactory.h
Point3DBase< float, GlobalTag >
CurvilinearTrajectoryError
Definition:
CurvilinearTrajectoryError.h:27
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5