pA option added into the task,
authorpkalinak <pkalinak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2013 15:38:14 +0000 (15:38 +0000)
committerpkalinak <pkalinak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2013 15:38:14 +0000 (15:38 +0000)
new method for vertex evaluation for pA data
trigger selection for pA data

PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskPerformanceStrange.cxx
PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskPerformanceStrange.h
PWGLF/STRANGENESS/LambdaK0PbPb/run.C

index 4e712d6..949bf1b 100644 (file)
@@ -1,4 +1,3 @@
-
 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
@@ -176,7 +175,7 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange()
   fHistDcaV0DaughtersK0(0),
   fHistChi2K0(0),
   fHistCosPointAngleK0(0),
-  fHistTranscTauVsMassK0s(0),
+
 
   fHistDcaPosToPrimVertexK0vsMassK0(0),
   fHistDcaNegToPrimVertexK0vsMassK0(0),
@@ -215,7 +214,7 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange()
   fHistDcaV0DaughtersL(0),
   fHistChi2L(0),
   fHistCosPointAngleL(0),
-  fHistTranscTauVsMassL(0),
+
 
   fHistDcaPosToPrimVertexLvsMassL(0),
   fHistDcaNegToPrimVertexLvsMassL(0),
@@ -258,7 +257,7 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange()
   fHistDcaV0DaughtersAntiL(0),
   fHistChi2AntiL(0),
   fHistCosPointAngleAntiL(0),
-  fHistTranscTauVsMassAntiL(0),
+
 
   fHistDcaPosToPrimVertexAntiLvsMass(0),
   fHistDcaNegToPrimVertexAntiLvsMass(0),
@@ -309,6 +308,27 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange()
   fHistPtVsMassLambdaRap3(0),
   fHistPtVsMassAntiLambdaRap3(0),
 
+    // cTau dist
+    fHistTranscTauVsMassL(0),
+    fHistTranscTauVsMassAntiL(0),
+    fHistTranscTauVsMassK0s(0),
+
+    // cTau Trans Vs. Mass Rap3
+    fHistTranscTauVsMassLRap3(0),
+    fHistTranscTauVsMassAntiLRap3(0),
+    fHistTranscTauVsMassK0sRap3(0),
+
+    // cTau Trans Vs Mass Low pt
+    fHistTranscTauVsMassLptLow(0),
+    fHistTranscTauVsMassAntiLptLow(0),
+    fHistTranscTauVsMassK0sptLow(0),
+
+    // cTau Trans Vs Mass Low pt Rap3
+    fHistTranscTauVsMassLptLowRap3(0),
+    fHistTranscTauVsMassAntiLptLowRap3(0),
+    fHistTranscTauVsMassK0sptLowRap3(0),
+
+
 ////////////////////////////////////////
 
   fHistArmenterosPodolanski(0),
@@ -339,9 +359,16 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange()
   fHistAsMcTranscTauAntiL(0),
   fHistAsMcTranscTauK0s(0),
 
+    fHistAsMcTranscTauLptLow(0),
+    fHistAsMcTranscTauAntiLptLow(0),
+    fHistAsMcTranscTauK0sptLow(0),
 
+//Rap3
+    fHistAsMcTranscTauLptLowRap3(0),
+    fHistAsMcTranscTauAntiLptLowRap3(0),
+    fHistAsMcTranscTauK0sptLowRap3(0),
 
-///Rap3
+//Rap3
   fHistAsMcPtK0Rap3(0),
   fHistAsMcPtLambdaRap3(0),
   fHistAsMcPtAntiLambdaRap3(0),
@@ -538,7 +565,7 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange(const char
     fHistDcaV0DaughtersK0(0),
     fHistChi2K0(0),
     fHistCosPointAngleK0(0),
-    fHistTranscTauVsMassK0s(0),
+
 
     fHistDcaPosToPrimVertexK0vsMassK0(0),
     fHistDcaNegToPrimVertexK0vsMassK0(0),
@@ -577,7 +604,7 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange(const char
     fHistDcaV0DaughtersL(0),
     fHistChi2L(0),
     fHistCosPointAngleL(0),
-    fHistTranscTauVsMassL(0),
+
     
 
     fHistDcaPosToPrimVertexLvsMassL(0),
@@ -621,7 +648,7 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange(const char
     fHistDcaV0DaughtersAntiL(0),
     fHistChi2AntiL(0),
     fHistCosPointAngleAntiL(0),
-    fHistTranscTauVsMassAntiL(0),
+
 
     fHistDcaPosToPrimVertexAntiLvsMass(0),
     fHistDcaNegToPrimVertexAntiLvsMass(0),
@@ -672,8 +699,27 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange(const char
     fHistPtVsMassLambdaRap3(0),
     fHistPtVsMassAntiLambdaRap3(0),
 
-    ////////////////////////////////////////
+    // cTau dist
+    fHistTranscTauVsMassL(0),
+    fHistTranscTauVsMassAntiL(0),
+    fHistTranscTauVsMassK0s(0),
 
+    // cTau Trans Vs. Mass Rap3
+    fHistTranscTauVsMassLRap3(0),
+    fHistTranscTauVsMassAntiLRap3(0),
+    fHistTranscTauVsMassK0sRap3(0),
+
+    // cTau Trans Vs Mass Low pt
+    fHistTranscTauVsMassLptLow(0),
+    fHistTranscTauVsMassAntiLptLow(0),
+    fHistTranscTauVsMassK0sptLow(0),
+
+    // cTau Trans Vs Mass Low pt Rap3
+    fHistTranscTauVsMassLptLowRap3(0),
+    fHistTranscTauVsMassAntiLptLowRap3(0),
+    fHistTranscTauVsMassK0sptLowRap3(0),
+
+    ////////////////////////////////////////
     fHistArmenterosPodolanski(0),
     fHistK0sMassVsLambdaMass(0),
     fHistTPCsigPLambda(0),
@@ -701,6 +747,22 @@ AliAnalysisTaskPerformanceStrange::AliAnalysisTaskPerformanceStrange(const char
     fHistAsMcTranscTauAntiL(0),
     fHistAsMcTranscTauK0s(0),
 
+    //   cTau Rap3
+    fHistAsMcTranscTauLRap3(0),
+    fHistAsMcTranscTauAntiLRap3(0),
+    fHistAsMcTranscTauK0sRap3(0),
+
+
+    fHistAsMcTranscTauLptLow(0),
+    fHistAsMcTranscTauAntiLptLow(0),
+    fHistAsMcTranscTauK0sptLow(0),
+
+    //Rap3 
+    fHistAsMcTranscTauLptLowRap3(0),
+    fHistAsMcTranscTauAntiLptLowRap3(0),
+    fHistAsMcTranscTauK0sptLowRap3(0),
+    
+
     ///Rap3
     fHistAsMcPtK0Rap3(0),
     fHistAsMcPtLambdaRap3(0),
@@ -1438,6 +1500,37 @@ void AliAnalysisTaskPerformanceStrange::UserCreateOutputObjects()
   fHistTranscTauVsMassK0s                    = new TH2F("h2TranscTauVsMassK0s","Transverse K0s cTau vs Mass ",100,0,100,400, 0.4, 0.6);
   fListHist->Add(fHistTranscTauVsMassK0s);
 
+  // cTauVsMass Rap3
+  fHistTranscTauVsMassLRap3                    = new TH2F("h2TranscTauVsMassLRap3","cTauVsMass Lambdas",100,0,100,280, 1.06, 1.2);
+  fListHist->Add(fHistTranscTauVsMassLRap3);
+
+  fHistTranscTauVsMassAntiLRap3                    = new TH2F("h2TranscTauVsMassAntiLRap3","cTauVsMass AntiLambdas",100,0,100,280, 1.06, 1.2);
+  fListHist->Add(fHistTranscTauVsMassAntiLRap3);
+
+  fHistTranscTauVsMassK0sRap3                    = new TH2F("h2TranscTauVsMassK0sRap3","Transverse K0s cTau vs Mass ",100,0,100,400, 0.4, 0.6);
+  fListHist->Add(fHistTranscTauVsMassK0sRap3);
+
+  //cTauVsMass Low pt
+  fHistTranscTauVsMassLptLow                    = new TH2F("h2TranscTauVsMassLptLow","cTauVsMass Lambdas",100,0,100,280, 1.06, 1.2);
+  fListHist->Add(fHistTranscTauVsMassLptLow);
+
+  fHistTranscTauVsMassAntiLptLow                    = new TH2F("h2TranscTauVsMassAntiLptLow","cTauVsMass AntiLambdas",100,0,100,280, 1.06, 1.2);
+  fListHist->Add(fHistTranscTauVsMassAntiLptLow);
+
+  fHistTranscTauVsMassK0sptLow                    = new TH2F("h2TranscTauVsMassK0sptLow","Transverse K0s cTau vs Mass ",100,0,100,400, 0.4, 0.6);
+  fListHist->Add(fHistTranscTauVsMassK0sptLow);
+
+  //cTauVsMass Low pt Rap3
+  fHistTranscTauVsMassLptLowRap3                    = new TH2F("h2TranscTauVsMassLptLowRap3","cTauVsMass Lambdas",100,0,100,280, 1.06, 1.2);
+  fListHist->Add(fHistTranscTauVsMassLptLowRap3);
+
+  fHistTranscTauVsMassAntiLptLowRap3                    = new TH2F("h2TranscTauVsMassAntiLptLowRap3","cTauVsMass AntiLambdas",100,0,100,280, 1.06, 1.2);
+  fListHist->Add(fHistTranscTauVsMassAntiLptLowRap3);
+
+  fHistTranscTauVsMassK0sptLowRap3                    = new TH2F("h2TranscTauVsMassK0sptLowRap3","Transverse K0s cTau vs Mass ",100,0,100,400, 0.4, 0.6);
+  fListHist->Add(fHistTranscTauVsMassK0sptLowRap3);
+
+
  
 
   // Pt Vs Mass Rap3
@@ -1552,6 +1645,33 @@ void AliAnalysisTaskPerformanceStrange::UserCreateOutputObjects()
   fHistAsMcTranscTauK0s                    = new TH1F("h1AsMcTranscTauK0s","cTau of K0s",100,0,100);
   fListHist->Add(fHistAsMcTranscTauK0s);
 
+  //cTau Rap3
+  fHistAsMcTranscTauLRap3                    = new TH1F("h1AsMcTranscTauLRap3","cTau of AntiLambdas",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauLRap3);
+  fHistAsMcTranscTauAntiLRap3                    = new TH1F("h1AsMcTranscTauAntiLRap3","cTau of AntiLambdas",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauAntiLRap3);
+  fHistAsMcTranscTauK0sRap3                    = new TH1F("h1AsMcTranscTauK0sRap3","cTau of K0s",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauK0sRap3);
+
+
+  //cTau lowpt
+  fHistAsMcTranscTauLptLow                    = new TH1F("h1AsMcTranscTauLptLow","cTau of AntiLambdas",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauLptLow);
+  fHistAsMcTranscTauAntiLptLow                    = new TH1F("h1AsMcTranscTauAntiLptLow","cTau of AntiLambdas",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauAntiLptLow);
+  fHistAsMcTranscTauK0sptLow                    = new TH1F("h1AsMcTranscTauK0sptLow","cTau of K0s",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauK0sptLow);
+
+  //cTau ptLowRap3 Low pt
+  fHistAsMcTranscTauLptLowRap3                    = new TH1F("h1AsMcTranscTauLptLowRap3","cTau of AntiLambdas",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauLptLowRap3);
+  fHistAsMcTranscTauAntiLptLowRap3                    = new TH1F("h1AsMcTranscTauAntiLptLowRap3","cTau of AntiLambdas",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauAntiLptLowRap3);
+  fHistAsMcTranscTauK0sptLowRap3                    = new TH1F("h1AsMcTranscTauK0sptLowRap3","cTau of K0s",100,0,100);
+  fListHist->Add(fHistAsMcTranscTauK0sptLowRap3);
+
+
 
 
   // Radius distribution
@@ -1812,8 +1932,13 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
   //******************
   // Trigger Selection ! Warning Works only for ESD, add protection in case of AOD loop
   //******************
+  Bool_t isSelected = kFALSE;
+  if(fCollidingSystems == 2)
+        isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()& AliVEvent::kCINT5 && ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()& AliVEvent::kINT7); 
+    //    isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()& AliVEvent::kCINT7);
+  else
+   isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()& AliVEvent::kMB);
 
-  Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()& AliVEvent::kMB);
   if (!isSelected) return;
 
   fHistNumberEvents->Fill(1.5);  
@@ -2094,9 +2219,7 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
        ProdDistance = TMath::Sqrt(dx*dx + dy*dy + dz*dz);
 
        if (ProdDistance > 0.001) continue; // secondary V0
-
-
-     
+    
        lNtimesReconstructedK0s   = 0; lNtimesReconstructedLambda   = 0; lNtimesReconstructedAntiLambda   = 0;
 
  
@@ -2330,9 +2453,9 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
   const AliMultiplicity *myMultiplicty = ((AliESDEvent*)fESD)->GetMultiplicity();
 
   if(fAnalysisType == "ESD") {  
-  
-    // Best Primary Vertex:  
-
+    ////////////////////////////////////////////////////////////////////////////////////
+    //////   Best Primary Vertex:  
+    if(fCollidingSystems ==0 || fCollidingSystems == 1){ //pp, PbPb Analysis
     const AliESDVertex *myBestPrimaryVertex = ((AliESDEvent*)fESD)->GetPrimaryVertex();
     myBestPrimaryVertex = ((AliESDEvent*)fESD)->GetPrimaryVertex();
     if (!myBestPrimaryVertex) return;
@@ -2342,33 +2465,43 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
 
     myBestPrimaryVertex->GetXYZ(lPrimaryVtxPosition);
     myBestPrimaryVertex->GetCovMatrix(lPrimaryVtxCov);
-
     if ( ( TMath::Abs(lPrimaryVtxPosition[2]) ) > cutPrimVertex) return ; //// cut on z of prim. vertex!!!!!
-
     fHistNumberEvents->Fill(4.5);    
-
     lPrimaryVtxChi2 = myBestPrimaryVertex->GetChi2toNDF();
     lResPrimaryVtxX = myBestPrimaryVertex->GetXRes();
     lResPrimaryVtxY = myBestPrimaryVertex->GetYRes();
     lResPrimaryVtxZ = myBestPrimaryVertex->GetZRes();
-
     // remove TPC-only primary vertex : retain only events with tracking + SPD vertex
-
     const AliESDVertex *mySPDPrimaryVertex = ((AliESDEvent*)fESD)->GetPrimaryVertexSPD();
     if (!mySPDPrimaryVertex) return;
-
     fHistSPDPrimaryVertexZ->Fill(mySPDPrimaryVertex->GetZ());
-
     const AliESDVertex *myPrimaryVertexTracking = ((AliESDEvent*)fESD)->GetPrimaryVertexTracks();
     if (!myPrimaryVertexTracking) return;
-
     if (!mySPDPrimaryVertex->GetStatus() && !myPrimaryVertexTracking->GetStatus() ) return;
-
     fHistNumberEvents->Fill(5.5);
     fHistTrackPerEvent->Fill(fESD->GetNumberOfTracks());   
-
     myPrimaryVertex = new AliAODVertex(lPrimaryVtxPosition, lPrimaryVtxCov, lPrimaryVtxChi2, NULL, -1, AliAODVertex::kPrimary);
     if (!myPrimaryVertex) return;
+  }
+    ///  pPb analysis
+    if(fCollidingSystems == 2){  //twiky https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PAVertexSelectionStudies 
+      const AliESDVertex* trkVtx = ((AliESDEvent*)fESD)->GetPrimaryVertex();
+      if (!trkVtx || trkVtx->GetNContributors()<=0) return;
+      TString vtxTtl = trkVtx->GetTitle();
+      if (!vtxTtl.Contains("VertexerTracks")) return;
+      Float_t zvtx = trkVtx->GetZ();
+      const AliESDVertex* spdVtx = ((AliESDEvent*)fESD)->GetPrimaryVertexSPD();
+      if (spdVtx->GetNContributors()<=0) return;
+      TString vtxTyp = spdVtx->GetTitle();
+      Double_t cov[6]={0};
+      spdVtx->GetCovarianceMatrix(cov);
+      Double_t zRes = TMath::Sqrt(cov[5]);
+      if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) return;
+      if (TMath::Abs(spdVtx->GetZ() - trkVtx->GetZ())>0.5) return;
+
+      if (TMath::Abs(zvtx) > cutPrimVertex) return;
+
+    }
 
 
     // Number of Tracklets:
@@ -2932,7 +3065,18 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
 
 
     if (TMath::Abs(lRapK0s) < lCutRap ) {
-      if (lOnFlyStatus==0) fHistTranscTauVsMassK0s->Fill(lcTauK0s,lInvMassK0s);
+      if (lOnFlyStatus==0){
+         fHistTranscTauVsMassK0s->Fill(lcTauK0s,lInvMassK0s);
+             if (TMath::Abs(lRapK0s) < 0.3)
+              fHistTranscTauVsMassK0sRap3->Fill(lcTauK0s,lInvMassK0s);
+        if (lPtK0s >= 3 && lPtK0s <= 6 )
+          {
+            fHistTranscTauVsMassK0sptLow->Fill(lcTauK0s,lInvMassK0s);
+             if (TMath::Abs(lRapK0s) < 0.3)
+              fHistTranscTauVsMassK0sptLowRap3->Fill(lcTauK0s,lInvMassK0s);
+          }
+       }   
+
       if (lcTauK0s< cutcTauK0s) {
 
        //////2D histos: cut vs on fly status/////////////////////
@@ -3004,7 +3148,18 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
     if ((LambdaPID==1 && lMomInnerWallPos <=1 ) || (lMomInnerWallPos > 1) ||  !(fUsePID.Contains("withPID")  )){  
 
       if (TMath::Abs(lRapLambda) < lCutRap) {
-       if (lOnFlyStatus==0) fHistTranscTauVsMassL->Fill(lcTauLambda,lInvMassLambda);
+       if (lOnFlyStatus==0) {
+         fHistTranscTauVsMassL->Fill(lcTauLambda,lInvMassLambda);
+             if (TMath::Abs(lRapLambda) < 0.3)
+              fHistTranscTauVsMassLRap3->Fill(lcTauLambda,lInvMassLambda);
+        if (lPtLambda >= 3 && lPtLambda <= 6 )
+          {
+            fHistTranscTauVsMassLptLow->Fill(lcTauLambda,lInvMassLambda);
+             if (TMath::Abs(lRapLambda) < 0.3)
+              fHistTranscTauVsMassLptLowRap3->Fill(lcTauLambda,lInvMassLambda);
+          }
+       }   
+
        if (lcTauLambda < cutcTauL){
          //////2D histos: cut vs on fly status/////////////////////
 
@@ -3061,9 +3216,9 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
              }   
            }//QA Selector
          }
-       } //end of Rap condition
-      } // end of PID condition
-    } // end ctau condition
+       }// end ctau condition
+      } //end of Rap condition
+    }// end of PID condition
 
 
     //////////////////////////////
@@ -3075,7 +3230,18 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
     if ((AntiLambdaPID==1 && lMomInnerWallNeg <=1) || (lMomInnerWallNeg>1) ||  !(fUsePID.Contains("withPID"))){  
 
       if (TMath::Abs(lRapAntiLambda) < lCutRap) {
-       if (lOnFlyStatus==0) fHistTranscTauVsMassAntiL->Fill(lcTauAntiLambda,lInvMassAntiLambda);
+       if (lOnFlyStatus==0) {
+         fHistTranscTauVsMassAntiL->Fill(lcTauAntiLambda,lInvMassAntiLambda);
+             if (TMath::Abs(lRapAntiLambda) < 0.3)
+              fHistTranscTauVsMassAntiLRap3->Fill(lcTauAntiLambda,lInvMassAntiLambda);
+        if (lPtAntiLambda >= 3 && lPtAntiLambda <= 6 )
+          {
+            fHistTranscTauVsMassAntiLptLow->Fill(lcTauAntiLambda,lInvMassAntiLambda);
+             if (TMath::Abs(lRapAntiLambda) < 0.3)
+              fHistTranscTauVsMassAntiLptLowRap3->Fill(lcTauAntiLambda,lInvMassAntiLambda);
+          }
+       }   
+
        if (lcTauAntiLambda < cutcTauL){
          //////2D histos: cut vs on fly status/////////////////////
 
@@ -3160,7 +3326,17 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
        
       switch (lOnFlyStatus){
       case 0 : 
-       if(lCheckMcK0Short)      fHistAsMcTranscTauK0s->Fill(lcTauK0s);
+       if(lCheckMcK0Short) {
+         fHistAsMcTranscTauK0s->Fill(lcTauK0s);
+             if (TMath::Abs(lRapK0s) < 0.3)
+              fHistAsMcTranscTauK0sRap3->Fill(lcTauK0s);
+        if (lPtK0s >= 3 && lPtK0s <= 6 )
+          {
+            fHistAsMcTranscTauK0sptLow->Fill(lcTauK0s);
+             if (TMath::Abs(lRapK0s) < 0.3)
+              fHistAsMcTranscTauK0sptLowRap3->Fill(lcTauK0s);
+          }
+       }   
        if (lcTauK0s< cutcTauK0s) {
          fHistNsigmaPosPionK0->Fill(nSigmaPosPion);
          fHistNsigmaNegPionK0->Fill(nSigmaNegPion);
@@ -3218,12 +3394,23 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
 
 
 
-    // if ((LambdaPID==1 && lMomInnerWallPos <=1) || (lMomInnerWallPos>1) ||  !(fUsePID.Contains("withPID"))){  
+     if ((LambdaPID==1 && lMomInnerWallPos <=1) || (lMomInnerWallPos>1) ||  !(fUsePID.Contains("withPID"))){  
 
     if (TMath::Abs(lRapLambda) < lCutRap) {
       switch (lOnFlyStatus){
       case 0 : 
-       if(lCheckMcLambda) fHistAsMcTranscTauL->Fill(lcTauLambda);
+       if(lCheckMcLambda) {
+         fHistAsMcTranscTauL->Fill(lcTauLambda);
+             if (TMath::Abs(lRapLambda) < 0.3)
+              fHistAsMcTranscTauLRap3->Fill(lcTauLambda);
+        if (lPtLambda >= 3 && lPtLambda <= 6 )
+          {
+            fHistAsMcTranscTauLptLow->Fill(lcTauLambda);
+             if (TMath::Abs(lRapLambda) < 0.3)
+              fHistAsMcTranscTauLptLowRap3->Fill(lcTauLambda);
+          }
+       }   
+
        if (lcTauLambda < cutcTauL){    
          fHistNsigmaPosProtonLambda->Fill(nSigmaPosProton);
          fHistNsigmaNegPionLambda->Fill(nSigmaNegPion);
@@ -3304,19 +3491,30 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
          
        }
       } // end rapidity condition
-      //  }// end PID condition
+     }// end PID condition
     }// end ctau condition
 
     ////////////////////////////////////////////////////////
     // Associated AntiLambda histograms in |rap| < lCutRap
     ////////////////////////////////////////////////////////
 
-    //  if ((AntiLambdaPID==1 && lMomInnerWallNeg <=1) || (lMomInnerWallNeg>1) ||  !(fUsePID.Contains("withPID"))){          
+      if ((AntiLambdaPID==1 && lMomInnerWallNeg <=1) || (lMomInnerWallNeg>1) ||  !(fUsePID.Contains("withPID"))){          
 
     if (TMath::Abs(lRapAntiLambda) < lCutRap) {
       switch (lOnFlyStatus){
       case 0 : 
-       if(lCheckMcAntiLambda) fHistAsMcTranscTauAntiL->Fill(lcTauAntiLambda);
+       if(lCheckMcAntiLambda) {
+         fHistAsMcTranscTauAntiL->Fill(lcTauAntiLambda);
+             if (TMath::Abs(lRapAntiLambda) < 0.3)
+              fHistAsMcTranscTauAntiLRap3->Fill(lcTauAntiLambda);
+        if (lPtAntiLambda >= 3 && lPtAntiLambda <= 6 )
+          {
+            fHistAsMcTranscTauAntiLptLow->Fill(lcTauAntiLambda);
+             if (TMath::Abs(lRapAntiLambda) < 0.3)
+              fHistAsMcTranscTauAntiLptLowRap3->Fill(lcTauAntiLambda);
+          }
+       }   
+
        if (lcTauAntiLambda < cutcTauL){
          fHistNsigmaPosProtonAntiLambda->Fill(nSigmaPosProton);
          fHistNsigmaNegPionAntiLambda->Fill(nSigmaNegPion);
@@ -3395,7 +3593,7 @@ void AliAnalysisTaskPerformanceStrange::UserExec(Option_t *)
          
        }
       } // end rapidity condition
-      // }// end PID condition     
+     }// end PID condition     
     }// end ctau cut
   
   } // end V0 loop
index 3ce787d..36c6739 100644 (file)
@@ -172,7 +172,7 @@ class AliAnalysisTaskPerformanceStrange : public AliAnalysisTaskSE {
   TH2F        *fHistCosPointAngleK0;       //! Histo
 //  TH2F        *fHistCosPointAngleZoomK0;       //! Histo
 //  TH2F        *fHistProdRadiusK0;       //! Histo
-  TH2F        *fHistTranscTauVsMassK0s;                 //! Histo
+
 
 ///////////////////////////K0s 2D histos: cut vs mass//////////////
   TH2F        *fHistDcaPosToPrimVertexK0vsMassK0;  //! Histo
@@ -220,7 +220,7 @@ class AliAnalysisTaskPerformanceStrange : public AliAnalysisTaskSE {
 
 //  TH2F        *fHistCosPointAngleZoomL;       //! Histo
 //  TH2F        *fHistProdRadiusL;       //! Histo    
-  TH2F        *fHistTranscTauVsMassL;                 //! Histo
+
 //////////////////////////Lambda 2D histos: cut vs mass////////////////
   TH2F        *fHistDcaPosToPrimVertexLvsMassL;      //! Histo
   TH2F        *fHistDcaNegToPrimVertexLvsMassL;      //! Histo
@@ -271,7 +271,7 @@ class AliAnalysisTaskPerformanceStrange : public AliAnalysisTaskSE {
   TH2F        *fHistCosPointAngleAntiL;       //! Histo
 //  TH2F        *fHistCosPointAngleZoomL;       //! Histo
 //  TH2F        *fHistProdRadiusL;       //! Histo    
-  TH2F        *fHistTranscTauVsMassAntiL;                 //! Histo
+
 //////////////////////////Lambda 2D histos: cut vs mass////////////////
   TH2F        *fHistDcaPosToPrimVertexAntiLvsMass;      //! Histo
   TH2F        *fHistDcaNegToPrimVertexAntiLvsMass;      //! Histo
@@ -330,6 +330,24 @@ class AliAnalysisTaskPerformanceStrange : public AliAnalysisTaskSE {
   TH2F        *fHistPtVsMassLambdaRap3;       //! Histo
   TH2F        *fHistPtVsMassAntiLambdaRap3;       //! Histo
 
+  TH2F        *fHistTranscTauVsMassL;                 //! Histo
+  TH2F        *fHistTranscTauVsMassAntiL;                 //! Histo
+  TH2F        *fHistTranscTauVsMassK0s;                 //! Histo
+
+  // cTauVsMass Rap3
+  TH2F        *fHistTranscTauVsMassLRap3;       //! Histo
+  TH2F        *fHistTranscTauVsMassAntiLRap3;       //! Histo
+  TH2F        *fHistTranscTauVsMassK0sRap3;       //! Histo
+
+  // cTauVsMass Low pt
+  TH2F    *fHistTranscTauVsMassLptLow;        //! Histo
+  TH2F    *fHistTranscTauVsMassAntiLptLow;    //! Histo
+  TH2F    *fHistTranscTauVsMassK0sptLow;       //! Histo
+
+  //cTauVsMass Low pt Rap3 
+  TH2F    *fHistTranscTauVsMassLptLowRap3;        //! Histo
+  TH2F    *fHistTranscTauVsMassAntiLptLowRap3;    //! Histo
+  TH2F    *fHistTranscTauVsMassK0sptLowRap3;       //! Histo
 
 /////////////////////////////////////////////
 
@@ -365,6 +383,21 @@ class AliAnalysisTaskPerformanceStrange : public AliAnalysisTaskSE {
   TH1F        *fHistAsMcTranscTauAntiL;       //! Histo
   TH1F        *fHistAsMcTranscTauK0s;       //! Histo
 
+  TH1F        *fHistAsMcTranscTauLRap3;       //! Histo
+  TH1F        *fHistAsMcTranscTauAntiLRap3;       //! Histo
+  TH1F        *fHistAsMcTranscTauK0sRap3;       //! Histo
+
+
+  TH1F    *fHistAsMcTranscTauLptLow;        //! Histo
+  TH1F    *fHistAsMcTranscTauAntiLptLow;    //! Histo
+  TH1F    *fHistAsMcTranscTauK0sptLow;       //! Histo
+
+  //Rap3
+  TH1F    *fHistAsMcTranscTauLptLowRap3;        //! Histo
+  TH1F    *fHistAsMcTranscTauAntiLptLowRap3;    //! Histo
+  TH1F    *fHistAsMcTranscTauK0sptLowRap3;       //! Histo
+
+
   //Rap3
   TH1F        *fHistAsMcPtK0Rap3;       //! Histo
   TH1F        *fHistAsMcPtLambdaRap3;       //! Histo
index 54d457f..14a857e 100644 (file)
@@ -36,16 +36,15 @@ void run(const char * data, const char * passOrPath, Long64_t nev = -1, Long64_t
   // 2 grid
 
   if (nev < 0)
-    nev = 1234567890;
+    //    nev = 1234567890;
+    nev = 5000;
   InitAndLoadLibs(runMode,workers,debug);
-
+  
   // Create the analysis manager
   AliAnalysisManager * mgr = new AliAnalysisManager;
 
   // Add ESD handler
   AliESDInputHandler* esdH = new AliESDInputHandler;
-  // Do I need any of this? 
-  // esdH->SetInactiveBranches("AliESDACORDE FMD ALIESDTZERO ALIESDZDC AliRawDataErrorLogs CaloClusters Cascades EMCALCells EMCALTrigger ESDfriend Kinks AliESDTZERO ALIESDACORDE MuonTracks TrdTracks");
   mgr->SetInputEventHandler(esdH);
 
   if(isMC) {
@@ -70,11 +69,11 @@ void run(const char * data, const char * passOrPath, Long64_t nev = -1, Long64_t
   
   // PID task
   gROOT->ProcessLine(".L $ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
-   AddTaskPIDResponse();
+  AddTaskPIDResponse(isMC,kTRUE);
   //AddTaskPIDResponse();
   // Physics selection
   gROOT->ProcessLine(".L $ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
-  AliPhysicsSelectionTask * physicsSelectionTask = AddTaskPhysicsSelection(isMC);
+  AliPhysicsSelectionTask * physicsSelectionTask = AddTaskPhysicsSelection(isMC,kTRUE,0);
 
   // Centrality
   gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
@@ -108,7 +107,7 @@ void run(const char * data, const char * passOrPath, Long64_t nev = -1, Long64_t
   
   gROOT->ProcessLine(".L AddTaskLambdaK0PbPb.C");
   Int_t nbin = 0; // will contain the number of centrality bins
-  AliAnalysisTaskPerformanceStrange ** task = AddTaskLambdaK0PbPb("lambdak0.root", centrSelector, nbin, binMin, binMax,isMC); // FIXME also pass cuts, centrality bin type selection(5,10% percentiles, ranges...)
+  AliAnalysisTaskPerformanceStrange ** task = AddTaskLambdaK0PbPb("lambdak0.root", centrSelector, nbin, binMin, binMax,isMC);
   // configure task
   //  else if (iAODanalysis) task->SetAnalysisType("AOD");
   // FIXME: add options to macro
@@ -122,10 +121,12 @@ void run(const char * data, const char * passOrPath, Long64_t nev = -1, Long64_t
     cout << "1" << endl;
     task[ibin]->SetAnalysisMC(isMC); // 0 or 1
     cout << "2" << endl;
-    task[ibin]->SetCollidingSystems(1); // 0 =pp, 1=AA
+    task[ibin]->SetCollidingSystems(2); // 0 =pp, 1=AA  2=pA
     cout << "3" << endl;
     task[ibin]->SetAnalysisCut("no");
     cout << "4" << endl;
+    task[ibin]->SetQASelector(kFALSE);  // Todo -> put trees for QA
+    cout<< "5" << endl;
     if(usePID) 
       task[ibin]->SetUsePID("withPID"); // withPID or withoutPID
     else
@@ -154,7 +155,7 @@ void run(const char * data, const char * passOrPath, Long64_t nev = -1, Long64_t
 
   pathsuffix += customSuffix;
 
-  if (doSave) MoveOutput(data, pathsuffix.Data());
+      if (doSave) MoveOutput(data, pathsuffix.Data());
 
   
 }
@@ -227,13 +228,11 @@ void InitAndLoadLibs(Int_t runMode, Int_t workers,Bool_t debug) {
       Char_t* alienuser = gSystem->Getenv("alien_API_USER");
       TProof * p = TProof::Open(alienuser!=0 ? Form("%s@alice-caf.cern.ch",alienuser) : "alice-caf.cern.ch", workers>0 ? Form("workers=%d",workers) : "");
       //TProof * p = TProof::Open("skaf.saske.sk", workers>0 ? Form("workers=%d",workers) : "");    
-      p->Exec("TObject *o = gEnv->GetTable()->FindObject(\"Proof.UseMergers\"); gEnv->GetTable()->Remove(o);", kTRUE); // avoid submerging
-      //gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-18-AN");
-      //gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-20-AN");
-      //gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-21-AN");
-      //gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-28-AN");
-      //gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-31-AN");
-      gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-33-AN");
+      //p->Exec("TObject *o = gEnv->GetTable()->FindObject(\"Proof.UseMergers\"); gEnv->GetTable()->Remove(o);", kTRUE); // avoid submerging
+             gProof->EnablePackage("VO_ALICE@AliRoot::v5-04-11-AN");
+            gProof->GetManager()->SetROOTVersion("VO_ALICE@ROOT::v5-34-02");
+      // gProof->EnablePackage("VO_ALICE@AliRoot::v5-02-04-AN");
+
 
       // Enable the needed package
       // FIXME: what if I don't want to use par files?
@@ -258,20 +257,26 @@ void InitAndLoadLibs(Int_t runMode, Int_t workers,Bool_t debug) {
   else
     {
       cout << "Init in Local or Grid mode" << endl;
-      gSystem->Load("libCore.so");  
-      gSystem->Load("libTree.so");
-      gSystem->Load("libGeom.so");
-      gSystem->Load("libVMC.so");
-      gSystem->Load("libPhysics.so");
-      gSystem->Load("libSTEERBase");
-      gSystem->Load("libESD");
-      gSystem->Load("libAOD");
-      gSystem->Load("libANALYSIS");
-      gSystem->Load("libANALYSISalice");   
-
-      // gSystem->Load("libVMC");
+      Int_t ret=-1;
+
+      if ( gSystem->Load("libCore") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libTree") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libGeom") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libVMC") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libPhysics") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libMinuit") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libSTEERBase") < 0 ){ cout<<"libSTEERBase coul not be loaded!!!"<<endl; }//return ret; ret--;}
+      if ( gSystem->Load("libESD") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libAOD") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libANALYSIS") < 0 ) return ret; ret--;
+      if ( gSystem->Load("libANALYSISalice") < 0 ) return ret; ret--;
+
+
       gROOT->ProcessLine(".include $ALICE_ROOT/include");
       gROOT->ProcessLine(".include $ALICE_ROOT/STEER");
+      cout<<"/////////////////////////////////////"<<endl;
+      cout<<endl<<"libraries loaded !"<<endl;
+      cout<<"/////////////////////////////////////"<<endl;
     }
   // Load helper classes
   TIterator * iter = listToLoad->MakeIterator();