Skip to content

Commit 3616a2d

Browse files
committed
Add basic QA histograms for BR
1 parent a65e063 commit 3616a2d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ struct OnTheFlyTracker {
193193

194194
ConfigurableAxis axisRadius{"axisRadius", {2500, 0.0f, +250.0f}, "R (cm)"};
195195
ConfigurableAxis axisZ{"axisZ", {100, -250.0f, +250.0f}, "Z (cm)"};
196+
197+
ConfigurableAxis axisNphotons{"axisNphotons", {10, 0.5f, 10.5f}, "N_{#gamma}"};
198+
ConfigurableAxis axisBRenergyLoss{"axisBRenergyLoss", {500, 0.0f, 1.0f}, "#Delta p / p"};
196199
} axes;
197200

198201
// for topo var QA
@@ -249,6 +252,7 @@ struct OnTheFlyTracker {
249252
struct : ConfigurableGroup {
250253
std::string prefix = "cfgBR"; // configuration for bremsstrahlung
251254
Configurable<bool> radiateBR{"radiateBR", false, "simulate bremsstrahlung"};
255+
Configurable<bool> doBRQA{"doBRQA", false, "Do QA for bremsstrahlung"};
252256
Configurable<float> minBREnergyFraction{"minEnergyFraction", 0.001f, "Minimum energy fraction a bremsstrahlung photon can carry"};
253257
Configurable<float> maxBREnergyFraction{"maxEnergyFraction", 0.95f, "Maximum energy fraction a bremsstrahlung photon can carry"};
254258
Configurable<float> radiationStrength{"radiationStrength", 1e-6f, "Strenght of the bremsstrahlung radiation"};
@@ -576,6 +580,14 @@ struct OnTheFlyTracker {
576580
insertHist(histPath + "h2dDCAz", "h2dDCAz;p_{T};DCA_{z}", {kTH2D, {{axes.axisMomentum, axes.axisDCA}}});
577581
}
578582

583+
if (brSettings.doBRQA) {
584+
insertHist(histPath + "h1dNBRPhotons", "h1dNBRPhotons;N_{#gamma};Counts", {kTH1D, {{axes.axisNphotons}}});
585+
insertHist(histPath + "h1dBREnergyLoss", "h1dBREnergyLoss;#Delta p / p;Counts", {kTH1D, {{axes.axisBRenergyLoss}}});
586+
587+
insertHist(histPath + "h2dBRPtRes", "h2dPtRes;Gen p_{T};#Delta p_{T} / Reco p_{T}", {kTH2D, {{axes.axisMomentum, axes.axisPtRes}}});
588+
insertHist(histPath + "h2dBRPtResAbs", "h2dPtResAbs;Gen p_{T};#Delta p_{T}", {kTH2D, {{axes.axisMomentum, axes.axisPtRes}}});
589+
}
590+
579591
} // end config loop
580592

581593
// Basic QA
@@ -1796,10 +1808,24 @@ struct OnTheFlyTracker {
17961808
float lambda = brSettings.radiationStrength * mcParticle.e() * geoEntry.getFloatValue(layerName, "x0") / (mass * mass);
17971809
ULong64_t nPhotons = gRandom->Poisson(lambda);
17981810

1811+
double initialMomentum = trackParCov.getP();
1812+
17991813
for (ULong64_t photon = 0; photon < nPhotons; ++photon) {
18001814
float radiativeLoss = 1.0f - brSettings.minBREnergyFraction * std::pow(brSettings.maxBREnergyFraction / brSettings.minBREnergyFraction, gRandom->Rndm());
18011815
trackParCov.setQ2Pt(trackParCov.getQ2Pt() / radiativeLoss);
18021816
}
1817+
1818+
double afterRadiationMomentum = trackParCov.getP();
1819+
1820+
if (brSettings.doBRQA) {
1821+
const std::string histPath = "Configuration_" + std::to_string(icfg) + "/";
1822+
1823+
getHist(TH1, histPath + "h1dNBRPhotons")->Fill(static_cast<double>(nPhotons));
1824+
getHist(TH1, histPath + "h1dBREnergyLoss")->Fill((initialMomentum - afterRadiationMomentum) / afterRadiationMomentum);
1825+
1826+
getHist(TH2, histPath + "h2dBRPtRes")->Fill(trackParCov.getPt(), (trackParCov.getPt() - mcParticle.pt()) / trackParCov.getPt());
1827+
getHist(TH2, histPath + "h2dBRPtResAbs")->Fill(trackParCov.getPt(), trackParCov.getPt() - mcParticle.pt());
1828+
}
18031829
}
18041830
}
18051831
}

0 commit comments

Comments
 (0)