Skip to content
Snippets Groups Projects
Commit 0f520293 authored by Nicholas Styles's avatar Nicholas Styles
Browse files

fix axis conventions for ITk Strip

parent 4cda231e
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!39499Coordinate fixes for ITk Strips
......@@ -488,7 +488,7 @@ using Trk::distDepth;
ATH_MSG_DEBUG("Unable to swap local xPhi axis.");
}
}
if (std::abs(phiDir) < 0.5) { // Check that it is in roughly the right direction.
ATH_MSG_ERROR( "Orientation of local xPhi axis does not follow correct convention.");
m_phiDirection = true; // Don't swap.
......@@ -511,6 +511,7 @@ using Trk::distDepth;
m_etaDirection = true; // Don't swap
}
} // end if (firstTimeBaseTemp)
m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransformImpl();
......@@ -707,19 +708,19 @@ using Trk::distDepth;
HepGeom::Vector3D<double>(0., 0., 1.)
};
//correct phi and eta as necessary - do not change depth, this will be defined by the transform based on the other two
int signPhi = m_phiDirection? +1:-1;
int signEta = m_etaDirection? +1:-1;
const HepGeom::Transform3D recoToHit(HepGeom::Point3D<double>(0., 0., 0.),
localAxes[distPhi],
localAxes[distEta],
signPhi * localAxes[distPhi],
signEta *localAxes[distEta],
HepGeom::Point3D<double>(0., 0., 0.),
localAxes[m_hitPhi],
localAxes[m_hitEta]);
// Swap direction of axis as appropriate
CLHEP::Hep3Vector scale(1., 1., 1.);
if (!m_phiDirection) scale[distPhi] = -1.;
if (!m_etaDirection) scale[distEta] = -1.;
if (!m_depthDirection) scale[distDepth] = -1.;
return recoToHit * HepGeom::Scale3D(scale[0], scale[1], scale[2]);
return recoToHit ;
}
......
......@@ -49,13 +49,16 @@ G4bool SctSensorGmxSD::ProcessHits(G4Step *aStep, G4TouchableHistory * /* not us
G4ThreeVector localPosition2 = transformation.TransformPoint(coord2);
HepGeom::Point3D<double> lP1, lP2;
lP1[SiHit::xEta] = localPosition1[2]*CLHEP::mm;
//depth is local z for ITk strip sensors built using GeoModelXML
//For Run-2 SCT sensors, depth is local x
//(so would be 2,1,0 rather than 0,1,2)
lP1[SiHit::xEta] = localPosition1[0]*CLHEP::mm;
lP1[SiHit::xPhi] = localPosition1[1]*CLHEP::mm;
lP1[SiHit::xDep] = localPosition1[0]*CLHEP::mm;
lP1[SiHit::xDep] = localPosition1[2]*CLHEP::mm;
lP2[SiHit::xEta] = localPosition2[2]*CLHEP::mm;
lP2[SiHit::xEta] = localPosition2[0]*CLHEP::mm;
lP2[SiHit::xPhi] = localPosition2[1]*CLHEP::mm;
lP2[SiHit::xDep] = localPosition2[0]*CLHEP::mm;
lP2[SiHit::xDep] = localPosition2[2]*CLHEP::mm;
//
// Get the indexes of which detector the hit is in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment