00001 // $Id: OTMeasurement.cpp,v 1.4 2005/06/29 13:36:20 erodrigu Exp $ 00002 // Include files 00003 00004 // local 00005 #include "Event/OTMeasurement.h" 00006 00007 //----------------------------------------------------------------------------- 00008 // Implementation file for class : OTMeasurement 00009 // 00010 // 2005-04-07 : Jose Hernando, Eduardo Rodrigues 00011 // Author: Rutger van der Eijk 00012 // Created: 07-04-1999 00013 //----------------------------------------------------------------------------- 00014 00015 //============================================================================= 00016 // Standard constructor, initializes variables 00017 //============================================================================= 00018 OTMeasurement::OTMeasurement( OTTime& otTime, 00019 DeOTDetector& geom, 00020 int ambiguity, 00021 double tu ) { 00022 00023 m_mtype = Measurement::OT; 00024 00025 m_tu = tu; 00026 m_time = &otTime; // pointer to hit 00027 m_ambiguity = ambiguity; // drift ambiguity 00028 00029 // set the LHCbID and ambiguity 00030 setLhcbID( LHCbID( m_time -> channel() ) ); 00031 00032 // spareBits: 11 / 10 for ambiguity = +1 / -1 00033 if ( ambiguity != 0 ) { 00034 ( ambiguity < 0 ) ? lhcbID().setSpareBits( 2 ) : lhcbID().setSpareBits( 3 ); 00035 } 00036 else { 00037 lhcbID().setSpareBits( 0 ); 00038 } 00039 00040 // some constants... 00041 double driftVelocity = geom.driftDelay(); // ns/mm 00042 // double wireVelocity = geom.propagationDelay(); // ns/mm 00043 00044 m_measure = m_time->calibratedTime() * m_ambiguity; 00045 m_errMeasure = geom.resolution() * driftVelocity; 00046 00047 OTChannelID OTChan = m_time->channel(); 00048 DeOTModule* module = geom.module( OTChan ); 00049 HepPoint3D wirePos = module->centerOfStraw( OTChan.straw() ); 00050 00051 // double stereoAngle = module->stereoAngle(); 00052 // double mwirePos = wirePos.x() * cos(stereoAngle) + 00053 // wirePos.y() * sin(stereoAngle); 00054 m_z = wirePos.z(); 00055 // m_wireLength = module->wireLength(); 00056 00057 } 00058 //=============================================================================