CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
15 
18  bool isForward,
19  unsigned int theLayerNumber,
20  std::vector<double> theMinDim,
21  std::vector<double> theMaxDim,
22  std::vector<double> theFudge) :
23  theSurface(theSurface),
24  isForward(isForward),
25  theLayerNumber(theLayerNumber),
26  theDimensionMinValues(theMinDim),
27  theDimensionMaxValues(theMaxDim),
28  theFudgeFactors(theFudge),
30  {
31  isSensitive = (theLayerNumber<100);
32  if ( isForward ) {
33  theDisk = dynamic_cast<BoundDisk*>(theSurface);
36  theCylinder = 0;
37  } else {
38  theCylinder = dynamic_cast<BoundCylinder*>(theSurface);
39  theDisk = 0;
40  theDiskInnerRadius = 0.;
41  theDiskOuterRadius = 0.;
42  }
43 
44  }
45 
47  unsigned int theLayerNumber,
48  std::vector<double> theMinDim,
49  std::vector<double> theMaxDim,
50  std::vector<double> theFudge) :
51  theSurface(theSurface),
52  theLayerNumber(theLayerNumber),
53  theDimensionMinValues(theMinDim),
54  theDimensionMaxValues(theMaxDim),
55  theFudgeFactors(theFudge),
57  {
58  isSensitive = true;
59  isForward = true;
60  theDisk = dynamic_cast<BoundDisk*>(theSurface);
63  theCylinder = 0;
64  }
65 
67  inline bool sensitive() const { return isSensitive; }
68 
70  inline bool forward() const { return isForward; }
71 
73  inline const BoundSurface& surface() const { return *theSurface; }
74 
76  inline BoundCylinder* cylinder() const { return theCylinder; }
77 
79  inline BoundDisk* disk() const { return theDisk; }
80 
82  inline unsigned int layerNumber() const { return theLayerNumber; }
83 
85  inline double diskInnerRadius() const { return theDiskInnerRadius; }
86 
88  inline double diskOuterRadius() const { return theDiskOuterRadius; }
89 
91  /*
92  void setFudgeFactor(double min, double max, double f) {
93  ++theNumberOfFudgeFactors;
94  theDimensionMinValues.push_back(min);
95  theDimensionMaxValues.push_back(max);
96  theFudgeFactors.push_back(f);
97  }
98  */
99 
101  inline unsigned int fudgeNumber() const { return theNumberOfFudgeFactors; }
102  inline double fudgeMin(unsigned iFudge) const {
103  return (iFudge < theNumberOfFudgeFactors) ? theDimensionMinValues[iFudge] : 999.;
104  }
105  inline double fudgeMax(unsigned iFudge) const {
106  return (iFudge < theNumberOfFudgeFactors) ? theDimensionMaxValues[iFudge] : -999.;
107  }
108  inline double fudgeFactor(unsigned iFudge) const {
109  return (iFudge < theNumberOfFudgeFactors) ? theFudgeFactors[iFudge] : 0.;
110  }
111 
112 private:
113 
117  bool isForward;
118  unsigned int theLayerNumber;
122 
124  std::vector<double> theDimensionMinValues;
125  std::vector<double> theDimensionMaxValues;
126  std::vector<double> theFudgeFactors;
127  unsigned int theNumberOfFudgeFactors;
128 
129 };
130 #endif
131 
std::vector< double > theDimensionMinValues
These are fudges factors to account for the inhomogeneities of the material.
Definition: TrackerLayer.h:124
unsigned int layerNumber() const
Returns the layer number.
Definition: TrackerLayer.h:82
bool forward() const
Is the layer forward ?
Definition: TrackerLayer.h:70
double fudgeFactor(unsigned iFudge) const
Definition: TrackerLayer.h:108
TrackerLayer(BoundSurface *theSurface, bool isForward, unsigned int theLayerNumber, std::vector< double > theMinDim, std::vector< double > theMaxDim, std::vector< double > theFudge)
constructor from private members
Definition: TrackerLayer.h:17
double theDiskInnerRadius
Definition: TrackerLayer.h:120
unsigned int theLayerNumber
Definition: TrackerLayer.h:118
double theDiskOuterRadius
Definition: TrackerLayer.h:121
BoundDisk * disk() const
Returns the surface.
Definition: TrackerLayer.h:79
double fudgeMax(unsigned iFudge) const
Definition: TrackerLayer.h:105
double diskInnerRadius() const
Returns the inner radius of a disk.
Definition: TrackerLayer.h:85
unsigned int fudgeNumber() const
Set a fudge factor for material inhomogeneities in this layer.
Definition: TrackerLayer.h:101
const BoundSurface & surface() const
Returns the surface.
Definition: TrackerLayer.h:73
bool sensitive() const
Is the layer sensitive ?
Definition: TrackerLayer.h:67
unsigned int theNumberOfFudgeFactors
Definition: TrackerLayer.h:127
BoundCylinder * cylinder() const
Returns the cylinder.
Definition: TrackerLayer.h:76
float outerRadius() const
The outer radius of the disk.
Definition: BoundDisk.h:75
BoundDisk * theDisk
Definition: TrackerLayer.h:115
float innerRadius() const
The inner radius of the disk.
Definition: BoundDisk.h:72
double fudgeMin(unsigned iFudge) const
Definition: TrackerLayer.h:102
BoundSurface * theSurface
Definition: TrackerLayer.h:114
double diskOuterRadius() const
Returns the outer radius of a disk.
Definition: TrackerLayer.h:88
TrackerLayer(BoundSurface *theSurface, unsigned int theLayerNumber, std::vector< double > theMinDim, std::vector< double > theMaxDim, std::vector< double > theFudge)
Definition: TrackerLayer.h:46
BoundCylinder * theCylinder
Definition: TrackerLayer.h:116
std::vector< double > theFudgeFactors
Definition: TrackerLayer.h:126
tuple size
Write out results.
std::vector< double > theDimensionMaxValues
Definition: TrackerLayer.h:125