@@ -38,6 +38,7 @@ using namespace o2::framework::expressions;
3838using namespace std ;
3939
4040using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::Qvectors>;
41+ using MyCollisionsWithSC = soa::Join<aod::Collisions, aod::EvSels, aod::QvectorsShifteds>;
4142using MyTracks = aod::Tracks;
4243
4344struct jEPFlowAnalysis {
@@ -151,6 +152,86 @@ struct jEPFlowAnalysis {
151152 epFlowHistograms.add (" hVertex" , " " , {HistType::kTH1F , {axisVertex}});
152153 }
153154
155+ void processWithSC (MyCollisionsWithSC::iterator const & coll, soa::Filtered<MyTracks> const & tracks, aod::BCsWithTimestamps const &)
156+ {
157+ if (cfgAddEvtSel) {
158+ if (std::abs (coll.posZ ()) > cfgVertexZ)
159+ return ;
160+ switch (cfgEvtSel) {
161+ case 0 : // Sel8
162+ if (!coll.sel8 ())
163+ return ;
164+ break ;
165+ case 1 : // PbPb standard
166+ if (!coll.sel8 () || !coll.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !coll.selection_bit (aod::evsel::kNoSameBunchPileup ))
167+ return ;
168+ break ;
169+ case 2 : // PbPb with pileup
170+ if (!coll.sel8 () || !coll.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) ||
171+ !coll.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !coll.selection_bit (aod::evsel::kNoSameBunchPileup ))
172+ return ;
173+ break ;
174+ case 3 : // Small systems (OO, NeNe, pp)
175+ if (!coll.sel8 () || !coll.selection_bit (aod::evsel::kNoSameBunchPileup ))
176+ return ;
177+ break ;
178+ default :
179+ LOGF (warning, " Event selection flag was not found, continuing without basic event selections!\n " );
180+ }
181+ // Check occupancy
182+ if (coll.trackOccupancyInTimeRange () > cfgMaxOccupancy || coll.trackOccupancyInTimeRange () < cfgMinOccupancy)
183+ return ;
184+ }
185+
186+ float cent = coll.cent ();
187+ epFlowHistograms.fill (HIST (" hCentrality" ), cent);
188+ epFlowHistograms.fill (HIST (" hVertex" ), coll.posZ ());
189+ float eps[3 ] = {0 .};
190+
191+ if (coll.qvecAmp ()[detId] < 1e-5 || coll.qvecAmp ()[refAId] < 1e-5 || coll.qvecAmp ()[refBId] < 1e-5 )
192+ return ;
193+
194+ for (int i = 0 ; i < cfgnMode; i++) { // loop over different harmonic orders
195+ harmInd = cfgnTotalSystem * i; // harmonic index to access corresponding Q-vector as all Q-vectors are in same vector
196+ eps[0 ] = helperEP.GetEventPlane (coll.qvecShiftedRe ()[detId + harmInd], coll.qvecShiftedIm ()[detId + harmInd], i + 2 );
197+ eps[1 ] = helperEP.GetEventPlane (coll.qvecShiftedRe ()[refAId + harmInd], coll.qvecShiftedIm ()[refAId + harmInd], i + 2 );
198+ eps[2 ] = helperEP.GetEventPlane (coll.qvecShiftedRe ()[refBId + harmInd], coll.qvecShiftedIm ()[refBId + harmInd], i + 2 );
199+
200+ float resNumA = helperEP.GetResolution (eps[0 ], eps[1 ], i + 2 );
201+ float resNumB = helperEP.GetResolution (eps[0 ], eps[2 ], i + 2 );
202+ float resDenom = helperEP.GetResolution (eps[1 ], eps[2 ], i + 2 );
203+
204+ epFlowHistograms.fill (HIST (" EpDet" ), i + 2 , cent, eps[0 ]);
205+ epFlowHistograms.fill (HIST (" EpRefA" ), i + 2 , cent, eps[1 ]);
206+ epFlowHistograms.fill (HIST (" EpRefB" ), i + 2 , cent, eps[2 ]);
207+
208+ epFlowHistograms.fill (HIST (" EpResDetRefA" ), i + 2 , cent, resNumA);
209+ epFlowHistograms.fill (HIST (" EpResDetRefB" ), i + 2 , cent, resNumB);
210+ epFlowHistograms.fill (HIST (" EpResRefARefB" ), i + 2 , cent, resDenom);
211+
212+ epFlowHistograms.fill (HIST (" EpResQvecDetRefAxx" ), i + 2 , cent, coll.qvecShiftedRe ()[detId + harmInd] * coll.qvecShiftedRe ()[refAId + harmInd] + coll.qvecShiftedIm ()[detId + harmInd] * coll.qvecShiftedIm ()[refAId + harmInd]);
213+ epFlowHistograms.fill (HIST (" EpResQvecDetRefAxy" ), i + 2 , cent, coll.qvecShiftedRe ()[refAId + harmInd] * coll.qvecShiftedIm ()[detId + harmInd] - coll.qvecShiftedRe ()[detId + harmInd] * coll.qvecShiftedIm ()[refAId + harmInd]);
214+ epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx" ), i + 2 , cent, coll.qvecShiftedRe ()[detId + harmInd] * coll.qvecShiftedRe ()[refBId + harmInd] + coll.qvecShiftedIm ()[detId + harmInd] * coll.qvecShiftedIm ()[refBId + harmInd]);
215+ epFlowHistograms.fill (HIST (" EpResQvecDetRefBxy" ), i + 2 , cent, coll.qvecShiftedRe ()[refBId + harmInd] * coll.qvecShiftedIm ()[detId + harmInd] - coll.qvecShiftedRe ()[detId + harmInd] * coll.qvecShiftedIm ()[refBId + harmInd]);
216+ epFlowHistograms.fill (HIST (" EpResQvecRefARefBxx" ), i + 2 , cent, coll.qvecShiftedRe ()[refAId + harmInd] * coll.qvecShiftedRe ()[refBId + harmInd] + coll.qvecShiftedIm ()[refAId + harmInd] * coll.qvecShiftedIm ()[refBId + harmInd]);
217+ epFlowHistograms.fill (HIST (" EpResQvecRefARefBxy" ), i + 2 , cent, coll.qvecShiftedRe ()[refBId + harmInd] * coll.qvecShiftedIm ()[refAId + harmInd] - coll.qvecShiftedRe ()[refAId + harmInd] * coll.qvecShiftedIm ()[refBId + harmInd]);
218+
219+ float weight = 1.0 ;
220+
221+ for (const auto & track : tracks) {
222+ float vn = std::cos ((i + 2 ) * (track.phi () - eps[0 ]));
223+ float vnSin = std::sin ((i + 2 ) * (track.phi () - eps[0 ]));
224+
225+ epFlowHistograms.fill (HIST (" vncos" ), i + 2 , cent, track.pt (), vn * weight);
226+ epFlowHistograms.fill (HIST (" vnsin" ), i + 2 , cent, track.pt (), vnSin * weight);
227+
228+ epFlowHistograms.fill (HIST (" SPvnxx" ), i + 2 , cent, track.pt (), (TMath::Cos (track.phi ()) * coll.qvecShiftedRe ()[detId + harmInd] + TMath::Sin (track.phi ()) * coll.qvecShiftedIm ()[detId + harmInd]) * weight);
229+ epFlowHistograms.fill (HIST (" SPvnxy" ), i + 2 , cent, track.pt (), (TMath::Sin (track.phi ()) * coll.qvecShiftedRe ()[detId + harmInd] - TMath::Cos (track.phi ()) * coll.qvecShiftedIm ()[detId + harmInd]) * weight);
230+ }
231+ }
232+ }
233+ PROCESS_SWITCH (jEPFlowAnalysis, processWithSC, " process with shift-corrected qvectors" , false );
234+
154235 void process (MyCollisions::iterator const & coll, soa::Filtered<MyTracks> const & tracks, aod::BCsWithTimestamps const &)
155236 {
156237 if (cfgAddEvtSel) {
@@ -233,6 +314,7 @@ struct jEPFlowAnalysis {
233314 deltapsiDet += ((1 / (1.0 * ishift)) * (-coeffshiftxDet * std::cos (ishift * static_cast <float >(i + 2 ) * eps[0 ]) + coeffshiftyDet * std::sin (ishift * static_cast <float >(i + 2 ) * eps[0 ])));
234315 deltapsiRefA += ((1 / (1.0 * ishift)) * (-coeffshiftxRefA * std::cos (ishift * static_cast <float >(i + 2 ) * eps[1 ]) + coeffshiftyRefA * std::sin (ishift * static_cast <float >(i + 2 ) * eps[1 ])));
235316 deltapsiRefB += ((1 / (1.0 * ishift)) * (-coeffshiftxRefB * std::cos (ishift * static_cast <float >(i + 2 ) * eps[2 ]) + coeffshiftyRefB * std::sin (ishift * static_cast <float >(i + 2 ) * eps[2 ])));
317+
236318 }
237319
238320 eps[0 ] += deltapsiDet;
@@ -263,8 +345,8 @@ struct jEPFlowAnalysis {
263345 epFlowHistograms.fill (HIST (" EpResQvecDetRefAxy" ), i + 2 , cent, qx_shifted[1 ] * qy_shifted[0 ] - qx_shifted[0 ] * qy_shifted[1 ]);
264346 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxx" ), i + 2 , cent, qx_shifted[0 ] * qx_shifted[2 ] + qy_shifted[0 ] * qy_shifted[2 ]);
265347 epFlowHistograms.fill (HIST (" EpResQvecDetRefBxy" ), i + 2 , cent, qx_shifted[2 ] * qy_shifted[0 ] - qx_shifted[0 ] * qy_shifted[2 ]);
266- epFlowHistograms.fill (HIST (" EpResQvecRefARefAxx " ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
267- epFlowHistograms.fill (HIST (" EpResQvecRefARefAxy " ), i + 2 , cent, qx_shifted[2 ] * qy_shifted[1 ] - qx_shifted[1 ] * qy_shifted[2 ]);
348+ epFlowHistograms.fill (HIST (" EpResQvecRefARefBxx " ), i + 2 , cent, qx_shifted[1 ] * qx_shifted[2 ] + qy_shifted[1 ] * qy_shifted[2 ]);
349+ epFlowHistograms.fill (HIST (" EpResQvecRefARefBxy " ), i + 2 , cent, qx_shifted[2 ] * qy_shifted[1 ] - qx_shifted[1 ] * qy_shifted[2 ]);
268350
269351 for (const auto & track : tracks) {
270352 float vn = std::cos ((i + 2 ) * (track.phi () - eps[0 ]));
@@ -278,6 +360,7 @@ struct jEPFlowAnalysis {
278360 }
279361 }
280362 }
363+ PROCESS_SWITCH (jEPFlowAnalysis, process, " default process" , true );
281364};
282365
283366WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments