Skip to content
Snippets Groups Projects
Commit c7d89e00 authored by Eoin Clerkin's avatar Eoin Clerkin
Browse files

Adds psd_v23a

parent d79a3337
No related branches found
No related tags found
No related merge requests found
/* Copyright (C) 2017-2020 Physikalisches Institut, Eberhard Karls Universitaet Tuebingen, Tübingen
/* Copyright (C) 2017-2023 Physikalisches Institut, Eberhard Karls Universitaet Tuebingen, Tuebingen
SPDX-License-Identifier: GPL-3.0-only
Authors: Volker Friese, Viktor Klochkov [committer] */
Authors: Eoin Clerkin, Volker Friese, Viktor Klochkov [committer] */
/** @file create_psdgeo_with_hole.C
** @author Volker Friese <v.friese@gsi.de>
......@@ -28,7 +28,7 @@ using std::setw;
// Forward declarations
TGeoVolume* ConstructModule(const char* name, Double_t moduleSize, Int_t nLayers, fstream* info = 0);
TGeoVolume* ConstructModuleWithHole(const char* name, Double_t moduleSize, Int_t nLayers, fstream* info = 0,
TGeoVolumeAssembly* ConstructModuleWithHole(const char* name, Double_t moduleSize, Int_t nLayers, fstream* info = 0,
float holesize = 20, Int_t hole_pos = 0);
TGeoVolume* ConstructShield(const char* name, Double_t sizeXY, Double_t holesize, Int_t hole_pos, fstream* info);
......@@ -37,7 +37,7 @@ TGeoVolume* ConstructShield(const char* name, Double_t sizeXY, Double_t holesize
// ====== Main function =====
// ============================================================================
void create_psdgeo_with_hole(TString geoTag = "v22c")
void create_psdgeo_with_hole(TString geoTag = "v23a")
{
// ----- Steering variables ---------------------------------------------
......@@ -48,7 +48,7 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
Double_t holeSize; // side length of the square shaped hole (cm)
TString comment; // short description
if (geoTag == "v22a") {
if (geoTag == "v23a") {
psdX = 13.1;
psdY = 0.;
psdZ = 1010;
......@@ -56,7 +56,7 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
holeSize = 20.;
comment = "Position for Au beam at 12A GeV/c and 100% magnetic field strength";
}
else if (geoTag == "v22b") {
else if (geoTag == "v23b") {
psdX = 28.56;
psdY = 0.;
psdZ = 1010;
......@@ -64,7 +64,7 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
holeSize = 20.;
comment = "Position for Au beam at 3.3A GeV/c and 60% magnetic field strength (to fit beam dump)";
}
else if (geoTag == "v22c") {
else if (geoTag == "v23c") {
psdX = -90;
psdY = -70;
psdZ = 1756;
......@@ -72,60 +72,6 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
holeSize = 20.;
comment = "This is the PSD parking position for an out-of-the-way position to be used in hadron and muon setuos.";
}
else if (geoTag == "v20c") {
psdX = 12.95;
psdY = 0.;
psdZ = 1010;
psdRotY = 0.0132;
holeSize = 20.;
comment = "This is a coordinate shifted version of v20a";
}
else if (geoTag == "v20a") {
psdX = 12.95;
psdY = 0.;
psdZ = 1050;
psdRotY = 0.0132;
holeSize = 20.;
}
else if (geoTag == "v20b") {
psdX = 13.75;
psdY = 0.;
psdZ = 1100;
psdRotY = 0.0132;
holeSize = 20.;
}
else if (geoTag == "v18e") {
psdX = 9.65;
psdY = 0.;
psdZ = 800.;
psdRotY = 0.01321;
holeSize = 20.;
}
else if (geoTag == "v18f") {
psdX = 9.65;
psdY = 0.;
psdZ = 800.;
psdRotY = 0.01321;
holeSize = 6.;
}
else if (geoTag == "v18g") {
psdX = 9.65;
psdY = 0.;
psdZ = 800.;
psdRotY = 0.01321;
holeSize = 0.;
}
else if (geoTag == "v18m") {
psdX = 8.9;
psdY = 0.;
psdZ = 1500.;
psdRotY = 0.01321;
holeSize = 20.;
}
else {
cout << "\n\n\nERROR: Unrecognized geoTag! Exiting!\n\n\n";
return;
}
const Double_t bigModuleSize = 20.; // Module size (cm)
const Int_t nModulesX = 8; // Number of modules in a row (x direction)
......@@ -239,16 +185,20 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
// -------------- Create geometry and top volume -------------------------
cout << endl << "==> Set top volume..." << endl;
gGeoManager->SetName("PSDgeom");
TGeoVolume* top = new TGeoVolumeAssembly("TOP");
// TGeoVolume* top = new TGeoVolumeAssembly("TOP");
TGeoVolumeAssembly* top = new TGeoVolumeAssembly("TOP");
gGeoManager->SetTopVolume(top);
// --------------------------------------------------------------------------
// ----- Create the PSD modules -----------------------------------------
cout << endl;
TGeoVolume* module2060 = ConstructModule("module2060", bigModuleSize, nLayers, &infoFile);
// TGeoVolume* module2060 = ConstructModuleWithHole("module2060_hole", bigModuleSize, 60, &infoFile);
TGeoVolume* module_shield = ConstructShield("shield20", bigModuleSize, 0., 0, &infoFile);
// TGeoVolume* module2060_hole = ConstructModuleWithHole("module2060_hole", bigModuleSize, 60, &infoFile);
// --------------------------------------------------------------------------
......@@ -264,7 +214,8 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
TString psdName = "psd_";
psdName += geoTag;
TGeoVolume* psd = gGeoManager->MakeBox(psdName, psdMedium, psdSizeX, psdSizeY, psdSizeZ + 0.5 * shieldWidth);
// TGeoVolume* psd = gGeoManager->MakeBox(psdName, psdMedium, psdSizeX, psdSizeY, psdSizeZ + 0.5 * shieldWidth);
TGeoVolumeAssembly* psd = new TGeoVolumeAssembly(psdName);
cout << "Module array is " << nModulesX << " x " << nModulesY << endl;
cout << "PSD size is " << 2. * psdSizeX << " cm x " << 2. * psdSizeY << " cm x " << 2. * psdSizeZ << " cm" << endl;
infoFile << endl
......@@ -301,11 +252,9 @@ void create_psdgeo_with_hole(TString geoTag = "v22c")
// Make hole in 4 central modules
if ((iModX == nModulesX / 2 || iModX == nModulesX / 2 - 1)
&& (iModY == nModulesY / 2 || iModY == nModulesY / 2 - 1)) {
psd->AddNode(ConstructModuleWithHole(Form("module2060_hole_%d", iHole), bigModuleSize, nLayers, &infoFile,
holeSize, iHole),
iModule, trans);
psd->AddNode(ConstructShield(Form("shield20_hole_%d", iHole), bigModuleSize, holeSize, iHole, &infoFile),
iModule, trans_shield);
// psd->AddNode(ConstructModuleWithHole(Form("module2060_hole_%d", iHole), bigModuleSize, nLayers, &infoFile, holeSize, iHole), iModule, trans);
// psd->AddNode(ConstructShield(Form("shield20_hole_%d", iHole), bigModuleSize, holeSize, iHole, &infoFile),iModule, trans_shield);
iHole++;
}
else {
......@@ -647,7 +596,7 @@ TGeoVolume* ConstructModule(const char* name, Double_t sizeXY, Int_t nLayers, fs
}
TGeoVolume* ConstructModuleWithHole(const char* name, Double_t sizeXY, Int_t nLayers, fstream* info, float holesize,
TGeoVolumeAssembly* ConstructModuleWithHole(const char* name, Double_t sizeXY, Int_t nLayers, fstream* info, float holesize,
Int_t hole_pos)
{
......@@ -660,7 +609,7 @@ TGeoVolume* ConstructModuleWithHole(const char* name, Double_t sizeXY, Int_t nLa
// for constructional reasons.
if (holesize == 0.) return ConstructModule(name, sizeXY, nLayers, info);
// if (holesize == 0.) return ConstructModule(name, sizeXY, nLayers, info);
const TString suffix = Form("_%d_%d_%d", int(sizeXY), int(holesize), int(hole_pos));
......@@ -834,5 +783,8 @@ TGeoVolume* ConstructModuleWithHole(const char* name, Double_t sizeXY, Int_t nLa
module->AddNode(lead, 0);
// ------------------------------------------------------------------------
return module;
TGeoVolumeAssembly* modulewithhole = new TGeoVolumeAssembly("test");
modulewithhole->AddNode(module,0,nullptr,"");
return modulewithhole;
}
File added
......@@ -7,6 +7,10 @@
**
**/
// 2023-05-01 - EC - Psd with hole for tunnel.
// 2023-04-06 - EC - Adds different rich for Apple
// 2023-04-06 - EC - Adds different rich for Apple
// 2023-04-04 - EC - Downgrade to rich v21a
// 2023-03-01 - EC - Default FEB23 geometries
// 2022-09-13 - EC - Replaces rich with v22a
......@@ -29,7 +33,7 @@ void setup_sis100_electron()
TString richGeoTag = "v23a";
TString trdGeoTag = "v20b_1e";
TString tofGeoTag = "v21a_1e";
TString psdGeoTag = "v22a"; // Paused or Removed Detector System, placeholder for Forward Wall Detector
TString psdGeoTag = "v23a";
TString platGeoTag = "v22b";
// ------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment