Skip to content

Commit e3dd256

Browse files
mconcassawenzel
authored andcommitted
Improve naming + CMakeLists.txt for upgrades
1 parent f7efe68 commit e3dd256

File tree

9 files changed

+57
-85
lines changed

9 files changed

+57
-85
lines changed

Detectors/Upgrades/ALICE3/Passive/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# granted to it by virtue of its status as an Intergovernmental Organization or
99
# submit itself to any jurisdiction.
1010

11-
o2_add_library(A3DetectorsPassive
12-
SOURCES src/A3Pipe.cxx
13-
src/A3PassiveBase.cxx
11+
o2_add_library(Alice3DetectorsPassive
12+
SOURCES src/Pipe.cxx
13+
src/PassiveBase.cxx
1414
PUBLIC_LINK_LIBRARIES O2::Field O2::DetectorsBase O2::SimConfig)
1515

16-
o2_target_root_dictionary(A3DetectorsPassive
17-
HEADERS include/A3DetectorsPassive/A3Pipe.h
18-
include/A3DetectorsPassive/A3PassiveBase.h
19-
LINKDEF src/A3PassiveLinkDef.h)
16+
o2_target_root_dictionary(Alice3DetectorsPassive
17+
HEADERS include/Alice3DetectorsPassive/Pipe.h
18+
include/Alice3DetectorsPassive/PassiveBase.h
19+
LINKDEF src/PassiveLinkDef.h)

Detectors/Upgrades/ALICE3/Passive/include/A3DetectorsPassive/A3PassiveBase.h renamed to Detectors/Upgrades/ALICE3/Passive/include/Alice3DetectorsPassive/PassiveBase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ namespace passive
1919
{
2020

2121
/// a common base class for passive modules - implementing generic functions
22-
class A3PassiveBase : public FairModule
22+
class Alice3PassiveBase : public FairModule
2323
{
2424
public:
2525
using FairModule::FairModule;
2626
void SetSpecialPhysicsCuts() override;
2727

28-
ClassDefOverride(A3PassiveBase, 1);
28+
ClassDefOverride(Alice3PassiveBase, 1);
2929
};
3030

3131
} // namespace passive

Detectors/Upgrades/ALICE3/Passive/include/A3DetectorsPassive/A3Pipe.h renamed to Detectors/Upgrades/ALICE3/Passive/include/Alice3DetectorsPassive/Pipe.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
#define ALICE3_PASSIVE_PIPE_H
1313

1414
#include "Rtypes.h"
15-
#include "A3DetectorsPassive/A3PassiveBase.h"
15+
#include "Alice3DetectorsPassive/PassiveBase.h"
1616

1717
namespace o2
1818
{
1919
namespace passive
2020
{
21-
class A3Pipe : public A3PassiveBase
21+
class Alice3Pipe : public Alice3PassiveBase
2222
{
2323
public:
24-
A3Pipe();
25-
~A3Pipe() override;
26-
A3Pipe(const char* name,
24+
Alice3Pipe();
25+
~Alice3Pipe() override;
26+
Alice3Pipe(const char* name,
2727
const char* title = "Alice 3 Pipe",
2828
const float innerRho = 0.f,
2929
const float innerThickness = 0.f,
@@ -49,8 +49,8 @@ class A3Pipe : public A3PassiveBase
4949

5050
private:
5151
void createMaterials();
52-
A3Pipe(const A3Pipe& orig) = default;
53-
A3Pipe& operator=(const A3Pipe&);
52+
Alice3Pipe(const Alice3Pipe& orig) = default;
53+
Alice3Pipe& operator=(const Alice3Pipe&);
5454

5555
float mBeInnerPipeRmax = 0.; // inner diameter of the Be section
5656
float mBeInnerPipeThick = 0.; // inner section thickness
@@ -60,7 +60,7 @@ class A3Pipe : public A3PassiveBase
6060
float mBeOuterPipeThick = 0.; // outer section thickness
6161
float mOuterIpHLength = 0.; // half length of the outer beampipe around the IP
6262

63-
ClassDefOverride(A3Pipe, 1);
63+
ClassDefOverride(Alice3Pipe, 1);
6464
};
6565
} // namespace passive
6666
} // namespace o2

Detectors/Upgrades/ALICE3/Passive/src/A3PassiveBase.cxx renamed to Detectors/Upgrades/ALICE3/Passive/src/PassiveBase.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// or submit itself to any jurisdiction.
1010

1111
#include "DetectorsBase/MaterialManager.h"
12-
#include "A3DetectorsPassive/A3PassiveBase.h"
12+
#include "Alice3DetectorsPassive/PassiveBase.h"
1313

1414
using namespace o2::passive;
1515

16-
void A3PassiveBase::SetSpecialPhysicsCuts()
16+
void Alice3PassiveBase::SetSpecialPhysicsCuts()
1717
{
1818
// default implementation for physics cuts setting (might still be overriden by detectors)
1919
// we try to read an external text file supposed to be installed

Detectors/Upgrades/ALICE3/Passive/src/A3PassiveLinkDef.h renamed to Detectors/Upgrades/ALICE3/Passive/src/PassiveLinkDef.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#pragma link off all classes;
1515
#pragma link off all functions;
1616

17-
#pragma link C++ class o2::passive::A3PassiveBase + ;
18-
#pragma link C++ class o2::passive::A3Pipe + ;
17+
#pragma link C++ class o2::passive::Alice3PassiveBase + ;
18+
#pragma link C++ class o2::passive::Alice3Pipe + ;
1919

2020
#endif

Detectors/Upgrades/ALICE3/Passive/src/A3Pipe.cxx renamed to Detectors/Upgrades/ALICE3/Passive/src/Pipe.cxx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// granted to it by virtue of its status as an Intergovernmental Organization
99
// or submit itself to any jurisdiction.
1010

11-
#include "A3DetectorsPassive/A3Pipe.h"
11+
#include "Alice3DetectorsPassive/Pipe.h"
1212
#include <DetectorsBase/Detector.h>
1313
#include <DetectorsBase/MaterialManager.h>
1414
#include <TGeoTube.h>
@@ -25,16 +25,16 @@
2525

2626
using namespace o2::passive;
2727

28-
A3Pipe::A3Pipe() : A3PassiveBase{"Alice3PIPE", ""} {}
29-
A3Pipe::A3Pipe(const char* name,
28+
Alice3Pipe::Alice3Pipe() : Alice3PassiveBase{"Alice3PIPE", ""} {}
29+
Alice3Pipe::Alice3Pipe(const char* name,
3030
const char* title,
3131
float innerRho,
3232
float innerThickness,
3333
float innerLength,
3434
float outerRho,
3535
float outerThickness,
3636
float outerLength)
37-
: A3PassiveBase{name, title},
37+
: Alice3PassiveBase{name, title},
3838
mBeInnerPipeRmax{innerRho},
3939
mBeInnerPipeThick{innerThickness},
4040
mInnerIpHLength{innerLength},
@@ -44,25 +44,25 @@ A3Pipe::A3Pipe(const char* name,
4444
{
4545
}
4646

47-
A3Pipe::~A3Pipe() = default;
48-
A3Pipe& A3Pipe::operator=(const A3Pipe& rhs)
47+
Alice3Pipe::~Alice3Pipe() = default;
48+
Alice3Pipe& Alice3Pipe::operator=(const Alice3Pipe& rhs)
4949
{
5050
// self assignment
5151
if (this == &rhs) {
5252
return *this;
5353
}
5454

5555
// base class assignment
56-
A3PassiveBase::operator=(rhs);
56+
Alice3PassiveBase::operator=(rhs);
5757

5858
return *this;
5959
}
6060

61-
void A3Pipe::ConstructGeometry()
61+
void Alice3Pipe::ConstructGeometry()
6262
{
6363
createMaterials();
6464
//
65-
// Class describing the beam A3Pipe geometry
65+
// Class describing the beam Alice3Pipe geometry
6666
//
6767
float z, zsh, z0;
6868
//
@@ -79,11 +79,11 @@ void A3Pipe::ConstructGeometry()
7979
// Media
8080
auto& matmgr = o2::base::MaterialManager::Instance();
8181

82-
const TGeoMedium* kMedBe = matmgr.getTGeoMedium("A3PIPE_BE");
83-
const TGeoMedium* kMedVac = matmgr.getTGeoMedium("A3PIPE_VACUUM");
84-
const TGeoMedium* kMedVacNF = matmgr.getTGeoMedium("A3PIPE_VACUUM_NF");
85-
const TGeoMedium* kMedVacHC = matmgr.getTGeoMedium("A3PIPE_VACUUM_HC");
86-
const TGeoMedium* kMedVacNFHC = matmgr.getTGeoMedium("A3PIPE_VACUUM_NFHC");
82+
const TGeoMedium* kMedBe = matmgr.getTGeoMedium("ALICE3PIPE_BE");
83+
const TGeoMedium* kMedVac = matmgr.getTGeoMedium("ALICE3PIPE_VACUUM");
84+
const TGeoMedium* kMedVacNF = matmgr.getTGeoMedium("ALICE3PIPE_VACUUM_NF");
85+
const TGeoMedium* kMedVacHC = matmgr.getTGeoMedium("ALICE3PIPE_VACUUM_HC");
86+
const TGeoMedium* kMedVacNFHC = matmgr.getTGeoMedium("ALICE3PIPE_VACUUM_NFHC");
8787

8888
// Top volume
8989
TGeoVolume* top = gGeoManager->GetVolume("cave");
@@ -123,10 +123,10 @@ void A3Pipe::ConstructGeometry()
123123
barrel->AddNode(outerBerylliumTubeVacuumVolume, 1, gGeoIdentity);
124124
}
125125

126-
void A3Pipe::createMaterials()
126+
void Alice3Pipe::createMaterials()
127127
{
128128
//
129-
// Define materials for beam A3Pipe
129+
// Define materials for beam Alice3Pipe
130130
//
131131
Int_t isxfld = 2.;
132132
float sxmgmx = 10.;
@@ -154,21 +154,21 @@ void A3Pipe::createMaterials()
154154
auto& matmgr = o2::base::MaterialManager::Instance();
155155

156156
// Beryllium
157-
matmgr.Material("A3PIPE", 5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
158-
matmgr.Medium("A3PIPE", 5, "BE", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
157+
matmgr.Material("ALICE3PIPE", 5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
158+
matmgr.Medium("ALICE3PIPE", 5, "BE", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
159159

160160
// Vacuum
161-
matmgr.Mixture("A3PIPE", 16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
162-
matmgr.Mixture("A3PIPE", 36, "VACUUM$_NF", aAir, zAir, dAir1, 4, wAir);
163-
matmgr.Mixture("A3PIPE", 56, "VACUUM$_HC ", aAir, zAir, dAir1, 4, wAir);
164-
matmgr.Mixture("A3PIPE", 76, "VACUUM$_NFHC", aAir, zAir, dAir1, 4, wAir);
165-
166-
matmgr.Medium("A3PIPE", 16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
167-
matmgr.Medium("A3PIPE", 36, "VACUUM_NF", 36, 0, 0, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
168-
matmgr.Medium("A3PIPE", 56, "VACUUM_HC", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
169-
matmgr.Medium("A3PIPE", 76, "VACUUM_NFHC", 76, 0, 0, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
161+
matmgr.Mixture("ALICE3PIPE", 16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
162+
matmgr.Mixture("ALICE3PIPE", 36, "VACUUM$_NF", aAir, zAir, dAir1, 4, wAir);
163+
matmgr.Mixture("ALICE3PIPE", 56, "VACUUM$_HC ", aAir, zAir, dAir1, 4, wAir);
164+
matmgr.Mixture("ALICE3PIPE", 76, "VACUUM$_NFHC", aAir, zAir, dAir1, 4, wAir);
165+
166+
matmgr.Medium("ALICE3PIPE", 16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
167+
matmgr.Medium("ALICE3PIPE", 36, "VACUUM_NF", 36, 0, 0, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
168+
matmgr.Medium("ALICE3PIPE", 56, "VACUUM_HC", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
169+
matmgr.Medium("ALICE3PIPE", 76, "VACUUM_NFHC", 76, 0, 0, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
170170
}
171171

172172
// ----------------------------------------------------------------------------
173-
FairModule* A3Pipe::CloneModule() const { return new A3Pipe(*this); }
174-
ClassImp(o2::passive::A3Pipe);
173+
FairModule* Alice3Pipe::CloneModule() const { return new Alice3Pipe(*this); }
174+
ClassImp(o2::passive::Alice3Pipe);

macro/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ o2_add_test_root_macro(analyzeOriginHits.C
110110
if (ENABLE_UPGRADES)
111111
o2_add_test_root_macro(build_geometry.C
112112
PUBLIC_LINK_LIBRARIES O2::DetectorsPassive
113-
O2::A3DetectorsPassive
113+
O2::Alice3DetectorsPassive
114114
O2::Field
115115
O2::TPCSimulation
116116
O2::ITSSimulation

macro/build_geometry.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#ifdef ENABLE_UPGRADES
4949
#include <ITS3Simulation/Detector.h>
5050
#include <TRKSimulation/Detector.h>
51-
#include <A3DetectorsPassive/A3Pipe.h>
51+
#include <Alice3DetectorsPassive/Pipe.h>
5252
#endif
5353

5454
void finalize_geometry(FairRunSim* run);
@@ -139,9 +139,9 @@ void build_geometry(FairRunSim* run = nullptr)
139139
}
140140

141141
#ifdef ENABLE_UPGRADES
142-
// upgraded beampipe
142+
// upgraded beampipe at the interaction point (IP)
143143
if (isActivated("A3IP")) {
144-
run->AddModule(new o2::passive::A3Pipe("A3IP", "Alice 3 inner beam pipe", 0.48f, 0.015f, 44.4f, 3.7f, 0.1f, 44.4f));
144+
run->AddModule(new o2::passive::Alice3Pipe("A3IP", "Alice 3 beam pipe", 0.48f, 0.015f, 44.4f, 3.7f, 0.1f, 44.4f));
145145
}
146146
#endif
147147

run/CMakeLists.txt

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,18 @@
1212
# convenient bag for all the deps needed in the executables below
1313
add_library(allsim INTERFACE)
1414

15-
if(ENABLE_UPGRADES)
1615
target_link_libraries(allsim
1716
INTERFACE O2::SimConfig
1817
O2::Steer
1918
O2::SimSetup
2019
FairMQ::FairMQ
2120
O2::CPVSimulation
22-
O2::A3DetectorsPassive
2321
O2::DetectorsPassive
2422
O2::EMCALSimulation
2523
O2::FDDSimulation
2624
O2::Field
2725
O2::HMPIDSimulation
2826
O2::ITSSimulation
29-
O2::ITS3Simulation
30-
O2::TRKSimulation
3127
O2::MCHBase
3228
O2::MCHSimulation
3329
O2::MFTSimulation
@@ -39,34 +35,10 @@ target_link_libraries(allsim
3935
O2::TRDSimulation
4036
O2::FV0Simulation
4137
O2::ZDCSimulation
38+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::Alice3DetectorsPassive>
39+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Simulation>
40+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::TRKSimulation>
4241
O2::Generators)
43-
else()
44-
target_link_libraries(allsim
45-
INTERFACE O2::SimConfig
46-
O2::Steer
47-
O2::SimSetup
48-
FairMQ::FairMQ
49-
O2::CPVSimulation
50-
O2::DetectorsPassive
51-
O2::EMCALSimulation
52-
O2::FDDSimulation
53-
O2::Field
54-
O2::HMPIDSimulation
55-
O2::ITSSimulation
56-
O2::MCHBase
57-
O2::MCHSimulation
58-
O2::MFTSimulation
59-
O2::MIDSimulation
60-
O2::PHOSSimulation
61-
O2::FT0Simulation
62-
O2::TOFSimulation
63-
O2::TPCSimulation
64-
O2::TRDSimulation
65-
O2::FV0Simulation
66-
O2::ZDCSimulation
67-
O2::Generators)
68-
endif()
69-
7042

7143
add_library(internal::allsim ALIAS allsim)
7244

0 commit comments

Comments
 (0)