CMS 3D CMS Logo

DualBzeroReferenceTrajectory.cc

Go to the documentation of this file.
00001 
00002 #include "Alignment/ReferenceTrajectories/interface/DualBzeroReferenceTrajectory.h"
00003 
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 
00006 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h" 
00007 #include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h"
00008 
00009 #include "Alignment/ReferenceTrajectories/interface/BzeroReferenceTrajectory.h"
00010 
00011 
00012 DualBzeroReferenceTrajectory::DualBzeroReferenceTrajectory( const TrajectoryStateOnSurface &referenceTsos,
00013                                                             const ConstRecHitContainer &forwardRecHits,
00014                                                             const ConstRecHitContainer &backwardRecHits,
00015                                                             const MagneticField *magField,
00016                                                             MaterialEffects materialEffects,
00017                                                             PropagationDirection propDir,
00018                                                             double mass,
00019                                                             double momentumEstimate )
00020   : DualReferenceTrajectory( referenceTsos.localParameters().mixedFormatVector().kSize - 1,
00021                              numberOfUsedRecHits(forwardRecHits) + numberOfUsedRecHits(backwardRecHits) - 1 ),
00022     theMomentumEstimate( momentumEstimate )
00023 {
00024   theValidityFlag = DualReferenceTrajectory::construct( referenceTsos,
00025                                                         forwardRecHits,
00026                                                         backwardRecHits,
00027                                                         mass, materialEffects,
00028                                                         propDir, magField );
00029 }
00030 
00031 
00032 ReferenceTrajectory*
00033 DualBzeroReferenceTrajectory::construct(const TrajectoryStateOnSurface &referenceTsos, 
00034                                    const ConstRecHitContainer &recHits,
00035                                    double mass, MaterialEffects materialEffects,
00036                                    const PropagationDirection propDir,
00037                                    const MagneticField *magField) const
00038 {
00039   return new BzeroReferenceTrajectory(referenceTsos, recHits,
00040                                       false, magField,
00041                                       materialEffects, propDir,
00042                                       mass, theMomentumEstimate);
00043 }
00044 
00045 
00046 AlgebraicVector
00047 DualBzeroReferenceTrajectory::extractParameters(const TrajectoryStateOnSurface &referenceTsos) const
00048 {
00049   AlgebraicVector param = asHepVector<5>( referenceTsos.localParameters().mixedFormatVector() );
00050   return param.sub( 2, 5 );
00051 }

Generated on Tue Jun 9 17:24:59 2009 for CMSSW by  doxygen 1.5.4