Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:31

0001 #ifndef DetLayers_BarrelDetLayer_H
0002 #define DetLayers_BarrelDetLayer_H
0003 
0004 /** \class BarrelDetLayer
0005  *  A specialization of the DetLayer interface for barrel layers.
0006  *  Barrel layers are cylinders with their axes parallel to 
0007  *  the global Z axis.
0008  *  The methods that have a common implementation for all BarrelDetLayers
0009  *  are implemented in this class,
0010  *  but some methods are left abstract.
0011  *
0012  */
0013 
0014 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0015 
0016 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0017 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
0018 
0019 #include <vector>
0020 #include <algorithm>
0021 
0022 class BarrelDetLayer : public DetLayer {
0023 public:
0024   BarrelDetLayer(bool doHaveGroup) : DetLayer(doHaveGroup, true), theCylinder(nullptr) {}
0025 
0026   ~BarrelDetLayer() override;
0027 
0028   /// GeometricSearchDet interface
0029   const BoundSurface& surface() const final { return *theCylinder; }
0030 
0031   std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface& ts,
0032                                                        const Propagator&,
0033                                                        const MeasurementEstimator&) const final;
0034 
0035   /// DetLayer interface
0036   Location location() const final { return GeomDetEnumerators::barrel; }
0037 
0038   /// Extension of the interface
0039   virtual const BoundCylinder& specificSurface() const final { return *theCylinder; }
0040 
0041   bool contains(const Local3DPoint& p) const;
0042 
0043 protected:
0044   virtual void initialize();
0045 
0046   void setSurface(BoundCylinder* cp);
0047   virtual BoundCylinder* computeSurface();
0048 
0049   SimpleCylinderBounds const& bounds() const { return static_cast<SimpleCylinderBounds const&>(theCylinder->bounds()); }
0050 
0051 private:
0052   //float theRmin, theRmax, theZmin, theZmax;
0053   ReferenceCountingPointer<BoundCylinder> theCylinder;
0054 };
0055 
0056 #endif