Skip to content

Commit 4737ce9

Browse files
committed
Created metal stack + chenged rotation of the two chip columns in module
1 parent 2fdf62c commit 4737ce9

File tree

4 files changed

+55
-30
lines changed

4 files changed

+55
-30
lines changed

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
5353
static const char* getTRKChipPattern() { return sChipName.c_str(); }
5454
static const char* getTRKSensorPattern() { return sSensorName.c_str(); }
5555
static const char* getTRKDeadzonePattern() { return sDeadzoneName.c_str(); }
56+
static const char* getTRKMetalStackPattern() { return sMetalStackName.c_str(); }
5657

5758
static const char* getTRKWrapVolPattern() { return sWrapperVolumeName.c_str(); }
5859

@@ -171,6 +172,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
171172
static std::string sChipName;
172173
static std::string sSensorName;
173174
static std::string sDeadzoneName;
175+
static std::string sMetalStackName;
174176

175177
static std::string sWrapperVolumeName; ///< Wrapper volume name, not implemented at the moment
176178

Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ std::string GeometryTGeo::sModuleName = "TRKModule";
3636
std::string GeometryTGeo::sChipName = "TRKChip";
3737
std::string GeometryTGeo::sSensorName = "TRKSensor";
3838
std::string GeometryTGeo::sDeadzoneName = "TRKDeadzone";
39+
std::string GeometryTGeo::sMetalStackName = "TRKMetalStack";
3940

4041
std::string GeometryTGeo::sWrapperVolumeName = "TRKUWrapVol"; ///< Wrapper volume name, not implemented at the moment
4142

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/TRKLayer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class TRKLayer
4242

4343
TGeoVolume* createSensor(std::string type);
4444
TGeoVolume* createDeadzone(std::string type);
45+
TGeoVolume* createMetalStack(std::string type);
4546
TGeoVolume* createChip(std::string type);
4647
TGeoVolume* createModule(std::string type);
4748
TGeoVolume* createStave(std::string type);
@@ -63,9 +64,10 @@ class TRKLayer
6364
float mChipLength;
6465
float mChipThickness;
6566
float mDeadzoneWidth;
67+
float mSensorThickness;
6668
int mHalfNumberOfChips;
6769

68-
ClassDef(TRKLayer, 1);
70+
ClassDef(TRKLayer, 2);
6971
};
7072

7173
} // namespace trk

Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKLayer.cxx

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ namespace o2
2626
namespace trk
2727
{
2828
TRKLayer::TRKLayer(int layerNumber, std::string layerName, float rInn, float rOut, int numberOfModules, float layerX2X0)
29-
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mNumberOfModules(numberOfModules), mX2X0(layerX2X0), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1), mHalfNumberOfChips(4)
29+
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mNumberOfModules(numberOfModules), mX2X0(layerX2X0), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1), mSensorThickness(100.e-4), mHalfNumberOfChips(4)
3030
{
3131
float Si_X0 = 9.5f;
3232
mChipThickness = mX2X0 * Si_X0;
3333
LOGP(info, "Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}", mLayerNumber, mInnerRadius, mOuterRadius, getZ(), mX2X0);
3434
}
3535

3636
TRKLayer::TRKLayer(int layerNumber, std::string layerName, float rInn, int numberOfModules, float thick)
37-
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mNumberOfModules(numberOfModules), mChipThickness(thick), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1), mHalfNumberOfChips(4)
37+
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mNumberOfModules(numberOfModules), mChipThickness(thick), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1), mSensorThickness(100.e-4), mHalfNumberOfChips(4)
3838
{
3939
float Si_X0 = 9.5f;
4040
mOuterRadius = rInn + thick;
@@ -50,9 +50,9 @@ TGeoVolume* TRKLayer::createSensor(std::string type)
5050
TGeoShape* sensor;
5151

5252
if (type == "cylinder") {
53-
sensor = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mChipLength / 2); // TO BE CHECKED !!!
53+
sensor = new TGeoTube(mInnerRadius, mInnerRadius + mSensorThickness, mChipLength / 2); // TO BE CHECKED !!!
5454
} else if (type == "flat") {
55-
sensor = new TGeoBBox((mChipWidth - mDeadzoneWidth) / 2, mChipThickness / 2, mChipLength / 2); // TO BE CHECKED !!!
55+
sensor = new TGeoBBox((mChipWidth - mDeadzoneWidth) / 2, mSensorThickness / 2, mChipLength / 2); // TO BE CHECKED !!!
5656
} else {
5757
LOGP(fatal, "Sensor of type '{}' is not implemented", type);
5858
}
@@ -71,9 +71,9 @@ TGeoVolume* TRKLayer::createDeadzone(std::string type)
7171
TGeoShape* deadzone;
7272

7373
if (type == "cylinder") {
74-
deadzone = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mChipLength / 2); // TO BE CHECKED !!!
74+
deadzone = new TGeoTube(mInnerRadius, mInnerRadius + mSensorThickness, mChipLength / 2); // TO BE CHECKED !!!
7575
} else if (type == "flat") {
76-
deadzone = new TGeoBBox(mDeadzoneWidth / 2, mChipThickness / 2, mChipLength / 2); // TO BE CHECKED !!!
76+
deadzone = new TGeoBBox(mDeadzoneWidth / 2, mSensorThickness / 2, mChipLength / 2); // TO BE CHECKED !!!
7777
} else {
7878
LOGP(fatal, "Deadzone of type '{}' is not implemented", type);
7979
}
@@ -84,6 +84,27 @@ TGeoVolume* TRKLayer::createDeadzone(std::string type)
8484
return deadVol;
8585
};
8686

87+
TGeoVolume* TRKLayer::createMetalStack(std::string type)
88+
{
89+
TGeoMedium* medSi = gGeoManager->GetMedium("TRK_SILICON$");
90+
std::string metalName = GeometryTGeo::getTRKMetalStackPattern() + std::to_string(mLayerNumber);
91+
92+
TGeoShape* metalStack;
93+
94+
if (type == "cylinder") {
95+
metalStack = new TGeoTube(mInnerRadius + mSensorThickness, mInnerRadius + mChipThickness, mChipLength / 2); // TO BE CHECKED !!!
96+
} else if (type == "flat") {
97+
metalStack = new TGeoBBox(mChipWidth / 2, mChipThickness - mSensorThickness / 2, mChipLength / 2); // TO BE CHECKED !!!
98+
} else {
99+
LOGP(fatal, "Metal stack of type '{}' is not implemented", type);
100+
}
101+
102+
TGeoVolume* metalVol = new TGeoVolume(metalName.c_str(), metalStack, medSi);
103+
metalVol->SetLineColor(kGray);
104+
105+
return metalVol;
106+
};
107+
87108
TGeoVolume* TRKLayer::createChip(std::string type)
88109
{
89110
TGeoMedium* medSi = gGeoManager->GetMedium("TRK_SILICON$");
@@ -94,14 +115,24 @@ TGeoVolume* TRKLayer::createChip(std::string type)
94115

95116
TGeoVolume* sensVol;
96117
TGeoVolume* deadVol;
118+
TGeoVolume* metalVol;
97119

98120
if (type == "cylinder") {
99121
chip = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mChipLength / 2);
100122
chipVol = new TGeoVolume(chipName.c_str(), chip, medSi);
101123

102124
sensVol = createSensor("cylinder");
125+
metalVol = createMetalStack("cylinder");
126+
127+
TGeoCombiTrans* transSens = new TGeoCombiTrans();
128+
transSens->SetTranslation(0, -(mChipThickness - mSensorThickness) / 2, 0); // TO BE CHECKED !!!
103129
LOGP(info, "Inserting {} in {} ", sensVol->GetName(), chipVol->GetName());
104-
chipVol->AddNode(sensVol, 1, nullptr);
130+
chipVol->AddNode(sensVol, 1, transSens);
131+
132+
TGeoCombiTrans* transMetal = new TGeoCombiTrans();
133+
transMetal->SetTranslation(0, mSensorThickness / 2, 0); // TO BE CHECKED !!!
134+
LOGP(info, "Inserting {} in {} ", metalVol->GetName(), chipVol->GetName());
135+
chipVol->AddNode(metalVol, 1, transMetal);
105136

106137
// deadVol = createDeadzone("cylinder");
107138
} else if (type == "flat") {
@@ -110,16 +141,22 @@ TGeoVolume* TRKLayer::createChip(std::string type)
110141

111142
sensVol = createSensor("flat");
112143
deadVol = createDeadzone("flat");
144+
metalVol = createMetalStack("flat");
113145

114146
TGeoCombiTrans* transSens = new TGeoCombiTrans();
115-
transSens->SetTranslation(-mDeadzoneWidth / 2, 0, 0); // TO BE CHECKED !!!
147+
transSens->SetTranslation(-mDeadzoneWidth / 2, -(mChipThickness - mSensorThickness) / 2, 0); // TO BE CHECKED !!!
116148
LOGP(info, "Inserting {} in {} ", sensVol->GetName(), chipVol->GetName());
117149
chipVol->AddNode(sensVol, 1, transSens);
118150

119151
TGeoCombiTrans* transDead = new TGeoCombiTrans();
120-
transDead->SetTranslation((mChipWidth - mDeadzoneWidth) / 2, 0, 0); // TO BE CHECKED !!!
152+
transDead->SetTranslation((mChipWidth - mDeadzoneWidth) / 2, -(mChipThickness - mSensorThickness) / 2, 0); // TO BE CHECKED !!!
121153
LOGP(info, "Inserting {} in {} ", deadVol->GetName(), chipVol->GetName());
122154
chipVol->AddNode(deadVol, 1, transDead);
155+
156+
TGeoCombiTrans* transMetal = new TGeoCombiTrans();
157+
transMetal->SetTranslation(0, mSensorThickness / 2, 0); // TO BE CHECKED !!!
158+
LOGP(info, "Inserting {} in {} ", metalVol->GetName(), chipVol->GetName());
159+
chipVol->AddNode(metalVol, 1, transMetal);
123160
} else {
124161
LOGP(fatal, "Sensor of type '{}' is not implemented", type);
125162
}
@@ -169,6 +206,9 @@ TGeoVolume* TRKLayer::createModule(std::string type)
169206

170207
TGeoCombiTrans* transRight = new TGeoCombiTrans();
171208
transRight->SetTranslation(xRight, 0, zRight); // TO BE CHECKED !!!
209+
TGeoRotation* rot = new TGeoRotation();
210+
rot->RotateY(180);
211+
transRight->SetRotation(rot);
172212
LOGP(info, "Inserting {} in {} ", chipVolRight->GetName(), moduleVol->GetName());
173213
moduleVol->AddNode(chipVolRight, iChip * 2 + 1, transRight);
174214
}
@@ -266,26 +306,6 @@ TGeoVolume* TRKLayer::createStave(std::string type)
266306
stave = new TGeoBBox(staveWidth / 2, mLogicalVolumeThickness / 2, staveLength / 2);
267307
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
268308

269-
/*for (int iModule = 0; iModule < mNumberOfModules; iModule++) {
270-
TGeoVolume* moduleVolLeft = createModule("flat");
271-
TGeoVolume* moduleVolRight = createModule("flat");
272-
273-
// Put the modules in the correct position
274-
double xLeft = -moduleWidth / 2 + 0.05;
275-
double xRight = moduleWidth / 2 - 0.05;
276-
double zPos = -0.5 * mNumberOfModules * moduleLength + (iModule + 0.5) * moduleLength;
277-
278-
TGeoCombiTrans* transLeft = new TGeoCombiTrans();
279-
transLeft->SetTranslation(xLeft, 0, zPos); // TO BE CHECKED !!! 1mm overlap between the modules
280-
LOGP(info, "Inserting {} in {} ", moduleVolLeft->GetName(), staveVol->GetName());
281-
staveVol->AddNode(moduleVolLeft, iModule * 2, transLeft);
282-
283-
TGeoCombiTrans* transRight = new TGeoCombiTrans();
284-
transRight->SetTranslation(xRight, 0.2, zPos); // TO BE CHECKED !!! 1mm overlap between the modules
285-
LOGP(info, "Inserting {} in {} ", moduleVolRight->GetName(), staveVol->GetName());
286-
staveVol->AddNode(moduleVolRight, iModule * 2 + 1, transRight);
287-
}*/
288-
289309
// Put the half staves in the correct position
290310
TGeoVolume* halfStaveVolLeft = createHalfStave("flat");
291311
TGeoVolume* halfStaveVolRight = createHalfStave("flat");

0 commit comments

Comments
 (0)