Skip to content

Commit 39a53e1

Browse files
authored
Merge branch 'AliceO2Group:master' into pjpsi_femto
2 parents cb14437 + c540972 commit 39a53e1

File tree

5 files changed

+129
-83
lines changed

5 files changed

+129
-83
lines changed

PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace o2::aod
6060

6161
namespace gen_ebyecolltable
6262
{
63-
DECLARE_SOA_COLUMN(CentralityGen, centralityGen, uint8_t);
63+
DECLARE_SOA_COLUMN(CentralityGen, centralityGen, float);
6464
DECLARE_SOA_COLUMN(NetProtNoGen, netProtNoGen, float); //! net proton no. in an event
6565
DECLARE_SOA_COLUMN(ProtNoGen, protNoGen, float); //! proton no. in an event
6666
DECLARE_SOA_COLUMN(AntiProtNoGen, antiProtNoGen, float); //! antiproton no. in an event
@@ -75,31 +75,35 @@ using ProtGenCollEbyeTable = ProtGenCollEbyeTables::iterator;
7575

7676
namespace rec_ebyecolltable
7777
{
78-
DECLARE_SOA_COLUMN(CentralityRec, centralityRec, uint8_t);
78+
DECLARE_SOA_COLUMN(CentralityRec, centralityRec, float);
7979
DECLARE_SOA_COLUMN(NetProtNoRec, netProtNoRec, float); //! net proton no. in an event
8080
DECLARE_SOA_COLUMN(ProtNoRec, protNoRec, float); //! proton no. in an event
8181
DECLARE_SOA_COLUMN(AntiProtNoRec, antiProtNoRec, float); //! antiproton no. in an event
8282
} // namespace rec_ebyecolltable
8383

8484
DECLARE_SOA_TABLE(ProtRecCollEbyeTables, "AOD", "PROTRECCOLLEBYETABLE",
85-
o2::soa::Index<>,
8685
rec_ebyecolltable::CentralityRec,
8786
rec_ebyecolltable::NetProtNoRec,
8887
rec_ebyecolltable::ProtNoRec,
8988
rec_ebyecolltable::AntiProtNoRec);
9089
using ProtRecCollEbyeTable = ProtRecCollEbyeTables::iterator;
9190

91+
DECLARE_SOA_TABLE(ProtRecCollTables, "AOD", "PROTRECCOLLTABLE",
92+
o2::soa::Index<>,
93+
rec_ebyecolltable::CentralityRec);
94+
using ProtRecCollTable = ProtRecCollTables::iterator;
95+
9296
namespace rec_ebyetracktable
9397
{
94-
DECLARE_SOA_INDEX_COLUMN(ProtRecCollEbyeTable, protRecCollEbyeTable);
98+
DECLARE_SOA_INDEX_COLUMN(ProtRecCollTable, protRecCollTable);
9599
DECLARE_SOA_COLUMN(Pt, pt, float);
96100
DECLARE_SOA_COLUMN(Eta, eta, float);
97101
DECLARE_SOA_COLUMN(Charge, charge, int);
98102
} // namespace rec_ebyetracktable
99103

100104
DECLARE_SOA_TABLE(ProtRecCompleteEbyeTables, "AOD", "PROTRECCOMPLETEEBYETABLE",
101105
o2::soa::Index<>,
102-
rec_ebyetracktable::ProtRecCollEbyeTableId,
106+
rec_ebyetracktable::ProtRecCollTableId,
103107
rec_ebyetracktable::Pt,
104108
rec_ebyetracktable::Eta,
105109
rec_ebyetracktable::Charge);
@@ -370,6 +374,7 @@ struct NetprotonCumulantsMc {
370374
PROCESS_SWITCH(NetprotonCumulantsMc, processMCGen, "Process Generated", true);
371375

372376
Produces<aod::ProtRecCollEbyeTables> recEbyeCollisions; //! MC Rec table creation
377+
Produces<aod::ProtRecCollTables> recCollisions; //! MC Rec table creation
373378
Produces<aod::ProtRecCompleteEbyeTables> recEbyeCompleteCollisions; //! MC Rec table creation with tracks
374379

375380
void processMCRec(MyMCRecCollision const& collision, MyMCTracks const& tracks, aod::McCollisions const&, aod::McParticles const&)
@@ -381,6 +386,7 @@ struct NetprotonCumulantsMc {
381386
histos.fill(HIST("Centrec"), cent);
382387
histos.fill(HIST("hMC"), 5.5);
383388
histos.fill(HIST("hZvtx_after_sel"), collision.posZ());
389+
recCollisions(cent);
384390

385391
float nProt = 0.0;
386392
float nAntiprot = 0.0;
@@ -409,7 +415,7 @@ struct NetprotonCumulantsMc {
409415
trackSelected = selectionPIDnew(track);
410416

411417
if (trackSelected) {
412-
recEbyeCompleteCollisions(recEbyeCollisions.lastIndex(), particle.pt(), particle.eta(), track.sign());
418+
recEbyeCompleteCollisions(recCollisions.lastIndex(), particle.pt(), particle.eta(), track.sign());
413419
if (track.sign() > 0) {
414420
histos.fill(HIST("hrecPtProton"), particle.pt()); //! hist for p rec
415421
histos.fill(HIST("hrecPtDistProtonVsCentrality"), particle.pt(), cent);

PWGEM/Dilepton/Tasks/eventQC.cxx

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,28 @@ struct eventQC {
124124

125125
struct : ConfigurableGroup {
126126
std::string prefix = "v0cut_group";
127-
Configurable<float> cfg_min_mass_k0s{"cfg_min_mass_k0s", 0.49, "min mass for K0S"};
128-
Configurable<float> cfg_max_mass_k0s{"cfg_max_mass_k0s", 0.50, "max mass for K0S"};
127+
Configurable<float> cfg_min_mass_k0s{"cfg_min_mass_k0s", 0.490, "min mass for K0S"};
128+
Configurable<float> cfg_max_mass_k0s{"cfg_max_mass_k0s", 0.505, "max mass for K0S"};
129129
Configurable<float> cfg_min_cospa_v0hadron{"cfg_min_cospa_v0hadron", 0.999, "min cospa for v0hadron"};
130130
Configurable<float> cfg_max_pca_v0hadron{"cfg_max_pca_v0hadron", 0.5, "max distance between 2 legs for v0hadron"};
131-
Configurable<float> cfg_min_radius_v0hadron{"cfg_min_radius_v0hadron", 0.1, "min rxy for v0hadron"};
131+
Configurable<float> cfg_min_radius_v0hadron{"cfg_min_radius_v0hadron", 1.0, "min rxy for v0hadron"};
132132
Configurable<float> cfg_max_kfchi2{"cfg_max_kfchi2", 1e+10, "max kfchi2 for PCM"};
133133
Configurable<float> cfg_min_cr2findable_ratio_tpc{"cfg_min_cr2findable_ratio_tpc", 0.8, "min. TPC Ncr/Nf ratio"};
134134
Configurable<float> cfg_max_frac_shared_clusters_tpc{"cfg_max_frac_shared_clusters_tpc", 999.f, "max fraction of shared clusters in TPC"};
135135
Configurable<int> cfg_min_ncrossedrows_tpc{"cfg_min_ncrossedrows_tpc", 40, "min ncrossed rows"};
136136
Configurable<int> cfg_min_ncluster_tpc{"cfg_min_ncluster_tpc", 0, "min ncluster tpc"};
137137
Configurable<float> cfg_max_chi2tpc{"cfg_max_chi2tpc", 4.0, "max chi2/NclsTPC"};
138138
Configurable<float> cfg_max_chi2its{"cfg_max_chi2its", 5.0, "max chi2/NclsITS"};
139-
Configurable<float> cfg_max_chi2tof{"cfg_max_chi2tof", 0.1, "max chi2 for TOF"};
139+
Configurable<float> cfg_max_chi2tof{"cfg_max_chi2tof", 1.0, "max chi2 for TOF"};
140140
Configurable<float> cfg_min_dcaxy_v0leg{"cfg_min_dcaxy_v0leg", 0.1, "min dca XY for v0 legs in cm"};
141141
Configurable<float> cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -4, "min n sigma e in TPC"};
142142
Configurable<float> cfg_max_TPCNsigmaEl{"cfg_max_TPCNsigmaEl", +4, "max n sigma e in TPC"};
143143
Configurable<float> cfg_min_TPCNsigmaPi{"cfg_min_TPCNsigmaPi", -4, "min n sigma pi in TPC"};
144144
Configurable<float> cfg_max_TPCNsigmaPi{"cfg_max_TPCNsigmaPi", +4, "max n sigma pi in TPC"};
145+
Configurable<float> cfg_min_TOFNsigmaEl{"cfg_min_TOFNsigmaEl", -2, "min n sigma el in TOF"};
146+
Configurable<float> cfg_max_TOFNsigmaEl{"cfg_max_TOFNsigmaEl", +2, "max n sigma el in TOF"};
147+
Configurable<float> cfg_min_TOFNsigmaPi{"cfg_min_TOFNsigmaPi", -2, "min n sigma pi in TOF"};
148+
Configurable<float> cfg_max_TOFNsigmaPi{"cfg_max_TOFNsigmaPi", +2, "max n sigma pi in TOF"};
145149
} v0cuts;
146150

147151
Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -950,20 +954,30 @@ struct eventQC {
950954
if (std::fabs(pos.dcaXY()) < v0cuts.cfg_min_dcaxy_v0leg || std::fabs(neg.dcaXY()) < v0cuts.cfg_min_dcaxy_v0leg) {
951955
continue;
952956
}
953-
if (pos.tpcNSigmaPi() < v0cuts.cfg_min_TPCNsigmaPi || v0cuts.cfg_max_TPCNsigmaPi < pos.tpcNSigmaPi()) {
954-
continue;
957+
958+
// if (pos.tpcNSigmaPi() < v0cuts.cfg_min_TPCNsigmaPi || v0cuts.cfg_max_TPCNsigmaPi < pos.tpcNSigmaPi()) {
959+
// continue;
960+
// }
961+
// if (neg.tpcNSigmaPi() < v0cuts.cfg_min_TPCNsigmaPi || v0cuts.cfg_max_TPCNsigmaPi < neg.tpcNSigmaPi()) {
962+
// continue;
963+
// }
964+
965+
bool isTPCOK_pos = pos.hasTPC() && v0cuts.cfg_min_TPCNsigmaPi < pos.tpcNSigmaPi() && pos.tpcNSigmaPi() < v0cuts.cfg_max_TPCNsigmaPi;
966+
bool isTPCOK_neg = neg.hasTPC() && v0cuts.cfg_min_TPCNsigmaPi < neg.tpcNSigmaPi() && neg.tpcNSigmaPi() < v0cuts.cfg_max_TPCNsigmaPi;
967+
bool isTOFOK_pos = pos.hasTOF() && pos.tofChi2() < v0cuts.cfg_max_chi2tof && v0cuts.cfg_min_TOFNsigmaPi < pos.tofNSigmaPi() && pos.tofNSigmaPi() < v0cuts.cfg_max_TOFNsigmaPi;
968+
bool isTOFOK_neg = neg.hasTOF() && neg.tofChi2() < v0cuts.cfg_max_chi2tof && v0cuts.cfg_min_TOFNsigmaPi < neg.tofNSigmaPi() && neg.tofNSigmaPi() < v0cuts.cfg_max_TOFNsigmaPi;
969+
970+
if (isTPCOK_neg && isTOFOK_neg) { // K0S is tagged by neg and pos is probe.
971+
fRegistry.fill(HIST("V0/K0S/pion/hTPCdEdx"), pos.tpcInnerParam(), pos.tpcSignal());
972+
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaEl"), pos.tpcInnerParam(), pos.tpcNSigmaEl());
973+
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaPi"), pos.tpcInnerParam(), pos.tpcNSigmaPi());
955974
}
956-
if (neg.tpcNSigmaPi() < v0cuts.cfg_min_TPCNsigmaPi || v0cuts.cfg_max_TPCNsigmaPi < neg.tpcNSigmaPi()) {
957-
continue;
975+
if (isTPCOK_pos && isTOFOK_pos) { // K0S is tagged by pos and neg is probe.
976+
fRegistry.fill(HIST("V0/K0S/pion/hTPCdEdx"), neg.tpcInnerParam(), neg.tpcSignal());
977+
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaEl"), neg.tpcInnerParam(), neg.tpcNSigmaEl());
978+
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaPi"), neg.tpcInnerParam(), neg.tpcNSigmaPi());
958979
}
959-
960-
fRegistry.fill(HIST("V0/K0S/pion/hTPCdEdx"), pos.tpcInnerParam(), pos.tpcSignal());
961-
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaEl"), pos.tpcInnerParam(), pos.tpcNSigmaEl());
962-
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaPi"), pos.tpcInnerParam(), pos.tpcNSigmaPi());
963-
fRegistry.fill(HIST("V0/K0S/pion/hTPCdEdx"), neg.tpcInnerParam(), neg.tpcSignal());
964-
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaEl"), neg.tpcInnerParam(), neg.tpcNSigmaEl());
965-
fRegistry.fill(HIST("V0/K0S/pion/hTPCNsigmaPi"), neg.tpcInnerParam(), neg.tpcNSigmaPi());
966-
}
980+
} // end of K0S
967981
} // end of v0hadron loop
968982

969983
auto v0photons_per_coll = v0photons.sliceBy(perCol_pcm, collision.globalIndex());
@@ -975,30 +989,40 @@ struct eventQC {
975989
fRegistry.fill(HIST("V0/Photon/hMass"), v0photon.mGamma(), v0photon.pt());
976990
fRegistry.fill(HIST("V0/Photon/hXY"), v0photon.vx(), v0photon.vy());
977991
fRegistry.fill(HIST("V0/Photon/hChi2"), v0photon.v0radius(), v0photon.chiSquareNDF());
978-
auto pos = v0photon.template posTrack_as<TV0Legs>();
979-
auto neg = v0photon.template negTrack_as<TV0Legs>();
980-
// auto pos = tracks.rawIteratorAt(pos_v0leg.trackId());
981-
// auto neg = tracks.rawIteratorAt(neg_v0leg.trackId());
992+
auto pos_v0leg = v0photon.template posTrack_as<TV0Legs>();
993+
auto neg_v0leg = v0photon.template negTrack_as<TV0Legs>();
994+
auto pos = tracks.rawIteratorAt(pos_v0leg.trackId());
995+
auto neg = tracks.rawIteratorAt(neg_v0leg.trackId());
982996

983997
if (!isSelectedV0Leg(pos) || !isSelectedV0Leg(neg)) {
984998
continue;
985999
}
9861000
if (std::fabs(pos.dcaXY()) < v0cuts.cfg_min_dcaxy_v0leg || std::fabs(neg.dcaXY()) < v0cuts.cfg_min_dcaxy_v0leg) {
9871001
continue;
9881002
}
989-
if (pos.tpcNSigmaEl() < v0cuts.cfg_min_TPCNsigmaEl || v0cuts.cfg_max_TPCNsigmaEl < pos.tpcNSigmaEl()) {
990-
continue;
1003+
1004+
// if (pos.tpcNSigmaEl() < v0cuts.cfg_min_TPCNsigmaEl || v0cuts.cfg_max_TPCNsigmaEl < pos.tpcNSigmaEl()) {
1005+
// continue;
1006+
// }
1007+
// if (neg.tpcNSigmaEl() < v0cuts.cfg_min_TPCNsigmaEl || v0cuts.cfg_max_TPCNsigmaEl < neg.tpcNSigmaEl()) {
1008+
// continue;
1009+
// }
1010+
1011+
bool isTPCOK_pos = pos.hasTPC() && v0cuts.cfg_min_TPCNsigmaEl < pos.tpcNSigmaEl() && pos.tpcNSigmaEl() < v0cuts.cfg_max_TPCNsigmaEl;
1012+
bool isTPCOK_neg = neg.hasTPC() && v0cuts.cfg_min_TPCNsigmaEl < neg.tpcNSigmaEl() && neg.tpcNSigmaEl() < v0cuts.cfg_max_TPCNsigmaEl;
1013+
bool isTOFOK_pos = pos.hasTOF() && pos.tofChi2() < v0cuts.cfg_max_chi2tof && v0cuts.cfg_min_TOFNsigmaEl < pos.tofNSigmaEl() && pos.tofNSigmaEl() < v0cuts.cfg_max_TOFNsigmaEl;
1014+
bool isTOFOK_neg = neg.hasTOF() && neg.tofChi2() < v0cuts.cfg_max_chi2tof && v0cuts.cfg_min_TOFNsigmaEl < neg.tofNSigmaEl() && neg.tofNSigmaEl() < v0cuts.cfg_max_TOFNsigmaEl;
1015+
1016+
if (isTPCOK_neg && isTOFOK_neg) { // photon conversion is tagged by neg and pos is probe.
1017+
fRegistry.fill(HIST("V0/Photon/electron/hTPCdEdx"), pos.tpcInnerParam(), pos.tpcSignal());
1018+
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaEl"), pos.tpcInnerParam(), pos.tpcNSigmaEl());
1019+
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaPi"), pos.tpcInnerParam(), pos.tpcNSigmaPi());
9911020
}
992-
if (neg.tpcNSigmaEl() < v0cuts.cfg_min_TPCNsigmaEl || v0cuts.cfg_max_TPCNsigmaEl < neg.tpcNSigmaEl()) {
993-
continue;
1021+
if (isTPCOK_pos && isTOFOK_pos) { // photon conversion is tagged by pos and neg is probe.
1022+
fRegistry.fill(HIST("V0/Photon/electron/hTPCdEdx"), neg.tpcInnerParam(), neg.tpcSignal());
1023+
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaEl"), neg.tpcInnerParam(), neg.tpcNSigmaEl());
1024+
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaPi"), neg.tpcInnerParam(), neg.tpcNSigmaPi());
9941025
}
995-
996-
fRegistry.fill(HIST("V0/Photon/electron/hTPCdEdx"), pos.tpcInnerParam(), pos.tpcSignal());
997-
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaEl"), pos.tpcInnerParam(), pos.tpcNSigmaEl());
998-
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaPi"), pos.tpcInnerParam(), pos.tpcNSigmaPi());
999-
fRegistry.fill(HIST("V0/Photon/electron/hTPCdEdx"), neg.tpcInnerParam(), neg.tpcSignal());
1000-
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaEl"), neg.tpcInnerParam(), neg.tpcNSigmaEl());
1001-
fRegistry.fill(HIST("V0/Photon/electron/hTPCNsigmaPi"), neg.tpcInnerParam(), neg.tpcNSigmaPi());
10021026
} // end of v0photon loop
10031027
} // end of V0 PID
10041028
} // end of collision loop

PWGLF/Tasks/Nuspex/spectraTOF.cxx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ struct tofSpectra { // o2-linter: disable=name/struct
137137
Configurable<float> minTPCNClsFound{"minTPCNClsFound", 100.f, "Additional cut on the minimum value of the number of found clusters in the TPC"};
138138
Configurable<bool> makeTHnSparseChoice{"makeTHnSparseChoice", false, "choose if produce thnsparse"}; // RD
139139
Configurable<bool> enableTPCTOFvsEtaHistograms{"enableTPCTOFvsEtaHistograms", false, "choose if produce TPC tof vs Eta"};
140-
Configurable<bool> includeCentralityMC{"includeCentralityMC", true, "choose if include Centrality to MC"};
140+
Configurable<bool> includeCentralityMC{"includeCentralityMC", false, "choose if include Centrality to MC"};
141+
Configurable<bool> isImpactParam{"isImpactParam", false, "choose if include impactparam to MC"};
141142
Configurable<bool> enableTPCTOFVsMult{"enableTPCTOFVsMult", false, "Produce TPC-TOF plots vs multiplicity"};
142143
Configurable<bool> includeCentralityToTracks{"includeCentralityToTracks", false, "choose if include Centrality to tracks"};
143144

@@ -1679,7 +1680,7 @@ struct tofSpectra { // o2-linter: disable=name/struct
16791680
float multiplicity = getMultiplicityMC(mcCollision);
16801681
int occupancy = collision.trackOccupancyInTimeRange();
16811682
//************************************RD**************************************************
1682-
if (includeCentralityMC) {
1683+
if (isImpactParam) {
16831684
multiplicity = mcCollision.impactParameter();
16841685
}
16851686
//************************************RD**************************************************
@@ -1843,7 +1844,9 @@ struct tofSpectra { // o2-linter: disable=name/struct
18431844
if (!mcParticle.isPhysicalPrimary()) {
18441845
if (mcParticle.getProcess() == 4) {
18451846
if (includeCentralityMC) {
1846-
histos.fill(HIST(hpt_num_str[i]), track.pt(), multiplicity, track.dcaXY());
1847+
if (includeCentralityMC) {
1848+
histos.fill(HIST(hpt_num_str[i]), track.pt(), multiplicity, track.dcaXY());
1849+
}
18471850
} else {
18481851
histos.fill(HIST(hpt_num_str[i]), track.pt(), multiplicity);
18491852
}
@@ -2105,7 +2108,12 @@ struct tofSpectra { // o2-linter: disable=name/struct
21052108
}
21062109
const auto& mcCollision = collision.mcCollision_as<GenMCCollisions>();
21072110
const auto& particlesInCollision = mcParticles.sliceByCached(aod::mcparticle::mcCollisionId, mcCollision.globalIndex(), cache);
2108-
const float multiplicity = getMultiplicity(collision);
2111+
float multiplicity = getMultiplicity(collision);
2112+
//************************************RD**************************************************
2113+
if (isImpactParam) {
2114+
multiplicity = mcCollision.impactParameter();
2115+
}
2116+
//************************************RD**************************************************
21092117

21102118
for (const auto& mcParticle : particlesInCollision) {
21112119

0 commit comments

Comments
 (0)