Skip to content

Commit

Permalink
workstopgo
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
  • Loading branch information
f3sch committed Apr 19, 2024
1 parent 56e6677 commit 8a00d81
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void TPCITSMatchingDPL::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
return;
}
if (matcher == ConcreteDataMatcher("ITS", "GEOMTGEO", 0)) {
LOG(info) << "ITS GeomtetryTGeo loaded from ccdb";
LOG(info) << "ITS GeometryTGeo loaded from ccdb";
o2::its::GeometryTGeo::adopt((o2::its::GeometryTGeo*)obj);
return;
}
Expand Down
3 changes: 0 additions & 3 deletions Detectors/ITSMFT/ITS/base/include/ITSBase/GeometryTGeo.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,6 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
/// Sym name of the chip in the given layer/halfbarrel/stave/substave/module
static const char* composeSymNameChip(int lr, int hba, int sta, int ssta, int mod, int chip, bool isITS3 = false);

// get tracking frame alpha for ITS3 clusters in global coordinates
static float getAlphaFromGlobalITS3(const o2::math_utils::Point3D<float>& gloXYZ);

// create matrix for transformation from tracking frame to local one for ITS3
const Mat3D getT2LMatrixITS3(int isn, float alpha);

Expand Down
28 changes: 14 additions & 14 deletions Detectors/ITSMFT/ITS/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,6 @@ TGeoHMatrix* GeometryTGeo::extractMatrixSensor(int index) const
return &matTmp;
}

//__________________________________________________________________________
float GeometryTGeo::getAlphaFromGlobalITS3(const o2::math_utils::Point3D<float>& gloXYZ)
{
// since ITS3 is cylindrical alpha = phi in global
auto alpha = std::atan2(gloXYZ.Y(), gloXYZ.X());
o2::math_utils::bringTo02Pi(alpha);
return alpha;
}

//__________________________________________________________________________
const o2::math_utils::Transform3D GeometryTGeo::getT2LMatrixITS3(int isn, float alpha)
{
Expand Down Expand Up @@ -893,11 +884,20 @@ void GeometryTGeo::extractSensorXAlpha(int isn, float& x, float& alp)

#ifdef ENABLE_UPGRADES
if (mIsLayerITS3[iLayer]) {
// in this case we need the line tangent to the circumference
double radius = 0.;
radius = o2::its3::constants::radii[iLayer];
locA[1] = radius;
locB[1] = radius;
// We need to calcualte the line tangent at the mid-point in the geometry
const auto radius = o2::its3::constants::radii[iLayer];
const auto phi1 = o2::its3::constants::tile::width / radius;
const auto phi2 = o2::its3::constants::pixelarray::width / radius + phi1;
const auto phi3 = (phi2 - phi1) / 2.; // mid-point in phi
const auto x = radius * std::cos(phi3);
const auto y = radius * std::sin(phi3);
// For the tangent we make the parametric line equation y = m * x - c
const auto m = x / y;
const auto c = y - m * x;
// Now we can given any x calulate points along this line, we pick points far away,
// the calculation of the normal should work then below.
locA[1] = m * locA[0] + c;
locB[1] = m * locB[0] + c;
}
#endif

Expand Down
4 changes: 1 addition & 3 deletions Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,12 @@ int loadROFrameDataITS3(its::TimeFrame* tf,
auto gloXYZ = geom->getMatrixL2G(sensorID) * locXYZ;

// for cylindrical layers we have a different alpha for each cluster, for regular silicon detectors instead a single alpha for the whole sensor
float alpha = 0.;
float alpha = geom->getSensorRefAlpha(sensorID);
o2::math_utils::Point3D<float> trkXYZ;
if (isITS3) {
alpha = geom->getAlphaFromGlobalITS3(gloXYZ);
// Inverse transformation to the local --> tracking
trkXYZ = geom->getT2LMatrixITS3(sensorID, alpha) ^ locXYZ;
} else {
alpha = geom->getSensorRefAlpha(sensorID);
// Inverse transformation to the local --> tracking
trkXYZ = geom->getMatrixT2L(sensorID) ^ locXYZ;
}
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Upgrades/ITS3/workflow/src/TrackerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void TrackerDPL::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
return;
}
if (matcher == ConcreteDataMatcher("ITS", "GEOMTGEO", 0)) {
LOG(info) << "IT3 GeomtetryTGeo loaded from ccdb";
LOG(info) << "IT3 GeometryTGeo loaded from ccdb";
o2::its::GeometryTGeo::adopt((o2::its::GeometryTGeo*)obj);
return;
}
Expand Down

0 comments on commit 8a00d81

Please sign in to comment.