CMS 3D CMS Logo

MSLayer.h

Go to the documentation of this file.
00001 #ifndef MSLayer_H
00002 #define MSLayer_H
00003 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00004 #include "RecoTracker/TkMSParametrization/interface/PixelRecoPointRZ.h"
00005 #include "RecoTracker/TkMSParametrization/interface/PixelRecoLineRZ.h"
00006 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
00007 #include <iostream>
00008 
00009 class DetLayer;
00010 class MSLayersKeeper;
00011 
00012 class MSLayer {
00013 public:
00014   typedef PixelRecoRange<float> Range;
00015 
00016   struct DataX0 { 
00017     DataX0(const MSLayersKeeper *al = 0) 
00018       : hasX0(false), allLayers(al) { }
00019     DataX0(float ax0, float asX0D, float aCotTheta) 
00020       : hasX0(true), hasFSlope(false), x0(ax0), sumX0D(asX0D), 
00021         cotTheta(aCotTheta), allLayers(0) { }
00022     void setForwardSumX0DSlope(float aSlope) 
00023         { hasFSlope= true; slopeSumX0D = aSlope; }
00024     bool hasX0, hasFSlope;
00025     float x0, sumX0D, cotTheta, slopeSumX0D;
00026     const MSLayersKeeper *allLayers; 
00027   };
00028 
00029 public:
00030   MSLayer(const DetLayer* layer, DataX0 dataX0 = DataX0(0) );
00031   MSLayer() { }
00032 
00033   MSLayer(GeomDetEnumerators::Location part, float position, Range range, 
00034            float halfThickness = 0., 
00035            DataX0 dataX0 = DataX0(0) );
00036 
00037   const Range & range() const  { return theRange; }
00038  
00039   const GeomDetEnumerators::Location & face() const  { return theFace; }
00040   float position() const { return thePosition; }
00041   float halfThickness() const { return theHalfThickness; }
00042 
00043   float x0(float cotTheta) const;
00044   float sumX0D(float cotTheta) const; 
00045 
00046   bool operator== (const MSLayer &o) const;
00047   bool operator<  (const MSLayer &o) const;
00048   std::pair<PixelRecoPointRZ,bool> crossing(
00049       const PixelRecoLineRZ &line) const;
00050   float distance(const PixelRecoPointRZ & point) const;
00051 
00052 private:
00053 
00054   GeomDetEnumerators::Location theFace;
00055   float thePosition;
00056   Range theRange;
00057   float theHalfThickness;
00058   DataX0 theX0Data;
00059 
00060   friend struct MSLayersKeeper;
00061   friend std::ostream& operator<<( std::ostream& s, const MSLayer & l);
00062 
00063 };
00064 
00065 std::ostream& operator<<( std::ostream& s, const MSLayer & l);
00066 std::ostream& operator<<( std::ostream& s, const MSLayer::DataX0 & d);
00067 #endif

Generated on Tue Jun 9 17:45:51 2009 for CMSSW by  doxygen 1.5.4