Browse Source

changed Nhits>16 and added Pdg-based reco flow

ParfenovPeter 2 years ago
parent
commit
2a44a7f919
2 changed files with 244 additions and 3 deletions
  1. 242 1
      bin/get-flow.cpp
  2. 2 2
      utils/mfNamespace.h

+ 242 - 1
bin/get-flow.cpp

@@ -170,6 +170,15 @@ int main(int argc, char **argv)
   TProfile2D *pv1YFHCal[Npid];
   TProfile2D *pv2YFHCal[Npid];
 
+  TProfile2D *pv2PdgPtTpc[NetaGaps][Npid];
+  TProfile2D *pv2PdgPtSpTpc[NetaGaps][Npid];
+  TProfile2D *pv1PdgPtFHCal[Npid];
+  TProfile2D *pv2PdgPtFHCal[Npid];
+  TProfile2D *pv2PdgYTpc[NetaGaps][Npid];
+  TProfile2D *pv2PdgYSpTpc[NetaGaps][Npid];
+  TProfile2D *pv1PdgYFHCal[Npid];
+  TProfile2D *pv2PdgYFHCal[Npid];
+
   TProfile2D *pv2PtMcTpc[NetaGaps][Npid];
   TProfile2D *pv1PtRp[Npid];
   TProfile2D *pv2PtRp[Npid];
@@ -184,6 +193,13 @@ int main(int argc, char **argv)
   TProfile2D *pv1YRecoRp[Npid];
   TProfile2D *pv2YRecoRp[Npid];
 
+  TProfile2D *pv2PdgPtRecoMcTpc[NetaGaps][Npid];
+  TProfile2D *pv1PdgPtRecoRp[Npid];
+  TProfile2D *pv2PdgPtRecoRp[Npid];
+  TProfile2D *pv2PdgYRecoMcTpc[NetaGaps][Npid];
+  TProfile2D *pv1PdgYRecoRp[Npid];
+  TProfile2D *pv2PdgYRecoRp[Npid];
+
   for (int iGap = 0; iGap < NetaGaps; iGap++)
   {
     for (int iPid = 0; iPid < Npid; iPid++)
@@ -215,6 +231,27 @@ int main(int argc, char **argv)
       pv2YRecoMcTpc[iGap][iPid] = new TProfile2D(Form("pv2YRecoMcTpc_gap%i_pid%i", iGap, iPid),
                                                  Form("pv2YRecoMcTpc_gap%i_pid%i", iGap, iPid),
                                                  320, -1.6, 1.6, NresBin, 0., 100.);
+
+      pv2PdgPtTpc[iGap][iPid] = new TProfile2D(Form("pv2PdgPtTpc_gap%i_pid%i", iGap, iPid),
+                                            Form("pv2PdgPtTpc_gap%i_pid%i", iGap, iPid),
+                                            300, 0., 3., NresBin, 0., 100.);
+      pv2PdgYTpc[iGap][iPid] = new TProfile2D(Form("pv2PdgYTpc_gap%i_pid%i", iGap, iPid),
+                                           Form("pv2PdgYTpc_gap%i_pid%i", iGap, iPid),
+                                           320, -1.6, 1.6, NresBin, 0., 100.);
+
+      pv2PdgPtSpTpc[iGap][iPid] = new TProfile2D(Form("pv2PdgPtSpTpc_gap%i_pid%i", iGap, iPid),
+                                              Form("pv2PdgPtSpTpc_gap%i_pid%i", iGap, iPid),
+                                              300, 0., 3., NresBin, 0., 100.);
+      pv2PdgYSpTpc[iGap][iPid] = new TProfile2D(Form("pv2YSpTpc_gap%i_pid%i", iGap, iPid),
+                                             Form("pv2YSpTpc_gap%i_pid%i", iGap, iPid),
+                                             320, -1.6, 1.6, NresBin, 0., 100.);
+
+      pv2PdgPtRecoMcTpc[iGap][iPid] = new TProfile2D(Form("pv2PdgPtRecoMcTpc_gap%i_pid%i", iGap, iPid),
+                                                  Form("pv2PdgPtRecoMcTpc_gap%i_pid%i", iGap, iPid),
+                                                  300, 0., 3., NresBin, 0., 100.);
+      pv2PdgYRecoMcTpc[iGap][iPid] = new TProfile2D(Form("pv2PdgYRecoMcTpc_gap%i_pid%i", iGap, iPid),
+                                                 Form("pv2PdgYRecoMcTpc_gap%i_pid%i", iGap, iPid),
+                                                 320, -1.6, 1.6, NresBin, 0., 100.);
     }
   }
   for (int iPid = 0; iPid < Npid; iPid++)
@@ -232,6 +269,19 @@ int main(int argc, char **argv)
                                      Form("pv2YFHCal_pid%i", iPid),
                                      320, -1.6, 1.6, NresBin, 0., 100.);
 
+    pv1PdgPtFHCal[iPid] = new TProfile2D(Form("pv1PdgPtFHCal_pid%i", iPid),
+                                      Form("pv1PdgPtFHCal_pid%i", iPid),
+                                      300, 0., 3., NresBin, 0., 100.);
+    pv2PdgPtFHCal[iPid] = new TProfile2D(Form("pv2PdgPtFHCal_pid%i", iPid),
+                                      Form("pv2PdgPtFHCal_pid%i", iPid),
+                                      300, 0., 3., NresBin, 0., 100.);
+    pv1PdgYFHCal[iPid] = new TProfile2D(Form("pv1PdgYFHCal_pid%i", iPid),
+                                     Form("pv1PdgYFHCal_pid%i", iPid),
+                                     320, -1.6, 1.6, NresBin, 0., 100.);
+    pv2PdgYFHCal[iPid] = new TProfile2D(Form("pv2PdgYFHCal_pid%i", iPid),
+                                     Form("pv2PdgYFHCal_pid%i", iPid),
+                                     320, -1.6, 1.6, NresBin, 0., 100.);
+
     pv1PtRp[iPid] = new TProfile2D(Form("pv1PtRp_pid%i", iPid),
                                    Form("pv1PtRp_pid%i", iPid),
                                    300, 0., 3., NresBin, 0., 100.);
@@ -257,6 +307,19 @@ int main(int argc, char **argv)
     pv2YRecoRp[iPid] = new TProfile2D(Form("pv2YRecoRp_pid%i", iPid),
                                       Form("pv2YRecoRp_pid%i", iPid),
                                       320, -1.6, 1.6, NresBin, 0., 100.);
+
+    pv1PdgPtRecoRp[iPid] = new TProfile2D(Form("pv1PdgPtRecoRp_pid%i", iPid),
+                                       Form("pv1PdgPtRecoRp_pid%i", iPid),
+                                       300, 0., 3., NresBin, 0., 100.);
+    pv2PdgPtRecoRp[iPid] = new TProfile2D(Form("pv2PdgPtRecoRp_pid%i", iPid),
+                                       Form("pv2PdgPtRecoRp_pid%i", iPid),
+                                       300, 0., 3., NresBin, 0., 100.);
+    pv1PdgYRecoRp[iPid] = new TProfile2D(Form("pv1PdgYRecoRp_pid%i", iPid),
+                                      Form("pv1PdgYRecoRp_pid%i", iPid),
+                                      320, -1.6, 1.6, NresBin, 0., 100.);
+    pv2PdgYRecoRp[iPid] = new TProfile2D(Form("pv2PdgYRecoRp_pid%i", iPid),
+                                      Form("pv2PdgYRecoRp_pid%i", iPid),
+                                      320, -1.6, 1.6, NresBin, 0., 100.);
   }
 
   PicoDstMCEvent *mcEvent = nullptr;
@@ -485,6 +548,22 @@ int main(int argc, char **argv)
             pv2YTpc[iGap][3]->Fill(Rapidity, cent, v2Tpc);
 
           if (recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][1]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][2]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][3]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+
+          if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYTpc[iGap][1]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYTpc[iGap][2]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYTpc[iGap][3]->Fill(Rapidity, cent, v2Tpc);
+
+          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);
@@ -516,6 +595,22 @@ int main(int argc, char **argv)
           if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv2YSpTpc[iGap][3]->Fill(Rapidity, cent, v2SpTpc);
 
+          if (recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][0]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+          if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][1]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+          if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][2]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+          if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][3]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+
+          if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYSpTpc[iGap][1]->Fill(Rapidity, cent, v2SpTpc);
+          if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYSpTpc[iGap][2]->Fill(Rapidity, cent, v2SpTpc);
+          if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYSpTpc[iGap][3]->Fill(Rapidity, cent, v2SpTpc);
+
           if (recoTrack->GetCharge() < 0)
             pv2PtTpc[iGap][4]->Fill(recoTrack->GetPt(), cent, v2Tpc);
           if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
@@ -533,6 +628,22 @@ int main(int argc, char **argv)
             pv2YTpc[iGap][7]->Fill(Rapidity, cent, v2Tpc);
 
           if (recoTrack->GetCharge() < 0)
+            pv2PdgPtTpc[iGap][4]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][5]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][6]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtTpc[iGap][7]->Fill(recoTrack->GetPt(), cent, v2Tpc);
+
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYTpc[iGap][5]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYTpc[iGap][6]->Fill(Rapidity, cent, v2Tpc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYTpc[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);
@@ -563,6 +674,22 @@ int main(int argc, char **argv)
             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)
+            pv2PdgPtSpTpc[iGap][4]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][5]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][6]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgPtSpTpc[iGap][7]->Fill(recoTrack->GetPt(), cent, v2SpTpc);
+
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYSpTpc[iGap][5]->Fill(Rapidity, cent, v2SpTpc);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYSpTpc[iGap][6]->Fill(Rapidity, cent, v2SpTpc);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv2PdgYSpTpc[iGap][7]->Fill(Rapidity, cent, v2SpTpc);
         }
       }
 
@@ -599,6 +726,15 @@ int main(int argc, char **argv)
           if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
             pv1PtRecoRp[3]->Fill(mcTrack->GetPt(), cent, v1FHCalMc);
 
+          if (recoTrack->GetCharge() > 0)
+            pv1PdgPtFHCal[0]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+            pv1PdgPtFHCal[1]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+            pv1PdgPtFHCal[2]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+            pv1PdgPtFHCal[3]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+
           if (recoTrack->GetCharge() < 0)
             pv1PtFHCal[4]->Fill(recoTrack->GetPt(), cent, v1FHCal);
           if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
@@ -616,6 +752,15 @@ int main(int argc, char **argv)
             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 (recoTrack->GetCharge() < 0)
+            pv1PdgPtFHCal[4]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PdgPtFHCal[5]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PdgPtFHCal[6]->Fill(recoTrack->GetPt(), cent, v1FHCal);
+          if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+            pv1PdgPtFHCal[7]->Fill(recoTrack->GetPt(), cent, v1FHCal);
         }
 
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
@@ -632,6 +777,13 @@ int main(int argc, char **argv)
         if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
           pv1YRecoRp[3]->Fill(RapidityMc, cent, v1FHCalYMc);
 
+        if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+          pv1PdgYFHCal[1]->Fill(Rapidity, cent, v1FHCalY);
+        if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+          pv1PdgYFHCal[2]->Fill(Rapidity, cent, v1FHCalY);
+        if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+          pv1PdgYFHCal[3]->Fill(Rapidity, cent, v1FHCalY);
+
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
           pv1YFHCal[5]->Fill(Rapidity, cent, v1FHCalY);
         if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
@@ -646,6 +798,13 @@ int main(int argc, char **argv)
         if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
           pv1YRecoRp[7]->Fill(RapidityMc, cent, v1FHCalYMc);
 
+        if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1PdgYFHCal[5]->Fill(Rapidity, cent, v1FHCalY);
+        if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1PdgYFHCal[6]->Fill(Rapidity, cent, v1FHCalY);
+        if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv1PdgYFHCal[7]->Fill(Rapidity, cent, v1FHCalY);
+
         if (recoTrack->GetCharge() > 0)
           pv2PtFHCal[0]->Fill(recoTrack->GetPt(), cent, v2FHCal);
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
@@ -664,6 +823,15 @@ 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)
+          pv2PdgPtFHCal[0]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+          pv2PdgPtFHCal[1]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+          pv2PdgPtFHCal[2]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+          pv2PdgPtFHCal[3]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+
         if (recoTrack->GetCharge() < 0)
           pv2PtFHCal[4]->Fill(recoTrack->GetPt(), cent, v2FHCal);
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
@@ -682,6 +850,15 @@ int main(int argc, char **argv)
         if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
           pv2PtRecoRp[7]->Fill(mcTrack->GetPt(), cent, v2FHCalMc);
 
+        if (recoTrack->GetCharge() < 0)
+          pv2PdgPtFHCal[4]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PdgPtFHCal[5]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PdgPtFHCal[6]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+        if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PdgPtFHCal[7]->Fill(recoTrack->GetPt(), cent, v2FHCal);
+
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
           pv2YFHCal[1]->Fill(Rapidity, cent, v2FHCal);
         if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
@@ -696,6 +873,13 @@ int main(int argc, char **argv)
         if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
           pv2YRecoRp[3]->Fill(RapidityMc, cent, v2FHCalMc);
 
+        if (selector->isPdgPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() > 0)
+          pv2PdgYFHCal[1]->Fill(Rapidity, cent, v2FHCal);
+        if (selector->isPdgKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() > 0)
+          pv2PdgYFHCal[2]->Fill(Rapidity, cent, v2FHCal);
+        if (selector->isPdgProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() > 0)
+          pv2PdgYFHCal[3]->Fill(Rapidity, cent, v2FHCal);
+
         if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
           pv2YFHCal[5]->Fill(Rapidity, cent, v2FHCal);
         if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
@@ -709,6 +893,13 @@ int main(int argc, char **argv)
           pv2YRecoRp[6]->Fill(RapidityMc, cent, v2FHCalMc);
         if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
           pv2YRecoRp[7]->Fill(RapidityMc, cent, v2FHCalMc);
+
+        if (selector->isPdgAntiPion(mcTrack)) //if (selector->isPion(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PdgYFHCal[5]->Fill(Rapidity, cent, v2FHCal);
+        if (selector->isPdgAntiKaon(mcTrack)) //if (selector->isKaon(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PdgYFHCal[6]->Fill(Rapidity, cent, v2FHCal);
+        if (selector->isPdgAntiProton(mcTrack)) //if (selector->isProton(recoTrack) && recoTrack->GetCharge() < 0)
+          pv2PdgYFHCal[7]->Fill(Rapidity, cent, v2FHCal);
       }
     }
 
@@ -910,9 +1101,12 @@ int main(int argc, char **argv)
   fo->cd();
   fo->mkdir("TpcEp");
   fo->mkdir("TpcSp");
+  fo->mkdir("TpcEpPdg");
+  fo->mkdir("TpcSpPdg");
   fo->mkdir("McTpcEp");
   fo->mkdir("RecoMcTpcEp");
   fo->mkdir("FHCalEp");
+  fo->mkdir("FHCalEpPdg");
   fo->mkdir("FHCalRp");
   fo->mkdir("Rp");
   fo->cd("TpcEp");
@@ -1026,9 +1220,56 @@ int main(int argc, char **argv)
   {
     pv2YRp[iPid]->Write();
   }
+  fo->cd("TpcEpPdg");
+  for (int iGap = 0; iGap < NetaGaps; iGap++)
+  {
+    for (int iPid = 0; iPid < Npid; iPid++)
+    {
+      pv2PdgPtTpc[iGap][iPid]->Write();
+    }
+  }
+  for (int iGap = 0; iGap < NetaGaps; iGap++)
+  {
+    for (int iPid = 0; iPid < Npid; iPid++)
+    {
+      pv2PdgYTpc[iGap][iPid]->Write();
+    }
+  }
+  fo->cd("TpcSpPdg");
+  for (int iGap = 0; iGap < NetaGaps; iGap++)
+  {
+    for (int iPid = 0; iPid < Npid; iPid++)
+    {
+      pv2PdgPtSpTpc[iGap][iPid]->Write();
+    }
+  }
+  for (int iGap = 0; iGap < NetaGaps; iGap++)
+  {
+    for (int iPid = 0; iPid < Npid; iPid++)
+    {
+      pv2PdgYSpTpc[iGap][iPid]->Write();
+    }
+  }
+  fo->cd("FHCalEpPdg");
+  for (int iPid = 0; iPid < Npid; iPid++)
+  {
+    pv1PdgPtFHCal[iPid]->Write();
+  }
+  for (int iPid = 0; iPid < Npid; iPid++)
+  {
+    pv2PdgPtFHCal[iPid]->Write();
+  }
+  for (int iPid = 0; iPid < Npid; iPid++)
+  {
+    pv1PdgYFHCal[iPid]->Write();
+  }
+  for (int iPid = 0; iPid < Npid; iPid++)
+  {
+    pv2PdgYFHCal[iPid]->Write();
+  }
   fo->Close();
 
   timer.Stop();
   timer.Print();
   return 0;
-}
+}

+ 2 - 2
utils/mfNamespace.h

@@ -83,7 +83,7 @@ namespace mfRes
 namespace mfTrack
 {
   const float MaxTrackPt = 3.;
-  const int MinTrackNhits = 32;
+  const int MinTrackNhits = 16; //32;
   const float MaxTrackEta = 1.5;
   const int motherId = -1;
 }; // namespace mfTrack
@@ -112,4 +112,4 @@ namespace mfAcceptance
   const std::vector<int> AcceptanceFHCalModules = {15, 73};
 }
 
-#endif
+#endif