TrackingTools
PatternTools
src
TSCBLBuilderWithPropagator.cc
Go to the documentation of this file.
1
#include "
TrackingTools/PatternTools/interface/TSCBLBuilderWithPropagator.h
"
2
#include "
TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h
"
3
#include "
TrackingTools/PatternTools/interface/TrajectoryExtrapolatorToLine.h
"
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
5
6
using namespace
std
;
7
8
TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator
(
const
MagneticField
* field)
9
: thePropagator(new
AnalyticalPropagator
(field,
anyDirection
)) {}
10
11
TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator
(
const
Propagator
& u) : thePropagator(u.
clone
()) {
12
thePropagator
->
setPropagationDirection
(
anyDirection
);
13
}
14
15
TrajectoryStateClosestToBeamLine
TSCBLBuilderWithPropagator::operator()
(
const
FreeTrajectoryState
& originalFTS,
16
const
reco::BeamSpot
&
beamSpot
)
const
{
17
GlobalPoint
bspos(
beamSpot
.position().x(),
beamSpot
.position().y(),
beamSpot
.position().z());
18
GlobalVector
bsvec(
beamSpot
.dxdz(),
beamSpot
.dydz(), 1.);
19
Line
bsline(bspos, bsvec);
20
21
TrajectoryExtrapolatorToLine
tetl;
22
23
TrajectoryStateOnSurface
tsosfinal = tetl.
extrapolate
(originalFTS, bsline, *
thePropagator
);
24
25
if
(!tsosfinal.
isValid
())
26
return
TrajectoryStateClosestToBeamLine
();
27
28
//Compute point on beamline of closest approach
29
GlobalPoint
tp
= tsosfinal.
globalPosition
();
//position of trajectory closest approach
30
GlobalVector
hyp(
31
tp
.x() - bspos.x(),
tp
.y() - bspos.y(),
tp
.z() - bspos.z());
//difference between traj and beamline reference
32
double
l
= bsline.
direction
().
dot
(hyp);
//length along beamline away from reference point
33
GlobalPoint
closepoint = bspos +
l
* bsvec;
34
35
//Get the free state and return the TSCBL
36
const
FreeTrajectoryState
theFTS = *tsosfinal.
freeState
();
37
return
TrajectoryStateClosestToBeamLine
(theFTS, closepoint,
beamSpot
);
38
}
Vector3DBase
Definition:
Vector3DBase.h:8
TrajectoryStateClosestToBeamLine
Definition:
TrajectoryStateClosestToBeamLine.h:15
TSCBLBuilderWithPropagator::operator()
TrajectoryStateClosestToBeamLine operator()(const FTS &originalFTS, const reco::BeamSpot &beamSpot) const override
Definition:
TSCBLBuilderWithPropagator.cc:15
anyDirection
Definition:
PropagationDirection.h:4
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition:
pwdgSkimBPark_cfi.py:5
MessageLogger.h
TSCBLBuilderWithPropagator::thePropagator
DeepCopyPointerByClone< Propagator > thePropagator
Definition:
TSCBLBuilderWithPropagator.h:29
TrajectoryExtrapolatorToLine
Definition:
TrajectoryExtrapolatorToLine.h:8
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition:
TrajectoryStateOnSurface.h:65
TrajectoryExtrapolatorToLine.h
TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator
TSCBLBuilderWithPropagator(const MagneticField *field)
constructor with default geometrical propagator
Definition:
TSCBLBuilderWithPropagator.cc:8
Propagator
Definition:
Propagator.h:44
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition:
TrajectoryStateOnSurface.h:58
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition:
eve_macros.cc:135
reco::BeamSpot
Definition:
BeamSpot.h:21
TrajectoryExtrapolatorToLine::extrapolate
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const Line &L, const Propagator &p) const
extrapolation with user-supplied propagator
Definition:
TrajectoryExtrapolatorToLine.cc:9
Point3DBase< float, GlobalTag >
Propagator::setPropagationDirection
virtual void setPropagationDirection(PropagationDirection dir)
Definition:
Propagator.h:130
cmsswSequenceInfo.tp
tp
Definition:
cmsswSequenceInfo.py:17
AnalyticalPropagator_cfi.AnalyticalPropagator
AnalyticalPropagator
Definition:
AnalyticalPropagator_cfi.py:3
TSCBLBuilderWithPropagator.h
Line::direction
DirectionType direction() const
Definition:
Line.h:25
Line
Definition:
Line.h:10
AnalyticalPropagator.h
Vector3DBase::dot
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition:
Vector3DBase.h:99
cmsLHEtoEOSManager.l
l
Definition:
cmsLHEtoEOSManager.py:204
std
Definition:
JetResolutionObject.h:76
FreeTrajectoryState
Definition:
FreeTrajectoryState.h:27
MagneticField
Definition:
MagneticField.h:19
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition:
TrajectoryStateOnSurface.h:54
Generated for CMSSW Reference Manual by
1.8.16