Skip to content

Commit b2d0703

Browse files
jmunozmesawenzel
authored andcommitted
Add Alice3 absorber
1 parent 8d6f826 commit b2d0703

File tree

6 files changed

+220
-3
lines changed

6 files changed

+220
-3
lines changed

Common/SimConfig/src/SimConfig.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
9393
#ifdef ENABLE_UPGRADES
9494
if (mIsRun5) {
9595
for (int d = DetID::First; d <= DetID::Last; ++d) {
96-
if (d == DetID::IT3 || d == DetID::TRK || d == DetID::FT3 || d == DetID::FCT) {
96+
if (d == DetID::TRK || d == DetID::FT3 || d == DetID::FCT) {
9797
activeModules.emplace_back(DetID::getName(d));
9898
}
9999
}
100100
activeModules.emplace_back("A3IP");
101+
activeModules.emplace_back("A3ABSO");
101102
} else {
102103
#endif
103104
// add passive components manually (make a PassiveDetID for them!)

Detectors/Upgrades/ALICE3/Passive/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
o2_add_library(Alice3DetectorsPassive
1313
SOURCES src/Pipe.cxx
1414
src/PassiveBase.cxx
15+
src/Absorber.cxx
1516
PUBLIC_LINK_LIBRARIES O2::Field O2::DetectorsBase O2::SimConfig)
1617

1718
o2_target_root_dictionary(Alice3DetectorsPassive
1819
HEADERS include/Alice3DetectorsPassive/Pipe.h
1920
include/Alice3DetectorsPassive/PassiveBase.h
20-
LINKDEF src/PassiveLinkDef.h)
21+
include/Alice3DetectorsPassive/Absorber.h
22+
LINKDEF src/PassiveLinkDef.h)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
#ifndef ALICE3_PASSIVE_ABSORBER_H
13+
#define ALICE3_PASSIVE_ABSORBER_H
14+
15+
#include "Alice3DetectorsPassive/PassiveBase.h"
16+
17+
namespace o2
18+
{
19+
namespace passive
20+
{
21+
class Alice3Absorber : public Alice3PassiveBase
22+
{
23+
public:
24+
Alice3Absorber(const char* name, const char* Title = "ALICE3 Absorber");
25+
Alice3Absorber();
26+
~Alice3Absorber() override;
27+
void ConstructGeometry() override;
28+
void createMaterials();
29+
30+
/// Clone this object (used in MT mode only)
31+
FairModule* CloneModule() const override;
32+
33+
private:
34+
Alice3Absorber(const Alice3Absorber& orig);
35+
Alice3Absorber& operator=(const Alice3Absorber&);
36+
37+
ClassDefOverride(o2::passive::Alice3Absorber, 1);
38+
};
39+
} // namespace passive
40+
} // namespace o2
41+
42+
#endif
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
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);

Detectors/Upgrades/ALICE3/Passive/src/PassiveLinkDef.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717

1818
#pragma link C++ class o2::passive::Alice3PassiveBase + ;
1919
#pragma link C++ class o2::passive::Alice3Pipe + ;
20+
#pragma link C++ class o2::passive::Alice3Absorber + ;
2021

21-
#endif
22+
#endif

macro/build_geometry.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include <FT3Simulation/Detector.h>
5555
#include <FCTSimulation/Detector.h>
5656
#include <Alice3DetectorsPassive/Pipe.h>
57+
#include <Alice3DetectorsPassive/Absorber.h>
5758
#endif
5859

5960
void finalize_geometry(FairRunSim* run);
@@ -161,6 +162,12 @@ void build_geometry(FairRunSim* run = nullptr)
161162
if (isActivated("A3IP")) {
162163
run->AddModule(new o2::passive::Alice3Pipe("A3IP", "Alice 3 beam pipe", !isActivated("TRK"), 0.48f, 0.025f, 1000.f, 3.7f, 0.08f, 1000.f));
163164
}
165+
166+
// the absorber
167+
if (isActivated("A3ABSO")) {
168+
run->AddModule(new o2::passive::Alice3Absorber("A3ABSO", "ALICE3 Absorber"));
169+
}
170+
164171
#endif
165172

166173
// the absorber

0 commit comments

Comments
 (0)