Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TrackVeloRProjector Class Reference

#include <TrackProjectors/TrackVeloRProjector.h>

Inheritance diagram for TrackVeloRProjector:

TrackProjector ITrackProjector List of all members.

Public Member Functions

virtual StatusCode project (const State &state, Measurement &meas)
virtual StatusCode initialize ()
 initialize
 TrackVeloRProjector (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
virtual ~TrackVeloRProjector ()
 Destructor.

Private Attributes

DeVelo * m_det
std::string m_veloPath
 Name of the Velo XML geom path.

Detailed Description

Author:
Jose Hernando

Eduardo Rodrigues

Date:
2005-04-13

Definition at line 18 of file TrackVeloRProjector.h.


Constructor & Destructor Documentation

TrackVeloRProjector::TrackVeloRProjector const std::string &  type,
const std::string &  name,
const IInterface *  parent
 

Standard constructor.

Definition at line 77 of file TrackVeloRProjector.cpp.

References m_veloPath.

00080   : TrackProjector ( type, name , parent )
00081 {
00082   declareInterface<ITrackProjector>(this);
00083 
00084   declareProperty( "VeloGeometryPath",
00085                    m_veloPath = "/dd/Structure/LHCb/Velo" );
00086 }

TrackVeloRProjector::~TrackVeloRProjector  )  [virtual]
 

Destructor.

Definition at line 90 of file TrackVeloRProjector.cpp.

00090 {}; 


Member Function Documentation

StatusCode TrackVeloRProjector::initialize  )  [virtual]
 

initialize

Definition at line 63 of file TrackVeloRProjector.cpp.

References m_det, and m_veloPath.

00064 {
00065   StatusCode sc = GaudiTool::initialize();
00066   if ( sc.isFailure() )
00067     return Error( "Failed to initialize!", sc );
00068 
00069   m_det = getDet<DeVelo>( m_veloPath );
00070 
00071   return StatusCode::SUCCESS;
00072 }

StatusCode TrackVeloRProjector::project const State state,
Measurement meas
[virtual]
 

Project a state onto a measurement. It returns the chi squared of the projection

Reimplemented from TrackProjector.

Definition at line 24 of file TrackVeloRProjector.cpp.

References TrackProjector::computeErrorResidual(), Measurement::measure(), and VeloRMeasurement::phi().

00026 {
00027   double h = 0;
00028 
00029   double x  = state.x();
00030   double y  = state.y();
00031 
00032   VeloRMeasurement& veloRMeas = *( dynamic_cast<VeloRMeasurement*>(&meas) );
00033 
00034   double phi = veloRMeas.phi();
00035 
00036   unsigned int n = state.nParameters();
00037   m_H = HepVector(n,0);
00038   
00039   // calculate h (predicted R)
00040   if ( phi > 990.0 ) {
00041     h      = sqrt( x*x + y*y );
00042     m_H[0] = x / h;
00043     m_H[1] = y / h;
00044   }
00045   else {
00046     h = x * cos( phi ) + y * sin( phi );
00047     m_H[0] = cos( phi );
00048     m_H[1] = sin( phi );
00049   }
00050   m_H[2] = 0.;
00051   m_H[3] = 0.;
00052 
00053   m_residual = meas.measure() - h;
00054 
00055   computeErrorResidual( state, meas );
00056 
00057   return StatusCode::SUCCESS; 
00058 }


Member Data Documentation

DeVelo* TrackVeloRProjector::m_det [private]
 

Definition at line 38 of file TrackVeloRProjector.h.

Referenced by initialize().

std::string TrackVeloRProjector::m_veloPath [private]
 

Name of the Velo XML geom path.

Definition at line 40 of file TrackVeloRProjector.h.

Referenced by initialize(), and TrackVeloRProjector().


The documentation for this class was generated from the following files:
Generated on Wed May 4 11:52:43 2005 for New Track Event Model by doxygen 1.4.1