Skip to content
Merged

lg #31

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fcd4dfe
add the selection for the global track without DCA (#1014)
zhangbiao-phy Jul 18, 2022
e6a6ace
PWGHF: Fix typo (#1015)
fgrosa Jul 18, 2022
a82b9b1
Event mixing: Update binning policy, add example for binning with lam…
saganatt Jul 19, 2022
74c2f14
Fix typo (#1017)
fgrosa Jul 19, 2022
9275993
PWGLF: use track selection without kinematic cuts (#1018)
mario-krueger Jul 19, 2022
e2f2256
PWGHF: Adding Bayesian PID selections in the Lc->pKpi selector task (…
DelloStritto Jul 19, 2022
184501f
V0 workflows - fix finder for run3 and fix feeddown in analyser and a…
aimeric-landou Jul 19, 2022
08a1711
QA Efficiency: Extend available track cuts (#1024)
njacazio Jul 19, 2022
d8e2466
make the rejection of tracks not propagated to PV optional (#1023)
lauraser Jul 20, 2022
c717e1d
Added evsel QA for periods with INT1 minbias condition (#991)
ekryshen Jul 20, 2022
1a49c9c
PWGDQ/Tasks: update on v0selector (#1003)
dsekihat Jul 20, 2022
0ce73eb
DPG: dEdx residuals from splines LHC22cd (lite). (#1028)
mfaggin Jul 20, 2022
2bb4ff3
PWGLF: fix typos in configurable names (#1031)
mario-krueger Jul 20, 2022
f303a18
Changed the boundaries of Zvtx Axis (#1030)
sarahherrmann Jul 20, 2022
9ac213e
More cut and signal definition + nb of its clusters for Run 3 (#1027)
rbailhac Jul 21, 2022
3e7d20d
Developments of data model and tasks for skimming and candidates crea…
nburmaso Jul 21, 2022
2179cd0
PWGHF: Add more checks on collision association probability (#1032)
fgrosa Jul 21, 2022
78a1657
Fix building issues with NucleiTask (#1034)
giovannimalfattore Jul 21, 2022
4ade33b
Eta histos wider limits (now -2,2) (#1037)
rosarioturrisi Jul 21, 2022
4047552
Fix MegaLinter workflow location
TimoWilken Jul 21, 2022
d1f54f1
PWGHF: Minor modifications (#1035)
fgrosa Jul 21, 2022
768cbcf
PWGLF: move free-floating Preslice<> into task (#1040)
mario-krueger Jul 21, 2022
0e288dd
Add antiparticle histograms in light antinuclei analysis (#1043)
giovannimalfattore Jul 22, 2022
4ac46a4
Extend DPG tools (#1044)
njacazio Jul 22, 2022
c75ea5d
Add vs Zvtx histograms (#1045)
njacazio Jul 22, 2022
1405e19
DPG: test correct track-to-collision matching with MC info. (#1047)
mfaggin Jul 22, 2022
f378ef9
PWGHF: Update Xic task (#1012)
JinjooSeo Jul 22, 2022
84a6d4d
PWGHF: add information about Zvtx residual in histos for collision as…
fgrosa Jul 22, 2022
ab0b24c
PWGHF: Add Lb tree creator (#994)
mjongerh Jul 22, 2022
70e93d9
Femtoworld (#1011)
zchochul Jul 24, 2022
817e57b
DPG: add per-event qa plots for mismatched tracks (MC). (#1050)
mfaggin Jul 25, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.github.io/flavors/
uses: megalinter/megalinter@v5
uses: oxsecurity/megalinter@v5
env:
# All available variables are described in documentation
# https://megalinter.github.io/configuration/
Expand Down
2 changes: 1 addition & 1 deletion Common/CCDB/EventSelectionParams.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const char* selectionLabels[kNsel] = {
"kNoInconsistentVtx",
"kNoPileupInMultBins",
"kNoPilupMV",
"kNoPileupTPC"
"kNoPileupTPC",
"kIsTriggerTVX",
"kIsINT1"};
}
Expand Down
80 changes: 78 additions & 2 deletions Common/Core/TrackSelectorPID.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class TrackSelectorPID

/// Standard constructor with PDG code initialisation
explicit TrackSelectorPID(int pdg)
: mPdg(std::abs(pdg))
{
setPDG(pdg);
}

/// Default destructor
Expand All @@ -46,7 +46,36 @@ class TrackSelectorPID
PIDAccepted
};

void setPDG(int pdg) { mPdg = std::abs(pdg); }
void setPDG(int pdg)
{
mPdg = std::abs(pdg);
switch (mPdg) {
case kElectron: {
mSpecies = track::PID::Electron;
break;
}
case kMuonMinus: {
mSpecies = track::PID::Muon;
break;
}
case kPiPlus: {
mSpecies = track::PID::Pion;
break;
}
case kKPlus: {
mSpecies = track::PID::Kaon;
break;
}
case kProton: {
mSpecies = track::PID::Proton;
break;
}
default: {
LOGF(error, "ERROR: Species not implemented for PDG %d", mPdg);
assert(false);
}
}
}

// TPC

Expand Down Expand Up @@ -477,8 +506,51 @@ class TrackSelectorPID
return isSelRICH || isSelTOF;
}

/// Set pT range where Bayes PID is applicable.
void setRangePtBayes(float ptMin, float ptMax)
{
mPtBayesMin = ptMin;
mPtBayesMax = ptMax;
}

/// Checks if track is OK for Bayesian PID.
/// \param track track
/// \return true if track is OK for Bayesian PID
template <typename T>
bool isValidTrackBayesPID(const T& track)
{
auto pt = track.pt();
return (mPtBayesMin <= pt && pt <= mPtBayesMax);
}

/// Bayesian maximum probability algorithm.
template <typename T>
bool isSelectedTrackBayesPID(const T& track)
{
// Get index of the most probable species for a given track.
return track.bayesID() == mSpecies;
}

/// Returns status of Bayesian PID selection for a given track.
/// \param track track
/// \return Bayesian selection status (see TrackSelectorPID::Status)
template <typename T>
int getStatusTrackBayesPID(const T& track)
{
if (isValidTrackBayesPID(track)) {
if (isSelectedTrackBayesPID(track)) {
return Status::PIDAccepted; // accepted
} else {
return Status::PIDRejected; // rejected
}
} else {
return Status::PIDNotApplicable; // PID not applicable
}
}

private:
uint mPdg = kPiPlus; ///< PDG code of the expected particle
uint mSpecies = track::PID::Pion; ///< Expected species of the track

// TPC
float mPtTPCMin = 0.; ///< minimum pT for TPC PID [GeV/c]
Expand All @@ -503,6 +575,10 @@ class TrackSelectorPID
float mNSigmaRICHMax = 3.; ///< maximum number of RICH σ
float mNSigmaRICHMinCondTOF = -1000.; ///< minimum number of RICH σ if combined with TOF
float mNSigmaRICHMaxCondTOF = 1000.; ///< maximum number of RICH σ if combined with TOF

// Bayesian
float mPtBayesMin = 0.; ///< minimum pT for Bayesian PID [GeV/c]
float mPtBayesMax = 100.; ///< maximum pT for Bayesian PID [GeV/c]
};

#endif // O2_ANALYSIS_TRACKSELECTORPID_H_
14 changes: 8 additions & 6 deletions Common/TableProducer/eventSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ struct BcSelectionTask {
selection[kNoPileupMV] = (eventCuts & 1 << aod::kPileUpMV) > 0;
selection[kNoPileupTPC] = (eventCuts & 1 << aod::kTPCPileUp) > 0;
selection[kIsTriggerTVX] = bc.has_ft0() ? (bc.ft0().triggerMask() & BIT(o2::ft0::Triggers::bitVertex)) > 0 : 0;
selection[kIsINT1] = bbV0A || bbV0C || ofSPD > 0;

int32_t foundFT0 = bc.has_ft0() ? bc.ft0().globalIndex() : -1;
int32_t foundFV0 = bc.has_fv0a() ? bc.fv0a().globalIndex() : -1;
Expand Down Expand Up @@ -383,16 +384,17 @@ struct EventSelectionTask {
sel7 &= applySelection[i] ? selection[i] : 1;
}

// TODO apply other cuts for sel8
// TODO introduce sel1 etc?
// TODO introduce array of sel[0]... sel[8] or similar?
bool sel8 = selection[kIsBBT0A] & selection[kIsBBT0C];
bool sel8 = selection[kIsBBT0A] & selection[kIsBBT0C]; // TODO apply other cuts for sel8
bool sel1 = selection[kIsINT1] & selection[kNoBGV0A] & selection[kNoBGV0C] & selection[kNoTPCLaserWarmUp] & selection[kNoTPCHVdip];

// fill counters
// INT1 (SPDFO>0 | V0A | V0C) mimimum bias trigger logic used in pp2010 and pp2011
bool isINT1period = bc.runNumber() <= 136377 || (bc.runNumber() >= 144871 && bc.runNumber() <= 159582);

if (isMC || alias[kINT7]) {
// fill counters
if (isMC || (!isINT1period && alias[kINT7]) || (isINT1period && alias[kINT1])) {
histos.get<TH1>(HIST("hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1);
if (sel7) {
if ((!isINT1period && sel7) || (isINT1period && sel1)) {
histos.get<TH1>(HIST("hColCounterAcc"))->Fill(Form("%d", bc.runNumber()), 1);
}
}
Expand Down
20 changes: 15 additions & 5 deletions Common/Tasks/eventSelectionQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,15 @@ struct EventSelectionQaTask {
aod::FT0s const& ft0s,
aod::FDDs const& fdds)
{
bool isINT1period = 0;
if (!applySelection) {
auto first_bc = bcs.iteratorAt(0);
EventSelectionParams* par = ccdb->getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", first_bc.timestamp());
applySelection = par->GetSelection(0);
for (int i = 0; i < kNsel; i++) {
histos.get<TH1>(HIST("hSelMask"))->SetBinContent(i + 1, applySelection[i]);
}
isINT1period = first_bc.runNumber() <= 136377 || (first_bc.runNumber() >= 144871 && first_bc.runNumber() <= 159582);
}

// bc-based event selection qa
Expand All @@ -245,19 +247,24 @@ struct EventSelectionQaTask {

// collision-based event selection qa
for (auto& col : cols) {
auto selection = col.selection();
bool sel1 = selection[kIsINT1] & selection[kNoBGV0A] & selection[kNoBGV0C] & selection[kNoTPCLaserWarmUp] & selection[kNoTPCHVdip];

for (int iAlias = 0; iAlias < kNaliases; iAlias++) {
if (!col.alias()[iAlias]) {
continue;
}
histos.fill(HIST("hColCounterAll"), iAlias, 1);
if (!col.sel7()) {
continue;
if ((!isINT1period && col.sel7()) || (isINT1period && sel1)) {
histos.fill(HIST("hColCounterAcc"), iAlias, 1);
}
histos.fill(HIST("hColCounterAcc"), iAlias, 1);
}

bool mb = isMC;
mb |= !isINT1period && col.alias()[kINT7];
mb |= isINT1period && col.alias()[kINT1];
// further checks just on minimum bias triggers
if (!isMC && !col.alias()[kINT7]) {
if (!mb) {
continue;
}
for (int i = 0; i < kNsel; i++) {
Expand Down Expand Up @@ -354,7 +361,10 @@ struct EventSelectionQaTask {
histos.fill(HIST("hV0C012vsTklCol"), nTracklets, multRingV0C012);

// filling plots for accepted events
if (!col.sel7()) {
bool accepted = 0;
accepted |= !isINT1period & col.sel7();
accepted |= isINT1period & sel1;
if (!accepted) {
continue;
}

Expand Down
57 changes: 39 additions & 18 deletions DPG/Tasks/qaEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ struct QaEfficiency {
Configurable<bool> doTr{"do-tr", false, "Flag to run with the PDG code of tritons"};
Configurable<bool> doHe{"do-he", false, "Flag to run with the PDG code of helium 3"};
Configurable<bool> doAl{"do-al", false, "Flag to run with the PDG code of helium 4"};
// Track only selection
Configurable<bool> applyTrackSelection{"applyTrackSelection", false, "Flag to use the standard track selection when selecting numerator and denominator"};
// Track only selection, options to select only specific tracks
Configurable<int> trackSelection{"trackSelection", 1, "Track selection: 0 -> No Cut, 1 -> kGlobalTrack, 2 -> kGlobalTrackWoPtEta, 3 -> kGlobalTrackWoDCA, 4 -> kQualityTracks, 5 -> kInAcceptanceTracks"};
// Event selection
Configurable<int> nMinNumberOfContributors{"nMinNumberOfContributors", 2, "Minimum required number of contributors to the primary vertex"};
Configurable<float> vertexZMin{"vertex-z-min", -10.f, "Minimum position of the generated vertez in Z (cm)"};
Expand Down Expand Up @@ -142,10 +142,10 @@ struct QaEfficiency {
"MC/ka/pos/prm/pt/num", "MC/pr/pos/prm/pt/num", "MC/de/pos/prm/pt/num",
"MC/tr/pos/prm/pt/num", "MC/he/pos/prm/pt/num", "MC/al/pos/prm/pt/num",
"MC/all/pos/prm/pt/num",
"MC/el/den/prm/pt/num", "MC/mu/den/prm/pt/num", "MC/pi/den/prm/pt/num",
"MC/ka/den/prm/pt/num", "MC/pr/den/prm/pt/num", "MC/de/den/prm/pt/num",
"MC/tr/den/prm/pt/num", "MC/he/den/prm/pt/num", "MC/al/den/prm/pt/num",
"MC/all/den/prm/pt/num"};
"MC/el/neg/prm/pt/num", "MC/mu/neg/prm/pt/num", "MC/pi/neg/prm/pt/num",
"MC/ka/neg/prm/pt/num", "MC/pr/neg/prm/pt/num", "MC/de/neg/prm/pt/num",
"MC/tr/neg/prm/pt/num", "MC/he/neg/prm/pt/num", "MC/al/neg/prm/pt/num",
"MC/all/neg/prm/pt/num"};
static constexpr std::string_view hPtPrmNumTrk[nHistograms] = {"MC/el/sum/prm/pt/numtrk", "MC/mu/sum/prm/pt/numtrk", "MC/pi/sum/prm/pt/numtrk",
"MC/ka/sum/prm/pt/numtrk", "MC/pr/sum/prm/pt/numtrk", "MC/de/sum/prm/pt/numtrk",
"MC/tr/sum/prm/pt/numtrk", "MC/he/sum/prm/pt/numtrk", "MC/al/sum/prm/pt/numtrk",
Expand Down Expand Up @@ -191,10 +191,10 @@ struct QaEfficiency {
"MC/ka/pos/dec/pt/num", "MC/pr/pos/dec/pt/num", "MC/de/pos/dec/pt/num",
"MC/tr/pos/dec/pt/num", "MC/he/pos/dec/pt/num", "MC/al/pos/dec/pt/num",
"MC/all/pos/dec/pt/num",
"MC/el/den/dec/pt/num", "MC/mu/den/dec/pt/num", "MC/pi/den/dec/pt/num",
"MC/ka/den/dec/pt/num", "MC/pr/den/dec/pt/num", "MC/de/den/dec/pt/num",
"MC/tr/den/dec/pt/num", "MC/he/den/dec/pt/num", "MC/al/den/dec/pt/num",
"MC/all/den/dec/pt/num"};
"MC/el/neg/dec/pt/num", "MC/mu/neg/dec/pt/num", "MC/pi/neg/dec/pt/num",
"MC/ka/neg/dec/pt/num", "MC/pr/neg/dec/pt/num", "MC/de/neg/dec/pt/num",
"MC/tr/neg/dec/pt/num", "MC/he/neg/dec/pt/num", "MC/al/neg/dec/pt/num",
"MC/all/neg/dec/pt/num"};
static constexpr std::string_view hPtDecNumTrk[nHistograms] = {"MC/el/sum/dec/pt/numtrk", "MC/mu/sum/dec/pt/numtrk", "MC/pi/sum/dec/pt/numtrk",
"MC/ka/sum/dec/pt/numtrk", "MC/pr/sum/dec/pt/numtrk", "MC/de/sum/dec/pt/numtrk",
"MC/tr/sum/dec/pt/numtrk", "MC/he/sum/dec/pt/numtrk", "MC/al/sum/dec/pt/numtrk",
Expand Down Expand Up @@ -240,10 +240,10 @@ struct QaEfficiency {
"MC/ka/pos/mat/pt/num", "MC/pr/pos/mat/pt/num", "MC/de/pos/mat/pt/num",
"MC/tr/pos/mat/pt/num", "MC/he/pos/mat/pt/num", "MC/al/pos/mat/pt/num",
"MC/all/pos/mat/pt/num",
"MC/el/den/mat/pt/num", "MC/mu/den/mat/pt/num", "MC/pi/den/mat/pt/num",
"MC/ka/den/mat/pt/num", "MC/pr/den/mat/pt/num", "MC/de/den/mat/pt/num",
"MC/tr/den/mat/pt/num", "MC/he/den/mat/pt/num", "MC/al/den/mat/pt/num",
"MC/all/den/mat/pt/num"};
"MC/el/neg/mat/pt/num", "MC/mu/neg/mat/pt/num", "MC/pi/neg/mat/pt/num",
"MC/ka/neg/mat/pt/num", "MC/pr/neg/mat/pt/num", "MC/de/neg/mat/pt/num",
"MC/tr/neg/mat/pt/num", "MC/he/neg/mat/pt/num", "MC/al/neg/mat/pt/num",
"MC/all/neg/mat/pt/num"};
static constexpr std::string_view hPtMatNumTrk[nHistograms] = {"MC/el/sum/mat/pt/numtrk", "MC/mu/sum/mat/pt/numtrk", "MC/pi/sum/mat/pt/numtrk",
"MC/ka/sum/mat/pt/numtrk", "MC/pr/sum/mat/pt/numtrk", "MC/de/sum/mat/pt/numtrk",
"MC/tr/sum/mat/pt/numtrk", "MC/he/sum/mat/pt/numtrk", "MC/al/sum/mat/pt/numtrk",
Expand Down Expand Up @@ -1094,6 +1094,27 @@ struct QaEfficiency {
isCollisionSelected<true>(collision);
}

// Function to apply track selection
template <typename trackType>
bool isTrackSelected(trackType track)
{
switch (trackSelection.value) {
case 0:
return true;
case 1:
return track.isGlobalTrack();
case 2:
return track.isGlobalTrackWoPtEta();
case 3:
return track.isGlobalTrackWoDCA();
case 4:
return track.isQualityTrack();
case 5:
return track.isInAcceptanceTrack();
}
return false;
}

// MC process
void processMC(const o2::aod::McParticles& mcParticles,
const o2::soa::Join<o2::aod::Collisions, o2::aod::McCollisionLabels, o2::aod::EvSels>& collisions,
Expand Down Expand Up @@ -1165,14 +1186,14 @@ struct QaEfficiency {
}

histos.fill(HIST("MC/trackSelection"), 10);
if (applyTrackSelection && !track.isGlobalTrack()) { // Check general cuts
if (!isTrackSelected(track)) { // Check general cuts
continue;
}
histos.fill(HIST("MC/trackSelection"), 11);
histos.fill(HIST("MC/trackSelection"), 9);
if (!track.has_collision()) {
continue;
}
histos.fill(HIST("MC/trackSelection"), 12);
histos.fill(HIST("MC/trackSelection"), 10);
// Filling variable histograms
histos.fill(HIST("MC/trackLength"), track.length());
if (doEl) {
Expand Down Expand Up @@ -1347,7 +1368,7 @@ struct QaEfficiency {
continue;
}
histos.fill(HIST("Data/trackSelection"), 4);
if (applyTrackSelection) { // Check general cuts
if (trackSelection.value > 0) { // Check general cuts
if (!track.passedTrackType()) {
continue;
}
Expand Down
Loading