Browse Source

Added flow calculation for negatively charged particles

PeterParfenov 2 years ago
parent
commit
6c1748db36

+ 2 - 1
CMakeLists.txt

@@ -17,7 +17,7 @@ find_package(Git)
 list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
 
 #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
-find_package(ROOT REQUIRED COMPONENTS MathCore RIO Hist Tree Net MathMore)
+find_package(ROOT REQUIRED COMPONENTS MathCore RIO Hist Tree Net MathMore EG)
 
 #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
 include(${ROOT_USE_FILE})
@@ -43,6 +43,7 @@ set(MPD_FLOW_INCLUDE_DIRECTORIES
   "${CMAKE_CURRENT_SOURCE_DIR}/utils"
   "${CMAKE_CURRENT_SOURCE_DIR}/qvector"
   "${CMAKE_CURRENT_SOURCE_DIR}/selector"
+  "${CMAKE_CURRENT_SOURCE_DIR}/corrections"
   "${CMAKE_CURRENT_SOURCE_DIR}/inputreader"
   "${CMAKE_CURRENT_SOURCE_DIR}/eventanalysis"
   "${CMAKE_CURRENT_SOURCE_DIR}/bin"

+ 223 - 12
bin/get-flow.cpp

@@ -12,6 +12,7 @@
 #include <TFile.h>
 #include <iostream>
 #include <TMath.h>
+#include <TDatabasePDG.h>
 
 #include <PicoDstMCEvent.h>
 #include <PicoDstRecoEvent.h>
@@ -409,7 +410,8 @@ int main(int argc, char **argv)
           v2Tpc = Cos(2. * (recoTrack->GetPhi() - vPsiTpcR.at(iGap))) / fResTpc[iGap]->Eval(cent);
           v2TpcMc = Cos(2. * (mcTrack->GetPhi() - vPsiTpcR.at(iGap))) / fResTpc[iGap]->Eval(cent);
 
-          pv2PtTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (recoTrack->GetCharge() > 0)
+            pv2PtTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2Tpc);
           if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
             pv2PtTpc[iGap][1]->Fill(recoTrack->GetPt(), cent, v2Tpc);
           if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -424,7 +426,8 @@ int main(int argc, char **argv)
           if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv2YTpc[iGap][3]->Fill(Rapidity, cent, v2Tpc);
 
-          pv2PtRecoMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (recoTrack->GetCharge() > 0)
+            pv2PtRecoMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
           if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
             pv2PtRecoMcTpc[iGap][1]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
           if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -438,13 +441,46 @@ int main(int argc, char **argv)
             pv2YRecoMcTpc[iGap][2]->Fill(RapidityMc, cent, v2TpcMc);
           if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv2YRecoMcTpc[iGap][3]->Fill(RapidityMc, cent, v2TpcMc);
+          
+          if (recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][1]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][2]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][3]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+
+          if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YTpc[iGap][1]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YTpc[iGap][2]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YTpc[iGap][3]->Fill(Rapidity, cent, v2Tpc);
+
+          if (recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][4]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][5]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][6]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][7]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YRecoMcTpc[iGap][5]->Fill(RapidityMc, cent, v2TpcMc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YRecoMcTpc[iGap][6]->Fill(RapidityMc, cent, v2TpcMc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YRecoMcTpc[iGap][7]->Fill(RapidityMc, cent, v2TpcMc);
         }
         if (recoTrack->GetEta() > TpcEtaGap[iGap])
         {
           v2Tpc = Cos(2. * (recoTrack->GetPhi() - vPsiTpcL.at(iGap))) / fResTpc[iGap]->Eval(cent);
           v2TpcMc = Cos(2. * (mcTrack->GetPhi() - vPsiTpcL.at(iGap))) / fResTpc[iGap]->Eval(cent);
 
-          pv2PtTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (recoTrack->GetCharge() > 0)
+            pv2PtTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2Tpc);
           if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
             pv2PtTpc[iGap][1]->Fill(recoTrack->GetPt(), cent, v2Tpc);
           if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -459,7 +495,8 @@ int main(int argc, char **argv)
           if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv2YTpc[iGap][3]->Fill(Rapidity, cent, v2Tpc);
 
-          pv2PtRecoMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (recoTrack->GetCharge() > 0)
+            pv2PtRecoMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
           if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
             pv2PtRecoMcTpc[iGap][1]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
           if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -473,6 +510,38 @@ int main(int argc, char **argv)
             pv2YRecoMcTpc[iGap][2]->Fill(RapidityMc, cent, v2TpcMc);
           if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv2YRecoMcTpc[iGap][3]->Fill(RapidityMc, cent, v2TpcMc);
+          
+          if (recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][4]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][5]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][6]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtTpc[iGap][7]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+
+          if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YTpc[iGap][5]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YTpc[iGap][6]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YTpc[iGap][7]->Fill(Rapidity, cent, v2Tpc);
+
+          if (recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][4]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][5]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][6]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2PtRecoMcTpc[iGap][7]->Fill(mcTrack->GetPt(), cent, v2TpcMc);
+
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YRecoMcTpc[iGap][5]->Fill(RapidityMc, cent, v2TpcMc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YRecoMcTpc[iGap][6]->Fill(RapidityMc, cent, v2TpcMc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv2YRecoMcTpc[iGap][7]->Fill(RapidityMc, cent, v2TpcMc);
         }
       }
 
@@ -491,7 +560,8 @@ int main(int argc, char **argv)
 
         if (Abs(recoTrack->GetEta()) > MinV1PtEta)
         {
-          pv1PtFHCal[0]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (recoTrack->GetCharge() > 0)
+            pv1PtFHCal[0]->Fill(recoTrack->GetPt(), cent, v1FHCal);
           if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
             pv1PtFHCal[1]->Fill(recoTrack->GetPt(), cent, v1FHCal);
           if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -499,13 +569,32 @@ int main(int argc, char **argv)
           if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv1PtFHCal[3]->Fill(recoTrack->GetPt(), cent, v1FHCal);
 
-          pv1PtRecoRp[0]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
+          if (recoTrack->GetCharge() > 0)
+            pv1PtRecoRp[0]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
           if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
             pv1PtRecoRp[1]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
           if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
             pv1PtRecoRp[2]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
           if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv1PtRecoRp[3]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
+
+          if (recoTrack->GetCharge() < 0)
+            pv1PtFHCal[4]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PtFHCal[5]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PtFHCal[6]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PtFHCal[7]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+
+          if (recoTrack->GetCharge() < 0)
+            pv1PtRecoRp[4]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PtRecoRp[5]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PtRecoRp[6]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PtRecoRp[7]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
         }
 
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
@@ -522,7 +611,22 @@ int main(int argc, char **argv)
         if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
           pv1YRecoRp[3]->Fill(RapidityMc, cent, v1FHCalYMc);
 
-        pv2PtFHCal[0]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1YFHCal[5]->Fill(Rapidity, cent, v1FHCalY);
+        if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1YFHCal[6]->Fill(Rapidity, cent, v1FHCalY);
+        if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1YFHCal[7]->Fill(Rapidity, cent, v1FHCalY);
+
+        if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1YRecoRp[5]->Fill(RapidityMc, cent, v1FHCalYMc);
+        if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1YRecoRp[6]->Fill(RapidityMc, cent, v1FHCalYMc);
+        if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1YRecoRp[7]->Fill(RapidityMc, cent, v1FHCalYMc);
+
+        if (recoTrack->GetCharge() > 0)
+          pv2PtFHCal[0]->Fill(recoTrack->GetPt(), cent, v2FHCal);
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
           pv2PtFHCal[1]->Fill(recoTrack->GetPt(), cent, v2FHCal);
         if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -530,7 +634,8 @@ int main(int argc, char **argv)
         if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
           pv2PtFHCal[3]->Fill(recoTrack->GetPt(), cent, v2FHCal);
 
-        pv2PtRecoRp[0]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
+        if (recoTrack->GetCharge() > 0)
+          pv2PtRecoRp[0]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
         if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
           pv2PtRecoRp[1]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
         if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -538,6 +643,24 @@ int main(int argc, char **argv)
         if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
           pv2PtRecoRp[3]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
 
+        if (recoTrack->GetCharge() < 0)
+          pv2PtFHCal[4]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PtFHCal[5]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PtFHCal[6]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PtFHCal[7]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+
+        if (recoTrack->GetCharge() < 0)
+          pv2PtRecoRp[4]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
+        if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PtRecoRp[5]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
+        if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PtRecoRp[6]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
+        if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PtRecoRp[7]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
+
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
           pv2YFHCal[1]->Fill(Rapidity, cent, v2FHCal);
         if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -551,6 +674,20 @@ int main(int argc, char **argv)
           pv2YRecoRp[2]->Fill(RapidityMc, cent, v2FHCalMc);
         if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
           pv2YRecoRp[3]->Fill(RapidityMc, cent, v2FHCalMc);
+
+        if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2YFHCal[5]->Fill(Rapidity, cent, v2FHCal);
+        if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2YFHCal[6]->Fill(Rapidity, cent, v2FHCal);
+        if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2YFHCal[7]->Fill(Rapidity, cent, v2FHCal);
+
+        if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2YRecoRp[5]->Fill(RapidityMc, cent, v2FHCalMc);
+        if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2YRecoRp[6]->Fill(RapidityMc, cent, v2FHCalMc);
+        if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2YRecoRp[7]->Fill(RapidityMc, cent, v2FHCalMc);
       }
     }
 
@@ -581,6 +718,12 @@ int main(int argc, char **argv)
       else
         Rapidity = -999.;
 
+      double charge = 0.;
+      if (TDatabasePDG::Instance()->GetParticle(mcTrack->GetPdg()))
+        charge = TDatabasePDG::Instance()->GetParticle(mcTrack->GetPdg())->Charge() / 3.;
+      else
+        charge = 0.;
+
       // v2 (TPC EP)
       for (int iGap = 0; iGap < NetaGaps; iGap++)
       {
@@ -591,7 +734,8 @@ int main(int argc, char **argv)
         {
           v2McTpc = Cos(2. * (mcTrack->GetPhi() - vPsiMcTpcR.at(iGap))) / fResMcTpc[iGap]->Eval(cent);
 
-          pv2PtMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (charge > 0.)
+            pv2PtMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2McTpc);
           if (selector->isPdgPion(mcTrack))
             pv2PtMcTpc[iGap][1]->Fill(mcTrack->GetPt(), cent, v2McTpc);
           if (selector->isPdgKaon(mcTrack))
@@ -605,12 +749,29 @@ int main(int argc, char **argv)
             pv2YMcTpc[iGap][2]->Fill(Rapidity, cent, v2McTpc);
           if (selector->isPdgProton(mcTrack))
             pv2YMcTpc[iGap][3]->Fill(Rapidity, cent, v2McTpc);
+
+          if (charge < 0.)
+            pv2PtMcTpc[iGap][4]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (selector->isPdgAntiPion(mcTrack))
+            pv2PtMcTpc[iGap][5]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (selector->isPdgAntiKaon(mcTrack))
+            pv2PtMcTpc[iGap][6]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (selector->isPdgAntiProton(mcTrack))
+            pv2PtMcTpc[iGap][7]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+
+          if (selector->isPdgAntiPion(mcTrack))
+            pv2YMcTpc[iGap][5]->Fill(Rapidity, cent, v2McTpc);
+          if (selector->isPdgAntiKaon(mcTrack))
+            pv2YMcTpc[iGap][6]->Fill(Rapidity, cent, v2McTpc);
+          if (selector->isPdgAntiProton(mcTrack))
+            pv2YMcTpc[iGap][7]->Fill(Rapidity, cent, v2McTpc);
         }
         if (mcTrack->GetEta() > TpcEtaGap[iGap])
         {
           v2McTpc = Cos(2. * (mcTrack->GetPhi() - vPsiMcTpcL.at(iGap))) / fResMcTpc[iGap]->Eval(cent);
 
-          pv2PtMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (charge > 0.)
+            pv2PtMcTpc[iGap][0]->Fill(mcTrack->GetPt(), cent, v2McTpc);
           if (selector->isPdgPion(mcTrack))
             pv2PtMcTpc[iGap][1]->Fill(mcTrack->GetPt(), cent, v2McTpc);
           if (selector->isPdgKaon(mcTrack))
@@ -624,6 +785,22 @@ int main(int argc, char **argv)
             pv2YMcTpc[iGap][2]->Fill(Rapidity, cent, v2McTpc);
           if (selector->isPdgProton(mcTrack))
             pv2YMcTpc[iGap][3]->Fill(Rapidity, cent, v2McTpc);
+
+          if (charge < 0.)
+            pv2PtMcTpc[iGap][4]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (selector->isPdgAntiPion(mcTrack))
+            pv2PtMcTpc[iGap][5]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (selector->isPdgAntiKaon(mcTrack))
+            pv2PtMcTpc[iGap][6]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+          if (selector->isPdgAntiProton(mcTrack))
+            pv2PtMcTpc[iGap][7]->Fill(mcTrack->GetPt(), cent, v2McTpc);
+
+          if (selector->isPdgAntiPion(mcTrack))
+            pv2YMcTpc[iGap][5]->Fill(Rapidity, cent, v2McTpc);
+          if (selector->isPdgAntiKaon(mcTrack))
+            pv2YMcTpc[iGap][6]->Fill(Rapidity, cent, v2McTpc);
+          if (selector->isPdgAntiProton(mcTrack))
+            pv2YMcTpc[iGap][7]->Fill(Rapidity, cent, v2McTpc);
         }
       }
 
@@ -639,13 +816,23 @@ int main(int argc, char **argv)
 
         if (Abs(mcTrack->GetEta()) > MinV1PtEta)
         {
-          pv1PtRp[0]->Fill(mcTrack->GetPt(), cent, v1Rp);
+          if (charge > 0.)
+            pv1PtRp[0]->Fill(mcTrack->GetPt(), cent, v1Rp);
           if (selector->isPdgPion(mcTrack))
             pv1PtRp[1]->Fill(mcTrack->GetPt(), cent, v1Rp);
           if (selector->isPdgKaon(mcTrack))
             pv1PtRp[2]->Fill(mcTrack->GetPt(), cent, v1Rp);
           if (selector->isPdgProton(mcTrack))
             pv1PtRp[3]->Fill(mcTrack->GetPt(), cent, v1Rp);
+          
+          if (charge < 0.)
+            pv1PtRp[4]->Fill(mcTrack->GetPt(), cent, v1Rp);
+          if (selector->isPdgAntiPion(mcTrack))
+            pv1PtRp[5]->Fill(mcTrack->GetPt(), cent, v1Rp);
+          if (selector->isPdgAntiKaon(mcTrack))
+            pv1PtRp[6]->Fill(mcTrack->GetPt(), cent, v1Rp);
+          if (selector->isPdgAntiProton(mcTrack))
+            pv1PtRp[7]->Fill(mcTrack->GetPt(), cent, v1Rp);
         }
 
         if (selector->isPdgPion(mcTrack))
@@ -655,7 +842,15 @@ int main(int argc, char **argv)
         if (selector->isPdgProton(mcTrack))
           pv1YRp[3]->Fill(Rapidity, cent, v1RpY);
 
-        pv2PtRp[0]->Fill(mcTrack->GetPt(), cent, v2Rp);
+        if (selector->isPdgAntiPion(mcTrack))
+          pv1YRp[5]->Fill(Rapidity, cent, v1RpY);
+        if (selector->isPdgAntiKaon(mcTrack))
+          pv1YRp[6]->Fill(Rapidity, cent, v1RpY);
+        if (selector->isPdgAntiProton(mcTrack))
+          pv1YRp[7]->Fill(Rapidity, cent, v1RpY);
+
+        if (charge > 0.)
+          pv2PtRp[0]->Fill(mcTrack->GetPt(), cent, v2Rp);
         if (selector->isPdgPion(mcTrack))
           pv2PtRp[1]->Fill(mcTrack->GetPt(), cent, v2Rp);
         if (selector->isPdgKaon(mcTrack))
@@ -669,6 +864,22 @@ int main(int argc, char **argv)
           pv2YRp[2]->Fill(Rapidity, cent, v2Rp);
         if (selector->isPdgProton(mcTrack))
           pv2YRp[3]->Fill(Rapidity, cent, v2Rp);
+        
+        if (charge < 0.)
+          pv2PtRp[4]->Fill(mcTrack->GetPt(), cent, v2Rp);
+        if (selector->isPdgAntiPion(mcTrack))
+          pv2PtRp[5]->Fill(mcTrack->GetPt(), cent, v2Rp);
+        if (selector->isPdgAntiKaon(mcTrack))
+          pv2PtRp[6]->Fill(mcTrack->GetPt(), cent, v2Rp);
+        if (selector->isPdgAntiProton(mcTrack))
+          pv2PtRp[7]->Fill(mcTrack->GetPt(), cent, v2Rp);
+
+        if (selector->isPdgAntiPion(mcTrack))
+          pv2YRp[5]->Fill(Rapidity, cent, v2Rp);
+        if (selector->isPdgAntiKaon(mcTrack))
+          pv2YRp[6]->Fill(Rapidity, cent, v2Rp);
+        if (selector->isPdgAntiProton(mcTrack))
+          pv2YRp[7]->Fill(Rapidity, cent, v2Rp);
       }
     }
   }

+ 0 - 2
bin/get-res.cpp

@@ -233,8 +233,6 @@ int main(int argc, char **argv)
     mfEventInfo evInfoTpcRec = recentering->ProcessRecentering(evInfoTpcRaw, cent);
     mfEventInfo evInfoTpcFlat = flattening->ProcessFlattening(evInfoTpcRec, cent);
 
-    mfQvector qv;
-    double dPsi = 0.;
     for (int iGap = 0; iGap < NetaGaps; iGap++)
     {
       // Ntracks >= 4 for TpcR and TpcL EP

eventanalysis/mfFlattening.cxx → corrections/mfFlattening.cxx


eventanalysis/mfFlattening.h → corrections/mfFlattening.h


eventanalysis/mfRecentering.cxx → corrections/mfRecentering.cxx


eventanalysis/mfRecentering.h → corrections/mfRecentering.h


+ 24 - 0
selector/mfMcTrackSelector.cxx

@@ -56,4 +56,28 @@ Bool_t mfMcTrackSelector::isPdgProton(PicoDstMCTrack *const &track)
     return true;
   else
     return false;
+}
+
+Bool_t mfMcTrackSelector::isPdgAntiPion(PicoDstMCTrack *const &track)
+{
+  if (track->GetPdg() == pdg[3])
+    return true;
+  else
+    return false;
+}
+
+Bool_t mfMcTrackSelector::isPdgAntiKaon(PicoDstMCTrack *const &track) 
+{
+  if (track->GetPdg() == pdg[4])
+    return true;
+  else
+    return false;
+}
+
+Bool_t mfMcTrackSelector::isPdgAntiProton(PicoDstMCTrack *const &track)
+{
+  if (track->GetPdg() == pdg[5])
+    return true;
+  else
+    return false;
 }

+ 3 - 0
selector/mfMcTrackSelector.h

@@ -18,6 +18,9 @@ public:
   virtual Bool_t isPdgPion(PicoDstMCTrack *const& track);
   virtual Bool_t isPdgKaon(PicoDstMCTrack *const& track);
   virtual Bool_t isPdgProton(PicoDstMCTrack *const& track);
+  virtual Bool_t isPdgAntiPion(PicoDstMCTrack *const& track);
+  virtual Bool_t isPdgAntiKaon(PicoDstMCTrack *const& track);
+  virtual Bool_t isPdgAntiProton(PicoDstMCTrack *const& track);
 
   ClassDef(mfMcTrackSelector,0);
 };

+ 2 - 2
utils/mfNamespace.h

@@ -81,9 +81,9 @@ namespace mfTrack
 namespace mfPid
 {
   const float MinPidProbability = 0.9;
-  const int Npid = 4;
+  const int Npid = 8;
   const float Mass2[] = {0.01948, 0.2437, 0.88035};
-  const int pdg[] = {211, 321, 2212};
+  const int pdg[] = {211, 321, 2212, -211, -321, -2212};
   const int BadTofFlags[] = {0, 4};
 }; // namespace mfPid