Skip to content

Commit e7f2545

Browse files
committed
updated positions and dimensions of chips (todo: rotate chips by 180 deg over the center of the module)
1 parent 8f4271a commit e7f2545

7 files changed

Lines changed: 242 additions & 25 deletions

File tree

‎Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam>
5555
float x2x0 = 0.02f; // thickness expressed in radiation length, for all layers for the moment
5656
float sensorThickness = 0.0050f; // thickness of the sensor in cm, for all layers for the moment, the default is set to 50 microns
5757

58+
// ITOF segmentation parameters
59+
float itofRadius = 21.f; // ITOF radius (cm)
60+
float itofLength = 126.82f; // ITOF length (cm)
61+
int itofNStaves = 24; // ITOF number of staves
62+
float itofStaveTilt = 3; // ITOF stave tilt angle (deg)
63+
64+
// OTOF segmentation parameters
65+
float otofRadius = 92.f; // OTOF radius (cm)
66+
float otofLength = 680.f; // OTOF length (cm)
67+
int otofNStaves = 62; // OTOF number of staves
68+
float otofStaveTilt = 5; // OTOF stave tilt angle (deg)
69+
70+
5871
O2ParamDef(IOTOFBaseParam, "IOTOFBase");
5972
};
6073

‎Detectors/Upgrades/ALICE3/IOTOF/simulation/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
o2_add_library(IOTOFSimulation
1313
SOURCES src/Layer.cxx
14+
src/TF3Chip.cxx
1415
src/Chip.cxx
1516
src/Detector.cxx
1617
src/Digitizer.cxx
@@ -23,6 +24,7 @@ o2_add_library(IOTOFSimulation
2324
o2_target_root_dictionary(IOTOFSimulation
2425
HEADERS include/IOTOFSimulation/Detector.h
2526
include/IOTOFSimulation/Chip.h
27+
include/IOTOFSimulation/TF3Chip.h
2628
include/IOTOFSimulation/Layer.h
2729
include/IOTOFSimulation/Digitizer.h
2830
include/IOTOFSimulation/DPLDigitizerParam.h
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 ALICEO2_IOTOF_TF3CHIP_H_
13+
#define ALICEO2_IOTOF_TF3CHIP_H_
14+
15+
#include <TGeoManager.h> // for gGeoManager
16+
#include "Rtypes.h" // for Int_t, Double_t, Bool_t, UInt_t, etc
17+
18+
class TGeoVolume;
19+
class TGeoManager;
20+
21+
namespace o2
22+
{
23+
24+
namespace iotof
25+
{
26+
27+
/// TF3Chip class creates a TGeoVolume representing the TF3 Chip
28+
29+
class TF3Chip
30+
{
31+
public:
32+
TF3Chip() = default;
33+
~TF3Chip() = default;
34+
35+
/// Creates the TF3Chip
36+
/// Returns the chip as a TGeoVolume
37+
/// \param yc Y chip half lengths
38+
/// \param ys sensor half thickness
39+
/// \param chipName sensName default volume names
40+
/// \param dummy if true creates a dummy air volume (for material budget studies)
41+
/// \param mgr The GeoManager (used only to get the proper material)
42+
static TGeoVolume* createChip(Double_t yc, Double_t ys,
43+
char const* chipName = "TF3Chip", char const* sensName = "TF3Sensor",
44+
Bool_t dummy = kFALSE, const TGeoManager* mgr = gGeoManager);
45+
46+
static void createMaterials(Int_t id, Int_t fieldType, Float_t maxField);
47+
48+
private:
49+
static constexpr double chipSizeX = 2.6; // cm
50+
static constexpr double chipSizeZ = 3; // cm (TODO: will be decreased to 3 cm)
51+
52+
ClassDefNV(TF3Chip, 0); // TF3Chip geometry
53+
};
54+
55+
} // namespace iotof
56+
} // namespace o2
57+
58+
#endif

‎Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
6161
const float x2x0, const float sensorThickness)
6262
{
6363

64-
std::pair<float, float> dInnerTof = {21.f, 129.f}; // Radius and length
65-
std::pair<float, float> dOuterTof = {92.f, 680.f}; // Radius and length
64+
auto& iotofPars = IOTOFBaseParam::Instance();
65+
std::pair<float, float> dInnerTof = {iotofPars.itofRadius, iotofPars.itofLength}; // Radius and length
66+
std::pair<float, float> dOuterTof = {iotofPars.otofRadius, iotofPars.otofLength}; // Radius and length
6667
std::pair<float, float> radiusRangeDiskTof = {15.f, 100.f};
6768
float zForwardTof = 370.f;
6869
LOG(info) << "Configuring IOTOF layers with '" << pattern << "' pattern";
@@ -121,22 +122,23 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
121122
} else {
122123
LOG(fatal) << "IOTOF layer pattern " << pattern << " not recognized, exiting";
123124
}
125+
124126
if (itof) { // iTOF
125127
const std::string name = GeometryTGeo::getITOFLayerPattern();
126-
const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case
127-
const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm
128-
const double staveTiltAngle = itofSegmented ? 3.0 : 0.0; // degrees
129-
const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case
128+
const int nStaves = itofSegmented ? iotofPars.itofNStaves : 0; // number of staves in segmented case
129+
const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm
130+
const double staveTiltAngle = itofSegmented ? iotofPars.itofStaveTilt : 0.0; // degrees
131+
const int modulesPerStave = itofSegmented ? 7 : 0; // number of modules per stave in segmented case
130132
mITOFLayer = ITOFLayer(name,
131133
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel,
132134
nStaves, staveWidth, staveTiltAngle, modulesPerStave, itofSegmented ? sensorThickness : 0.0f);
133135
}
134136
if (otof) { // oTOF
135137
const std::string name = GeometryTGeo::getOTOFLayerPattern();
136-
const int nStaves = otofSegmented ? 62 : 0; // number of staves in segmented case
137-
const double staveWidth = otofSegmented ? 9.74 : 0.0; // cm
138-
const double staveTiltAngle = otofSegmented ? 5.0 : 0.0; // degrees
139-
const int modulesPerStave = otofSegmented ? 54 : 0; // number of modules per stave in segmented case
138+
const int nStaves = otofSegmented ? iotofPars.otofNStaves : 0; // number of staves in segmented case
139+
const double staveWidth = otofSegmented ? 9.74 : 0.0; // cm
140+
const double staveTiltAngle = otofSegmented ? iotofPars.otofStaveTilt : 0.0; // degrees
141+
const int modulesPerStave = otofSegmented ? 54 : 0; // number of modules per stave in segmented case
140142
mOTOFLayer = OTOFLayer(name,
141143
dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, otofSegmented ? OTOFLayer::kBarrelSegmented : OTOFLayer::kBarrel,
142144
nStaves, staveWidth, staveTiltAngle, modulesPerStave, otofSegmented ? sensorThickness : 0.0f);

‎Detectors/Upgrades/ALICE3/IOTOF/simulation/src/IOTOFSimulationLinkDef.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#pragma link off all classes;
1616
#pragma link off all functions;
1717

18+
#pragma link C++ class o2::iotof::TF3Chip + ;
1819
#pragma link C++ class o2::iotof::Layer + ;
1920
#pragma link C++ class o2::iotof::ITOFLayer + ;
2021
#pragma link C++ class o2::iotof::OTOFLayer + ;

‎Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx‎

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "IOTOFSimulation/Layer.h"
1313
#include "IOTOFBase/GeometryTGeo.h"
14+
#include "IOTOFSimulation/TF3Chip.h"
1415

1516
#include "Framework/Logger.h"
1617

@@ -185,42 +186,45 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
185186
setLayerStyle(layerVol);
186187

187188
// Now we create the volume for a single stave
188-
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5, staveSizeZ * 0.5);
189-
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medAir);
189+
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5 - 0.5 * 300.e-4, staveSizeZ * 0.5);
190+
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medSi);
190191
setStaveStyle(staveVol);
191192

193+
// Now we create the volume for a single chip (chip + sensor)
194+
// TGeoVolume* chipVol1 = o2::iotof::TF3Chip::createChip(0.5 * 300.e-4, mSensorThickness, chipName, sensName);
195+
196+
192197
// Now we create the volume for a single module (sensor + chip)
193198
const int modulesPerStaveX = 1; // we assume that each stave is divided in 1 modules along the x direction
194-
const double moduleSizeX = staveSizeX / modulesPerStaveX; // cm
199+
const double moduleSizeX = 5.22; //staveSizeX / modulesPerStaveX; // cm
195200
const double moduleSizeY = staveSizeY; // cm
196-
const double moduleSizeZ = staveSizeZ / mModulesPerStave; // cm
197-
TGeoBBox* module = new TGeoBBox(moduleSizeX * 0.5, moduleSizeY * 0.5, moduleSizeZ * 0.5);
201+
const double moduleSizeZ = 18.1; //staveSizeZ / mModulesPerStave; // cm
202+
TGeoBBox* module = new TGeoBBox(0.5 * moduleSizeX, 300.e-4 * 0.5, moduleSizeZ * 0.5);
198203
TGeoVolume* moduleVol = new TGeoVolume(moduleName, module, medAir);
199204
setModuleStyle(moduleVol);
200205

201206
// Now we create the volume of the chip, which is the same for all modules
202207
const int chipsPerModuleX = 2; // we assume that each module is divided in 2 chips along the x direction
203-
const int chipsPerModuleZ = 4; // we assume that each module is divided in 2 chips along the z direction
208+
const int chipsPerModuleZ = 6; // we assume that each module is divided in 2 chips along the z direction
204209
const double chipSizeX = moduleSizeX / chipsPerModuleX; // cm
205210
const double chipSizeY = moduleSizeY; // cm
206211
const double chipSizeZ = moduleSizeZ / chipsPerModuleZ; // cm
207-
TGeoBBox* chip = new TGeoBBox(chipSizeX * 0.5, chipSizeY * 0.5, chipSizeZ * 0.5);
208-
TGeoVolume* chipVol = new TGeoVolume(chipName, chip, medSi);
209-
setChipStyle(chipVol);
212+
// TGeoBBox* chip = new TGeoBBox(chipSizeX * 0.5, chipSizeY * 0.5, chipSizeZ * 0.5);
213+
TGeoVolume* chipVol = o2::iotof::TF3Chip::createChip(300.e-4, mSensorThickness, chipName, sensName); // new TGeoVolume(chipName, chip, medSi);
210214

211215
// Finally we create the volume of the sensor, which is the same for all chips
212-
const int sensorsPerChipX = 1; // we assume that each chip is divided in 2 sensors along the x direction
216+
/* const int sensorsPerChipX = 1; // we assume that each chip is divided in 2 sensors along the x direction
213217
const int sensorsPerChipZ = 1; // we assume that each chip is divided in 2 sensors along the z direction
214218
const double sensorSizeX = chipSizeX / sensorsPerChipX; // cm
215219
const double sensorSizeY = mSensorThickness; // cm
216220
const double sensorSizeZ = chipSizeZ / sensorsPerChipZ; // cm
217221
TGeoBBox* sensor = new TGeoBBox(sensorSizeX * 0.5, sensorSizeY * 0.5, sensorSizeZ * 0.5);
218222
TGeoVolume* sensVol = new TGeoVolume(sensName, sensor, medSi);
219223
setSensorStyle(sensVol);
220-
ITOFLayer::mRegister.push_back(sensVol->GetName());
224+
*/ ITOFLayer::mRegister.push_back(sensName);
221225

222226
// Now we build a chip from sensors
223-
for (int i = 0; i < sensorsPerChipX; ++i) {
227+
/* for (int i = 0; i < sensorsPerChipX; ++i) {
224228
for (int j = 0; j < sensorsPerChipZ; ++j) {
225229
LOGP(info, "iTOF: Creating sensor {}/{} for chip {}/{}", i + 1, sensorsPerChipX, j + 1, sensorsPerChipZ);
226230
auto* translation = new TGeoTranslation((i + 0.5) * sensorSizeX - 0.5 * chipSizeX,
@@ -229,12 +233,14 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
229233
chipVol->AddNode(sensVol, 1 + i * sensorsPerChipZ + j, translation);
230234
}
231235
}
232-
236+
*/
233237
// Now we build a module from chips
234238
for (int i = 0; i < chipsPerModuleX; ++i) {
235239
for (int j = 0; j < chipsPerModuleZ; ++j) {
236240
LOGP(info, "iTOF: Creating chip {}/{} for module {}/{}", i + 1, chipsPerModuleX, j + 1, chipsPerModuleZ);
237-
auto* translation = new TGeoTranslation((i + 0.5) * chipSizeX - 0.5 * moduleSizeX, 0, (j + 0.5) * chipSizeZ - 0.5 * moduleSizeZ);
241+
auto* translation = new TGeoTranslation((i - 0.5) * (2.6 + 0.02), 0, (j + 0.5) * 3 + j * 0.02 - 0.5 * moduleSizeZ);
242+
auto* rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 0., 0. /*i == 0 ? 0. : 180.*/, 0.);
243+
// auto* transformation = new TGeoCombiTrans(*translation, *rotation);
238244
moduleVol->AddNode(chipVol, 1 + i * chipsPerModuleZ + j, translation);
239245
}
240246
}
@@ -243,7 +249,7 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
243249
for (int i = 0; i < modulesPerStaveX; ++i) {
244250
for (int j = 0; j < mModulesPerStave; ++j) {
245251
LOGP(info, "iTOF: Creating module {}/{} for stave {}/{}", i + 1, modulesPerStaveX, j + 1, mModulesPerStave);
246-
auto* translation = new TGeoTranslation((i + 0.5) * moduleSizeX - 0.5 * staveSizeX, 0, (j + 0.5) * moduleSizeZ - 0.5 * staveSizeZ);
252+
auto* translation = new TGeoTranslation(0., staveSizeY * 0.5, (j + 0.5) * (moduleSizeZ) + j * 0.02 - 0.5 * staveSizeZ);
247253
staveVol->AddNode(moduleVol, 1 + i * mModulesPerStave + j, translation);
248254
}
249255
}
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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 "IOTOFSimulation/TF3Chip.h"
13+
14+
#include "DetectorsBase/MaterialManager.h"
15+
#include "DetectorsBase/Detector.h"
16+
17+
#include <TGeoBBox.h> // for TGeoBBox
18+
#include <TGeoManager.h> // for gGeoManager, TGeoManager
19+
#include "TGeoVolume.h" // for TGeoVolume
20+
#include "TGeoMatrix.h" // for TGeoMatrix
21+
#include <fairlogger/Logger.h> // for LOG
22+
23+
using namespace o2::iotof;
24+
25+
//________________________________________________________________________
26+
TGeoVolume* TF3Chip::createChip(const Double_t ychip,
27+
const Double_t ysens,
28+
const char* chipName,
29+
const char* sensName,
30+
const Bool_t dummy,
31+
const TGeoManager* mgr)
32+
{
33+
34+
Double_t xchip, zchip;
35+
Double_t ylen, ypos;
36+
37+
xchip = 0.5 * chipSizeX;
38+
zchip = 0.5 * chipSizeZ;
39+
40+
// First create all needed shapes
41+
ylen = ysens;
42+
if (ysens > ychip) {
43+
LOG(warning) << "Sensor half thickness (" << ysens
44+
<< ") greater than chip half thickness (" << ychip
45+
<< "), setting equal";
46+
ylen = ychip;
47+
}
48+
49+
// The chip
50+
TGeoBBox* chip = new TGeoBBox(xchip, 0.5 * ychip, zchip);
51+
52+
// The sensor
53+
TGeoBBox* sensor = new TGeoBBox(xchip, 0.5 * ylen, zchip);
54+
55+
// We have all shapes: now create the real volumes
56+
TGeoMedium* medSi = mgr->GetMedium("TF3CHIP_SI$");
57+
if (!medSi) {
58+
Int_t fieldType;
59+
Float_t maxField;
60+
o2::base::Detector::initFieldTrackingParams(fieldType, maxField);
61+
createMaterials(0, fieldType, maxField);
62+
medSi = mgr->GetMedium("TF3CHIP_SI$");
63+
}
64+
TGeoMedium* medAir = mgr->GetMedium("TF3CHIP_AIR$");
65+
66+
TGeoMedium* medChip;
67+
68+
if (dummy) {
69+
medChip = medAir;
70+
} else {
71+
medChip = medSi;
72+
}
73+
74+
TGeoVolume* chipVol = new TGeoVolume(chipName, chip, medChip);
75+
chipVol->SetVisibility(kTRUE);
76+
chipVol->SetLineColor(kOrange);
77+
chipVol->SetFillColor(kOrange - 9);
78+
chipVol->SetLineWidth(3);
79+
chipVol->SetFillStyle(15);
80+
81+
TGeoVolume* sensVol = new TGeoVolume(sensName, sensor, medChip);
82+
sensVol->SetVisibility(kTRUE);
83+
sensVol->SetLineColor(kRed);
84+
sensVol->SetLineWidth(3);
85+
sensVol->SetFillColor(kRed - 9);
86+
sensVol->SetFillStyle(5); // 0% transparent
87+
88+
// Now build up the chip
89+
ypos = chip->GetDY() - sensor->GetDY();
90+
chipVol->AddNode(sensVol, 1, new TGeoTranslation(0., ypos, 0.));
91+
92+
// Done, return the chip
93+
return chipVol;
94+
}
95+
96+
//________________________________________________________________________
97+
void TF3Chip::createMaterials(Int_t id, Int_t ifield, Float_t fieldm)
98+
{
99+
auto& mgr = o2::base::MaterialManager::Instance();
100+
101+
Float_t tmaxfd = 0.1; // Degree
102+
Float_t stemax = 1.0; // cm
103+
Float_t deemax = 0.1; // Fraction of particle's energy 0<deemax<=1
104+
Float_t epsil = 1.0E-4; // cm
105+
Float_t stmin = 0.0; // cm "Default value used"
106+
107+
Float_t tmaxfdSi = 0.1; // Degree
108+
Float_t stemaxSi = 0.0075; // cm
109+
Float_t deemaxSi = 0.1; // Fraction of particle's energy 0<deemax<=1
110+
Float_t epsilSi = 1.0E-4; // cm
111+
Float_t stminSi = 0.0; // cm "Default value used"
112+
113+
Float_t tmaxfdAir = 0.1; // Degree
114+
Float_t stemaxAir = 1.0; // cm
115+
Float_t deemaxAir = 0.1; // Fraction of particle's energy 0<deemax<=1
116+
Float_t epsilAir = 1.0E-4; // cm
117+
Float_t stminAir = 0.0; // cm "Default value used"
118+
119+
// AIR
120+
Float_t aAir[4] = {12.0107, 14.0067, 15.9994, 39.948};
121+
Float_t zAir[4] = {6., 7., 8., 18.};
122+
Float_t wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827};
123+
Float_t dAir = 1.20479E-3;
124+
125+
if (mgr.getMediumID("TF3CHIP", id) < 0) {
126+
mgr.Mixture("TF3CHIP", id, "AIR$", aAir, zAir, dAir, 4, wAir);
127+
mgr.Medium("TF3CHIP", id, "AIR$", id, 0, ifield, fieldm, tmaxfdAir, stemaxAir, deemaxAir, epsilAir, stminAir);
128+
id++;
129+
}
130+
131+
if (mgr.getMediumID("TF3CHIP", id) < 0) {
132+
mgr.Material("TF3CHIP", id, "SI$", 0.28086E+02, 0.14000E+02, 0.23300E+01, 0.93600E+01, 0.99900E+03);
133+
mgr.Medium("TF3CHIP", id, "SI$", id, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi);
134+
}
135+
}

0 commit comments

Comments
 (0)