CMS 3D CMS Logo

ForwardDetLayer Class Reference

A specialization of the DetLayer interface for forward layers. More...

#include <TrackingTools/DetLayers/interface/ForwardDetLayer.h>

Inheritance diagram for ForwardDetLayer:

DetLayer GeometricSearchDet PixelForwardLayer RingedForwardLayer TECLayer MuRingForwardDoubleLayer MuRingForwardLayer TIDLayer

List of all members.

Public Member Functions

virtual std::pair< bool,
TrajectoryStateOnSurface
compatible (const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &) const
 tests the geometrical compatibility of the Det with the predicted state.
bool contains (const Local3DPoint &p) const
 ForwardDetLayer ()
virtual Location location () const
 Which part of the detector (barrel, endcap).
virtual const BoundDiskspecificSurface () const
virtual const BoundSurfacesurface () const
 The surface of the GeometricSearchDet.
virtual ~ForwardDetLayer ()

Protected Member Functions

virtual BoundDiskcomputeSurface ()
virtual void initialize ()
float rmax () const
float rmin () const
void setSurface (BoundDisk *cp)
float zmax () const
float zmin () const

Private Attributes

ReferenceCountingPointer
< BoundDisk
theDisk


Detailed Description

A specialization of the DetLayer interface for forward layers.

Forward layers are disks with their axes parallel to the global Z axis. The methods that have a common implementation for all ForwardDetLayers are implemented in this class, but some methods are left abstract.

Definition at line 20 of file ForwardDetLayer.h.


Constructor & Destructor Documentation

ForwardDetLayer::ForwardDetLayer (  ) 

Definition at line 9 of file ForwardDetLayer.cc.

00009                                  : 
00010   theDisk(0)
00011   //theRmin(0), theRmax(0), theZmin(0), theZmax(0)
00012 {}

ForwardDetLayer::~ForwardDetLayer (  )  [virtual]

Definition at line 15 of file ForwardDetLayer.cc.

00015                                   {
00016 }


Member Function Documentation

pair< bool, TrajectoryStateOnSurface > ForwardDetLayer::compatible ( const TrajectoryStateOnSurface ts,
const Propagator ,
const MeasurementEstimator  
) const [virtual]

tests the geometrical compatibility of the Det with the predicted state.

The FreeTrajectoryState argument is propagated to the Det surface using the Propagator argument. The resulting TrajectoryStateOnSurface is tested for compatibility with the surface bounds. If compatible, a std::pair< true, propagatedState> is returned. If the propagation fails, or if the state is not compatible, a std::pair< false, propagatedState> is returned.

Implements GeometricSearchDet.

Reimplemented in MuRingForwardDoubleLayer.

Definition at line 109 of file ForwardDetLayer.cc.

References BoundSurface::bounds(), deltaR(), err, TrajectoryStateOnSurface::hasError(), SimpleDiskBounds::inside(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), HLT_VtxMuL3::nSigma, LocalTrajectoryError::positionError(), Propagator::propagate(), rmax(), rmin(), specificSurface(), funct::sqrt(), surface(), funct::tan(), theDisk, PV3DBase< T, PVType, FrameType >::theta(), Bounds::thickness(), tmp, LocalError::xx(), LocalError::yy(), zmax(), and zmin().

Referenced by MuRingForwardLayer::compatibleDets().

00112 {
00113   if(theDisk == 0)  edm::LogError("DetLayers") 
00114     << "ERROR: BarrelDetLayer::compatible() is used before the layer surface is initialized" ;
00115   // throw an exception? which one?
00116 
00117   TrajectoryStateOnSurface myState = prop.propagate( ts, specificSurface());
00118   if ( !myState.isValid()) return make_pair( false, myState);
00119 
00120   // take into account the thickness of the layer
00121   float deltaR = surface().bounds().thickness()/2. *
00122     fabs( tan( myState.localDirection().theta()));
00123 
00124   // take into account the error on the predicted state
00125   const float nSigma = 3.;
00126   if (myState.hasError()) {
00127     LocalError err = myState.localError().positionError();
00128     // ignore correlation for the moment...
00129     deltaR += nSigma * sqrt(err.xx() + err.yy());
00130   }
00131 
00132   float zPos = (zmax()+zmin())/2.;
00133   SimpleDiskBounds tmp( rmin()-deltaR, rmax()+deltaR, 
00134                         zmin()-zPos, zmax()-zPos);
00135 
00136   return make_pair( tmp.inside(myState.localPosition()), myState);
00137 }

BoundDisk * ForwardDetLayer::computeSurface (  )  [protected, virtual]

Reimplemented in MuRingForwardDoubleLayer.

Definition at line 34 of file ForwardDetLayer.cc.

References GeometricSearchDet::basicComponents(), GeometricSearchDet::components(), Vector3DBase< T, FrameTag >::dot(), len, LogDebug, max, min, r, rot, Vector3DBase< T, FrameTag >::unit(), width, and z.

Referenced by initialize().

00034                                            {
00035   LogDebug("DetLayers") << "ForwaLayer::computeSurface callded" ;
00036   vector<const GeomDet*> comps= basicComponents();
00037 
00038   vector<const GeomDet*>::const_iterator ifirst = comps.begin();
00039   vector<const GeomDet*>::const_iterator ilast  = comps.end();
00040 
00041   // Find extension in R
00042   float theRmin = components().front()->position().perp(); 
00043   float theRmax = theRmin;
00044   float theZmin = components().back()->position().z();
00045   float theZmax = theZmin;
00046   for ( vector<const GeomDet*>::const_iterator deti = ifirst;
00047         deti != ilast; deti++) {
00048     vector<GlobalPoint> corners = 
00049       BoundingBox().corners( dynamic_cast<const BoundPlane&>((**deti).surface()));
00050     for (vector<GlobalPoint>::const_iterator ic = corners.begin();
00051          ic != corners.end(); ic++) {
00052       float r = ic->perp();
00053       LogDebug("DetLayers") << "corner.perp(): " << r ;
00054       float z = ic->z();
00055       theRmin = min( theRmin, r);
00056       theRmax = max( theRmax, r);
00057       theZmin = min( theZmin, z);
00058       theZmax = max( theZmax, z);
00059     }
00060 
00061     // in addition to the corners we have to check the middle of the 
00062     // det +/- length/2
00063     // , since the min (max) radius for typical fw dets is reached there
00064 
00065     float rdet  = (**deti).position().perp();
00066     float len   = (**deti).surface().bounds().length();
00067     float width = (**deti).surface().bounds().width();
00068 
00069     GlobalVector xAxis = (**deti).toGlobal(LocalVector(1,0,0));
00070     GlobalVector yAxis = (**deti).toGlobal(LocalVector(0,1,0));
00071     GlobalVector perpDir = GlobalVector( (**deti).position() - GlobalPoint(0,0,(**deti).position().z()) );
00072 
00073     double xAxisCos = xAxis.unit().dot(perpDir.unit());
00074     double yAxisCos = yAxis.unit().dot(perpDir.unit());
00075 
00076     LogDebug("DetLayers") << "in ForwardDetLayer::computeSurface(),xAxisCos,yAxisCos: " << xAxisCos << " , " << yAxisCos ;
00077     LogDebug("DetLayers") << "det pos.perp,length,width: " 
00078                           << rdet << " , " 
00079                           << len  << " , "
00080                           << width ;
00081 
00082     if( fabs(xAxisCos) > fabs(yAxisCos) ) {
00083       theRmin = min( theRmin, rdet-width/2.F);
00084       theRmax = max( theRmax, rdet+width/2.F);
00085     }else{
00086       theRmin = min( theRmin, rdet-len/2.F);
00087       theRmax = max( theRmax, rdet+len/2.F);
00088     }
00089   }
00090 
00091 
00092   LogDebug("DetLayers") << "creating SimpleDiskBounds with r range" << theRmin << " " 
00093                         << theRmax << " and z range " << theZmin << " " << theZmax ;
00094 
00095   // By default the forward layers are positioned around the z axis of the
00096   // global frame, and the axes of their local frame coincide with 
00097   // those of the global grame (z along the disk axis)
00098   float zPos = (theZmax+theZmin)/2.;
00099   PositionType pos(0.,0.,zPos);
00100   RotationType rot;
00101 
00102   return new BoundDisk( pos, rot, 
00103                         SimpleDiskBounds( theRmin, theRmax, 
00104                                           theZmin-zPos, theZmax-zPos));
00105 }  

bool ForwardDetLayer::contains ( const Local3DPoint p  )  const

Definition at line 24 of file ForwardDetLayer.cc.

References BoundSurface::bounds(), Bounds::inside(), and surface().

00024                                                           {
00025   return surface().bounds().inside(p);
00026 }

void ForwardDetLayer::initialize ( void   )  [protected, virtual]

Definition at line 29 of file ForwardDetLayer.cc.

References computeSurface(), and setSurface().

00029                                  {
00030   setSurface( computeSurface());
00031 }

virtual Location ForwardDetLayer::location (  )  const [inline, virtual]

Which part of the detector (barrel, endcap).

Implements DetLayer.

Definition at line 35 of file ForwardDetLayer.h.

References GeomDetEnumerators::endcap.

float ForwardDetLayer::rmax (  )  const [inline, protected]

Definition at line 48 of file ForwardDetLayer.h.

References theDisk.

Referenced by MuRingForwardDoubleLayer::compatible(), compatible(), and MuRingForwardDoubleLayer::computeSurface().

00048 { return theDisk->outerRadius();}

float ForwardDetLayer::rmin (  )  const [inline, protected]

Definition at line 47 of file ForwardDetLayer.h.

References theDisk.

Referenced by MuRingForwardDoubleLayer::compatible(), compatible(), and MuRingForwardDoubleLayer::computeSurface().

00047 { return theDisk->innerRadius();}

void ForwardDetLayer::setSurface ( BoundDisk cp  )  [protected]

Definition at line 20 of file ForwardDetLayer.cc.

References theDisk.

Referenced by initialize().

00020                                                { 
00021   theDisk = cp;
00022 }

virtual const BoundDisk& ForwardDetLayer::specificSurface (  )  const [inline, virtual]

Definition at line 38 of file ForwardDetLayer.h.

References theDisk.

Referenced by MuonNavigationSchool::addEndcapLayer(), MuonTkNavigationSchool::addEndcapLayer(), GroupedCkfTrajectoryBuilder::advanceOneLayer(), DirectTrackerNavigation::checkCompatible(), DirectMuonNavigation::checkCompatible(), MuRingForwardDoubleLayer::compatible(), compatible(), MuRingForwardLayer::compatibleDets(), PixelForwardLayer::computeCrossings(), MuRingForwardDoubleLayer::computeSurface(), MultipleScatteringGeometry::detLayers(), RectangularEtaPhiTrackingRegion::estimator(), InOutConversionSeedFinder::fillClusterSeeds(), InnerDeltaPhi::initForwardLayer(), HICSimpleNavigationSchool::linkNextBarrelLayer(), SimpleNavigationSchool::linkNextBarrelLayer(), OutInConversionSeedFinder::makeEstimator(), MSLayer::MSLayer(), ForwardLayerMirrorImage::operator()(), DiskLessInnerRadius::operator()(), and SimpleNavigableLayer::wellInside().

00038 { return *theDisk;}

virtual const BoundSurface& ForwardDetLayer::surface (  )  const [inline, virtual]

The surface of the GeometricSearchDet.

Implements GeometricSearchDet.

Definition at line 28 of file ForwardDetLayer.h.

References theDisk.

Referenced by MuRingForwardDoubleLayer::compatible(), compatible(), MuRingForwardLayer::compatibleDets(), TECLayer::computeCrossings(), PixelForwardLayer::computeCrossings(), contains(), RectangularEtaPhiTrackingRegion::estimator(), ThirdHitRZPrediction::initLayer(), ThirdHitPrediction::initLayer(), OutInConversionSeedFinder::makeEstimator(), MuonDetLayerComp::operator()(), ConversionSeedFinder::printLayer(), and SimpleNavigableLayer::wellInside().

00028 { return *theDisk;}

float ForwardDetLayer::zmax (  )  const [inline, protected]

Definition at line 50 of file ForwardDetLayer.h.

References theDisk.

Referenced by MuRingForwardDoubleLayer::compatible(), compatible(), and MuRingForwardDoubleLayer::computeSurface().

00050 { return (theDisk->position().z() + theDisk->bounds().thickness()/2);}

float ForwardDetLayer::zmin (  )  const [inline, protected]

Definition at line 49 of file ForwardDetLayer.h.

References theDisk.

Referenced by MuRingForwardDoubleLayer::compatible(), compatible(), and MuRingForwardDoubleLayer::computeSurface().

00049 { return (theDisk->position().z() - theDisk->bounds().thickness()/2);}


Member Data Documentation

ReferenceCountingPointer<BoundDisk> ForwardDetLayer::theDisk [private]

Definition at line 58 of file ForwardDetLayer.h.

Referenced by compatible(), rmax(), rmin(), setSurface(), specificSurface(), surface(), zmax(), and zmin().


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