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

TrackITProjector.cpp

Go to the documentation of this file.
00001 // Include files 
00002 // -------------
00003 // from Gaudi
00004 #include "GaudiKernel/ToolFactory.h" 
00005 
00006 // local
00007 #include "TrackProjectors/TrackITProjector.h"
00008 
00009 //-----------------------------------------------------------------------------
00010 // Implementation file for class : TrackITProjector
00011 //
00012 // 2005-04-08 : Jose Hernando, Eduardo Rodrigues
00013 //-----------------------------------------------------------------------------
00014 
00015 // Declaration of the Tool Factory
00016 static const  ToolFactory<TrackITProjector>          s_factory ;
00017 const        IToolFactory& TrackITProjectorFactory = s_factory ; 
00018 
00019 //=============================================================================
00020 //  Project a state onto a measurement.
00021 // It returns the chi squared of the projection
00022 //=============================================================================
00023 StatusCode TrackITProjector::project( const State& state,
00024                                       Measurement& meas )
00025 {
00026   ITChannelID ITChan = meas.lhcbID().stID();
00027   const STDetectionLayer* ITLay = m_det -> layer( ITChan );
00028   double stereoAngle  = ITLay->stereoAngle();
00029 
00030   unsigned int n = state.nParameters();
00031   m_H = HepVector(n,0);
00032   m_H[0] = cos( stereoAngle );
00033   m_H[1] = sin( stereoAngle );
00034 
00035   // equivalent to computeResidual(state,meas);
00036   m_residual = meas.measure()
00037                - state.x() * cos( stereoAngle )
00038                - state.y() * sin( stereoAngle );
00039 
00040   computeErrorResidual( state, meas );
00041   
00042   return StatusCode::SUCCESS; 
00043 
00044 }
00045 
00046 //=============================================================================
00047 // Initialize
00048 //=============================================================================
00049 StatusCode TrackITProjector::initialize()
00050 {
00051   StatusCode sc = GaudiTool::initialize();
00052   if ( sc.isFailure() )
00053     return Error( "Failed to initialize!", sc );
00054 
00055   m_det = getDet<DeSTDetector>( m_itTrackerPath );
00056 
00057   return StatusCode::SUCCESS;
00058 }
00059 
00060 //=============================================================================
00061 // Standard constructor, initializes variables
00062 //=============================================================================
00063 TrackITProjector::TrackITProjector( const std::string& type,
00064                                     const std::string& name,
00065                                     const IInterface* parent )
00066   : TrackProjector ( type, name , parent )
00067 {
00068   declareInterface<ITrackProjector>(this);
00069 
00070   declareProperty( "ITGeometryPath",
00071                    m_itTrackerPath = DeSTDetectorLocation::Default );
00072 }
00073 
00074 //=============================================================================
00075 // Destructor
00076 //=============================================================================
00077 TrackITProjector::~TrackITProjector() {}; 
00078 
00079 //=============================================================================

Generated on Wed May 4 11:52:35 2005 for New Track Event Model by doxygen 1.4.1