Skip to content

Commit 346b985

Browse files
committed
changed-up drawing of selection histos and added a switch for pO
1 parent 651a59e commit 346b985

File tree

1 file changed

+37
-25
lines changed

1 file changed

+37
-25
lines changed

PWGUD/Tasks/upcRhoAnalysis.cxx

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ struct UpcRhoAnalysis {
126126

127127
Configurable<int> numPions{"numPions", 2, "required number of pions in the event"};
128128

129+
Configurable<bool> isPO{"isPO", false, "process proton-oxygen data"};
130+
129131
Configurable<bool> cutGapSide{"cutGapSide", true, "apply gap side cut"};
130132
Configurable<int> gapSide{"gapSide", 2, "required gap side"};
131133
Configurable<bool> useTrueGap{"useTrueGap", false, "use true gap"};
@@ -447,15 +449,17 @@ struct UpcRhoAnalysis {
447449
template <typename C>
448450
bool collisionPassesCuts(const C& collision, int runIndex) // collision cuts
449451
{
450-
if (!collision.vtxITSTPC())
451-
return false;
452-
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 2);
453-
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 2, runIndex);
454-
455-
if (!collision.sbp())
456-
return false;
457-
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 3);
458-
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 3, runIndex);
452+
if (!isPO) {
453+
if (!collision.vtxITSTPC())
454+
return false;
455+
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 2);
456+
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 2, runIndex);
457+
458+
if (!collision.sbp())
459+
return false;
460+
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 3);
461+
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 3, runIndex);
462+
}
459463

460464
if (!collision.itsROFb())
461465
return false;
@@ -472,20 +476,26 @@ struct UpcRhoAnalysis {
472476
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 6);
473477
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 6, runIndex);
474478

475-
if (cutNumContribs && (collision.numContrib() > collisionsNumContribsMaxCut))
476-
return false;
477-
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 7);
478-
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 7, runIndex);
479+
if (cutNumContribs) {
480+
if (collision.numContrib() > collisionsNumContribsMaxCut)
481+
return false;
482+
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 7);
483+
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 7, runIndex);
484+
}
479485

480-
if (useRctFlag && !isGoodRctFlag(collision)) // check RCT flags
481-
return false;
482-
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 8);
483-
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 8, runIndex);
486+
if (useRctFlag) {
487+
if (!isGoodRctFlag(collision)) // check RCT flags
488+
return false;
489+
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 8);
490+
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 8, runIndex);
491+
}
484492

485-
if (useRecoFlag && (collision.flags() != cutRecoFlag)) // check reconstruction mode
486-
return false;
487-
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 9);
488-
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 9, runIndex);
493+
if (useRecoFlag) {
494+
if (collision.flags() != cutRecoFlag) // check reconstruction mode
495+
return false;
496+
rQC.fill(HIST("QC/collisions/hSelectionCounter"), 9);
497+
rQC.fill(HIST("QC/collisions/hSelectionCounterPerRun"), 9, runIndex);
498+
}
489499

490500
// if all selections passed
491501
return true;
@@ -547,10 +557,12 @@ struct UpcRhoAnalysis {
547557
rQC.fill(HIST("QC/tracks/hSelectionCounter"), 10);
548558
rQC.fill(HIST("QC/tracks/hSelectionCounterPerRun"), 10, runIndex);
549559

550-
if (requireTof && !track.hasTOF())
551-
return false;
552-
rQC.fill(HIST("QC/tracks/hSelectionCounter"), 11);
553-
rQC.fill(HIST("QC/tracks/hSelectionCounterPerRun"), 11, runIndex);
560+
if (requireTof) {
561+
if (!track.hasTOF())
562+
return false;
563+
rQC.fill(HIST("QC/tracks/hSelectionCounter"), 11);
564+
rQC.fill(HIST("QC/tracks/hSelectionCounterPerRun"), 11, runIndex);
565+
}
554566

555567
if (track.pt() < tracksMinPtCut)
556568
return false;

0 commit comments

Comments
 (0)