Skip to content

Commit a53a9d6

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents b2d848f + 520c3f2 commit a53a9d6

15 files changed

Lines changed: 1565 additions & 500 deletions

File tree

PWGCF/EbyEFluctuations/Tasks/netchargeFluctuations.cxx

Lines changed: 180 additions & 101 deletions
Large diffs are not rendered by default.

PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ struct TableMakerMC {
13681368
trackBarrel.reserve(tracksBarrel.size());
13691369
trackBarrelCov.reserve(tracksBarrel.size());
13701370
trackBarrelPID.reserve(tracksBarrel.size());
1371-
trackBarrelAssoc.reserve(tracksBarrel.size());
1371+
trackBarrelAssoc.reserve(trackAssocs.size());
13721372
trackBarrelLabels.reserve(tracksBarrel.size());
13731373
}
13741374

@@ -1378,7 +1378,7 @@ struct TableMakerMC {
13781378
map_mfttrackcovs.clear();
13791379
mftTrack.reserve(mftTracks.size());
13801380
mftTrackExtra.reserve(mftTracks.size());
1381-
mftAssoc.reserve(mftTracks.size());
1381+
mftAssoc.reserve(mftAssocs.size());
13821382
mftLabels.reserve(mftTracks.size());
13831383
}
13841384

@@ -1390,7 +1390,7 @@ struct TableMakerMC {
13901390
muonBasic.reserve(muons.size());
13911391
muonExtra.reserve(muons.size());
13921392
muonCov.reserve(muons.size());
1393-
muonAssoc.reserve(muons.size());
1393+
muonAssoc.reserve(fwdTrackAssocs.size());
13941394
muonLabels.reserve(muons.size());
13951395
}
13961396

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,15 +1766,15 @@ struct TableMaker {
17661766
outTables.trackBarrel.reserve(tracksBarrel.size());
17671767
outTables.trackBarrelCov.reserve(tracksBarrel.size());
17681768
outTables.trackBarrelPID.reserve(tracksBarrel.size());
1769-
outTables.trackBarrelAssoc.reserve(tracksBarrel.size());
1769+
outTables.trackBarrelAssoc.reserve(trackAssocs.size());
17701770
}
17711771

17721772
if constexpr (static_cast<bool>(TMFTFillMap)) {
17731773
fMftIndexMap.clear();
17741774
map_mfttrackcovs.clear();
17751775
outTables.mftTrack.reserve(mftTracks.size());
17761776
outTables.mftTrackExtra.reserve(mftTracks.size());
1777-
outTables.mftAssoc.reserve(mftTracks.size());
1777+
outTables.mftAssoc.reserve(mftAssocs.size());
17781778
}
17791779

17801780
if constexpr (static_cast<bool>(TMuonFillMap)) {
@@ -1785,7 +1785,7 @@ struct TableMaker {
17851785
outTables.muonExtra.reserve(muons.size());
17861786
outTables.muonInfo.reserve(muons.size());
17871787
outTables.muonCov.reserve(muons.size());
1788-
outTables.muonAssoc.reserve(muons.size());
1788+
outTables.muonAssoc.reserve(fwdTrackAssocs.size());
17891789
}
17901790

17911791
if constexpr (static_cast<bool>(TMFTFillMap & VarManager::ObjTypes::MFTCov)) {

PWGEM/Dilepton/Tasks/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ o2physics_add_dpl_workflow(dimuon-mc
115115
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::PWGEMDileptonCore
116116
COMPONENT_NAME Analysis)
117117

118+
o2physics_add_dpl_workflow(dimuon-v1
119+
SOURCES dimuonV1.cxx
120+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMDileptonCore
121+
COMPONENT_NAME Analysis)
122+
118123
o2physics_add_dpl_workflow(associate-mccollision-to-collision
119124
SOURCES associateMCcollision.cxx
120125
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore

PWGEM/Dilepton/Tasks/dimuonV1.cxx

Lines changed: 518 additions & 0 deletions
Large diffs are not rendered by default.

PWGEM/PhotonMeson/Tasks/emcalQC.cxx

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ struct EmcalQC {
9797
Configurable<bool> emcUseSecondaryTM{"emcUseSecondaryTM", false, "flag to use EMCal secondary track matching cut or not"};
9898
} emccuts;
9999

100+
struct : ConfigurableGroup {
101+
std::string prefix = "axis_group";
102+
ConfigurableAxis thnConfigAxisPt{"thnConfigAxisPt", {100, 0., 20.}, "pT axis for photon candidates"};
103+
} axisGroup;
104+
100105
void defineEMEventCut()
101106
{
102107
fEMEventCut = EMPhotonEventCut("fEMEventCut", "fEMEventCut");
@@ -146,6 +151,10 @@ struct EmcalQC {
146151
defineEMCCut();
147152
defineEMEventCut();
148153

154+
const AxisSpec thnAxisPt{axisGroup.thnConfigAxisPt, "#it{p}_{T} (GeV/#it{c})"};
155+
const AxisSpec thAxisdEta{200, -0.06, 0.06, "#Delta#eta"};
156+
const AxisSpec thAxisdPhi{200, -0.06, 0.06, "#Delta#varphi (rad)"};
157+
149158
o2::aod::pwgem::photonmeson::utils::eventhistogram::addEventHistograms(&fRegistry);
150159
auto hEMCCollisionCounter = fRegistry.add<TH1>("Event/hEMCCollisionCounter", "Number of collisions after event cuts", HistType::kTH1D, {{7, 0.5, 7.5}}, false);
151160
hEMCCollisionCounter->GetXaxis()->SetBinLabel(1, "all");
@@ -156,6 +165,13 @@ struct EmcalQC {
156165
hEMCCollisionCounter->GetXaxis()->SetBinLabel(6, "+unique"); // TVX with z < 10cm and Sel8 and good z xertex and unique (only collision in the BC)
157166
hEMCCollisionCounter->GetXaxis()->SetBinLabel(7, "+EMC readout"); // TVX with z < 10cm and Sel8 and good z xertex and unique (only collision in the BC) and kTVXinEMC
158167
o2::aod::pwgem::photonmeson::utils::clusterhistogram::addClusterHistograms(&fRegistry, cfgDo2DQA);
168+
169+
if (doprocessQCTM) {
170+
fRegistry.add("Cluster/hDeltaEtaPhiAllPrimTracks", "#Delta#eta #Delta#varphi distribution of all matched prim. tracks", HistType::kTH3D, {thAxisdEta, thAxisdPhi, thnAxisPt}, false);
171+
fRegistry.add("Cluster/hDeltaEtaPhiClosestPrimTracks", "#Delta#eta #Delta#varphi distribution of the Closest matched prim. track", HistType::kTH3D, {thAxisdEta, thAxisdPhi, thnAxisPt}, false);
172+
fRegistry.add("Cluster/hDeltaEtaPhiAllSecTracks", "#Delta#eta #Delta#varphi distribution of all matched sec. tracks", HistType::kTH3D, {thAxisdEta, thAxisdPhi, thnAxisPt}, false);
173+
fRegistry.add("Cluster/hDeltaEtaPhiClosestSecTracks", "#Delta#eta #Delta#varphi distribution of the Closest matched sec. track", HistType::kTH3D, {thAxisdEta, thAxisdPhi, thnAxisPt}, false);
174+
}
159175
}
160176

161177
bool isEventGood(MyCollision const& collision)
@@ -189,7 +205,7 @@ struct EmcalQC {
189205
if (!fEMEventCut.IsSelected(collision)) {
190206
return false;
191207
}
192-
if (!(eventcuts.cfgOccupancyMin <= collision.trackOccupancyInTimeRange() && collision.trackOccupancyInTimeRange() < eventcuts.cfgOccupancyMax)) {
208+
if (!(eventcuts.cfgOccupancyMin <= collision.trackOccupancyInTimeRange()) || !(collision.trackOccupancyInTimeRange() < eventcuts.cfgOccupancyMax)) {
193209
return false;
194210
}
195211

@@ -216,11 +232,11 @@ struct EmcalQC {
216232

217233
// Define two boleans to see, whether the cluster "survives" the EMC cluster cuts to later check, whether the cuts in this task align with the ones in EMCPhotonCut.h:
218234
bool survivesIsSelectedEMCalCuts = true; // Survives "manual" cuts listed in this task
219-
bool survivesIsSelectedCuts = false;
235+
bool survivesIsSelectedCuts = true;
220236

221237
survivesIsSelectedCuts = fEMCCut.IsSelected(cluster);
222238
for (int icut = 0; icut < static_cast<int>(EMCPhotonCut::EMCPhotonCuts::kNCuts); icut++) { // Loop through different cut observables
223-
EMCPhotonCut::EMCPhotonCuts specificcut = static_cast<EMCPhotonCut::EMCPhotonCuts>(icut);
239+
auto specificcut = static_cast<EMCPhotonCut::EMCPhotonCuts>(icut);
224240
if (!fEMCCut.IsSelectedEMCal(specificcut, cluster)) { // Check whether cluster passes this cluster requirement, if not, fill why in the next row
225241
fRegistry.fill(HIST("Cluster/hClusterQualityCuts"), icut + 1, cluster.e(), collision.weight());
226242
survivesIsSelectedEMCalCuts = false;
@@ -240,12 +256,10 @@ struct EmcalQC {
240256
}
241257
}
242258
fRegistry.fill(HIST("Cluster/after/hNgamma"), ngAfter, collision.weight());
243-
244-
return;
245259
}
246260

247261
template <o2::soa::is_table TClusters, o2::soa::is_table TMatchedTracks, o2::soa::is_table TMatchedSecondaries>
248-
void doClusterQA(MyCollision const& collision, TClusters const& clusters, TMatchedTracks const& primTracks, TMatchedSecondaries const& secTracks)
262+
void doClusterQAWithTM(MyCollision const& collision, TClusters const& clusters, TMatchedTracks const& primTracks, TMatchedSecondaries const& secTracks)
249263
{
250264
fRegistry.fill(HIST("Cluster/before/hNgamma"), clusters.size(), collision.weight());
251265
int ngAfter = 0;
@@ -263,11 +277,11 @@ struct EmcalQC {
263277

264278
// Define two boleans to see, whether the cluster "survives" the EMC cluster cuts to later check, whether the cuts in this task align with the ones in EMCPhotonCut.h:
265279
bool survivesIsSelectedEMCalCuts = true; // Survives "manual" cuts listed in this task
266-
bool survivesIsSelectedCuts = false;
280+
bool survivesIsSelectedCuts = true;
267281

268282
survivesIsSelectedCuts = fEMCCut.IsSelected(cluster, primTracksPerCluster, secTracksPerCluster);
269283
for (int icut = 0; icut < static_cast<int>(EMCPhotonCut::EMCPhotonCuts::kNCuts); icut++) { // Loop through different cut observables
270-
EMCPhotonCut::EMCPhotonCuts specificcut = static_cast<EMCPhotonCut::EMCPhotonCuts>(icut);
284+
auto specificcut = static_cast<EMCPhotonCut::EMCPhotonCuts>(icut);
271285
if (specificcut == EMCPhotonCut::EMCPhotonCuts::kTM || specificcut == EMCPhotonCut::EMCPhotonCuts::kSecondaryTM) {
272286
// will do track matching cuts extra later or never depending on chosen process function
273287
continue;
@@ -277,6 +291,20 @@ struct EmcalQC {
277291
survivesIsSelectedEMCalCuts = false;
278292
}
279293
}
294+
if (primTracksPerCluster.size() > 0) {
295+
const auto closestPrimTrack = primTracksPerCluster.begin();
296+
fRegistry.fill(HIST("Cluster/hDeltaEtaPhiClosestPrimTracks"), closestPrimTrack.deltaEta(), closestPrimTrack.deltaPhi(), cluster.pt());
297+
}
298+
for (const auto& matchedPrimTrack : primTracksPerCluster) {
299+
fRegistry.fill(HIST("Cluster/hDeltaEtaPhiAllPrimTracks"), matchedPrimTrack.deltaEta(), matchedPrimTrack.deltaPhi(), cluster.pt());
300+
}
301+
if (secTracksPerCluster.size() > 0) {
302+
const auto closestSecTrack = secTracksPerCluster.begin();
303+
fRegistry.fill(HIST("Cluster/hDeltaEtaPhiClosestSecTracks"), closestSecTrack.deltaEta(), closestSecTrack.deltaPhi(), cluster.pt());
304+
}
305+
for (const auto& matchedSecTrack : secTracksPerCluster) {
306+
fRegistry.fill(HIST("Cluster/hDeltaEtaPhiAllSecTracks"), matchedSecTrack.deltaEta(), matchedSecTrack.deltaPhi(), cluster.pt());
307+
}
280308

281309
if (!fEMCCut.IsSelectedEMCal(EMCPhotonCut::EMCPhotonCuts::kTM, cluster, primTracksPerCluster)) { // Check whether cluster passes this cluster requirement, if not, fill why in the next row
282310
fRegistry.fill(HIST("Cluster/hClusterQualityCuts"), static_cast<double>(EMCPhotonCut::EMCPhotonCuts::kTM) + 1, cluster.e(), collision.weight());
@@ -300,8 +328,6 @@ struct EmcalQC {
300328
}
301329
}
302330
fRegistry.fill(HIST("Cluster/after/hNgamma"), ngAfter, collision.weight());
303-
304-
return;
305331
}
306332

307333
void processQC(MyCollisions const& collisions, EMCalPhotons const& clusters)
@@ -327,7 +353,7 @@ struct EmcalQC {
327353
}
328354

329355
auto clustersPerColl = clusters.sliceBy(perCollisionEMC, collision.collisionId());
330-
doClusterQA(collision, clustersPerColl, matchedPrims, matchedSeconds);
356+
doClusterQAWithTM(collision, clustersPerColl, matchedPrims, matchedSeconds);
331357

332358
} // end of collision loop
333359
} // end of process
@@ -339,7 +365,7 @@ struct EmcalQC {
339365
PROCESS_SWITCH(EmcalQC, processDummy, "Dummy function", true);
340366
};
341367

342-
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
368+
WorkflowSpec defineDataProcessing(ConfigContext const& context)
343369
{
344-
return WorkflowSpec{adaptAnalysisTask<EmcalQC>(cfgc)};
370+
return WorkflowSpec{adaptAnalysisTask<EmcalQC>(context)};
345371
}

0 commit comments

Comments
 (0)