Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:27

0001 #ifndef DetLayers_ForwardDetLayer_H
0002 #define DetLayers_ForwardDetLayer_H
0003 
0004 /** A specialization of the DetLayer interface for forward layers.
0005  *  Forward layers are disks with their axes parallel to 
0006  *  the global Z axis.
0007  *  The methods that have a common implementation for all ForwardDetLayers
0008  *  are implemented in this class,
0009  *  but some methods are left abstract.
0010  */
0011 
0012 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0013 #include "DataFormats/GeometrySurface/interface/Surface.h"
0014 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0015 #include "DataFormats/GeometrySurface/interface/BoundDisk.h"
0016 #include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
0017 #include "DataFormats/GeometrySurface/interface/SimpleCylinderBounds.h"
0018 
0019 #include <vector>
0020 #include <algorithm>
0021 
0022 class ForwardDetLayer : public DetLayer {
0023 public:
0024   ForwardDetLayer(bool doHaveGroups) : DetLayer(doHaveGroups, false) {}
0025 
0026   ~ForwardDetLayer() override;
0027 
0028   // GeometricSearchDet interface
0029   const BoundSurface& surface() const final { return *theDisk; }
0030 
0031   std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface&,
0032                                                        const Propagator&,
0033                                                        const MeasurementEstimator&) const override;
0034 
0035   // DetLayer interface
0036   Location location() const final { return GeomDetEnumerators::endcap; }
0037 
0038   // Extension of the interface
0039   virtual const BoundDisk& specificSurface() const final { return *theDisk; }
0040 
0041   bool contains(const Local3DPoint& p) const;
0042 
0043 protected:
0044   virtual void initialize();
0045 
0046   float rmin() const { return theDisk->innerRadius(); }
0047   float rmax() const { return theDisk->outerRadius(); }
0048   float zmin() const { return (theDisk->position().z() - bounds().thickness() * 0.5f); }
0049   float zmax() const { return (theDisk->position().z() + bounds().thickness() * 0.5f); }
0050 
0051   void setSurface(BoundDisk* cp);
0052   virtual BoundDisk* computeSurface();
0053 
0054   SimpleDiskBounds const& bounds() const { return static_cast<SimpleDiskBounds const&>(theDisk->bounds()); }
0055 
0056 private:
0057   ReferenceCountingPointer<BoundDisk> theDisk;
0058 };
0059 
0060 #endif