CMS 3D CMS Logo

CosmicMuonUtilities Class Reference

#include <RecoMuon/CosmicMuonProducer/interface/CosmicMuonUtilities.h>

List of all members.

Public Member Functions

 CosmicMuonUtilities ()
std::string print (const ConstRecHitContainer &) const
std::string print (const MuonRecHitContainer &) const
std::string print (const ConstMuonRecHitContainer &) const
void reverseDirection (TrajectoryStateOnSurface &, const MagneticField *) const
TrajectoryStateOnSurface stepPropagate (const TrajectoryStateOnSurface &, const ConstRecHitPointer &, const Propagator &) const
virtual ~CosmicMuonUtilities ()


Detailed Description

Definition at line 29 of file CosmicMuonUtilities.h.


Constructor & Destructor Documentation

CosmicMuonUtilities::CosmicMuonUtilities (  ) 

Definition at line 22 of file CosmicMuonUtilities.cc.

00022                                          {
00023 }

CosmicMuonUtilities::~CosmicMuonUtilities (  )  [virtual]

Definition at line 28 of file CosmicMuonUtilities.cc.

00028                                           {
00029 }


Member Function Documentation

std::string CosmicMuonUtilities::print ( const ConstRecHitContainer  )  const

std::string CosmicMuonUtilities::print ( const MuonRecHitContainer  )  const

std::string CosmicMuonUtilities::print ( const ConstMuonRecHitContainer  )  const

void CosmicMuonUtilities::reverseDirection ( TrajectoryStateOnSurface tsos,
const MagneticField mgfield 
) const

Definition at line 31 of file CosmicMuonUtilities.cc.

References TrajectoryStateOnSurface::cartesianError(), TrajectoryStateOnSurface::charge(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), and TrajectoryStateOnSurface::surface().

Referenced by CosmicMuonTrajectoryBuilder::estimateDirection(), CosmicMuonTrajectoryBuilder::flipTrajectory(), and CosmicMuonSmoother::initialState().

00031                                                                                                              {
00032 
00033    GlobalTrajectoryParameters gtp(tsos.globalPosition(),
00034                                   -tsos.globalMomentum(),
00035                                   -tsos.charge(),
00036                                   mgfield);
00037    TrajectoryStateOnSurface newTsos(gtp, tsos.cartesianError(), tsos.surface()); 
00038    tsos = newTsos;
00039    return;
00040 
00041 }

TrajectoryStateOnSurface CosmicMuonUtilities::stepPropagate ( const TrajectoryStateOnSurface tsos,
const ConstRecHitPointer hit,
const Propagator prop 
) const

Definition at line 87 of file CosmicMuonUtilities.cc.

References cmsTiming_parser::dest, lat::endl(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), LogTrace, PV3DBase< T, PVType, FrameType >::mag(), Propagator::propagate(), rot, steps, Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by CosmicMuonSmoother::fit(), and CosmicMuonSmoother::smooth().

00089                                                                              {
00090 
00091   const std::string metname = "Muon|RecoMuon|CosmicMuonUtilities";
00092 
00093   GlobalPoint start = tsos.globalPosition();
00094   GlobalPoint dest = hit->globalPosition();
00095   GlobalVector StepVector = dest - start;
00096   GlobalVector UnitStepVector = StepVector.unit();
00097   GlobalPoint GP =start;
00098   TrajectoryStateOnSurface currTsos(tsos);
00099   TrajectoryStateOnSurface predTsos;
00100   float totalDis = StepVector.mag();
00101   LogTrace(metname)<<"stepPropagate: propagate from: "<<start<<" to "<<dest;
00102   LogTrace(metname)<<"stepPropagate: their distance: "<<totalDis;
00103 
00104   int steps = 3; // need to optimize
00105 
00106   float oneStep = totalDis/steps;
00107   Basic3DVector<float> Basic3DV(StepVector.x(),StepVector.y(),StepVector.z());
00108   for ( int istep = 0 ; istep < steps - 1 ; istep++) {
00109         GP += oneStep*UnitStepVector;
00110         Surface::PositionType pos(GP.x(),GP.y(),GP.z());
00111         LogTrace(metname)<<"stepPropagate: a middle plane: "<<pos<<endl;
00112         Surface::RotationType rot( Basic3DV , float(0));
00113         PlaneBuilder::ReturnType SteppingPlane = PlaneBuilder().plane(pos,rot);
00114         TrajectoryStateOnSurface predTsos = prop.propagate(currTsos, *SteppingPlane);
00115         if (predTsos.isValid()) {
00116             currTsos=predTsos;
00117             LogTrace(metname)<<"stepPropagate: middle state "<< currTsos.globalPosition()<<endl;
00118         }
00119  }
00120 
00121   predTsos = prop.propagate(currTsos, hit->det()->surface());
00122 
00123   return predTsos;
00124 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:57 2009 for CMSSW by  doxygen 1.5.4