CMS 3D CMS Logo

BzeroReferenceTrajectory.cc
Go to the documentation of this file.
1 
3 
6 
9 
10 
13  const MagneticField *magField,
14  const reco::BeamSpot& beamSpot,
16  ReferenceTrajectory(tsos.localParameters().mixedFormatVector().kSize, recHits.size(), config),
17  theMomentumEstimate(config.momentumEstimate)
18 {
19  // no check against magField == 0
20 
21  // No estimate for momentum of cosmics available -> set to default value.
24 
25  LocalTrajectoryParameters locParamWithFixedMomentum( asSVector<5>(theParameters),
26  tsos.localParameters().pzSign(),
27  tsos.localParameters().charge() );
28 
29  const TrajectoryStateOnSurface refTsosWithFixedMomentum(locParamWithFixedMomentum, tsos.localError(),
30  tsos.surface(), magField,
31  surfaceSide(config.propDir));
32 
33  if (config.hitsAreReverse)
34  {
36  fwdRecHits.reserve(recHits.size());
37 
38  for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin(); it != recHits.rend(); ++it)
39  fwdRecHits.push_back(*it);
40 
41  theValidityFlag = this->construct(refTsosWithFixedMomentum, fwdRecHits, magField, beamSpot);
42  } else {
43  theValidityFlag = this->construct(refTsosWithFixedMomentum, recHits, magField, beamSpot);
44  }
45 
46  // Exclude momentum from the parameters and also the derivatives of the measurements w.r.t. the momentum.
47  theParameters = theParameters.sub( 2, 5 );
48  theDerivatives = theDerivatives.sub( 1, theDerivatives.num_row(), 2, theDerivatives.num_col() );
49 }
size
Write out results.
const LocalTrajectoryParameters & localParameters() const
Definition: config.py:1
SurfaceSide surfaceSide(const PropagationDirection dir) const
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
const SurfaceType & surface() const
const LocalTrajectoryError & localError() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlgebraicVector5 mixedFormatVector() const
TrackCharge charge() const
Charge (-1, 0 or 1)
BzeroReferenceTrajectory(const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
float pzSign() const
Sign of the z-component of the momentum in the local frame.
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:48