Skip to content

Commit

Permalink
fixed code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Baek Sun Jo committed Jan 18, 2023
1 parent 4d0a33b commit 9384864
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions TrackingTools/TrackAssociator/src/TrackDetectorAssociator.cc
Expand Up @@ -629,7 +629,7 @@ void TrackDetectorAssociator::getTAMuonChamberMatches(std::vector<TAMuonChamberM
<< "Element is not crosssed: " << DetIdInfo::info(*detId, nullptr) << "\n";
continue;
}
LocalPoint localPoint = geomDet->surface().toLocal(stateOnSurface.freeState()->position());
LocalPoint localPoint = geomDet->surface().toLocal(stateOnSurface.freeState()->position());
LocalError localError = stateOnSurface.localError().positionError();
float distanceX = 0.f;
float distanceY = 0.f;
Expand Down Expand Up @@ -667,17 +667,15 @@ void TrackDetectorAssociator::getTAMuonChamberMatches(std::vector<TAMuonChamberM
distanceX = std::abs(localPoint.x()) - halfWidthAtYPrime;
distanceY = std::abs(localPoint.y() - yCOWPOffset) - 0.5f * length;
} else if (const GEMChamber* gemchamber = dynamic_cast<const GEMChamber*>(geomDet)) {

} else if (dynamic_cast<const GEMChamber*>(geomDet) || dynamic_cast<const GEMSuperChamber*>(geomDet)) {

const TrapezoidalPlaneBounds* bounds = dynamic_cast<const TrapezoidalPlaneBounds*>(&geomDet->surface().bounds());

float wideWidth = bounds->width();
float narrowWidth = 2.f * bounds->widthAtHalfLength() - wideWidth;
float length = bounds->length();
float tangent = (wideWidth - narrowWidth) / (2.f * length);
float halfWidthAtY = tangent * localPoint.y() + 0.5f * narrowWidth;

distanceX = std::abs(localPoint.x()) - halfWidthAtY;
distanceY = std::abs(localPoint.y()) - 0.5f * length;
} else {
Expand Down

0 comments on commit 9384864

Please sign in to comment.