CMS 3D CMS Logo

TrackerLayer.h
Go to the documentation of this file.
1 #ifndef _TrackerLayer_H_
2 #define _TrackerLayer_H_
3 
7 
8 #include <vector>
9 
13 class TrackerLayer {
14 public:
17  bool isForward,
18  unsigned int theLayerNumber,
19  const std::vector<double>& theMinDim,
20  const std::vector<double>& theMaxDim,
21  const std::vector<double>& theFudge)
25  theDimensionMinValues(theMinDim),
26  theDimensionMaxValues(theMaxDim),
27  theFudgeFactors(theFudge),
29  isSensitive = (theLayerNumber < 100);
30  if (isForward) {
31  theDisk = dynamic_cast<BoundDisk*>(theSurface);
32  theDiskInnerRadius = theDisk->innerRadius();
33  theDiskOuterRadius = theDisk->outerRadius();
34  theCylinder = nullptr;
35  } else {
36  theCylinder = dynamic_cast<BoundCylinder*>(theSurface);
37  theDisk = nullptr;
38  theDiskInnerRadius = 0.;
39  theDiskOuterRadius = 0.;
40  }
41  }
42 
44  unsigned int theLayerNumber,
45  const std::vector<double>& theMinDim,
46  const std::vector<double>& theMaxDim,
47  const std::vector<double>& theFudge)
50  theDimensionMinValues(theMinDim),
51  theDimensionMaxValues(theMaxDim),
52  theFudgeFactors(theFudge),
54  isSensitive = true;
55  isForward = true;
56  theDisk = dynamic_cast<BoundDisk*>(theSurface);
57  theDiskInnerRadius = theDisk->innerRadius();
58  theDiskOuterRadius = theDisk->outerRadius();
59  theCylinder = nullptr;
60  }
61 
63  inline bool sensitive() const { return isSensitive; }
64 
66  inline bool forward() const { return isForward; }
67 
69  inline const BoundSurface& surface() const { return *theSurface; }
70 
72  inline BoundCylinder const* cylinder() const { return theCylinder; }
73 
75  inline BoundDisk const* disk() const { return theDisk; }
76 
78  inline unsigned int layerNumber() const { return theLayerNumber; }
79 
81  inline double diskInnerRadius() const { return theDiskInnerRadius; }
82 
84  inline double diskOuterRadius() const { return theDiskOuterRadius; }
85 
87  /*
88  void setFudgeFactor(double min, double max, double f) {
89  ++theNumberOfFudgeFactors;
90  theDimensionMinValues.push_back(min);
91  theDimensionMaxValues.push_back(max);
92  theFudgeFactors.push_back(f);
93  }
94  */
95 
97  inline unsigned int fudgeNumber() const { return theNumberOfFudgeFactors; }
98  inline double fudgeMin(unsigned iFudge) const {
99  return (iFudge < theNumberOfFudgeFactors) ? theDimensionMinValues[iFudge] : 999.;
100  }
101  inline double fudgeMax(unsigned iFudge) const {
102  return (iFudge < theNumberOfFudgeFactors) ? theDimensionMaxValues[iFudge] : -999.;
103  }
104  inline double fudgeFactor(unsigned iFudge) const {
105  return (iFudge < theNumberOfFudgeFactors) ? theFudgeFactors[iFudge] : 0.;
106  }
107 
108 private:
112  bool isForward;
113  unsigned int theLayerNumber;
117 
119  std::vector<double> theDimensionMinValues;
120  std::vector<double> theDimensionMaxValues;
121  std::vector<double> theFudgeFactors;
123 };
124 #endif
size
Write out results.
double diskOuterRadius() const
Returns the outer radius of a disk.
Definition: TrackerLayer.h:84
double diskInnerRadius() const
Returns the inner radius of a disk.
Definition: TrackerLayer.h:81
std::vector< double > theDimensionMinValues
These are fudges factors to account for the inhomogeneities of the material.
Definition: TrackerLayer.h:119
bool sensitive() const
Is the layer sensitive ?
Definition: TrackerLayer.h:63
TrackerLayer(BoundSurface *theSurface, unsigned int theLayerNumber, const std::vector< double > &theMinDim, const std::vector< double > &theMaxDim, const std::vector< double > &theFudge)
Definition: TrackerLayer.h:43
double theDiskInnerRadius
Definition: TrackerLayer.h:115
unsigned int theLayerNumber
Definition: TrackerLayer.h:113
const BoundSurface & surface() const
Returns the surface.
Definition: TrackerLayer.h:69
double theDiskOuterRadius
Definition: TrackerLayer.h:116
double fudgeFactor(unsigned iFudge) const
Definition: TrackerLayer.h:104
unsigned int fudgeNumber() const
Set a fudge factor for material inhomogeneities in this layer.
Definition: TrackerLayer.h:97
double fudgeMax(unsigned iFudge) const
Definition: TrackerLayer.h:101
BoundCylinder const * cylinder() const
Returns the cylinder.
Definition: TrackerLayer.h:72
double fudgeMin(unsigned iFudge) const
Definition: TrackerLayer.h:98
unsigned int theNumberOfFudgeFactors
Definition: TrackerLayer.h:122
unsigned int layerNumber() const
Returns the layer number.
Definition: TrackerLayer.h:78
TrackerLayer(BoundSurface *theSurface, bool isForward, unsigned int theLayerNumber, const std::vector< double > &theMinDim, const std::vector< double > &theMaxDim, const std::vector< double > &theFudge)
constructor from private members
Definition: TrackerLayer.h:16
BoundDisk * theDisk
Definition: TrackerLayer.h:110
bool forward() const
Is the layer forward ?
Definition: TrackerLayer.h:66
BoundDisk const * disk() const
Returns the surface.
Definition: TrackerLayer.h:75
BoundSurface * theSurface
Definition: TrackerLayer.h:109
BoundCylinder * theCylinder
Definition: TrackerLayer.h:111
std::vector< double > theFudgeFactors
Definition: TrackerLayer.h:121
std::vector< double > theDimensionMaxValues
Definition: TrackerLayer.h:120