#include <TrackProjectors/TrackVeloPhiProjector.h>
Inheritance diagram for TrackVeloPhiProjector:
Public Member Functions | |
virtual StatusCode | project (const State &state, Measurement &meas) |
virtual StatusCode | initialize () |
initialize | |
TrackVeloPhiProjector (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard constructor. | |
virtual | ~TrackVeloPhiProjector () |
Destructor. | |
Private Attributes | |
DeVelo * | m_det |
std::string | m_veloPath |
Name of the Velo XML geom path. |
Eduardo Rodrigues
Definition at line 18 of file TrackVeloPhiProjector.h.
|
Standard constructor.
Definition at line 91 of file TrackVeloPhiProjector.cpp. References m_veloPath. 00094 : TrackProjector ( type, name , parent ) 00095 { 00096 declareInterface<ITrackProjector>(this); 00097 00098 declareProperty( "VeloGeometryPath", 00099 m_veloPath = "/dd/Structure/LHCb/Velo" ); 00100 }
|
|
Destructor.
Definition at line 104 of file TrackVeloPhiProjector.cpp. 00104 {};
|
|
initialize
Definition at line 77 of file TrackVeloPhiProjector.cpp. References m_det, and m_veloPath. 00078 { 00079 StatusCode sc = GaudiTool::initialize(); 00080 if ( sc.isFailure() ) 00081 return Error( "Failed to initialize!", sc ); 00082 00083 m_det = getDet<DeVelo>( m_veloPath ); 00084 00085 return StatusCode::SUCCESS; 00086 }
|
|
Project a state onto a measurement. It returns the chi squared of the projection Reimplemented from TrackProjector. Definition at line 24 of file TrackVeloPhiProjector.cpp. References VeloPhiMeasurement::cluster(), TrackProjector::computeErrorResidual(), m_det, and Measurement::measure(). 00026 { 00027 double x = state.x(); 00028 double y = state.y(); 00029 00030 VeloPhiMeasurement& veloPhiMeas = *( dynamic_cast<VeloPhiMeasurement*>(&meas) ); 00031 00032 int sensor = veloPhiMeas.cluster() -> sensor(); 00033 00034 double sum = 0.; 00035 double sum2 = 0.; 00036 double sums = 0.; 00037 double second = 0.; 00038 double phi = -999.; 00039 double cosPhi = 0.; 00040 double sinPhi = 0.; 00041 00042 std::vector< std::pair<long,double> > sign = veloPhiMeas.cluster()->stripSignals(); 00043 std::vector< std::pair<long,double> >::const_iterator strIt; 00044 int strip = (*sign.begin()).first; 00045 VeloChannelID channel(sensor,strip); 00046 for ( strIt = sign.begin() ; sign.end() != strIt ; strIt++ ) { 00047 strip = (*strIt).first; 00048 phi = m_det -> trgPhiDirectionOfStrip( channel ); 00049 second = (*strIt).second; 00050 sum += second; 00051 sum2 += second * second; 00052 sums += second * phi ; 00053 } 00054 if ( 0 < sum ) { 00055 double phi = sums / sum; 00056 cosPhi = cos( phi ); 00057 sinPhi = sin( phi ); 00058 } 00059 00060 unsigned int n = state.nParameters(); 00061 m_H = HepVector(n,0); 00062 00063 m_H[0] = - sinPhi; 00064 m_H[1] = cosPhi; 00065 m_H[2] = 0.; 00066 00067 m_residual = meas.measure() - ( y * cosPhi - x * sinPhi ); 00068 00069 computeErrorResidual( state, meas ); 00070 00071 return StatusCode::SUCCESS ; 00072 }
|
|
Definition at line 38 of file TrackVeloPhiProjector.h. Referenced by initialize(), and project(). |
|
Name of the Velo XML geom path.
Definition at line 40 of file TrackVeloPhiProjector.h. Referenced by initialize(), and TrackVeloPhiProjector(). |