Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 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
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/DataFormats/Detectors/TPC @davidrohr @wiechula @shahor02
/DataFormats/Detectors/TRD @f3sch @bazinski @tdietel @martenole
/DataFormats/Detectors/Upgrades @qgp @marcovanleeuwen @mconcas
/DataFormats/Detectors/Upgrades/IT3 @fgrosa @arossi81
/DataFormats/Detectors/Upgrades/ITS3 @fgrosa @arossi81
/DataFormats/Detectors/ZDC @coppedis

#/DataFormats/Headers
Expand Down
11 changes: 7 additions & 4 deletions Detectors/ITSMFT/ITS/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,11 @@ TGeoHMatrix* GeometryTGeo::extractMatrixSensor(int index) const
if (mNumberOfModules[lay] > 0) {
path += Form("%s%d_%d/", mIsLayerITS3[lay] ? getITS3ModulePattern() : getITSModulePattern(), lay, mod);
}
path +=
Form("%s%d_%d/%s%d_1", mIsLayerITS3[lay] ? getITS3ChipPattern() : getITSChipPattern(), lay, chipInMod, mIsLayerITS3[lay] ? getITS3SensorPattern() : getITSSensorPattern(), lay);
if (!mIsLayerITS3[lay]) {
path += Form("%s%d_%d/%s%d_1", getITSChipPattern(), lay, chipInMod, getITSSensorPattern(), lay);
} else {
path += Form("%s%d_%d", getITS3ChipPattern(), lay, chipInMod); // for ITS3 currently we might have more sensors than chips, so we have to take the chip to avoid mismatches with chipId
}

static TGeoHMatrix matTmp;
gGeoManager->PushPath();
Expand All @@ -388,8 +391,8 @@ TGeoHMatrix* GeometryTGeo::extractMatrixSensor(int index) const

matTmp = *gGeoManager->GetCurrentMatrix(); // matrix may change after cd
// RSS
// printf("%d/%d/%d %s\n",lay,stav,detInSta,path.Data());
// mat->Print();
// printf("%d/%d/%d %s\n", lay, stav, detInSta, path.Data());
// matTmp.Print();
// Restore the modeler state.
gGeoManager->PopPath();

Expand Down
2 changes: 1 addition & 1 deletion Detectors/Upgrades/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
# or submit itself to any jurisdiction.

message(STATUS "Building detectors for upgrades")
add_subdirectory(IT3)
add_subdirectory(ITS3)
add_subdirectory(ALICE3)
33 changes: 0 additions & 33 deletions Detectors/Upgrades/IT3/macros/test/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

add_subdirectory(macros)
add_subdirectory(simulation)
add_subdirectory(base)
add_subdirectory(workflow)
add_subdirectory(reconstruction)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
\page refDetectorsUpgradesIT3 UpgradesIT3
/doxy -->

# IT3
# ITS3
Upgraded version of the ITS that includes upgraded truly-cylindrical inner barrel.

# Run the full simulation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <Rtypes.h>
#include "MathUtils/Cartesian.h"
#include "CommonConstants/MathConstants.h"
#include <Framework/Logger.h>

namespace o2
{
Expand All @@ -28,22 +29,23 @@ namespace its3
class SegmentationSuperAlpide
{
public:
SegmentationSuperAlpide(int layer = 0) : mLayer{layer},
SegmentationSuperAlpide(int layer = 0) : Layer{layer},
NPixels{NRows * NCols},
NRows{static_cast<int>(double(Radii[layer]) * double(constants::math::TwoPI) / double(PitchRow) + 1)},
NRows{static_cast<int>(double(Radii[layer] + SensorLayerThickness / 2) * double(constants::math::PI) / double(PitchRow) + 1)},
ActiveMatrixSizeRows{PitchRow * NRows},
SensorSizeRows{ActiveMatrixSizeRows + PassiveEdgeTop + PassiveEdgeReadOut}
{
LOGP(info, "rows: {} cols: {} npixels: {}", NRows, NCols, NPixels);
LOGP(info, "SegmentationSuperAlpide: layer {} ActiveMatrixSizeRows: {} ActiveMatrixSizeCols: {}", layer, ActiveMatrixSizeCols, ActiveMatrixSizeRows);
}
int mLayer;
static constexpr int NLayers = 4;
static constexpr std::array<float, 10> Radii = {1.8f, 2.4f, 3.0f, 7.0f, 10.f};
static constexpr float Length = 27.15f;
static constexpr float Radii[NLayers] = {1.8f, 2.4f, 3.0f, 7.0f};
static constexpr float PitchCol = 29.24e-4;
static constexpr float PitchRow = 26.88e-4;
static constexpr float PitchCol = 20.e-4;
static constexpr float PitchRow = 20.e-4;
static constexpr int NCols = Length / PitchCol;
int NRows;
int NPixels;
int Layer;
static constexpr float PassiveEdgeReadOut = 0.; // width of the readout edge (Passive bottom)
static constexpr float PassiveEdgeTop = 0.; // Passive area on top
static constexpr float PassiveEdgeSide = 0.; // width of Passive area on left/right of the sensor
Expand All @@ -58,6 +60,30 @@ class SegmentationSuperAlpide

~SegmentationSuperAlpide() = default;

/// Transformation from the curved surface to a flat surface
/// It works only if the detector is not rototraslated
/// \param xCurved Detector local curved coordinate x in cm with respect to
/// the center of the sensitive volume.
/// \param yCurved Detector local curved coordinate y in cm with respect to
/// the center of the sensitive volulme.
/// \param xFlat Detector local flat coordinate x in cm with respect to
/// the center of the sensitive volume.
/// \param yFlat Detector local flat coordinate y in cm with respect to
/// the center of the sensitive volulme.
void curvedToFlat(float xCurved, float yCurved, float& xFlat, float& yFlat);

/// Transformation from the flat surface to a curved surface
/// It works only if the detector is not rototraslated
/// \param xFlat Detector local flat coordinate x in cm with respect to
/// the center of the sensitive volume.
/// \param yFlat Detector local flat coordinate y in cm with respect to
/// the center of the sensitive volulme.
/// \param xCurved Detector local curved coordinate x in cm with respect to
/// the center of the sensitive volume.
/// \param yCurved Detector local curved coordinate y in cm with respect to
/// the center of the sensitive volulme.
void flatToCurved(float xFlat, float yFlat, float& xCurved, float& yCurved);

/// Transformation from Geant detector centered local coordinates (cm) to
/// Pixel cell numbers iRow and iCol.
/// Returns kTRUE if point x,z is inside sensitive volume, kFALSE otherwise.
Expand Down Expand Up @@ -103,6 +129,23 @@ class SegmentationSuperAlpide
ClassDefNV(SegmentationSuperAlpide, 1); // Segmentation class upgrade pixels
};

inline void SegmentationSuperAlpide::curvedToFlat(float xCurved, float yCurved, float& xFlat, float& yFlat)
{
float dist = std::sqrt(xCurved * xCurved + yCurved * yCurved);
float phi = (double)constants::math::PI / 2 - std::atan2((double)yCurved, (double)xCurved);
xFlat = (Radii[Layer] + SegmentationSuperAlpide::SensorLayerThickness / 2) * phi;
yFlat = dist - (Radii[Layer] + SegmentationSuperAlpide::SensorLayerThickness / 2);
}

inline void SegmentationSuperAlpide::flatToCurved(float xFlat, float yFlat, float& xCurved, float& yCurved)
{
float phi = xFlat / (Radii[Layer] + SegmentationSuperAlpide::SensorLayerThickness / 2);
float dist = yFlat + (Radii[Layer] + SegmentationSuperAlpide::SensorLayerThickness / 2);
float tang = std::tan((double)constants::math::PI / 2 - (double)phi);
xCurved = (xFlat > 0 ? 1.f : -1.f) * dist / std::sqrt(1 + tang * tang);
yCurved = xCurved * tang;
}

inline void SegmentationSuperAlpide::localToDetectorUnchecked(float xRow, float zCol, int& iRow, int& iCol)
{
// convert to row/col w/o over/underflow check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
#pragma link C++ class o2::its3::SegmentationSuperAlpide + ;
#pragma link C++ class o2::its3::MisalignmentParameter + ;



#endif
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ using namespace o2::its3;

void SegmentationSuperAlpide::print()
{
printf("ITS3 segmentation for layer: %d \n", mLayer);
printf("Pixel size: %.2f (along %d rows) %.2f (along %d columns) microns\n", PitchRow * 1e4, NRows, PitchCol * 1e4, NCols);
printf("Passive edges: bottom: %.2f, top: %.2f, left/right: %.2f microns\n",
PassiveEdgeReadOut * 1e4, PassiveEdgeTop * 1e4, PassiveEdgeSide * 1e4);
Expand Down
45 changes: 45 additions & 0 deletions Detectors/Upgrades/ITS3/macros/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
# This software is distributed under the terms of the GNU General Public
# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

o2_add_test_root_macro(CheckDigitsITS3.C
PUBLIC_LINK_LIBRARIES O2::ITSBase
O2::ITS3Base
O2::ITSMFTBase
O2::ITSMFTSimulation
O2::ITS3Simulation
O2::MathUtils
O2::SimulationDataFormat
O2::DetectorsBase
LABELS its3)

o2_add_test_root_macro(CheckClustersITS3.C
PUBLIC_LINK_LIBRARIES O2::ITSBase
O2::ITS3Base
O2::ITSMFTBase
O2::ITSMFTSimulation
O2::ITS3Simulation
O2::ITS3Reconstruction
O2::MathUtils
O2::SimulationDataFormat
O2::DetectorsBase
LABELS its3)

# o2_add_test_root_macro(CheckSquasherITS3.C
# PUBLIC_LINK_LIBRARIES O2::ITSBase
# O2::ITS3Base
# O2::ITSMFTBase
# O2::ITSMFTSimulation
# O2::ITS3Simulation
# O2::ITS3Reconstruction
# O2::MathUtils
# O2::SimulationDataFormat
# O2::DetectorsBase
# LABELS its3)
Loading