diff --git a/Detector/DetCRD/src/include/FieldMapBrBz.h b/Detector/DetCRD/src/include/FieldMapBrBz.h deleted file mode 100644 index 899b2c4a3865c662d7df72c1ba75d4d8b3f6cd12..0000000000000000000000000000000000000000 --- a/Detector/DetCRD/src/include/FieldMapBrBz.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef FieldMap_rzBrBz_h -#define FieldMap_rzBrBz_h 1 - -#include <DD4hep/FieldTypes.h> - -#include <string> -#include <vector> - -class FieldMapBrBz: public dd4hep::CartesianField::Object { -public: - - struct FieldValues_t { - double Br; - double Bz; - FieldValues_t(double _Br, double _Bz): - Br(_Br), Bz(_Bz) {} - }; - - int coorsOrder; // integer with the order with which variables are scanned in the fieldmap, 1(2) for RZ(ZR) order - std::string strCoorsOrder; // string with the order with which variables are scanned in the fieldmap, RZ or ZR order - std::string ntupleName; // tree name - std::string rhoVar; // rho coordinate name in tree - std::string zVar; // z coordinate name in tree - std::string BrhoVar; // Brho component name in tree - std::string BzVar; // Bz component name in tree - - int nRho, nZ; // bins in rho and z coordinates in fieldmap - int rhoOrdering; // rho coordinate ordering, 1(-1) if from low-to-high (high-to-low) - double rhoMin, rhoMax, rhoStep, rScale; // min, max, step-size and scale factor of rho coordinate in fieldmap - int zOrdering; // z coordinate ordering, 1(-1) if from low-to-high (high-to-low) - double zMin, zMax, zStep, zScale; // min, max, step-size and scale factor of z coordinate in fieldmap - - double bScale; //Bfield scale factor - std::vector< FieldValues_t > fieldMap; //List with the field map points - -public: - /// Initializing constructor - FieldMapBrBz(); - /// Call to access the field components at a given location - virtual void fieldComponents(const double* pos, double* field); - /// Field the FieldMap from the the tree specified in the XML - void fillFieldMapFromTree(const std::string& filename, double coorUnits, double BfieldUnits); - /// Get global index in the Field map - int getGlobalIndex(const int rBin, const int zBin); -}; - - -#endif // FieldMap_rzBrBz_h diff --git a/Detector/DetCRD/src/include/FieldMapXYZ.h b/Detector/DetCRD/src/include/FieldMapXYZ.h deleted file mode 100644 index ce8e06d15ac1d863ad375871e8c7e182ed0e1460..0000000000000000000000000000000000000000 --- a/Detector/DetCRD/src/include/FieldMapXYZ.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef FieldMap_XYZ_h -#define FieldMap_XYZ_h 1 - -#include <DD4hep/FieldTypes.h> - -#include <string> -#include <vector> - -class FieldMapXYZ: public dd4hep::CartesianField::Object { -public: - - struct FieldValues_t { - double Bx; - double By; - double Bz; - FieldValues_t(double _Bx, double _By, double _Bz): - Bx(_Bx), By(_By), Bz(_Bz) {} - }; - - int coorsOrder; // integer with the order with which variables are scanned in the fieldmap, 1(2) for RZ(ZR) order - std::string strCoorsOrder; // string with the order with which variables are scanned in the fieldmap, RZ or ZR order - std::string ntupleName; // tree name - std::string xVar; // x coordinate name in tree - std::string yVar; // y coordinate name in tree - std::string zVar; // z coordinate name in tree - std::string BxVar; // Bx component name in tree - std::string ByVar; // By component name in tree - std::string BzVar; // Bz component name in tree - - int nX, nY, nZ; // bins in x, y and z coordinates in fieldmap - int xOrdering; // x coordinate ordering, 1(-1) if from low-to-high (high-to-low) - double xMin,xMax,xStep,xScale; // min, max, step-size and scale factor of x coordinate in fieldmap - int yOrdering; // y coordinate ordering, 1(-1) if from low-to-high (high-to-low) - double yMin,yMax,yStep,yScale; // min, max, step-size and scale factor of y coordinate in fieldmap - int zOrdering; // z coordinate ordering, 1(-1) if from low-to-high (high-to-low) - double zMin,zMax,zStep,zScale; // min, max, step-size and scale factor of z coordinate in fieldmap - - double bScale; //Bfield scale factor - std::vector< FieldValues_t > fieldMap; //List with the field map points - -public: - /// Initializing constructor - FieldMapXYZ(); - - /// Call to access the field components at a given location - virtual void fieldComponents(const double* pos, double* field); - /// Field the FieldMap from the the tree specified in the XML - void fillFieldMapFromTree(const std::string& filename, double coorUnits, double BfieldUnits); - /// Get global index in the Field map - int getGlobalIndex(const int xBin, const int yBin, const int zBin); - -}; - - -#endif // FieldMap_XYZ_h diff --git a/Detector/DetCRD/src/include/LcgeoExceptions.h b/Detector/DetCRD/src/include/LcgeoExceptions.h deleted file mode 100644 index 69166a0f240075bb8679bad32a3db37a8c690be6..0000000000000000000000000000000000000000 --- a/Detector/DetCRD/src/include/LcgeoExceptions.h +++ /dev/null @@ -1,27 +0,0 @@ -//==================================================================== -// DDSim - LC simulation based on DD4hep -//-------------------------------------------------------------------- -// F.Gaede, DESY -//==================================================================== -#ifndef Exceptions_h -#define Exceptions_h - -#include <exception> - -namespace lcgeo { - - //define some exception to throw - class GeometryException : public std::exception{ - - protected: - std::string message; - GeometryException() { /*no_op*/ ; } - - public: - GeometryException( std::string text ){ - message = "GeometryException: " + text ; - } - virtual const char* what() const noexcept { return message.c_str() ; } - }; -} -#endif diff --git a/Detector/DetCRD/src/include/XMLHandlerDB.h b/Detector/DetCRD/src/include/XMLHandlerDB.h deleted file mode 100644 index 7285d2bc0178b38af0a65d74247c67aa5c6c7269..0000000000000000000000000000000000000000 --- a/Detector/DetCRD/src/include/XMLHandlerDB.h +++ /dev/null @@ -1,23 +0,0 @@ -#include "XML/XMLDetector.h" -#include <string> - -namespace { - /** Wrapper class to replace the Database class used in Mokka to read the parameters. - * Assumes parameters are stored as attributes of the corresponding xml element. - */ - struct XMLHandlerDB{ - xml_comp_t x_det ; - /** C'tor initializes the handle */ - XMLHandlerDB(xml_comp_t det) : x_det(det) {} - - double fetchDouble( const char* _name){ return x_det.attr<double>( dd4hep::xml::Strng_t(_name) ) ; } - - int fetchInt( const char* _name){ return x_det.attr<int>( dd4hep::xml::Strng_t(_name) ) ; } - - std::string fetchString( const char* _name){ return x_det.attr<std::string>( dd4hep::xml::Strng_t(_name) ) ;} - - /** allow this to be used as a 'pointer' ( as was used for Mokka Database object)*/ - XMLHandlerDB* operator->() { return this ; } - }; - -} diff --git a/Detector/DetCRD/src/include/lcgeo.h b/Detector/DetCRD/src/include/lcgeo.h deleted file mode 100644 index b5a233eee6078de0aca95c3d1966c55238713209..0000000000000000000000000000000000000000 --- a/Detector/DetCRD/src/include/lcgeo.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef lcgeo_h -#define lcgeo_h - -// file for some global configuration of lcgeo -// so far only version number: - -// define version macros for Lcgeo -#define LCGEO_MAJOR_VERSION 0 -#define LCGEO_MINOR_VERSION 5 - -#define LCGEO_VERSION_GE( MAJV , MINV ) ( ( LCGEO_MAJOR_VERSION > MAJV ) || ( (LCGEO_MAJOR_VERSION==MAJV) && ( LCGEO_MINOR_VERSION >= MINV ) ) ) - -#define LCGEO_VERSION_GT( MAJV , MINV ) ( ( LCGEO_MAJOR_VERSION > MAJV ) || ( (LCGEO_MAJOR_VERSION==MAJV) && ( LCGEO_MINOR_VERSION > MINV ) ) ) - -namespace lcgeo { - - /// return a string with the current lcgeo version in the form vXX-YY. - inline std::string versionString(){ - std::string vs("vXX-YY") ; - std::sprintf( &vs[0] , "v%2.2d-%2.2d", LCGEO_MAJOR_VERSION, LCGEO_MINOR_VERSION ) ; - return vs ; - } - -} - -#endif