|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +#include <DetectorsBase/Detector.h> |
| 13 | +#include <DetectorsBase/MaterialManager.h> |
| 14 | +#include <Alice3DetectorsPassive/Absorber.h> |
| 15 | +#include <TGeoArb8.h> // for TGeoTrap |
| 16 | +#include <TGeoCompositeShape.h> |
| 17 | +#include <TGeoCone.h> |
| 18 | +#include <TGeoManager.h> |
| 19 | +#include <TGeoMatrix.h> |
| 20 | +#include <TGeoPcon.h> |
| 21 | +#include <TGeoPgon.h> |
| 22 | +#include <TGeoTube.h> |
| 23 | +#include <TGeoVolume.h> |
| 24 | +#ifdef NDEBUG |
| 25 | +#undef NDEBUG |
| 26 | +#endif |
| 27 | +#include <cassert> |
| 28 | + |
| 29 | +using namespace o2::passive; |
| 30 | + |
| 31 | +Alice3Absorber::~Alice3Absorber() = default; |
| 32 | + |
| 33 | +Alice3Absorber::Alice3Absorber() : Alice3PassiveBase("A3ABSO", "") {} |
| 34 | +Alice3Absorber::Alice3Absorber(const char* name, const char* Title) : Alice3PassiveBase(name, Title) {} |
| 35 | +Alice3Absorber::Alice3Absorber(const Alice3Absorber& rhs) = default; |
| 36 | + |
| 37 | +Alice3Absorber& Alice3Absorber::operator=(const Alice3Absorber& rhs) |
| 38 | +{ |
| 39 | + // self assignment |
| 40 | + if (this == &rhs) { |
| 41 | + return *this; |
| 42 | + } |
| 43 | + |
| 44 | + // base class assignment |
| 45 | + FairModule::operator=(rhs); |
| 46 | + |
| 47 | + return *this; |
| 48 | +} |
| 49 | + |
| 50 | +void Alice3Absorber::createMaterials() |
| 51 | +{ |
| 52 | + |
| 53 | + auto& matmgr = o2::base::MaterialManager::Instance(); |
| 54 | + // Define materials for muon absorber |
| 55 | + // |
| 56 | + Int_t isxfld = 2.; |
| 57 | + Float_t sxmgmx = 10.; |
| 58 | + o2::base::Detector::initFieldTrackingParams(isxfld, sxmgmx); |
| 59 | + |
| 60 | + // |
| 61 | + // Steel |
| 62 | + // |
| 63 | + Float_t asteel[4] = {55.847, 51.9961, 58.6934, 28.0855}; |
| 64 | + Float_t zsteel[4] = {26., 24., 28., 14.}; |
| 65 | + Float_t wsteel[4] = {.715, .18, .1, .005}; |
| 66 | + // |
| 67 | + // Air |
| 68 | + // |
| 69 | + float aAir[4] = {12.0107, 14.0067, 15.9994, 39.948}; |
| 70 | + float zAir[4] = {6., 7., 8., 18.}; |
| 71 | + float wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827}; |
| 72 | + float dAir = 1.20479E-3; |
| 73 | + float dAir1 = 1.20479E-11; |
| 74 | + |
| 75 | + // **************** |
| 76 | + // Defines tracking media parameters. |
| 77 | + // |
| 78 | + Float_t epsil, stmin, tmaxfd, deemax, stemax; |
| 79 | + epsil = .001; // Tracking precision, |
| 80 | + stemax = -0.01; // Maximum displacement for multiple scat |
| 81 | + tmaxfd = -20.; // Maximum angle due to field deflection |
| 82 | + deemax = -.3; // Maximum fractional energy loss, DLS |
| 83 | + stmin = -.8; |
| 84 | + // *************** |
| 85 | + // |
| 86 | + |
| 87 | + matmgr.Mixture("ALICE3ABSO", 16, "VACUUM0$", aAir, zAir, dAir1, 4, wAir); |
| 88 | + matmgr.Medium("ALICE3ABSO", 16, "VA_C0", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); |
| 89 | + |
| 90 | + // |
| 91 | + // Steel |
| 92 | + matmgr.Mixture("ALICE3ABSO", 19, "STAINLESS STEEL0$", asteel, zsteel, 7.88, 4, wsteel); |
| 93 | + matmgr.Mixture("ALICE3ABSO", 39, "STAINLESS STEEL1$", asteel, zsteel, 7.88, 4, wsteel); |
| 94 | + matmgr.Mixture("ALICE3ABSO", 59, "STAINLESS STEEL2$", asteel, zsteel, 7.88, 4, wsteel); |
| 95 | + matmgr.Medium("ALICE3ABSO", 19, "ST_C0", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); |
| 96 | + matmgr.Medium("ALICE3ABSO", 39, "ST_C1", 39, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); |
| 97 | + matmgr.Medium("ALICE3ABSO", 59, "ST_C3", 59, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); |
| 98 | +} |
| 99 | + |
| 100 | +void Alice3Absorber::ConstructGeometry() |
| 101 | +{ |
| 102 | + createMaterials(); |
| 103 | + |
| 104 | + // |
| 105 | + // Build muon shield geometry |
| 106 | + // |
| 107 | + // |
| 108 | + |
| 109 | + auto& matmgr = o2::base::MaterialManager::Instance(); |
| 110 | + |
| 111 | + // |
| 112 | + // Media |
| 113 | + // |
| 114 | + |
| 115 | + auto kMedVac = matmgr.getTGeoMedium("ALICE3ABSO_VA_C0"); |
| 116 | + auto kMedSteel = matmgr.getTGeoMedium("ALICE3ABSO_ST_C0"); |
| 117 | + auto kMedSteelSh = matmgr.getTGeoMedium("ALICE3ABSO_ST_C3"); |
| 118 | + |
| 119 | + // The top volume |
| 120 | + TGeoVolume* top = gGeoManager->GetVolume("cave"); |
| 121 | + TGeoVolume* barrel = gGeoManager->GetVolume("barrel"); |
| 122 | + if (!barrel) { |
| 123 | + LOG(fatal) << "Could not find the top volume"; |
| 124 | + } |
| 125 | + |
| 126 | + TGeoPcon* absorings = new TGeoPcon(0., 360., 18); |
| 127 | + |
| 128 | + absorings->DefineSection(0, 500, 236, 274); |
| 129 | + absorings->DefineSection(1, 400, 236, 274); |
| 130 | + absorings->DefineSection(2, 400, 232.5, 277.5); |
| 131 | + absorings->DefineSection(3, 300, 232.5, 277.5); |
| 132 | + absorings->DefineSection(4, 300, 227.5, 282.5); |
| 133 | + absorings->DefineSection(5, 200, 227.5, 282.5); |
| 134 | + absorings->DefineSection(6, 200, 222.5, 287.5); |
| 135 | + absorings->DefineSection(7, 100, 222.5, 287.5); |
| 136 | + absorings->DefineSection(8, 100, 220, 290); |
| 137 | + absorings->DefineSection(9, -100, 220, 290); |
| 138 | + absorings->DefineSection(10, -100, 222.5, 287.5); |
| 139 | + absorings->DefineSection(11, -200, 222.5, 287.5); |
| 140 | + absorings->DefineSection(12, -200, 227.5, 282.5); |
| 141 | + absorings->DefineSection(13, -300, 227.5, 282.5); |
| 142 | + absorings->DefineSection(14, -300, 232.5, 277.5); |
| 143 | + absorings->DefineSection(15, -400, 232.5, 277.5); |
| 144 | + absorings->DefineSection(16, -400, 236, 274); |
| 145 | + absorings->DefineSection(17, -500, 236, 274); |
| 146 | + |
| 147 | + // Insert |
| 148 | + absorings->SetName("absorings"); |
| 149 | + |
| 150 | + TGeoVolume* abso = new TGeoVolume("Absorber", absorings, kMedSteel); |
| 151 | + |
| 152 | + abso->SetVisibility(1); |
| 153 | + abso->SetTransparency(50); |
| 154 | + abso->SetLineColor(kGray); |
| 155 | + |
| 156 | + // |
| 157 | + // Adding volumes to mother volume |
| 158 | + // |
| 159 | + |
| 160 | + barrel->AddNode(abso, 1, new TGeoTranslation(0, 30.f, 0)); |
| 161 | +} |
| 162 | + |
| 163 | +FairModule* Alice3Absorber::CloneModule() const { return new Alice3Absorber(*this); } |
| 164 | +ClassImp(o2::passive::Alice3Absorber); |
0 commit comments