Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 27 additions & 20 deletions Detectors/ITSMFT/ITS/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -420,33 +420,20 @@ TGeoHMatrix* GeometryTGeo::extractMatrixSensor(int index) const
static int chipInGlo{0};

// account for the difference between physical sensitive layer (where charge collection is simulated) and effective sensor thicknesses
// in the ITS3 case this accounted by specialized functions
double delta = Segmentation::SensorLayerThickness - Segmentation::SensorLayerThicknessEff;
#ifdef ENABLE_UPGRADES
if (mIsLayerITS3[getLayer(index)]) {
delta = its3::SegmentationSuperAlpide::mSensorLayerThickness - its3::SegmentationSuperAlpide::mSensorLayerThicknessEff;
}
#endif

static TGeoTranslation tra(0., 0.5 * delta, 0.);

#ifdef ENABLE_UPGRADES // only apply for non ITS3 OB layers
if (!mIsLayerITS3[getLayer(index)]) {
matTmp *= tra;
}
#else
matTmp *= tra;
#endif

return &matTmp;
}

//__________________________________________________________________________
const o2::math_utils::Transform3D GeometryTGeo::getT2LMatrixITS3(int isn, float alpha)
{
// create for sensor isn the TGeo matrix for Tracking to Local frame transformations
static TGeoHMatrix t2l;
t2l.Clear();
t2l.RotateZ(alpha * RadToDeg()); // rotate in direction of normal to the tangent to the cylinder
const TGeoHMatrix& matL2G = getMatrixL2G(isn);
const auto& matL2Gi = matL2G.Inverse();
t2l.MultiplyLeft(&matL2Gi);
return Mat3D(t2l);
}

//__________________________________________________________________________
void GeometryTGeo::Build(int loadTrans)
{
Expand Down Expand Up @@ -926,6 +913,26 @@ TGeoHMatrix& GeometryTGeo::createT2LMatrix(int isn)
return t2l;
}

//__________________________________________________________________________
const o2::math_utils::Transform3D GeometryTGeo::getT2LMatrixITS3(int isn, float alpha)
{
// create for sensor isn the TGeo matrix for Tracking to Local frame transformations with correction for effective thickness
static TGeoHMatrix t2l;
t2l.Clear();
t2l.RotateZ(alpha * RadToDeg()); // rotate in direction of normal to the tangent to the cylinder
const TGeoHMatrix& matL2G = getMatrixL2G(isn);
const auto& matL2Gi = matL2G.Inverse();
t2l.MultiplyLeft(&matL2Gi);
// TODO FS
// correction for effective sensor thickness; disabled for now since this does not work
// but the bias by not using in this should be very small
/*static TGeoTranslation tra;*/
/*tra.SetDx(SuperSegmentation::mSensorLayerThicknessCorr * std::cos(alpha));*/
/*tra.SetDy(SuperSegmentation::mSensorLayerThicknessCorr * std::sin(alpha));*/
/*t2l *= tra;*/
return Mat3D(t2l);
}

//__________________________________________________________________________
int GeometryTGeo::extractVolumeCopy(const char* name, const char* prefix) const
{
Expand Down
4 changes: 2 additions & 2 deletions Detectors/ITSMFT/ITS/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Detector::Detector(Bool_t active, TString name)
} else {
mLayerName[j].Form("%s%d", GeometryTGeo::getITSSensorPattern(), j); // See V3Layer
}
LOGP(info, "{}: mLayerName={}", j, mLayerName[j].Data());
LOGP(debug, "{}: mLayerName={}", j, mLayerName[j].Data());
}

if (mNumberLayers > 0) { // if not, we'll Fatal-ize in CreateGeometry
Expand Down Expand Up @@ -723,7 +723,7 @@ void Detector::defineLayer(Int_t nlay, Double_t phi0, Double_t r, Int_t nstav, I
// Return:
// none.

LOG(info) << "L# " << nlay << " Phi:" << phi0 << " R:" << r << " Nst:" << nstav << " Nunit:" << nunit
LOG(debug) << "L# " << nlay << " Phi:" << phi0 << " R:" << r << " Nst:" << nstav << " Nunit:" << nunit
<< " Lthick:" << lthick << " Dthick:" << dthick << " DetID:" << dettypeID << " B:" << buildLevel;

if (nlay >= mNumberLayers || nlay < 0) {
Expand Down
8 changes: 4 additions & 4 deletions Detectors/Upgrades/ITS3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export ALICEO2_CCDB_LOCALCACHE=${PWD}/ccdb

Simulate diamond

``` bash
```bash
# append to o2-sim
--configKeyValues="Diamond.width[2]=6.;""
```
Expand Down Expand Up @@ -86,7 +86,7 @@ TODO

```bash
# Create Full Geometry
o2-sim -g pythia8pp -j10 --detectorList ALICE2.1 --run 303901 -n0
o2-sim --detectorList ALICE2.1 --run 303901 -n0
cp o2sim_geometry.root ${ALICEO2_CCDB_LOCALCACHE}/GLO/Config/Geometry/snapshot.root
o2-create-aligned-geometry-workflow -b --configKeyValues "HBFUtils.startTime=1547978230000" --condition-remap="file://${ALICEO2_CCDB_LOCALCACHE}=GLO/Config/Geometry"
cp o2sim_geometry-aligned.root ${ALICEO2_CCDB_LOCALCACHE}/GLO/Config/GeometryAligned/snapshot.root
Expand Down Expand Up @@ -158,7 +158,7 @@ The file `hijing.C` can be found [here](https://alice.its.cern.ch/jira/browse/AO
2. (optional) Run the macro `CreateITS3StaticDeadMap.C` and/or visualize with `CheckTileNumbering.C`
3. Move the ccdb object into `${ALICEO2_CCDB_LOCALCACHE}/IT3/Calib/DeadMap`, this is not optional since there is no default object uploaded
4. Run digitizer with `ITS3Params.useDeadChannelMap=true;`, e.g.:
``` bash
```bash
o2-sim-digitizer-workflow --configKeyValues="ITS3Params.useDeadChannelMap=true;"
```

Expand All @@ -168,6 +168,6 @@ o2-sim-digitizer-workflow --configKeyValues="ITS3Params.useDeadChannelMap=true;"
1. Create misalignment parameters with `CreateMisalignmentITS3.C`
2. Visualize with `ShowCoefficients.C`
3. Run digitizer
``` bash
```bash
o2-sim-digitizer-workflow -b --configKeyValues="ITS3Params.applyMisalignmentHits=true;ITS3Params.misalignmentHitsParams=misparams.root"
```
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class SegmentationSuperAlpide
static constexpr float mPitchRow{constants::pixelarray::width / static_cast<float>(mNRows)};
static constexpr float mSensorLayerThickness{constants::thickness};
static constexpr float mSensorLayerThicknessEff{constants::effThickness};
static constexpr float mSensorLayerThicknessCorr{constants::corrThickness};
static constexpr std::array<float, constants::nLayers> mRadii{constants::radii};

/// Transformation from the curved surface to a flat surface
Expand Down
18 changes: 14 additions & 4 deletions Detectors/Upgrades/ITS3/base/include/ITS3Base/SpecsV2.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,26 @@ constexpr std::array<int, 3> nHoles{11, 11, 11}; // how
constexpr std::array<float, 3> radiusHoles{1.0 * mm, 1.0 * mm, 2.0 * mm}; // what is the radius of the holes for each layer?
constexpr EColor color{kGray};
} // namespace carbonfoam
namespace metalstack
{
constexpr float thickness{5 * mu}; // physical thickness of the copper metal stack
constexpr float length{segment::length};
constexpr float width{segment::width};
constexpr EColor color{kBlack};
} // namespace metalstack
constexpr unsigned int nLayers{3};
constexpr unsigned int nTotLayers{7};
constexpr unsigned int nSensorsIB{2 * nLayers};
constexpr float equatorialGap{1 * mm};
constexpr std::array<unsigned int, nLayers> nSegments{3, 4, 5};
constexpr float thickness{50 * mu}; //< Physical Thickness of chip
constexpr float effThickness{66 * mu}; //< Physical thickness + metal substrate
constexpr float epitaxialThickness{10 * mu}; // eptixial layer (charge collection)
constexpr float psubThickness{40 * mu}; // silicon substrate
constexpr float thickness{epitaxialThickness + psubThickness}; // physical thickness of chip
constexpr float effThickness{epitaxialThickness / 2.0 + psubThickness}; // effective physical thickness
constexpr float corrThickness{effThickness - thickness / 2.0}; // correction to get into the epitxial layer
constexpr std::array<float, nLayers> radii{19.0006 * mm, 25.228 * mm, 31.4554 * mm}; // middle radius e.g. inner radius+thickness/2.
constexpr std::array<float, nLayers> radiiInner{radii[0] - thickness / 2.f, radii[1] - thickness / 2.f, radii[2] - thickness / 2.f}; // inner radius
constexpr std::array<float, nLayers> radiiOuter{radii[0] + thickness / 2.f, radii[1] + thickness / 2.f, radii[2] + thickness / 2.f}; // inner radius
constexpr std::array<float, nLayers> radiiInner{radii[0] - thickness / 2.0, radii[1] - thickness / 2.0, radii[2] - thickness / 2.0}; // inner radius
constexpr std::array<float, nLayers> radiiOuter{radii[0] + thickness / 2.0, radii[1] + thickness / 2.0, radii[2] + thickness / 2.0}; // inner radius
namespace detID
{
constexpr unsigned int mDetIDs{2 * 12 * 12 * 12}; //< 2 Hemispheres * (3,4,5=12 segments in a layer) * 12 RSUs in a segment * 12 Tiles in a RSU
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Upgrades/ITS3/macros/test/TestSensorGeometry.C
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void TestSensorGeometry(bool checkFull = false)
if (checkFull) {
gGeoManager->CheckGeometryFull();
}
gGeoManager->CheckOverlaps(0.0001);
gGeoManager->CheckOverlaps(0.00001);
TIter nextOverlap{gGeoManager->GetListOfOverlaps()};
while ((obj = (TObject*)nextOverlap())) {
LOGP(info, "Overlap in {}", obj->GetName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class ITS3Layer
TGeoMedium* mSilicon{nullptr};
TGeoMedium* mAir{nullptr};
TGeoMedium* mCarbon{nullptr};
TGeoMedium* mCopper{nullptr};
void getMaterials(bool create = false);
TGeoMedium* getMaterial(const char* matName, bool create = false);

Expand Down
11 changes: 10 additions & 1 deletion Detectors/Upgrades/ITS3/simulation/src/ITS3Layer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void ITS3Layer::getMaterials(bool create)
mSilicon = getMaterial("IT3_SI$", create);
mAir = getMaterial("IT3_AIR$", create);
mCarbon = getMaterial("IT3_CARBON$", create);
mCopper = getMaterial("IT3_COPPER$", create);
}

TGeoMedium* ITS3Layer::getMaterial(const char* matName, bool create)
Expand Down Expand Up @@ -276,11 +277,19 @@ void ITS3Layer::createChip()
mChip = new TGeoVolumeAssembly(its3TGeo::getITS3ChipPattern(mNLayer));
mChip->VisibleDaughters();

auto phiOffset = constants::segment::width / mR * o2m::Rad2Deg;
for (unsigned int i{0}; i < constants::nSegments[mNLayer]; ++i) {
double phiOffset = constants::segment::width / mR * o2m::Rad2Deg;
auto rot = new TGeoRotation("", 0, 0, phiOffset * i);
mChip->AddNode(mSegment, i, rot);
}

// Add metal stack positioned radially outward
auto zMoveMetal = new TGeoTranslation(0, 0, constants::metalstack::length / 2. - constants::segment::lec::length);
auto metal = new TGeoTubeSeg(mRmax, mRmax + constants::metalstack::thickness, constants::metalstack::length / 2., 0, 3.0 * phiOffset);
auto metalVol = new TGeoVolume(Form("metal%d", mNLayer), metal, mCopper);
metalVol->SetLineColor(constants::metalstack::color);
metalVol->RegisterYourself();
mChip->AddNode(metalVol, 0, zMoveMetal);
}

void ITS3Layer::createCarbonForm()
Expand Down
Loading