Skip to content

Commit ae33a46

Browse files
authored
[PWG-DQ] Clean and fix bug on vector (#1190)
* remove useless vector creating bug for some datasets * modify the name for full eta range and clean
1 parent 4ae6309 commit ae33a46

1 file changed

Lines changed: 14 additions & 21 deletions

File tree

PWGDQ/Tasks/dqFlow.cxx

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct AnalysisQvector {
126126

127127
// define global variables for generic framework
128128
GFW* fGFW = new GFW();
129-
std::vector<GFW::CorrConfig> corrconfigs;
129+
//std::vector<GFW::CorrConfig> corrconfigs;
130130
TRandom3* fRndm = new TRandom3(0);
131131

132132
// Initialize CCDB, efficiencies and acceptances from CCDB, histograms, GFW, FlowContainer
@@ -190,11 +190,11 @@ struct AnalysisQvector {
190190
fGFW->AddRegion("refP", 7, pows, fConfigEtaLimit, fConfigCutEta, 1, 1);
191191
fGFW->AddRegion("full", 7, powsFull, -fConfigCutEta, fConfigCutEta, 1, 2);
192192

193-
corrconfigs.push_back(fGFW->GetCorrelatorConfig("refP {2} refN {-2}", "ChGap22", kFALSE));
194-
corrconfigs.push_back(fGFW->GetCorrelatorConfig("refP {2 2} refN {-2 -2}", "ChGap24", kFALSE));
195-
corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {2 -2}", "ChFull22", kFALSE));
196-
corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {2 2 -2 -2}", "ChFull24", kFALSE));
197-
corrconfigs.push_back(fGFW->GetCorrelatorConfig("refP {3} refN {-3}", "ChGap32", kFALSE));
193+
//corrconfigs.push_back(fGFW->GetCorrelatorConfig("refP {2} refN {-2}", "ChGap22", kFALSE));
194+
//corrconfigs.push_back(fGFW->GetCorrelatorConfig("refP {2 2} refN {-2 -2}", "ChGap24", kFALSE));
195+
//corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {2 -2}", "ChFull22", kFALSE));
196+
//corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {2 2 -2 -2}", "ChFull24", kFALSE));
197+
//corrconfigs.push_back(fGFW->GetCorrelatorConfig("refP {3} refN {-3}", "ChGap32", kFALSE));
198198
}
199199

200200
// TODO: make available the flowcontainer output (add a dictionary somewhere...)
@@ -292,33 +292,26 @@ struct AnalysisQvector {
292292
// Obtain the GFWCumulant where Q is calculated (index=region, with different eta gaps)
293293
GFWCumulant gfwCumN = fGFW->GetCumulant(0);
294294
GFWCumulant gfwCumP = fGFW->GetCumulant(1);
295-
GFWCumulant gfwCum = fGFW->GetCumulant(2);
295+
GFWCumulant gfwCumFull = fGFW->GetCumulant(2);
296296

297297
// Get the multiplicity of the event in this region
298298
int nentriesN = gfwCumN.GetN();
299299
int nentriesP = gfwCumP.GetN();
300-
int nentries = gfwCum.GetN();
300+
int nentriesFull = gfwCumFull.GetN();
301301

302302
// Get the Q vector for selected harmonic, power (for minPt=0)
303303
TComplex Q2vecN = gfwCumN.Vec(2, fConfigNPow);
304304
TComplex Q2vecP = gfwCumP.Vec(2, fConfigNPow);
305-
TComplex Q2vec = gfwCum.Vec(2, fConfigNPow);
305+
TComplex Q2vecFull = gfwCumFull.Vec(2, fConfigNPow);
306306
TComplex Q3vecN = gfwCumN.Vec(3, fConfigNPow);
307307
TComplex Q3vecP = gfwCumP.Vec(3, fConfigNPow);
308-
TComplex Q3vec = gfwCum.Vec(3, fConfigNPow);
309-
310-
// TODO: move this part to later analysis development
311-
// compute the resolution from Q vectors estimated with different eta gaps
312-
// Double_t resGap = 0.0;
313-
// if (nentriesN > 0 && nentriesP > 0) {
314-
// resGap = (QvecP.Re() * QvecN.Re() + QvecP.Im() * QvecN.Im()) / (nentriesN * nentriesP);
315-
// }
308+
TComplex Q3vecFull = gfwCumFull.Vec(3, fConfigNPow);
316309

317310
// Fill the VarManager::fgValues with the Q vector quantities
318-
VarManager::FillQVectorFromGFW(collision, Q2vec, Q2vecN, Q2vecP, Q3vec, Q3vecN, Q3vecP, nentries, nentriesN, nentriesP);
311+
VarManager::FillQVectorFromGFW(collision, Q2vecFull, Q2vecN, Q2vecP, Q3vecFull, Q3vecN, Q3vecP, nentriesFull, nentriesN, nentriesP);
319312

320313
if (fConfigQA) {
321-
if (nentriesN * nentriesP * nentries != 0) {
314+
if (nentriesN * nentriesP * nentriesFull != 0) {
322315
fHistMan->FillHistClass("Event_BeforeCuts", VarManager::fgValues);
323316
if (fEventCut->IsSelected(VarManager::fgValues)) {
324317
fHistMan->FillHistClass("Event_AfterCuts", VarManager::fgValues);
@@ -333,7 +326,7 @@ struct AnalysisQvector {
333326
}
334327

335328
// Process to fill Q vector in a reduced event table for barrel/muon tracks flow related analyses
336-
void processQvector(MyEventsWithCent::iterator const& collisions, aod::BCs const& bcs, soa::Filtered<MyBarrelTracks> const& tracks)
329+
void processBarrelQvector(MyEventsWithCent::iterator const& collisions, aod::BCs const& bcs, soa::Filtered<MyBarrelTracks> const& tracks)
337330
{
338331
runFillQvector<gkEventFillMap, gkTrackFillMap>(collisions, bcs, tracks);
339332
}
@@ -344,7 +337,7 @@ struct AnalysisQvector {
344337
// do nothing
345338
}
346339

347-
PROCESS_SWITCH(AnalysisQvector, processQvector, "Run q-vector task", false);
340+
PROCESS_SWITCH(AnalysisQvector, processBarrelQvector, "Run q-vector task on barrel tracks", false);
348341
PROCESS_SWITCH(AnalysisQvector, processDummy, "Dummy function", false);
349342
};
350343

0 commit comments

Comments
 (0)