Skip to content
Snippets Groups Projects
Commit df7cfaf4 authored by Dave Casper's avatar Dave Casper
Browse files

Restore track state at measurements; disable other debugging code

parent 1c5608ed
No related branches found
No related tags found
No related merge requests found
......@@ -271,8 +271,8 @@ StatusCode ClusterFitAlg::execute(const EventContext& ctx) const
bestFit(1) << "+/-" << sqrt(bestCov(1,1)) << "," <<
bestFit(2) << "+/-" << sqrt(bestCov(2,2)) << "," <<
bestFit(3) << "+/-" << sqrt(bestCov(3,3)) << "); chi2 = " << bestChi2 );
if (eventNumber == 10841) std::cout << "fit = ParametricPlot3D[{" << bestFit(0) << " + (" << bestFit(2) << ") z, " << bestFit(1) << " + ( " << bestFit(3) << ") z, z}, {z, -50, 50}, Boxed->False];" << std::endl;
int iC = 0;
// if (eventNumber == 10841) std::cout << "fit = ParametricPlot3D[{" << bestFit(0) << " + (" << bestFit(2) << ") z, " << bestFit(1) << " + ( " << bestFit(3) << ") z, z}, {z, -50, 50}, Boxed->False];" << std::endl;
// int iC = 0;
for (auto info : bestClusters)
{
if (info->sinAlpha * info->cosAlpha < 0) continue;
......@@ -281,10 +281,10 @@ StatusCode ClusterFitAlg::execute(const EventContext& ctx) const
double yFit = bestFit(1) + bestFit(3) * dz;
double uFit = yFit * info->cosAlpha + xFit * info->sinAlpha;
ATH_MSG_VERBOSE("Event: " << eventNumber << " z: " << info->z << " z-zC: " << dz<< " uFit: " << uFit << " u: " << info->u);
auto stripEnds = info->cluster->detectorElement()->endsOfStrip(info->cluster->localPosition());
if (eventNumber == 10841) std::cout << "l" << iC << " = Line[{{" << stripEnds.first.x() << ", " << stripEnds.first.y() << ", " << stripEnds.first.z() - m_zCenter[thisStation] << "}, {" <<
stripEnds.second.x() << ", " << stripEnds.second.y() << ", " << stripEnds.second.z() - m_zCenter[thisStation] << "}}];" << std::endl;
iC++;
// auto stripEnds = info->cluster->detectorElement()->endsOfStrip(info->cluster->localPosition());
// if (eventNumber == 10841) std::cout << "l" << iC << " = Line[{{" << stripEnds.first.x() << ", " << stripEnds.first.y() << ", " << stripEnds.first.z() - m_zCenter[thisStation] << "}, {" <<
// stripEnds.second.x() << ", " << stripEnds.second.y() << ", " << stripEnds.second.z() - m_zCenter[thisStation] << "}}];" << std::endl;
// iC++;
}
for (auto info : bestClusters)
{
......@@ -294,12 +294,12 @@ StatusCode ClusterFitAlg::execute(const EventContext& ctx) const
double yFit = bestFit(1) + bestFit(3) * dz;
double uFit = yFit * info->cosAlpha + xFit * info->sinAlpha;
ATH_MSG_VERBOSE("Event: " << eventNumber << " z: " << info->z << " z-zC: " << dz<< " uFit: " << uFit << " u: " << info->u);
auto stripEnds = info->cluster->detectorElement()->endsOfStrip(info->cluster->localPosition());
if (eventNumber == 10841) std::cout << "l" << iC << " = Line[{{" << stripEnds.first.x() << ", " << stripEnds.first.y() << ", " << stripEnds.first.z() - m_zCenter[thisStation] << "}, {" <<
stripEnds.second.x() << ", " << stripEnds.second.y() << ", " << stripEnds.second.z() - m_zCenter[thisStation] << "}}];" << std::endl;
iC++;
// auto stripEnds = info->cluster->detectorElement()->endsOfStrip(info->cluster->localPosition());
// if (eventNumber == 10841) std::cout << "l" << iC << " = Line[{{" << stripEnds.first.x() << ", " << stripEnds.first.y() << ", " << stripEnds.first.z() - m_zCenter[thisStation] << "}, {" <<
// stripEnds.second.x() << ", " << stripEnds.second.y() << ", " << stripEnds.second.z() - m_zCenter[thisStation] << "}}];" << std::endl;
// iC++;
}
if (eventNumber == 10841) std::cout << "Show[Graphics3D[{l1, l2, l3, l4, l5, l6}, Boxed -> False], fit]" << std::endl;
// if (eventNumber == 10841) std::cout << "Show[Graphics3D[{l1, l2, l3, l4, l5, l6}, Boxed -> False], fit]" << std::endl;
//Residuals(bestClusters);
ATH_CHECK(AddTrack(outputTracks, bestFit, bestCov, bestClusters, bestChi2, bestClusters.size()-4));
m_chi2->Fill(bestChi2);
......@@ -376,10 +376,10 @@ ClusterFitAlg::AddTrack(std::unique_ptr<TrackCollection>& tracks,
// translate parameters to nominal fit point
s->push_back( GetState(fitResult, fitCovariance, nullptr, station) );
// for (const clusterInfo* cInfo : fitClusters)
// {
// s->push_back( GetState(fitResult, fitCovariance, cInfo->cluster, station) );
// }
for (const clusterInfo* cInfo : fitClusters)
{
s->push_back( GetState(fitResult, fitCovariance, cInfo->cluster, station) );
}
// Create and store track
tracks->push_back(new Trk::Track(i, s , q));
......
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