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
42 changes: 24 additions & 18 deletions DPG/Tasks/AOTEvent/timeDependentQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@
Configurable<int> confFlagCheckQoverPtHist{"FlagCheckQoverPtHist", 1, "0 - don't check , 1 - check"}; // o2-linter: disable=name/configurable (temporary fix)

// for O-O and Ne-Ne run
Configurable<int> confIncludeMultDistrVsTimeHistos{"IncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxNtracksForTimeDepDistributions{"MaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxZNACenergyForTimeDepDistributions{"MaxZNACenergyForTimeDepDistributions", 4000, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxT0ACamplForTimeDepDistributions{"MaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxV0AamplForTimeDepDistributions{"MaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<int> confIncludeMultDistrVsTimeHistos{"IncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxNtracksForTimeDepDistributions{"MaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxZNACenergyForTimeDepDistributions{"MaxZNACenergyForTimeDepDistributions", 4000, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxT0ACamplForTimeDepDistributions{"MaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<float> confMaxV0AamplForTimeDepDistributions{"MaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<int> confFlagUseGlobalTracksForTimeDepDistributions{"FlagUseGlobalTracksForTimeDepDistributions", 0, "0 - PV contributors , 1 - global tracks"}; // o2-linter: disable=name/configurable (temporary fix)
Configurable<int> confFlagUseGoodZvtxFT0vsPVForTimeDepDistributions{"FlagUseGoodZvtxFT0vsPVForTimeDepDistributions", 0, "0 - no , 1 - yes"}; // o2-linter: disable=name/configurable (temporary fix)

enum EvSelBitsToMonitor {
enCollisionsAll = 0,
Expand Down Expand Up @@ -189,7 +191,7 @@

int64_t tsSOR = 0; // dummy start-of-run timestamp
int64_t tsEOR = 1; // dummy end-of-run timestamp
if (runNumber >= 500000) {

Check failure on line 194 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), runNumber);
// first bc of the first orbit
bcSOR = runInfo.orbitSOR * nBCsPerOrbit;
Expand Down Expand Up @@ -262,8 +264,8 @@
histos.add("multDistributions/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});

// 2D vs time
histos.add("multDistributions/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
histos.add("multDistributions/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
histos.add("multDistributions/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
histos.add("multDistributions/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});

// now histos after kNoSameBunchPileup cut:
histos.add("multDistributionsNoPileup/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}});
Expand All @@ -280,8 +282,8 @@
histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});

// 2D vs time
histos.add("multDistributionsNoPileup/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
histos.add("multDistributionsNoPileup/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
histos.add("multDistributionsNoPileup/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
histos.add("multDistributionsNoPileup/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
}

// ### QA event selection bits
Expand Down Expand Up @@ -460,7 +462,7 @@
// phi holes vs time
const AxisSpec axisPhi{64, 0, TMath::TwoPi(), "#varphi"}; // o2-linter: disable=external-pi (temporary fix)
const AxisSpec axisEta{10, -0.8, 0.8, "#eta"};
if (confFlagFillPhiVsTimeHist == 2) {

Check failure on line 465 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.add("hSecondsITSlayer0vsPhi", "", kTH2F, {axisSeconds, axisPhi});
histos.add("hSecondsITSlayer1vsPhi", "", kTH2F, {axisSeconds, axisPhi});
histos.add("hSecondsITSlayer2vsPhi", "", kTH2F, {axisSeconds, axisPhi});
Expand Down Expand Up @@ -506,7 +508,7 @@
if (confTakeVerticesWithUPCsettings > 0) { // otherwise analyse all collisions
if (confTakeVerticesWithUPCsettings == 1 && isVertexUPC) // reject vertices with UPC settings
continue;
if (confTakeVerticesWithUPCsettings == 2 && !isVertexUPC) // we want to select vertices with UPC settings --> reject vertices reconstructed with "normal" settings

Check failure on line 511 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
// LOGP(info, "flags={} nTracks = {}", flags, tracks.size());
}
Expand All @@ -525,7 +527,7 @@

histos.fill(HIST("hSecondsUPCverticesBeforeAllCuts"), secFromSOR, isVertexUPC ? 1 : 0);

if (std::fabs(col.posZ()) > 10)

Check failure on line 530 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;

histos.fill(HIST("hSecondsUPCverticesBeforeSel8"), secFromSOR, isVertexUPC ? 1 : 0);
Expand Down Expand Up @@ -577,13 +579,13 @@
bool isLowOccupStdAlsoInPrevRof = isLowOccupStd && col.selection_bit(kNoHighMultCollInPrevRof);
histos.fill(HIST("hSecondsEventSelBits"), secFromSOR, enIsLowOccupStdAlsoInPrevRof, isLowOccupStdAlsoInPrevRof);

bool isLowOccupStdCut500 = isLowOccupStd && occupByTracks >= 0 && occupByTracks < 500;

Check failure on line 582 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("hSecondsEventSelBits"), secFromSOR, enIsLowOccupStdCut500, isLowOccupStdCut500);

bool isLowOccupStdCut2000 = isLowOccupStd && occupByTracks >= 0 && occupByTracks < 2000;

Check failure on line 585 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("hSecondsEventSelBits"), secFromSOR, enIsLowOccupStdCut2000, isLowOccupStdCut2000);

bool isLowOccupStdCut4000 = isLowOccupStd && occupByTracks >= 0 && occupByTracks < 4000;

Check failure on line 588 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("hSecondsEventSelBits"), secFromSOR, enIsLowOccupStdCut4000, isLowOccupStdCut4000);

bool isLowOccupStdAlsoInPrevRofCut2000noDeadStaves = isLowOccupStdCut2000 && col.selection_bit(kNoHighMultCollInPrevRof) && col.selection_bit(kIsGoodITSLayersAll);
Expand Down Expand Up @@ -621,10 +623,11 @@
// ##### track loop
auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex());
int nPVtracks = 0;
int nGlobalTracks = 0;
for (const auto& track : tracksGrouped) {
// if (!track.hasTPC() || !track.hasITS())
// continue;
if (std::fabs(track.eta()) > 0.8 || std::fabs(track.pt()) < 0.2)

Check failure on line 630 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;

double dcaR = track.dcaXY();
Expand Down Expand Up @@ -686,8 +689,9 @@

// ### global tracks
float dedx = track.tpcSignal();
if (track.isGlobalTrack()) { // A side
if (track.tgl() > 0.) {
if (track.isGlobalTrack()) {
nGlobalTracks++;
if (track.tgl() > 0.) { // A side
histos.fill(HIST("A/global/hDcaRafterCuts"), dcaR);
histos.fill(HIST("A/global/hDcaZafterCuts"), dcaZ);

Expand All @@ -708,7 +712,7 @@
if (track.tpcNClsFound() >= confCutOnNtpcClsForSharedFractAndDeDxCalc) {
histos.fill(HIST("A/global/hSecondsTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
histos.fill(HIST("A/global/hSeconds2DTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
if (dedx < 1.e4) // protection from weird values

Check failure on line 715 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("A/global/hSecondsDeDx"), secFromSOR, dedx);
}

Expand All @@ -729,7 +733,7 @@
if (track.tpcNClsFound() >= confCutOnNtpcClsForSharedFractAndDeDxCalc) {
histos.fill(HIST("A/globalPV/hSecondsTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
histos.fill(HIST("A/globalPV/hSeconds2DTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
if (dedx < 1.e4) // protection from weird values

Check failure on line 736 in DPG/Tasks/AOTEvent/timeDependentQa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histos.fill(HIST("A/globalPV/hSecondsDeDx"), secFromSOR, dedx);
}
}
Expand Down Expand Up @@ -820,10 +824,12 @@
} // end of track loop

// fill mult distributions vs time
if (confIncludeMultDistrVsTimeHistos) {
if (confIncludeMultDistrVsTimeHistos && (!confFlagUseGoodZvtxFT0vsPVForTimeDepDistributions ? true : col.selection_bit(kIsGoodZvtxFT0vsPV))) {
bool noPileup = col.selection_bit(kNoSameBunchPileup);

histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nPVtracks);
int nTracksForTimeDep = confFlagUseGlobalTracksForTimeDepDistributions ? nGlobalTracks : nPVtracks;

histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nTracksForTimeDep);

// ZNA,C
// float multZNA = bc.has_zdc() ? bc.zdc().energyCommonZNA() : -999.f;
Expand All @@ -847,8 +853,8 @@
if (ZNsumAmpl > 0)
histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl);

histos.fill(HIST("multDistributions/hSecondsNPVvsZNAampl"), secFromSOR, nPVtracks, ZNAampl);
histos.fill(HIST("multDistributions/hSecondsNPVvsZNCampl"), secFromSOR, nPVtracks, ZNCampl);
histos.fill(HIST("multDistributions/hSecondsNPVvsZNAampl"), secFromSOR, nTracksForTimeDep, ZNAampl);
histos.fill(HIST("multDistributions/hSecondsNPVvsZNCampl"), secFromSOR, nTracksForTimeDep, ZNCampl);

// FT0A,C, V0A
// float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f;
Expand All @@ -858,7 +864,7 @@
histos.fill(HIST("multDistributions/hSecondsDistrV0A"), secFromSOR, col.multFV0A());

if (noPileup) {
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrPVtracks"), secFromSOR, nPVtracks);
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrPVtracks"), secFromSOR, nTracksForTimeDep);

histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNA"), secFromSOR, col.multZNA());
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNC"), secFromSOR, col.multZNC());
Expand All @@ -872,8 +878,8 @@
if (ZNsumAmpl > 0)
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl);

histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNAampl"), secFromSOR, nPVtracks, ZNAampl);
histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNCampl"), secFromSOR, nPVtracks, ZNCampl);
histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNAampl"), secFromSOR, nTracksForTimeDep, ZNAampl);
histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNCampl"), secFromSOR, nTracksForTimeDep, ZNCampl);

//
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrT0A"), secFromSOR, col.multFT0A());
Expand Down
Loading