2 #include "gearimpl/Util.h"
3 #include "gearxml/GearXML.h"
4 #include "gear/GearMgr.h"
7 #include "gear/GearDistanceProperties.h"
8 #include "gear/GearPointProperties.h"
21 using namespace gear ;
24 void gear_unexpected(){
30 }
catch( std::exception& e) {
32 std::cout <<
" A runtime error has occured : "
35 <<
" the program will have to be terminated - sorry." << std::endl ;
45 int main(
int argc,
char**argv){
48 std::set_terminate( gear_unexpected ) ;
51 std::cout <<
" testMaterialMap: Testprogram for ceating material map based on gdml file with GearDistanceProperties. " << std::endl
52 <<
" usage: testgear input.xml " << std::endl ;
56 std::string fileName( argv[1] ) ;
60 GearMgr* gearMgr = gearXML.createGearMgr() ;
67 std::vector<std::string> matNames,volNames;
71 for(
int r=0;r<400;r+=40)
73 for(
int theta=1;theta<90;theta+=2)
76 final[2] = r*cos(theta*M_PI/180);
77 final[1] =
final[2]*tan(theta*M_PI/180);
81 std::cout<<r<<
" "<<theta<<
" "<<interactionLengthsFromIp<<
" "<<radiationLengthsFromIp<<std::endl;
virtual double getNIntlen(const Vector3D &p0, const Vector3D &p1) const =0
The number of interaction lengths along the distance between [p0,p1] .
virtual const GearDistanceProperties & getDistanceProperties() const =0
Get the distance properties object.
Implementation of GEAR using XML.
virtual double getNRadlen(const Vector3D &p0, const Vector3D &p1) const =0
The number of radiation lengths along the distance between [p0,p1] .
NotImplementedException used for features that are not implemented.
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
Abstract interface for a manager class that returns the Gear classes for the relevant subdetectors...