File indexing completed on 2024-04-06 12:28:51
0001 #ifndef MSLayer_H
0002 #define MSLayer_H
0003 #include "FWCore/Utilities/interface/Visibility.h"
0004 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0005 #include "RecoTracker/TkMSParametrization/interface/PixelRecoPointRZ.h"
0006 #include "RecoTracker/TkMSParametrization/interface/PixelRecoLineRZ.h"
0007 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
0008 #include <iosfwd>
0009
0010 class DetLayer;
0011 class MSLayersKeeper;
0012
0013 class MSLayer {
0014 public:
0015 typedef PixelRecoRange<float> Range;
0016
0017 struct DataX0 {
0018 DataX0(const MSLayersKeeper* al = nullptr) : hasX0(false), hasFSlope(false), allLayers(al) {}
0019 DataX0(float ax0, float asX0D, float aCotTheta)
0020 : hasX0(true),
0021 hasFSlope(false),
0022 x0(ax0),
0023 sumX0D(asX0D),
0024 cotTheta(aCotTheta),
0025 slopeSumX0D(0.),
0026 allLayers(nullptr) {}
0027 void setForwardSumX0DSlope(float aSlope) {
0028 hasFSlope = true;
0029 slopeSumX0D = aSlope;
0030 }
0031 bool hasX0, hasFSlope;
0032 float x0, sumX0D, cotTheta, slopeSumX0D;
0033 const MSLayersKeeper* allLayers;
0034 };
0035
0036 public:
0037 MSLayer(const DetLayer* layer, const DataX0& dataX0 = DataX0(nullptr)) dso_hidden;
0038 MSLayer() {}
0039
0040 MSLayer(GeomDetEnumerators::Location part,
0041 float position,
0042 Range range,
0043 float halfThickness = 0.,
0044 const DataX0& dataX0 = DataX0(nullptr)) dso_hidden;
0045
0046
0047 int seqNum() const { return theSeqNum; }
0048
0049
0050 const Range& range() const { return theRange; }
0051
0052 const GeomDetEnumerators::Location& face() const { return theFace; }
0053 float position() const { return thePosition; }
0054 float halfThickness() const { return theHalfThickness; }
0055
0056 float x0(float cotTheta) const dso_hidden;
0057 float sumX0D(float cotTheta) const dso_hidden;
0058
0059 bool operator==(const MSLayer& o) const dso_hidden;
0060 bool operator<(const MSLayer& o) const dso_hidden;
0061
0062 std::pair<PixelRecoPointRZ, bool> crossing(const PixelRecoLineRZ& line) const dso_hidden;
0063 std::pair<PixelRecoPointRZ, bool> crossing(const SimpleLineRZ& line) const dso_hidden;
0064
0065 float distance2(const PixelRecoPointRZ& point) const dso_hidden;
0066
0067 private:
0068 GeomDetEnumerators::Location theFace;
0069 float thePosition;
0070 Range theRange;
0071 float theHalfThickness;
0072 int theSeqNum;
0073
0074 DataX0 theX0Data;
0075
0076 friend class MSLayersKeeper;
0077 friend std::ostream& operator<<(std::ostream& s, const MSLayer& l);
0078 };
0079
0080 std::ostream& operator<<(std::ostream& s, const MSLayer& l) dso_hidden;
0081 std::ostream& operator<<(std::ostream& s, const MSLayer::DataX0& d) dso_hidden;
0082 #endif