CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/FastSimulation/TrackerSetup/interface/TrackerLayer.h

Go to the documentation of this file.
00001 #ifndef _TrackerLayer_H_
00002 #define _TrackerLayer_H_
00003 
00004 #include "DataFormats/GeometrySurface/interface/BoundSurface.h"
00005 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
00006 #include "DataFormats/GeometrySurface/interface/BoundDisk.h"
00007 
00008 #include <vector>
00009 
00013 class TrackerLayer {
00014 public:
00015   
00017   TrackerLayer(BoundSurface* theSurface,
00018                bool isForward,
00019                unsigned int theLayerNumber,
00020                std::vector<double> theMinDim,
00021                std::vector<double> theMaxDim,
00022                std::vector<double> theFudge) :
00023     theSurface(theSurface), 
00024     isForward(isForward),
00025     theLayerNumber(theLayerNumber),
00026     theDimensionMinValues(theMinDim),
00027     theDimensionMaxValues(theMaxDim),
00028     theFudgeFactors(theFudge),
00029     theNumberOfFudgeFactors(theFudgeFactors.size())
00030    { 
00031      isSensitive = (theLayerNumber<100);
00032      if ( isForward ) { 
00033        theDisk = dynamic_cast<BoundDisk*>(theSurface);
00034        theDiskInnerRadius = theDisk->innerRadius();
00035        theDiskOuterRadius = theDisk->outerRadius();
00036        theCylinder = 0;
00037      } else {
00038        theCylinder = dynamic_cast<BoundCylinder*>(theSurface);
00039        theDisk = 0;
00040        theDiskInnerRadius = 0.;
00041        theDiskOuterRadius = 0.;
00042      }
00043 
00044    }
00045 
00046   TrackerLayer(BoundSurface* theSurface,
00047                unsigned int theLayerNumber,
00048                std::vector<double> theMinDim,
00049                std::vector<double> theMaxDim,
00050                std::vector<double> theFudge) :
00051     theSurface(theSurface), 
00052     theLayerNumber(theLayerNumber),
00053     theDimensionMinValues(theMinDim),
00054     theDimensionMaxValues(theMaxDim),
00055     theFudgeFactors(theFudge),
00056     theNumberOfFudgeFactors(theFudgeFactors.size())
00057    { 
00058      isSensitive = true;
00059      isForward = true;
00060      theDisk = dynamic_cast<BoundDisk*>(theSurface);
00061      theDiskInnerRadius = theDisk->innerRadius();
00062      theDiskOuterRadius = theDisk->outerRadius();
00063      theCylinder = 0;
00064    }
00065 
00067   inline bool sensitive() const { return isSensitive; }
00068 
00070   inline bool forward() const { return isForward; }
00071 
00073   inline const BoundSurface& surface() const { return *theSurface; }
00074 
00076   inline BoundCylinder* cylinder() const { return theCylinder; }
00077 
00079   inline BoundDisk* disk() const { return theDisk; }
00080 
00082   inline unsigned int layerNumber() const { return theLayerNumber; }
00083 
00085   inline double diskInnerRadius() const { return theDiskInnerRadius; }
00086 
00088   inline double diskOuterRadius() const { return theDiskOuterRadius; }
00089 
00091   /*
00092   void setFudgeFactor(double min, double max, double f) { 
00093     ++theNumberOfFudgeFactors;
00094     theDimensionMinValues.push_back(min);
00095     theDimensionMaxValues.push_back(max);
00096     theFudgeFactors.push_back(f);
00097   }
00098   */
00099 
00101   inline unsigned int fudgeNumber() const { return  theNumberOfFudgeFactors; }
00102   inline double fudgeMin(unsigned iFudge) const { 
00103     return (iFudge < theNumberOfFudgeFactors) ? theDimensionMinValues[iFudge] : 999.;
00104   }
00105   inline double fudgeMax(unsigned iFudge) const { 
00106     return (iFudge < theNumberOfFudgeFactors) ? theDimensionMaxValues[iFudge] : -999.;
00107   }
00108   inline double fudgeFactor(unsigned iFudge) const { 
00109     return (iFudge < theNumberOfFudgeFactors) ? theFudgeFactors[iFudge] : 0.;
00110   }
00111 
00112 private:
00113 
00114   BoundSurface* theSurface;
00115   BoundDisk* theDisk;
00116   BoundCylinder* theCylinder;
00117   bool isForward;
00118   unsigned int theLayerNumber;
00119   bool isSensitive;
00120   double theDiskInnerRadius;
00121   double theDiskOuterRadius;
00122 
00124   std::vector<double> theDimensionMinValues;
00125   std::vector<double> theDimensionMaxValues;
00126   std::vector<double> theFudgeFactors;
00127   unsigned int  theNumberOfFudgeFactors;  
00128 
00129 };
00130 #endif
00131