CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoTracker/TkMSParametrization/interface/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 <iosfwd>
00008 
00009 #include "FWCore/Utilities/interface/GCC11Compatibility.h"
00010 
00011 class DetLayer;
00012 class MSLayersKeeper;
00013 
00014 class MSLayer {
00015 public:
00016   typedef PixelRecoRange<float> Range;
00017 
00018   struct DataX0 { 
00019     DataX0(const MSLayersKeeper *al = 0) 
00020       : hasX0(false), allLayers(al) { }
00021     DataX0(float ax0, float asX0D, float aCotTheta) 
00022       : hasX0(true), hasFSlope(false), x0(ax0), sumX0D(asX0D), 
00023         cotTheta(aCotTheta), allLayers(0) { }
00024     void setForwardSumX0DSlope(float aSlope) 
00025         { hasFSlope= true; slopeSumX0D = aSlope; }
00026     bool hasX0, hasFSlope;
00027     float x0, sumX0D, cotTheta, slopeSumX0D;
00028     const MSLayersKeeper *allLayers; 
00029   };
00030 
00031 public:
00032   MSLayer(const DetLayer* layer, DataX0 dataX0 = DataX0(0) ) dso_hidden;
00033   MSLayer() { }
00034 
00035   MSLayer(GeomDetEnumerators::Location part, float position, Range range, 
00036            float halfThickness = 0., 
00037            DataX0 dataX0 = DataX0(0) ) dso_hidden;
00038 
00039 
00040   // sequential number to be used in "maps"
00041   int seqNum() const { return theSeqNum;}
00042   // void setSeqNum(int sq) { theSeqNum=sq;}
00043 
00044 
00045   const Range & range() const  { return theRange; }
00046  
00047   const GeomDetEnumerators::Location & face() const  { return theFace; }
00048   float position() const { return thePosition; }
00049   float halfThickness() const { return theHalfThickness; }
00050 
00051   float x0(float cotTheta) const dso_hidden;
00052   float sumX0D(float cotTheta) const dso_hidden; 
00053 
00054   
00055   bool operator== (const MSLayer &o) const dso_hidden;
00056   bool operator<  (const MSLayer &o) const dso_hidden;
00057   
00058   std::pair<PixelRecoPointRZ,bool> crossing(const PixelRecoLineRZ &line) const  dso_hidden;
00059   std::pair<PixelRecoPointRZ,bool> crossing(const SimpleLineRZ &line) const  dso_hidden;
00060 
00061  
00062  float distance2(const PixelRecoPointRZ & point) const  dso_hidden;
00063 
00064 private:
00065 
00066   GeomDetEnumerators::Location theFace;
00067   float thePosition;
00068   Range theRange;
00069   float theHalfThickness;
00070   int theSeqNum;
00071 
00072   DataX0 theX0Data;
00073 
00074   friend struct MSLayersKeeper;
00075   friend std::ostream& operator<<( std::ostream& s, const MSLayer & l);
00076 
00077 };
00078 
00079 std::ostream& operator<<( std::ostream& s, const MSLayer & l)  dso_hidden;
00080 std::ostream& operator<<( std::ostream& s, const MSLayer::DataX0 & d)  dso_hidden;
00081 #endif