3 #include "Sti/StiCylindricalShape.h"
4 #include "Sti/StiMaterial.h"
5 #include "Sti/StiPlacement.h"
6 #include "Sti/StiDetector.h"
7 #include "StiSsd/StiSstDetectorBuilder1.h"
10 StiSstDetectorBuilder1::StiSstDetectorBuilder1(
bool active,
bool buildIdealGeom)
16 StiSstDetectorBuilder1::~StiSstDetectorBuilder1()
31 {
"SFMO",
"Mother of the SST detector",
"HALL_1/CAVE_1/TpcRefSys_1/IDSM_1",
"",
""}
35 Int_t nVolumes =
sizeof(volumes) /
sizeof(
VolumeMap_t);
36 gGeoManager->RestoreMasterVolume();
39 for (Int_t i = 0; i < nVolumes; i++) {
41 if ( !gGeoManager->cd(volumes[i].path) ) {
42 Warning(
"buildInactiveVolumes()",
"Cannot find path to %s node. Skipping to next node...", volumes[i].name);
46 TGeoNode *geoNode = gGeoManager->GetCurrentNode();
48 if (!geoNode)
continue;
50 LOG_DEBUG <<
"Current node : " << i <<
"/" << nVolumes <<
" path is : " << volumes[i].name << endm;
51 LOG_DEBUG <<
"Number of daughters : " << geoNode->GetNdaughters() <<
" weight : " << geoNode->GetVolume()->Weight() << endm;
53 StiVMCToolKit::LoopOverNodes(geoNode, volumes[i].path, volumes[i].name, MakeAverageVolume);
56 int row = getNRows() - 1;
60 StiDetector *stiDetector = getDetector(row, sector);
63 if (std::string(volumes[i].name) == std::string(
"SFMO"))
64 segmentSFMOVolume(stiDetector);
99 void StiSstDetectorBuilder1::segmentSFMOVolume(
StiDetector* stiSFMO)
104 stiSFMOShape->setThickness(0.75*stiSFMOShape->getThickness());
109 stiSFMOEndShape->setHalfDepth(8.25);
111 add(stiSFMOEndShape);
113 stiSFMOShape->setHalfDepth(34);
116 StiMaterial* stiSFMOMaterial = stiSFMO->getMaterial();
118 stiSFMOMaterial->
set(stiSFMOMaterial->
getName(), 7.33, 14.66, 0.0843, 29480);
122 stiSFMOEndMaterial->
set(stiSFMOMaterial->
getName() +
"_end", 7.63, 15.29, 0.380, 24650);
124 add(stiSFMOEndMaterial);
130 stiSFMOEndPlacement->setZcenter(stiSFMOShape->getHalfDepth() + stiSFMOEndShape->getHalfDepth());
133 stiSFMOEnd->setShape(stiSFMOEndShape);
134 stiSFMOEnd->setPlacement(stiSFMOEndPlacement);
135 stiSFMOEnd->setMaterial(stiSFMOEndMaterial);
137 add(getNRows(), 0, stiSFMOEnd);
142 stiSFMOEndPlacement =
new StiPlacement(*stiSFMOEnd2->getPlacement());
143 stiSFMOEndPlacement->setZcenter(-stiSFMOShape->getHalfDepth() - stiSFMOEndShape->getHalfDepth());
146 stiSFMOEnd2->setShape(stiSFMOEndShape);
147 stiSFMOEnd2->setPlacement(stiSFMOEndPlacement);
148 stiSFMOEnd2->setMaterial(stiSFMOEndMaterial);
150 add(getNRows(), 0, stiSFMOEnd2);
virtual void buildInactiveVolumes()
void set(const string &name, double z, double a, double density, double radLength, double ionization)
void setName(const string &newName)
Set the name of the object.
const string & getName() const
Get the name of the object.