]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
few bug fixes pid
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Dec 2010 13:11:50 +0000 (13:11 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Dec 2010 13:11:50 +0000 (13:11 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx

index fb010a6c668519963111c574c89c151f412ad893..2bb1676962714adb1dc38727a48cec42c2a9023f 100644 (file)
@@ -582,6 +582,8 @@ void AliFlowEventSimple::TagSubeventsInEta( Double_t etaMinA,
   for (Int_t i=0; i<fNumberOfTracks; i++)
   {
     AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
+    if (!track) continue;
+    track->ResetSubEventTags();
     Double_t eta=track->Eta();
     if (eta >= etaMinA && eta <= etaMaxA) track->SetForSubevent(0);
     if (eta >= etaMinB && eta <= etaMaxB) track->SetForSubevent(1);
@@ -595,6 +597,8 @@ void AliFlowEventSimple::TagSubeventsByCharge()
   for (Int_t i=0; i<fNumberOfTracks; i++)
   {
     AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
+    if (!track) continue;
+    track->ResetSubEventTags();
     Int_t charge=track->Charge();
     if (charge<0) track->SetForSubevent(0);
     if (charge>0) track->SetForSubevent(1);
index 0ad5447a6efa6310e3b8e598abb6b6a990aa3f0a..54a7af09ad51905ce2449f6f4972ffc000e2f3cc 100644 (file)
@@ -260,11 +260,6 @@ void AliAnalysisTaskFlowEvent::UserCreateOutputObjects()
     AliError("cuts not set");
     return;
   }
-  if (fCutsEvent) 
-  {
-    if (!fCutsEvent->IsSelected(InputEvent())) return;
-  }
-
   //PID
   if (fCutsRP->GetParamType()==AliFlowTrackCuts::kMC)
   {
@@ -331,7 +326,13 @@ void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
       exit(2);
     }
   }
-  
+
+  //check event cuts
+  if (fCutsEvent) 
+  {
+    if (!fCutsEvent->IsSelected(InputEvent())) return;
+  }
+
   //use the new and temporarily inclomplete way of doing things
   if (fAnalysisType == "AUTOMATIC")
   {
index 014ffa57152b1197038674d8f8f232fc7010cc27..2fb762e110477667464b34cd58db8395da0fbb4a 100644 (file)
@@ -799,17 +799,29 @@ void AliFlowTrackCuts::InitPIDcuts()
       (*t)(0,9)  = 0.65;  (*t)(1,9)  =    0;  (*t)(2,9)  =     0;
     }
     else
+    if (fAliPID==AliPID::kKaon)
+    {
+      t = new TMatrixF(3,7);
+      (*t)(0,0)  = 0.20;  (*t)(1,0)  = -0.2;  (*t)(2,0)  = 0.4; 
+      (*t)(0,1)  = 0.25;  (*t)(1,1)  =-0.15;  (*t)(2,1)  = 0.4;
+      (*t)(0,2)  = 0.30;  (*t)(1,2)  = -0.1;  (*t)(2,2)  = 0.4;
+      (*t)(0,3)  = 0.35;  (*t)(1,3)  = -0.1;  (*t)(2,3)  = 0.4;
+      (*t)(0,4)  = 0.40;  (*t)(1,4)  = -0.1;  (*t)(2,4)  = 0.6;
+      (*t)(0,5)  = 0.45;  (*t)(1,5)  = -0.1;  (*t)(2,5)  = 0.6;
+      (*t)(0,6)  = 0.50;  (*t)(1,6)  =    0;  (*t)(2,6)  =   0;
+    }
+    else
     if (fAliPID==AliPID::kProton)
     {
       t = new TMatrixF(3,16);
-      (*t)(0,0)  = 0.20;  (*t)(1,0)  =     0;  (*t)(2,0)  =  0.3
-      (*t)(0,1)  = 0.25;  (*t)(1,1)  =  -0.2;  (*t)(2,1)  =  0.6
+      (*t)(0,0)  = 0.20;  (*t)(1,0)  =     0;  (*t)(2,0)  =    0
+      (*t)(0,1)  = 0.25;  (*t)(1,1)  =  -0.2;  (*t)(2,1)  =  0.3
       (*t)(0,2)  = 0.30;  (*t)(1,2)  =  -0.2;  (*t)(2,2)  =  0.6; 
       (*t)(0,3)  = 0.35;  (*t)(1,3)  =  -0.2;  (*t)(2,3)  =  0.6; 
       (*t)(0,4)  = 0.40;  (*t)(1,4)  =  -0.2;  (*t)(2,4)  =  0.6; 
       (*t)(0,5)  = 0.45;  (*t)(1,5)  = -0.15;  (*t)(2,5)  =  0.6; 
       (*t)(0,6)  = 0.50;  (*t)(1,6)  =  -0.1;  (*t)(2,6)  =  0.6; 
-      (*t)(0,7)  = 0.55;  (*t)(1,7)  = -0.05;  (*t)(2,7)  = 0.45
+      (*t)(0,7)  = 0.55;  (*t)(1,7)  = -0.05;  (*t)(2,7)  =  0.6
       (*t)(0,8)  = 0.60;  (*t)(1,8)  = -0.05;  (*t)(2,8)  = 0.45; 
       (*t)(0,9)  = 0.65;  (*t)(1,9)  = -0.05;  (*t)(2,9)  = 0.45; 
       (*t)(0,10) = 0.70;  (*t)(1,10) = -0.05;  (*t)(2,10) = 0.45; 
@@ -819,18 +831,6 @@ void AliFlowTrackCuts::InitPIDcuts()
       (*t)(0,14) = 0.90;  (*t)(1,14) =     0;  (*t)(2,14) = 0.45;
       (*t)(0,15) = 0.95;  (*t)(1,15) =     0;  (*t)(2,15) =    0;
     }
-    else
-    if (fAliPID==AliPID::kKaon)
-    {
-      t = new TMatrixF(3,7);
-      (*t)(0,0)  = 0.20;  (*t)(1,0)  = -0.2;  (*t)(2,0)  = 0.4; 
-      (*t)(0,1)  = 0.25;  (*t)(1,1)  =-0.15;  (*t)(2,1)  = 0.4;
-      (*t)(0,2)  = 0.30;  (*t)(1,2)  = -0.1;  (*t)(2,2)  = 0.4;
-      (*t)(0,3)  = 0.35;  (*t)(1,3)  = -0.1;  (*t)(2,3)  = 0.4;
-      (*t)(0,4)  = 0.40;  (*t)(1,4)  = -0.1;  (*t)(2,4)  = 0.6;
-      (*t)(0,5)  = 0.45;  (*t)(1,5)  = -0.1;  (*t)(2,5)  = 0.6;
-      (*t)(0,6)  = 0.50;  (*t)(1,6)  =    0;  (*t)(2,6)  =0;
-    }
     fTPCpidCuts=t;
   }
   if (!fTOFpidCuts)
@@ -869,11 +869,11 @@ void AliFlowTrackCuts::InitPIDcuts()
     if (fAliPID==AliPID::kProton)
     {
       t = new TMatrixF(3,39);
-      (*t)(0,0)  = 0.3;  (*t)(1,0)   = 0; (*t)(2,0) = 0;
-      (*t)(0,1)  = 0.35;  (*t)(1,1)  = 0; (*t)(2,1) = 0;
-      (*t)(0,2)  = 0.40;  (*t)(1,2)  = 0; (*t)(2,2) = 0;
-      (*t)(0,3)  = 0.45;  (*t)(1,3)  = 0; (*t)(2,3) = 0;
-      (*t)(0,4)  = 0.50;  (*t)(1,4)  = 0; (*t)(2,4) = 0;
+      (*t)(0,0)  = 0.3;  (*t)(1,0)   = 0;     (*t)(2,0) = 0;
+      (*t)(0,1)  = 0.35;  (*t)(1,1)  = 0;     (*t)(2,1) = 0;
+      (*t)(0,2)  = 0.40;  (*t)(1,2)  = 0;     (*t)(2,2) = 0;
+      (*t)(0,3)  = 0.45;  (*t)(1,3)  = 0;     (*t)(2,3) = 0;
+      (*t)(0,4)  = 0.50;  (*t)(1,4)  = 0;     (*t)(2,4) = 0;
       (*t)(0,5)  = 0.55;  (*t)(1,5)  = -900;  (*t)(2,5)  = 600;
       (*t)(0,6)  = 0.60;  (*t)(1,6)  = -800;  (*t)(2,6)  = 600;
       (*t)(0,7)  = 0.65;  (*t)(1,7)  = -800;  (*t)(2,7)  = 600;