Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:54

0001 #include "SeedFromConsecutiveHitsStraightLineCreator.h"
0002 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h"
0003 
0004 bool SeedFromConsecutiveHitsStraightLineCreator::initialKinematic(GlobalTrajectoryParameters& kine,
0005                                                                   const SeedingHitSet& hits) const {
0006   const SeedingHitSet::ConstRecHitPointer& tth1 = hits[0];
0007   const SeedingHitSet::ConstRecHitPointer& tth2 = hits[1];
0008 
0009   const GlobalPoint& vertexPos = region->origin();
0010 
0011   // Assume initial state is straight line passing through beam spot
0012   // with direction given by innermost two seed hits (with big uncertainty)
0013   GlobalVector initMomentum(tth2->globalPosition() - tth1->globalPosition());
0014   double rescale = 1000. / initMomentum.perp();
0015   initMomentum *= rescale;  // set to approximately infinite momentum
0016   TrackCharge q = 1;        // irrelevant, since infinite momentum
0017   kine = GlobalTrajectoryParameters(vertexPos, initMomentum, q, magneticField_);
0018 
0019   return true;
0020 }