CMS 3D CMS Logo

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 }
ReferenceTrajectoryBase::recHits
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
Definition: ReferenceTrajectoryBase.h:215
TrajectoryStateOnSurface.h
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
AlgebraicObjects.h
BzeroReferenceTrajectory::theMomentumEstimate
double theMomentumEstimate
Definition: BzeroReferenceTrajectory.h:55
ReferenceTrajectoryBase::theDerivatives
AlgebraicMatrix theDerivatives
Definition: ReferenceTrajectoryBase.h:255
ReferenceTrajectoryBase::Config
Definition: ReferenceTrajectoryBase.h:121
TransientTrackingRecHit.h
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
config
Definition: config.py:1
LocalTrajectoryParameters.h
ReferenceTrajectoryBase::theParameters
AlgebraicVector theParameters
Definition: ReferenceTrajectoryBase.h:252
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
reco::BeamSpot
Definition: BeamSpot.h:21
LocalTrajectoryParameters::charge
TrackCharge charge() const
Charge (-1, 0 or 1)
Definition: LocalTrajectoryParameters.h:110
ReferenceTrajectory::surfaceSide
SurfaceSide surfaceSide(const PropagationDirection dir) const
Definition: ReferenceTrajectory.h:169
BzeroReferenceTrajectory.h
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
LocalTrajectoryParameters::pzSign
float pzSign() const
Sign of the z-component of the momentum in the local frame.
Definition: LocalTrajectoryParameters.h:146
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
LocalTrajectoryParameters::mixedFormatVector
AlgebraicVector5 mixedFormatVector() const
Definition: LocalTrajectoryParameters.h:135
ReferenceTrajectory::construct
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
Definition: ReferenceTrajectory.cc:115
ReferenceTrajectory
Definition: ReferenceTrajectory.h:55
asHepVector
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:52
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
BzeroReferenceTrajectory::BzeroReferenceTrajectory
BzeroReferenceTrajectory(const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
Definition: BzeroReferenceTrajectory.cc:10
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
MagneticField
Definition: MagneticField.h:19
ReferenceTrajectoryBase::theValidityFlag
bool theValidityFlag
Definition: ReferenceTrajectoryBase.h:235
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443