Skip to content

Commit 476825f

Browse files
committed
Make axes configurable
1 parent f5217ed commit 476825f

File tree

1 file changed

+62
-52
lines changed

1 file changed

+62
-52
lines changed

PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

Lines changed: 62 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ struct CascadeSelector {
9696
Configurable<bool> doNoSameBunchPileUp{"doNoSameBunchPileUp", true, "Switch to apply NoSameBunchPileUp event selection"};
9797
Configurable<int> INEL{"INEL", 0, "Number of charged tracks within |eta| < 1 has to be greater than value"};
9898
Configurable<double> maxVertexZ{"maxVertexZ", 10., "Maximum value of z coordinate of PV"};
99+
Configurable<float> etaCascades{"etaCascades", 0.8, "min/max of eta for cascades"};
99100

100101
// Tracklevel
101102
Configurable<float> tpcNsigmaBachelor{"tpcNsigmaBachelor", 3, "TPC NSigma bachelor"};
@@ -104,7 +105,6 @@ struct CascadeSelector {
104105
Configurable<int> minTPCCrossedRows{"minTPCCrossedRows", 80, "min N TPC crossed rows"}; // TODO: finetune! 80 > 159/2, so no split tracks?
105106
Configurable<int> minITSClusters{"minITSClusters", 4, "minimum number of ITS clusters"};
106107
Configurable<float> etaTracks{"etaTracks", 1.0, "min/max of eta for tracks"};
107-
Configurable<float> etaCascades{"etaCascades", 0.8, "min/max of eta for cascades"};
108108

109109
// Selection criteria - compatible with core wagon autodetect - copied from cascadeanalysis.cxx
110110
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
@@ -122,28 +122,32 @@ struct CascadeSelector {
122122
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
123123

124124
// TODO: variables as function of Omega mass, only do Xi for now
125-
AxisSpec vertexAxis = {100, -10.0f, 10.0f, "cm"};
126-
AxisSpec dcaAxis = {50, 0.0f, 5.0f, "cm"};
127-
// AxisSpec invMassAxis = {1000, 1.0f, 2.0f, "Inv. Mass (GeV/c^{2})"};
128-
AxisSpec invXiMassAxis = {100, 1.28f, 1.38f, "Inv. Mass (GeV/c^{2})"};
129-
AxisSpec invOmegaMassAxis = {100, 1.62f, 1.72f, "Inv. Mass (GeV/c^{2})"};
130-
AxisSpec ptAxis = {150, 0, 15, "#it{p}_{T}"};
131-
AxisSpec rapidityAxis{100, -1.f, 1.f, "y"};
125+
ConfigurableAxis radiusAxis = {"radiusAxis", {100, 0.0f, 50.0f}, "cm"};
126+
ConfigurableAxis cpaAxis = {"cpaAxis", {100, 0.95f, 1.0f}, "CPA"};
127+
ConfigurableAxis vertexAxis = {"vertexAxis", {100, -10.0f, 10.0f}, "cm"};
128+
ConfigurableAxis dcaAxis = {"dcaAxis", {100, 0.0f, 2.0f}, "cm"};
129+
ConfigurableAxis invXiMassAxis = {"invXiMassAxis", {100, 1.28f, 1.38f}, "Inv. Mass (GeV/c^{2})"};
130+
ConfigurableAxis invOmegaMassAxis = {"invOmegaMassAxis", {100, 1.62f, 1.72f}, "Inv. Mass (GeV/c^{2})"};
131+
ConfigurableAxis ptAxis = {"ptAxis", {150, 0, 15}, "#it{p}_{T}"};
132+
ConfigurableAxis rapidityAxis{"rapidityAxis", {100, -1.f, 1.f}, "y"};
133+
ConfigurableAxis invLambdaMassAxis{"invLambdaMassAxis", {100, 1.07f, 1.17f}, "Inv. Mass (GeV/c^{2})"};
134+
AxisSpec itsClustersAxis{8, -0.5, 7.5, "number of ITS clusters"};
135+
AxisSpec tpcRowsAxis{160, -0.5, 159.5, "TPC crossed rows"};
132136
HistogramRegistry registry{
133137
"registry",
134138
{
135139
// basic selection variables
136-
{"hV0Radius", "hV0Radius", {HistType::kTH3F, {{100, 0.0f, 100.0f, "cm"}, invXiMassAxis, ptAxis}}},
137-
{"hCascRadius", "hCascRadius", {HistType::kTH3F, {{100, 0.0f, 100.0f, "cm"}, invXiMassAxis, ptAxis}}},
138-
{"hV0CosPA", "hV0CosPA", {HistType::kTH3F, {{100, 0.95f, 1.0f}, invXiMassAxis, ptAxis}}},
139-
{"hCascCosPA", "hCascCosPA", {HistType::kTH3F, {{100, 0.95f, 1.0f}, invXiMassAxis, ptAxis}}},
140+
{"hV0Radius", "hV0Radius", {HistType::kTH3F, {radiusAxis, invXiMassAxis, ptAxis}}},
141+
{"hCascRadius", "hCascRadius", {HistType::kTH3F, {radiusAxis, invXiMassAxis, ptAxis}}},
142+
{"hV0CosPA", "hV0CosPA", {HistType::kTH3F, {cpaAxis, invXiMassAxis, ptAxis}}},
143+
{"hCascCosPA", "hCascCosPA", {HistType::kTH3F, {cpaAxis, invXiMassAxis, ptAxis}}},
140144
{"hDCAPosToPV", "hDCAPosToPV", {HistType::kTH3F, {vertexAxis, invXiMassAxis, ptAxis}}},
141145
{"hDCANegToPV", "hDCANegToPV", {HistType::kTH3F, {vertexAxis, invXiMassAxis, ptAxis}}},
142146
{"hDCABachToPV", "hDCABachToPV", {HistType::kTH3F, {vertexAxis, invXiMassAxis, ptAxis}}},
143147
{"hDCAV0ToPV", "hDCAV0ToPV", {HistType::kTH3F, {vertexAxis, invXiMassAxis, ptAxis}}},
144148
{"hDCAV0Dau", "hDCAV0Dau", {HistType::kTH3F, {dcaAxis, invXiMassAxis, ptAxis}}},
145149
{"hDCACascDau", "hDCACascDau", {HistType::kTH3F, {dcaAxis, invXiMassAxis, ptAxis}}},
146-
{"hLambdaMass", "hLambdaMass", {HistType::kTH3F, {{100, 1.0f, 1.2f, "Inv. Mass (GeV/c^{2})"}, invXiMassAxis, ptAxis}}},
150+
{"hLambdaMass", "hLambdaMass", {HistType::kTH3F, {invLambdaMassAxis, invXiMassAxis, ptAxis}}},
147151

148152
{"hMassXiMinus", "hMassXiMinus", {HistType::kTH3F, {invXiMassAxis, ptAxis, rapidityAxis}}},
149153
{"hMassXiPlus", "hMassXiPlus", {HistType::kTH3F, {invXiMassAxis, ptAxis, rapidityAxis}}},
@@ -159,12 +163,12 @@ struct CascadeSelector {
159163
// {"hMassXi5", "Xi inv mass after bachelor PID cut", {HistType::kTH2F, {invMassAxis, ptAxis}}},
160164

161165
// ITS & TPC clusters, with Xi inv mass
162-
{"hTPCnCrossedRowsPos", "hTPCnCrossedRowsPos", {HistType::kTH3F, {{160, -0.5, 159.5, "TPC crossed rows"}, invXiMassAxis, ptAxis}}},
163-
{"hTPCnCrossedRowsNeg", "hTPCnCrossedRowsNeg", {HistType::kTH3F, {{160, -0.5, 159.5, "TPC crossed rows"}, invXiMassAxis, ptAxis}}},
164-
{"hTPCnCrossedRowsBach", "hTPCnCrossedRowsBach", {HistType::kTH3F, {{160, -0.5, 159.5, "TPC crossed rows"}, invXiMassAxis, ptAxis}}},
165-
{"hITSnClustersPos", "hITSnClustersPos", {HistType::kTH3F, {{8, -0.5, 7.5, "number of ITS clusters"}, invXiMassAxis, ptAxis}}},
166-
{"hITSnClustersNeg", "hITSnClustersNeg", {HistType::kTH3F, {{8, -0.5, 7.5, "number of ITS clusters"}, invXiMassAxis, ptAxis}}},
167-
{"hITSnClustersBach", "hITSnClustersBach", {HistType::kTH3F, {{8, -0.5, 7.5, "number of ITS clusters"}, invXiMassAxis, ptAxis}}},
166+
{"hTPCnCrossedRowsPos", "hTPCnCrossedRowsPos", {HistType::kTH3F, {tpcRowsAxis, invXiMassAxis, ptAxis}}},
167+
{"hTPCnCrossedRowsNeg", "hTPCnCrossedRowsNeg", {HistType::kTH3F, {tpcRowsAxis, invXiMassAxis, ptAxis}}},
168+
{"hTPCnCrossedRowsBach", "hTPCnCrossedRowsBach", {HistType::kTH3F, {tpcRowsAxis, invXiMassAxis, ptAxis}}},
169+
{"hITSnClustersPos", "hITSnClustersPos", {HistType::kTH3F, {itsClustersAxis, invXiMassAxis, ptAxis}}},
170+
{"hITSnClustersNeg", "hITSnClustersNeg", {HistType::kTH3F, {itsClustersAxis, invXiMassAxis, ptAxis}}},
171+
{"hITSnClustersBach", "hITSnClustersBach", {HistType::kTH3F, {itsClustersAxis, invXiMassAxis, ptAxis}}},
168172

169173
{"hTriggerQA", "hTriggerQA", {HistType::kTH1F, {{2, -0.5, 1.5, "Trigger y/n"}}}},
170174
},
@@ -196,23 +200,23 @@ struct CascadeSelector {
196200

197201
if (doprocessRecMC) {
198202
// only create the rec matched to gen histograms if relevant
199-
registry.add("truerec/hV0Radius", "hV0Radius", HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}});
200-
registry.add("truerec/hCascRadius", "hCascRadius", HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}});
201-
registry.add("truerec/hV0CosPA", "hV0CosPA", HistType::kTH1F, {{100, 0.95f, 1.0f}});
202-
registry.add("truerec/hCascCosPA", "hCascCosPA", HistType::kTH1F, {{100, 0.95f, 1.0f}});
203+
registry.add("truerec/hV0Radius", "hV0Radius", HistType::kTH1F, {radiusAxis});
204+
registry.add("truerec/hCascRadius", "hCascRadius", HistType::kTH1F, {radiusAxis});
205+
registry.add("truerec/hV0CosPA", "hV0CosPA", HistType::kTH1F, {cpaAxis});
206+
registry.add("truerec/hCascCosPA", "hCascCosPA", HistType::kTH1F, {cpaAxis});
203207
registry.add("truerec/hDCAPosToPV", "hDCAPosToPV", HistType::kTH1F, {vertexAxis});
204208
registry.add("truerec/hDCANegToPV", "hDCANegToPV", HistType::kTH1F, {vertexAxis});
205209
registry.add("truerec/hDCABachToPV", "hDCABachToPV", HistType::kTH1F, {vertexAxis});
206210
registry.add("truerec/hDCAV0ToPV", "hDCAV0ToPV", HistType::kTH1F, {vertexAxis});
207-
registry.add("truerec/hDCAV0Dau", "hDCAV0Dau", HistType::kTH1F, {{100, 0.0f, 10.0f, "cm^{2}"}});
208-
registry.add("truerec/hDCACascDau", "hDCACascDau", HistType::kTH1F, {{100, 0.0f, 10.0f, "cm^{2}"}});
209-
registry.add("truerec/hLambdaMass", "hLambdaMass", HistType::kTH1F, {{500, 1.0f, 1.5f, "Inv. Mass (GeV/c^{2})"}});
210-
registry.add("truerec/hTPCnCrossedRowsPos", "hTPCnCrossedRowsPos", HistType::kTH1F, {{160, -0.5, 159.5, "TPC crossed rows"}});
211-
registry.add("truerec/hTPCnCrossedRowsNeg", "hTPCnCrossedRowsNeg", HistType::kTH1F, {{160, -0.5, 159.5, "TPC crossed rows"}});
212-
registry.add("truerec/hTPCnCrossedRowsBach", "hTPCnCrossedRowsBach", HistType::kTH1F, {{160, -0.5, 159.5, "TPC crossed rows"}});
213-
registry.add("truerec/hITSnClustersPos", "hITSnClustersPos", HistType::kTH1F, {{8, -0.5, 7.5, "number of ITS clusters"}});
214-
registry.add("truerec/hITSnClustersNeg", "hITSnClustersNeg", HistType::kTH1F, {{8, -0.5, 7.5, "number of ITS clusters"}});
215-
registry.add("truerec/hITSnClustersBach", "hITSnClustersBach", HistType::kTH1F, {{8, -0.5, 7.5, "number of ITS clusters"}});
211+
registry.add("truerec/hDCAV0Dau", "hDCAV0Dau", HistType::kTH1F, {dcaAxis});
212+
registry.add("truerec/hDCACascDau", "hDCACascDau", HistType::kTH1F, {dcaAxis});
213+
registry.add("truerec/hLambdaMass", "hLambdaMass", HistType::kTH1F, {invLambdaMassAxis});
214+
registry.add("truerec/hTPCnCrossedRowsPos", "hTPCnCrossedRowsPos", HistType::kTH1F, {tpcRowsAxis});
215+
registry.add("truerec/hTPCnCrossedRowsNeg", "hTPCnCrossedRowsNeg", HistType::kTH1F, {tpcRowsAxis});
216+
registry.add("truerec/hTPCnCrossedRowsBach", "hTPCnCrossedRowsBach", HistType::kTH1F, {tpcRowsAxis});
217+
registry.add("truerec/hITSnClustersPos", "hITSnClustersPos", HistType::kTH1F, {itsClustersAxis});
218+
registry.add("truerec/hITSnClustersNeg", "hITSnClustersNeg", HistType::kTH1F, {itsClustersAxis});
219+
registry.add("truerec/hITSnClustersBach", "hITSnClustersBach", HistType::kTH1F, {itsClustersAxis});
216220
registry.add("truerec/hXiMinus", "hXiMinus", HistType::kTH2F, {ptAxis, rapidityAxis});
217221
registry.add("truerec/hXiPlus", "hXiPlus", HistType::kTH2F, {ptAxis, rapidityAxis});
218222
registry.add("truerec/hOmegaMinus", "hOmegaMinus", HistType::kTH2F, {ptAxis, rapidityAxis});
@@ -523,14 +527,20 @@ struct CascadeCorrelations {
523527
Configurable<bool> doTFBorderCut{"doTFBorderCut", true, "Switch to apply TimeframeBorderCut event selection"};
524528
Configurable<bool> doSel8{"doSel8", true, "Switch to apply sel8 event selection"};
525529

526-
AxisSpec invMassAxis = {1000, 1.0f, 2.0f, "Inv. Mass (GeV/c^{2})"};
527-
AxisSpec deltaPhiAxis = {180, -PIHalf, 3 * PIHalf, "#Delta#varphi"}; // 180 is divisible by 18 (tpc sectors) and 20 (run 2 binning)
528-
AxisSpec deltaYAxis = {40, -2 * maxRapidity, 2 * maxRapidity, "#Delta y"}; // TODO: narrower range?
529-
AxisSpec ptAxis = {150, 0, 15, "#it{p}_{T}"};
530-
AxisSpec selectionFlagAxis = {4, -0.5f, 3.5f, "Selection flag of casc candidate"};
531-
AxisSpec vertexAxis = {200, -10.0f, 10.0f, "cm"};
532-
AxisSpec multiplicityAxis{100, 0, 100, "Multiplicity (MultFT0M?)"};
530+
ConfigurableAxis radiusAxis = {"radiusAxis", {100, 0.0f, 50.0f}, "cm"};
531+
ConfigurableAxis cpaAxis = {"cpaAxis", {100, 0.95f, 1.0f}, "CPA"};
532+
ConfigurableAxis invMassAxis = {"invMassAxis", {1000, 1.0f, 2.0f}, "Inv. Mass (GeV/c^{2})"};
533+
ConfigurableAxis deltaPhiAxis = {"deltaPhiAxis", {180, -PIHalf, 3 * PIHalf}, "#Delta#varphi"}; // 180 is divisible by 18 (tpc sectors) and 20 (run 2 binning)
534+
ConfigurableAxis ptAxis = {"ptAxis", {150, 0, 15}, "#it{p}_{T}"};
535+
ConfigurableAxis vertexAxis = {"vertexAxis", {200, -10.0f, 10.0f}, "cm"};
536+
ConfigurableAxis dcaAxis = {"dcaAxis", {100, 0.0f, 2.0f}, "cm"};
537+
ConfigurableAxis multiplicityAxis{"multiplicityAxis", {100, 0, 100}, "Multiplicity (MultFT0M?)"};
538+
ConfigurableAxis invLambdaMassAxis{"invLambdaMassAxis", {100, 1.07f, 1.17f}, "Inv. Mass (GeV/c^{2})"};
539+
AxisSpec deltaYAxis{40, -2 * maxRapidity, 2 * maxRapidity, "#Delta y"};
533540
AxisSpec rapidityAxis{100, -maxRapidity, maxRapidity, "y"};
541+
AxisSpec selectionFlagAxis{4, -0.5f, 3.5f, "Selection flag of casc candidate"};
542+
AxisSpec itsClustersAxis{8, -0.5, 7.5, "number of ITS clusters"};
543+
AxisSpec tpcRowsAxis{160, -0.5, 159.5, "TPC crossed rows"};
534544

535545
// initialize efficiency maps
536546
TH1D* hEffXiMin;
@@ -589,23 +599,23 @@ struct CascadeCorrelations {
589599
{"hTriggerQA", "hTriggerQA", {HistType::kTH1F, {{2, -0.5, 1.5, "Trigger y/n"}}}},
590600

591601
// basic selection variables (after cuts)
592-
{"hV0Radius", "hV0Radius", {HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}}}},
593-
{"hCascRadius", "hCascRadius", {HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}}}},
594-
{"hV0CosPA", "hV0CosPA", {HistType::kTH1F, {{100, 0.95f, 1.0f}}}},
595-
{"hCascCosPA", "hCascCosPA", {HistType::kTH1F, {{100, 0.95f, 1.0f}}}},
602+
{"hV0Radius", "hV0Radius", {HistType::kTH1F, {radiusAxis}}},
603+
{"hCascRadius", "hCascRadius", {HistType::kTH1F, {radiusAxis}}},
604+
{"hV0CosPA", "hV0CosPA", {HistType::kTH1F, {cpaAxis}}},
605+
{"hCascCosPA", "hCascCosPA", {HistType::kTH1F, {cpaAxis}}},
596606
{"hDCAPosToPV", "hDCAPosToPV", {HistType::kTH1F, {vertexAxis}}},
597607
{"hDCANegToPV", "hDCANegToPV", {HistType::kTH1F, {vertexAxis}}},
598608
{"hDCABachToPV", "hDCABachToPV", {HistType::kTH1F, {vertexAxis}}},
599609
{"hDCAV0ToPV", "hDCAV0ToPV", {HistType::kTH1F, {vertexAxis}}},
600-
{"hDCAV0Dau", "hDCAV0Dau", {HistType::kTH1F, {{100, 0.0f, 10.0f, "cm^{2}"}}}},
601-
{"hDCACascDau", "hDCACascDau", {HistType::kTH1F, {{100, 0.0f, 10.0f, "cm^{2}"}}}},
602-
{"hLambdaMass", "hLambdaMass", {HistType::kTH1F, {{500, 1.0f, 1.5f, "Inv. Mass (GeV/c^{2})"}}}},
603-
{"hTPCnCrossedRowsPos", "hTPCnCrossedRowsPos", {HistType::kTH1F, {{160, -0.5, 159.5, "TPC crossed rows"}}}},
604-
{"hTPCnCrossedRowsNeg", "hTPCnCrossedRowsNeg", {HistType::kTH1F, {{160, -0.5, 159.5, "TPC crossed rows"}}}},
605-
{"hTPCnCrossedRowsBach", "hTPCnCrossedRowsBach", {HistType::kTH1F, {{160, -0.5, 159.5, "TPC crossed rows"}}}},
606-
{"hITSnClustersPos", "hITSnClustersPos", {HistType::kTH1F, {{8, -0.5, 7.5, "number of ITS clusters"}}}},
607-
{"hITSnClustersNeg", "hITSnClustersNeg", {HistType::kTH1F, {{8, -0.5, 7.5, "number of ITS clusters"}}}},
608-
{"hITSnClustersBach", "hITSnClustersBach", {HistType::kTH1F, {{8, -0.5, 7.5, "number of ITS clusters"}}}},
610+
{"hDCAV0Dau", "hDCAV0Dau", {HistType::kTH1F, {dcaAxis}}},
611+
{"hDCACascDau", "hDCACascDau", {HistType::kTH1F, {dcaAxis}}},
612+
{"hLambdaMass", "hLambdaMass", {HistType::kTH1F, {invLambdaMassAxis}}},
613+
{"hTPCnCrossedRowsPos", "hTPCnCrossedRowsPos", {HistType::kTH1F, {tpcRowsAxis}}},
614+
{"hTPCnCrossedRowsNeg", "hTPCnCrossedRowsNeg", {HistType::kTH1F, {tpcRowsAxis}}},
615+
{"hTPCnCrossedRowsBach", "hTPCnCrossedRowsBach", {HistType::kTH1F, {tpcRowsAxis}}},
616+
{"hITSnClustersPos", "hITSnClustersPos", {HistType::kTH1F, {itsClustersAxis}}},
617+
{"hITSnClustersNeg", "hITSnClustersNeg", {HistType::kTH1F, {itsClustersAxis}}},
618+
{"hITSnClustersBach", "hITSnClustersBach", {HistType::kTH1F, {itsClustersAxis}}},
609619

610620
{"hSelectionFlag", "hSelectionFlag", {HistType::kTH1I, {selectionFlagAxis}}},
611621
{"hAutoCorrelation", "hAutoCorrelation", {HistType::kTH1I, {{4, -0.5f, 3.5f, "Types of SS autocorrelation"}}}},

0 commit comments

Comments
 (0)