Skip to content

Commit bed2daa

Browse files
[PWGCF] Identified BF Added purity histograms for genereated particles, added track time histograms (#10890)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 5b64451 commit bed2daa

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

PWGCF/TwoParticleCorrelations/TableProducer/identifiedBfFilter.cxx

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ bool loadfromccdb = false;
7878

7979
std::vector<int> recoIdMethods = {0, 1, 2}; // Reconstructed PID Methods, 0 is no PID, 1 is calculated PID, 2 is MC PID
8080
std::vector<int> trackTypes = {0, 1, 2, 3};
81+
const int twoDenom = 2; // Used to test if a value is even or odd
8182

8283
//============================================================================================
8384
// The IdentifiedBfFilter histogram objects
@@ -136,7 +137,8 @@ TH2F* fhdEdxB = nullptr;
136137
TH2F* fhdEdxIPTPCB = nullptr;
137138
TH2F* fhdEdxA[kIdBfNoOfSpecies + 2] = {nullptr};
138139
TH2F* fhdEdxIPTPCA[kIdBfNoOfSpecies + 2] = {nullptr};
139-
TH2F* fhTrackTime[kIdBfNoOfSpecies + 2] = {nullptr};
140+
TH2F* fhTrackTimeA[kIdBfNoOfSpecies + 2] = {nullptr};
141+
TH2F* fhTrackBetaA[kIdBfNoOfSpecies + 2] = {nullptr};
140142

141143
TH1F* fhMassB = nullptr;
142144
TH1F* fhMassA[kIdBfNoOfSpecies + 1] = {nullptr};
@@ -895,13 +897,26 @@ struct IdentifiedBfFilterTracks {
895897
fhdEdxIPTPCA[sp] = new TH2F(TString::Format("fhdEdxIPTPCA_%s", speciesName[sp]).Data(),
896898
TString::Format("dE/dx vs P_{IP} reconstructed %s; P (GeV/c); dE/dx (a.u.)", speciesTitle[sp]).Data(),
897899
ptbins, ptlow, ptup, 1000, 0.0, 1000.0);
900+
fhTrackTimeA[sp] = new TH2F(TString::Format("fhTrackTimeA_%s", speciesName[sp]).Data(),
901+
TString::Format("Track Time vs P_{IP} reconstructed %s; P (GeV/c); Track Time(ns)", speciesTitle[sp]).Data(),
902+
ptbins, ptlow, ptup, 1000, 0.0, 10.0);
903+
fhTrackBetaA[sp] = new TH2F(TString::Format("fhTrackBetaA_%s", speciesName[sp]).Data(),
904+
TString::Format("1/#Beta vs P_{IP} reconstructed %s; P (GeV/c); 1/#Beta(ns/m)", speciesTitle[sp]).Data(),
905+
ptbins, ptlow, ptup, 1000, 0.0, 10.0);
898906
}
899907
fhdEdxA[kIdBfNoOfSpecies + 1] = new TH2F(TString::Format("fhdEdxA_WrongSpecies").Data(),
900908
TString::Format("dE/dx vs P reconstructed Wrong Species; P (GeV/c); dE/dx (a.u.)").Data(),
901909
ptbins, ptlow, ptup, 1000, 0.0, 1000.0);
902910
fhdEdxIPTPCA[kIdBfNoOfSpecies + 1] = new TH2F(TString::Format("fhdEdxIPTPCA_WrongSpecies").Data(),
903911
TString::Format("dE/dx vs P_{IP} reconstructed Wrong Species; P (GeV/c); dE/dx (a.u.)").Data(),
904912
ptbins, ptlow, ptup, 1000, 0.0, 1000.0);
913+
fhTrackTimeA[kIdBfNoOfSpecies + 1] = new TH2F(TString::Format("fhTrackTimeA_WrongSpecies").Data(),
914+
TString::Format("Track Time vs P_{IP} reconstructed Wrong Species; P (GeV/c); Track Time(ns)").Data(),
915+
ptbins, ptlow, ptup, 1000, 0.0, 10.0);
916+
fhTrackBetaA[kIdBfNoOfSpecies + 1] = new TH2F(TString::Format("fhTrackBetaA_WrongSpecies").Data(),
917+
TString::Format("1/#Beta vs P_{IP} reconstructed Wrong Species; P (GeV/c); 1/#Beta(ns/m)").Data(),
918+
ptbins, ptlow, ptup, 1000, 0.0, 10.0);
919+
905920
/* add the hstograms to the output list */
906921
fOutputList->Add(fhXYB);
907922
fOutputList->Add(fhYZB);
@@ -963,9 +978,13 @@ struct IdentifiedBfFilterTracks {
963978
fOutputList->Add(fhDeltaNA[sp]);
964979
fOutputList->Add(fhdEdxA[sp]);
965980
fOutputList->Add(fhdEdxIPTPCA[sp]);
981+
fOutputList->Add(fhTrackTimeA[sp]);
982+
fOutputList->Add(fhTrackBetaA[sp]);
966983
}
967984
fOutputList->Add(fhdEdxA[kIdBfNoOfSpecies + 1]);
968985
fOutputList->Add(fhdEdxIPTPCA[kIdBfNoOfSpecies + 1]);
986+
fOutputList->Add(fhTrackTimeA[kIdBfNoOfSpecies + 1]);
987+
fOutputList->Add(fhTrackBetaA[kIdBfNoOfSpecies + 1]);
969988
}
970989

971990
if ((fDataType != kData) && (fDataType != kDataNoEvtSel)) {
@@ -1145,10 +1164,10 @@ struct IdentifiedBfFilterTracks {
11451164
if (!(pid < 0)) {
11461165
naccepted++;
11471166
/* update charged multiplicities */
1148-
if (pid % 2 == 0) {
1167+
if (pid % twoDenom == trackTypes[0]) {
11491168
trkMultPos[kIdBfCharged]++;
11501169
}
1151-
if (pid % 2 == 1) {
1170+
if (pid % twoDenom == trackTypes[1]) {
11521171
trkMultNeg[kIdBfCharged]++;
11531172
}
11541173
if (fullDerivedData) {
@@ -1567,6 +1586,8 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::identifyTrack(TrackObject c
15671586
fhWrongTrackID->Fill(track.p());
15681587
fhdEdxA[kIdBfNoOfSpecies]->Fill(track.p(), track.tpcSignal());
15691588
fhdEdxIPTPCA[kIdBfNoOfSpecies]->Fill(track.tpcInnerParam(), track.tpcSignal());
1589+
fhTrackTimeA[kIdBfNoOfSpecies]->Fill(track.tpcInnerParam(), track.trackTime());
1590+
fhTrackBetaA[kIdBfNoOfSpecies]->Fill(track.tpcInnerParam(), track.trackTime() / track.length());
15701591
fhDoublePID->Fill(spMinNSigma, spDouble);
15711592
return kWrongSpecies; // Return wrong species value
15721593
} else {
@@ -1658,7 +1679,13 @@ inline int8_t IdentifiedBfFilterTracks::acceptParticle(ParticleObject& particle,
16581679
}
16591680

16601681
if (ptlow < particle.pt() && particle.pt() < ptup && etalow < particle.eta() && particle.eta() < etaup) {
1661-
MatchRecoGenSpecies sp = identifyParticle(particle);
1682+
MatchRecoGenSpecies sp;
1683+
if (recoIdMethod == recoIdMethods[0]) {
1684+
sp = kIdBfCharged;
1685+
}
1686+
if (recoIdMethod == recoIdMethods[1]) {
1687+
sp = identifyParticle(particle);
1688+
}
16621689
if (sp != kWrongSpecies) {
16631690
if (sp != kIdBfCharged) {
16641691
/* fill the charged particle histograms */
@@ -1809,6 +1836,8 @@ void IdentifiedBfFilterTracks::fillTrackHistosAfterSelection(TrackObject const&
18091836
fhPtA[sp]->Fill(track.pt());
18101837
fhdEdxA[sp]->Fill(track.p(), track.tpcSignal());
18111838
fhdEdxIPTPCA[sp]->Fill(track.tpcInnerParam(), track.tpcSignal());
1839+
fhTrackTimeA[sp]->Fill(track.tpcInnerParam(), track.trackTime());
1840+
fhTrackBetaA[sp]->Fill(track.tpcInnerParam(), track.trackTime() / track.length());
18121841
if (track.sign() > 0) {
18131842
fhPtPosA[sp]->Fill(track.pt());
18141843
fhPtEtaPosA[sp]->Fill(track.pt(), track.eta());

PWGCF/TwoParticleCorrelations/Tasks/identifiedbf.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ struct IdentifiedbfTask {
280280
} else {
281281
fhN1VsZEtaPhiPtSecondary[track.trackacceptedid()]->Fill(zvtx, getEtaPhiIndex(track) + 0.5, track.pt(), corr);
282282
}
283+
} else if constexpr (framework::has_type_v<aod::mcparticle::McCollisionId, typename TrackObject::all_columns>) {
284+
if (isPrimaryCheck(track)) {
285+
fhN1VsZEtaPhiPtPrimary[track.trackacceptedid()]->Fill(zvtx, getEtaPhiIndex(track) + 0.5, track.pt(), corr);
286+
} else {
287+
fhN1VsZEtaPhiPtSecondary[track.trackacceptedid()]->Fill(zvtx, getEtaPhiIndex(track) + 0.5, track.pt(), corr);
288+
}
283289
}
284290
}
285291

0 commit comments

Comments
 (0)