Skip to content

Commit c242236

Browse files
committed
nMax for NUA correction and applying it
1 parent ea7d8cb commit c242236

1 file changed

Lines changed: 44 additions & 43 deletions

File tree

PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ struct UpcPhotonuclearAnalysisJMG {
148148
{"Photon", "K0", "Lambda", "Phi", "Rho"}},
149149
"Pair cuts on various particles"};
150150
Configurable<float> cfgTwoTrackCut{"cfgTwoTrackCut", -1, {"Two track cut"}};
151-
ConfigurableAxis axisVertex{"axisVertex", {10, -10, 10}, "vertex axis for histograms"};
151+
ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for histograms"};
152152
ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {72, -PIHalf, kThreeHalfPi}, "delta phi axis for histograms"};
153-
ConfigurableAxis axisDeltaEta{"axisDeltaEta", {40, -2, 2}, "delta eta axis for histograms"};
153+
ConfigurableAxis axisDeltaEta{"axisDeltaEta", {32, -1.6, 1.6}, "delta eta axis for histograms"};
154154
ConfigurableAxis axisPtTrigger{"axisPtTrigger", {VARIABLE_WIDTH, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0}, "pt trigger axis for histograms"};
155155
ConfigurableAxis axisPtAssoc{"axisPtAssoc", {VARIABLE_WIDTH, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0}, "pt associated axis for histograms"};
156156
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100, 110.1}, "multiplicity / multiplicity axis for histograms"};
@@ -432,47 +432,6 @@ struct UpcPhotonuclearAnalysisJMG {
432432
return true;
433433
}
434434

435-
template <typename TTarget, typename TTracks>
436-
void fillCorrelationsUD(TTarget target, const TTracks tracks1, const TTracks tracks2, float multiplicity, float posZ)
437-
{
438-
// multiplicity = tracks1.size();
439-
for (const auto& track1 : tracks1) {
440-
if (isTrackCut(track1) == false) {
441-
return;
442-
}
443-
// weight NUA for track1
444-
float phi1 = phi(track1.px(), track1.py());
445-
float eta1 = eta(track1.px(), track1.py(), track1.pz());
446-
float w1 = getNUAWeight(posZ, eta1, phi1);
447-
target->getTriggerHist()->Fill(CorrelationContainer::kCFStepReconstructed, track1.pt(), multiplicity, posZ, 1.0);
448-
for (const auto& track2 : tracks2) {
449-
if (track1 == track2) {
450-
continue;
451-
}
452-
if (isTrackCut(track2) == false) {
453-
return;
454-
}
455-
// weight NUA for track 2
456-
float phi2 = phi(track2.px(), track2.py());
457-
float eta2 = eta(track2.px(), track2.py(), track2.pz());
458-
float w2 = getNUAWeight(posZ, eta2, phi2);
459-
// total weight
460-
float wPair = w1 * w2;
461-
/*if (doPairCuts && mPairCuts.conversionCuts(track1, track2)) {
462-
continue;
463-
}*/
464-
float deltaPhi = phi(track1.px(), track1.py()) - phi(track2.px(), track2.py());
465-
deltaPhi = RecoDecay::constrainAngle(deltaPhi, -PIHalf);
466-
target->getPairHist()->Fill(CorrelationContainer::kCFStepReconstructed,
467-
eta(track1.px(), track1.py(), track1.pz()) - eta(track2.px(), track2.py(), track2.pz()),
468-
track2.pt(), track1.pt(),
469-
multiplicity,
470-
deltaPhi,
471-
posZ,
472-
wPair);
473-
}
474-
}
475-
}
476435

477436
void makeNUAWeights(std::shared_ptr<TH3> histoRaw3D)
478437
{
@@ -539,6 +498,48 @@ struct UpcPhotonuclearAnalysisJMG {
539498
return hWeight->GetBinContent(iVz, iEta, iPhi);
540499
}
541500

501+
template <typename TTarget, typename TTracks>
502+
void fillCorrelationsUD(TTarget target, const TTracks tracks1, const TTracks tracks2, float multiplicity, float posZ)
503+
{
504+
// multiplicity = tracks1.size();
505+
for (const auto& track1 : tracks1) {
506+
if (isTrackCut(track1) == false) {
507+
return;
508+
}
509+
// weight NUA for track1
510+
float phi1 = phi(track1.px(), track1.py());
511+
float eta1 = eta(track1.px(), track1.py(), track1.pz());
512+
float w1 = getNUAWeight(posZ, eta1, phi1);
513+
target->getTriggerHist()->Fill(CorrelationContainer::kCFStepReconstructed, track1.pt(), multiplicity, posZ, 1.0);
514+
for (const auto& track2 : tracks2) {
515+
if (track1 == track2) {
516+
continue;
517+
}
518+
if (isTrackCut(track2) == false) {
519+
return;
520+
}
521+
// weight NUA for track 2
522+
float phi2 = phi(track2.px(), track2.py());
523+
float eta2 = eta(track2.px(), track2.py(), track2.pz());
524+
float w2 = getNUAWeight(posZ, eta2, phi2);
525+
// total weight
526+
float wPair = w1 * w2;
527+
/*if (doPairCuts && mPairCuts.conversionCuts(track1, track2)) {
528+
continue;
529+
}*/
530+
float deltaPhi = phi(track1.px(), track1.py()) - phi(track2.px(), track2.py());
531+
deltaPhi = RecoDecay::constrainAngle(deltaPhi, -PIHalf);
532+
target->getPairHist()->Fill(CorrelationContainer::kCFStepReconstructed,
533+
eta(track1.px(), track1.py(), track1.pz()) - eta(track2.px(), track2.py(), track2.pz()),
534+
track2.pt(), track1.pt(),
535+
multiplicity,
536+
deltaPhi,
537+
posZ,
538+
wPair);
539+
}
540+
}
541+
}
542+
542543
void processSG(FullSGUDCollision::iterator const& reconstructedCollision, FullUDTracks const& reconstructedTracks)
543544
{
544545
histos.fill(HIST("Events/hCountCollisions"), 0);

0 commit comments

Comments
 (0)