@@ -78,6 +78,7 @@ struct FlowSP {
7878 O2_DEFINE_CONFIGURABLE (cfgTrackCutSize, float , 0.06 , " Spread of track cut" );
7979 // Additional event selections
8080 O2_DEFINE_CONFIGURABLE (cfgUseAdditionalEventCut, bool , true , " Bool to enable Additional Event Cut" );
81+ O2_DEFINE_CONFIGURABLE (cfgnSigmaMultCuts, int , 1 , " Sigma cut on Additional event cut: 1 (default), 2 or 3 sigma available" );
8182 O2_DEFINE_CONFIGURABLE (cfgMaxOccupancy, int , 10000 , " Maximum occupancy of selected events" );
8283 O2_DEFINE_CONFIGURABLE (cfgNoSameBunchPileupCut, bool , true , " kNoSameBunchPileupCut" );
8384 O2_DEFINE_CONFIGURABLE (cfgIsGoodZvtxFT0vsPV, bool , true , " kIsGoodZvtxFT0vsPV" );
@@ -296,6 +297,7 @@ struct FlowSP {
296297 registry.add <TProfile>(" qAqCXY" , " " , kTProfile , {axisCent});
297298 registry.add <TProfile>(" qAXqCY" , " " , kTProfile , {axisCent});
298299 registry.add <TProfile>(" qAYqCX" , " " , kTProfile , {axisCent});
300+ registry.add <TProfile>(" qAXYqCXY" , " " , kTProfile , {axisCent});
299301
300302 if (cfgFillQAHistos) {
301303 registry.add (" QA/after/PsiA_vs_Cent" , " " , {HistType::kTH2D , {axisPhiPlane, axisCent}});
@@ -363,15 +365,34 @@ struct FlowSP {
363365 registry.get <TH1>(HIST (" hTrackCount" ))->GetXaxis ()->SetBinLabel (trackSel_ParticleWeights + 1 , " Apply weights" );
364366
365367 if (cfgUseAdditionalEventCut) {
366- fMultPVCutLow = new TF1 (" fMultPVCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)" , 0 , 100 );
367- fMultPVCutLow ->SetParameters (3257.29 , -121.848 , 1.98492 , -0.0172128 , 6.47528e-05 , 154.756 , -1.86072 , -0.0274713 , 0.000633499 , -3.37757e-06 );
368- fMultPVCutHigh = new TF1 (" fMultPVCutHigh" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x + 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)" , 0 , 100 );
369- fMultPVCutHigh ->SetParameters (3257.29 , -121.848 , 1.98492 , -0.0172128 , 6.47528e-05 , 154.756 , -1.86072 , -0.0274713 , 0.000633499 , -3.37757e-06 );
370-
371- fMultCutLow = new TF1 (" fMultCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)" , 0 , 100 );
372- fMultCutLow ->SetParameters (1654.46 , -47.2379 , 0.449833 , -0.0014125 , 150.773 , -3.67334 , 0.0530503 , -0.000614061 , 3.15956e-06 );
373- fMultCutHigh = new TF1 (" fMultCutHigh" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x + 3.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)" , 0 , 100 );
374- fMultCutHigh ->SetParameters (1654.46 , -47.2379 , 0.449833 , -0.0014125 , 150.773 , -3.67334 , 0.0530503 , -0.000614061 , 3.15956e-06 );
368+ // Fitted for LHC23zzh_pass4
369+ fMultPVCutLow = new TF1 (" fMultPVCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 100 );
370+ fMultPVCutLow ->SetParameters (2942.55 , -103.111 , 1.4397 , -0.00974862 , 2.71433e-05 );
371+ if (cfgnSigmaMultCuts == 2 )
372+ fMultPVCutLow ->SetParameters (2665.68 , -93.3784 , 1.27137 , -0.00818936 , 2.115e-05 );
373+ if (cfgnSigmaMultCuts == 3 )
374+ fMultPVCutLow ->SetParameters (2389.99 , -83.8483 , 1.11062 , -0.00672263 , 1.54725e-05 );
375+
376+ fMultPVCutHigh = new TF1 (" fMultPVCutHigh" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 100 );
377+ fMultPVCutHigh ->SetParameters (3508.13 , -124.831 , 1.87871 , -0.0145343 , 4.80688e-05 );
378+ if (cfgnSigmaMultCuts == 2 )
379+ fMultPVCutHigh ->SetParameters (3787.93 , -135.184 , 2.07683 , -0.0165997 , 5.68725e-05 );
380+ if (cfgnSigmaMultCuts == 3 )
381+ fMultPVCutHigh ->SetParameters (4067.4 , -145.485 , 2.27273 , -0.0186308 , 6.5501e-05 );
382+
383+ fMultCutLow = new TF1 (" fMultCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 100 );
384+ fMultCutLow ->SetParameters (1566.5 , -48.2114 , 0.529522 , -0.00235284 , 3.01132e-06 );
385+ if (cfgnSigmaMultCuts == 2 )
386+ fMultCutLow ->SetParameters (1307.92 , -39.9168 , 0.412675 , -0.00148081 , 1.10868e-07 );
387+ if (cfgnSigmaMultCuts == 3 )
388+ fMultCutLow ->SetParameters (1048.48 , -31.4568 , 0.287794 , -0.00046847 , -3.5909e-06 );
389+
390+ fMultCutHigh = new TF1 (" fMultCutHigh" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x" , 0 , 100 );
391+ fMultCutHigh ->SetParameters (2089.73 , -65.9772 , 0.816781 , -0.00496563 , 1.34314e-05 );
392+ if (cfgnSigmaMultCuts == 2 )
393+ fMultCutHigh ->SetParameters (2350.39 , -74.6939 , 0.953287 , -0.006162 , 1.80808e-05 );
394+ if (cfgnSigmaMultCuts == 3 )
395+ fMultCutHigh ->SetParameters (2610.98 , -83.3983 , 1.0893 , -0.00735094 , 2.26929e-05 );
375396 }
376397
377398 if (cfgUseAdditionalTrackCut) {
@@ -573,13 +594,15 @@ struct FlowSP {
573594
574595 phimodn += o2::constants::math::PI / 18.0 ; // to center gap in the middle
575596 phimodn = fmod (phimodn, o2::constants::math::PI / 9.0 );
576- registry.fill (HIST (" QA/before/pt_phi" ), track.pt (), phimodn);
597+ if (cfgFillQAHistos)
598+ registry.fill (HIST (" QA/before/pt_phi" ), track.pt (), phimodn);
577599
578600 if (cfgUseAdditionalTrackCut) {
579601 if (phimodn < fPhiCutHigh ->Eval (track.pt ()) && phimodn > fPhiCutLow ->Eval (track.pt ()))
580602 return false ; // reject track
581603 }
582- registry.fill (HIST (" QA/after/pt_phi" ), track.pt (), phimodn);
604+ if (cfgFillQAHistos)
605+ registry.fill (HIST (" QA/after/pt_phi" ), track.pt (), phimodn);
583606 registry.fill (HIST (" hTrackCount" ), trackSel_TPCBoundary);
584607 return true ;
585608 }
@@ -713,7 +736,6 @@ struct FlowSP {
713736 void processData (UsedCollisions::iterator const & collision, aod::BCsWithTimestamps const &, UsedTracks const & tracks)
714737 {
715738 registry.fill (HIST (" hEventCount" ), evSel_FilteredEvent);
716-
717739 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
718740 auto field = (cfgMagField == 99999 ) ? getMagneticField (bc.timestamp ()) : cfgMagField;
719741
@@ -776,6 +798,7 @@ struct FlowSP {
776798
777799 registry.fill (HIST (" qAXqCY" ), centrality, qxA * qyC);
778800 registry.fill (HIST (" qAYqCX" ), centrality, qyA * qxC);
801+ registry.fill (HIST (" qAXYqCXY" ), centrality, qyA * qxC + qxA * qyC);
779802
780803 registry.fill (HIST (" qAqCX" ), centrality, qxA * qxC);
781804 registry.fill (HIST (" qAqCY" ), centrality, qyA * qyC);
@@ -811,18 +834,21 @@ struct FlowSP {
811834 }
812835
813836 for (const auto & track : tracks) {
814- registry.fill (HIST (" QA/before/hPt_inclusive" ), track.pt ());
837+ if (cfgFillQAHistos)
838+ registry.fill (HIST (" QA/before/hPt_inclusive" ), track.pt ());
839+
815840 registry.fill (HIST (" hTrackCount" ), trackSel_FilteredTracks);
816841
817842 float weff = 1 , wacc = 1 ;
818843 float weffP = 1 , waccP = 1 ;
819844 float weffN = 1 , waccN = 1 ;
820845
821846 if (!trackSelected (track, field))
822- return ;
847+ continue ;
823848
824849 if (track.sign () == 0.0 )
825- return ;
850+ continue ;
851+
826852 registry.fill (HIST (" hTrackCount" ), trackSel_ZeroCharge);
827853 bool pos = (track.sign () > 0 ) ? true : false ;
828854
@@ -839,15 +865,16 @@ struct FlowSP {
839865
840866 // Set weff and wacc for inclusice, negative and positive hadrons
841867 if (!setCurrentParticleWeights (kInclusive , weff, wacc, track.phi (), track.eta (), track.pt (), vtxz))
842- return ;
868+ continue ;
843869 if (pos && !setCurrentParticleWeights (kPositive , weffP, waccP, track.phi (), track.eta (), track.pt (), vtxz))
844- return ;
870+ continue ;
845871 if (!pos && !setCurrentParticleWeights (kNegative , weffN, waccN, track.phi (), track.eta (), track.pt (), vtxz))
846- return ;
872+ continue ;
847873
848874 registry.fill (HIST (" hTrackCount" ), trackSel_ParticleWeights);
849875
850- registry.fill (HIST (" QA/after/hPt_inclusive" ), track.pt (), wacc * weff);
876+ if (cfgFillQAHistos)
877+ registry.fill (HIST (" QA/after/hPt_inclusive" ), track.pt (), wacc * weff);
851878
852879 // // constrain angle to 0 -> [0,0+2pi]
853880 auto phi = RecoDecay::constrainAngle (track.phi (), 0 );
@@ -907,26 +934,35 @@ struct FlowSP {
907934
908935 auto mcParticle = track.mcParticle ();
909936 if (!mcParticle.isPhysicalPrimary ())
910- return ;
937+ continue ;
911938
912939 if (mcParticle.eta () < -cfgEta || mcParticle.eta () > cfgEta || mcParticle.pt () < cfgPtmin || mcParticle.pt () > cfgPtmax || track.tpcNClsFound () < cfgNcls)
913- return ;
940+ continue ;
914941
915942 if (track.sign () == 0.0 )
916- return ;
943+ continue ;
917944 bool pos = (track.sign () > 0 ) ? true : false ;
918945
919- registry.fill (HIST (" QA/before/hPt_inclusive" ), track.pt ());
920- if (pos) {
921- registry.fill (HIST (" QA/before/hPt_positive" ), track.pt ());
922- } else {
923- registry.fill (HIST (" QA/before/hPt_negative" ), track.pt ());
946+ if (cfgFillQAHistos) {
947+ registry.fill (HIST (" QA/before/hPt_inclusive" ), track.pt ());
948+ if (pos) {
949+ registry.fill (HIST (" QA/before/hPt_positive" ), track.pt ());
950+ } else {
951+ registry.fill (HIST (" QA/before/hPt_negative" ), track.pt ());
952+ }
924953 }
925954
926955 if (!trackSelected (track, field))
927- return ;
956+ continue ;
928957
929- registry.fill (HIST (" QA/after/hPt_inclusive" ), track.pt ());
958+ if (cfgFillQAHistos) {
959+ registry.fill (HIST (" QA/after/hPt_inclusive" ), track.pt ());
960+ if (pos) {
961+ registry.fill (HIST (" QA/after/hPt_positive" ), track.pt ());
962+ } else {
963+ registry.fill (HIST (" QA/after/hPt_negative" ), track.pt ());
964+ }
965+ }
930966
931967 fillTrackQA<kInclusive >(track, vtxz);
932968
@@ -937,8 +973,9 @@ struct FlowSP {
937973 Filter mcCollFilter = nabs(aod::mccollision::posZ) < cfgVtxZ;
938974 void processMCGen (soa::Filtered<aod::McCollisions>::iterator const & mcCollision, soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::CentFT0Cs, aod::CentFV0As, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentNGlobals>> const & collisions, aod::McParticles const & particles)
939975 {
940- if (collisions.size () != 1 )
976+ if (collisions.size () != 1 ) { // check if MC collision is only reconstructed once! (https://indico.cern.ch/event/1425820/contributions/6170879/attachments/2947721/5180548/DDChinellato-O2AT4-HandsOn-03a.pdf)
941977 return ;
978+ }
942979 float centrality = -1 ;
943980 for (const auto & collision : collisions) {
944981 centrality = collision.centFT0C ();
@@ -959,19 +996,18 @@ struct FlowSP {
959996
960997 float vtxz = mcCollision.posZ ();
961998
962- for (const auto & track : particles) {
963-
964- if (!track.isPhysicalPrimary ())
999+ for (const auto & particle : particles) {
1000+ if (!particle.isPhysicalPrimary ())
9651001 continue ;
9661002
967- registry.fill (HIST (" trackMCGen/before/pt_gen_incl" ), track .pt ());
968- registry.fill (HIST (" trackMCGen/before/phi_eta_vtxZ_gen" ), track .phi (), track .eta (), vtxz);
1003+ registry.fill (HIST (" trackMCGen/before/pt_gen_incl" ), particle .pt ());
1004+ registry.fill (HIST (" trackMCGen/before/phi_eta_vtxZ_gen" ), particle .phi (), particle .eta (), vtxz);
9691005
970- if (track .eta () < -cfgEta || track .eta () > cfgEta || track .pt () < cfgPtmin || track .pt () > cfgPtmax)
971- return ;
1006+ if (particle .eta () < -cfgEta || particle .eta () > cfgEta || particle .pt () < cfgPtmin || particle .pt () > cfgPtmax)
1007+ continue ;
9721008
973- registry.fill (HIST (" trackMCGen/after/pt_gen_incl" ), track .pt ());
974- registry.fill (HIST (" trackMCGen/after/phi_eta_vtxZ_gen" ), track .phi (), track .eta (), vtxz);
1009+ registry.fill (HIST (" trackMCGen/after/pt_gen_incl" ), particle .pt ());
1010+ registry.fill (HIST (" trackMCGen/after/phi_eta_vtxZ_gen" ), particle .phi (), particle .eta (), vtxz);
9751011 }
9761012 }
9771013 PROCESS_SWITCH (FlowSP, processMCGen, " Process analysis for MC generated events" , false );
0 commit comments