Skip to content

Commit 363e55e

Browse files
authored
Merge branch 'AliceO2Group:dev' into fd3_digits
2 parents 53574c1 + e59f5cb commit 363e55e

File tree

10 files changed

+60
-35
lines changed

10 files changed

+60
-35
lines changed

Detectors/Upgrades/ALICE3/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The specific modules for Run 5 are enabled by passing their their IDs to the `-m
2121
A list of the available DetIDs is reproted in the table below:
2222

2323
| Detector ID | Detector description |
24-
|-------------|----------------------------------|
24+
| ----------- | -------------------------------- |
2525
| `A3IP` | Beam pipe |
2626
| `TRK` | Barrel Tracker |
2727
| `TF3` | Time Of Flight detectors |
@@ -49,7 +49,7 @@ export ALICE3_MAGFIELD_MACRO=../ALICE3Field.C
4949

5050
An exampling macro for a custom magnetic field is stored in `Detectors/Upgrades/macros/ALICE3Field.C`.
5151

52-
### Run a simple simulation for run 5
52+
### Run a simple simulation for ALICE 3
5353
The simplest command to be run to test the simulation is working is:
5454

5555
```bash
@@ -61,13 +61,20 @@ To enable a specific set of modules, e.g. the beampipe and the TOFs one can spec
6161
```bash
6262
o2-sim-run5 -n 10 -m A3IP TF3
6363
```
64+
65+
#### Specific detector setups
66+
67+
Configurables for various sub-detectors are presented in the following Table:
68+
69+
| Available options | Link to options |
70+
| ----------------- | -------------------------------------------------------------- |
71+
| TKR | [Link to TRK options](./TRK/README.md#specific-detector-setup) |
72+
6473
### Output of the simulation
6574
The simulation will produce a `o2sim_Hits<DetID>.root` file with a tree with the hits related to that detector.
66-
Currently, hits are produced for: `TRK`, `FT3`, and `TF3`.
67-
More detectors will be included.
6875

6976
## Reconstruction
7077
WIP
7178

7279
## Analysis
73-
WIP
80+
WIP

Detectors/Upgrades/ALICE3/TRK/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,23 @@
66

77
This is top page for the TRK detector documentation.
88

9+
10+
## Specific detector setup
11+
12+
13+
Configurables for various sub-detectors are presented in the following Table:
14+
15+
| Subsystem | Available options | Comments |
16+
| ------------------ | ------------------------------------------------------- | ---------------------------------------------------------------- |
17+
| `TRKBase.layoutVD` | `kIRIS4` (default), `kIRISFullCyl`, `kIRIS5`, `kIRIS4a` | [link to definitions](./base/include/TRKBase/TRKBaseParam.h) |
18+
| `TRKBase.layoutML` | `kCylinder`, `kTurboStaves` (default), `kStaggered` | |
19+
| `TRKBase.layoutOT` | `kCylinder`, `kTurboStaves`, `kStaggered` (default) | |
20+
21+
For example, a geometry with fully cylindrical tracker barrel (for all layers in VD, ML and OT) can be obtained by
22+
```bash
23+
o2-sim-serial-run5 -n 1 -g pythia8hi -m A3IP TRK FT3 TF3 \
24+
--configKeyValues "TRKBase.layoutVD=kIRISFullCyl;TRKBase.layoutML=kCylinder;TRKBase.layoutOL=kCylinder"
25+
```
26+
927
<!-- doxy
10-
/doxy -->
28+
/doxy -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
223223
std::vector<float> mCacheRefAlphaMLOT; /// cache for sensor ref alpha ML and OT
224224

225225
eLayout mLayoutML; // Type of segmentation for the middle layers
226-
eLayout mLayoutOL; // Type of segmentation for the outer layers
226+
eLayout mLayoutOT; // Type of segmentation for the outer layers
227227

228228
private:
229229
static std::unique_ptr<o2::trk::GeometryTGeo> sInstance;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {
4646
eOverallGeom overallGeom = kDefaultRadii; // Overall geometry option, to be used in Detector::buildTRKMiddleOuterLayers
4747

4848
eLayout layoutML = kTurboStaves; // Type of segmentation for the middle layers
49-
eLayout layoutOL = kStaggered; // Type of segmentation for the outer layers
49+
eLayout layoutOT = kStaggered; // Type of segmentation for the outer layers
5050
eVDLayout layoutVD = kIRIS4; // VD detector layout design
5151

5252
eLayout getLayoutML() const { return layoutML; }
53-
eLayout getLayoutOL() const { return layoutOL; }
53+
eLayout getLayoutOT() const { return layoutOT; }
5454
eVDLayout getLayoutVD() const { return layoutVD; }
5555

5656
O2ParamDef(TRKBaseParam, "TRKBase");

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ void GeometryTGeo::Build(int loadTrans)
7777
}
7878

7979
mLayoutML = o2::trk::TRKBaseParam::Instance().getLayoutML();
80-
mLayoutOL = o2::trk::TRKBaseParam::Instance().getLayoutOL();
80+
mLayoutOT = o2::trk::TRKBaseParam::Instance().getLayoutOT();
8181

82-
LOG(debug) << "Layout ML: " << mLayoutML << ", Layout OL: " << mLayoutOL;
82+
LOG(debug) << "Layout ML: " << mLayoutML << ", Layout OL: " << mLayoutOT;
8383

8484
mNumberOfLayersMLOT = extractNumberOfLayersMLOT();
8585
mNumberOfPetalsVD = extractNumberOfPetalsVD();
@@ -405,7 +405,7 @@ TString GeometryTGeo::getMatrixPath(int index) const
405405
// handling cylindrical configuration for ML and/or OT
406406
// needed bercause of the different numbering scheme in the geometry for the cylindrical case wrt the staggered and turbo ones
407407
if (subDetID == 1) {
408-
if ((layer < 4 && mLayoutML == eLayout::kCylinder) || (layer > 3 && mLayoutOL == eLayout::kCylinder)) {
408+
if ((layer < 4 && mLayoutML == eLayout::kCylinder) || (layer > 3 && mLayoutOT == eLayout::kCylinder)) {
409409
stave = 1;
410410
mod = 1;
411411
chip = 1;

Detectors/Upgrades/ALICE3/TRK/macros/test/run_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
nEvents=10
33

44
# Simulating
5-
o2-sim-serial-run5 -n $nEvents -g pythia8hi -m TRK --configKeyValues "TRKBase.layoutML=kTurboStaves;TRKBase.layoutOL=kStaggered;">& sim_TRK.log
5+
o2-sim-serial-run5 -n $nEvents -g pythia8hi -m TRK --configKeyValues "TRKBase.layoutML=kTurboStaves;TRKBase.layoutOT=kStaggered;">& sim_TRK.log
66

77
# Digitizing
88
o2-sim-digitizer-workflow -b >& digiTRK.log

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,26 @@ class TRKLayer
5151

5252
private:
5353
// TGeo objects outside logical volumes can cause errors. Only used in case of kStaggered and kTurboStaves layouts
54-
static constexpr float mLogicalVolumeThickness = 1;
54+
static constexpr float mLogicalVolumeThickness = 1.3;
5555

56+
// User defined parameters for the layer, to be set in the constructor
5657
int mLayerNumber;
57-
eLayout mLayout;
5858
std::string mLayerName;
5959
float mInnerRadius;
6060
float mOuterRadius;
6161
int mNumberOfModules;
6262
float mX2X0;
63-
float mChipWidth;
64-
float mChipLength;
6563
float mChipThickness;
66-
float mDeadzoneWidth;
67-
float mSensorThickness;
68-
int mHalfNumberOfChips;
64+
65+
// Fixed parameters for the layer, to be set based on the specifications of the chip and module
66+
eLayout mLayout = kCylinder;
67+
float mChipWidth = constants::moduleMLOT::chip::width;
68+
float mChipLength = constants::moduleMLOT::chip::length;
69+
float mDeadzoneWidth = constants::moduleMLOT::chip::passiveEdgeReadOut;
70+
float mSensorThickness = constants::moduleMLOT::silicon::thickness;
71+
int mHalfNumberOfChips = 4;
72+
73+
static constexpr float Si_X0 = 9.5f;
6974

7075
ClassDef(TRKLayer, 2);
7176
};

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ void Detector::buildTRKMiddleOuterLayers()
146146
mLayers[3].setLayout(trkPars.layoutML);
147147

148148
// Outer tracker
149-
mLayers[4].setLayout(trkPars.layoutOL);
150-
mLayers[5].setLayout(trkPars.layoutOL);
151-
mLayers[6].setLayout(trkPars.layoutOL);
152-
mLayers[7].setLayout(trkPars.layoutOL);
149+
mLayers[4].setLayout(trkPars.layoutOT);
150+
mLayers[5].setLayout(trkPars.layoutOT);
151+
mLayers[6].setLayout(trkPars.layoutOT);
152+
mLayers[7].setLayout(trkPars.layoutOT);
153153
}
154154

155155
void Detector::configFromFile(std::string fileName)

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +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(constants::moduleMLOT::chip::passiveEdgeReadOut), mSensorThickness(constants::moduleMLOT::silicon::thickness), mHalfNumberOfChips(4)
29+
: mLayerNumber(layerNumber), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mNumberOfModules(numberOfModules), mX2X0(layerX2X0)
3030
{
31-
float Si_X0 = 9.5f;
3231
mChipThickness = mX2X0 * Si_X0;
3332
LOGP(info, "Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}", mLayerNumber, mInnerRadius, mOuterRadius, getZ(), mX2X0);
3433
}
3534

3635
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(constants::moduleMLOT::chip::passiveEdgeReadOut), mSensorThickness(constants::moduleMLOT::silicon::thickness), mHalfNumberOfChips(4)
36+
: mLayerNumber(layerNumber), mLayerName(layerName), mInnerRadius(rInn), mNumberOfModules(numberOfModules), mChipThickness(thick)
3837
{
39-
float Si_X0 = 9.5f;
4038
mOuterRadius = rInn + thick;
4139
mX2X0 = mChipThickness / Si_X0;
4240
LOGP(info, "Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}", mLayerNumber, mInnerRadius, mOuterRadius, getZ(), mX2X0);
@@ -300,12 +298,9 @@ TGeoVolume* TRKLayer::createStave(std::string type)
300298
} else if (type == "staggered") {
301299
double overlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true)overlap
302300
double shift = overlap / 2;
303-
304301
double halfstaveWidth = constants::OT::halfstave::width;
305-
double staveWidth = constants::OT::width - overlap;
306302

307-
stave = new TGeoBBox(staveWidth / 2, mLogicalVolumeThickness / 2, staveLength / 2);
308-
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
303+
staveVol = new TGeoVolumeAssembly(staveName.c_str());
309304

310305
// Put the half staves in the correct position
311306
TGeoVolume* halfStaveVolLeft = createHalfStave("flat");
@@ -379,7 +374,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
379374
// Put the staves in the correct position and orientation
380375
TGeoCombiTrans* trans = new TGeoCombiTrans();
381376
double theta = 360. * iStave / nStaves;
382-
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 3, 0, 0);
377+
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 4, 0, 0);
383378
trans->SetRotation(rot);
384379
trans->SetTranslation(mInnerRadius * std::cos(2. * TMath::Pi() * iStave / nStaves), mInnerRadius * std::sin(2 * TMath::Pi() * iStave / nStaves), 0);
385380

@@ -413,7 +408,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
413408
// Put the staves in the correct position and orientation
414409
TGeoCombiTrans* trans = new TGeoCombiTrans();
415410
double theta = 360. * iStave / nStaves;
416-
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 3, 0, 0);
411+
TGeoRotation* rot = new TGeoRotation("rot", theta - 90, 0, 0);
417412
trans->SetRotation(rot);
418413
trans->SetTranslation(mInnerRadius * std::cos(2. * TMath::Pi() * iStave / nStaves), mInnerRadius * std::sin(2 * TMath::Pi() * iStave / nStaves), 0);
419414

Detectors/Upgrades/ALICE3/TRK/workflow/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Note that the `trackingparams` field can contain multiple sets of parameters for
9898
First, generate simulation data:
9999

100100
```bash
101-
o2-sim-serial-run5 -n 200 -g pythia8hi -m TRK --configKeyValues "Diamond.width[0]=0.01;Diamond.width[1]=0.01;Diamond.width[2]=5;TRKBase.layoutML=kTurboStaves;TRKBase.layoutOL=kStaggered;"
101+
o2-sim-serial-run5 -n 200 -g pythia8hi -m TRK --configKeyValues "Diamond.width[0]=0.01;Diamond.width[1]=0.01;Diamond.width[2]=5;TRKBase.layoutML=kTurboStaves;TRKBase.layoutOT=kStaggered;"
102102
```
103103

104104
This produces, among other files:

0 commit comments

Comments
 (0)