Skip to content

Commit e3bdfc1

Browse files
committed
Please consider the following formatting changes
1 parent 9eb4e12 commit e3bdfc1

File tree

1 file changed

+88
-92
lines changed

1 file changed

+88
-92
lines changed

PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

Lines changed: 88 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "Common/DataModel/PIDResponse.h"
2323
#include "Common/DataModel/TrackSelectionTables.h"
2424

25-
2625
#include "CCDB/BasicCCDBManager.h"
2726
#include "CommonConstants/PhysicsConstants.h"
2827
#include "DataFormatsParameters/GRPMagField.h"
@@ -75,28 +74,28 @@ struct phianalysisrun3_PbPb {
7574
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
7675
HistogramRegistry registry{"registry"};
7776
struct : ConfigurableGroup {
78-
// events
79-
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
80-
// track
81-
Configurable<float> cfgCutPT{"cfgCutPT", 0.2, "PT cut on daughter track"};
82-
Configurable<float> cfgCutEta{"cfgCutEta", 0.8, "Eta cut on daughter track"};
83-
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"};
84-
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"};
85-
Configurable<float> nsigmacutTPC{"nsigmacutTPC", 2.0f, "Value of the TPC Nsigma cut"};
86-
Configurable<float> nsigmacutTOF{"nsigmacutTOF", 2.0f, "Value of the TOF Nsigma cut"};
87-
Configurable<float> nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Value of the TOF Nsigma cut"};
88-
Configurable<int> cfgNoMixedEvents{"cfgNoMixedEvents", 5, "Number of mixed events per event"};
89-
Configurable<bool> fillOccupancy{"fillOccupancy", true, "fill Occupancy"};
90-
Configurable<bool> isNoTOF{"isNoTOF", false, "isNoTOF"};
91-
Configurable<bool> additionalEvSel1{"additionalEvSel1", true, "Additional evsel1"};
92-
Configurable<bool> additionalEvSel2{"additionalEvSel2", true, "Additional evsel2"};
93-
Configurable<bool> additionalEvSel3{"additionalEvSel3", true, "Additional evsel3"};
94-
Configurable<bool> additionalEvSel4{"additionalEvSel4", true, "Additional evsel4"};
95-
Configurable<bool> additionalEvSel5{"additionalEvSel5", true, "Additional evsel5"};
96-
Configurable<bool> additionalEvSel6{"additionalEvSel6", true, "Additional evsel6"};
97-
}selectionConfig;
77+
// events
78+
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
79+
// track
80+
Configurable<float> cfgCutPT{"cfgCutPT", 0.2, "PT cut on daughter track"};
81+
Configurable<float> cfgCutEta{"cfgCutEta", 0.8, "Eta cut on daughter track"};
82+
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"};
83+
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"};
84+
Configurable<float> nsigmacutTPC{"nsigmacutTPC", 2.0f, "Value of the TPC Nsigma cut"};
85+
Configurable<float> nsigmacutTOF{"nsigmacutTOF", 2.0f, "Value of the TOF Nsigma cut"};
86+
Configurable<float> nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Value of the TOF Nsigma cut"};
87+
Configurable<int> cfgNoMixedEvents{"cfgNoMixedEvents", 5, "Number of mixed events per event"};
88+
Configurable<bool> fillOccupancy{"fillOccupancy", true, "fill Occupancy"};
89+
Configurable<bool> isNoTOF{"isNoTOF", false, "isNoTOF"};
90+
Configurable<bool> additionalEvSel1{"additionalEvSel1", true, "Additional evsel1"};
91+
Configurable<bool> additionalEvSel2{"additionalEvSel2", true, "Additional evsel2"};
92+
Configurable<bool> additionalEvSel3{"additionalEvSel3", true, "Additional evsel3"};
93+
Configurable<bool> additionalEvSel4{"additionalEvSel4", true, "Additional evsel4"};
94+
Configurable<bool> additionalEvSel5{"additionalEvSel5", true, "Additional evsel5"};
95+
Configurable<bool> additionalEvSel6{"additionalEvSel6", true, "Additional evsel6"};
96+
} selectionConfig;
9897
Configurable<bool> cfgMultFT0{"cfgMultFT0", true, "cfgMultFT0"};
99-
Configurable<int> pid{"pid", 0, "pid"};
98+
Configurable<int> pid{"pid", 0, "pid"};
10099
Configurable<float> cfgCutTOFBeta{"cfgCutTOFBeta", 0.0, "cut TOF beta"};
101100
Configurable<bool> useGlobalTrack{"useGlobalTrack", false, "use Global track"};
102101
Configurable<bool> iscustomDCAcut{"iscustomDCAcut", false, "iscustomDCAcut"};
@@ -142,8 +141,8 @@ struct phianalysisrun3_PbPb {
142141
AxisSpec impactParAxis = {binsImpactPar, "Impact Parameter"};
143142
AxisSpec ptAxis = {binsPt, "#it{p}_{T} (GeV/#it{c})"};
144143
AxisSpec centAxis = {binsCent, "V0M (%)"};
145-
AxisSpec multAxis = {binsMult, "Multiplicity #eta<0.5"};
146-
AxisSpec axisEvent = {10, 0.5, 10.5, "#Event", "EventAxis"};
144+
AxisSpec multAxis = {binsMult, "Multiplicity #eta<0.5"};
145+
AxisSpec axisEvent = {10, 0.5, 10.5, "#Event", "EventAxis"};
147146
if (!isMC) {
148147
histos.add("hCentrality", "Centrality distribution", kTH1F, {centAxisphi});
149148
histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{400, -20.0, 20.0}});
@@ -271,31 +270,31 @@ struct phianalysisrun3_PbPb {
271270
histos.add("QAevent/phigenAfterEvtSel", "phi after event selections", kTH2F, {ptAxis, impactParAxis});
272271
}
273272
if (doprocessEvtLossSigLossMC1) {
274-
histos.add("MCEventHist", "MCEventHist", kTH1F, {axisEvent}, false);
275-
auto hstat = histos.get<TH1>(HIST("MCEventHist"));
276-
auto* x = hstat->GetXaxis();
277-
x->SetBinLabel(1, "All MC events");
278-
x->SetBinLabel(2, "MC events with reco event after event selection");
279-
x->SetBinLabel(3, "MC events with no reco events");
280-
histos.add("hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis});
281-
histos.add("hImpactParameterGen1", "Impact parameter of generated MC events", kTH1F, {impactParAxis});
282-
histos.add("hImpactParameterRec1", "Impact parameter of selected MC events", kTH1F, {impactParAxis});
283-
histos.add("hImpactParvsCentrRec", "Impact parameter of selected MC events vs centrality", kTH2F, {centAxis, impactParAxis});
284-
histos.add("hMultEta05GenwithNoreco", "multiplicity in eta<0.5 of generated MC events, with no recoevent", kTH1F, {multAxis});
285-
histos.add("hMultEta05Gen", "multiplicity in eta<0.5 of generated MC events", kTH1F, {multAxis});
286-
histos.add("hMultEta05Rec", "multiplicity in eta<0.5 of selected MC events", kTH1F, {multAxis});
287-
histos.add("hMultEta05vsCentrRec", "multiplicity in eta<0.5 of selected MC events vs centrality", kTH2F, {centAxis, multAxis});
288-
histos.add("hMultGen", "multiplicity of generated MC events", kTH1F, {centAxisphi});
289-
histos.add("hMultRec", "multiplicity of selected MC events", kTH1F, {centAxisphi});
290-
histos.add("hMultvsCentrRec", "multiplicity of selected MC events vs centrality", kTH2F, {centAxisphi, multAxis});
291-
histos.add("hgendndetaVsMultEta05BeforeEvtSel", "hgendndetaBeforeEvtSel vs multiplicity in eta<0.5", kTH2F, {ptAxis, multAxis});
292-
histos.add("hgendndetaVsMultEta05AfterEvtSel", "hgendndetaAfterEvtSel vs multiplicity in eta<0.5", kTH2F, {ptAxis, multAxis});
293-
histos.add("hgendndetaVsMultBeforeEvtSel", "hgendndetaBeforeEvtSel vs multiplicity", kTH2F, {ptAxis, multAxis});
294-
histos.add("hgendndetaVsMultAfterEvtSel", "hgendndetaAfterEvtSel vs multiplicity", kTH2F, {ptAxis, multAxis});
295-
histos.add("hgendndetaBeforeEvtSel", "Eta of all generated particles", kTH1F, {ptAxis});
296-
histos.add("hgendndetaAfterEvtSel", "Eta of generated particles after EvtSel", kTH1F, {ptAxis});
297-
histos.add("hgendndetaVscentBeforeEvtSel", "hgendndetaBeforeEvtSel vs centrality", kTH2F, {ptAxis, impactParAxis});
298-
histos.add("hgendndetaVscentAfterEvtSel", "hgendndetaAfterEvtSel vs centrality", kTH2F, {ptAxis, impactParAxis});
273+
histos.add("MCEventHist", "MCEventHist", kTH1F, {axisEvent}, false);
274+
auto hstat = histos.get<TH1>(HIST("MCEventHist"));
275+
auto* x = hstat->GetXaxis();
276+
x->SetBinLabel(1, "All MC events");
277+
x->SetBinLabel(2, "MC events with reco event after event selection");
278+
x->SetBinLabel(3, "MC events with no reco events");
279+
histos.add("hImpactParameterGenwithNoreco", "Impact parameter of generated MC events, with no recoevent", kTH1F, {impactParAxis});
280+
histos.add("hImpactParameterGen1", "Impact parameter of generated MC events", kTH1F, {impactParAxis});
281+
histos.add("hImpactParameterRec1", "Impact parameter of selected MC events", kTH1F, {impactParAxis});
282+
histos.add("hImpactParvsCentrRec", "Impact parameter of selected MC events vs centrality", kTH2F, {centAxis, impactParAxis});
283+
histos.add("hMultEta05GenwithNoreco", "multiplicity in eta<0.5 of generated MC events, with no recoevent", kTH1F, {multAxis});
284+
histos.add("hMultEta05Gen", "multiplicity in eta<0.5 of generated MC events", kTH1F, {multAxis});
285+
histos.add("hMultEta05Rec", "multiplicity in eta<0.5 of selected MC events", kTH1F, {multAxis});
286+
histos.add("hMultEta05vsCentrRec", "multiplicity in eta<0.5 of selected MC events vs centrality", kTH2F, {centAxis, multAxis});
287+
histos.add("hMultGen", "multiplicity of generated MC events", kTH1F, {centAxisphi});
288+
histos.add("hMultRec", "multiplicity of selected MC events", kTH1F, {centAxisphi});
289+
histos.add("hMultvsCentrRec", "multiplicity of selected MC events vs centrality", kTH2F, {centAxisphi, multAxis});
290+
histos.add("hgendndetaVsMultEta05BeforeEvtSel", "hgendndetaBeforeEvtSel vs multiplicity in eta<0.5", kTH2F, {ptAxis, multAxis});
291+
histos.add("hgendndetaVsMultEta05AfterEvtSel", "hgendndetaAfterEvtSel vs multiplicity in eta<0.5", kTH2F, {ptAxis, multAxis});
292+
histos.add("hgendndetaVsMultBeforeEvtSel", "hgendndetaBeforeEvtSel vs multiplicity", kTH2F, {ptAxis, multAxis});
293+
histos.add("hgendndetaVsMultAfterEvtSel", "hgendndetaAfterEvtSel vs multiplicity", kTH2F, {ptAxis, multAxis});
294+
histos.add("hgendndetaBeforeEvtSel", "Eta of all generated particles", kTH1F, {ptAxis});
295+
histos.add("hgendndetaAfterEvtSel", "Eta of generated particles after EvtSel", kTH1F, {ptAxis});
296+
histos.add("hgendndetaVscentBeforeEvtSel", "hgendndetaBeforeEvtSel vs centrality", kTH2F, {ptAxis, impactParAxis});
297+
histos.add("hgendndetaVscentAfterEvtSel", "hgendndetaAfterEvtSel vs centrality", kTH2F, {ptAxis, impactParAxis});
299298
}
300299
}
301300
}
@@ -412,7 +411,7 @@ struct phianalysisrun3_PbPb {
412411
}
413412
return cent;
414413
}
415-
template <typename CheckColCent>
414+
template <typename CheckColCent>
416415
float selColCent(CheckColCent const& col)
417416
{
418417
auto cent = -1;
@@ -425,7 +424,6 @@ template <typename CheckColCent>
425424
return cent;
426425
}
427426

428-
429427
// deep angle cut on pair to remove photon conversion
430428
template <typename T1, typename T2>
431429
bool selectionPair(const T1& candidate1, const T2& candidate2)
@@ -2011,13 +2009,13 @@ template <typename CheckColCent>
20112009
PROCESS_SWITCH(phianalysisrun3_PbPb, processFactors, "Process Signal Loss, Event Loss", false);
20122010
void processEvtLossSigLossMC1(McCollisionMults::iterator const& mcCollision, soa::SmallGroups<EventCandidatesMC> const& collisions, aod::McParticles const& GenParticles)
20132011
{
2014-
if (std::abs(mcCollision.posZ()) > selectionConfig.cfgCutVertex)
2012+
if (std::abs(mcCollision.posZ()) > selectionConfig.cfgCutVertex)
20152013
return;
2016-
// All generated events
2014+
// All generated events
20172015
histos.fill(HIST("MCEventHist"), 1);
20182016
histos.fill(HIST("hImpactParameterGen1"), mcCollision.impactParameter());
20192017
histos.fill(HIST("hMultEta05Gen"), mcCollision.multMCNParticlesEta05());
2020-
histos.fill(HIST("hMultGen"), selColMultMC(mcCollision));
2018+
histos.fill(HIST("hMultGen"), selColMultMC(mcCollision));
20212019

20222020
if (collisions.size() == 0) {
20232021
histos.fill(HIST("MCEventHist"), 3);
@@ -2026,7 +2024,7 @@ template <typename CheckColCent>
20262024
}
20272025
bool atLeastOne = false;
20282026
auto centrality = -999.;
2029-
for (auto const& collision : collisions) {
2027+
for (auto const& collision : collisions) {
20302028
if (!myEventSelections(collision))
20312029
continue;
20322030
centrality = selColCent(collision);
@@ -2040,55 +2038,53 @@ template <typename CheckColCent>
20402038
histos.fill(HIST("hMultRec"), selColMultMC(mcCollision));
20412039
histos.fill(HIST("hImpactParvsCentrRec"), centrality, mcCollision.impactParameter());
20422040
histos.fill(HIST("hMultEta05vsCentrRec"), centrality, mcCollision.multMCNParticlesEta05());
2043-
histos.fill(HIST("hMultvsCentrRec"), centrality, selColMultMC(mcCollision));
2041+
histos.fill(HIST("hMultvsCentrRec"), centrality, selColMultMC(mcCollision));
20442042
}
2045-
for (const auto& particle : GenParticles) {
2043+
for (const auto& particle : GenParticles) {
20462044

2047-
if (std::abs(particle.y()) > confRapidity)
2048-
continue;
2045+
if (std::abs(particle.y()) > confRapidity)
2046+
continue;
20492047

2050-
if (particle.pdgCode() != o2::constants::physics::kPhi)
2051-
continue;
2048+
if (particle.pdgCode() != o2::constants::physics::kPhi)
2049+
continue;
20522050

2053-
auto daughters = particle.daughters_as<aod::McParticles>();
2054-
static constexpr int kPhiNDaughters = 2;
2055-
if (daughters.size() != kPhiNDaughters)
2056-
continue;
2051+
auto daughters = particle.daughters_as<aod::McParticles>();
2052+
static constexpr int kPhiNDaughters = 2;
2053+
if (daughters.size() != kPhiNDaughters)
2054+
continue;
20572055

2058-
bool daup = false, daun = false;
2056+
bool daup = false, daun = false;
20592057

2060-
for (const auto& dau : daughters) {
2061-
if (dau.pdgCode() == PDG_t::kKPlus) {
2062-
daup = true;
2063-
d1 = ROOT::Math::PxPyPzMVector(dau.px(), dau.py(), dau.pz(), massKa);
2064-
} else if (dau.pdgCode() == PDG_t::kKMinus) {
2065-
daun = true;
2066-
d2 = ROOT::Math::PxPyPzMVector(dau.px(), dau.py(), dau.pz(), massKa);
2067-
}
2068-
}
2058+
for (const auto& dau : daughters) {
2059+
if (dau.pdgCode() == PDG_t::kKPlus) {
2060+
daup = true;
2061+
d1 = ROOT::Math::PxPyPzMVector(dau.px(), dau.py(), dau.pz(), massKa);
2062+
} else if (dau.pdgCode() == PDG_t::kKMinus) {
2063+
daun = true;
2064+
d2 = ROOT::Math::PxPyPzMVector(dau.px(), dau.py(), dau.pz(), massKa);
2065+
}
2066+
}
20692067

2070-
if (!daup || !daun)
2071-
continue;
2068+
if (!daup || !daun)
2069+
continue;
20722070

2073-
mother = d1 + d2;
2071+
mother = d1 + d2;
20742072

2075-
2076-
histos.fill(HIST("hgendndetaBeforeEvtSel"), mother.Pt());
2077-
histos.fill(HIST("hgendndetaVscentBeforeEvtSel"), mother.Pt(), mcCollision.impactParameter());
2078-
histos.fill(HIST("hgendndetaVsMultEta05BeforeEvtSel"), mother.Pt(), mcCollision.multMCNParticlesEta05());
2079-
histos.fill(HIST("hgendndetaVsMultBeforeEvtSel"), mother.Pt(), selColMultMC(mcCollision));
2073+
histos.fill(HIST("hgendndetaBeforeEvtSel"), mother.Pt());
2074+
histos.fill(HIST("hgendndetaVscentBeforeEvtSel"), mother.Pt(), mcCollision.impactParameter());
2075+
histos.fill(HIST("hgendndetaVsMultEta05BeforeEvtSel"), mother.Pt(), mcCollision.multMCNParticlesEta05());
2076+
histos.fill(HIST("hgendndetaVsMultBeforeEvtSel"), mother.Pt(), selColMultMC(mcCollision));
20802077

2081-
if (atLeastOne) {
2082-
2083-
histos.fill(HIST("hgendndetaAfterEvtSel"), mother.Pt());
2084-
histos.fill(HIST("hgendndetaVscentAfterEvtSel"), mother.Pt(), mcCollision.impactParameter());
2085-
histos.fill(HIST("hgendndetaVsMultEta05AfterEvtSel"), mother.Pt(), mcCollision.multMCNParticlesEta05());
2086-
histos.fill(HIST("hgendndetaVsMultAfterEvtSel"), mother.Pt(), selColMultMC(mcCollision));
2087-
}
2088-
}
2078+
if (atLeastOne) {
20892079

2080+
histos.fill(HIST("hgendndetaAfterEvtSel"), mother.Pt());
2081+
histos.fill(HIST("hgendndetaVscentAfterEvtSel"), mother.Pt(), mcCollision.impactParameter());
2082+
histos.fill(HIST("hgendndetaVsMultEta05AfterEvtSel"), mother.Pt(), mcCollision.multMCNParticlesEta05());
2083+
histos.fill(HIST("hgendndetaVsMultAfterEvtSel"), mother.Pt(), selColMultMC(mcCollision));
2084+
}
2085+
}
20902086
}
2091-
PROCESS_SWITCH(phianalysisrun3_PbPb, processEvtLossSigLossMC1, "Process Signal Loss, Event Loss", false);
2087+
PROCESS_SWITCH(phianalysisrun3_PbPb, processEvtLossSigLossMC1, "Process Signal Loss, Event Loss", false);
20922088
};
20932089
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
20942090
{

0 commit comments

Comments
 (0)