File indexing completed on 2023-10-25 09:46:09
0001 #ifndef _TrackerLayer_H_
0002 #define _TrackerLayer_H_
0003
0004 #include "DataFormats/GeometrySurface/interface/BoundSurface.h"
0005 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
0006 #include "DataFormats/GeometrySurface/interface/BoundDisk.h"
0007
0008 #include <vector>
0009
0010
0011
0012
0013 class TrackerLayer {
0014 public:
0015
0016 TrackerLayer(BoundSurface* theSurface,
0017 bool isForward,
0018 unsigned int theLayerNumber,
0019 const std::vector<double>& theMinDim,
0020 const std::vector<double>& theMaxDim,
0021 const std::vector<double>& theFudge)
0022 : theSurface(theSurface),
0023 isForward(isForward),
0024 theLayerNumber(theLayerNumber),
0025 theDimensionMinValues(theMinDim),
0026 theDimensionMaxValues(theMaxDim),
0027 theFudgeFactors(theFudge),
0028 theNumberOfFudgeFactors(theFudgeFactors.size()) {
0029 isSensitive = (theLayerNumber < 100);
0030 if (isForward) {
0031 theDisk = dynamic_cast<BoundDisk*>(theSurface);
0032 theDiskInnerRadius = theDisk->innerRadius();
0033 theDiskOuterRadius = theDisk->outerRadius();
0034 theCylinder = nullptr;
0035 } else {
0036 theCylinder = dynamic_cast<BoundCylinder*>(theSurface);
0037 theDisk = nullptr;
0038 theDiskInnerRadius = 0.;
0039 theDiskOuterRadius = 0.;
0040 }
0041 }
0042
0043 TrackerLayer(BoundSurface* theSurface,
0044 unsigned int theLayerNumber,
0045 const std::vector<double>& theMinDim,
0046 const std::vector<double>& theMaxDim,
0047 const std::vector<double>& theFudge)
0048 : theSurface(theSurface),
0049 theLayerNumber(theLayerNumber),
0050 theDimensionMinValues(theMinDim),
0051 theDimensionMaxValues(theMaxDim),
0052 theFudgeFactors(theFudge),
0053 theNumberOfFudgeFactors(theFudgeFactors.size()) {
0054 isSensitive = true;
0055 isForward = true;
0056 theDisk = dynamic_cast<BoundDisk*>(theSurface);
0057 theDiskInnerRadius = theDisk->innerRadius();
0058 theDiskOuterRadius = theDisk->outerRadius();
0059 theCylinder = nullptr;
0060 }
0061
0062
0063 inline bool sensitive() const { return isSensitive; }
0064
0065
0066 inline bool forward() const { return isForward; }
0067
0068
0069 inline const BoundSurface& surface() const { return *theSurface; }
0070
0071
0072 inline BoundCylinder const* cylinder() const { return theCylinder; }
0073
0074
0075 inline BoundDisk const* disk() const { return theDisk; }
0076
0077
0078 inline unsigned int layerNumber() const { return theLayerNumber; }
0079
0080
0081 inline double diskInnerRadius() const { return theDiskInnerRadius; }
0082
0083
0084 inline double diskOuterRadius() const { return theDiskOuterRadius; }
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097 inline unsigned int fudgeNumber() const { return theNumberOfFudgeFactors; }
0098 inline double fudgeMin(unsigned iFudge) const {
0099 return (iFudge < theNumberOfFudgeFactors) ? theDimensionMinValues[iFudge] : 999.;
0100 }
0101 inline double fudgeMax(unsigned iFudge) const {
0102 return (iFudge < theNumberOfFudgeFactors) ? theDimensionMaxValues[iFudge] : -999.;
0103 }
0104 inline double fudgeFactor(unsigned iFudge) const {
0105 return (iFudge < theNumberOfFudgeFactors) ? theFudgeFactors[iFudge] : 0.;
0106 }
0107
0108 private:
0109 BoundSurface* theSurface;
0110 BoundDisk* theDisk;
0111 BoundCylinder* theCylinder;
0112 bool isForward;
0113 unsigned int theLayerNumber;
0114 bool isSensitive;
0115 double theDiskInnerRadius;
0116 double theDiskOuterRadius;
0117
0118
0119 std::vector<double> theDimensionMinValues;
0120 std::vector<double> theDimensionMaxValues;
0121 std::vector<double> theFudgeFactors;
0122 unsigned int theNumberOfFudgeFactors;
0123 };
0124 #endif