CMS 3D CMS Logo

DTRecSegment2D Class Reference

Base class for 2-parameters segments measuring position and direction in X projection. More...

#include <DataFormats/DTRecHit/interface/DTRecSegment2D.h>

Inheritance diagram for DTRecSegment2D:

RecSegment TrackingRecHit DTChamberRecSegment2D DTSLRecSegment2D

List of all members.

Public Member Functions

virtual double chi2 () const
 the chi2 of the fit
virtual DTRecSegment2Dclone () const
AlgebraicSymMatrix covMatrix () const
 the Covariance Matrix
virtual int degreesOfFreedom () const
 return the DOF of the segment
virtual int dimension () const
 return 2. The dimension of the matrix
 DTRecSegment2D (DetId id, LocalPoint &position, LocalVector &direction, AlgebraicSymMatrix &covMatrix, double chi2, std::vector< DTRecHit1D > &hits1D)
 complete constructor
 DTRecSegment2D (DetId id, const std::vector< DTRecHit1D > &hits)
 c'tor from hits
 DTRecSegment2D ()
 Constructor empty c'tor needed by POOL (I guess).
virtual LocalVector localDirection () const
 the local direction in SL frame
virtual LocalError localDirectionError () const
 the local direction error (xx,xy,yy) in SL frame: only xx is not 0.
virtual LocalPoint localPosition () const
 local position in SL frame
virtual LocalError localPositionError () const
 local position error in SL frame
virtual AlgebraicVector parameters () const
 the vector of parameters (dx/dz,x)
virtual AlgebraicSymMatrix parametersError () const
virtual AlgebraicMatrix projectionMatrix () const
 return the projection matrix, which must project a parameter vector, whose components are (q/p, dx/dz, dy/dz, x, y), into the vector returned by parameters()
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any).
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any).
std::vector< DTRecHit1DspecificRecHits () const
 Access to specific components.
double t0 () const
 Get the segment t0 (if recomputed, 0 is returned otherwise).
virtual ~DTRecSegment2D ()
 Destructor.

Protected Member Functions

void setChi2 (const double &chi2)
void setCovMatrix (const AlgebraicSymMatrix &cov)
void setDirection (const LocalVector &dir)
void setPosition (const LocalPoint &pos)
void setT0 (const double &t0)
void update (std::vector< DTRecHit1D > &updatedRecHits)

Protected Attributes

double theChi2
AlgebraicSymMatrix theCovMatrix
 mat[0][0]=sigma (dx/dz) mat[1][1]=sigma (x) mat[0][1]=cov(dx/dz,x)
LocalVector theDirection
std::vector< DTRecHit1DtheHits
LocalPoint thePosition
double theT0

Private Member Functions

void initialize () const
AlgebraicVector param (const LocalPoint &lp, const LocalVector &lv) const
AlgebraicSymMatrix parError (const LocalError &lp, const LocalError &lv) const

Static Private Attributes

static bool isInitialized
static AlgebraicMatrix theProjectionMatrix

Friends

class DTSegmentUpdator


Detailed Description

Base class for 2-parameters segments measuring position and direction in X projection.

Implements the AbstractDetMeasurement part of the interface for 2D RecHits in terms of localPosition() and localPositionError() and Direction. This segment is measuring the position and the direction in just one projection, the "X". Typical use case is a segment reconstructed only in X projection. To be used as base class for all 2D positional-directional segments. The coordinate measured is assumend to be the local "x" and "dx/dz"

2D Segments for the muon barrel system. 2D means that this segment has information about position and direction in one projection (r-phi or r-theta/zeta).

Date
2007/08/02 05:54:11
Revision
1.13
Author:
Stefano Lacaprara - INFN Legnaro <stefano.lacaprara@pd.infn.it>

Riccardo Bellan - INFN TO <riccardo.bellan@cern.ch>

Definition at line 47 of file DTRecSegment2D.h.


Constructor & Destructor Documentation

DTRecSegment2D::DTRecSegment2D (  )  [inline]

Constructor empty c'tor needed by POOL (I guess).

Definition at line 53 of file DTRecSegment2D.h.

Referenced by clone().

00053 {}

DTRecSegment2D::DTRecSegment2D ( DetId  id,
const std::vector< DTRecHit1D > &  hits 
)

c'tor from hits

DTRecSegment2D::DTRecSegment2D ( DetId  id,
LocalPoint position,
LocalVector direction,
AlgebraicSymMatrix covMatrix,
double  chi2,
std::vector< DTRecHit1D > &  hits1D 
)

complete constructor

Definition at line 53 of file DTRecSegment2D.cc.

00056                                              :
00057  RecSegment(id), thePosition(position),theDirection(direction),
00058   theCovMatrix(covMatrix),theChi2(chi2),theT0(0.),theHits(hits1D){}

virtual DTRecSegment2D::~DTRecSegment2D (  )  [inline, virtual]

Destructor.

Definition at line 65 of file DTRecSegment2D.h.

00065 {};


Member Function Documentation

virtual double DTRecSegment2D::chi2 ( void   )  const [inline, virtual]

the chi2 of the fit

Implements RecSegment.

Definition at line 106 of file DTRecSegment2D.h.

References theChi2.

Referenced by DTRecSegment4D::chi2(), DTSegmentUpdator::fitT0_seg(), operator<<(), and DTRefitAndCombineReco4D::refitSuperSegments().

00106 { return theChi2; }

virtual DTRecSegment2D* DTRecSegment2D::clone ( void   )  const [inline, virtual]

Implements TrackingRecHit.

Reimplemented in DTChamberRecSegment2D, and DTSLRecSegment2D.

Definition at line 69 of file DTRecSegment2D.h.

References DTRecSegment2D().

00069 { return new DTRecSegment2D(*this);}

AlgebraicSymMatrix DTRecSegment2D::covMatrix (  )  const [inline]

the Covariance Matrix

Definition at line 121 of file DTRecSegment2D.h.

References theCovMatrix.

Referenced by DTRecSegment4D::DTRecSegment4D().

00121 {return theCovMatrix;}

int DTRecSegment2D::degreesOfFreedom (  )  const [virtual]

return the DOF of the segment

Implements RecSegment.

Definition at line 69 of file DTRecSegment2D.cc.

References dimension(), and theHits.

Referenced by DTRecSegment4D::degreesOfFreedom(), and operator<<().

00069                                            {
00070   return theHits.size()-dimension();
00071 }

virtual int DTRecSegment2D::dimension (  )  const [inline, virtual]

return 2. The dimension of the matrix

Implements RecSegment.

Definition at line 91 of file DTRecSegment2D.h.

Referenced by degreesOfFreedom().

00091 { return 2;}

void DTRecSegment2D::initialize (  )  const [inline, private]

Definition at line 154 of file DTRecSegment2D.h.

References isInitialized, and theProjectionMatrix.

Referenced by projectionMatrix().

00154                           {
00155     isInitialized=true;
00156     theProjectionMatrix = AlgebraicMatrix( 2, 5, 0);
00157     theProjectionMatrix[0][1]=1;
00158     theProjectionMatrix[1][3]=1;
00159   }

virtual LocalVector DTRecSegment2D::localDirection (  )  const [inline, virtual]

the local direction in SL frame

Implements RecSegment.

Definition at line 100 of file DTRecSegment2D.h.

References theDirection.

Referenced by DTSegment4DQuality::analyze(), DTSegment2DQuality::analyze(), DTVDriftCalibration::analyze(), DTSegment2DSLPhiQuality::analyze(), DTRecSegment4D::DTRecSegment4D(), DTSegmentUpdator::fit(), operator<<(), parameters(), DTSegmentUpdator::updateHits(), and DTSegmentUpdator::updateHitsN().

00100 { return theDirection; }

LocalError DTRecSegment2D::localDirectionError (  )  const [virtual]

the local direction error (xx,xy,yy) in SL frame: only xx is not 0.

Implements RecSegment.

Definition at line 65 of file DTRecSegment2D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::analyze(), DTSegment2DQuality::analyze(), DTSegment2DSLPhiQuality::analyze(), and parametersError().

00065                                                     {
00066   return LocalError(theCovMatrix[0][0],0.,0.);
00067 }

virtual LocalPoint DTRecSegment2D::localPosition (  )  const [inline, virtual]

local position in SL frame

Implements TrackingRecHit.

Definition at line 94 of file DTRecSegment2D.h.

References thePosition.

Referenced by DTSegment4DQuality::analyze(), DTSegment2DQuality::analyze(), DTVDriftCalibration::analyze(), DTSegment2DSLPhiQuality::analyze(), DTRecSegment4D::DTRecSegment4D(), DTSegmentUpdator::fit(), operator<<(), parameters(), DTSegmentUpdator::updateHits(), and DTSegmentUpdator::updateHitsN().

00094 {return thePosition; }

LocalError DTRecSegment2D::localPositionError (  )  const [virtual]

local position error in SL frame

Implements TrackingRecHit.

Definition at line 61 of file DTRecSegment2D.cc.

References theCovMatrix.

Referenced by DTSegment4DQuality::analyze(), DTSegment2DQuality::analyze(), DTSegment2DSLPhiQuality::analyze(), and parametersError().

00061                                                     {
00062   return LocalError(theCovMatrix[1][1],0.,0.);
00063 }

AlgebraicVector DTRecSegment2D::param ( const LocalPoint lp,
const LocalVector lv 
) const [inline, private]

Definition at line 161 of file DTRecSegment2D.h.

References HLT_VtxMuL3::result, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by parameters().

00161                                                                             {
00162     AlgebraicVector result(2);
00163     result[1]=lp.x();
00164     result[0]=lv.x()/lv.z();
00165     return result;
00166   }

virtual AlgebraicVector DTRecSegment2D::parameters ( void   )  const [inline, virtual]

the vector of parameters (dx/dz,x)

Implements TrackingRecHit.

Definition at line 73 of file DTRecSegment2D.h.

References localDirection(), localPosition(), and param().

00073                                              {
00074     return param( localPosition(), localDirection());
00075   }

virtual AlgebraicSymMatrix DTRecSegment2D::parametersError (  )  const [inline, virtual]

Implements TrackingRecHit.

Definition at line 78 of file DTRecSegment2D.h.

References localDirectionError(), localPositionError(), and parError().

Referenced by DTSegmentUpdator::fit(), and DTRecSegment4D::setCovMatrixForZed().

00078                                                      {
00079     return parError( localPositionError(), localDirectionError());
00080   }

AlgebraicSymMatrix DTRecSegment2D::parError ( const LocalError lp,
const LocalError lv 
) const [private]

mat[0][0]=sigma (dx/dz) mat[1][1]=sigma (x) mat[0][1]=cov(dx/dz,x)

Definition at line 26 of file DTRecSegment2D.cc.

References m, and LocalError::xx().

Referenced by parametersError().

00027                                                                          {
00028   AlgebraicSymMatrix m(2);
00032   // if ( det().alignmentPositionError()) {
00033   //   LocalError lape = 
00034   //     ErrorFrameTransformer().transform( det().alignmentPositionError()->globalError(), 
00035   //                                        det().surface());
00036   //   m[0][0] = lv.xx();
00037   //   m[0][1] = 0.;
00038   //   m[1][1] = lp.xx()+lape.xx();
00039   // } else {
00040     m[0][0] = lv.xx();
00041     m[0][1] = 0.;
00042     m[1][1] = lp.xx();
00043   //};
00044   return m;
00045 
00046 }

virtual AlgebraicMatrix DTRecSegment2D::projectionMatrix (  )  const [inline, virtual]

return the projection matrix, which must project a parameter vector, whose components are (q/p, dx/dz, dy/dz, x, y), into the vector returned by parameters()

Implements TrackingRecHit.

Definition at line 85 of file DTRecSegment2D.h.

References initialize(), isInitialized, and theProjectionMatrix.

00085                                                    {
00086     if ( !isInitialized) initialize();
00087     return theProjectionMatrix;
00088   }

std::vector< TrackingRecHit * > DTRecSegment2D::recHits (  )  [virtual]

Non-const access to component RecHits (if any).

Implements TrackingRecHit.

Definition at line 91 of file DTRecSegment2D.cc.

References theHits.

00091                                                    {
00092 
00093   std::vector<TrackingRecHit*> pointersOfRecHits; 
00094     
00095   for(std::vector<DTRecHit1D>::iterator rechit = theHits.begin();
00096       rechit != theHits.end(); rechit++)
00097     pointersOfRecHits.push_back( &(*rechit) );
00098   
00099   return pointersOfRecHits;
00100 }

std::vector< const TrackingRecHit * > DTRecSegment2D::recHits (  )  const [virtual]

Access to component RecHits (if any).

Implements TrackingRecHit.

Definition at line 80 of file DTRecSegment2D.cc.

References theHits.

Referenced by DTChamberEfficiencyTask::getBestSegment(), DTChamberEfficiencyTask::isGoodSegment(), and MuonSegmentMatcher::matchDT().

00080                                                                {
00081 
00082   std::vector<const TrackingRecHit*> pointersOfRecHits; 
00083   
00084   for(std::vector<DTRecHit1D>::const_iterator rechit = theHits.begin();
00085       rechit != theHits.end(); rechit++)
00086     pointersOfRecHits.push_back( &(*rechit) );
00087   
00088   return pointersOfRecHits;
00089 }

void DTRecSegment2D::setChi2 ( const double &  chi2  )  [protected]

Definition at line 122 of file DTRecSegment2D.cc.

References theChi2.

Referenced by DTSegmentUpdator::fit().

00122                                                {
00123   theChi2=chi2;
00124 }

void DTRecSegment2D::setCovMatrix ( const AlgebraicSymMatrix cov  )  [protected]

Definition at line 118 of file DTRecSegment2D.cc.

References theCovMatrix.

Referenced by DTSegmentUpdator::fit().

00118                                                               { 
00119   theCovMatrix = cov;
00120 }

void DTRecSegment2D::setDirection ( const LocalVector dir  )  [protected]

Definition at line 114 of file DTRecSegment2D.cc.

References theDirection.

Referenced by DTSegmentUpdator::fit().

00114                                                        {
00115   theDirection=dir;
00116 }

void DTRecSegment2D::setPosition ( const LocalPoint pos  )  [protected]

Definition at line 110 of file DTRecSegment2D.cc.

References thePosition.

Referenced by DTSegmentUpdator::fit().

00110                                                      {
00111   thePosition= pos;
00112 }

void DTRecSegment2D::setT0 ( const double &  t0  )  [protected]

Definition at line 126 of file DTRecSegment2D.cc.

References theT0.

Referenced by DTSegmentUpdator::fitT0(), and DTSegmentUpdator::fitT0_seg().

00126                                           {
00127   theT0=t0;
00128 }

std::vector< DTRecHit1D > DTRecSegment2D::specificRecHits (  )  const

Access to specific components.

Definition at line 102 of file DTRecSegment2D.cc.

References theHits.

Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), DTEfficiencyTask::analyze(), DTResolutionAnalysisTask::analyze(), DTSegmentsTask::analyze(), DTVDriftCalibration::analyze(), DTSegmentAnalysisTask::analyze(), DTCalibValidation::compute(), MuonTimingExtractor::fillTiming(), DTSegmentUpdator::fit(), DTSegmentUpdator::fitT0(), DTSegmentUpdator::fitT0_seg(), MuonSegmentMatcher::matchDT(), CosmicMuonTrajectoryBuilder::t0(), DTSegmentUpdator::updateHits(), and DTSegmentUpdator::updateHitsN().

00102                                                             {
00103   return theHits;
00104 }

double DTRecSegment2D::t0 (  )  const [inline]

Get the segment t0 (if recomputed, 0 is returned otherwise).

Definition at line 124 of file DTRecSegment2D.h.

References theT0.

Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), MuonTimingExtractor::fillTiming(), and CosmicMuonTrajectoryBuilder::t0().

00124 {return theT0;}

void DTRecSegment2D::update ( std::vector< DTRecHit1D > &  updatedRecHits  )  [protected]

Definition at line 106 of file DTRecSegment2D.cc.

References theHits.

Referenced by DTSegmentUpdator::updateHits(), and DTSegmentUpdator::updateHitsN().

00106                                                                  {
00107   theHits = updatedRecHits;
00108 }


Friends And Related Function Documentation

friend class DTSegmentUpdator [friend]

Reimplemented in DTChamberRecSegment2D, and DTSLRecSegment2D.

Definition at line 127 of file DTRecSegment2D.h.


Member Data Documentation

bool DTRecSegment2D::isInitialized [static, private]

Definition at line 151 of file DTRecSegment2D.h.

Referenced by initialize(), and projectionMatrix().

double DTRecSegment2D::theChi2 [protected]

Definition at line 143 of file DTRecSegment2D.h.

Referenced by chi2(), and setChi2().

AlgebraicSymMatrix DTRecSegment2D::theCovMatrix [protected]

mat[0][0]=sigma (dx/dz) mat[1][1]=sigma (x) mat[0][1]=cov(dx/dz,x)

Definition at line 141 of file DTRecSegment2D.h.

Referenced by covMatrix(), localDirectionError(), localPositionError(), and setCovMatrix().

LocalVector DTRecSegment2D::theDirection [protected]

Definition at line 136 of file DTRecSegment2D.h.

Referenced by localDirection(), and setDirection().

std::vector<DTRecHit1D> DTRecSegment2D::theHits [protected]

Definition at line 146 of file DTRecSegment2D.h.

Referenced by degreesOfFreedom(), recHits(), specificRecHits(), and update().

LocalPoint DTRecSegment2D::thePosition [protected]

Definition at line 135 of file DTRecSegment2D.h.

Referenced by localPosition(), and setPosition().

AlgebraicMatrix DTRecSegment2D::theProjectionMatrix [static, private]

Definition at line 152 of file DTRecSegment2D.h.

Referenced by initialize(), and projectionMatrix().

double DTRecSegment2D::theT0 [protected]

Definition at line 144 of file DTRecSegment2D.h.

Referenced by setT0(), t0(), and DTSegmentUpdator::update().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:00 2009 for CMSSW by  doxygen 1.5.4