]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Cleanup and changing of cuts (Ana)
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Mar 2010 01:39:46 +0000 (01:39 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Mar 2010 01:39:46 +0000 (01:39 +0000)
PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx
PWG4/GammaConv/AliAnalysisTaskGammaConversion.h
PWG4/GammaConv/AliGammaConversionHistograms.cxx
PWG4/GammaConv/AliGammaConversionHistograms.h
PWG4/GammaConv/AliV0Reader.cxx
PWG4/GammaConv/AliV0Reader.h
PWG4/macros/ConfigGammaConversion.C

index fac79f6b39efa50ac436bca36cd43b63b3a4b4f7..725400f7110ee2fe6ed27788d45e0e57d31a7267 100644 (file)
@@ -233,12 +233,56 @@ void AliAnalysisTaskGammaConversion::SetESDtrackCuts()
   fEsdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts");
   //standard cuts from:
   //http://aliceinfo.cern.ch/alicvs/viewvc/PWG0/dNdEta/CreateCuts.C?revision=1.4&view=markup
-  fEsdTrackCuts->SetMinNClustersTPC(50);
-  fEsdTrackCuts->SetMaxChi2PerClusterTPC(3.5);
-  fEsdTrackCuts->SetRequireTPCRefit(kTRUE);
-  fEsdTrackCuts->SetRequireITSRefit(kTRUE);
-  fEsdTrackCuts->SetMaxNsigmaToVertex(3);
-  fEsdTrackCuts->SetRequireSigmaToVertex(kTRUE);
+
+  // Cuts used up to 3rd of March
+
+ //  fEsdTrackCuts->SetMinNClustersTPC(50);
+//   fEsdTrackCuts->SetMaxChi2PerClusterTPC(3.5);
+//   fEsdTrackCuts->SetRequireTPCRefit(kTRUE);
+//   fEsdTrackCuts->SetRequireITSRefit(kTRUE);
+//   fEsdTrackCuts->SetMaxNsigmaToVertex(3);
+//   fEsdTrackCuts->SetRequireSigmaToVertex(kTRUE);
+
+  //------- To be tested-----------
+  
+   Double_t minNClustersTPC = 50;
+   Double_t maxChi2PerClusterTPC = 4.0;
+   Double_t maxDCAtoVertexXY = 2.4; // cm
+   Double_t maxDCAtoVertexZ  = 3.2; // cm
+   fEsdTrackCuts->SetRequireSigmaToVertex(kFALSE);
+   fEsdTrackCuts->SetRequireTPCRefit(kTRUE);
+   fEsdTrackCuts->SetRequireITSRefit(kTRUE);
+   //   fEsdTrackCuts->SetRequireTPCStandAlone(kTRUE);
+   fEsdTrackCuts->SetAcceptKinkDaughters(kFALSE);
+   fEsdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
+   fEsdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
+   fEsdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
+   fEsdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
+   fEsdTrackCuts->SetDCAToVertex2D(kTRUE);
+   fEsdTrackCuts->SetEtaRange(-0.9, 0.9);
+   fEsdTrackCuts->SetPtRange(0.15);
+
+
+
+  
+  //-----  From Jacek 10.03.03 ------------------/
+//     minNClustersTPC = 70;
+//     maxChi2PerClusterTPC = 4.0;
+//     maxDCAtoVertexXY = 2.4; // cm
+//     maxDCAtoVertexZ  = 3.2; // cm
+
+//     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
+//     esdTrackCuts->SetRequireTPCRefit(kFALSE);
+//     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
+//     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
+//     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
+//     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
+//     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
+//     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
+//     esdTrackCuts->SetDCAToVertex2D(kTRUE);
+  
+
+
   //  fEsdTrackCuts->SetAcceptKinkDaughters(kFALSE);
   //  fV0Reader->SetESDtrackCuts(fEsdTrackCuts);
 }
@@ -598,17 +642,17 @@ void AliAnalysisTaskGammaConversion::ProcessMCData(){
       
       TString nameMCMappingPhiR="";
       nameMCMappingPhiR.Form("MC_Conversion_Mapping_Phi%02d_R%02d",phiBin,rBin);
-      fHistograms->FillHistogram(nameMCMappingPhiR, ePos->Vz(), particle->Eta());
+      // fHistograms->FillHistogram(nameMCMappingPhiR, ePos->Vz(), particle->Eta());
                        
       TString nameMCMappingPhi="";
       nameMCMappingPhi.Form("MC_Conversion_Mapping_Phi%02d",phiBin);
       //      fHistograms->FillHistogram(nameMCMappingPhi, particle->Eta());
-      fHistograms->FillHistogram(nameMCMappingPhi, ePos->Vz(), particle->Eta());
+      //fHistograms->FillHistogram(nameMCMappingPhi, ePos->Vz(), particle->Eta());
                        
       TString nameMCMappingR="";
       nameMCMappingR.Form("MC_Conversion_Mapping_R%02d",rBin);
       //      fHistograms->FillHistogram(nameMCMappingR, particle->Eta());
-      fHistograms->FillHistogram(nameMCMappingR,ePos->Vz(), particle->Eta());
+      //fHistograms->FillHistogram(nameMCMappingR,ePos->Vz(), particle->Eta());
                        
       TString nameMCMappingPhiInR="";
       nameMCMappingPhiInR.Form("MC_Conversion_Mapping_Phi_in_R_%02d",rBin);
@@ -942,6 +986,15 @@ void AliAnalysisTaskGammaConversion::ProcessV0sNoCut(){
       continue;
     }
 
+    if( fV0Reader->GetNegativeESDTrack()->GetSign()== fV0Reader->GetPositiveESDTrack()->GetSign()){
+      continue;
+    }
+
+    if( fV0Reader->GetNegativeESDTrack()->GetKinkIndex(0) > 0 || 
+       fV0Reader->GetPositiveESDTrack()->GetKinkIndex(0) > 0) {                        
+      continue;
+    }
+
     if(fDoMCTruth){
                        
       if(fV0Reader->HasSameMCMother() == kFALSE){
@@ -1025,11 +1078,15 @@ void AliAnalysisTaskGammaConversion::ProcessV0s(){
     fHistograms->FillHistogram("ESD_E_Pt", fV0Reader->GetNegativeTrackPt());
     fHistograms->FillHistogram("ESD_E_Eta", fV0Reader->GetNegativeTrackEta());
     fHistograms->FillHistogram("ESD_E_Phi", fV0Reader->GetNegativeTrackPhi());
+    fHistograms->FillHistogram("ESD_E_nTPCClusters", fV0Reader->GetNegativeTracknTPCClusters());
+    fHistograms->FillHistogram("ESD_E_nITSClusters", fV0Reader->GetNegativeTracknITSClusters());
                
     fHistograms->FillHistogram("ESD_P_Energy", fV0Reader->GetPositiveTrackEnergy());
     fHistograms->FillHistogram("ESD_P_Pt", fV0Reader->GetPositiveTrackPt());
     fHistograms->FillHistogram("ESD_P_Eta", fV0Reader->GetPositiveTrackEta());
     fHistograms->FillHistogram("ESD_P_Phi", fV0Reader->GetPositiveTrackPhi());
+    fHistograms->FillHistogram("ESD_P_nTPCClusters", fV0Reader->GetPositiveTracknTPCClusters());
+    fHistograms->FillHistogram("ESD_P_nITSClusters", fV0Reader->GetPositiveTracknITSClusters());
                
     fHistograms->FillHistogram("ESD_ConvGamma_Energy", fV0Reader->GetMotherCandidateEnergy());
     fHistograms->FillHistogram("ESD_ConvGamma_Pt", fV0Reader->GetMotherCandidatePt());
@@ -1062,19 +1119,19 @@ void AliAnalysisTaskGammaConversion::ProcessV0s(){
     Int_t phiBin  = fHistograms->GetPhiBin(fV0Reader->GetNegativeTrackPhi());
     TVector3 vtxConv(fV0Reader->GetX(),fV0Reader->GetY(), fV0Reader->GetZ());
 
-    Double_t motherCandidateEta= fV0Reader->GetMotherCandidateEta();
+    //    Double_t motherCandidateEta= fV0Reader->GetMotherCandidateEta();
                
     TString nameESDMappingPhiR="";
     nameESDMappingPhiR.Form("ESD_Conversion_Mapping_Phi%02d_R%02d",phiBin,rBin);
-    fHistograms->FillHistogram(nameESDMappingPhiR, fV0Reader->GetZ(), motherCandidateEta);
+    //fHistograms->FillHistogram(nameESDMappingPhiR, fV0Reader->GetZ(), motherCandidateEta);
                
     TString nameESDMappingPhi="";
     nameESDMappingPhi.Form("ESD_Conversion_Mapping_Phi%02d",phiBin);
-    fHistograms->FillHistogram(nameESDMappingPhi, fV0Reader->GetZ(), motherCandidateEta);
+    //fHistograms->FillHistogram(nameESDMappingPhi, fV0Reader->GetZ(), motherCandidateEta);
                
     TString nameESDMappingR="";
     nameESDMappingR.Form("ESD_Conversion_Mapping_R%02d",rBin);
-    fHistograms->FillHistogram(nameESDMappingR, fV0Reader->GetZ(), motherCandidateEta);  
+    //fHistograms->FillHistogram(nameESDMappingR, fV0Reader->GetZ(), motherCandidateEta);  
                
     TString nameESDMappingPhiInR="";
     nameESDMappingPhiInR.Form("ESD_Conversion_Mapping_Phi_in_R_%02d",rBin);
@@ -1359,7 +1416,8 @@ void AliAnalysisTaskGammaConversion::ProcessGammasForNeutralMesonAnalysis(){
          fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
          fHistograms->FillHistogram("ESD_Mother_InvMass",massTwoGammaCandidate);
 
-         if(fDoNeutralMesonV0MCCheck){
+         //      if(fDoNeutralMesonV0MCCheck){
+         if(fDoMCTruth){
            //Kenneth: Checking the eta of the gamma to check the difference between 0.9 and 1.2
            Int_t indexKF1 = fKFReconstructedGammasV0Index.at(firstGammaIndex);
            if(indexKF1<fV0Reader->GetNumberOfV0s()){
@@ -1405,30 +1463,36 @@ void AliAnalysisTaskGammaConversion::ProcessGammasForNeutralMesonAnalysis(){
                }
 
                if(TMath::Abs(eta1)>0.9 && TMath::Abs(eta2)>0.9){
-                 fHistograms->FillHistogram("ESD_Mother_InvMass_1212",massTwoGammaCandidate);
-                 fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt1212",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+                 //              fHistograms->FillHistogram("ESD_Mother_InvMass_1212",massTwoGammaCandidate);
+                 //              fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt1212",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
                  if(isRealPi0){
                    fHistograms->FillHistogram("ESD_TruePi0_InvMass_1212",massTwoGammaCandidate);
                    fHistograms->FillHistogram("ESD_TruePi0_OpeningAngle_1212",openingAngleTwoGammaCandidate);
                    fHistograms->FillHistogram("ESD_TruePi0_InvMass_vs_Pt1212",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+                   fHistograms->FillHistogram("ESD_TruePi0_InvMass_vs_Pt",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
+                   fHistograms->FillHistogram("ESD_TruePi0_InvMass",massTwoGammaCandidate);
                  }
                }
                else if(TMath::Abs(eta1)>0.9 || TMath::Abs(eta2)>0.9){
-                 fHistograms->FillHistogram("ESD_Mother_InvMass_0912",massTwoGammaCandidate);
-                 fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt0912",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+                 //              fHistograms->FillHistogram("ESD_Mother_InvMass_0912",massTwoGammaCandidate);
+                 //              fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt0912",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
                  if(isRealPi0){
                    fHistograms->FillHistogram("ESD_TruePi0_InvMass_0912",massTwoGammaCandidate);
                    fHistograms->FillHistogram("ESD_TruePi0_OpeningAngle_0912",openingAngleTwoGammaCandidate);
                    fHistograms->FillHistogram("ESD_TruePi0_InvMass_vs_Pt0912",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+                   fHistograms->FillHistogram("ESD_TruePi0_InvMass_vs_Pt",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
+                   fHistograms->FillHistogram("ESD_TruePi0_InvMass",massTwoGammaCandidate);
                  }
                }
                else{
-                 fHistograms->FillHistogram("ESD_Mother_InvMass_0909",massTwoGammaCandidate);
-                 fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt0909",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+                 //              fHistograms->FillHistogram("ESD_Mother_InvMass_0909",massTwoGammaCandidate);
+                 //              fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt0909",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
                  if(isRealPi0){
                    fHistograms->FillHistogram("ESD_TruePi0_InvMass_0909",massTwoGammaCandidate);
                    fHistograms->FillHistogram("ESD_TruePi0_OpeningAngle_0909",openingAngleTwoGammaCandidate);
                    fHistograms->FillHistogram("ESD_TruePi0_InvMass_vs_Pt0909",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+                   fHistograms->FillHistogram("ESD_TruePi0_InvMass_vs_Pt",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
+                   fHistograms->FillHistogram("ESD_TruePi0_InvMass",massTwoGammaCandidate);
                  }
                }
              }
@@ -1438,6 +1502,19 @@ void AliAnalysisTaskGammaConversion::ProcessGammasForNeutralMesonAnalysis(){
            fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt_Fiducial",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
            fHistograms->FillHistogram("ESD_Mother_InvMass_Fiducial",massTwoGammaCandidate);
          }
+
+         if(TMath::Abs(twoGammaDecayCandidateDaughter0->GetEta())>0.9 && TMath::Abs(twoGammaDecayCandidateDaughter1->GetEta())>0.9){
+           fHistograms->FillHistogram("ESD_Mother_InvMass_1212",massTwoGammaCandidate);
+           fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt1212",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+         }
+         else if(TMath::Abs(twoGammaDecayCandidateDaughter0->GetEta())>0.9 || TMath::Abs(twoGammaDecayCandidateDaughter1->GetEta())>0.9){
+           fHistograms->FillHistogram("ESD_Mother_InvMass_0912",massTwoGammaCandidate);
+           fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt0912",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+         }
+         else{
+           fHistograms->FillHistogram("ESD_Mother_InvMass_0909",massTwoGammaCandidate);
+           fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt0909",massTwoGammaCandidate,momentumVectorTwoGammaCandidate.Pt());
+         }
        }
       }
       delete twoGammaCandidate;
index 19fc83eca7fa17024b0e033c1aac9e934b4591e1..9807673e0da95dc720b73e5d78e7c9058625533a 100644 (file)
@@ -130,21 +130,22 @@ class AliAnalysisTaskGammaConversion : public AliAnalysisTaskSE
   enum{
     kStepGenerated = 0,
     kStepReconstructable = 1, 
-    kStepLikeSign = 2,
-    kStepTPCRefit = 3,
-    kStepKinks = 4,
-    kStepdEdx = 5,
-    kStepGetOnFly = 6,
-    kStepNContributors = 7,
-    kStepTPCPID = 8,
-    kStepR = 9,
-    kStepLine = 10,
-    kStepZ = 11,
-    kStepNDF = 12,
-    kStepChi2 = 13,
-    kStepEta = 14,
-    kStepPt = 15,
-    kStepTrueGamma = 16
+    kStepGetOnFly = 2,
+    kStepLikeSign = 3,
+    kStepTPCRefit = 4,
+    kStepKinks = 5,
+    kStepdEdx_electronselection = 6,
+    kStepdEdx_pionrejection = 7,
+    kStepNContributors = 8,
+    kStepTPCPID = 9,
+    kStepR = 10,
+    kStepLine = 11,
+    kStepZ = 12,
+    kStepNDF = 13,
+    kStepChi2 = 14,
+    kStepEta = 15,
+    kStepPt = 16,
+    kStepTrueGamma = 17
   };
   
   AliV0Reader* fV0Reader; // The V0 reader object 
index db5eeb7443bf2e2904411f2ddad57d6b8bbaa708..ae257540cb0a8e1fd85802f550f22fec1f763218 100644 (file)
@@ -369,14 +369,32 @@ void AliGammaConversionHistograms::InitializeMappingValues(Int_t nPhiIndex, Int_
   fNZIndex = 6;
 
   //  fRBinLimits= new Double_t[8];   Kenneth: moved from pointer to fixed array
+  /*
   fRBinLimits[0]=0.;
-  fRBinLimits[1]=12.;
-  fRBinLimits[2]=22.;
+  fRBinLimits[1]=13.;   //changed from 12 to 13: A. Marin 01.03.10
+  fRBinLimits[2]=21.;   //changed from 22 to 21: A. Marin 01.03.10 
   fRBinLimits[3]=35.;
   fRBinLimits[4]=55.;
   fRBinLimits[5]=72.;
   fRBinLimits[6]=90.;
   fRBinLimits[7]=500.;
+  */
+
+  fRBinLimits[0]=0.;
+  fRBinLimits[1]=5.75;
+  fRBinLimits[2]=9.5;
+  fRBinLimits[3]=13.;
+  fRBinLimits[4]=21.;
+  fRBinLimits[5]=27.5;
+  fRBinLimits[6]=35.;
+  fRBinLimits[7]=42.;
+  fRBinLimits[8]=55.;
+  fRBinLimits[9]=72.;
+  fRBinLimits[10]=81.5;
+  fRBinLimits[11]=90.;
+  fRBinLimits[12]=500.;
+
+
 
   //  fZBinLimits= new Double_t[7]; Kenneth: moved from pointer to fixed array
   fZBinLimits[0]=0.;
@@ -404,6 +422,11 @@ void AliGammaConversionHistograms::InitializeMappingValues(Int_t nPhiIndex, Int_
 //mapping
 void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t nRIndex,Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
   // see header file for documentation
+
+  Double_t tmptogetridofwarning = firstX + lastX + nYBins + firstY + lastY;
+  if(tmptogetridofwarning < 0){
+    cout<<"Less than zero"<<endl;
+  }
        
   for(Int_t phi =0; phi<fNPhiIndex;phi++){
                
@@ -428,7 +451,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
       TString titleMC="";
       titleMC.Form("Electron-Positron MC Mapping-Phi%02d-R%02d",phi,r);
                        
-      AddHistogram(nameMC, titleMC, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
+      //AddHistogram(nameMC, titleMC, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
                        
       //ESD
       TString nameESD="";
@@ -436,7 +459,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
       TString titleESD="";
       titleESD.Form("Electron-Positron ESD Mapping-Phi%02d-R%02d",phi,r);
                        
-      AddHistogram(nameESD, titleESD, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
+      //AddHistogram(nameESD, titleESD, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
     }
   }
        
@@ -460,7 +483,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
     TString titleMC="";
     titleMC.Form("Electron-Positron MC Mapping-Phi%02d",phi);
                
-    AddHistogram(nameMC, titleMC, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
+    //AddHistogram(nameMC, titleMC, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
                
     //MC
     TString nameESD="";
@@ -468,7 +491,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
     TString titleESD="";
     titleESD.Form("Electron-Positron ESD Mapping-Phi%02d",phi);
                
-    AddHistogram(nameESD, titleESD, nXBins, firstX, lastX,nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
+    // AddHistogram(nameESD, titleESD, nXBins, firstX, lastX,nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
   }
        
        
@@ -476,7 +499,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
                
     // setting axis to "" changes below
     xAxisTitle="#phi";
-      yAxisTitle="counts";
+    yAxisTitle="counts";
     //Creating the axis titles
     //if(xAxisTitle.Length() == 0){
     //  xAxisTitle.Form("R %02d",r);
@@ -491,7 +514,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
     TString titleMC="";
     titleMC.Form("Electron-Positron MC Mapping-R%02d",r);
                
-    AddHistogram(nameMC, titleMC, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
+    // AddHistogram(nameMC, titleMC, nXBins, firstX, lastX, nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
                
     //ESD
     TString nameESD="";
@@ -499,7 +522,7 @@ void AliGammaConversionHistograms::AddMappingHistograms(Int_t nPhiIndex, Int_t n
     TString titleESD="";
     titleESD.Form("Electron-Positron ESD Mapping-R%02d",r);
                
-    AddHistogram(nameESD, titleESD, nXBins, firstX, lastX,nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
+    //AddHistogram(nameESD, titleESD, nXBins, firstX, lastX,nYBins, firstY, lastY, xAxisTitle, yAxisTitle);
                
     //Mapping Phi in R
     TString nameMCPhiInR="";
index b0a3ea58e76cb27370743f25a960636b918ac4ce..7a1045b6604f0fccd3d173fad06d0860ac9dcda0 100644 (file)
@@ -78,7 +78,8 @@ class AliGammaConversionHistograms{
   Int_t fNPhiIndex; //phi index
   Int_t fNRIndex; //r index
   Int_t fNZIndex; //z index
-  Double_t fRBinLimits[8]; // Limits of the radius bins
+  //  Double_t fRBinLimits[8]; // Limits of the radius bins
+  Double_t fRBinLimits[13]; // Limits of the radius bins
   Double_t fZBinLimits[7]; // Limits of the Z bins
   Double_t fMinRadius; //min radius cut
   Double_t fMaxRadius; //max radius cut
index d05be99c74de0d3858a6eba2787eb3892384c19f..d004767f59119f911ac65f6e8669fe637dac6f23 100644 (file)
@@ -353,8 +353,18 @@ Bool_t AliV0Reader::NextV0(){
       containerInput[1] = GetMotherCandidateEta();
       containerInput[2] = GetMotherCandidateMass();
     }
-    
-   
+    /*
+    if(fDoCF){
+      containerInput[0] = GetMotherCandidatePt();
+      containerInput[1] = GetMotherCandidateEta();
+      containerInput[2] = GetMotherCandidateMass();
+      
+      fCFManager->GetParticleContainer()->Fill(containerInput,kStepLikeSign);          // for CF       
+      fCFManager->GetParticleContainer()->Fill(containerInput,kStepTPCRefit);          // for CF       
+      fCFManager->GetParticleContainer()->Fill(containerInput,kStepKinks);             // for CF       
+    }
+    */
+
     //checks if on the fly mode is set
     if ( !CheckV0FinderStatus(fCurrentV0IndexNumber) ){
       if(fHistograms != NULL){
@@ -366,6 +376,120 @@ Bool_t AliV0Reader::NextV0(){
     if(fDoCF){
       fCFManager->GetParticleContainer()->Fill(containerInput,kStepGetOnFly);          // for CF       
     }
+
+    if(fHistograms != NULL){
+      fHistograms->FillHistogram("ESD_AllV0sCurrentFinder_InvMass",GetMotherCandidateMass());
+    }
+    
+    if(fCurrentNegativeESDTrack->GetSign() == fCurrentPositiveESDTrack->GetSign()){             // avoid like sign
+      //  iResult=kFALSE;
+      if(fHistograms != NULL ){
+       fHistograms->FillHistogram("ESD_CutLikeSign_InvMass",GetMotherCandidateMass());
+       // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+       // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+       //      fUpdateV0AlreadyCalled = kTRUE;
+      }
+      fCurrentV0IndexNumber++;
+      continue;
+    }
+    if(fDoCF){
+      fCFManager->GetParticleContainer()->Fill(containerInput,kStepLikeSign);          // for CF       
+    }
+       
+       
+    if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kTPCrefit) || 
+       !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kTPCrefit) ){
+      //  if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kITSrefit) || 
+      //      !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kITSrefit) ){
+      //  iResult=kFALSE;
+      if(fHistograms != NULL){
+       fHistograms->FillHistogram("ESD_CutRefit_InvMass",GetMotherCandidateMass());
+       // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+       // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+       //fUpdateV0AlreadyCalled = kTRUE;
+      }
+      fCurrentV0IndexNumber++;
+      continue;
+    }
+    if(fDoCF){
+      fCFManager->GetParticleContainer()->Fill(containerInput,kStepTPCRefit);          // for CF       
+    }
+       
+
+
+    if( fCurrentNegativeESDTrack->GetKinkIndex(0) > 0 || 
+       fCurrentPositiveESDTrack->GetKinkIndex(0) > 0) {                        
+      //iResult=kFALSE;
+      if(fHistograms != NULL ){
+       fHistograms->FillHistogram("ESD_CutKink_InvMass",GetMotherCandidateMass());
+       // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+       // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+       //fUpdateV0AlreadyCalled = kTRUE;
+      }
+      fCurrentV0IndexNumber++;
+      continue;
+    }
+
+    if(fDoCF){
+      fCFManager->GetParticleContainer()->Fill(containerInput,kStepKinks);             // for CF       
+    }
+       
+
+    if(fDodEdxSigmaCut == kTRUE){
+      if( fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
+         fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ||
+         fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
+         fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ){
+       //iResult=kFALSE;
+       if(fHistograms != NULL ){
+         fHistograms->FillHistogram("ESD_CutdEdxSigmaElectronLine_InvMass",GetMotherCandidateMass());
+         // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+         // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+         //fUpdateV0AlreadyCalled = kTRUE;
+       }
+       fCurrentV0IndexNumber++;
+       continue;
+      }
+      if(fDoCF){
+       fCFManager->GetParticleContainer()->Fill(containerInput,kStepdEdx_electronselection);               // for CF
+      }
+
+      if( fCurrentPositiveESDTrack->P()>fPIDMinPnSigmaAbovePionLine){
+       if(fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
+          fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
+          fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
+         //      iResult=kFALSE;
+         if(fHistograms != NULL){
+           fHistograms->FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass());
+           // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+           // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+           //fUpdateV0AlreadyCalled = kTRUE;
+         }
+         fCurrentV0IndexNumber++;
+         continue;
+       }
+      }
+      
+      if( fCurrentNegativeESDTrack->P()>fPIDMinPnSigmaAbovePionLine){
+       if(fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
+          fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
+          fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
+         //      iResult=kFALSE;
+         if(fHistograms != NULL){
+           fHistograms->FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass());
+           // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+           // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+           //fUpdateV0AlreadyCalled = kTRUE;
+         }
+         fCurrentV0IndexNumber++;
+         continue;
+       }
+      }
+      if(fDoCF){
+       fCFManager->GetParticleContainer()->Fill(containerInput,kStepdEdx_pionrejection);               // for CF
+      }
+
+    }
     
     //checks if we have a prim vertex
     if(fESDEvent->GetPrimaryVertex()->GetNContributors()<=0) { 
@@ -510,6 +634,12 @@ Bool_t AliV0Reader::UpdateV0Information(){
        
   fCurrentNegativeESDTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
   fCurrentPositiveESDTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
+
+  if(fCurrentPositiveESDTrack->GetSign() == -1 && fCurrentNegativeESDTrack->GetSign() == 1){  // switch wrong signed tracks
+    fCurrentNegativeESDTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
+    fCurrentPositiveESDTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
+    switchTracks = kTRUE;
+  }
        
   if(fCurrentNegativeKFParticle != NULL){
     delete fCurrentNegativeKFParticle;
@@ -548,8 +678,7 @@ Bool_t AliV0Reader::UpdateV0Information(){
   }
        
   fCurrentMotherKFCandidate->GetMass(fMotherCandidateKFMass,fMotherCandidateKFWidth);
-       
-       
+               
   if(fNegativeTrackLorentzVector != NULL){
     delete fNegativeTrackLorentzVector;
   }
@@ -596,16 +725,16 @@ Bool_t AliV0Reader::UpdateV0Information(){
        
 
   // for CF
-  Double_t containerInput[3];
-  if(fDoCF){
-    containerInput[0] = GetMotherCandidatePt();
-    containerInput[1] = GetMotherCandidateEta();
-    containerInput[2] = GetMotherCandidateMass();
+//   Double_t containerInput[3];
+//   if(fDoCF){
+//     containerInput[0] = GetMotherCandidatePt();
+//     containerInput[1] = GetMotherCandidateEta();
+//     containerInput[2] = GetMotherCandidateMass();
     
-    fCFManager->GetParticleContainer()->Fill(containerInput,kStepLikeSign);            // for CF       
-    fCFManager->GetParticleContainer()->Fill(containerInput,kStepTPCRefit);            // for CF       
-    fCFManager->GetParticleContainer()->Fill(containerInput,kStepKinks);               // for CF       
-  }
+//     fCFManager->GetParticleContainer()->Fill(containerInput,kStepLikeSign);         // for CF       
+//     fCFManager->GetParticleContainer()->Fill(containerInput,kStepTPCRefit);         // for CF       
+//     fCFManager->GetParticleContainer()->Fill(containerInput,kStepKinks);            // for CF       
+//   }
   
 
   if(fUseOwnXYZCalculation == kFALSE){
@@ -620,10 +749,10 @@ Bool_t AliV0Reader::UpdateV0Information(){
     fCurrentYValue = convpos[1];
     fCurrentZValue = GetConvPosZ(GetPositiveESDTrack(),GetNegativeESDTrack(),GetMagneticField());
   }
-
+  /*
   if(fCurrentNegativeESDTrack->GetSign() == fCurrentPositiveESDTrack->GetSign()){             // avoid like sign
     iResult=kFALSE;
-    if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){
+    if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE && doFillHistos == kTRUE){
       fHistograms->FillHistogram("ESD_CutLikeSign_InvMass",GetMotherCandidateMass());
       // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
       // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
@@ -631,18 +760,12 @@ Bool_t AliV0Reader::UpdateV0Information(){
     }
   }
        
-  if(fCurrentPositiveESDTrack->GetSign() == -1 && fCurrentNegativeESDTrack->GetSign() == 1){  // switch wrong signed tracks
-    fCurrentNegativeESDTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
-    fCurrentPositiveESDTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
-    switchTracks = kTRUE;
-  }
-       
   if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kTPCrefit) || 
       !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kTPCrefit) ){
     //  if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kITSrefit) || 
     //      !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kITSrefit) ){
     iResult=kFALSE;
-    if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){
+    if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE  && doFillHistos == kTRUE){
       fHistograms->FillHistogram("ESD_CutRefit_InvMass",GetMotherCandidateMass());
       // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
       // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
@@ -654,7 +777,7 @@ Bool_t AliV0Reader::UpdateV0Information(){
       fCurrentPositiveESDTrack->GetKinkIndex(0) > 0) {                 
                
     iResult=kFALSE;
-    if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){
+    if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE && doFillHistos == kTRUE ){
       fHistograms->FillHistogram("ESD_CutKink_InvMass",GetMotherCandidateMass());
       // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
       // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
@@ -669,7 +792,7 @@ Bool_t AliV0Reader::UpdateV0Information(){
        fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
        fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ){
       iResult=kFALSE;
-      if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){
+      if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE  && doFillHistos == kTRUE){
        fHistograms->FillHistogram("ESD_CutdEdxSigmaElectronLine_InvMass",GetMotherCandidateMass());
        // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
        // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
@@ -681,7 +804,7 @@ Bool_t AliV0Reader::UpdateV0Information(){
         fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
         fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
        iResult=kFALSE;
-       if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){
+       if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE  && doFillHistos == kTRUE){
          fHistograms->FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass());
          // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
          // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
@@ -695,7 +818,7 @@ Bool_t AliV0Reader::UpdateV0Information(){
         fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
         fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
        iResult=kFALSE;
-       if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){
+       if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE && doFillHistos == kTRUE ){
          fHistograms->FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass());
          // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
          // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
@@ -704,7 +827,7 @@ Bool_t AliV0Reader::UpdateV0Information(){
       }
     }
   }
-       
+  */
   fUpdateV0AlreadyCalled = kTRUE;
 
   return iResult;
index 12ddbbf3f709e3629250df729dd5556f94b3adab..b91c4c126273f1de9a43c1699d51e2f009d6b2de 100644 (file)
@@ -51,21 +51,22 @@ class AliV0Reader : public TObject {
   enum{
     kStepGenerated = 0,
     kStepReconstructable = 1, 
-    kStepLikeSign = 2,
-    kStepTPCRefit = 3,
-    kStepKinks = 4,
-    kStepdEdx = 5,
-    kStepGetOnFly = 6,
-    kStepNContributors = 7,
-    kStepTPCPID = 8,
-    kStepR = 9,
-    kStepLine = 10,
-    kStepZ = 11,
-    kStepNDF = 12,
-    kStepChi2 = 13,
-    kStepEta = 14,
-    kStepPt = 15,
-    kStepTrueGamma = 16
+    kStepGetOnFly = 2,
+    kStepLikeSign = 3,
+    kStepTPCRefit = 4,
+    kStepKinks = 5,
+    kStepdEdx_electronselection = 6,
+    kStepdEdx_pionrejection = 7,
+    kStepNContributors = 8,
+    kStepTPCPID = 9,
+    kStepR = 10,
+    kStepLine = 11,
+    kStepZ = 12,
+    kStepNDF = 13,
+    kStepChi2 = 14,
+    kStepEta = 15,
+    kStepPt = 16,
+    kStepTrueGamma = 17
   };
        
   AliV0Reader();                                        //constructor
@@ -394,6 +395,26 @@ class AliV0Reader : public TObject {
    * Gets the dE/dx in the TPC of the positive track.
    */
   Double_t GetPositiveTrackTPCdEdx() const{return fCurrentPositiveESDTrack->GetTPCsignal();}
+
+  /*
+   * Gets the Number of the TPC clusters of the negative track.
+   */
+  Double_t GetNegativeTracknTPCClusters() const{return fCurrentNegativeESDTrack->GetNcls(1);}
+
+  /*
+   * Gets the Number of the TPC clusters of the positive track.
+   */
+  Double_t GetPositiveTracknTPCClusters() const{return fCurrentPositiveESDTrack->GetNcls(1);}
+       
+  /*
+   * Gets the Number of the ITS clusters of the negative track.
+   */
+  Double_t GetNegativeTracknITSClusters() const{return fCurrentNegativeESDTrack->GetNcls(0);}
+
+  /*
+   * Gets the Number of the ITS clusters of the positive track.
+   */
+  Double_t GetPositiveTracknITSClusters() const{return fCurrentPositiveESDTrack->GetNcls(0);}
        
   /*
    * Update data which need to be updated every event.
index e54200237e1719ab97e18859dcb87d22fe0bd436..0441dbde456bb8cfb0cb952d0d7d79a16b16f962 100644 (file)
@@ -40,7 +40,7 @@ Double_t kGCmaxRCut   = 180.;
 Double_t kGCetaCut    = 1.2;
 Double_t kGCptCut     = 0.02;
 Double_t kGCmaxZCut     = 240.;
-Double_t kGCchi2CutConversion   = 30.;
+Double_t kGCchi2CutConversion   = 50.;
 Double_t kGCchi2CutMeson   = 50.;
 
 Double_t kGCLineCutZRSlope = tan(2*atan(exp(-kGCetaCut)));
@@ -78,7 +78,7 @@ Double_t kGCminOpeningAngleGhostCut = 0.01;
 
 /** -------------------------------- Phi/R Mapping ---------------------------------------*/
 Int_t kGCnPhiIndex = 8;
-Int_t kGCnRIndex   = 7;
+Int_t kGCnRIndex   = 12;
 
 Double_t kGCminRadius   = 0.;
 Double_t kGCmaxRadius   = 200.;
@@ -106,11 +106,15 @@ Bool_t kGCplotMCEEnergy  = kTRUE;
 Bool_t kGCplotMCEPt      = kTRUE;
 Bool_t kGCplotMCEEta     = kTRUE;
 Bool_t kGCplotMCEPhi     = kTRUE;
+Bool_t kGCplotMCENTPCClusters = kTRUE;
+Bool_t kGCplotMCENITSClusters = kTRUE;
 
 Bool_t kGCplotMCPEnergy  = kTRUE;
 Bool_t kGCplotMCPPt      = kTRUE;
 Bool_t kGCplotMCPEta     = kTRUE;
 Bool_t kGCplotMCPPhi     = kTRUE;
+Bool_t kGCplotMCPNTPCClusters = kTRUE;
+Bool_t kGCplotMCPNITSClusters = kTRUE;
 
 Bool_t kGCplotMCallGammaEnergy = kTRUE;
 Bool_t kGCplotMCallGammaPt     = kTRUE;
@@ -220,11 +224,15 @@ Bool_t kGCplotESDEEnergy = kTRUE;
 Bool_t kGCplotESDEPt     = kTRUE;
 Bool_t kGCplotESDEEta    = kTRUE;
 Bool_t kGCplotESDEPhi    = kTRUE;
+Bool_t kGCplotESDENTPCClusters = kTRUE;
+Bool_t kGCplotESDENITSClusters = kTRUE;
 
 Bool_t kGCplotESDPEnergy = kTRUE;
 Bool_t kGCplotESDPPt     = kTRUE;
 Bool_t kGCplotESDPEta    = kTRUE;
 Bool_t kGCplotESDPPhi    = kTRUE;
+Bool_t kGCplotESDPNTPCClusters = kTRUE;
+Bool_t kGCplotESDPNITSClusters = kTRUE;
 
 Bool_t kGCplotESDConvGammaEnergy = kTRUE;
 Bool_t kGCplotESDConvGammaPt     = kTRUE;
@@ -358,8 +366,10 @@ Bool_t kGCplotESDCutdedxSigmaElectronLine=kTRUE;
 Bool_t kGCplotESDCutdedxSigmaPionLine=kTRUE;
 Bool_t kGCplotESDCutR             = kTRUE;
 Bool_t kGCplotESDCutLine          = kTRUE;
+Bool_t kGCplotESDCutZ             = kTRUE;
 Bool_t kGCplotESDGoodV0s          = kTRUE;
-Bool_t kGCplotESDAllV0s          = kTRUE;
+Bool_t kGCplotESDAllV0s           = kTRUE;
+Bool_t kGCplotESDAllV0sCurrentFinder = kTRUE;
 Bool_t kGCplotESDCutNDF           = kTRUE;
 Bool_t kGCplotESDCutChi2          = kTRUE;
 Bool_t kGCplotESDCutEta           = kTRUE;
@@ -499,6 +509,18 @@ Int_t kGCnXBinsPhi = 72;
 Double_t kGCfirstXBinPhi = -TMath::Pi();
 Double_t kGClastXBinPhi = TMath::Pi();
 
+//nTPCCluster-plots
+Int_t kGCnXBinsNTPCClusters = 200;
+Double_t kGCfirstXBinNTPCClusters = 0;
+Double_t kGClastXBinNTPCClusters = 200;
+
+//nITSCluster-plots
+Int_t kGCnXBinsNITSClusters = 6;
+Double_t kGCfirstXBinNITSClusters = 0;
+Double_t kGClastXBinNITSClusters = 6;
+
+
+
 //Mapping-plots
 Int_t kGCnXBinsMapping = 400;
 Double_t kGCfirstXBinMapping = -100.;
@@ -578,7 +600,7 @@ Double_t kGClastXBinGammaWidth = 1.;
 //GammaChi2-plots
 Int_t kGCnXBinsGammaChi2 = 100;
 Double_t kGCfirstXBinGammaChi2 = 0;
-Double_t kGClastXBinGammaChi2 = 100.;
+Double_t kGClastXBinGammaChi2 = 200.;
 
 //GammaNDF-plots
 Int_t kGCnXBinsGammaNDF = 10;
@@ -932,7 +954,7 @@ AliAnalysisTaskGammaConversion* ConfigGammaConversion(TString arguments,AliAnaly
     UInt_t imass = 2;  
                
     //how many selection steps 
-    UInt_t nstep = 17;
+    UInt_t nstep = 18;
     const Int_t nvar = 3;
     const Int_t nbin0 = kGCnXBinsPt; 
     const Int_t nbin1 = kGCnXBinsEta;
@@ -1142,6 +1164,11 @@ AliAnalysisTaskGammaConversion* ConfigGammaConversion(TString arguments,AliAnaly
        
   gammaconversion->SetMinOpeningAngleGhostCut(kGCminOpeningAngleGhostCut);
        
+  Double_t lowPtMapping=0.4;
+  Double_t highPtMapping=1.5;
+  gammaconversion->SetLowPtMapping(lowPtMapping);
+  gammaconversion->SetHighPtMapping(highPtMapping);
+
   // define the width constraint used by KF particle.
   Double_t gammaWidth = 0.01;
   Double_t pi0Width   = 0.01;
@@ -1386,11 +1413,15 @@ void AddHistograms(AliGammaConversionHistograms *histograms){
     if(kGCplotMCEPt == kTRUE){ histograms->AddHistogram("MC_E_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
     if(kGCplotMCEEta == kTRUE){ histograms->AddHistogram("MC_E_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
     if(kGCplotMCEPhi == kTRUE){ histograms->AddHistogram("MC_E_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
+    if(kGCplotMCENTPCClusters == kTRUE){ histograms->AddHistogram("MC_E_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
+    if(kGCplotMCENITSClusters == kTRUE){ histograms->AddHistogram("MC_E_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
                
     if(kGCplotMCPEnergy == kTRUE){ histograms->AddHistogram("MC_P_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
     if(kGCplotMCPPt == kTRUE){ histograms->AddHistogram("MC_P_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
     if(kGCplotMCPEta == kTRUE){ histograms->AddHistogram("MC_P_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
     if(kGCplotMCPPhi == kTRUE){ histograms->AddHistogram("MC_P_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
+    if(kGCplotMCPNTPCClusters == kTRUE){ histograms->AddHistogram("MC_P_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
+    if(kGCplotMCPNITSClusters == kTRUE){ histograms->AddHistogram("MC_P_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
                
     if(kGCplotMCallGammaEnergy == kTRUE){ histograms->AddHistogram("MC_allGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
     if(kGCplotMCallGammaPt == kTRUE){ histograms->AddHistogram("MC_allGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
@@ -1495,11 +1526,15 @@ void AddHistograms(AliGammaConversionHistograms *histograms){
     if(kGCplotESDEPt == kTRUE){ histograms->AddHistogram("ESD_E_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
     if(kGCplotESDEEta == kTRUE){ histograms->AddHistogram("ESD_E_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
     if(kGCplotESDEPhi == kTRUE){ histograms->AddHistogram("ESD_E_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
+    if(kGCplotESDENTPCClusters == kTRUE){ histograms->AddHistogram("ESD_E_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
+    if(kGCplotESDENITSClusters == kTRUE){ histograms->AddHistogram("ESD_E_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
                
     if(kGCplotESDPEnergy == kTRUE){ histograms->AddHistogram("ESD_P_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
     if(kGCplotESDPPt == kTRUE){ histograms->AddHistogram("ESD_P_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
     if(kGCplotESDPEta == kTRUE){ histograms->AddHistogram("ESD_P_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
     if(kGCplotESDPPhi == kTRUE){ histograms->AddHistogram("ESD_P_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
+    if(kGCplotESDPNTPCClusters == kTRUE){ histograms->AddHistogram("ESD_P_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
+    if(kGCplotESDPNITSClusters == kTRUE){ histograms->AddHistogram("ESD_P_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNTPCClusters, kGClastXBinNITSClusters, "", "");}
                
     if(kGCplotESDConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
     if(kGCplotESDConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
@@ -1666,9 +1701,9 @@ void AddHistograms(AliGammaConversionHistograms *histograms){
     if(kGCplotResolutionESDR == kTRUE){histograms->AddHistogram("Resolution_ESD_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
     if(kGCplotResolutionESDZ == kTRUE){histograms->AddHistogram("Resolution_ESD_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
                
-    if(kGCplotESDNumberOfV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfV0s","Number of v0s",100, 0, 100,"","");}
-    if(kGCplotESDNumberOfSurvivingV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfSurvivingV0s","Number of surviving v0s",100, 0, 100,"","");}
-    if(kGCplotESDNumberOfContributorsVtx == kTRUE){histograms->AddHistogram("ESD_NumberOfContributorsVtx","Number of contributors to vertex",100, 0, 100,"","");}
+    if(kGCplotESDNumberOfV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfV0s","Number of v0s",100, -0.5, 99.5,"","");}
+    if(kGCplotESDNumberOfSurvivingV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfSurvivingV0s","Number of surviving v0s",100, -0.5, 99.5,"","");}
+    if(kGCplotESDNumberOfContributorsVtx == kTRUE){histograms->AddHistogram("ESD_NumberOfContributorsVtx","Number of contributors to vertex",100, -0.5, 99.5,"","");}
     if(kGCplotESDNumberOfGoodESDTracks == kTRUE){histograms->AddHistogram("ESD_NumberOfGoodESDTracks","Number of Good ESD tracks",100, -0.5, 99.5,"","");}
                
     //  debug histograms
@@ -1688,8 +1723,10 @@ void AddHistograms(AliGammaConversionHistograms *histograms){
     if(kGCplotESDCutEta == kTRUE){histograms->AddHistogram("ESD_CutEta_InvMass" ,"Above #eta max" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
     if(kGCplotESDCutPt == kTRUE){histograms->AddHistogram("ESD_CutPt_InvMass" ,"Below p_{t} min" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
     if(kGCplotESDCutLine == kTRUE){histograms->AddHistogram("ESD_CutLine_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
+    if(kGCplotESDCutZ == kTRUE){histograms->AddHistogram("ESD_CutZ_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
     if(kGCplotESDGoodV0s == kTRUE){histograms->AddHistogram("ESD_GoodV0s_InvMass" ,"Good V0s" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
     if(kGCplotESDAllV0s == kTRUE){histograms->AddHistogram("ESD_AllV0s_InvMass" ,"All V0s" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
+    if(kGCplotESDAllV0s == kTRUE){histograms->AddHistogram("ESD_AllV0sCurrentFinder_InvMass" ,"All V0s Current Finder" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
 
     if(kGCplotESDTrueConvGammaTrackLength == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLength","Track length of TrueConvGamma",kGCnXBinsTrackLength,kGCfirstXBinTrackLength,kGClastXBinTrackLength,"","");}
     if(kGCplotESDTrueConvGammaTrackLengthVSInvMass == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLengthVSInvMass","Track length of TrueConvGamma vs Inv mass",kGCnXBinsTrackLength,kGCfirstXBinTrackLength,kGClastXBinTrackLength,kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,"","");}
@@ -1698,24 +1735,26 @@ void AddHistograms(AliGammaConversionHistograms *histograms){
     if(kGCplotPi0Spectra == kTRUE){
       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
       histograms->AddHistogram("ESD_Mother_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
-
-      if(kGCdoNeutralMesonV0MCCheck == kTRUE){
-       histograms->AddHistogram("ESD_Mother_InvMass_1212","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
-       histograms->AddHistogram("ESD_Mother_InvMass_0912","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
-       histograms->AddHistogram("ESD_Mother_InvMass_0909","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
+      histograms->AddHistogram("ESD_Mother_InvMass_1212","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
+      histograms->AddHistogram("ESD_Mother_InvMass_0912","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
+      histograms->AddHistogram("ESD_Mother_InvMass_0909","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
+      histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt1212" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+      histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt0912" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+      histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt0909" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+
+      //      if(kGCdoNeutralMesonV0MCCheck == kTRUE){
+       histograms->AddHistogram("ESD_TruePi0_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
        histograms->AddHistogram("ESD_TruePi0_InvMass_1212","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
        histograms->AddHistogram("ESD_TruePi0_InvMass_0912","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
        histograms->AddHistogram("ESD_TruePi0_InvMass_0909","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
        histograms->AddHistogram("ESD_TruePi0_OpeningAngle_1212" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");
        histograms->AddHistogram("ESD_TruePi0_OpeningAngle_0912" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");
        histograms->AddHistogram("ESD_TruePi0_OpeningAngle_0909" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");
+       histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
        histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt1212" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
        histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt0912" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
        histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt0909" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
-       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt1212" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
-       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt0912" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
-       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt0909" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
-      }
+       //}
 
       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_Fiducial" ,"Invariant Mass vs Pt |eta|<0.9" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
       histograms->AddHistogram("ESD_Mother_InvMass_Fiducial","Invariant mass |eta|<0.9",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");