CaloGeometryLoaderTest

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
#ifndef GEOMETRY_ECALGEOMETRYLOADER_H
#define GEOMETRY_ECALGEOMETRYLOADER_H 1

#include "DetectorDescription/Core/interface/DDSolid.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "DetectorDescription/Core/interface/DDFilteredView.h"
#include "CondFormats/Alignment/interface/Alignments.h"

#include "CLHEP/Geometry/Transform3D.h"
#include <memory>
#include <vector>

/** \class EcalGeometryLoader
 *
 *
 * base class for endcap and barrel loaders so code sharing can occur
*/

class DDCompactView;

template <class T>
class CaloGeometryLoaderTest {
public:
  typedef std::vector<double> ParmVec;

  using PtrType = std::unique_ptr<CaloSubdetectorGeometry>;

  typedef CaloSubdetectorGeometry::ParVec ParVec;
  typedef CaloSubdetectorGeometry::ParVecVec ParVecVec;

  static const double k_ScaleFromDDDtoGeant;

  CaloGeometryLoaderTest();

  virtual ~CaloGeometryLoaderTest() {}

  PtrType load(const DDCompactView* cpv, const Alignments* alignments = nullptr, const Alignments* globals = nullptr);

private:
  void makeGeometry(const DDCompactView* cpv, T* geom, const Alignments* alignments, const Alignments* globals);

  void fillNamedParams(DDFilteredView fv, T* geom);

  void fillGeom(T* geom, const ParmVec& pv, const HepGeom::Transform3D& tr, const DetId& id);

  void myFillGeom(T* geom, const ParmVec& pv, const HepGeom::Transform3D& tr, const unsigned int id);

  unsigned int getDetIdForDDDNode(const DDFilteredView& fv);

  typename T::NumberingScheme m_scheme;
  DDSpecificsFilter m_filter;
};

#endif