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 Fri Jun 17 15:18:59 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(), m_cluster, and Measurement::setLhcbID().

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

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 Mon Jul 4 13:54:56 2005 for New Track Event Model by doxygen 1.4.1