@@ -76,6 +76,7 @@ using namespace o2;
7676using namespace o2 ::framework;
7777using namespace o2 ::framework::expressions;
7878using namespace o2 ::analysis::genericframework;
79+ using namespace o2 ::analysis::genericframework::eventweight;
7980using namespace o2 ::aod::rctsel;
8081
8182#define O2_DEFINE_CONFIGURABLE (NAME, TYPE, DEFAULT, HELP ) Configurable<TYPE > NAME {#NAME , DEFAULT , HELP };
@@ -158,6 +159,7 @@ struct FlowTask {
158159 O2_DEFINE_CONFIGURABLE (cfgEfficiency, std::string, " " , " CCDB path to efficiency object" )
159160 O2_DEFINE_CONFIGURABLE (cfgEfficiencyForNch, std::string, " " , " CCDB path to efficiency object, only for Nch correction" )
160161 O2_DEFINE_CONFIGURABLE (cfgAcceptance, std::string, " " , " CCDB path to acceptance object" )
162+ O2_DEFINE_CONFIGURABLE (cfgUserPtVnEvWeightEnabled, bool , false , " 0: use unity weight; 1: use multiplicity weight" )
161163 O2_DEFINE_CONFIGURABLE (cfgUseSmallMemory, bool , false , " Use small memory mode" )
162164 O2_DEFINE_CONFIGURABLE (cfgConsistentEventFlag, int , 0 , " Flag to select consistent events - 0: off, 1: v2{2} gap calculable, 2: v2{4} full calculable, 4: v2{4} gap calculable, 8: v2{4} 3sub calculable" )
163165 Configurable<std::vector<float >> cfgConsistentEventVector{" cfgConsistentEventVector" , std::vector<float >{-0.8 , -0.5 , -0.4 , 0.4 , 0.5 , 0.8 }, " eta regions: left(min,max), mid(min,max), right(min,max)" };
@@ -659,6 +661,10 @@ struct FlowTask {
659661 gfwConfigs.Print ();
660662 fFCpt ->setUseCentralMoments (cfgUseCentralMoments);
661663 fFCpt ->setUseGapMethod (true );
664+ if (!cfgUserIO.cfgUserPtVnEvWeightEnabled )
665+ fFCpt ->setEventWeight (EventWeight::UnityWeight);
666+ else
667+ fFCpt ->setEventWeight (EventWeight::TupleWeight);
662668 fFCpt ->initialise (axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap);
663669 if (cfgEtaGapPtPtEnabled) {
664670 for (int i = 0 ; i < 4 ; ++i) { // o2-linter: disable=magic-number (maximum of 4 subevents)
@@ -677,6 +683,10 @@ struct FlowTask {
677683 if (doprocessMCGen) {
678684 fFCptgen ->setUseCentralMoments (cfgUseCentralMoments);
679685 fFCptgen ->setUseGapMethod (true );
686+ if (!cfgUserIO.cfgUserPtVnEvWeightEnabled )
687+ fFCptgen ->setEventWeight (EventWeight::UnityWeight);
688+ else
689+ fFCptgen ->setEventWeight (EventWeight::TupleWeight);
680690 fFCptgen ->initialise (axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap);
681691 if (cfgEtaGapPtPtEnabled)
682692 fFCptgen ->initialiseSubevent (axisIndependent, cfgMpar, etagapsPtPt.size (), cfgNbootstrap);
0 commit comments