File indexing completed on 2024-04-06 12:15:28
0001 #ifndef Geometry_TrackerNumberingBuilder_CmsTrackerLevelBuilder_H
0002 #define Geometry_TrackerNumberingBuilder_CmsTrackerLevelBuilder_H
0003
0004 #include "FWCore/ParameterSet/interface/types.h"
0005 #include "Geometry/TrackerNumberingBuilder/interface/CmsTrackerStringToEnum.h"
0006 #include "Geometry/TrackerNumberingBuilder/plugins/CmsTrackerAbstractConstruction.h"
0007 #include <string>
0008
0009 class GeometricDet;
0010
0011 class CmsTrackerLevelBuilderHelper {
0012 public:
0013 static bool subDetByType(const GeometricDet* a, const GeometricDet* b);
0014 static bool phiSortNP(const GeometricDet* a, const GeometricDet* b);
0015 static bool isLessZ(const GeometricDet* a, const GeometricDet* b);
0016 static bool isLessModZ(const GeometricDet* a, const GeometricDet* b);
0017 static double getPhi(const GeometricDet* a);
0018 static double getPhiModule(const GeometricDet* a);
0019 static double getPhiGluedModule(const GeometricDet* a);
0020 static double getPhiMirror(const GeometricDet* a);
0021 static double getPhiModuleMirror(const GeometricDet* a);
0022 static double getPhiGluedModuleMirror(const GeometricDet* a);
0023 static bool isLessRModule(const GeometricDet* a, const GeometricDet* b);
0024 static bool isLessR(const GeometricDet* a, const GeometricDet* b);
0025 };
0026
0027
0028
0029
0030 template <class FilteredView>
0031 class CmsTrackerLevelBuilder : public CmsTrackerAbstractConstruction<FilteredView> {
0032 public:
0033 void build(FilteredView&, GeometricDet*, const std::string&) override;
0034 ~CmsTrackerLevelBuilder() override {}
0035
0036 private:
0037 virtual void buildComponent(FilteredView&, GeometricDet*, const std::string&) = 0;
0038
0039 protected:
0040 CmsTrackerStringToEnum theCmsTrackerStringToEnum;
0041
0042 private:
0043 virtual void sortNS(FilteredView&, GeometricDet*) {}
0044 CmsTrackerStringToEnum _CmsTrackerStringToEnum;
0045 };
0046
0047 #endif