001 #include "MuonGeoModel/DriftTube.h"
002 #include "GeoModelKernel/GeoTube.h"
003 #include "GeoModelKernel/GeoLogVol.h"
004 #include "GeoModelKernel/GeoMaterial.h"
005 #include "GeoModelKernel/GeoPhysVol.h"
006 #include "GeoModelKernel/GeoTransform.h"
007 #include "GeoModelKernel/GeoSerialDenominator.h"
008 #include "GeoModelKernel/GeoNameTag.h"
009 #include "MuonGeoModel/MYSQL.h"
010 #include "MuonGeoModel/MDT_Technology.h"
011 #include <iostream>
012 #include <string>
013
014 namespace MuonGM {
015
016 DriftTube::DriftTube(std::string n): DetectorElement(n)
017 {
018
019 gasMaterial="muo::ArCO2";
020 tubeMaterial="std::Aluminium";
021 plugMaterial="std::Bakelite";
022 wireMaterial="std::Aluminium";
023 MYSQL *amdb=MYSQL::GetPointer();
024 MDT *md=(MDT *)amdb->GetTechnology(name.substr(0,5));
025 gasRadius = md->innerRadius;
026 outerRadius = gasRadius+md->tubeWallThickness;
027 plugLength = md->tubeEndPlugLength;
028
029
030
031
032
033 }
034
035 GeoVPhysVol *DriftTube::build()
036 {
037 const GeoTube *stube = new GeoTube(0.0, outerRadius, length/2.0);
038 const GeoMaterial *mtube = matManager->getMaterial(tubeMaterial);
039 const GeoLogVol *ltube = new GeoLogVol("MDTDriftWall", stube, mtube);
040 GeoPhysVol *ptube = new GeoPhysVol(ltube);
041
042 const GeoTube *splug = new GeoTube(0.0, outerRadius, plugLength/2.0);
043 const GeoMaterial *mplug = matManager->getMaterial(plugMaterial);
044 const GeoLogVol *lplug = new GeoLogVol("Endplug",splug, mplug);
045 GeoPhysVol *pplug = new GeoPhysVol(lplug);
046
047 const GeoTube *sgas = new GeoTube(0, gasRadius, length/2.0-plugLength);
048 const GeoMaterial *mgas = matManager->getMaterial(gasMaterial);
049 const GeoLogVol *lgas = new GeoLogVol("SensitiveGas",sgas,mgas);
050 GeoPhysVol *pgas = new GeoPhysVol(lgas);
051
052 GeoSerialDenominator *plugDenominator= new GeoSerialDenominator("Tube Endplug");
053 GeoTransform *ec0X = new GeoTransform(HepTranslateZ3D(+(length-plugLength)/2));
054 GeoTransform *ec1X = new GeoTransform(HepTranslateZ3D(-(length-plugLength)/2));
055 std::string sGasName = "SensitiveGas";
056 GeoNameTag *gasDenominator = new GeoNameTag(sGasName);
057
058 ptube->add(plugDenominator);
059 ptube->add(ec0X);
060 ptube->add(pplug);
061 ptube->add(ec1X);
062 ptube->add(pplug);
063 ptube->add(gasDenominator);
064 ptube->add(pgas);
065
066 return ptube;
067
068
069 }
070
071 void DriftTube::print()
072 {
073 std::cout << "Drift tube " << name.c_str() << " :" << std::endl;
074 std::cout << " Tube material : " << tubeMaterial.c_str() << std::endl;
075 std::cout << " Radius : " << outerRadius << std::endl;
076 std::cout << " Length : " << length;
077 std::cout << " Thickness : " << outerRadius-gasRadius << " mm" << std::endl;
078 std::cout << " Gas material : " << gasMaterial.c_str() << std::endl;
079 std::cout << " EP length : " << plugLength << std::endl;
080 }
081 }
082
| Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
|
This page was automatically generated by the
LXR engine.
|
|