@@ -353,6 +353,53 @@ struct DQEventQvector {
353353 // }
354354 }
355355
356+ // Templated function instantianed for all of the process functions
357+ template <uint32_t TEventFillMap, typename TEvent, typename TFT0s>
358+ void runFillQvectorFromCentralFWWithFT0CCumulants (TEvent const & collision, TFT0s const & /* ft0s*/ )
359+ {
360+ VarManager::ResetValues (0 , VarManager::kNVars );
361+ VarManager::FillEvent<TEventFillMap>(collision);
362+
363+ float S11C = collision.sumAmplFT0C ();
364+ float S12C = 0 .f ;
365+ float S21C = S11C * S11C;
366+
367+ // Compute sum of squares of amplitudes from FT0C for flow analysis
368+ if (collision.has_foundFT0 ()) {
369+ auto ft0 = collision.foundFT0 ();
370+ auto const & ampC = ft0.amplitudeC ();
371+ for (auto amp : ampC) {
372+ if (amp > 0 .f ) {
373+ S12C += amp * amp;
374+ }
375+ }
376+ }
377+ VarManager::FillQVectorFromCentralFW (collision);
378+ std::complex <double > Q21C (collision.qvecFT0CRe () * S11C, collision.qvecFT0CIm () * S11C);
379+
380+ // Fill necessary quantities for cumulant calculations with weighted Q-vectors
381+ float M11REF = S21C - S12C;
382+ float CORR2REF = (norm (Q21C) - S12C) / M11REF;
383+ CORR2REF = std::isnan (M11REF) || std::isinf (M11REF) || std::isnan (CORR2REF) || std::isinf (CORR2REF) ? 0 : CORR2REF;
384+ M11REF = std::isnan (M11REF) || std::isinf (M11REF) || std::isnan (CORR2REF) || std::isinf (CORR2REF) ? 0 : M11REF;
385+
386+ if (fConfigQA ) {
387+ fHistMan ->FillHistClass (" Event_BeforeCuts_centralFW" , VarManager::fgValues);
388+ if (fEventCut ->IsSelected (VarManager::fgValues)) {
389+ fHistMan ->FillHistClass (" Event_AfterCuts_centralFW" , VarManager::fgValues);
390+ }
391+ }
392+
393+ if (fEventCut ->IsSelected (VarManager::fgValues)) {
394+ // temporarily removed --> this table is filled in the table-maker directly
395+ // eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(),
396+ // collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg());
397+ // eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall());
398+ eventRefFlow (M11REF, -9999 , -9999 , CORR2REF, -9999 , -9999 , VarManager::fgValues[VarManager::kCentFT0C ]);
399+ eventQvectorExtra (-9999 , -9999 , -9999 , -9999 , S11C, S12C, -9999 , -9999 );
400+ }
401+ }
402+
356403 // Templated function instantianed for all of the process functions
357404 template <uint32_t TEventFillMap, uint32_t TTrackFillMap, typename TEvent, typename TTracks>
358405 void runFillQvector (TEvent const & collision, MyBcs const &, TTracks const & tracks1, aod::Zdcs const &)
@@ -576,6 +623,12 @@ struct DQEventQvector {
576623 runFillQvectorFromCentralFW<gkEventFillMapRun3>(collisions);
577624 }
578625
626+ // Process to fill Q vector using barrel tracks in a reduced event table for barrel/muon tracks flow related analyses Run 3
627+ void processCentralQvectorWithFT0CCumulants (MyEventsWithCentQvectRun3::iterator const & collision, aod::FT0s const & ft0s)
628+ {
629+ runFillQvectorFromCentralFWWithFT0CCumulants<gkEventFillMapRun3>(collision, ft0s);
630+ }
631+
579632 // Process to fill Q vector using forward tracks in a reduced event table for barrel/muon tracks flow related analyses Run 3
580633 void processForwardQvector (MyEventsWithCentRun3::iterator const & collisions, MyBcs const & bcs, soa::Filtered<aod::MFTTracks> const & tracks, aod::Zdcs const & zdcs)
581634 {
@@ -592,6 +645,7 @@ struct DQEventQvector {
592645 PROCESS_SWITCH (DQEventQvector, processBarrelQvector, " Run q-vector task on barrel tracks for Run3" , false );
593646 PROCESS_SWITCH (DQEventQvector, processAllQvector, " Run q-vector task on barrel tracks for Run3 and using central q-vector" , false );
594647 PROCESS_SWITCH (DQEventQvector, processCentralQvector, " Run q-vector task using central q-vector" , false );
648+ PROCESS_SWITCH (DQEventQvector, processCentralQvectorWithFT0CCumulants, " Run q-vector task using central q-vector with FT0C cumulants" , false );
595649 PROCESS_SWITCH (DQEventQvector, processForwardQvector, " Run q-vector task on forward tracks for Run3" , false );
596650 PROCESS_SWITCH (DQEventQvector, processDummy, " Dummy function" , false );
597651};
0 commit comments