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

VeloPhiMeasurement Class Reference

#include <VeloPhiMeasurement.h>

Inheritance diagram for VeloPhiMeasurement:

Measurement List of all members.

Public Member Functions

 VeloPhiMeasurement (VeloCluster &cluster, DeVelo &det)
 Constructor from an VeloPhiCluster.
 VeloPhiMeasurement ()
 Default Constructor.
virtual ~VeloPhiMeasurement ()
 Default Destructor.
VeloPhiMeasurementclone () const
 Clone the VeloPhiMeasurement.
const VeloCluster * cluster () const
 Retrieve const Pointer to the VeloPhiCluster.
VeloCluster * cluster ()
 Retrieve Pointer to the VeloPhiCluster.
void setCluster (VeloCluster *value)
 Update Pointer to the VeloPhiCluster.

Private Attributes

VeloCluster * m_cluster
 Pointer to the VeloPhiCluster.

Detailed Description

VeloPhiMeasurement is a measurement made from a VeloPhiCluster.

Author:
Jose Hernando, Eduardo Rodrigues created Thu Apr 7 22:55:04 2005

Definition at line 35 of file VeloPhiMeasurement.h.


Constructor & Destructor Documentation

VeloPhiMeasurement::VeloPhiMeasurement VeloCluster &  cluster,
DeVelo &  det
 

Constructor from an VeloPhiCluster.

Definition at line 20 of file VeloPhiMeasurement.cpp.

References cluster(), and m_cluster.

00021                                                       {
00022 
00023   m_cluster = &cluster;
00024   
00025   int sensor = m_cluster -> sensor();
00026   double sum   = 0.;
00027   double sum2  = 0.;
00028   double sums  = 0.;
00029   double phi   = -999.;
00030 
00031   // Compute the average phi direction, and the total width in phi unit
00032   // Store also the 'position', which is the signed distance from strip to
00033   // the origin.
00034 
00035   std::vector< std::pair<long,double> > sign = m_cluster->stripSignals();
00036   std::vector< std::pair<long,double> >::const_iterator strIt;
00037   int strip    = (*sign.begin()).first;
00038   VeloChannelID channel(sensor,strip);
00039   double pitch  = det.phiPitch( channel );
00040   for ( strIt = sign.begin() ; sign.end() != strIt ; strIt++ ) {
00041     strip      = (*strIt).first;
00042     m_measure = det.distToOrigin( channel );
00043     // fix sign convention of d0 of strip
00044     if( ! det.isDownstreamSensor(sensor)   ) {
00045       m_measure = -m_measure;
00046     }
00047     phi        =  det.trgPhiDirectionOfStrip( channel );
00048     sum       += (*strIt).second;
00049     sum2      += pow((*strIt).second,2) ;
00050     sums      += (*strIt).second * phi ;
00051   }
00052 
00053   if ( 0 < sum ) {
00054     // double phi = sums / sum;
00055     // m_cosPhi = cos( phi );
00056     // m_sinPhi = sin( phi );
00057     // MM+
00058     // m_errMeasure  = ( pitch / sum) * sqrt( sum2 / 12 );
00059     m_errMeasure  = 0.8 * ( pitch / sum) * sqrt( sum2 / 12 );
00060     // m_errMeasure = 0.254*pitch - 0.0049*mm;
00061     // MM-
00062   }
00063 
00064   m_z = det.zSensor( m_cluster->sensor() );
00065 
00066 }

VeloPhiMeasurement::VeloPhiMeasurement  )  [inline]
 

Default Constructor.

Definition at line 44 of file VeloPhiMeasurement.h.

References m_cluster.

Referenced by clone().

00044 : m_cluster() {}

virtual VeloPhiMeasurement::~VeloPhiMeasurement  )  [inline, virtual]
 

Default Destructor.

Definition at line 47 of file VeloPhiMeasurement.h.

00047 {}


Member Function Documentation

VeloPhiMeasurement * VeloPhiMeasurement::clone  )  const [inline, virtual]
 

Clone the VeloPhiMeasurement.

Reimplemented from Measurement.

Definition at line 90 of file VeloPhiMeasurement.h.

References VeloPhiMeasurement().

00091 {
00092 
00093   VeloPhiMeasurement* me = new VeloPhiMeasurement(); *me = *this; return me;
00094         
00095 }

VeloCluster * VeloPhiMeasurement::cluster  )  [inline]
 

Retrieve Pointer to the VeloPhiCluster.

Definition at line 80 of file VeloPhiMeasurement.h.

References m_cluster.

00081 {
00082   return m_cluster;
00083 }

const VeloCluster * VeloPhiMeasurement::cluster  )  const [inline]
 

Retrieve const Pointer to the VeloPhiCluster.

Definition at line 75 of file VeloPhiMeasurement.h.

References m_cluster.

Referenced by TrackVeloPhiProjector::project(), and VeloPhiMeasurement().

00076 {
00077   return m_cluster;
00078 }

void VeloPhiMeasurement::setCluster VeloCluster *  value  )  [inline]
 

Update Pointer to the VeloPhiCluster.

Definition at line 85 of file VeloPhiMeasurement.h.

References m_cluster.

00086 {
00087   m_cluster = value;
00088 }


Member Data Documentation

VeloCluster* VeloPhiMeasurement::m_cluster [private]
 

Pointer to the VeloPhiCluster.

Definition at line 65 of file VeloPhiMeasurement.h.

Referenced by cluster(), setCluster(), and VeloPhiMeasurement().


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