Browse Source

Adapted qa.cfg for STAR FXT 3 GeV, added v3, v4 wrt RP

PeterParfenov 8 months ago
parent
commit
5746a4523c
5 changed files with 1031 additions and 113 deletions
  1. 325 3
      bin/main.cpp
  2. 0 65
      qa.cfg
  3. 127 0
      qa_STAR_3gev_20M.cfg
  4. 500 42
      utility/Utility.cxx
  5. 79 3
      utility/Utility.h

+ 325 - 3
bin/main.cpp

@@ -177,6 +177,10 @@ int main(int argc, char **argv)
       std::cout << "Cut_v1_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax_pr << std::endl;
       std::cout << "Cut_v1_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin_pr << std::endl;
       std::cout << "Cut_v1_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax_pr << std::endl;
+      std::cout << "Cut_v1_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmin_ne << std::endl;
+      std::cout << "Cut_v1_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax_ne << std::endl;
+      std::cout << "Cut_v1_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin_ne << std::endl;
+      std::cout << "Cut_v1_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax_ne << std::endl;
     }
     if (qaUtility::GetInstance()->Is_v2)
     {
@@ -219,6 +223,102 @@ int main(int argc, char **argv)
       std::cout << "Cut_v2_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax_pr << std::endl;
       std::cout << "Cut_v2_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin_pr << std::endl;
       std::cout << "Cut_v2_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax_pr << std::endl;
+      std::cout << "Cut_v2_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmin_ne << std::endl;
+      std::cout << "Cut_v2_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax_ne << std::endl;
+      std::cout << "Cut_v2_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin_ne << std::endl;
+      std::cout << "Cut_v2_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax_ne << std::endl;
+    }
+    if (qaUtility::GetInstance()->Is_v3)
+    {
+      std::cout << "Is_v3 = " << qaUtility::GetInstance()->Is_v3 << std::endl;
+      std::cout << "Cut_v3_Event_bmin = " << qaUtility::GetInstance()->Cut_v3_Event_bmin << std::endl;
+      std::cout << "Cut_v3_Event_bmax = " << qaUtility::GetInstance()->Cut_v3_Event_bmax << std::endl;
+      std::cout << "Cut_v3_Event_bCent[" << qaUtility::GetInstance()->Cut_v3_Event_bCent.size() << "] = {";
+      for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size(); i++)
+      {
+        std::cout << qaUtility::GetInstance()->Cut_v3_Event_bCent.at(i);
+        if (i != (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size() - 1)
+          std::cout << ", ";
+        else
+          std::cout << "};" << std::endl;
+      }
+      std::cout << "Cut_v3_Event_mCent[" << qaUtility::GetInstance()->Cut_v3_Event_mCent.size() << "] = {";
+      for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.size(); i++)
+      {
+        std::cout << (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.at(i);
+        if (i != (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.size() - 1)
+          std::cout << ", ";
+        else
+          std::cout << "};" << std::endl;
+      }
+      std::cout << "Cut_v3_Particle_ptmin = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin << std::endl;
+      std::cout << "Cut_v3_Particle_ptmax = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax << std::endl;
+      std::cout << "Cut_v3_Particle_etamin = " << qaUtility::GetInstance()->Cut_v3_Particle_etamin << std::endl;
+      std::cout << "Cut_v3_Particle_etamax = " << qaUtility::GetInstance()->Cut_v3_Particle_etamax << std::endl;
+      std::cout << "Cut_v3_Particle_ymin = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin << std::endl;
+      std::cout << "Cut_v3_Particle_ymax = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax << std::endl;
+      std::cout << "Cut_v3_Particle_ptmin_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_pi << std::endl;
+      std::cout << "Cut_v3_Particle_ptmax_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_pi << std::endl;
+      std::cout << "Cut_v3_Particle_ymin_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_pi << std::endl;
+      std::cout << "Cut_v3_Particle_ymax_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_pi << std::endl;
+      std::cout << "Cut_v3_Particle_ptmin_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_ka << std::endl;
+      std::cout << "Cut_v3_Particle_ptmax_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_ka << std::endl;
+      std::cout << "Cut_v3_Particle_ymin_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_ka << std::endl;
+      std::cout << "Cut_v3_Particle_ymax_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_ka << std::endl;
+      std::cout << "Cut_v3_Particle_ptmin_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_pr << std::endl;
+      std::cout << "Cut_v3_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_pr << std::endl;
+      std::cout << "Cut_v3_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_pr << std::endl;
+      std::cout << "Cut_v3_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_pr << std::endl;
+      std::cout << "Cut_v3_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_ne << std::endl;
+      std::cout << "Cut_v3_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_ne << std::endl;
+      std::cout << "Cut_v3_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_ne << std::endl;
+      std::cout << "Cut_v3_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_ne << std::endl;
+    }
+    if (qaUtility::GetInstance()->Is_v4)
+    {
+      std::cout << "Is_v4 = " << qaUtility::GetInstance()->Is_v4 << std::endl;
+      std::cout << "Cut_v4_Event_bmin = " << qaUtility::GetInstance()->Cut_v4_Event_bmin << std::endl;
+      std::cout << "Cut_v4_Event_bmax = " << qaUtility::GetInstance()->Cut_v4_Event_bmax << std::endl;
+      std::cout << "Cut_v4_Event_bCent[" << qaUtility::GetInstance()->Cut_v4_Event_bCent.size() << "] = {";
+      for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size(); i++)
+      {
+        std::cout << qaUtility::GetInstance()->Cut_v4_Event_bCent.at(i);
+        if (i != (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size() - 1)
+          std::cout << ", ";
+        else
+          std::cout << "};" << std::endl;
+      }
+      std::cout << "Cut_v4_Event_mCent[" << qaUtility::GetInstance()->Cut_v4_Event_mCent.size() << "] = {";
+      for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.size(); i++)
+      {
+        std::cout << (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.at(i);
+        if (i != (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.size() - 1)
+          std::cout << ", ";
+        else
+          std::cout << "};" << std::endl;
+      }
+      std::cout << "Cut_v4_Particle_ptmin = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin << std::endl;
+      std::cout << "Cut_v4_Particle_ptmax = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax << std::endl;
+      std::cout << "Cut_v4_Particle_etamin = " << qaUtility::GetInstance()->Cut_v4_Particle_etamin << std::endl;
+      std::cout << "Cut_v4_Particle_etamax = " << qaUtility::GetInstance()->Cut_v4_Particle_etamax << std::endl;
+      std::cout << "Cut_v4_Particle_ymin = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin << std::endl;
+      std::cout << "Cut_v4_Particle_ymax = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax << std::endl;
+      std::cout << "Cut_v4_Particle_ptmin_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_pi << std::endl;
+      std::cout << "Cut_v4_Particle_ptmax_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_pi << std::endl;
+      std::cout << "Cut_v4_Particle_ymin_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_pi << std::endl;
+      std::cout << "Cut_v4_Particle_ymax_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_pi << std::endl;
+      std::cout << "Cut_v4_Particle_ptmin_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_ka << std::endl;
+      std::cout << "Cut_v4_Particle_ptmax_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_ka << std::endl;
+      std::cout << "Cut_v4_Particle_ymin_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_ka << std::endl;
+      std::cout << "Cut_v4_Particle_ymax_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_ka << std::endl;
+      std::cout << "Cut_v4_Particle_ptmin_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_pr << std::endl;
+      std::cout << "Cut_v4_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_pr << std::endl;
+      std::cout << "Cut_v4_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_pr << std::endl;
+      std::cout << "Cut_v4_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_pr << std::endl;
+      std::cout << "Cut_v4_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_ne << std::endl;
+      std::cout << "Cut_v4_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_ne << std::endl;
+      std::cout << "Cut_v4_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_ne << std::endl;
+      std::cout << "Cut_v4_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_ne << std::endl;
     }
     std::cout << std::endl;
   }
@@ -226,9 +326,11 @@ int main(int argc, char **argv)
   if (qaUtility::GetInstance()->Is_minbias != 1 &&
       qaUtility::GetInstance()->Is_refmult != 1 &&
       qaUtility::GetInstance()->Is_v1 != 1 &&
-      qaUtility::GetInstance()->Is_v2 != 1)
+      qaUtility::GetInstance()->Is_v2 != 1 &&
+      qaUtility::GetInstance()->Is_v3 != 1 &&
+      qaUtility::GetInstance()->Is_v4 != 1)
   {
-    std::cerr << "No options were chosen (minbias, refmult, v1, v2). Exiting..." << std::endl;
+    std::cerr << "No options were chosen (minbias, refmult, v1, v2, v3, v4). Exiting..." << std::endl;
     return 100;
   }
 
@@ -312,6 +414,30 @@ int main(int argc, char **argv)
   TProfile *p_v2_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
   TProfile *p_v2_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
 
+  TH2D *h2_v3_Particle_pteta = new TH2D("h2_v3_Particle_pteta", "dN/dp_{T}d#eta v3;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
+  TH2D *h2_v3_Event_bCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
+  TH2D *h2_v3_Event_mCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
+  TProfile2D *p2_v3_PID_b_pt[qaUtility::GetInstance()->npid];
+  TProfile2D *p2_v3_PID_b_y[qaUtility::GetInstance()->npid];
+  TProfile2D *p2_v3_PID_M_pt[qaUtility::GetInstance()->npid];
+  TProfile2D *p2_v3_PID_M_y[qaUtility::GetInstance()->npid];
+  TProfile *p_v3_PID_bCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+  TProfile *p_v3_PID_bCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+  TProfile *p_v3_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+  TProfile *p_v3_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+
+  TH2D *h2_v4_Particle_pteta = new TH2D("h2_v4_Particle_pteta", "dN/dp_{T}d#eta v4;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
+  TH2D *h2_v4_Event_bCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
+  TH2D *h2_v4_Event_mCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
+  TProfile2D *p2_v4_PID_b_pt[qaUtility::GetInstance()->npid];
+  TProfile2D *p2_v4_PID_b_y[qaUtility::GetInstance()->npid];
+  TProfile2D *p2_v4_PID_M_pt[qaUtility::GetInstance()->npid];
+  TProfile2D *p2_v4_PID_M_y[qaUtility::GetInstance()->npid];
+  TProfile *p_v4_PID_bCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+  TProfile *p_v4_PID_bCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+  TProfile *p_v4_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+  TProfile *p_v4_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
+
   for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
   {
     h_minbias_Particle_PID_pt[i] = new TH1D(Form("h_minbias_Particle_PID_pt_%i", i), Form("h_minbias_Particle_PID_pt_%i;p_{T}, GeV/c; dN/dp_{T}", i), 800, 0., 8.);
@@ -347,6 +473,16 @@ int main(int argc, char **argv)
     p2_v2_PID_b_y[i] = new TProfile2D(Form("p2_v2_PID_b_y_%i", i), Form("p2_v2_PID_b_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 200, 0., 20.);
     p2_v2_PID_M_pt[i] = new TProfile2D(Form("p2_v2_PID_M_pt_%i", i), Form("p2_v2_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 2500, 0., 2500.);
     p2_v2_PID_M_y[i] = new TProfile2D(Form("p2_v2_PID_M_y_%i", i), Form("p2_v2_PID_M_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 2500, 0., 2500.);
+
+    p2_v3_PID_b_pt[i] = new TProfile2D(Form("p2_v3_PID_b_pt_%i", i), Form("p2_v3_PID_b_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 200, 0., 20.);
+    p2_v3_PID_b_y[i] = new TProfile2D(Form("p2_v3_PID_b_y_%i", i), Form("p2_v3_PID_b_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 200, 0., 20.);
+    p2_v3_PID_M_pt[i] = new TProfile2D(Form("p2_v3_PID_M_pt_%i", i), Form("p2_v3_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 2500, 0., 2500.);
+    p2_v3_PID_M_y[i] = new TProfile2D(Form("p2_v3_PID_M_y_%i", i), Form("p2_v3_PID_M_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 2500, 0., 2500.);
+
+    p2_v4_PID_b_pt[i] = new TProfile2D(Form("p2_v4_PID_b_pt_%i", i), Form("p2_v4_PID_b_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 200, 0., 20.);
+    p2_v4_PID_b_y[i] = new TProfile2D(Form("p2_v4_PID_b_y_%i", i), Form("p2_v4_PID_b_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 200, 0., 20.);
+    p2_v4_PID_M_pt[i] = new TProfile2D(Form("p2_v4_PID_M_pt_%i", i), Form("p2_v4_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 2500, 0., 2500.);
+    p2_v4_PID_M_y[i] = new TProfile2D(Form("p2_v4_PID_M_y_%i", i), Form("p2_v4_PID_M_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 2500, 0., 2500.);
   }
   for (int i = 0; i < qaUtility::GetInstance()->maxCentBins; i++)
   {
@@ -356,6 +492,12 @@ int main(int argc, char **argv)
     h2_v2_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v2_Event_bCent_b_Mult_%i", i), Form("h2_v2_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
     h2_v2_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v2_Event_mCent_b_Mult_%i", i), Form("h2_v2_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
 
+    h2_v3_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v3_Event_bCent_b_Mult_%i", i), Form("h2_v3_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
+    h2_v3_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v3_Event_mCent_b_Mult_%i", i), Form("h2_v3_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
+
+    h2_v4_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v4_Event_bCent_b_Mult_%i", i), Form("h2_v4_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
+    h2_v4_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v4_Event_mCent_b_Mult_%i", i), Form("h2_v4_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
+
     for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
     {
       p_v1_PID_bCent_pt[i][j] = new TProfile(Form("p_v1_PID_bCent_pt_%i_%i", i, j), Form("p_v1_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{1}", i, j), 100, 0., 5.);
@@ -364,11 +506,23 @@ int main(int argc, char **argv)
       p_v2_PID_bCent_pt[i][j] = new TProfile(Form("p_v2_PID_bCent_pt_%i_%i", i, j), Form("p_v2_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
       p_v2_PID_bCent_y[i][j] = new TProfile(Form("p_v2_PID_bCent_y_%i_%i", i, j), Form("p_v2_PID_bCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
 
+      p_v3_PID_bCent_pt[i][j] = new TProfile(Form("p_v3_PID_bCent_pt_%i_%i", i, j), Form("p_v3_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
+      p_v3_PID_bCent_y[i][j] = new TProfile(Form("p_v3_PID_bCent_y_%i_%i", i, j), Form("p_v3_PID_bCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
+
+      p_v4_PID_bCent_pt[i][j] = new TProfile(Form("p_v4_PID_bCent_pt_%i_%i", i, j), Form("p_v4_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
+      p_v4_PID_bCent_y[i][j] = new TProfile(Form("p_v4_PID_bCent_y_%i_%i", i, j), Form("p_v4_PID_bCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
+
       p_v1_PID_mCent_pt[i][j] = new TProfile(Form("p_v1_PID_mCent_pt_%i_%i", i, j), Form("p_v1_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{1}", i, j), 100, 0., 5.);
       p_v1_PID_mCent_y[i][j] = new TProfile(Form("p_v1_PID_mCent_y_%i_%i", i, j), Form("p_v1_PID_mCent_y_%i_%i;y;v_{1}", i, j), 400, -10., 10.);
 
       p_v2_PID_mCent_pt[i][j] = new TProfile(Form("p_v2_PID_mCent_pt_%i_%i", i, j), Form("p_v2_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
       p_v2_PID_mCent_y[i][j] = new TProfile(Form("p_v2_PID_mCent_y_%i_%i", i, j), Form("p_v2_PID_mCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
+
+      p_v3_PID_mCent_pt[i][j] = new TProfile(Form("p_v3_PID_mCent_pt_%i_%i", i, j), Form("p_v3_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
+      p_v3_PID_mCent_y[i][j] = new TProfile(Form("p_v3_PID_mCent_y_%i_%i", i, j), Form("p_v3_PID_mCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
+
+      p_v4_PID_mCent_pt[i][j] = new TProfile(Form("p_v4_PID_mCent_pt_%i_%i", i, j), Form("p_v4_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
+      p_v4_PID_mCent_y[i][j] = new TProfile(Form("p_v4_PID_mCent_y_%i_%i", i, j), Form("p_v4_PID_mCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
     }
   }
 
@@ -411,11 +565,13 @@ int main(int argc, char **argv)
   Long64_t Absolute_counter = 0;
   Long64_t Minbias_counter = 0;
   Int_t ipid;
-  Double_t v1, v2, y;
+  Double_t v1, v2, v3, v4, y;
   Int_t eta_w, centBinB, centBinM;
 
   std::vector<qaParticleLight> v_particles_v1;
   std::vector<qaParticleLight> v_particles_v2;
+  std::vector<qaParticleLight> v_particles_v3;
+  std::vector<qaParticleLight> v_particles_v4;
   qaParticleLight light_particle;
 
   while (Minbias_counter < Nentries)
@@ -437,6 +593,8 @@ int main(int argc, char **argv)
 
     v_particles_v1.clear();
     v_particles_v2.clear();
+    v_particles_v3.clear();
+    v_particles_v4.clear();
 
     Nparticles = event->GetNparticles();
     for (int iparticle = 0; iparticle < Nparticles; iparticle++)
@@ -588,6 +746,32 @@ int main(int argc, char **argv)
         }
       }
 
+      if (qaUtility::GetInstance()->Cut_Event_v3(event) &&
+          qaUtility::GetInstance()->Cut_Particle_v3_acceptance(particle) &&
+          qaUtility::GetInstance()->Is_v3 == 1)
+      {
+        h2_v3_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
+        ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
+        if (ipid != -1)
+        {
+          light_particle.SetParticle(particle);
+          v_particles_v3.push_back(light_particle);
+        }
+      }
+
+      if (qaUtility::GetInstance()->Cut_Event_v4(event) &&
+          qaUtility::GetInstance()->Cut_Particle_v4_acceptance(particle) &&
+          qaUtility::GetInstance()->Is_v4 == 1)
+      {
+        h2_v4_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
+        ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
+        if (ipid != -1)
+        {
+          light_particle.SetParticle(particle);
+          v_particles_v4.push_back(light_particle);
+        }
+      }
+
       delete particle;
     }
 
@@ -656,6 +840,70 @@ int main(int argc, char **argv)
       }
     }
 
+    // Loop over v3-related particles
+    centBinB = qaUtility::GetInstance()->GetCentralityBin(event->GetB(), qaUtility::GetInstance()->Cut_v3_Event_bCent);
+    centBinM = qaUtility::GetInstance()->GetCentMultBin(Ncounter_refmult, qaUtility::GetInstance()->Cut_v3_Event_mCent);
+    if (centBinB != -1) h2_v3_Event_bCent_b_Mult[centBinB]->Fill(Ncounter_refmult, event->GetB());
+    if (centBinM != -1) h2_v3_Event_mCent_b_Mult[centBinM]->Fill(Ncounter_refmult, event->GetB());
+    if (qaUtility::GetInstance()->Is_v3 == 1)
+    {
+      for (const auto &lparticle : v_particles_v3)
+      {
+        v3 = TMath::Cos(3. * (lparticle.GetPhi() - event->GetPhiRP()));
+        ipid = qaUtility::GetInstance()->GetPdgId(lparticle.GetPdg());
+        if (qaUtility::GetInstance()->Cut_Particle_v3_PID_pt(lparticle, ipid))
+        {
+          p2_v3_PID_b_pt[ipid]->Fill(lparticle.GetPt(), event->GetB(), v3);
+          p2_v3_PID_M_pt[ipid]->Fill(lparticle.GetPt(), Ncounter_refmult, v3);
+          if (centBinB != -1)
+            p_v3_PID_bCent_pt[centBinB][ipid]->Fill(lparticle.GetPt(), v3);
+          if (centBinM != -1)
+            p_v3_PID_mCent_pt[centBinM][ipid]->Fill(lparticle.GetPt(), v3);
+        }
+        if (qaUtility::GetInstance()->Cut_Particle_v3_PID_y(lparticle, ipid))
+        {
+          p2_v3_PID_b_y[ipid]->Fill(lparticle.GetRapidity(), event->GetB(), v3);
+          p2_v3_PID_M_y[ipid]->Fill(lparticle.GetRapidity(), Ncounter_refmult, v3);
+          if (centBinB != -1)
+            p_v3_PID_bCent_y[centBinB][ipid]->Fill(lparticle.GetRapidity(), v3);
+          if (centBinM != -1)
+            p_v3_PID_mCent_y[centBinM][ipid]->Fill(lparticle.GetRapidity(), v3);
+        }
+      }
+    }
+
+    // Loop over v4-related particles
+    centBinB = qaUtility::GetInstance()->GetCentralityBin(event->GetB(), qaUtility::GetInstance()->Cut_v4_Event_bCent);
+    centBinM = qaUtility::GetInstance()->GetCentMultBin(Ncounter_refmult, qaUtility::GetInstance()->Cut_v4_Event_mCent);
+    if (centBinB != -1) h2_v4_Event_bCent_b_Mult[centBinB]->Fill(Ncounter_refmult, event->GetB());
+    if (centBinM != -1) h2_v4_Event_mCent_b_Mult[centBinM]->Fill(Ncounter_refmult, event->GetB());
+    if (qaUtility::GetInstance()->Is_v4 == 1)
+    {
+      for (const auto &lparticle : v_particles_v4)
+      {
+        v4 = TMath::Cos(4. * (lparticle.GetPhi() - event->GetPhiRP()));
+        ipid = qaUtility::GetInstance()->GetPdgId(lparticle.GetPdg());
+        if (qaUtility::GetInstance()->Cut_Particle_v4_PID_pt(lparticle, ipid))
+        {
+          p2_v4_PID_b_pt[ipid]->Fill(lparticle.GetPt(), event->GetB(), v4);
+          p2_v4_PID_M_pt[ipid]->Fill(lparticle.GetPt(), Ncounter_refmult, v4);
+          if (centBinB != -1)
+            p_v4_PID_bCent_pt[centBinB][ipid]->Fill(lparticle.GetPt(), v4);
+          if (centBinM != -1)
+            p_v4_PID_mCent_pt[centBinM][ipid]->Fill(lparticle.GetPt(), v4);
+        }
+        if (qaUtility::GetInstance()->Cut_Particle_v4_PID_y(lparticle, ipid))
+        {
+          p2_v4_PID_b_y[ipid]->Fill(lparticle.GetRapidity(), event->GetB(), v4);
+          p2_v4_PID_M_y[ipid]->Fill(lparticle.GetRapidity(), Ncounter_refmult, v4);
+          if (centBinB != -1)
+            p_v4_PID_bCent_y[centBinB][ipid]->Fill(lparticle.GetRapidity(), v4);
+          if (centBinM != -1)
+            p_v4_PID_mCent_y[centBinM][ipid]->Fill(lparticle.GetRapidity(), v4);
+        }
+      }
+    }
+
     if (qaUtility::GetInstance()->Cut_Event_minbias(event) && qaUtility::GetInstance()->Is_minbias == 1)
     {
       Minbias_counter++;
@@ -842,6 +1090,80 @@ int main(int argc, char **argv)
     }
   }
 
+  if (qaUtility::GetInstance()->Is_v3)
+  {
+    fo->mkdir("v3");
+    fo->cd("v3");
+
+    h2_v3_Particle_pteta->Write();
+
+    for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size() - 1; i++)
+    {
+      h2_v3_Event_bCent_b_Mult[i]->Write();
+      for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
+      {
+        p_v3_PID_bCent_pt[i][j]->Write();
+        p_v3_PID_bCent_y[i][j]->Write();
+      }
+    }
+    for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.size() - 1; i++)
+    {
+      h2_v3_Event_mCent_b_Mult[i]->Write();
+      for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
+      {
+        p_v3_PID_mCent_pt[i][j]->Write();
+        p_v3_PID_mCent_y[i][j]->Write();
+      }
+    }
+    for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
+    {
+      p2_v3_PID_b_pt[i]->Write();
+      p2_v3_PID_b_y[i]->Write();
+    }
+    for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
+    {
+      p2_v3_PID_M_pt[i]->Write();
+      p2_v3_PID_M_y[i]->Write();
+    }
+  }
+
+  if (qaUtility::GetInstance()->Is_v4)
+  {
+    fo->mkdir("v4");
+    fo->cd("v4");
+
+    h2_v4_Particle_pteta->Write();
+
+    for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size() - 1; i++)
+    {
+      h2_v4_Event_bCent_b_Mult[i]->Write();
+      for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
+      {
+        p_v4_PID_bCent_pt[i][j]->Write();
+        p_v4_PID_bCent_y[i][j]->Write();
+      }
+    }
+    for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.size() - 1; i++)
+    {
+      h2_v4_Event_mCent_b_Mult[i]->Write();
+      for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
+      {
+        p_v4_PID_mCent_pt[i][j]->Write();
+        p_v4_PID_mCent_y[i][j]->Write();
+      }
+    }
+    for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
+    {
+      p2_v4_PID_b_pt[i]->Write();
+      p2_v4_PID_b_y[i]->Write();
+    }
+    for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
+    {
+      p2_v4_PID_M_pt[i]->Write();
+      p2_v4_PID_M_y[i]->Write();
+    }
+  }
+
   fo->Close();
 
   timer.Stop();

+ 0 - 65
qa.cfg

@@ -1,65 +0,0 @@
-Nevents:                              100000
-debug:                                1
-Is_minbias                            1
-Cut_minbias_Event_bmin:               0.
-Cut_minbias_Event_bmax:               16.
-Cut_minbias_Particle_ptmin:           0.
-Cut_minbias_Particle_ptmax:           100.
-Cut_minbias_Particle_etamin:          -100.
-Cut_minbias_Particle_etamax:          100.
-Cut_minbias_Particle_ymin:            -100.
-Cut_minbias_Particle_ymax:            100.
-Is_refmult                            1
-Cut_refmult_Event_bmin:               0.
-Cut_refmult_Event_bmax:               16.
-Cut_refmult_Particle_ptmin:           0.15
-Cut_refmult_Particle_ptmax:           3.
-Cut_refmult_Particle_etamin:          -0.5
-Cut_refmult_Particle_etamax:          0.5
-Cut_refmult_Particle_isCharged        1
-Is_v1                                 1
-Cut_v1_Event_bmin:                    0.
-Cut_v1_Event_bmax:                    16.
-Cut_v1_Event_bCent:                   6.6 8.1
-Cut_v1_Event_mCent:                   0 500
-Cut_v1_Particle_ptmin:                0.0
-Cut_v1_Particle_ptmax:                3.0
-Cut_v1_Particle_etamin:               -100.
-Cut_v1_Particle_etamax:               100.
-Cut_v1_Particle_ymin:                 -0.25
-Cut_v1_Particle_ymax:                 -0.15
-Cut_v1_Particle_ptmin_pi:             0.0
-Cut_v1_Particle_ptmax_pi:             0.5
-Cut_v1_Particle_ymin_pi:              -0.25
-Cut_v1_Particle_ymax_pi:              -0.15
-Cut_v1_Particle_ptmin_ka:             0.2
-Cut_v1_Particle_ptmax_ka:             0.9
-Cut_v1_Particle_ymin_ka:              -0.25
-Cut_v1_Particle_ymax_ka:              -0.15
-Cut_v1_Particle_ptmin_pr:             1.0
-Cut_v1_Particle_ptmax_pr:             1.5
-Cut_v1_Particle_ymin_pr:              -0.25
-Cut_v1_Particle_ymax_pr:              -0.15
-Is_v2                                 1
-Cut_v2_Event_bmin:                    0.
-Cut_v2_Event_bmax:                    16.
-Cut_v2_Event_bCent:                   6.6 8.1
-Cut_v2_Event_mCent:                   0 500
-Cut_v2_Particle_ptmin:                0.0
-Cut_v2_Particle_ptmax:                3.0
-Cut_v2_Particle_etamin:               -100.
-Cut_v2_Particle_etamax:               100.
-Cut_v2_Particle_ymin:                 -0.05
-Cut_v2_Particle_ymax:                 0.05
-Cut_v2_Particle_ptmin_pi:             0.0
-Cut_v2_Particle_ptmax_pi:             0.5
-Cut_v2_Particle_ymin_pi:              -0.05
-Cut_v2_Particle_ymax_pi:              0.05
-Cut_v2_Particle_ptmin_ka:             0.2
-Cut_v2_Particle_ptmax_ka:             0.9
-Cut_v2_Particle_ymin_ka:              -0.05
-Cut_v2_Particle_ymax_ka:              0.05
-Cut_v2_Particle_ptmin_pr:             1.0
-Cut_v2_Particle_ptmax_pr:             1.5
-Cut_v2_Particle_ymin_pr:              -0.05
-Cut_v2_Particle_ymax_pr:              0.05

+ 127 - 0
qa_STAR_3gev_20M.cfg

@@ -0,0 +1,127 @@
+Nevents:                              -1
+debug:                                1
+Is_minbias                            1
+Cut_minbias_Event_bmin:               0.
+Cut_minbias_Event_bmax:               16.
+Cut_minbias_Particle_ptmin:           0.
+Cut_minbias_Particle_ptmax:           100.
+Cut_minbias_Particle_etamin:          -100.
+Cut_minbias_Particle_etamax:          100.
+Cut_minbias_Particle_ymin:            -100.
+Cut_minbias_Particle_ymax:            100.
+Is_refmult                            1
+Cut_refmult_Event_bmin:               0.
+Cut_refmult_Event_bmax:               16.
+Cut_refmult_Particle_ptmin:           0.
+Cut_refmult_Particle_ptmax:           5.
+Cut_refmult_Particle_etamin:          0.
+Cut_refmult_Particle_etamax:          2.
+Cut_refmult_Particle_isCharged        1
+Is_v1                                 1
+Cut_v1_Event_bmin:                    0.
+Cut_v1_Event_bmax:                    16.
+Cut_v1_Event_bCent:                   4.6 9.3
+Cut_v1_Event_mCent:                   0 500000
+Cut_v1_Particle_ptmin:                0.2
+Cut_v1_Particle_ptmax:                2.0
+Cut_v1_Particle_etamin:               -10
+Cut_v1_Particle_etamax:               10
+Cut_v1_Particle_ymin:                 -10
+Cut_v1_Particle_ymax:                 10
+Cut_v1_Particle_ptmin_pi:             0.2
+Cut_v1_Particle_ptmax_pi:             1.6
+Cut_v1_Particle_ymin_pi:              -1
+Cut_v1_Particle_ymax_pi:              0
+Cut_v1_Particle_ptmin_ka:             0.4
+Cut_v1_Particle_ptmax_ka:             1.6
+Cut_v1_Particle_ymin_ka:              -1
+Cut_v1_Particle_ymax_ka:              0
+Cut_v1_Particle_ptmin_pr:             0.4
+Cut_v1_Particle_ptmax_pr:             2.
+Cut_v1_Particle_ymin_pr:              -1
+Cut_v1_Particle_ymax_pr:              0
+Cut_v1_Particle_ptmin_ne:             0.4
+Cut_v1_Particle_ptmax_ne:             2.
+Cut_v1_Particle_ymin_ne:              -1
+Cut_v1_Particle_ymax_ne:              0
+Is_v2                                 1
+Cut_v2_Event_bmin:                    0.
+Cut_v2_Event_bmax:                    16.
+Cut_v2_Event_bCent:                   4.6 9.3
+Cut_v2_Event_mCent:                   0 500000
+Cut_v2_Particle_ptmin:                0.2
+Cut_v2_Particle_ptmax:                2.0
+Cut_v2_Particle_etamin:               -10
+Cut_v2_Particle_etamax:               10
+Cut_v2_Particle_ymin:                 -10
+Cut_v2_Particle_ymax:                 10
+Cut_v2_Particle_ptmin_pi:             0.2
+Cut_v2_Particle_ptmax_pi:             1.6
+Cut_v2_Particle_ymin_pi:              -1
+Cut_v2_Particle_ymax_pi:              0
+Cut_v2_Particle_ptmin_ka:             0.4
+Cut_v2_Particle_ptmax_ka:             1.6
+Cut_v2_Particle_ymin_ka:              -1
+Cut_v2_Particle_ymax_ka:              0
+Cut_v2_Particle_ptmin_pr:             0.4
+Cut_v2_Particle_ptmax_pr:             2.
+Cut_v2_Particle_ymin_pr:              -1
+Cut_v2_Particle_ymax_pr:              0
+Cut_v2_Particle_ptmin_ne:             0.4
+Cut_v2_Particle_ptmax_ne:             2.
+Cut_v2_Particle_ymin_ne:              -1
+Cut_v2_Particle_ymax_ne:              0
+Is_v3                                 1
+Cut_v3_Event_bmin:                    0.
+Cut_v3_Event_bmax:                    16.
+Cut_v3_Event_bCent:                   4.6 9.3
+Cut_v3_Event_mCent:                   0 500000
+Cut_v3_Particle_ptmin:                0.2
+Cut_v3_Particle_ptmax:                2.0
+Cut_v3_Particle_etamin:               -10
+Cut_v3_Particle_etamax:               10
+Cut_v3_Particle_ymin:                 -10
+Cut_v3_Particle_ymax:                 10
+Cut_v3_Particle_ptmin_pi:             0.2
+Cut_v3_Particle_ptmax_pi:             1.6
+Cut_v3_Particle_ymin_pi:              -1
+Cut_v3_Particle_ymax_pi:              0
+Cut_v3_Particle_ptmin_ka:             0.4
+Cut_v3_Particle_ptmax_ka:             1.6
+Cut_v3_Particle_ymin_ka:              -1
+Cut_v3_Particle_ymax_ka:              0
+Cut_v3_Particle_ptmin_pr:             0.4
+Cut_v3_Particle_ptmax_pr:             2.
+Cut_v3_Particle_ymin_pr:              -1
+Cut_v3_Particle_ymax_pr:              0
+Cut_v3_Particle_ptmin_ne:             0.4
+Cut_v3_Particle_ptmax_ne:             2.
+Cut_v3_Particle_ymin_ne:              -1
+Cut_v3_Particle_ymax_ne:              0
+Is_v4                                 1
+Cut_v4_Event_bmin:                    0.
+Cut_v4_Event_bmax:                    16.
+Cut_v4_Event_bCent:                   4.6 9.3
+Cut_v4_Event_mCent:                   0 500000
+Cut_v4_Particle_ptmin:                0.2
+Cut_v4_Particle_ptmax:                2.0
+Cut_v4_Particle_etamin:               -10
+Cut_v4_Particle_etamax:               10
+Cut_v4_Particle_ymin:                 -10
+Cut_v4_Particle_ymax:                 10
+Cut_v4_Particle_ptmin_pi:             0.2
+Cut_v4_Particle_ptmax_pi:             1.6
+Cut_v4_Particle_ymin_pi:              -1
+Cut_v4_Particle_ymax_pi:              0
+Cut_v4_Particle_ptmin_ka:             0.4
+Cut_v4_Particle_ptmax_ka:             1.6
+Cut_v4_Particle_ymin_ka:              -1
+Cut_v4_Particle_ymax_ka:              0
+Cut_v4_Particle_ptmin_pr:             0.4
+Cut_v4_Particle_ptmax_pr:             2.
+Cut_v4_Particle_ymin_pr:              -1
+Cut_v4_Particle_ymax_pr:              0
+Cut_v4_Particle_ptmin_ne:             0.4
+Cut_v4_Particle_ptmax_ne:             2.
+Cut_v4_Particle_ymin_ne:              -1
+Cut_v4_Particle_ymax_ne:              0

+ 500 - 42
utility/Utility.cxx

@@ -14,6 +14,8 @@ qaUtility::qaUtility() : Nevents(-1),
                          Is_refmult(1),
                          Is_v1(1),
                          Is_v2(1),
+                         Is_v3(1),
+                         Is_v4(1),
                          Cut_minbias_Event_bmin(0.),
                          Cut_minbias_Event_bmax(16.),
                          Cut_minbias_Particle_ptmin(0.),
@@ -53,6 +55,10 @@ qaUtility::qaUtility() : Nevents(-1),
                          Cut_v1_Particle_ptmax_pr(1.5),
                          Cut_v1_Particle_ymin_pr(-0.25),
                          Cut_v1_Particle_ymax_pr(-0.15),
+                         Cut_v1_Particle_ptmin_ne(1.0),
+                         Cut_v1_Particle_ptmax_ne(1.5),
+                         Cut_v1_Particle_ymin_ne(-0.25),
+                         Cut_v1_Particle_ymax_ne(-0.15),
                          Cut_v2_Event_bmin(0.),
                          Cut_v2_Event_bmax(16.),
                          sCut_v2_Event_bCent(""),
@@ -76,7 +82,67 @@ qaUtility::qaUtility() : Nevents(-1),
                          Cut_v2_Particle_ptmin_pr(1.0),
                          Cut_v2_Particle_ptmax_pr(1.5),
                          Cut_v2_Particle_ymin_pr(-0.05),
-                         Cut_v2_Particle_ymax_pr(0.05)
+                         Cut_v2_Particle_ymax_pr(0.05),
+                         Cut_v2_Particle_ptmin_ne(1.0),
+                         Cut_v2_Particle_ptmax_ne(1.5),
+                         Cut_v2_Particle_ymin_ne(-0.05),
+                         Cut_v2_Particle_ymax_ne(0.05),
+                         Cut_v3_Event_bmin(0.),
+                         Cut_v3_Event_bmax(16.),
+                         sCut_v3_Event_bCent(""),
+                         sCut_v3_Event_mCent(""),
+                         Cut_v3_Event_bCent({}),
+                         Cut_v3_Event_mCent({}),
+                         Cut_v3_Particle_ptmin(1.0),
+                         Cut_v3_Particle_ptmax(1.5),
+                         Cut_v3_Particle_etamin(-100.),
+                         Cut_v3_Particle_etamax(100.),
+                         Cut_v3_Particle_ymin(-0.05),
+                         Cut_v3_Particle_ymax(0.05),
+                         Cut_v3_Particle_ptmin_pi(0.0),
+                         Cut_v3_Particle_ptmax_pi(0.5),
+                         Cut_v3_Particle_ymin_pi(-0.05),
+                         Cut_v3_Particle_ymax_pi(0.05),
+                         Cut_v3_Particle_ptmin_ka(0.2),
+                         Cut_v3_Particle_ptmax_ka(0.9),
+                         Cut_v3_Particle_ymin_ka(-0.05),
+                         Cut_v3_Particle_ymax_ka(0.05),
+                         Cut_v3_Particle_ptmin_pr(1.0),
+                         Cut_v3_Particle_ptmax_pr(1.5),
+                         Cut_v3_Particle_ymin_pr(-0.05),
+                         Cut_v3_Particle_ymax_pr(0.05),
+                         Cut_v3_Particle_ptmin_ne(1.0),
+                         Cut_v3_Particle_ptmax_ne(1.5),
+                         Cut_v3_Particle_ymin_ne(-0.05),
+                         Cut_v3_Particle_ymax_ne(0.05),
+                         Cut_v4_Event_bmin(0.),
+                         Cut_v4_Event_bmax(16.),
+                         sCut_v4_Event_bCent(""),
+                         sCut_v4_Event_mCent(""),
+                         Cut_v4_Event_bCent({}),
+                         Cut_v4_Event_mCent({}),
+                         Cut_v4_Particle_ptmin(1.0),
+                         Cut_v4_Particle_ptmax(1.5),
+                         Cut_v4_Particle_etamin(-100.),
+                         Cut_v4_Particle_etamax(100.),
+                         Cut_v4_Particle_ymin(-0.05),
+                         Cut_v4_Particle_ymax(0.05),
+                         Cut_v4_Particle_ptmin_pi(0.0),
+                         Cut_v4_Particle_ptmax_pi(0.5),
+                         Cut_v4_Particle_ymin_pi(-0.05),
+                         Cut_v4_Particle_ymax_pi(0.05),
+                         Cut_v4_Particle_ptmin_ka(0.2),
+                         Cut_v4_Particle_ptmax_ka(0.9),
+                         Cut_v4_Particle_ymin_ka(-0.05),
+                         Cut_v4_Particle_ymax_ka(0.05),
+                         Cut_v4_Particle_ptmin_pr(1.0),
+                         Cut_v4_Particle_ptmax_pr(1.5),
+                         Cut_v4_Particle_ymin_pr(-0.05),
+                         Cut_v4_Particle_ymax_pr(0.05),
+                         Cut_v4_Particle_ptmin_ne(1.0),
+                         Cut_v4_Particle_ptmax_ne(1.5),
+                         Cut_v4_Particle_ymin_ne(-0.05),
+                         Cut_v4_Particle_ymax_ne(0.05)
 {
 }
 
@@ -150,6 +216,10 @@ Bool_t qaUtility::ReadConfig(const TString &configFileName)
   Cut_v1_Particle_ptmax_pr = env.GetValue("Cut_v1_Particle_ptmax_pr", 0.);
   Cut_v1_Particle_ymin_pr = env.GetValue("Cut_v1_Particle_ymin_pr", 0.);
   Cut_v1_Particle_ymax_pr = env.GetValue("Cut_v1_Particle_ymax_pr", 0.);
+  Cut_v1_Particle_ptmin_ne = env.GetValue("Cut_v1_Particle_ptmin_ne", 0.);
+  Cut_v1_Particle_ptmax_ne = env.GetValue("Cut_v1_Particle_ptmax_ne", 0.);
+  Cut_v1_Particle_ymin_ne = env.GetValue("Cut_v1_Particle_ymin_ne", 0.);
+  Cut_v1_Particle_ymax_ne = env.GetValue("Cut_v1_Particle_ymax_ne", 0.);
 
   Is_v2 = env.GetValue("Is_v2", 0);
   Cut_v2_Event_bmin = env.GetValue("Cut_v2_Event_bmin", 0.);
@@ -175,6 +245,68 @@ Bool_t qaUtility::ReadConfig(const TString &configFileName)
   Cut_v2_Particle_ptmax_pr = env.GetValue("Cut_v2_Particle_ptmax_pr", 0.);
   Cut_v2_Particle_ymin_pr = env.GetValue("Cut_v2_Particle_ymin_pr", 0.);
   Cut_v2_Particle_ymax_pr = env.GetValue("Cut_v2_Particle_ymax_pr", 0.);
+  Cut_v2_Particle_ptmin_ne = env.GetValue("Cut_v2_Particle_ptmin_ne", 0.);
+  Cut_v2_Particle_ptmax_ne = env.GetValue("Cut_v2_Particle_ptmax_ne", 0.);
+  Cut_v2_Particle_ymin_ne = env.GetValue("Cut_v2_Particle_ymin_ne", 0.);
+  Cut_v2_Particle_ymax_ne = env.GetValue("Cut_v2_Particle_ymax_ne", 0.);
+
+  Is_v3 = env.GetValue("Is_v3", 0);
+  Cut_v3_Event_bmin = env.GetValue("Cut_v3_Event_bmin", 0.);
+  Cut_v3_Event_bmax = env.GetValue("Cut_v3_Event_bmax", 0.);
+  sCut_v3_Event_bCent = env.GetValue("Cut_v3_Event_bCent", "");
+  sCut_v3_Event_mCent = env.GetValue("Cut_v3_Event_mCent", "");
+
+  Cut_v3_Particle_ptmin = env.GetValue("Cut_v3_Particle_ptmin", 0.);
+  Cut_v3_Particle_ptmax = env.GetValue("Cut_v3_Particle_ptmax", 0.);
+  Cut_v3_Particle_etamin = env.GetValue("Cut_v3_Particle_etamin", 0.);
+  Cut_v3_Particle_etamax = env.GetValue("Cut_v3_Particle_etamax", 0.);
+  Cut_v3_Particle_ymin = env.GetValue("Cut_v3_Particle_ymin", 0.);
+  Cut_v3_Particle_ymax = env.GetValue("Cut_v3_Particle_ymax", 0.);
+  Cut_v3_Particle_ptmin_pi = env.GetValue("Cut_v3_Particle_ptmin_pi", 0.);
+  Cut_v3_Particle_ptmax_pi = env.GetValue("Cut_v3_Particle_ptmax_pi", 0.);
+  Cut_v3_Particle_ymin_pi = env.GetValue("Cut_v3_Particle_ymin_pi", 0.);
+  Cut_v3_Particle_ymax_pi = env.GetValue("Cut_v3_Particle_ymax_pi", 0.);
+  Cut_v3_Particle_ptmin_ka = env.GetValue("Cut_v3_Particle_ptmin_ka", 0.);
+  Cut_v3_Particle_ptmax_ka = env.GetValue("Cut_v3_Particle_ptmax_ka", 0.);
+  Cut_v3_Particle_ymin_ka = env.GetValue("Cut_v3_Particle_ymin_ka", 0.);
+  Cut_v3_Particle_ymax_ka = env.GetValue("Cut_v3_Particle_ymax_ka", 0.);
+  Cut_v3_Particle_ptmin_pr = env.GetValue("Cut_v3_Particle_ptmin_pr", 0.);
+  Cut_v3_Particle_ptmax_pr = env.GetValue("Cut_v3_Particle_ptmax_pr", 0.);
+  Cut_v3_Particle_ymin_pr = env.GetValue("Cut_v3_Particle_ymin_pr", 0.);
+  Cut_v3_Particle_ymax_pr = env.GetValue("Cut_v3_Particle_ymax_pr", 0.);
+  Cut_v3_Particle_ptmin_ne = env.GetValue("Cut_v3_Particle_ptmin_ne", 0.);
+  Cut_v3_Particle_ptmax_ne = env.GetValue("Cut_v3_Particle_ptmax_ne", 0.);
+  Cut_v3_Particle_ymin_ne = env.GetValue("Cut_v3_Particle_ymin_ne", 0.);
+  Cut_v3_Particle_ymax_ne = env.GetValue("Cut_v3_Particle_ymax_ne", 0.);
+
+  Is_v4 = env.GetValue("Is_v4", 0);
+  Cut_v4_Event_bmin = env.GetValue("Cut_v4_Event_bmin", 0.);
+  Cut_v4_Event_bmax = env.GetValue("Cut_v4_Event_bmax", 0.);
+  sCut_v4_Event_bCent = env.GetValue("Cut_v4_Event_bCent", "");
+  sCut_v4_Event_mCent = env.GetValue("Cut_v4_Event_mCent", "");
+
+  Cut_v4_Particle_ptmin = env.GetValue("Cut_v4_Particle_ptmin", 0.);
+  Cut_v4_Particle_ptmax = env.GetValue("Cut_v4_Particle_ptmax", 0.);
+  Cut_v4_Particle_etamin = env.GetValue("Cut_v4_Particle_etamin", 0.);
+  Cut_v4_Particle_etamax = env.GetValue("Cut_v4_Particle_etamax", 0.);
+  Cut_v4_Particle_ymin = env.GetValue("Cut_v4_Particle_ymin", 0.);
+  Cut_v4_Particle_ymax = env.GetValue("Cut_v4_Particle_ymax", 0.);
+  Cut_v4_Particle_ptmin_pi = env.GetValue("Cut_v4_Particle_ptmin_pi", 0.);
+  Cut_v4_Particle_ptmax_pi = env.GetValue("Cut_v4_Particle_ptmax_pi", 0.);
+  Cut_v4_Particle_ymin_pi = env.GetValue("Cut_v4_Particle_ymin_pi", 0.);
+  Cut_v4_Particle_ymax_pi = env.GetValue("Cut_v4_Particle_ymax_pi", 0.);
+  Cut_v4_Particle_ptmin_ka = env.GetValue("Cut_v4_Particle_ptmin_ka", 0.);
+  Cut_v4_Particle_ptmax_ka = env.GetValue("Cut_v4_Particle_ptmax_ka", 0.);
+  Cut_v4_Particle_ymin_ka = env.GetValue("Cut_v4_Particle_ymin_ka", 0.);
+  Cut_v4_Particle_ymax_ka = env.GetValue("Cut_v4_Particle_ymax_ka", 0.);
+  Cut_v4_Particle_ptmin_pr = env.GetValue("Cut_v4_Particle_ptmin_pr", 0.);
+  Cut_v4_Particle_ptmax_pr = env.GetValue("Cut_v4_Particle_ptmax_pr", 0.);
+  Cut_v4_Particle_ymin_pr = env.GetValue("Cut_v4_Particle_ymin_pr", 0.);
+  Cut_v4_Particle_ymax_pr = env.GetValue("Cut_v4_Particle_ymax_pr", 0.);
+  Cut_v4_Particle_ptmin_ne = env.GetValue("Cut_v4_Particle_ptmin_ne", 0.);
+  Cut_v4_Particle_ptmax_ne = env.GetValue("Cut_v4_Particle_ptmax_ne", 0.);
+  Cut_v4_Particle_ymin_ne = env.GetValue("Cut_v4_Particle_ymin_ne", 0.);
+  Cut_v4_Particle_ymax_ne = env.GetValue("Cut_v4_Particle_ymax_ne", 0.);
 
   if (!initCentrality())
     return false;
@@ -212,14 +344,22 @@ Bool_t qaUtility::initCentrality()
 {
   Cut_v1_Event_bCent = ParseVector(sCut_v1_Event_bCent);
   Cut_v2_Event_bCent = ParseVector(sCut_v2_Event_bCent);
+  Cut_v3_Event_bCent = ParseVector(sCut_v3_Event_bCent);
+  Cut_v4_Event_bCent = ParseVector(sCut_v4_Event_bCent);
 
   Cut_v1_Event_mCent = ParseVector(sCut_v1_Event_mCent);
   Cut_v2_Event_mCent = ParseVector(sCut_v2_Event_mCent);
+  Cut_v3_Event_mCent = ParseVector(sCut_v3_Event_mCent);
+  Cut_v4_Event_mCent = ParseVector(sCut_v4_Event_mCent);
 
   if (Cut_v1_Event_bCent.size() == 0 ||
       Cut_v2_Event_bCent.size() == 0 ||
+      Cut_v3_Event_bCent.size() == 0 ||
+      Cut_v4_Event_bCent.size() == 0 ||
       Cut_v1_Event_mCent.size() == 0 ||
-      Cut_v2_Event_mCent.size() == 0)
+      Cut_v2_Event_mCent.size() == 0 ||
+      Cut_v3_Event_mCent.size() == 0 ||
+      Cut_v4_Event_mCent.size() == 0)
 
   {
     return false;
@@ -268,6 +408,26 @@ Bool_t qaUtility::Cut_Event_v2(qaEvent *const &event)
   return true;
 }
 
+Bool_t qaUtility::Cut_Event_v3(qaEvent *const &event)
+{
+  if (event->GetB() < Cut_v3_Event_bmin)
+    return false;
+  if (event->GetB() > Cut_v3_Event_bmax)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Event_v4(qaEvent *const &event)
+{
+  if (event->GetB() < Cut_v4_Event_bmin)
+    return false;
+  if (event->GetB() > Cut_v4_Event_bmax)
+    return false;
+
+  return true;
+}
+
 Bool_t qaUtility::Cut_Particle_minbias(qaParticle *const &particle)
 {
   if (particle->GetPt() < Cut_minbias_Particle_ptmin)
@@ -319,7 +479,7 @@ Bool_t qaUtility::Cut_Particle_v1_acceptance(qaParticle *const &particle)
   Double_t charge = GetCharge(particle->GetPdg());
   if (charge == error_code)
     return false;
-  if (charge == 0)
+  if (charge == 0 && TMath::Abs(particle->GetPdg()) != 2112)
     return false;
 
   return true;
@@ -420,7 +580,7 @@ Bool_t qaUtility::Cut_Particle_v1_PID_pt(qaParticleLight const &particle, Int_t
 {
   if (_pid == -1)
     return false;
-  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 4)
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
     return false;
 
   // PID related kinematics cut
@@ -437,28 +597,36 @@ Bool_t qaUtility::Cut_Particle_v1_PID_pt(qaParticleLight const &particle, Int_t
     return false;
   if (_pid == 3 && y > Cut_v1_Particle_ymax_pr)
     return false;
-  if (_pid == 5 && y < Cut_v1_Particle_ymin_pi)
+  if (_pid == 4 && y < Cut_v1_Particle_ymin_ne)
+    return false;
+  if (_pid == 4 && y > Cut_v1_Particle_ymax_ne)
+    return false;
+  if (_pid == 6 && y < Cut_v1_Particle_ymin_pi)
     return false;
-  if (_pid == 5 && y > Cut_v1_Particle_ymax_pi)
+  if (_pid == 6 && y > Cut_v1_Particle_ymax_pi)
     return false;
-  if (_pid == 6 && y < Cut_v1_Particle_ymin_ka)
+  if (_pid == 7 && y < Cut_v1_Particle_ymin_ka)
     return false;
-  if (_pid == 6 && y > Cut_v1_Particle_ymax_ka)
+  if (_pid == 7 && y > Cut_v1_Particle_ymax_ka)
     return false;
-  if (_pid == 7 && y < Cut_v1_Particle_ymin_pr)
+  if (_pid == 8 && y < Cut_v1_Particle_ymin_pr)
     return false;
-  if (_pid == 7 && y > Cut_v1_Particle_ymax_pr)
+  if (_pid == 8 && y > Cut_v1_Particle_ymax_pr)
+    return false;
+  if (_pid == 9 && y < Cut_v1_Particle_ymin_ne)
+    return false;
+  if (_pid == 9 && y > Cut_v1_Particle_ymax_ne)
     return false;
 
   Double_t charge = GetCharge(particle.GetPdg());
   if (charge == error_code)
     return false;
-  if (charge == 0)
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
     return false;
 
   if (_pid == 0 && charge < 0)
     return false;
-  if (_pid == 4 && charge > 0)
+  if (_pid == 5 && charge > 0)
     return false;
 
   return true;
@@ -468,7 +636,7 @@ Bool_t qaUtility::Cut_Particle_v1_PID_y(qaParticleLight const &particle, Int_t _
 {
   if (_pid == -1)
     return false;
-  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 4)
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
     return false;
 
   // PID related kinematics cut
@@ -484,28 +652,36 @@ Bool_t qaUtility::Cut_Particle_v1_PID_y(qaParticleLight const &particle, Int_t _
     return false;
   if (_pid == 3 && particle.GetPt() > Cut_v1_Particle_ptmax_pr)
     return false;
-  if (_pid == 5 && particle.GetPt() < Cut_v1_Particle_ptmin_pi)
+  if (_pid == 4 && particle.GetPt() < Cut_v1_Particle_ptmin_ne)
+    return false;
+  if (_pid == 4 && particle.GetPt() > Cut_v1_Particle_ptmax_ne)
     return false;
-  if (_pid == 5 && particle.GetPt() > Cut_v1_Particle_ptmax_pi)
+  if (_pid == 6 && particle.GetPt() < Cut_v1_Particle_ptmin_pi)
     return false;
-  if (_pid == 6 && particle.GetPt() < Cut_v1_Particle_ptmin_ka)
+  if (_pid == 6 && particle.GetPt() > Cut_v1_Particle_ptmax_pi)
     return false;
-  if (_pid == 6 && particle.GetPt() > Cut_v1_Particle_ptmax_ka)
+  if (_pid == 7 && particle.GetPt() < Cut_v1_Particle_ptmin_ka)
     return false;
-  if (_pid == 7 && particle.GetPt() < Cut_v1_Particle_ptmin_pr)
+  if (_pid == 7 && particle.GetPt() > Cut_v1_Particle_ptmax_ka)
     return false;
-  if (_pid == 7 && particle.GetPt() > Cut_v1_Particle_ptmax_pr)
+  if (_pid == 8 && particle.GetPt() < Cut_v1_Particle_ptmin_pr)
+    return false;
+  if (_pid == 8 && particle.GetPt() > Cut_v1_Particle_ptmax_pr)
+    return false;
+  if (_pid == 9 && particle.GetPt() < Cut_v1_Particle_ptmin_ne)
+    return false;
+  if (_pid == 9 && particle.GetPt() > Cut_v1_Particle_ptmax_ne)
     return false;
 
   Double_t charge = GetCharge(particle.GetPdg());
   if (charge == error_code)
     return false;
-  if (charge == 0)
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
     return false;
 
   if (_pid == 0 && charge < 0)
     return false;
-  if (_pid == 4 && charge > 0)
+  if (_pid == 5 && charge > 0)
     return false;
 
   return true;
@@ -525,7 +701,7 @@ Bool_t qaUtility::Cut_Particle_v2_acceptance(qaParticle *const &particle)
   Double_t charge = GetCharge(particle->GetPdg());
   if (charge == error_code)
     return false;
-  if (charge == 0)
+  if (charge == 0 && TMath::Abs(particle->GetPdg()) != 2112)
     return false;
 
   return true;
@@ -626,7 +802,7 @@ Bool_t qaUtility::Cut_Particle_v2_PID_pt(qaParticleLight const &particle, Int_t
 {
   if (_pid == -1)
     return false;
-  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 4)
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
     return false;
 
   // PID related kinematics cut
@@ -643,28 +819,36 @@ Bool_t qaUtility::Cut_Particle_v2_PID_pt(qaParticleLight const &particle, Int_t
     return false;
   if (_pid == 3 && y > Cut_v2_Particle_ymax_pr)
     return false;
-  if (_pid == 5 && y < Cut_v2_Particle_ymin_pi)
+  if (_pid == 5 && y < Cut_v2_Particle_ymin_ne)
+    return false;
+  if (_pid == 4 && y > Cut_v2_Particle_ymax_ne)
+    return false;
+  if (_pid == 6 && y < Cut_v2_Particle_ymin_pi)
+    return false;
+  if (_pid == 6 && y > Cut_v2_Particle_ymax_pi)
     return false;
-  if (_pid == 5 && y > Cut_v2_Particle_ymax_pi)
+  if (_pid == 7 && y < Cut_v2_Particle_ymin_ka)
     return false;
-  if (_pid == 6 && y < Cut_v2_Particle_ymin_ka)
+  if (_pid == 7 && y > Cut_v2_Particle_ymax_ka)
     return false;
-  if (_pid == 6 && y > Cut_v2_Particle_ymax_ka)
+  if (_pid == 8 && y < Cut_v2_Particle_ymin_pr)
     return false;
-  if (_pid == 7 && y < Cut_v2_Particle_ymin_pr)
+  if (_pid == 8 && y > Cut_v2_Particle_ymax_pr)
     return false;
-  if (_pid == 7 && y > Cut_v2_Particle_ymax_pr)
+  if (_pid == 9 && y < Cut_v2_Particle_ymin_ne)
+    return false;
+  if (_pid == 9 && y > Cut_v2_Particle_ymax_ne)
     return false;
 
   Double_t charge = GetCharge(particle.GetPdg());
   if (charge == error_code)
     return false;
-  if (charge == 0)
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
     return false;
 
   if (_pid == 0 && charge < 0)
     return false;
-  if (_pid == 4 && charge > 0)
+  if (_pid == 5 && charge > 0)
     return false;
 
   return true;
@@ -674,7 +858,7 @@ Bool_t qaUtility::Cut_Particle_v2_PID_y(qaParticleLight const &particle, Int_t _
 {
   if (_pid == -1)
     return false;
-  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 4)
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
     return false;
 
   // PID related kinematics cut
@@ -690,28 +874,298 @@ Bool_t qaUtility::Cut_Particle_v2_PID_y(qaParticleLight const &particle, Int_t _
     return false;
   if (_pid == 3 && particle.GetPt() > Cut_v2_Particle_ptmax_pr)
     return false;
-  if (_pid == 5 && particle.GetPt() < Cut_v2_Particle_ptmin_pi)
+  if (_pid == 4 && particle.GetPt() < Cut_v2_Particle_ptmin_ne)
+    return false;
+  if (_pid == 4 && particle.GetPt() > Cut_v2_Particle_ptmax_ne)
+    return false;
+  if (_pid == 6 && particle.GetPt() < Cut_v2_Particle_ptmin_pi)
+    return false;
+  if (_pid == 6 && particle.GetPt() > Cut_v2_Particle_ptmax_pi)
+    return false;
+  if (_pid == 7 && particle.GetPt() < Cut_v2_Particle_ptmin_ka)
+    return false;
+  if (_pid == 7 && particle.GetPt() > Cut_v2_Particle_ptmax_ka)
+    return false;
+  if (_pid == 8 && particle.GetPt() < Cut_v2_Particle_ptmin_pr)
+    return false;
+  if (_pid == 8 && particle.GetPt() > Cut_v2_Particle_ptmax_pr)
+    return false;
+  if (_pid == 9 && particle.GetPt() < Cut_v2_Particle_ptmin_ne)
+    return false;
+  if (_pid == 9 && particle.GetPt() > Cut_v2_Particle_ptmax_ne)
+    return false;
+
+  Double_t charge = GetCharge(particle.GetPdg());
+  if (charge == error_code)
+    return false;
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
+    return false;
+
+  if (_pid == 0 && charge < 0)
+    return false;
+  if (_pid == 5 && charge > 0)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Particle_v3_acceptance(qaParticle *const &particle)
+{
+  if (particle->GetEta() < Cut_v3_Particle_etamin)
+    return false;
+  if (particle->GetEta() > Cut_v3_Particle_etamax)
+    return false;
+  if (particle->GetPt() < Cut_v3_Particle_ptmin)
+    return false;
+  if (particle->GetPt() > Cut_v3_Particle_ptmax)
+    return false;
+
+  Double_t charge = GetCharge(particle->GetPdg());
+  if (charge == error_code)
+    return false;
+  if (charge == 0 && TMath::Abs(particle->GetPdg()) != 2112)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Particle_v3_PID_pt(qaParticleLight const &particle, Int_t _pid)
+{
+  if (_pid == -1)
+    return false;
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
+    return false;
+
+  // PID related kinematics cut
+  Double_t y = 0.5 * TMath::Log((particle.GetEnergy() + particle.GetPz()) / (particle.GetEnergy() - particle.GetPz()));
+  if (_pid == 1 && y < Cut_v3_Particle_ymin_pi)
+    return false;
+  if (_pid == 1 && y > Cut_v3_Particle_ymax_pi)
+    return false;
+  if (_pid == 2 && y < Cut_v3_Particle_ymin_ka)
+    return false;
+  if (_pid == 2 && y > Cut_v3_Particle_ymax_ka)
+    return false;
+  if (_pid == 3 && y < Cut_v3_Particle_ymin_pr)
+    return false;
+  if (_pid == 3 && y > Cut_v3_Particle_ymax_pr)
+    return false;
+  if (_pid == 5 && y < Cut_v3_Particle_ymin_ne)
+    return false;
+  if (_pid == 4 && y > Cut_v3_Particle_ymax_ne)
+    return false;
+  if (_pid == 6 && y < Cut_v3_Particle_ymin_pi)
+    return false;
+  if (_pid == 6 && y > Cut_v3_Particle_ymax_pi)
+    return false;
+  if (_pid == 7 && y < Cut_v3_Particle_ymin_ka)
+    return false;
+  if (_pid == 7 && y > Cut_v3_Particle_ymax_ka)
+    return false;
+  if (_pid == 8 && y < Cut_v3_Particle_ymin_pr)
+    return false;
+  if (_pid == 8 && y > Cut_v3_Particle_ymax_pr)
+    return false;
+  if (_pid == 9 && y < Cut_v3_Particle_ymin_ne)
+    return false;
+  if (_pid == 9 && y > Cut_v3_Particle_ymax_ne)
+    return false;
+
+  Double_t charge = GetCharge(particle.GetPdg());
+  if (charge == error_code)
+    return false;
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
+    return false;
+
+  if (_pid == 0 && charge < 0)
+    return false;
+  if (_pid == 5 && charge > 0)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Particle_v3_PID_y(qaParticleLight const &particle, Int_t _pid)
+{
+  if (_pid == -1)
+    return false;
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
+    return false;
+
+  // PID related kinematics cut
+  if (_pid == 1 && particle.GetPt() < Cut_v3_Particle_ptmin_pi)
+    return false;
+  if (_pid == 1 && particle.GetPt() > Cut_v3_Particle_ptmax_pi)
+    return false;
+  if (_pid == 2 && particle.GetPt() < Cut_v3_Particle_ptmin_ka)
+    return false;
+  if (_pid == 2 && particle.GetPt() > Cut_v3_Particle_ptmax_ka)
+    return false;
+  if (_pid == 3 && particle.GetPt() < Cut_v3_Particle_ptmin_pr)
+    return false;
+  if (_pid == 3 && particle.GetPt() > Cut_v3_Particle_ptmax_pr)
+    return false;
+  if (_pid == 4 && particle.GetPt() < Cut_v3_Particle_ptmin_ne)
+    return false;
+  if (_pid == 4 && particle.GetPt() > Cut_v3_Particle_ptmax_ne)
+    return false;
+  if (_pid == 6 && particle.GetPt() < Cut_v3_Particle_ptmin_pi)
+    return false;
+  if (_pid == 6 && particle.GetPt() > Cut_v3_Particle_ptmax_pi)
+    return false;
+  if (_pid == 7 && particle.GetPt() < Cut_v3_Particle_ptmin_ka)
+    return false;
+  if (_pid == 7 && particle.GetPt() > Cut_v3_Particle_ptmax_ka)
+    return false;
+  if (_pid == 8 && particle.GetPt() < Cut_v3_Particle_ptmin_pr)
+    return false;
+  if (_pid == 8 && particle.GetPt() > Cut_v3_Particle_ptmax_pr)
+    return false;
+  if (_pid == 9 && particle.GetPt() < Cut_v3_Particle_ptmin_ne)
+    return false;
+  if (_pid == 9 && particle.GetPt() > Cut_v3_Particle_ptmax_ne)
+    return false;
+
+  Double_t charge = GetCharge(particle.GetPdg());
+  if (charge == error_code)
+    return false;
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
+    return false;
+
+  if (_pid == 0 && charge < 0)
+    return false;
+  if (_pid == 5 && charge > 0)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Particle_v4_acceptance(qaParticle *const &particle)
+{
+  if (particle->GetEta() < Cut_v4_Particle_etamin)
+    return false;
+  if (particle->GetEta() > Cut_v4_Particle_etamax)
+    return false;
+  if (particle->GetPt() < Cut_v4_Particle_ptmin)
+    return false;
+  if (particle->GetPt() > Cut_v4_Particle_ptmax)
+    return false;
+
+  Double_t charge = GetCharge(particle->GetPdg());
+  if (charge == error_code)
+    return false;
+  if (charge == 0 && TMath::Abs(particle->GetPdg()) != 2112)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Particle_v4_PID_pt(qaParticleLight const &particle, Int_t _pid)
+{
+  if (_pid == -1)
+    return false;
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
+    return false;
+
+  // PID related kinematics cut
+  Double_t y = 0.5 * TMath::Log((particle.GetEnergy() + particle.GetPz()) / (particle.GetEnergy() - particle.GetPz()));
+  if (_pid == 1 && y < Cut_v4_Particle_ymin_pi)
+    return false;
+  if (_pid == 1 && y > Cut_v4_Particle_ymax_pi)
+    return false;
+  if (_pid == 2 && y < Cut_v4_Particle_ymin_ka)
+    return false;
+  if (_pid == 2 && y > Cut_v4_Particle_ymax_ka)
+    return false;
+  if (_pid == 3 && y < Cut_v4_Particle_ymin_pr)
+    return false;
+  if (_pid == 3 && y > Cut_v4_Particle_ymax_pr)
+    return false;
+  if (_pid == 5 && y < Cut_v4_Particle_ymin_ne)
+    return false;
+  if (_pid == 4 && y > Cut_v4_Particle_ymax_ne)
+    return false;
+  if (_pid == 6 && y < Cut_v4_Particle_ymin_pi)
+    return false;
+  if (_pid == 6 && y > Cut_v4_Particle_ymax_pi)
+    return false;
+  if (_pid == 7 && y < Cut_v4_Particle_ymin_ka)
+    return false;
+  if (_pid == 7 && y > Cut_v4_Particle_ymax_ka)
+    return false;
+  if (_pid == 8 && y < Cut_v4_Particle_ymin_pr)
+    return false;
+  if (_pid == 8 && y > Cut_v4_Particle_ymax_pr)
+    return false;
+  if (_pid == 9 && y < Cut_v4_Particle_ymin_ne)
+    return false;
+  if (_pid == 9 && y > Cut_v4_Particle_ymax_ne)
+    return false;
+
+  Double_t charge = GetCharge(particle.GetPdg());
+  if (charge == error_code)
+    return false;
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
+    return false;
+
+  if (_pid == 0 && charge < 0)
+    return false;
+  if (_pid == 5 && charge > 0)
+    return false;
+
+  return true;
+}
+
+Bool_t qaUtility::Cut_Particle_v4_PID_y(qaParticleLight const &particle, Int_t _pid)
+{
+  if (_pid == -1)
+    return false;
+  if (particle.GetPdg() != vpdg.at(_pid) && _pid != 0 && _pid != 5)
+    return false;
+
+  // PID related kinematics cut
+  if (_pid == 1 && particle.GetPt() < Cut_v4_Particle_ptmin_pi)
+    return false;
+  if (_pid == 1 && particle.GetPt() > Cut_v4_Particle_ptmax_pi)
+    return false;
+  if (_pid == 2 && particle.GetPt() < Cut_v4_Particle_ptmin_ka)
+    return false;
+  if (_pid == 2 && particle.GetPt() > Cut_v4_Particle_ptmax_ka)
+    return false;
+  if (_pid == 3 && particle.GetPt() < Cut_v4_Particle_ptmin_pr)
+    return false;
+  if (_pid == 3 && particle.GetPt() > Cut_v4_Particle_ptmax_pr)
+    return false;
+  if (_pid == 4 && particle.GetPt() < Cut_v4_Particle_ptmin_ne)
+    return false;
+  if (_pid == 4 && particle.GetPt() > Cut_v4_Particle_ptmax_ne)
+    return false;
+  if (_pid == 6 && particle.GetPt() < Cut_v4_Particle_ptmin_pi)
+    return false;
+  if (_pid == 6 && particle.GetPt() > Cut_v4_Particle_ptmax_pi)
+    return false;
+  if (_pid == 7 && particle.GetPt() < Cut_v4_Particle_ptmin_ka)
     return false;
-  if (_pid == 5 && particle.GetPt() > Cut_v2_Particle_ptmax_pi)
+  if (_pid == 7 && particle.GetPt() > Cut_v4_Particle_ptmax_ka)
     return false;
-  if (_pid == 6 && particle.GetPt() < Cut_v2_Particle_ptmin_ka)
+  if (_pid == 8 && particle.GetPt() < Cut_v4_Particle_ptmin_pr)
     return false;
-  if (_pid == 6 && particle.GetPt() > Cut_v2_Particle_ptmax_ka)
+  if (_pid == 8 && particle.GetPt() > Cut_v4_Particle_ptmax_pr)
     return false;
-  if (_pid == 7 && particle.GetPt() < Cut_v2_Particle_ptmin_pr)
+  if (_pid == 9 && particle.GetPt() < Cut_v4_Particle_ptmin_ne)
     return false;
-  if (_pid == 7 && particle.GetPt() > Cut_v2_Particle_ptmax_pr)
+  if (_pid == 9 && particle.GetPt() > Cut_v4_Particle_ptmax_ne)
     return false;
 
   Double_t charge = GetCharge(particle.GetPdg());
   if (charge == error_code)
     return false;
-  if (charge == 0)
+  if (charge == 0 && TMath::Abs(particle.GetPdg()) != 2112)
     return false;
 
   if (_pid == 0 && charge < 0)
     return false;
-  if (_pid == 4 && charge > 0)
+  if (_pid == 5 && charge > 0)
     return false;
 
   return true;
@@ -733,12 +1187,16 @@ Int_t qaUtility::GetPdgId(Int_t pdg)
     return 2;
   if (pdg == vpdg.at(3))
     return 3;
-  if (pdg == vpdg.at(5))
-    return 5;
+  if (pdg == vpdg.at(4))
+    return 4;
   if (pdg == vpdg.at(6))
     return 6;
   if (pdg == vpdg.at(7))
     return 7;
+  if (pdg == vpdg.at(8))
+    return 8;
+  if (pdg == vpdg.at(9))
+    return 9;
   return -1;
 }
 

+ 79 - 3
utility/Utility.h

@@ -33,9 +33,9 @@ public:
   static qaUtility *GetInstance();
 
   const Double_t error_code = -999.;
-  const Int_t npid = 8;
-  const std::vector<Int_t> vpdg = {0, 211, 321, 2212, 0, -211, -321, -2212};
-  const std::vector<Double_t> mpdg = {error_code, 0.13957, 0.493677, 0.938272, error_code, 0.13957, 0.493677, 0.938272};
+  const Int_t npid = 10;
+  const std::vector<Int_t> vpdg = {0, 211, 321, 2212, 2112, 0, -211, -321, -2212, -2112};
+  const std::vector<Double_t> mpdg = {error_code, 0.13957, 0.493677, 0.938272, 0.88277299, error_code, 0.13957, 0.493677, 0.938272, 0.88277299};
   const Int_t maxCentBins = 20;
 
   Int_t Nevents;
@@ -46,6 +46,8 @@ public:
   Int_t Is_refmult;
   Int_t Is_v1;
   Int_t Is_v2;
+  Int_t Is_v3;
+  Int_t Is_v4;
 
   Double_t Cut_minbias_Event_bmin;
   Double_t Cut_minbias_Event_bmax;
@@ -88,6 +90,10 @@ public:
   Double_t Cut_v1_Particle_ptmax_pr;
   Double_t Cut_v1_Particle_ymin_pr;
   Double_t Cut_v1_Particle_ymax_pr;
+  Double_t Cut_v1_Particle_ptmin_ne;
+  Double_t Cut_v1_Particle_ptmax_ne;
+  Double_t Cut_v1_Particle_ymin_ne;
+  Double_t Cut_v1_Particle_ymax_ne;
 
   Double_t Cut_v2_Event_bmin;
   Double_t Cut_v2_Event_bmax;
@@ -113,6 +119,68 @@ public:
   Double_t Cut_v2_Particle_ptmax_pr;
   Double_t Cut_v2_Particle_ymin_pr;
   Double_t Cut_v2_Particle_ymax_pr;
+  Double_t Cut_v2_Particle_ptmin_ne;
+  Double_t Cut_v2_Particle_ptmax_ne;
+  Double_t Cut_v2_Particle_ymin_ne;
+  Double_t Cut_v2_Particle_ymax_ne;
+
+  Double_t Cut_v3_Event_bmin;
+  Double_t Cut_v3_Event_bmax;
+  std::string sCut_v3_Event_bCent;
+  std::string sCut_v3_Event_mCent;
+  std::vector<Float_t> Cut_v3_Event_bCent;
+  std::vector<Float_t> Cut_v3_Event_mCent;
+  Double_t Cut_v3_Particle_ptmin;
+  Double_t Cut_v3_Particle_ptmax;
+  Double_t Cut_v3_Particle_etamin;
+  Double_t Cut_v3_Particle_etamax;
+  Double_t Cut_v3_Particle_ymin;
+  Double_t Cut_v3_Particle_ymax;
+  Double_t Cut_v3_Particle_ptmin_pi;
+  Double_t Cut_v3_Particle_ptmax_pi;
+  Double_t Cut_v3_Particle_ymin_pi;
+  Double_t Cut_v3_Particle_ymax_pi;
+  Double_t Cut_v3_Particle_ptmin_ka;
+  Double_t Cut_v3_Particle_ptmax_ka;
+  Double_t Cut_v3_Particle_ymin_ka;
+  Double_t Cut_v3_Particle_ymax_ka;
+  Double_t Cut_v3_Particle_ptmin_pr;
+  Double_t Cut_v3_Particle_ptmax_pr;
+  Double_t Cut_v3_Particle_ymin_pr;
+  Double_t Cut_v3_Particle_ymax_pr;
+  Double_t Cut_v3_Particle_ptmin_ne;
+  Double_t Cut_v3_Particle_ptmax_ne;
+  Double_t Cut_v3_Particle_ymin_ne;
+  Double_t Cut_v3_Particle_ymax_ne;
+
+  Double_t Cut_v4_Event_bmin;
+  Double_t Cut_v4_Event_bmax;
+  std::string sCut_v4_Event_bCent;
+  std::string sCut_v4_Event_mCent;
+  std::vector<Float_t> Cut_v4_Event_bCent;
+  std::vector<Float_t> Cut_v4_Event_mCent;
+  Double_t Cut_v4_Particle_ptmin;
+  Double_t Cut_v4_Particle_ptmax;
+  Double_t Cut_v4_Particle_etamin;
+  Double_t Cut_v4_Particle_etamax;
+  Double_t Cut_v4_Particle_ymin;
+  Double_t Cut_v4_Particle_ymax;
+  Double_t Cut_v4_Particle_ptmin_pi;
+  Double_t Cut_v4_Particle_ptmax_pi;
+  Double_t Cut_v4_Particle_ymin_pi;
+  Double_t Cut_v4_Particle_ymax_pi;
+  Double_t Cut_v4_Particle_ptmin_ka;
+  Double_t Cut_v4_Particle_ptmax_ka;
+  Double_t Cut_v4_Particle_ymin_ka;
+  Double_t Cut_v4_Particle_ymax_ka;
+  Double_t Cut_v4_Particle_ptmin_pr;
+  Double_t Cut_v4_Particle_ptmax_pr;
+  Double_t Cut_v4_Particle_ymin_pr;
+  Double_t Cut_v4_Particle_ymax_pr;
+  Double_t Cut_v4_Particle_ptmin_ne;
+  Double_t Cut_v4_Particle_ptmax_ne;
+  Double_t Cut_v4_Particle_ymin_ne;
+  Double_t Cut_v4_Particle_ymax_ne;
 
   Bool_t ReadConfig(const TString &configFileName);
   TChain *initChain(const TString &inputFileName, const char *chainName);
@@ -124,10 +192,14 @@ public:
   Bool_t Cut_Event_refmult(qaEvent *const &event);
   Bool_t Cut_Event_v1(qaEvent *const &event);
   Bool_t Cut_Event_v2(qaEvent *const &event);
+  Bool_t Cut_Event_v3(qaEvent *const &event);
+  Bool_t Cut_Event_v4(qaEvent *const &event);
   Bool_t Cut_Particle_minbias(qaParticle *const &particle);
   Bool_t Cut_Particle_refmult(qaParticle *const &particle);
   Bool_t Cut_Particle_v1_acceptance(qaParticle *const &particle);
   Bool_t Cut_Particle_v2_acceptance(qaParticle *const &particle);
+  Bool_t Cut_Particle_v3_acceptance(qaParticle *const &particle);
+  Bool_t Cut_Particle_v4_acceptance(qaParticle *const &particle);
   // Bool_t Cut_Particle_v1_PID_pt(qaParticle *const &particle, Int_t _pid);
   // Bool_t Cut_Particle_v1_PID_y(qaParticle *const &particle, Int_t _pid);
   // Bool_t Cut_Particle_v2_PID_pt(qaParticle *const &particle, Int_t _pid);
@@ -136,6 +208,10 @@ public:
   Bool_t Cut_Particle_v1_PID_y(qaParticleLight const &particle, Int_t _pid);
   Bool_t Cut_Particle_v2_PID_pt(qaParticleLight const &particle, Int_t _pid);
   Bool_t Cut_Particle_v2_PID_y(qaParticleLight const &particle, Int_t _pid);
+  Bool_t Cut_Particle_v3_PID_pt(qaParticleLight const &particle, Int_t _pid);
+  Bool_t Cut_Particle_v3_PID_y(qaParticleLight const &particle, Int_t _pid);
+  Bool_t Cut_Particle_v4_PID_pt(qaParticleLight const &particle, Int_t _pid);
+  Bool_t Cut_Particle_v4_PID_y(qaParticleLight const &particle, Int_t _pid);
 
   Double_t GetCharge(Int_t pdg);
   Int_t GetPdgId(Int_t pdg);