CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BzeroReferenceTrajectory.cc
Go to the documentation of this file.
1 
3 
6 
9 
12  const MagneticField* magField,
13  const reco::BeamSpot& beamSpot,
15  : ReferenceTrajectory(tsos.localParameters().mixedFormatVector().kSize, recHits.size(), config),
16  theMomentumEstimate(config.momentumEstimate) {
17  // no check against magField == 0
18 
19  // No estimate for momentum of cosmics available -> set to default value.
22 
23  LocalTrajectoryParameters locParamWithFixedMomentum(
24  asSVector<5>(theParameters), tsos.localParameters().pzSign(), tsos.localParameters().charge());
25 
26  const TrajectoryStateOnSurface refTsosWithFixedMomentum(
27  locParamWithFixedMomentum, tsos.localError(), tsos.surface(), magField, surfaceSide(config.propDir));
28 
29  if (config.hitsAreReverse) {
31  fwdRecHits.reserve(recHits.size());
32 
33  for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it = recHits.rbegin();
34  it != recHits.rend();
35  ++it)
36  fwdRecHits.push_back(*it);
37 
38  theValidityFlag = this->construct(refTsosWithFixedMomentum, fwdRecHits, magField, beamSpot);
39  } else {
40  theValidityFlag = this->construct(refTsosWithFixedMomentum, recHits, magField, beamSpot);
41  }
42 
43  // Exclude momentum from the parameters and also the derivatives of the measurements w.r.t. the momentum.
44  theParameters = theParameters.sub(2, 5);
45  theDerivatives = theDerivatives.sub(1, theDerivatives.num_row(), 2, theDerivatives.num_col());
46 }
const LocalTrajectoryParameters & localParameters() const
const auto & magField
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)
tuple config
parse the configuration file
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:53
tuple size
Write out results.