Skip to content

Commit d88b494

Browse files
committed
add activity variable
1 parent 2dd7aca commit d88b494

1 file changed

Lines changed: 50 additions & 4 deletions

File tree

PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ struct JEPFlowAnalysis {
127127
Configurable<std::vector<float>> cfgMultq2high{"cfgMultq2high", {}, ""};
128128
Configurable<std::vector<float>> cfgMultq2low{"cfgMultq2low", {}, ""};
129129

130+
Configurable<int> cfgJetSubEvtSel{"cfgJetSubEvtSel", 0, "0: none, 1: Ratio, 2: relative ratio"};
131+
Configurable<std::vector<float>> cfgJetSubEvlSelVar{"cfgJetSubEvlSelVar", {}, ""};
132+
130133
Configurable<std::string> cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"};
131134
Configurable<std::string> cfgRefAName{"cfgRefAName", "TPCPos", "The name of detector for reference A"};
132135
Configurable<std::string> cfgRefBName{"cfgRefBName", "TPCNeg", "The name of detector for reference B"};
@@ -139,6 +142,7 @@ struct JEPFlowAnalysis {
139142
ConfigurableAxis cfgAxisQ2{"cfgAxisQ2", {100, 0, 10}, ""};
140143
ConfigurableAxis cfgAxisAmp{"cfgAxisAmp", {100, 0, 1e5}, ""};
141144
ConfigurableAxis cfgAxisAmpR{"cfgAxisAmpR", {VARIABLE_WIDTH, 0.0, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1.0}, ""};
145+
ConfigurableAxis cfgAxisActR{"cfgAxisActR", {100, 0, 100}, ""};
142146

143147
ConfigurableAxis cfgAxisCentMC{"cfgAxisCentMC", {5, 0, 100}, ""};
144148
ConfigurableAxis cfgAxisVtxZMC{"cfgAxisVtxZMC", {20, -10, 10}, ""};
@@ -268,6 +272,27 @@ struct JEPFlowAnalysis {
268272
return qVecFT0C.Rho();
269273
}
270274

275+
template <typename Col>
276+
float calcFT0CLocalActivity(const Col& coll)
277+
{
278+
float amp = 0.0;
279+
float amp2 = 0.0;
280+
if (!coll.has_foundFT0()) {
281+
return false;
282+
}
283+
284+
auto ft0 = coll.foundFT0();
285+
286+
for (std::size_t iChC = 0; iChC < ft0.channelC().size(); ++iChC) {
287+
int ft0CChId = ft0.channelC()[iChC] + 96;
288+
float ampl = ft0.amplitudeC()[iChC] / (cfgGainEq ? ft0RelGainConst[ft0CChId] : 1.);
289+
amp += ampl;
290+
amp2 += ampl * ampl;
291+
}
292+
293+
return amp2 / (amp * amp);
294+
}
295+
271296
template <typename Trk>
272297
uint8_t trackSel(const Trk& track)
273298
{
@@ -384,6 +409,28 @@ struct JEPFlowAnalysis {
384409
}
385410
}
386411

412+
float qOvecM;
413+
float activity;
414+
if (i == 0) { // second harmonic only
415+
qOvecM = calcFT0CRawQVecMag(coll, i + 2) / coll.qvecAmp()[detId];
416+
417+
epFlowHistograms.fill(HIST("hQoverM2M"), cent, coll.qvecAmp()[detId], qOvecM);
418+
epFlowHistograms.fill(HIST("hQoverM2Q2"), cent, q2Mag, qOvecM);
419+
420+
activity = calcFT0CLocalActivity(coll);
421+
}
422+
423+
if (cfgJetSubEvtSel & 1) {
424+
if (cfgJetSubEvlSelVar->at(0) > qOvecM) {
425+
return;
426+
}
427+
}
428+
if (cfgJetSubEvtSel & 2) {
429+
if (cfgJetSubEvlSelVar->at(1) > activity) {
430+
return;
431+
}
432+
}
433+
387434
highestPt = 0.0;
388435
for (const auto& track : tracks) {
389436
if (cfgTrkSelFlag && trackSel(track))
@@ -415,11 +462,8 @@ struct JEPFlowAnalysis {
415462
}
416463
}
417464
if (i == 0) { // second harmonic only
418-
auto qOvecM = calcFT0CRawQVecMag(coll, i + 2) / coll.qvecAmp()[detId];
419-
420465
epFlowHistograms.fill(HIST("hQoverM"), cent, highestPt, qOvecM);
421-
epFlowHistograms.fill(HIST("hQoverM2M"), cent, coll.qvecAmp()[detId], qOvecM);
422-
epFlowHistograms.fill(HIST("hQoverM2Q2"), cent, q2Mag, qOvecM);
466+
epFlowHistograms.fill(HIST("hActivity"), cent, highestPt, activity);
423467
}
424468
}
425469
}
@@ -461,6 +505,7 @@ struct JEPFlowAnalysis {
461505
AxisSpec axisQ2{cfgAxisQ2, "Q2"};
462506
AxisSpec axisAmp{cfgAxisAmp, "M"};
463507
AxisSpec axisAmpR{cfgAxisAmpR, "QoverM"};
508+
AxisSpec axisActR{cfgAxisActR, "Activity"};
464509

465510
AxisSpec axisCentMC{cfgAxisCentMC, "cent"};
466511
AxisSpec axisVtxZMC{cfgAxisVtxZMC, "vtxz"};
@@ -480,6 +525,7 @@ struct JEPFlowAnalysis {
480525
epFlowHistograms.add("hQoverM", "", {HistType::kTH3F, {axisCent, axisPt, axisAmpR}});
481526
epFlowHistograms.add("hQoverM2M", "", {HistType::kTH3F, {axisCent, axisAmp, axisAmpR}});
482527
epFlowHistograms.add("hQoverM2Q2", "", {HistType::kTH3F, {axisCent, axisQ2, axisAmpR}});
528+
epFlowHistograms.add("hActivity", "", {HistType::kTH3F, {axisCent, axisPt, axisActR}});
483529

484530
epFlowHistograms.add("vncos", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisCos}});
485531
epFlowHistograms.add("vnsin", "", {HistType::kTHnSparseF, {axisMod, axisCent, axisPt, axisCos}});

0 commit comments

Comments
 (0)