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
TrackerLayer::theLayerNumber
unsigned int theLayerNumber
Definition: TrackerLayer.h:113
TrackerLayer::TrackerLayer
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
TrackerLayer::diskInnerRadius
double diskInnerRadius() const
Returns the inner radius of a disk.
Definition: TrackerLayer.h:81
TrackerLayer::cylinder
BoundCylinder const * cylinder() const
Returns the cylinder.
Definition: TrackerLayer.h:72
TrackerLayer::theFudgeFactors
std::vector< double > theFudgeFactors
Definition: TrackerLayer.h:121
TrackerLayer::theSurface
BoundSurface * theSurface
Definition: TrackerLayer.h:109
BoundDisk.h
TrackerLayer::diskOuterRadius
double diskOuterRadius() const
Returns the outer radius of a disk.
Definition: TrackerLayer.h:84
Surface
Definition: Surface.h:36
TrackerLayer::theDiskInnerRadius
double theDiskInnerRadius
Definition: TrackerLayer.h:115
TrackerLayer::fudgeFactor
double fudgeFactor(unsigned iFudge) const
Definition: TrackerLayer.h:104
BoundCylinder.h
TrackerLayer::fudgeMax
double fudgeMax(unsigned iFudge) const
Definition: TrackerLayer.h:101
TrackerLayer::fudgeMin
double fudgeMin(unsigned iFudge) const
Definition: TrackerLayer.h:98
TrackerLayer::theDiskOuterRadius
double theDiskOuterRadius
Definition: TrackerLayer.h:116
BoundDisk
BoundSurface.h
TrackerLayer::theDimensionMinValues
std::vector< double > theDimensionMinValues
These are fudges factors to account for the inhomogeneities of the material.
Definition: TrackerLayer.h:119
TrackerLayer::sensitive
bool sensitive() const
Is the layer sensitive ?
Definition: TrackerLayer.h:63
TrackerLayer::isForward
bool isForward
Definition: TrackerLayer.h:112
TrackerLayer
Definition: TrackerLayer.h:13
TrackerLayer::theCylinder
BoundCylinder * theCylinder
Definition: TrackerLayer.h:111
TrackerLayer::fudgeNumber
unsigned int fudgeNumber() const
Set a fudge factor for material inhomogeneities in this layer.
Definition: TrackerLayer.h:97
TrackerLayer::layerNumber
unsigned int layerNumber() const
Returns the layer number.
Definition: TrackerLayer.h:78
TrackerLayer::forward
bool forward() const
Is the layer forward ?
Definition: TrackerLayer.h:66
TrackerLayer::theNumberOfFudgeFactors
unsigned int theNumberOfFudgeFactors
Definition: TrackerLayer.h:122
TrackerLayer::isSensitive
bool isSensitive
Definition: TrackerLayer.h:114
BoundCylinder
TrackerLayer::theDisk
BoundDisk * theDisk
Definition: TrackerLayer.h:110
TrackerLayer::surface
const BoundSurface & surface() const
Returns the surface.
Definition: TrackerLayer.h:69
TrackerLayer::TrackerLayer
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
TrackerLayer::disk
BoundDisk const * disk() const
Returns the surface.
Definition: TrackerLayer.h:75
TrackerLayer::theDimensionMaxValues
std::vector< double > theDimensionMaxValues
Definition: TrackerLayer.h:120
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443