#include <TrackProjectors/TrackOTProjector.h>
Inheritance diagram for TrackOTProjector:
Public Member Functions | |
virtual StatusCode | project (const State &state, Measurement &meas) |
virtual StatusCode | initialize () |
initialize | |
TrackOTProjector (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard constructor. | |
virtual | ~TrackOTProjector () |
Destructor. | |
Private Attributes | |
DeOTDetector * | m_det |
std::string | m_otTrackerPath |
Name of the OT XML geom path. |
Eduardo Rodrigues
Definition at line 18 of file TrackOTProjector.h.
|
Standard constructor.
Definition at line 95 of file TrackOTProjector.cpp. References m_otTrackerPath. 00098 : TrackProjector ( type, name , parent ) 00099 { 00100 declareInterface<ITrackProjector>(this); 00101 00102 declareProperty( "OTGeometryPath", 00103 m_otTrackerPath = DeOTDetectorLocation::Default ); 00104 }
|
|
Destructor.
Definition at line 108 of file TrackOTProjector.cpp. 00108 {};
|
|
initialize
Definition at line 81 of file TrackOTProjector.cpp. References m_det, and m_otTrackerPath. 00082 { 00083 StatusCode sc = GaudiTool::initialize(); 00084 if ( sc.isFailure() ) 00085 return Error( "Failed to initialize!", sc ); 00086 00087 m_det = getDet<DeOTDetector>( m_otTrackerPath ); 00088 00089 return StatusCode::SUCCESS; 00090 }
|
|
Project a state onto a measurement. It returns the chi squared of the projection Reimplemented from TrackProjector. Definition at line 24 of file TrackOTProjector.cpp. References OTMeasurement::ambiguity(), TrackProjector::computeErrorResidual(), m_det, Measurement::measure(), and OTMeasurement::tu(). 00026 { 00027 double x = state.x(); 00028 double y = state.y(); 00029 double tx = state.tx(); 00030 double ty = state.ty(); 00031 00032 OTMeasurement& otmeas = *( dynamic_cast<OTMeasurement*>(&meas) ); 00033 00034 OTChannelID OTChan = meas.lhcbID().otID(); 00035 DeOTModule* module = m_det -> module( OTChan ); 00036 double stereoAngle = module -> stereoAngle(); 00037 00038 double driftVelocity = m_det -> driftDelay(); // ns/mm 00039 double wireVelocity = m_det -> propagationDelay(); // ns/mm 00040 00041 HepPoint3D VwirePos = module->centerOfStraw( OTChan.straw() ); 00042 double wirePos = VwirePos.x() * cos(stereoAngle) 00043 + VwirePos.y() * sin(stereoAngle); 00044 00045 double wireLength = module -> wireLength(); 00046 00047 double cosA = cos( stereoAngle ); 00048 double sinA = sin( stereoAngle ); 00049 double tu = ( otmeas.tu() > 990.0 ) ? (tx * cosA + ty * sinA) : tu = otmeas.tu(); 00050 double cosU = 1./sqrt( 1.+ tu*tu ); 00051 double du = (x * cosA + y * sinA - wirePos) * driftVelocity; 00052 double wireDist = ( x * cosA + y * sinA - wirePos ) * cosU; 00053 double time = driftVelocity * wireDist 00054 + wireVelocity * otmeas.ambiguity() * ( wireLength - fabs(y) ); 00055 00056 unsigned int n = state.nParameters(); 00057 m_H = HepVector(n,0); 00058 m_H[0] = cosA * cosU * driftVelocity; 00059 m_H[1] = sinA * cosU * driftVelocity 00060 - otmeas.ambiguity() * wireVelocity * y/fabs(y); 00061 if ( tu > 990.0 ) { 00062 m_H[2] = -du * tu * pow( cosU, 3) * cosA; 00063 m_H[3] = -du * tu * pow( cosU, 3) * sinA; 00064 } 00065 else { 00066 m_H[2] = 0.; 00067 m_H[3] = 0.; 00068 } 00069 00070 // this shouls be ~ equivalent to : computeResidual(state,meas); 00071 m_residual = meas.measure() - time; 00072 00073 computeErrorResidual( state, meas ); 00074 00075 return StatusCode::SUCCESS; 00076 }
|
|
Definition at line 38 of file TrackOTProjector.h. Referenced by initialize(), and project(). |
|
Name of the OT XML geom path.
Definition at line 40 of file TrackOTProjector.h. Referenced by initialize(), and TrackOTProjector(). |