@@ -186,8 +186,6 @@ struct TableMaker {
186186 Produces<ReducedEventsExtended> eventExtended;
187187 Produces<ReducedEventsVtxCov> eventVtxCov;
188188 Produces<ReducedEventsInfo> eventInfo;
189- Produces<ReducedEventsQvectorCentr> eventQvectorCentr;
190- Produces<ReducedEventsQvectorCentrExtra> eventQvectorCentrExtra;
191189 Produces<ReducedZdcs> zdc;
192190 Produces<ReducedFITs> fit;
193191 Produces<ReducedEventsMultPV> multPV;
@@ -208,6 +206,14 @@ struct TableMaker {
208206 Produces<ReducedMFTsExtra> mftTrackExtra;
209207 Produces<ReducedMFTAssoc> mftAssoc;
210208
209+ // Q-vector related tables, to be filled only if the user selects the corresponding option; since they are not needed for the skimming, we keep them in a separate group to avoid filling them when not needed
210+ struct : ProducesGroup {
211+ Produces<ReducedEventsQvectorCentr> eventQvectorCentr;
212+ Produces<ReducedEventsQvectorCentrExtra> eventQvectorCentrExtra;
213+ Produces<ReducedEventsQvectorExtra> eventQvectorExtra;
214+ Produces<ReducedEventsRefFlow> eventRefFlow;
215+ } qvecGroup;
216+
211217 OutputObj<THashList> fOutputList {" output" }; // ! the histogram manager output list
212218 OutputObj<TList> fStatsList {" Statistics" }; // ! skimming statistics
213219
@@ -288,6 +294,12 @@ struct TableMaker {
288294 Configurable<bool > fConfigSaveElectronSample {" cfgSaveElectronSample" , false , " If true, only save electron sample" };
289295 } fConfigPostCalibTPC ;
290296
297+ //
298+ struct : ConfigurableGroup {
299+ Configurable<bool > fConfigFT0CCumulant {" cfgFT0CCumulant" , false ,
300+ " If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)" };
301+ } fConfigQvector ;
302+
291303 struct : ConfigurableGroup {
292304 // Track related options
293305 Configurable<bool > fPropTrack {" cfgPropTrack" , true , " Propagate tracks to associated collision to recalculate DCA and momentum vector" };
@@ -468,7 +480,7 @@ struct TableMaker {
468480
469481 // Check whether we have to define barrel or muon histograms
470482 bool enableBarrelHistos = (context.mOptions .get <bool >(" processPPWithFilter" ) || context.mOptions .get <bool >(" processPPWithFilterBarrelOnly" ) || context.mOptions .get <bool >(" processPPBarrelOnly" ) ||
471- context.mOptions .get <bool >(" processPbPb" ) || context.mOptions .get <bool >(" processPbPbBarrelOnly" ) || context.mOptions .get <bool >(" processPbPbBarrelOnlyWithV0Bits" ) || context.mOptions .get <bool >(" processPbPbBarrelOnlyWithV0BitsNoTOF" )) ||
483+ context.mOptions .get <bool >(" processPbPb" ) || context.mOptions .get <bool >(" processPbPbBarrelOnly" ) || context.mOptions .get <bool >(" processPbPbBarrelOnlyWithQvect " ) || context. mOptions . get < bool >( " processPbPbBarrelOnlyWithV0Bits" ) || context.mOptions .get <bool >(" processPbPbBarrelOnlyWithV0BitsNoTOF" )) ||
472484 context.mOptions .get <bool >(" processPbPbWithFilterBarrelOnly" ) || context.mOptions .get <bool >(" processPPBarrelOnlyWithV0s" ) || context.mOptions .get <bool >(" processPbPbBarrelOnlyNoTOF" );
473485
474486 bool enableMuonHistos = (context.mOptions .get <bool >(" processPPWithFilter" ) || context.mOptions .get <bool >(" processPPWithFilterMuonOnly" ) || context.mOptions .get <bool >(" processPPWithFilterMuonMFT" ) || context.mOptions .get <bool >(" processPPMuonOnly" ) || context.mOptions .get <bool >(" processPPRealignedMuonOnly" ) || context.mOptions .get <bool >(" processPPMuonMFT" ) || context.mOptions .get <bool >(" processPPMuonMFTWithMultsExtra" ) ||
@@ -1178,9 +1190,36 @@ struct TableMaker {
11781190 eventInfo (collision.globalIndex ());
11791191
11801192 if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0 ) {
1181- 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 (),
1193+ qvecGroup. 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 (),
11821194 collision.sumAmplFT0A (), collision.sumAmplFT0C (), collision.sumAmplFT0M (), collision.sumAmplFV0A (), collision.nTrkTPCpos (), collision.nTrkTPCneg ());
1183- eventQvectorCentrExtra (collision.qvecTPCallRe (), collision.qvecTPCallIm (), collision.nTrkTPCall ());
1195+ qvecGroup.eventQvectorCentrExtra (collision.qvecTPCallRe (), collision.qvecTPCallIm (), collision.nTrkTPCall ());
1196+
1197+ if (fConfigQvector .fConfigFT0CCumulant ) {
1198+ // FT0C cumulants for RefFlow and QvectorExtra
1199+ float S11C = collision.sumAmplFT0C ();
1200+ float S12C = 0 .f ;
1201+ if constexpr (!std::is_same_v<std::decay_t <TFt0s>, std::nullptr_t >) {
1202+ if (collision.has_foundFT0 ()) {
1203+ auto ft0 = collision.foundFT0 ();
1204+ for (auto amp : ft0.amplitudeC ()) {
1205+ if (amp > 0 .f ) {
1206+ S12C += amp * amp;
1207+ }
1208+ }
1209+ }
1210+ }
1211+ float S21C = S11C * S11C;
1212+ float M11REF = S21C - S12C;
1213+ std::complex <double > Q21C (collision.qvecFT0CRe () * S11C, collision.qvecFT0CIm () * S11C);
1214+ float CORR2REF = (std::norm (Q21C) - S12C) / M11REF;
1215+
1216+ if (std::isnan (M11REF) || std::isinf (M11REF) || std::isnan (CORR2REF) || std::isinf (CORR2REF)) {
1217+ M11REF = 0 .f ;
1218+ CORR2REF = 0 .f ;
1219+ }
1220+ qvecGroup.eventRefFlow (M11REF, -9999 , -9999 , CORR2REF, -9999 , -9999 , VarManager::fgValues[VarManager::kCentFT0C ]);
1221+ qvecGroup.eventQvectorExtra (-9999 , -9999 , -9999 , -9999 , S11C, S12C, -9999 , -9999 );
1222+ }
11841223 }
11851224
11861225 if constexpr ((TEventFillMap & VarManager::ObjTypes::Zdc) > 0 ) {
@@ -1926,6 +1965,16 @@ struct TableMaker {
19261965 fullSkimming<gkEventFillMapWithCentAndMults, gkTrackFillMapWithCov, 0u , 0u >(collisions, bcs, nullptr , tracksBarrel, nullptr , nullptr , trackAssocs, nullptr , nullptr , nullptr , nullptr , nullptr , nullptr );
19271966 }
19281967
1968+ // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter
1969+ void processPbPbBarrelOnlyWithQvect (MyEventsWithCentAndMultsQvect const & collisions, MyBCs const & bcs,
1970+ MyBarrelTracksWithCov const & tracksBarrel,
1971+ TrackAssoc const & trackAssocs, aod::FT0s& ft0s)
1972+ {
1973+ computeOccupancyEstimators (collisions, tracksPosWithCov, tracksNegWithCov, presliceWithCov, bcs);
1974+ computeCollMergingTag (collisions, tracksBarrel, presliceWithCov);
1975+ fullSkimming<gkEventFillMapWithCentAndMultsQvect, gkTrackFillMapWithCov, 0u , 0u >(collisions, bcs, nullptr , tracksBarrel, nullptr , nullptr , trackAssocs, nullptr , nullptr , nullptr , ft0s, nullptr , nullptr );
1976+ }
1977+
19291978 // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no TOF
19301979 void processPbPbBarrelOnlyNoTOF (MyEventsWithCentAndMults const & collisions, MyBCs const & bcs,
19311980 MyBarrelTracksWithCovNoTOF const & tracksBarrel,
@@ -2027,6 +2076,7 @@ struct TableMaker {
20272076 PROCESS_SWITCH (TableMaker, processPPMuonMFTWithMultsExtra, " Build muon + mft DQ skimmed data model typically for pp/p-Pb and UPC Pb-Pb" , false );
20282077 PROCESS_SWITCH (TableMaker, processPbPb, " Build full DQ skimmed data model typically for Pb-Pb, w/o event filtering" , false );
20292078 PROCESS_SWITCH (TableMaker, processPbPbBarrelOnly, " Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering" , false );
2079+ PROCESS_SWITCH (TableMaker, processPbPbBarrelOnlyWithQvect, " Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering with event properties and flow" , false );
20302080 PROCESS_SWITCH (TableMaker, processPbPbBarrelOnlyNoTOF, " Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering, no TOF" , false );
20312081 PROCESS_SWITCH (TableMaker, processPbPbWithFilterBarrelOnly, " Build barrel only DQ skimmed data model typically for UPC Pb-Pb, w/ event filtering" , false );
20322082 PROCESS_SWITCH (TableMaker, processPbPbBarrelOnlyWithV0Bits, " Build barrel only DQ skimmed data model typically for Pb-Pb, w/ V0 bits, w/o event filtering" , false );
0 commit comments