Skip to content
Merged
Changes from all 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
18 changes: 9 additions & 9 deletions PWGLF/Tasks/QC/straRecoStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ struct preProcessMCcollisions {
const AxisSpec axisCovariance{(int)400, 0.0f, +0.1f, ""};
const AxisSpec axisCovarianceTest{(int)400, -0.05f, +0.05f, ""};
const AxisSpec axisTwenty{(int)20, -0.5f, +19.5f, ""};

const AxisSpec axisPVResolutionXY{(int)400, 0.0f, +0.05f, ""};
const AxisSpec axisPVResolutionZ{(int)400, -0.1f, +0.1f, ""};
const AxisSpec axisPVResolutionT{(int)400, -50000.0f, +0.0f, ""};

histos.add("hNTimesCollRecoed", "hNTimesCollRecoed", kTH1F, {axisNTimesCollRecoed});
histos.add("hNTimesCollWithXiRecoed", "hNTimesCollWithXiRecoed", kTH1F, {axisNTimesCollRecoed});

Expand All @@ -131,14 +131,14 @@ struct preProcessMCcollisions {
histos.add("h2dCovarianceTrace", "h2dCovarianceTrace", kTH2D, {axisCovariance, axisTwenty});
histos.add("h2dCovarianceTraceWithXi", "h2dCovarianceTraceWithXi", kTH2D, {axisCovariance, axisTwenty});

//PV true error: from reco vs MC
// PV true error: from reco vs MC
histos.add("h2dPVResolutionXY", "h2dPVResolutionXY", kTH2D, {axisPVResolutionXY, axisTwenty});
histos.add("h2dPVResolutionZ", "h2dPVResolutionZ", kTH2D, {axisPVResolutionZ, axisTwenty});
histos.add("h2dPVResolutionT", "h2dPVResolutionT", kTH2D, {axisPVResolutionT, axisTwenty});
histos.add("h2dPVResolutionXYWithXi", "h2dPVResolutionXYWithXi", kTH2D, {axisPVResolutionXY, axisTwenty});
histos.add("h2dPVResolutionZWithXi", "h2dPVResolutionZWithXi", kTH2D, {axisPVResolutionZ, axisTwenty});
histos.add("h2dPVResolutionTWithXi", "h2dPVResolutionTWithXi", kTH2D, {axisPVResolutionT, axisTwenty});

// Helper to decipher this histogram
histos.get<TH2>(HIST("h2dNContributors"))->GetYaxis()->SetBinLabel(1, "Recoed 1 time, 1st PV"); // size 1 = 0
histos.get<TH2>(HIST("h2dNContributors"))->GetYaxis()->SetBinLabel(2, "Recoed 2 times, Biggest PV"); // size 2 = 1
Expand Down Expand Up @@ -180,14 +180,14 @@ struct preProcessMCcollisions {
histos.fill(HIST("hNTimesCollWithXiRecoed"), collisions.size());
int lCollisionIndex = 0;
for (auto& collision : collisions) {
float cyy = TMath::Sign(1,collision.covYY())*TMath::Sqrt( TMath::Abs( collision.covYY() ) );
histos.fill(HIST("hCyyTest"), cyy); //check for bug
float cyy = TMath::Sign(1, collision.covYY()) * TMath::Sqrt(TMath::Abs(collision.covYY()));
histos.fill(HIST("hCyyTest"), cyy); // check for bug
collisionNContribs.emplace_back(collision.numContrib());
collisionStatAggregator[lCollisionIndex].covTrace = TMath::Sqrt(TMath::Abs(collision.covXX()) + TMath::Abs(collision.covYY()) + TMath::Abs(collision.covZZ()));
collisionStatAggregator[lCollisionIndex].deltaXY = TMath::Sqrt( TMath::Power(collision.posX() - mcCollision.posX(), 2) + TMath::Power(collision.posY() - mcCollision.posY(), 2) );
collisionStatAggregator[lCollisionIndex].deltaXY = TMath::Sqrt(TMath::Power(collision.posX() - mcCollision.posX(), 2) + TMath::Power(collision.posY() - mcCollision.posY(), 2));
collisionStatAggregator[lCollisionIndex].deltaZ = collision.posZ() - mcCollision.posZ();
collisionStatAggregator[lCollisionIndex].deltaT = (collision.collisionTime() - mcCollision.t())/1000;
collisionStatAggregator[lCollisionIndex].deltaT = (collision.collisionTime() - mcCollision.t()) / 1000;

auto groupedTracks = tracks.sliceBy(perCollision, collision.globalIndex());
for (auto& track : groupedTracks) {
if (track.isPVContributor()) {
Expand Down