]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGJE/StrangenessInJets/AliAnalysisTaskJetChem.cxx
propagate constituents info for subtracted jets
[u/mrichter/AliRoot.git] / PWGJE / StrangenessInJets / AliAnalysisTaskJetChem.cxx
index 23d4d474527496e3632682ec7cc473ad2b927c72..0b436825d3d308c50805c5eff578eb1ca1b7f46f 100644 (file)
@@ -1,4 +1,4 @@
- /*************************************************************************
+/*************************************************************************
  *                                                                       *
  *                                                                       *
  *      Task for Jet Chemistry Analysis in PWG4 Jet Task Force Train     *
@@ -21,6 +21,8 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
+//Task for K0s, Lambda and Antilambda analysis in jets
+//Author: Alice Zimmermann (zimmermann@physi.uni-heidelberg.de)
   
 
 /* $Id: */
 #include "AliVEvent.h"
 #include "AliAODMCParticle.h"
 #include "TVector3.h"
-#include "TRandom.h"
+#include "TRandom3.h"
 
 ClassImp(AliAnalysisTaskJetChem)
 
 //____________________________________________________________________________
 AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    : AliAnalysisTaskFragmentationFunction()
-
+   ,fRandom(0)
    ,fAnalysisMC(0)
    ,fDeltaVertexZ(0)
+   ,fCutjetEta(0)
    ,fCuttrackNegNcls(0)
    ,fCuttrackPosNcls(0)
    ,fCutPostrackRap(0)
@@ -94,8 +98,6 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fCutNegtrackEta(0)
    ,fCutEta(0)
    ,fCutV0cosPointAngle(0)
-   ,fCutChi2PosDaughter(0)
-   ,fCutChi2NegDaughter(0)
    ,fKinkDaughters(0)
    ,fRequireTPCRefit(0)
    ,fCutArmenteros(0)
@@ -111,21 +113,32 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fCutRatio(0)
    ,fK0Type(0)  
    ,fFilterMaskK0(0)
+   ,jettracklist(0)
+   ,jetConeK0list(0)
+   ,jetConeLalist(0)
+   ,jetConeALalist(0)
+   ,jetPerpConeK0list(0)
+   ,jetPerpConeLalist(0)
+   ,jetPerpConeALalist(0)
+   ,jetMedianConeK0list(0)
+   ,jetMedianConeLalist(0)
+   ,jetMedianConeALalist(0)
+   ,fListK0sRC(0)
+   ,fListLaRC(0)
+   ,fListALaRC(0)
    ,fListK0s(0)
    ,fPIDResponse(0)
    ,fV0QAK0(0)
    ,fFFHistosRecCutsK0Evt(0)      
-   ,fFFHistosIMK0AllEvt(0)        
-   ,fFFHistosIMK0Jet(0)           
-   ,fFFHistosIMK0Cone(0)
-   ,fFFHistosPhiCorrIMK0(0)
+  //,fFFHistosIMK0AllEvt(0)        
+  //,fFFHistosIMK0Jet(0)           
+  //,fFFHistosIMK0Cone(0)
    ,fLaType(0) 
    ,fFilterMaskLa(0)
    ,fListLa(0)
-   ,fFFHistosIMLaAllEvt(0)        
-   ,fFFHistosIMLaJet(0)           
-   ,fFFHistosIMLaCone(0)
-   ,fFFHistosPhiCorrIMLa(0)
+  // ,fFFHistosIMLaAllEvt(0)        
+  // ,fFFHistosIMLaJet(0)           
+  //,fFFHistosIMLaCone(0)
    ,fALaType(0) 
    ,fFilterMaskALa(0)
    ,fListALa(0)
@@ -140,10 +153,9 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fListMCgenLaCone(0)
    ,fListMCgenALaCone(0)
    ,IsArmenterosSelected(0)
-   ,fFFHistosIMALaAllEvt(0)        
-   ,fFFHistosIMALaJet(0)           
-   ,fFFHistosIMALaCone(0)
-   ,fFFHistosPhiCorrIMALa(0)
+  // ,fFFHistosIMALaAllEvt(0)        
+  // ,fFFHistosIMALaJet(0)           
+  // ,fFFHistosIMALaCone(0)
    ,fFFIMNBinsJetPt(0)  
    ,fFFIMJetPtMin(0) 
    ,fFFIMJetPtMax(0)
@@ -174,24 +186,6 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fFFIMLaNBinsZ(0)       
    ,fFFIMLaZMin(0)         
    ,fFFIMLaZMax(0)
-   ,fPhiCorrIMNBinsPt(0)  
-   ,fPhiCorrIMPtMin(0)
-   ,fPhiCorrIMPtMax(0)
-   ,fPhiCorrIMNBinsPhi(0)
-   ,fPhiCorrIMPhiMin(0)
-   ,fPhiCorrIMPhiMax(0)
-   ,fPhiCorrIMNBinsInvM(0)
-   ,fPhiCorrIMInvMMin(0)
-   ,fPhiCorrIMInvMMax(0)
-   ,fPhiCorrIMLaNBinsPt(0)  
-   ,fPhiCorrIMLaPtMin(0)
-   ,fPhiCorrIMLaPtMax(0)
-   ,fPhiCorrIMLaNBinsPhi(0)
-   ,fPhiCorrIMLaPhiMin(0)
-   ,fPhiCorrIMLaPhiMax(0)
-   ,fPhiCorrIMLaNBinsInvM(0)
-   ,fPhiCorrIMLaInvMMin(0)
-   ,fPhiCorrIMLaInvMMax(0)
    ,fh1EvtAllCent(0)
    ,fh1Evt(0)
    ,fh1K0Mult(0)
@@ -203,36 +197,32 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fh1JetEta(0)         
    ,fh1JetPhi(0)                 
    ,fh2JetEtaPhi(0)
-   ,fh1V0JetPt(0)
+  //,fh1V0JetPt(0)
+   ,fh1IMK0Cone(0)
+   ,fh1IMLaCone(0)
+   ,fh1IMALaCone(0) 
    ,fh2FFJetTrackEta(0)
-   ,fh1trackPosNCls(0)           
-   ,fh1trackNegNCls(0)   
+  //,fh1trackPosNCls(0)           
+  //,fh1trackNegNCls(0)   
    ,fh1trackPosRap(0)            
    ,fh1trackNegRap(0)          
-   ,fh1V0Rap(0)        
+  //,fh1V0Rap(0)        
    ,fh1trackPosEta(0)            
    ,fh1trackNegEta(0)          
    ,fh1V0Eta(0)
-   ,fh1V0totMom(0)           
-   ,fh1CosPointAngle(0)        
-   ,fh1Chi2Pos(0)                 
-   ,fh1Chi2Neg(0)   
+  //,fh1V0totMom(0)           
+   ,fh1CosPointAngle(0)           
    ,fh1DecayLengthV0(0)    
    ,fh2ProperLifetimeK0sVsPtBeforeCut(0)    
    ,fh2ProperLifetimeK0sVsPtAfterCut(0)
-   ,fh1ProperLifetimeV0BeforeCut(0) 
-   ,fh1ProperLifetimeV0AfterCut(0) 
    ,fh1V0Radius(0)     
    ,fh1DcaV0Daughters(0)        
    ,fh1DcaPosToPrimVertex(0)   
    ,fh1DcaNegToPrimVertex(0)    
    ,fh2ArmenterosBeforeCuts(0)
    ,fh2ArmenterosAfterCuts(0)
-   ,fh2BB3SigProton(0)
    ,fh2BBLaPos(0)
    ,fh2BBLaNeg(0)
-   ,fh1CrossedRowsOverFindableNeg(0)
-   ,fh1CrossedRowsOverFindablePos(0)
    ,fh1PosDaughterCharge(0)
    ,fh1NegDaughterCharge(0)
    ,fh1PtMCK0s(0)
@@ -241,43 +231,85 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fh1EtaK0s(0)
    ,fh1EtaLa(0)
    ,fh1EtaALa(0)
-   ,fh3InvMassEtaTrackPtK0s(0)
-   ,fh3InvMassEtaTrackPtLa(0)
-   ,fh3InvMassEtaTrackPtALa(0)
-   ,fh1noAssociatedK0s(0)
+   ,fh1RC(0)
+   ,fh1RCBiasK0(0)
+   ,fh1RCBiasLa(0)
+   ,fh1RCBiasALa(0)
+   ,fh1MCC(0)
+   ,fh1OC(0)
+   ,fh1NJ(0)
+   ,fhnInvMassEtaTrackPtK0s(0)
+   ,fhnInvMassEtaTrackPtLa(0)
+   ,fhnInvMassEtaTrackPtALa(0)
    ,fh1TrackMultCone(0)
-   ,fh2TrackMultCone(0) 
-   ,fh2MCgenK0Cone(0)
-   ,fh2MCgenLaCone(0)
-   ,fh2MCgenALaCone(0) 
-   ,fh2MCEtagenK0Cone(0)
-   ,fh2MCEtagenLaCone(0)
-   ,fh2MCEtagenALaCone(0)
-   ,fh1FFIMK0ConeSmear(0)
-   ,fh1FFIMLaConeSmear(0)
-   ,fh1FFIMALaConeSmear(0)
-   ,fh3MCrecK0Cone(0)   
-   ,fh3MCrecLaCone(0)   
-   ,fh3MCrecALaCone(0)
-   ,fh3MCrecK0ConeSmear(0) 
-   ,fh3MCrecLaConeSmear(0)   
-   ,fh3MCrecALaConeSmear(0)
-   ,fh3SecContinCone(0)
-   ,fh3StrContinCone(0)
-   ,fh3IMK0PerpCone(0)
-   ,fh3IMLaPerpCone(0)
-   ,fh3IMALaPerpCone(0)
-   ,fh3IMK0MedianCone(0)
-   ,fh3IMLaMedianCone(0)
-   ,fh3IMALaMedianCone(0)
+   ,fh2TrackMultCone(0)
+   ,fhnNJK0(0)
+   ,fhnNJLa(0)
+   ,fhnNJALa(0)
+  // ,fh2MCgenK0Cone(0)
+  // ,fh2MCgenLaCone(0)
+  // ,fh2MCgenALaCone(0) 
+  // ,fh2MCEtagenK0Cone(0)
+  // ,fh2MCEtagenLaCone(0)
+  // ,fh2MCEtagenALaCone(0)
+   ,fh2CorrHijingLaProton(0)
+   ,fh2CorrInjectLaProton(0)
+   ,fh2CorrHijingALaAProton(0)
+   ,fh2CorrInjectALaAProton(0)
+   ,fh1IMK0ConeSmear(0)
+   ,fh1IMLaConeSmear(0)
+   ,fh1IMALaConeSmear(0)
+   ,fh2MCEtaVsPtHijingLa(0)
+   ,fh2MCEtaVsPtInjectLa(0)
+   ,fh2MCEtaVsPtHijingALa(0)
+   ,fh2MCEtaVsPtInjectALa(0)
+   ,fhnrecMCHijingLaIncl(0)
+   ,fhnrecMCHijingLaCone(0)
+   ,fhnrecMCHijingALaIncl(0)
+   ,fhnrecMCHijingALaCone(0)
+   ,fhnrecMCInjectLaIncl(0)
+   ,fhnrecMCInjectLaCone(0)
+   ,fhnrecMCInjectALaIncl(0)
+   ,fhnrecMCInjectALaCone(0)
+   ,fhnMCrecK0Cone(0)   
+   ,fhnMCrecLaCone(0)   
+   ,fhnMCrecALaCone(0)
+   ,fhnMCrecK0ConeSmear(0) 
+   ,fhnMCrecLaConeSmear(0)   
+   ,fhnMCrecALaConeSmear(0)
+   ,fhnK0sSecContinCone(0)
+   ,fhnLaSecContinCone(0)
+   ,fhnALaSecContinCone(0)
+   ,fhnK0sIncl(0)
+   ,fhnK0sCone(0)
+   ,fhnLaIncl(0)
+   ,fhnLaCone(0)
+   ,fhnALaIncl(0)
+   ,fhnALaCone(0)
+   ,fhnK0sPC(0)
+   ,fhnLaPC(0)
+   ,fhnALaPC(0)
+   ,fhnK0sMCC(0)
+   ,fhnLaMCC(0)
+   ,fhnALaMCC(0)
+   ,fhnK0sRC(0)
+   ,fhnLaRC(0)
+   ,fhnALaRC(0)
+   ,fhnK0sRCBias(0)
+   ,fhnLaRCBias(0)
+   ,fhnALaRCBias(0)
+   ,fhnK0sOC(0)
+   ,fhnLaOC(0)
+   ,fhnALaOC(0)
+   ,fh1AreaExcluded(0)
+   ,fh1MedianEta(0)
+   ,fh1JetPtMedian(0)
    ,fh1MCMultiplicityPrimary(0)
    ,fh1MCMultiplicityTracks(0)
-   ,fh1MCmotherLa(0)
-   ,fh1MCmotherALa(0)
-   ,fh3FeedDownLa(0)
-   ,fh3FeedDownALa(0)
-   ,fh3FeedDownLaCone(0)
-   ,fh3FeedDownALaCone(0)
+   ,fhnFeedDownLa(0)
+   ,fhnFeedDownALa(0)
+   ,fhnFeedDownLaCone(0)
+   ,fhnFeedDownALaCone(0)
    ,fh1MCProdRadiusK0s(0)
    ,fh1MCProdRadiusLambda(0)
    ,fh1MCProdRadiusAntiLambda(0)
@@ -290,9 +322,9 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
    ,fh2MCEtaVsPtK0s(0)
    ,fh2MCEtaVsPtLa(0)
    ,fh2MCEtaVsPtALa(0)
-   ,fh1MCRapK0s(0) 
-   ,fh1MCRapLambda(0)
-   ,fh1MCRapAntiLambda(0)
+  //,fh1MCRapK0s(0) 
+  //,fh1MCRapLambda(0)
+  //,fh1MCRapAntiLambda(0)
    ,fh1MCEtaAllK0s(0) 
    ,fh1MCEtaK0s(0) 
    ,fh1MCEtaLambda(0)
@@ -306,8 +338,10 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem()
 AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name) 
   : AliAnalysisTaskFragmentationFunction(name)
 
+  ,fRandom(0)
   ,fAnalysisMC(0)
   ,fDeltaVertexZ(0)
+  ,fCutjetEta(0)
   ,fCuttrackNegNcls(0)
   ,fCuttrackPosNcls(0)
   ,fCutPostrackRap(0)
@@ -317,8 +351,6 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fCutNegtrackEta(0)
   ,fCutEta(0)
   ,fCutV0cosPointAngle(0)
-  ,fCutChi2PosDaughter(0)
-  ,fCutChi2NegDaughter(0)
   ,fKinkDaughters(0)
   ,fRequireTPCRefit(0)
   ,fCutArmenteros(0)
@@ -334,21 +366,32 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fCutRatio(0)  
   ,fK0Type(0)  
   ,fFilterMaskK0(0)
+  ,jettracklist(0)
+  ,jetConeK0list(0)
+  ,jetConeLalist(0)
+  ,jetConeALalist(0)
+  ,jetPerpConeK0list(0)
+  ,jetPerpConeLalist(0)
+  ,jetPerpConeALalist(0)
+  ,jetMedianConeK0list(0)
+  ,jetMedianConeLalist(0)
+  ,jetMedianConeALalist(0)
+  ,fListK0sRC(0)
+  ,fListLaRC(0)
+  ,fListALaRC(0)
   ,fListK0s(0)
   ,fPIDResponse(0)
   ,fV0QAK0(0)
   ,fFFHistosRecCutsK0Evt(0)      
-  ,fFFHistosIMK0AllEvt(0)        
-  ,fFFHistosIMK0Jet(0)           
-  ,fFFHistosIMK0Cone(0)
-  ,fFFHistosPhiCorrIMK0(0)
+    //,fFFHistosIMK0AllEvt(0)        
+    //,fFFHistosIMK0Jet(0)           
+    //,fFFHistosIMK0Cone(0)
   ,fLaType(0)  
   ,fFilterMaskLa(0)
   ,fListLa(0)
-  ,fFFHistosIMLaAllEvt(0)        
-  ,fFFHistosIMLaJet(0)           
-  ,fFFHistosIMLaCone(0)
-  ,fFFHistosPhiCorrIMLa(0)
+    //,fFFHistosIMLaAllEvt(0)        
+    //,fFFHistosIMLaJet(0)           
+    //,fFFHistosIMLaCone(0)
   ,fALaType(0)  
   ,fFilterMaskALa(0)
   ,fListALa(0)
@@ -363,10 +406,9 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fListMCgenLaCone(0)
   ,fListMCgenALaCone(0)
   ,IsArmenterosSelected(0)
-  ,fFFHistosIMALaAllEvt(0)        
-  ,fFFHistosIMALaJet(0)           
-  ,fFFHistosIMALaCone(0)
-  ,fFFHistosPhiCorrIMALa(0)
+    //,fFFHistosIMALaAllEvt(0)        
+    //,fFFHistosIMALaJet(0)           
+    // ,fFFHistosIMALaCone(0)
   ,fFFIMNBinsJetPt(0)    
   ,fFFIMJetPtMin(0) 
   ,fFFIMJetPtMax(0)
@@ -397,24 +439,6 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fFFIMLaNBinsZ(0)       
   ,fFFIMLaZMin(0)         
   ,fFFIMLaZMax(0)
-  ,fPhiCorrIMNBinsPt(0)   
-  ,fPhiCorrIMPtMin(0)
-  ,fPhiCorrIMPtMax(0)
-  ,fPhiCorrIMNBinsPhi(0)
-  ,fPhiCorrIMPhiMin(0)
-  ,fPhiCorrIMPhiMax(0)
-  ,fPhiCorrIMNBinsInvM(0)
-  ,fPhiCorrIMInvMMin(0)
-  ,fPhiCorrIMInvMMax(0)
-  ,fPhiCorrIMLaNBinsPt(0)   
-  ,fPhiCorrIMLaPtMin(0)
-  ,fPhiCorrIMLaPtMax(0)
-  ,fPhiCorrIMLaNBinsPhi(0)
-  ,fPhiCorrIMLaPhiMin(0)
-  ,fPhiCorrIMLaPhiMax(0)
-  ,fPhiCorrIMLaNBinsInvM(0)
-  ,fPhiCorrIMLaInvMMin(0)
-  ,fPhiCorrIMLaInvMMax(0)
   ,fh1EvtAllCent(0)
   ,fh1Evt(0)
   ,fh1K0Mult(0)
@@ -426,36 +450,32 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fh1JetEta(0)         
   ,fh1JetPhi(0)                 
   ,fh2JetEtaPhi(0)
-  ,fh1V0JetPt(0)
+    //  ,fh1V0JetPt(0)
+  ,fh1IMK0Cone(0)
+  ,fh1IMLaCone(0)
+  ,fh1IMALaCone(0)
   ,fh2FFJetTrackEta(0)  
-  ,fh1trackPosNCls(0)           
-  ,fh1trackNegNCls(0) 
+    //  ,fh1trackPosNCls(0)           
+    // ,fh1trackNegNCls(0) 
   ,fh1trackPosRap(0)            
   ,fh1trackNegRap(0)          
-  ,fh1V0Rap(0)          
+    //,fh1V0Rap(0)          
   ,fh1trackPosEta(0)            
   ,fh1trackNegEta(0)          
   ,fh1V0Eta(0)  
-  ,fh1V0totMom(0)            
+    // ,fh1V0totMom(0)            
   ,fh1CosPointAngle(0)        
-  ,fh1Chi2Pos(0)                 
-  ,fh1Chi2Neg(0) 
   ,fh1DecayLengthV0(0) 
   ,fh2ProperLifetimeK0sVsPtBeforeCut(0)  
   ,fh2ProperLifetimeK0sVsPtAfterCut(0)            
-  ,fh1ProperLifetimeV0BeforeCut(0)  
-  ,fh1ProperLifetimeV0AfterCut(0)  
   ,fh1V0Radius(0)       
   ,fh1DcaV0Daughters(0)        
   ,fh1DcaPosToPrimVertex(0)   
   ,fh1DcaNegToPrimVertex(0)    
   ,fh2ArmenterosBeforeCuts(0)
   ,fh2ArmenterosAfterCuts(0)
-  ,fh2BB3SigProton(0)
   ,fh2BBLaPos(0)
   ,fh2BBLaNeg(0)
-  ,fh1CrossedRowsOverFindableNeg(0)
-  ,fh1CrossedRowsOverFindablePos(0)
   ,fh1PosDaughterCharge(0)
   ,fh1NegDaughterCharge(0)
   ,fh1PtMCK0s(0)
@@ -464,43 +484,85 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fh1EtaK0s(0)
   ,fh1EtaLa(0)
   ,fh1EtaALa(0)
-  ,fh3InvMassEtaTrackPtK0s(0)
-  ,fh3InvMassEtaTrackPtLa(0)
-  ,fh3InvMassEtaTrackPtALa(0)
-  ,fh1noAssociatedK0s(0)
+  ,fh1RC(0)
+  ,fh1RCBiasK0(0)
+  ,fh1RCBiasLa(0)
+  ,fh1RCBiasALa(0)
+  ,fh1MCC(0)
+  ,fh1OC(0)
+  ,fh1NJ(0)
+  ,fhnInvMassEtaTrackPtK0s(0)
+  ,fhnInvMassEtaTrackPtLa(0)
+  ,fhnInvMassEtaTrackPtALa(0)
   ,fh1TrackMultCone(0)
   ,fh2TrackMultCone(0)
-  ,fh2MCgenK0Cone(0)
-  ,fh2MCgenLaCone(0)
-  ,fh2MCgenALaCone(0)
-  ,fh2MCEtagenK0Cone(0)
-  ,fh2MCEtagenLaCone(0)
-  ,fh2MCEtagenALaCone(0)
-  ,fh1FFIMK0ConeSmear(0)
-  ,fh1FFIMLaConeSmear(0)
-  ,fh1FFIMALaConeSmear(0)
-  ,fh3MCrecK0Cone(0)
-  ,fh3MCrecLaCone(0)
-  ,fh3MCrecALaCone(0) 
-  ,fh3MCrecK0ConeSmear(0) 
-  ,fh3MCrecLaConeSmear(0)   
-  ,fh3MCrecALaConeSmear(0)
-  ,fh3SecContinCone(0)
-  ,fh3StrContinCone(0)
-  ,fh3IMK0PerpCone(0)
-  ,fh3IMLaPerpCone(0)
-  ,fh3IMALaPerpCone(0)
-  ,fh3IMK0MedianCone(0)
-  ,fh3IMLaMedianCone(0)
-  ,fh3IMALaMedianCone(0)
+  ,fhnNJK0(0)
+  ,fhnNJLa(0)
+  ,fhnNJALa(0)
+    //,fh2MCgenK0Cone(0)
+    //,fh2MCgenLaCone(0)
+    //,fh2MCgenALaCone(0)
+    //,fh2MCEtagenK0Cone(0)
+    //,fh2MCEtagenLaCone(0)
+    //,fh2MCEtagenALaCone(0)
+  ,fh2CorrHijingLaProton(0)
+  ,fh2CorrInjectLaProton(0)
+  ,fh2CorrHijingALaAProton(0)
+  ,fh2CorrInjectALaAProton(0)
+  ,fh1IMK0ConeSmear(0)
+  ,fh1IMLaConeSmear(0)
+  ,fh1IMALaConeSmear(0) 
+  ,fh2MCEtaVsPtHijingLa(0)
+  ,fh2MCEtaVsPtInjectLa(0)
+  ,fh2MCEtaVsPtHijingALa(0)
+  ,fh2MCEtaVsPtInjectALa(0) 
+  ,fhnrecMCHijingLaIncl(0)
+  ,fhnrecMCHijingLaCone(0)
+  ,fhnrecMCHijingALaIncl(0)
+  ,fhnrecMCHijingALaCone(0)
+  ,fhnrecMCInjectLaIncl(0)
+  ,fhnrecMCInjectLaCone(0)
+  ,fhnrecMCInjectALaIncl(0)
+  ,fhnrecMCInjectALaCone(0)
+  ,fhnMCrecK0Cone(0)
+  ,fhnMCrecLaCone(0)
+  ,fhnMCrecALaCone(0) 
+  ,fhnMCrecK0ConeSmear(0) 
+  ,fhnMCrecLaConeSmear(0)   
+  ,fhnMCrecALaConeSmear(0)
+  ,fhnK0sSecContinCone(0)
+  ,fhnLaSecContinCone(0)
+  ,fhnALaSecContinCone(0)
+  ,fhnK0sIncl(0)
+  ,fhnK0sCone(0)
+  ,fhnLaIncl(0)
+  ,fhnLaCone(0)
+  ,fhnALaIncl(0)
+  ,fhnALaCone(0)
+  ,fhnK0sPC(0)
+  ,fhnLaPC(0)
+  ,fhnALaPC(0)
+  ,fhnK0sMCC(0)
+  ,fhnLaMCC(0)
+  ,fhnALaMCC(0)
+  ,fhnK0sRC(0)
+  ,fhnLaRC(0)
+  ,fhnALaRC(0)
+  ,fhnK0sRCBias(0)
+  ,fhnLaRCBias(0)
+  ,fhnALaRCBias(0)
+  ,fhnK0sOC(0)
+  ,fhnLaOC(0)
+  ,fhnALaOC(0)
+  ,fh1AreaExcluded(0)
+  ,fh1MedianEta(0)
+  ,fh1JetPtMedian(0)
   ,fh1MCMultiplicityPrimary(0)
   ,fh1MCMultiplicityTracks(0)
-  ,fh1MCmotherLa(0)
-  ,fh1MCmotherALa(0)
-  ,fh3FeedDownLa(0)
-  ,fh3FeedDownALa(0)
-  ,fh3FeedDownLaCone(0)
-  ,fh3FeedDownALaCone(0)
+  ,fhnFeedDownLa(0)
+  ,fhnFeedDownALa(0)
+  ,fhnFeedDownLaCone(0)
+  ,fhnFeedDownALaCone(0)
   ,fh1MCProdRadiusK0s(0)
   ,fh1MCProdRadiusLambda(0)
   ,fh1MCProdRadiusAntiLambda(0)
@@ -513,9 +575,9 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
   ,fh2MCEtaVsPtK0s(0)
   ,fh2MCEtaVsPtLa(0)
   ,fh2MCEtaVsPtALa(0)
-  ,fh1MCRapK0s(0) 
-  ,fh1MCRapLambda(0)
-  ,fh1MCRapAntiLambda(0)
+    //,fh1MCRapK0s(0) 
+    //,fh1MCRapLambda(0)
+    //,fh1MCRapAntiLambda(0)
   ,fh1MCEtaAllK0s(0) 
   ,fh1MCEtaK0s(0) 
   ,fh1MCEtaLambda(0)
@@ -532,8 +594,10 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const char *name)
 AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &copy)
   : AliAnalysisTaskFragmentationFunction()
   
+  ,fRandom(copy.fRandom)
   ,fAnalysisMC(copy.fAnalysisMC)
   ,fDeltaVertexZ(copy.fDeltaVertexZ)
+  ,fCutjetEta(copy.fCutjetEta)
   ,fCuttrackNegNcls(copy.fCuttrackNegNcls)
   ,fCuttrackPosNcls(copy.fCuttrackPosNcls)
   ,fCutPostrackRap(copy.fCutPostrackRap)
@@ -543,8 +607,6 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fCutNegtrackEta(copy.fCutNegtrackEta)
   ,fCutEta(copy.fCutEta)
   ,fCutV0cosPointAngle(copy.fCutV0cosPointAngle)
-  ,fCutChi2PosDaughter(copy.fCutChi2PosDaughter)
-  ,fCutChi2NegDaughter(copy.fCutChi2NegDaughter)
   ,fKinkDaughters(copy.fKinkDaughters)
   ,fRequireTPCRefit(copy.fRequireTPCRefit)
   ,fCutArmenteros(copy.fCutArmenteros)
@@ -560,21 +622,32 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fCutRatio(copy.fCutRatio)
   ,fK0Type(copy.fK0Type)              
   ,fFilterMaskK0(copy.fFilterMaskK0)
+  ,jettracklist(copy.jettracklist)
+  ,jetConeK0list(copy.jetConeK0list)
+  ,jetConeLalist(copy.jetConeLalist)
+  ,jetConeALalist(copy.jetConeALalist)
+  ,jetPerpConeK0list(copy.jetPerpConeK0list)
+  ,jetPerpConeLalist(copy.jetPerpConeLalist)
+  ,jetPerpConeALalist(copy.jetPerpConeALalist)
+  ,jetMedianConeK0list(copy.jetMedianConeK0list)
+  ,jetMedianConeLalist(copy.jetMedianConeLalist)
+  ,jetMedianConeALalist(copy.jetMedianConeALalist)
+  ,fListK0sRC(copy.fListK0sRC)
+  ,fListLaRC(copy.fListLaRC)
+  ,fListALaRC(copy.fListALaRC)
   ,fListK0s(copy.fListK0s)
   ,fPIDResponse(copy.fPIDResponse)
   ,fV0QAK0(copy.fV0QAK0)
   ,fFFHistosRecCutsK0Evt(copy.fFFHistosRecCutsK0Evt)      
-  ,fFFHistosIMK0AllEvt(copy.fFFHistosIMK0AllEvt)        
-  ,fFFHistosIMK0Jet(copy.fFFHistosIMK0Jet)           
-  ,fFFHistosIMK0Cone(copy.fFFHistosIMK0Cone)          
-  ,fFFHistosPhiCorrIMK0(copy.fFFHistosPhiCorrIMK0)     
+    //,fFFHistosIMK0AllEvt(copy.fFFHistosIMK0AllEvt)        
+    //,fFFHistosIMK0Jet(copy.fFFHistosIMK0Jet)           
+    //,fFFHistosIMK0Cone(copy.fFFHistosIMK0Cone)          
   ,fLaType(copy.fLaType)                  
   ,fFilterMaskLa(copy.fFilterMaskLa)
   ,fListLa(copy.fListLa)
-  ,fFFHistosIMLaAllEvt(copy.fFFHistosIMLaAllEvt)        
-  ,fFFHistosIMLaJet(copy.fFFHistosIMLaJet)           
-  ,fFFHistosIMLaCone(copy.fFFHistosIMLaCone)          
-  ,fFFHistosPhiCorrIMLa(copy.fFFHistosPhiCorrIMLa) 
+    //,fFFHistosIMLaAllEvt(copy.fFFHistosIMLaAllEvt)        
+    //,fFFHistosIMLaJet(copy.fFFHistosIMLaJet)           
+    //,fFFHistosIMLaCone(copy.fFFHistosIMLaCone)          
   ,fALaType(copy.fALaType)                 
   ,fFilterMaskALa(copy.fFilterMaskALa)
   ,fListALa(copy.fListALa)
@@ -589,10 +662,9 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fListMCgenLaCone(copy.fListMCgenLaCone)
   ,fListMCgenALaCone(copy.fListMCgenALaCone)
   ,IsArmenterosSelected(copy.IsArmenterosSelected)
-  ,fFFHistosIMALaAllEvt(copy.fFFHistosIMALaAllEvt)        
-  ,fFFHistosIMALaJet(copy.fFFHistosIMALaJet)           
-  ,fFFHistosIMALaCone(copy.fFFHistosIMALaCone)          
-  ,fFFHistosPhiCorrIMALa(copy.fFFHistosPhiCorrIMALa) 
+    //,fFFHistosIMALaAllEvt(copy.fFFHistosIMALaAllEvt)        
+    //,fFFHistosIMALaJet(copy.fFFHistosIMALaJet)           
+    //,fFFHistosIMALaCone(copy.fFFHistosIMALaCone)          
   ,fFFIMNBinsJetPt(copy.fFFIMNBinsJetPt) 
   ,fFFIMJetPtMin(copy.fFFIMJetPtMin)     
   ,fFFIMJetPtMax(copy.fFFIMJetPtMax)     
@@ -623,24 +695,6 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fFFIMLaNBinsZ(copy.fFFIMLaNBinsZ)       
   ,fFFIMLaZMin(copy.fFFIMLaZMin)         
   ,fFFIMLaZMax(copy.fFFIMLaZMax) 
-  ,fPhiCorrIMNBinsPt(copy.fPhiCorrIMNBinsPt)  
-  ,fPhiCorrIMPtMin(copy.fPhiCorrIMPtMin)
-  ,fPhiCorrIMPtMax(copy.fPhiCorrIMPtMax)
-  ,fPhiCorrIMNBinsPhi(copy.fPhiCorrIMNBinsPhi)
-  ,fPhiCorrIMPhiMin(copy.fPhiCorrIMPhiMin)
-  ,fPhiCorrIMPhiMax(copy.fPhiCorrIMPhiMax)
-  ,fPhiCorrIMNBinsInvM(copy.fPhiCorrIMNBinsInvM)
-  ,fPhiCorrIMInvMMin(copy.fPhiCorrIMInvMMin)
-  ,fPhiCorrIMInvMMax(copy.fPhiCorrIMInvMMax)
-  ,fPhiCorrIMLaNBinsPt(copy.fPhiCorrIMLaNBinsPt)   
-  ,fPhiCorrIMLaPtMin(copy.fPhiCorrIMLaPtMin)
-  ,fPhiCorrIMLaPtMax(copy.fPhiCorrIMLaPtMax)
-  ,fPhiCorrIMLaNBinsPhi(copy.fPhiCorrIMLaNBinsPhi)
-  ,fPhiCorrIMLaPhiMin(copy.fPhiCorrIMLaPhiMin)
-  ,fPhiCorrIMLaPhiMax(copy.fPhiCorrIMLaPhiMax)
-  ,fPhiCorrIMLaNBinsInvM(copy.fPhiCorrIMLaNBinsInvM)
-  ,fPhiCorrIMLaInvMMin(copy.fPhiCorrIMLaInvMMin)
-  ,fPhiCorrIMLaInvMMax(copy.fPhiCorrIMLaInvMMax)
   ,fh1EvtAllCent(copy.fh1EvtAllCent)
   ,fh1Evt(copy.fh1Evt)
   ,fh1K0Mult(copy.fh1K0Mult)
@@ -652,36 +706,32 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fh1JetEta(copy.fh1JetEta)         
   ,fh1JetPhi(copy.fh1JetPhi)                 
   ,fh2JetEtaPhi(copy.fh2JetEtaPhi)
-  ,fh1V0JetPt(copy.fh1V0JetPt)
+    //,fh1V0JetPt(copy.fh1V0JetPt)
+  ,fh1IMK0Cone(copy.fh1IMK0Cone)
+  ,fh1IMLaCone(copy.fh1IMLaCone)
+  ,fh1IMALaCone(copy.fh1IMALaCone)
   ,fh2FFJetTrackEta(copy.fh2FFJetTrackEta) 
-  ,fh1trackPosNCls(copy.fh1trackPosNCls)           
-  ,fh1trackNegNCls(copy.fh1trackNegNCls)
+    //,fh1trackPosNCls(copy.fh1trackPosNCls)           
+    //,fh1trackNegNCls(copy.fh1trackNegNCls)
   ,fh1trackPosRap(copy.fh1trackPosRap)            
   ,fh1trackNegRap(copy.fh1trackNegRap)          
-  ,fh1V0Rap(copy.fh1V0Rap)         
+    //,fh1V0Rap(copy.fh1V0Rap)         
   ,fh1trackPosEta(copy.fh1trackPosEta)            
   ,fh1trackNegEta(copy.fh1trackNegEta)          
   ,fh1V0Eta(copy.fh1V0Eta)   
-  ,fh1V0totMom(copy.fh1V0totMom)           
-  ,fh1CosPointAngle(copy.fh1CosPointAngle)        
-  ,fh1Chi2Pos(copy.fh1Chi2Pos)                 
-  ,fh1Chi2Neg(copy.fh1Chi2Neg)    
+    //,fh1V0totMom(copy.fh1V0totMom)           
+  ,fh1CosPointAngle(copy.fh1CosPointAngle)           
   ,fh1DecayLengthV0(copy.fh1DecayLengthV0)  
   ,fh2ProperLifetimeK0sVsPtBeforeCut(copy.fh2ProperLifetimeK0sVsPtBeforeCut)  
   ,fh2ProperLifetimeK0sVsPtAfterCut(copy.fh2ProperLifetimeK0sVsPtAfterCut)    
-  ,fh1ProperLifetimeV0BeforeCut(copy.fh1ProperLifetimeV0BeforeCut) 
-  ,fh1ProperLifetimeV0AfterCut(copy.fh1ProperLifetimeV0AfterCut) 
   ,fh1V0Radius(copy.fh1V0Radius)          
   ,fh1DcaV0Daughters(copy.fh1DcaV0Daughters)        
   ,fh1DcaPosToPrimVertex(copy.fh1DcaPosToPrimVertex)   
   ,fh1DcaNegToPrimVertex(copy.fh1DcaNegToPrimVertex)    
   ,fh2ArmenterosBeforeCuts(copy.fh2ArmenterosBeforeCuts)
   ,fh2ArmenterosAfterCuts(copy.fh2ArmenterosAfterCuts)
-  ,fh2BB3SigProton(copy.fh2BB3SigProton)
   ,fh2BBLaPos(copy.fh2BBLaPos)
   ,fh2BBLaNeg(copy.fh2BBLaPos)
-  ,fh1CrossedRowsOverFindableNeg(copy.fh1CrossedRowsOverFindableNeg)
-  ,fh1CrossedRowsOverFindablePos(copy.fh1CrossedRowsOverFindablePos)
   ,fh1PosDaughterCharge(copy.fh1PosDaughterCharge)
   ,fh1NegDaughterCharge(copy.fh1NegDaughterCharge)
   ,fh1PtMCK0s(copy.fh1PtMCK0s)
@@ -690,43 +740,85 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fh1EtaK0s(copy.fh1EtaK0s)
   ,fh1EtaLa(copy.fh1EtaLa)
   ,fh1EtaALa(copy.fh1EtaALa)
-  ,fh3InvMassEtaTrackPtK0s(copy.fh3InvMassEtaTrackPtK0s)
-  ,fh3InvMassEtaTrackPtLa(copy.fh3InvMassEtaTrackPtLa)
-  ,fh3InvMassEtaTrackPtALa(copy.fh3InvMassEtaTrackPtALa)
-  ,fh1noAssociatedK0s(copy.fh1noAssociatedK0s)
+  ,fh1RC(copy.fh1RC)
+  ,fh1RCBiasK0(copy.fh1RCBiasK0)
+  ,fh1RCBiasLa(copy.fh1RCBiasLa)
+  ,fh1RCBiasALa(copy.fh1RCBiasALa)
+  ,fh1MCC(copy.fh1MCC)
+  ,fh1OC(copy.fh1OC)
+  ,fh1NJ(copy.fh1NJ)
+  ,fhnInvMassEtaTrackPtK0s(copy.fhnInvMassEtaTrackPtK0s)
+  ,fhnInvMassEtaTrackPtLa(copy.fhnInvMassEtaTrackPtLa)
+  ,fhnInvMassEtaTrackPtALa(copy.fhnInvMassEtaTrackPtALa)
   ,fh1TrackMultCone(copy.fh1TrackMultCone)
   ,fh2TrackMultCone(copy.fh2TrackMultCone)
-  ,fh2MCgenK0Cone(copy.fh2MCgenK0Cone)
-  ,fh2MCgenLaCone(copy.fh2MCgenLaCone)
-  ,fh2MCgenALaCone(copy.fh2MCgenALaCone)
-  ,fh2MCEtagenK0Cone(copy.fh2MCEtagenK0Cone)
-  ,fh2MCEtagenLaCone(copy.fh2MCEtagenLaCone)
-  ,fh2MCEtagenALaCone(copy.fh2MCEtagenALaCone)
-  ,fh1FFIMK0ConeSmear(copy.fh1FFIMK0ConeSmear)
-  ,fh1FFIMLaConeSmear(copy.fh1FFIMLaConeSmear)
-  ,fh1FFIMALaConeSmear(copy.fh1FFIMALaConeSmear)  
-  ,fh3MCrecK0Cone(copy.fh3MCrecK0Cone)
-  ,fh3MCrecLaCone(copy.fh3MCrecLaCone)
-  ,fh3MCrecALaCone(copy.fh3MCrecALaCone) 
-  ,fh3MCrecK0ConeSmear(copy.fh3MCrecK0ConeSmear)
-  ,fh3MCrecLaConeSmear(copy.fh3MCrecLaConeSmear)
-  ,fh3MCrecALaConeSmear(copy.fh3MCrecALaConeSmear)
-  ,fh3SecContinCone(copy.fh3SecContinCone)
-  ,fh3StrContinCone(copy.fh3StrContinCone)
-  ,fh3IMK0PerpCone(copy.fh3IMK0PerpCone)
-  ,fh3IMLaPerpCone(copy.fh3IMLaPerpCone)
-  ,fh3IMALaPerpCone(copy.fh3IMALaPerpCone)  
-  ,fh3IMK0MedianCone(copy.fh3IMK0MedianCone)
-  ,fh3IMLaMedianCone(copy.fh3IMLaMedianCone)
-  ,fh3IMALaMedianCone(copy.fh3IMALaMedianCone)  
+  ,fhnNJK0(copy.fhnNJK0)
+  ,fhnNJLa(copy.fhnNJLa)
+  ,fhnNJALa(copy.fhnNJALa)
+    //,fh2MCgenK0Cone(copy.fh2MCgenK0Cone)
+    //,fh2MCgenLaCone(copy.fh2MCgenLaCone)
+    //,fh2MCgenALaCone(copy.fh2MCgenALaCone)
+    //,fh2MCEtagenK0Cone(copy.fh2MCEtagenK0Cone)
+    //,fh2MCEtagenLaCone(copy.fh2MCEtagenLaCone)
+    //,fh2MCEtagenALaCone(copy.fh2MCEtagenALaCone)
+  ,fh2CorrHijingLaProton(copy.fh2CorrHijingLaProton)
+  ,fh2CorrInjectLaProton(copy.fh2CorrInjectLaProton)
+  ,fh2CorrHijingALaAProton(copy.fh2CorrHijingALaAProton)
+  ,fh2CorrInjectALaAProton(copy.fh2CorrInjectALaAProton)
+  ,fh1IMK0ConeSmear(copy.fh1IMK0ConeSmear)
+  ,fh1IMLaConeSmear(copy.fh1IMLaConeSmear)
+  ,fh1IMALaConeSmear(copy.fh1IMALaConeSmear)
+  ,fh2MCEtaVsPtHijingLa(copy.fh2MCEtaVsPtHijingLa)
+  ,fh2MCEtaVsPtInjectLa(copy.fh2MCEtaVsPtInjectLa)
+  ,fh2MCEtaVsPtHijingALa(copy.fh2MCEtaVsPtHijingALa)
+  ,fh2MCEtaVsPtInjectALa(copy.fh2MCEtaVsPtInjectALa)
+  ,fhnrecMCHijingLaIncl(copy.fhnrecMCHijingLaIncl)
+  ,fhnrecMCHijingLaCone(copy.fhnrecMCHijingLaCone)
+  ,fhnrecMCHijingALaIncl(copy.fhnrecMCHijingALaIncl)
+  ,fhnrecMCHijingALaCone(copy.fhnrecMCHijingALaCone)
+  ,fhnrecMCInjectLaIncl(copy.fhnrecMCInjectLaIncl)
+  ,fhnrecMCInjectLaCone(copy.fhnrecMCInjectLaCone)
+  ,fhnrecMCInjectALaIncl(copy.fhnrecMCInjectALaIncl)
+  ,fhnrecMCInjectALaCone(copy.fhnrecMCInjectALaCone)   
+  ,fhnMCrecK0Cone(copy.fhnMCrecK0Cone)
+  ,fhnMCrecLaCone(copy.fhnMCrecLaCone)
+  ,fhnMCrecALaCone(copy.fhnMCrecALaCone) 
+  ,fhnMCrecK0ConeSmear(copy.fhnMCrecK0ConeSmear)
+  ,fhnMCrecLaConeSmear(copy.fhnMCrecLaConeSmear)
+  ,fhnMCrecALaConeSmear(copy.fhnMCrecALaConeSmear)
+  ,fhnK0sSecContinCone(copy.fhnK0sSecContinCone)
+  ,fhnLaSecContinCone(copy.fhnLaSecContinCone)
+  ,fhnALaSecContinCone(copy.fhnALaSecContinCone)
+  ,fhnK0sIncl(copy.fhnK0sIncl)
+  ,fhnK0sCone(copy.fhnK0sCone)
+  ,fhnLaIncl(copy.fhnLaIncl)
+  ,fhnLaCone(copy.fhnLaCone)
+  ,fhnALaIncl(copy.fhnALaIncl)
+  ,fhnALaCone(copy.fhnALaCone)
+  ,fhnK0sPC(copy.fhnK0sPC)
+  ,fhnLaPC(copy.fhnLaPC)
+  ,fhnALaPC(copy.fhnALaPC)
+  ,fhnK0sMCC(copy.fhnK0sMCC)
+  ,fhnLaMCC(copy.fhnLaMCC)
+  ,fhnALaMCC(copy.fhnALaMCC)
+  ,fhnK0sRC(copy.fhnK0sRC)
+  ,fhnLaRC(copy.fhnLaRC)
+  ,fhnALaRC(copy.fhnALaRC)
+  ,fhnK0sRCBias(copy.fhnK0sRCBias)
+  ,fhnLaRCBias(copy.fhnLaRCBias)
+  ,fhnALaRCBias(copy.fhnALaRCBias)
+  ,fhnK0sOC(copy.fhnK0sOC)
+  ,fhnLaOC(copy.fhnLaOC)
+  ,fhnALaOC(copy.fhnALaOC)
+  ,fh1AreaExcluded(copy.fh1AreaExcluded)
+  ,fh1MedianEta(copy.fh1MedianEta)
+  ,fh1JetPtMedian(copy.fh1JetPtMedian)
   ,fh1MCMultiplicityPrimary(copy.fh1MCMultiplicityPrimary)
   ,fh1MCMultiplicityTracks(copy.fh1MCMultiplicityTracks)
-  ,fh1MCmotherLa(copy.fh1MCmotherLa)
-  ,fh1MCmotherALa(copy.fh1MCmotherALa)
-  ,fh3FeedDownLa(copy.fh3FeedDownLa)
-  ,fh3FeedDownALa(copy.fh3FeedDownALa)
-  ,fh3FeedDownLaCone(copy.fh3FeedDownLaCone)
-  ,fh3FeedDownALaCone(copy.fh3FeedDownALaCone)
+  ,fhnFeedDownLa(copy.fhnFeedDownLa)
+  ,fhnFeedDownALa(copy.fhnFeedDownALa)
+  ,fhnFeedDownLaCone(copy.fhnFeedDownLaCone)
+  ,fhnFeedDownALaCone(copy.fhnFeedDownALaCone)
   ,fh1MCProdRadiusK0s(copy.fh1MCProdRadiusK0s)
   ,fh1MCProdRadiusLambda(copy.fh1MCProdRadiusLambda)
   ,fh1MCProdRadiusAntiLambda(copy.fh1MCProdRadiusAntiLambda)
@@ -739,9 +831,9 @@ AliAnalysisTaskJetChem::AliAnalysisTaskJetChem(const  AliAnalysisTaskJetChem &co
   ,fh2MCEtaVsPtK0s(copy.fh2MCEtaVsPtK0s)
   ,fh2MCEtaVsPtLa(copy.fh2MCEtaVsPtLa)
   ,fh2MCEtaVsPtALa(copy.fh2MCEtaVsPtALa)
-  ,fh1MCRapK0s(copy.fh1MCRapK0s) 
-  ,fh1MCRapLambda(copy.fh1MCRapLambda)
-  ,fh1MCRapAntiLambda(copy.fh1MCRapAntiLambda)
+    //,fh1MCRapK0s(copy.fh1MCRapK0s) 
+    //,fh1MCRapLambda(copy.fh1MCRapLambda)
+    //,fh1MCRapAntiLambda(copy.fh1MCRapAntiLambda)
   ,fh1MCEtaAllK0s(copy.fh1MCEtaAllK0s) 
   ,fh1MCEtaK0s(copy.fh1MCEtaK0s) 
   ,fh1MCEtaLambda(copy.fh1MCEtaLambda)
@@ -760,8 +852,10 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
   if(this!=&o){
     AliAnalysisTaskFragmentationFunction::operator=(o);
 
+    fRandom                         = o.fRandom; 
     fAnalysisMC                     = o.fAnalysisMC;
     fDeltaVertexZ                   = o.fDeltaVertexZ;
+    fCutjetEta                      = o.fCutjetEta;
     fCuttrackNegNcls                = o.fCuttrackNegNcls;
     fCuttrackPosNcls                = o.fCuttrackPosNcls;
     fCutPostrackRap                 = o.fCutPostrackRap;
@@ -771,8 +865,6 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fCutNegtrackEta                 = o.fCutNegtrackEta;  
     fCutEta                         = o.fCutEta;
     fCutV0cosPointAngle             = o.fCutV0cosPointAngle;
-    fCutChi2PosDaughter             = o.fCutChi2PosDaughter;
-    fCutChi2NegDaughter             = o.fCutChi2NegDaughter;
     fKinkDaughters                  = o.fKinkDaughters;
     fRequireTPCRefit                = o.fRequireTPCRefit;
     fCutArmenteros                  = o.fCutArmenteros;
@@ -788,21 +880,32 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fCutRatio                       = o.fCutRatio;
     fK0Type                         = o.fK0Type;
     fFilterMaskK0                   = o.fFilterMaskK0;
+    jettracklist                    = o.jettracklist;
+    jetConeK0list                   = o.jetConeK0list;
+    jetConeLalist                   = o.jetConeLalist;
+    jetConeALalist                  = o.jetConeALalist;
+    jetPerpConeK0list               = o.jetPerpConeK0list;
+    jetPerpConeLalist               = o.jetPerpConeLalist;
+    jetPerpConeALalist              = o.jetPerpConeALalist;
+    jetMedianConeK0list             = o.jetMedianConeK0list;
+    jetMedianConeLalist             = o.jetMedianConeLalist;
+    jetMedianConeALalist            = o.jetMedianConeALalist;
+    fListK0sRC                      = o.fListK0sRC;
+    fListLaRC                       = o.fListLaRC;
+    fListALaRC                      = o.fListALaRC;
     fListK0s                        = o.fListK0s;
     fPIDResponse                    = o.fPIDResponse;
     fV0QAK0                         = o.fV0QAK0;
     fFFHistosRecCutsK0Evt           = o.fFFHistosRecCutsK0Evt;      
-    fFFHistosIMK0AllEvt             = o.fFFHistosIMK0AllEvt;        
-    fFFHistosIMK0Jet                = o.fFFHistosIMK0Jet;           
-    fFFHistosIMK0Cone               = o.fFFHistosIMK0Cone;          
-    fFFHistosPhiCorrIMK0            = o.fFFHistosPhiCorrIMK0;
+    //fFFHistosIMK0AllEvt             = o.fFFHistosIMK0AllEvt;        
+    //fFFHistosIMK0Jet                = o.fFFHistosIMK0Jet;           
+    //fFFHistosIMK0Cone               = o.fFFHistosIMK0Cone;          
     fLaType                         = o.fLaType;
     fFilterMaskLa                   = o.fFilterMaskLa;
     fListLa                         = o.fListLa;
-    fFFHistosIMLaAllEvt             = o.fFFHistosIMLaAllEvt;        
-    fFFHistosIMLaJet                = o.fFFHistosIMLaJet;           
-    fFFHistosIMLaCone               = o.fFFHistosIMLaCone;          
-    fFFHistosPhiCorrIMLa            = o.fFFHistosPhiCorrIMLa;
+    //fFFHistosIMLaAllEvt             = o.fFFHistosIMLaAllEvt;        
+    //fFFHistosIMLaJet                = o.fFFHistosIMLaJet;           
+    //fFFHistosIMLaCone               = o.fFFHistosIMLaCone;          
     fALaType                        = o.fALaType;
     fFilterMaskALa                  = o.fFilterMaskALa;
     fListFeeddownLaCand             = o.fListFeeddownLaCand;
@@ -816,10 +919,9 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fListMCgenLaCone                = o.fListMCgenLaCone;
     fListMCgenALaCone               = o.fListMCgenALaCone;
     IsArmenterosSelected            = o.IsArmenterosSelected;
-    fFFHistosIMALaAllEvt            = o.fFFHistosIMALaAllEvt;        
-    fFFHistosIMALaJet               = o.fFFHistosIMALaJet;           
-    fFFHistosIMALaCone              = o.fFFHistosIMALaCone;          
-    fFFHistosPhiCorrIMALa           = o.fFFHistosPhiCorrIMALa;
+    // fFFHistosIMALaAllEvt            = o.fFFHistosIMALaAllEvt;        
+    // fFFHistosIMALaJet               = o.fFFHistosIMALaJet;           
+    // fFFHistosIMALaCone              = o.fFFHistosIMALaCone;          
     fFFIMNBinsJetPt                 = o.fFFIMNBinsJetPt;   
     fFFIMJetPtMin                   = o.fFFIMJetPtMin; 
     fFFIMJetPtMax                   = o.fFFIMJetPtMax;
@@ -844,24 +946,6 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fFFIMLaNBinsZ                   = o.fFFIMLaNBinsZ;       
     fFFIMLaZMin                     = o.fFFIMLaZMin;         
     fFFIMLaZMax                     = o.fFFIMLaZMax;
-    fPhiCorrIMNBinsPt               = o.fPhiCorrIMNBinsPt;
-    fPhiCorrIMPtMin                 = o.fPhiCorrIMPtMin;
-    fPhiCorrIMPtMax                 = o.fPhiCorrIMPtMax;
-    fPhiCorrIMNBinsPhi              = o.fPhiCorrIMNBinsPhi;
-    fPhiCorrIMPhiMin                = o.fPhiCorrIMPhiMin;
-    fPhiCorrIMPhiMax                = o.fPhiCorrIMPhiMax;
-    fPhiCorrIMNBinsInvM             = o.fPhiCorrIMNBinsInvM;
-    fPhiCorrIMInvMMin               = o.fPhiCorrIMInvMMin;
-    fPhiCorrIMInvMMax               = o.fPhiCorrIMInvMMax;
-    fPhiCorrIMLaNBinsPt             = o.fPhiCorrIMLaNBinsPt;   
-    fPhiCorrIMLaPtMin               = o.fPhiCorrIMLaPtMin;
-    fPhiCorrIMLaPtMax               = o.fPhiCorrIMLaPtMax;
-    fPhiCorrIMLaNBinsPhi            = o.fPhiCorrIMLaNBinsPhi;
-    fPhiCorrIMLaPhiMin              = o.fPhiCorrIMLaPhiMin;
-    fPhiCorrIMLaPhiMax              = o.fPhiCorrIMLaPhiMax;
-    fPhiCorrIMLaNBinsInvM           = o.fPhiCorrIMLaNBinsInvM;
-    fPhiCorrIMLaInvMMin             = o.fPhiCorrIMLaInvMMin;
-    fPhiCorrIMLaInvMMax             = o.fPhiCorrIMLaInvMMax;
     fh1EvtAllCent                   = o.fh1EvtAllCent;
     fh1Evt                          = o.fh1Evt;
     fh1K0Mult                       = o.fh1K0Mult;
@@ -873,36 +957,32 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fh1JetEta                       = o.fh1JetEta;         
     fh1JetPhi                       = o.fh1JetPhi;                 
     fh2JetEtaPhi                    = o.fh2JetEtaPhi;
-    fh1V0JetPt                     = o.fh1V0JetPt;
+    //fh1V0JetPt                     = o.fh1V0JetPt;
+    fh1IMK0Cone                     = o.fh1IMK0Cone;
+    fh1IMLaCone                     = o.fh1IMLaCone;
+    fh1IMALaCone                    = o.fh1IMALaCone;
     fh2FFJetTrackEta                = o.fh2FFJetTrackEta; 
-    fh1trackPosNCls                 = o.fh1trackPosNCls;           
-    fh1trackNegNCls                 = o.fh1trackNegNCls;    
+    //fh1trackPosNCls                 = o.fh1trackPosNCls;           
+    //fh1trackNegNCls                 = o.fh1trackNegNCls;    
     fh1trackPosRap                  = o.fh1trackPosRap;            
     fh1trackNegRap                  = o.fh1trackNegRap;        
-    fh1V0Rap                        = o.fh1V0Rap;        
+    //fh1V0Rap                        = o.fh1V0Rap;        
     fh1trackPosEta                  = o.fh1trackPosEta;            
     fh1trackNegEta                  = o.fh1trackNegEta;        
     fh1V0Eta                        = o.fh1V0Eta;  
-    fh1V0totMom                     = o.fh1V0totMom;            
-    fh1CosPointAngle                = o.fh1CosPointAngle;        
-    fh1Chi2Pos                      = o.fh1Chi2Pos;                 
-    fh1Chi2Neg                      = o.fh1Chi2Neg;              
+    // fh1V0totMom                     = o.fh1V0totMom;            
+    fh1CosPointAngle                = o.fh1CosPointAngle;                      
     fh1DecayLengthV0                = o.fh1DecayLengthV0;  
     fh2ProperLifetimeK0sVsPtBeforeCut = o.fh2ProperLifetimeK0sVsPtBeforeCut;
     fh2ProperLifetimeK0sVsPtAfterCut= o.fh2ProperLifetimeK0sVsPtAfterCut; 
-    fh1ProperLifetimeV0BeforeCut    = o.fh1ProperLifetimeV0BeforeCut; 
-    fh1ProperLifetimeV0AfterCut     = o.fh1ProperLifetimeV0AfterCut; 
     fh1V0Radius                     = o.fh1V0Radius;         
     fh1DcaV0Daughters               = o.fh1DcaV0Daughters;        
     fh1DcaPosToPrimVertex           = o.fh1DcaPosToPrimVertex;   
     fh1DcaNegToPrimVertex           = o.fh1DcaNegToPrimVertex;    
     fh2ArmenterosBeforeCuts         = o.fh2ArmenterosBeforeCuts;
     fh2ArmenterosAfterCuts          = o.fh2ArmenterosAfterCuts;
-    fh2BB3SigProton                 = o.fh2BB3SigProton;
     fh2BBLaPos                      = o.fh2BBLaPos;
     fh2BBLaNeg                      = o.fh2BBLaPos;
-    fh1CrossedRowsOverFindableNeg   = o.fh1CrossedRowsOverFindableNeg;
-    fh1CrossedRowsOverFindablePos   = o.fh1CrossedRowsOverFindablePos;
     fh1PosDaughterCharge            = o.fh1PosDaughterCharge;
     fh1NegDaughterCharge            = o.fh1NegDaughterCharge;
     fh1PtMCK0s                      = o.fh1PtMCK0s;
@@ -911,43 +991,78 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fh1EtaK0s                       = o.fh1EtaK0s;
     fh1EtaLa                        = o.fh1EtaLa;
     fh1EtaALa                       = o.fh1EtaALa;
-    fh3InvMassEtaTrackPtK0s         = o.fh3InvMassEtaTrackPtK0s;
-    fh3InvMassEtaTrackPtLa          = o.fh3InvMassEtaTrackPtLa;
-    fh3InvMassEtaTrackPtALa         = o.fh3InvMassEtaTrackPtALa;
-    fh1noAssociatedK0s              = o.fh1noAssociatedK0s;
+    fh1RC                           = o.fh1RC;
+    fh1RCBiasK0                     = o.fh1RCBiasK0;
+    fh1RCBiasLa                     = o.fh1RCBiasLa;
+    fh1RCBiasALa                    = o.fh1RCBiasALa;
+    fh1MCC                          = o.fh1MCC;
+    fh1OC                           = o.fh1OC;
+    fh1NJ                           = o.fh1NJ;
+    fhnInvMassEtaTrackPtK0s         = o.fhnInvMassEtaTrackPtK0s;
+    fhnInvMassEtaTrackPtLa          = o.fhnInvMassEtaTrackPtLa;
+    fhnInvMassEtaTrackPtALa         = o.fhnInvMassEtaTrackPtALa;
     fh1TrackMultCone                = o.fh1TrackMultCone;
     fh2TrackMultCone                = o.fh2TrackMultCone;
-    fh2MCgenK0Cone                  = o.fh2MCgenK0Cone;
-    fh2MCgenLaCone                  = o.fh2MCgenLaCone;
-    fh2MCgenALaCone                 = o.fh2MCgenALaCone; 
-    fh2MCEtagenK0Cone               = o.fh2MCEtagenK0Cone;
-    fh2MCEtagenLaCone               = o.fh2MCEtagenLaCone;
-    fh2MCEtagenALaCone              = o.fh2MCEtagenALaCone;
-    fh1FFIMK0ConeSmear              = o.fh1FFIMK0ConeSmear;
-    fh1FFIMLaConeSmear              = o.fh1FFIMLaConeSmear;
-    fh1FFIMALaConeSmear             = o.fh1FFIMALaConeSmear;
-    fh3MCrecK0Cone                  = o.fh3MCrecK0Cone;
-    fh3MCrecLaCone                  = o.fh3MCrecLaCone;
-    fh3MCrecALaCone                 = o.fh3MCrecALaCone;
-    fh3MCrecK0ConeSmear             = o.fh3MCrecK0ConeSmear;
-    fh3MCrecLaConeSmear             = o.fh3MCrecLaConeSmear;
-    fh3MCrecALaConeSmear            = o.fh3MCrecALaConeSmear;
-    fh3SecContinCone                = o.fh3SecContinCone;
-    fh3StrContinCone                = o.fh3StrContinCone;
-    fh3IMK0PerpCone                 = o.fh3IMK0PerpCone;
-    fh3IMLaPerpCone                 = o.fh3IMLaPerpCone;
-    fh3IMALaPerpCone                = o.fh3IMALaPerpCone;
-    fh3IMK0MedianCone               = o.fh3IMK0MedianCone;
-    fh3IMLaMedianCone               = o.fh3IMLaMedianCone;
-    fh3IMALaMedianCone              = o.fh3IMALaMedianCone; 
+    fhnNJK0                         = o.fhnNJK0;
+    fhnNJLa                         = o.fhnNJLa;
+    fhnNJALa                        = o.fhnNJALa;
+    //fh2MCgenK0Cone                  = o.fh2MCgenK0Cone;
+    //fh2MCgenLaCone                  = o.fh2MCgenLaCone;
+    //fh2MCgenALaCone                 = o.fh2MCgenALaCone; 
+    //fh2MCEtagenK0Cone               = o.fh2MCEtagenK0Cone;
+    //fh2MCEtagenLaCone               = o.fh2MCEtagenLaCone;
+    //fh2MCEtagenALaCone              = o.fh2MCEtagenALaCone;
+    fh1IMK0ConeSmear                = o.fh1IMK0ConeSmear;
+    fh1IMLaConeSmear                = o.fh1IMLaConeSmear;
+    fh1IMALaConeSmear               = o.fh1IMALaConeSmear;
+    fh2MCEtaVsPtHijingLa            = o.fh2MCEtaVsPtHijingLa;
+    fh2MCEtaVsPtInjectLa            = o.fh2MCEtaVsPtInjectLa;
+    fh2MCEtaVsPtHijingALa           = o.fh2MCEtaVsPtHijingALa;
+    fh2MCEtaVsPtInjectALa           = o.fh2MCEtaVsPtInjectALa;
+    fhnrecMCHijingLaIncl            = o.fhnrecMCHijingLaIncl;
+    fhnrecMCHijingLaCone            = o.fhnrecMCHijingLaCone;
+    fhnrecMCHijingALaIncl           = o.fhnrecMCHijingALaIncl;
+    fhnrecMCHijingALaCone           = o.fhnrecMCHijingALaCone;
+    fhnrecMCInjectLaIncl            = o.fhnrecMCInjectLaIncl;
+    fhnrecMCInjectLaCone            = o.fhnrecMCInjectLaCone;
+    fhnrecMCInjectALaIncl           = o.fhnrecMCInjectALaIncl;
+    fhnrecMCInjectALaCone           = o.fhnrecMCInjectALaCone;        
+    fhnMCrecK0Cone                  = o.fhnMCrecK0Cone;
+    fhnMCrecLaCone                  = o.fhnMCrecLaCone;
+    fhnMCrecALaCone                 = o.fhnMCrecALaCone;
+    fhnMCrecK0ConeSmear             = o.fhnMCrecK0ConeSmear;
+    fhnMCrecLaConeSmear             = o.fhnMCrecLaConeSmear;
+    fhnMCrecALaConeSmear            = o.fhnMCrecALaConeSmear;
+    fhnK0sSecContinCone             = o.fhnK0sSecContinCone;
+    fhnLaSecContinCone              = o.fhnLaSecContinCone;
+    fhnALaSecContinCone             = o.fhnALaSecContinCone;
+    fhnK0sIncl                      = o.fhnK0sIncl; 
+    fhnK0sCone                      = o.fhnK0sCone;
+    fhnLaIncl                       = o.fhnLaIncl;
+    fhnLaCone                       = o.fhnLaCone;
+    fhnALaIncl                      = o.fhnALaIncl;
+    fhnALaCone                      = o.fhnALaCone;   
+    fhnK0sPC                        = o.fhnK0sPC;
+    fhnLaPC                         = o.fhnLaPC;
+    fhnALaPC                        = o.fhnALaPC;
+    fhnK0sRC                        = o.fhnK0sRC;
+    fhnLaRC                         = o.fhnLaRC;
+    fhnALaRC                        = o.fhnALaRC;
+    fhnK0sRCBias                    = o.fhnK0sRCBias;
+    fhnLaRCBias                     = o.fhnLaRCBias;
+    fhnALaRCBias                    = o.fhnALaRCBias;
+    fhnK0sOC                        = o.fhnK0sOC;
+    fhnLaOC                         = o.fhnLaOC;
+    fhnALaOC                        = o.fhnALaOC;
+    fh1AreaExcluded                 = o.fh1AreaExcluded;
+    fh1MedianEta                    = o.fh1MedianEta;
+    fh1JetPtMedian                  = o.fh1JetPtMedian;
     fh1MCMultiplicityPrimary        = o.fh1MCMultiplicityPrimary;
     fh1MCMultiplicityTracks         = o.fh1MCMultiplicityTracks;
-    fh1MCmotherLa                   = o.fh1MCmotherLa;
-    fh1MCmotherALa                  = o.fh1MCmotherALa;
-    fh3FeedDownLa                   = o.fh3FeedDownLa;
-    fh3FeedDownALa                  = o.fh3FeedDownALa;
-    fh3FeedDownLaCone               = o.fh3FeedDownLaCone;
-    fh3FeedDownALaCone              = o.fh3FeedDownALaCone;
+    fhnFeedDownLa                   = o.fhnFeedDownLa;
+    fhnFeedDownALa                  = o.fhnFeedDownALa;
+    fhnFeedDownLaCone               = o.fhnFeedDownLaCone;
+    fhnFeedDownALaCone              = o.fhnFeedDownALaCone;
     fh1MCProdRadiusK0s              = o.fh1MCProdRadiusK0s;
     fh1MCProdRadiusLambda           = o.fh1MCProdRadiusLambda;
     fh1MCProdRadiusAntiLambda       = o.fh1MCProdRadiusAntiLambda;
@@ -960,9 +1075,9 @@ AliAnalysisTaskJetChem& AliAnalysisTaskJetChem::operator=(const AliAnalysisTaskJ
     fh2MCEtaVsPtK0s                 = o.fh2MCEtaVsPtK0s;
     fh2MCEtaVsPtLa                  = o.fh2MCEtaVsPtLa;
     fh2MCEtaVsPtALa                 = o.fh2MCEtaVsPtALa;
-    fh1MCRapK0s                     = o.fh1MCRapK0s; 
-    fh1MCRapLambda                  = o.fh1MCRapLambda;
-    fh1MCRapAntiLambda              = o.fh1MCRapAntiLambda;
+    //fh1MCRapK0s                     = o.fh1MCRapK0s; 
+    //fh1MCRapLambda                  = o.fh1MCRapLambda;
+    //fh1MCRapAntiLambda              = o.fh1MCRapAntiLambda;
     fh1MCEtaAllK0s                  = o.fh1MCEtaAllK0s; 
     fh1MCEtaK0s                     = o.fh1MCEtaK0s; 
     fh1MCEtaLambda                  = o.fh1MCEtaLambda;
@@ -977,7 +1092,19 @@ AliAnalysisTaskJetChem::~AliAnalysisTaskJetChem()
 {
   // destructor  
 
-
+  if(jettracklist) delete jettracklist;
+  if(jetConeK0list) delete jetConeK0list;
+  if(jetConeLalist) delete jetConeLalist;
+  if(jetConeALalist) delete jetConeALalist;
+  if(jetPerpConeK0list) delete jetPerpConeK0list;
+  if(jetPerpConeLalist) delete jetPerpConeLalist;
+  if(jetPerpConeALalist) delete jetPerpConeALalist;
+  if(jetMedianConeK0list) delete jetMedianConeK0list;
+  if(jetMedianConeLalist) delete jetMedianConeLalist;
+  if(jetMedianConeALalist) delete jetMedianConeALalist;
+  if(fListK0sRC) delete fListK0sRC;
+  if(fListLaRC) delete fListLaRC;
+  if(fListALaRC) delete fListALaRC;
   if(fListK0s) delete fListK0s;
   if(fListLa) delete fListLa;
   if(fListALa) delete fListALa;
@@ -988,9 +1115,10 @@ AliAnalysisTaskJetChem::~AliAnalysisTaskJetChem()
   if(fListMCgenK0s) delete fListMCgenK0s;
   if(fListMCgenLa) delete fListMCgenLa;
   if(fListMCgenALa) delete fListMCgenALa;
-
-
-
+  if(fListMCgenK0sCone) delete fListMCgenK0sCone;
+  if(fListMCgenLaCone) delete fListMCgenLaCone;
+  if(fListMCgenALaCone) delete fListMCgenALaCone;
+  if(fRandom) delete fRandom;
 }
 
 //________________________________________________________________________________________________________________________________
@@ -1037,7 +1165,6 @@ AliAnalysisTaskJetChem::AliFragFuncHistosInvMass::AliFragFuncHistosInvMass(const
   ,fInvMassMax(copy.fInvMassMax)
   ,fNBinsPt(copy.fNBinsPt) 
   ,fPtMin(copy.fPtMin)   
-
   ,fPtMax(copy.fPtMax)   
   ,fNBinsXi(copy.fNBinsXi) 
   ,fXiMin(copy.fXiMin)   
@@ -1116,18 +1243,18 @@ void AliAnalysisTaskJetChem::AliFragFuncHistosInvMass::DefineHistos()
 //________________________________________________________________________________________________________________________________
 void AliAnalysisTaskJetChem::AliFragFuncHistosInvMass::FillFF(Float_t trackPt, Float_t invM, Float_t jetPt, Bool_t incrementJetPt)
 {
-  // fill FF
+  // fill FF, don't use TH3F anymore use THnSparse instead to save memory
  
   if(incrementJetPt) fh1JetPt->Fill(jetPt);    
-  fh3TrackPt->Fill(jetPt,invM,trackPt);//Fill(x,y,z)
-  
+  //fh3TrackPt->Fill(jetPt,invM,trackPt);//Fill(x,y,z)
+  invM = 0;
   Double_t z = 0.;
   if(jetPt>0) z = trackPt / jetPt;
-  Double_t xi = 0;
-  if(z>0) xi = TMath::Log(1/z);
+  // Double_t xi = 0;
+  //if(z>0) xi = TMath::Log(1/z);
   
-  fh3Xi->Fill(jetPt,invM,xi);
-  fh3Z->Fill(jetPt,invM,z);
+  //fh3Xi->Fill(jetPt,invM,xi);
+  //fh3Z->Fill(jetPt,invM,z);
 }
 
 //___________________________________________________________________________________
@@ -1136,123 +1263,49 @@ void AliAnalysisTaskJetChem::AliFragFuncHistosInvMass::AddToOutput(TList* list)
   // add histos to list
 
   list->Add(fh1JetPt);
-  list->Add(fh3TrackPt);
-  list->Add(fh3Xi);
-  list->Add(fh3Z);
-}
-
-// ---
-
-
-//_______________________________________________________________________________________________________
-AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::AliFragFuncHistosPhiCorrInvMass(const char* name,
-                                                                                        Int_t nPt,   Float_t ptMin,   Float_t ptMax,
-                                                                                        Int_t nPhi,  Float_t phiMin,  Float_t phiMax,
-                                                                                        Int_t nInvMass,  Float_t invMassMin,  Float_t invMassMax)
-  : TObject()
-  ,fNBinsPt(nPt)
-  ,fPtMin(ptMin)
-  ,fPtMax(ptMax)
-  ,fNBinsPhi(nPhi)
-  ,fPhiMin(phiMin)
-  ,fPhiMax(phiMax)
-  ,fNBinsInvMass(nInvMass)
-  ,fInvMassMin(invMassMin)  
-  ,fInvMassMax(invMassMax)
-  ,fh3PhiCorr(0) 
-  ,fNamePhiCorr(name) 
-{
-  // default constructor
-}
-
-//____________________________________________________________________________________________________________________________________
-AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::AliFragFuncHistosPhiCorrInvMass(const AliFragFuncHistosPhiCorrInvMass& copy)
-  : TObject()
-  ,fNBinsPt(copy.fNBinsPt)
-  ,fPtMin(copy.fPtMin)
-  ,fPtMax(copy.fPtMax)
-  ,fNBinsPhi(copy.fNBinsPhi)
-  ,fPhiMin(copy.fPhiMin)
-  ,fPhiMax(copy.fPhiMax)
-  ,fNBinsInvMass(copy.fNBinsInvMass)
-  ,fInvMassMin(copy.fInvMassMin)  
-  ,fInvMassMax(copy.fInvMassMax)
-  ,fh3PhiCorr(copy.fh3PhiCorr)
-  ,fNamePhiCorr(copy.fNamePhiCorr)
-{
-  // copy constructor
-}
-
-//________________________________________________________________________________________________________________________________________________________________________
-AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass& AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::operator=(const AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass& o)
-{
-  // assignment
-  
-  if(this!=&o){
-    TObject::operator=(o);
-    fNBinsPt      = o.fNBinsPt;
-    fPtMin        = o.fPtMin;
-    fPtMax        = o.fPtMax;
-    fNBinsPhi     = o.fNBinsPhi;
-    fPhiMin       = o.fPhiMin;
-    fPhiMax       = o.fPhiMax;
-    fNBinsInvMass = o.fNBinsInvMass;
-    fInvMassMin   = o.fInvMassMin;  
-    fInvMassMax   = o.fInvMassMax;
-    fh3PhiCorr    = o.fh3PhiCorr;
-    fNamePhiCorr  = o.fNamePhiCorr;
-  }
-  
-  return *this;
-}
-
-//_________________________________________________________________________________________
-AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::~AliFragFuncHistosPhiCorrInvMass()
-{
-  // destructor 
-  
-  if(fh3PhiCorr) delete fh3PhiCorr;
-}
-
-//__________________________________________________________________________
-void AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::DefineHistos()
-{
-  // book jet QA histos
-
-  fh3PhiCorr  = new TH3F(Form("fh3PhiCorrIM%s", fNamePhiCorr.Data()), 
-                        Form("%s: p_{t} - #phi - m_{inv} distribution",fNamePhiCorr.Data()), 
-                        fNBinsPt, fPtMin, fPtMax, 
-                        fNBinsPhi, fPhiMin, fPhiMax,
-                        fNBinsInvMass, fInvMassMin, fInvMassMax);
-  
-  AliAnalysisTaskJetChem::SetProperties(fh3PhiCorr, "p_{t} (GeV/c)", "#phi", "m_{inv} (GeV/c^2)"); 
-}
-
-//___________________________________________________________________________________________________________
-void AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::FillPhiCorr(Float_t pt, Float_t phi, Float_t invM)
-{
-  // fill jet QA histos 
-
-  fh3PhiCorr->Fill(pt, phi, invM);
+  //list->Add(fh3TrackPt);
+  //list->Add(fh3Xi);
+  //list->Add(fh3Z);
 }
 
-//______________________________________________________________________________________________
-void AliAnalysisTaskJetChem::AliFragFuncHistosPhiCorrInvMass::AddToOutput(TList* list) const 
-{
-  // add histos to list
-
-  list->Add(fh3PhiCorr);
-}
 
 //____________________________________________________
 void AliAnalysisTaskJetChem::UserCreateOutputObjects()
 {
   // create output objects
    
+  fRandom = new TRandom3(0);
+  fRandom->SetSeed(0);
+
   if(fDebug > 1) Printf("AliAnalysisTaskJetChem::UserCreateOutputObjects()");
  
   // create list of tracks and jets 
-  
+  jettracklist = new TList();
+  jettracklist->SetOwner(kFALSE);
+  jetConeK0list = new TList();
+  jetConeK0list->SetOwner(kFALSE);
+  jetConeLalist = new TList();
+  jetConeLalist->SetOwner(kFALSE);
+  jetConeALalist = new TList();
+  jetConeALalist->SetOwner(kFALSE);
+  jetPerpConeK0list = new TList();
+  jetPerpConeK0list->SetOwner(kFALSE);
+  jetPerpConeLalist = new TList(); 
+  jetPerpConeLalist->SetOwner(kFALSE);
+  jetPerpConeALalist = new TList();
+  jetPerpConeALalist->SetOwner(kFALSE);
+  jetMedianConeK0list = new TList();
+  jetMedianConeK0list->SetOwner(kFALSE);
+  jetMedianConeLalist = new TList();
+  jetMedianConeLalist->SetOwner(kFALSE);
+  jetMedianConeALalist = new TList();
+  jetMedianConeALalist->SetOwner(kFALSE);
+  fListK0sRC = new TList();
+  fListK0sRC->SetOwner(kFALSE);
+  fListLaRC = new TList();
+  fListLaRC->SetOwner(kFALSE);
+  fListALaRC = new TList();
+  fListALaRC->SetOwner(kFALSE);
   fTracksRecCuts = new TList();
   fTracksRecCuts->SetOwner(kFALSE); //objects in TList wont be deleted when TList is deleted 
   fJetsRecCuts = new TList();
@@ -1279,17 +1332,17 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
   fListMCgenLa->SetOwner(kFALSE);
   fListMCgenALa = new TList();          //MC generated Antilambdas
   fListMCgenALa->SetOwner(kFALSE);
-
+  fListMCgenK0sCone = new TList();
+  fListMCgenK0sCone->SetOwner(kFALSE);
+  fListMCgenLaCone = new TList();
+  fListMCgenLaCone->SetOwner(kFALSE);
+  fListMCgenALaCone = new TList();
+  fListMCgenALaCone->SetOwner(kFALSE);
   
   // Create histograms / output container
  
-  //for AliPIDResponse:
-  AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
-  AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
-  fPIDResponse = inputHandler->GetPIDResponse();
-
-  OpenFile(1);
   fCommonHistList = new TList();
+  fCommonHistList->SetOwner();
   
   Bool_t oldStatus = TH1::AddDirectoryStatus();
   TH1::AddDirectory(kFALSE);//By default (fAddDirectory = kTRUE), histograms are automatically added to the list of objects in memory
@@ -1320,43 +1373,42 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
  
   fh1EvtAllCent                        = new TH1F("fh1EvtAllCent","before centrality selection",100,0.,100.);
   fh1Evt                        = new TH1F("fh1Evt", "All events runned over", 3, 0.,1.);
-  fh1EvtMult                   = new TH1F("fh1EvtMult","multiplicity",1200,0.,12000.);
-  fh1K0Mult                    = new TH1F("fh1K0Mult","K0 multiplicity",1000,0.,1000.);//500. all
-  fh1dPhiJetK0                  = new TH1F("fh1dPhiJetK0","",640,-1,5.4);
-  fh1LaMult                    = new TH1F("fh1LaMult","La multiplicity",1000,0.,1000.);
-  fh1dPhiJetLa                  = new TH1F("fh1dPhiJetLa","",640,-1,5.4);
-  fh1ALaMult                   = new TH1F("fh1ALaMult","ALa multiplicity",1000,0.,1000.);
-  fh1dPhiJetALa                 = new TH1F("fh1dPhiJetALa","",640,-1,5.4);
-  fh1JetEta                     = new TH1F("fh1JetEta","#eta distribution of all jets",400,-2.,2.);
-  fh1JetPhi                     = new TH1F("fh1JetPhi","#phi distribution of all jets",630,0.,6.3);
-  fh2JetEtaPhi                  = new TH2F("fh2JetEtaPhi","#eta and #phi distribution of all jets",400,-2.,2.,630,0.,6.3);
-  fh1V0JetPt                    = new TH1F("fh1V0JetPt","#p_{T} distribution of all jets containing v0s",200,0.,200.);
+  fh1EvtMult                   = new TH1F("fh1EvtMult","multiplicity",240,0.,240.);
+  fh1K0Mult                    = new TH1F("fh1K0Mult","K0 multiplicity",100,0.,100.);//500. all
+  fh1dPhiJetK0                  = new TH1F("fh1dPhiJetK0","",64,-1,5.4);
+  fh1LaMult                    = new TH1F("fh1LaMult","La multiplicity",100,0.,100.);
+  fh1dPhiJetLa                  = new TH1F("fh1dPhiJetLa","",64,-1,5.4);
+  fh1ALaMult                   = new TH1F("fh1ALaMult","ALa multiplicity",100,0.,100.);
+  fh1dPhiJetALa                 = new TH1F("fh1dPhiJetALa","",64,-1,5.4);
+  fh1JetEta                     = new TH1F("fh1JetEta","#eta distribution of all jets",40,-2.,2.);
+  fh1JetPhi                     = new TH1F("fh1JetPhi","#phi distribution of all jets",63,0.,6.3);
+  fh2JetEtaPhi                  = new TH2F("fh2JetEtaPhi","#eta and #phi distribution of all jets",400,-2.,2.,63,0.,6.3);
+
+
+  //fh1V0JetPt                    = new TH1F("fh1V0JetPt","p_{T} distribution of all jets containing v0s",200,0.,200.);
+  fh1IMK0Cone                     = new TH1F("fh1IMK0Cone","p_{T} distribution of all jets containing K0s candidates",19,5.,100.);
+  fh1IMLaCone                     = new TH1F("fh1IMLaCone","p_{T} distribution of all jets containing #Lambda candidates",19,5.,100.);
+  fh1IMALaCone                    = new TH1F("fh1IMALaCone","p_{T} distribution of all jets containing #bar{#Lambda} candidates",19,5.,100.);
+
   fh2FFJetTrackEta              = new TH2F("fh2FFJetTrackEta","charged track eta distr. in jet cone",200,-1.,1.,40,0.,200.);  
-  fh1trackPosNCls               = new TH1F("fh1trackPosNCls","NTPC clusters positive daughters",250,0.,250.);
-  fh1trackNegNCls               = new TH1F("fh1trackNegNCls","NTPC clusters negative daughters",250,0.,250.);
+  //fh1trackPosNCls               = new TH1F("fh1trackPosNCls","NTPC clusters positive daughters",10,0.,100.);
+  //fh1trackNegNCls               = new TH1F("fh1trackNegNCls","NTPC clusters negative daughters",10,0.,100.);
   fh1trackPosEta                = new TH1F("fh1trackPosEta","eta positive daughters",100,-2.,2.);
   fh1trackNegEta                = new TH1F("fh1trackNegEta","eta negative daughters",100,-2.,2.);
   fh1V0Eta                      = new TH1F("fh1V0Eta","V0 eta",60,-1.5,1.5);
-  fh1V0totMom                   = new TH1F("fh1V0totMom","V0 tot mom",240,0.,20.); 
-  fh1CosPointAngle              = new TH1F("fh1CosPointAngle", "Cosine of V0's pointing angle",1000,0.99,1.0);
-  fh1Chi2Pos                    = new TH1F("fh1Chi2Pos", "V0s chi2",100,0.,5.);
-  fh1Chi2Neg                    = new TH1F("fh1Chi2Neg", "V0s chi2",100,0.,5.);
+  //fh1V0totMom                   = new TH1F("fh1V0totMom","V0 tot mom",100,0.,20.); 
+  fh1CosPointAngle              = new TH1F("fh1CosPointAngle", "Cosine of V0's pointing angle",50,0.99,1.0);
   fh1DecayLengthV0              = new TH1F("fh1DecayLengthV0", "V0s decay Length;decay length(cm)",1200,0.,120.);
-  fh2ProperLifetimeK0sVsPtBeforeCut = new TH2F("fh2ProperLifetimeK0sVsPtBeforeCut"," K0s ProperLifetime vs Pt; p_{T} (GeV/#it{c})",1500,0.,15.,500,0.,250.);
-  fh2ProperLifetimeK0sVsPtAfterCut = new TH2F("fh2ProperLifetimeK0sVsPtAfterCut"," K0s ProperLifetime vs Pt; p_{T} (GeV/#it{c})",1500,0.,15.,500,0.,250.);
-  fh1ProperLifetimeV0BeforeCut  = new TH1F("fh1ProperLifetimeV0BeforeCut", "V0s 2D distance over transerse mom.;(cm)",1200,0.,120.);
-  fh1ProperLifetimeV0AfterCut   = new TH1F("fh1ProperLifetimeV0AfterCut", "V0s 2D distance over transverse mom.;(cm)",1200,0.,120.);
-  fh1V0Radius                   = new TH1F("fh1V0Radius", "V0s Radius;Radius(cm)",400,0.,40.);
+  fh2ProperLifetimeK0sVsPtBeforeCut = new TH2F("fh2ProperLifetimeK0sVsPtBeforeCut"," K0s ProperLifetime vs Pt; p_{T} (GeV/#it{c})",150,0.,15.,250,0.,250.);
+  fh2ProperLifetimeK0sVsPtAfterCut = new TH2F("fh2ProperLifetimeK0sVsPtAfterCut"," K0s ProperLifetime vs Pt; p_{T} (GeV/#it{c})",150,0.,15.,250,0.,250.);
+  fh1V0Radius                   = new TH1F("fh1V0Radius", "V0s Radius;Radius(cm)",200,0.,40.);
   fh1DcaV0Daughters             = new TH1F("fh1DcaV0Daughters", "DCA between daughters;dca(cm)",200,0.,2.);
-  fh1DcaPosToPrimVertex         = new TH1F("fh1DcaPosToPrimVertex", "Positive V0 daughter;dca(cm)",1000,0.,10.);
-  fh1DcaNegToPrimVertex         = new TH1F("fh1DcaNegToPrimVertex", "Negative V0 daughter;dca(cm)",1000,0.,10.);
-  fh2ArmenterosBeforeCuts       = new TH2F("fh2ArmenterosBeforeCuts","Armenteros Podolanski Plot for K0s Candidates;#alpha;(p^{arm})_{T}/(GeV/#it{c})",200,-1.2,1.2,600,0.,0.35);
-  fh2ArmenterosAfterCuts        = new TH2F("fh2ArmenterosAfterCuts","Armenteros Podolanski Plot for K0s Candidates;#alpha;(p^{arm})_{T}/(GeV/#it{c});",200,-1.2,1.2,600,0.,0.35);
-  fh2BB3SigProton               = new TH2F("fh2BB3SigProton","-dE/dX against Momentum for Protons @3sigma from TPC; P (GeV); -dE/dx (keV/cm ?)",1000,0.,10.,1000,0.,200.);
-  fh2BBLaPos                    = new TH2F("fh2BBLaPos","PID of the positive daughter of La candidates; P (GeV); -dE/dx (keV/cm ?)",1000,0,10,1000,0,200);
-  fh2BBLaNeg                    = new TH2F("fh2BBLaNeg","PID of the negative daughter of La candidates; P (GeV); -dE/dx (keV/cm ?)",1000,0,10,1000,0,200);
-  fh1CrossedRowsOverFindableNeg = new TH1F("fh1CrossedRowsOverFindableNeg","pos daughter crossed rows over findable in TPC;counts",200,0.,2.);
-  fh1CrossedRowsOverFindablePos = new TH1F("fh1CrossedRowsOverFindablePos","neg daughter crossed rows over findable in TPC;counts",200,0.,2.);
+  fh1DcaPosToPrimVertex         = new TH1F("fh1DcaPosToPrimVertex", "Positive V0 daughter;dca(cm)",100,0.,10.);
+  fh1DcaNegToPrimVertex         = new TH1F("fh1DcaNegToPrimVertex", "Negative V0 daughter;dca(cm)",100,0.,10.);
+  fh2ArmenterosBeforeCuts       = new TH2F("fh2ArmenterosBeforeCuts","Armenteros Podolanski Plot for K0s Candidates;#alpha;(p^{arm})_{T}/(GeV/#it{c})",200,-1.2,1.2,350,0.,0.35);
+  fh2ArmenterosAfterCuts        = new TH2F("fh2ArmenterosAfterCuts","Armenteros Podolanski Plot for K0s Candidates;#alpha;(p^{arm})_{T}/(GeV/#it{c});",200,-1.2,1.2,350,0.,0.35);
+  fh2BBLaPos                    = new TH2F("fh2BBLaPos","PID of the positive daughter of La candidates; P (GeV); -dE/dx (keV/cm ?)",100,0,10,200,0,200);
+  fh2BBLaNeg                    = new TH2F("fh2BBLaNeg","PID of the negative daughter of La candidates; P (GeV); -dE/dx (keV/cm ?)",100,0,10,200,0,200);
   fh1PosDaughterCharge          = new TH1F("fh1PosDaughterCharge","charge of V0 positive daughters; V0 daughters",3,-2.,2.);
   fh1NegDaughterCharge          = new TH1F("fh1NegDaughterCharge","charge of V0 negative daughters; V0 daughters",3,-2.,2.);
   fh1PtMCK0s                    = new TH1F("fh1PtMCK0s","Pt of MC rec K0s; #it{p}_{T} (GeV/#it{c})",200,0.,20.);
@@ -1365,55 +1417,151 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
   fh1EtaK0s                     = new TH1F("fh1EtaK0s","K^{0}_{s} entries ;#eta",200,-1.,1.);
   fh1EtaLa                      = new TH1F("fh1EtaLa","#Lambda entries ;#eta",200,-1.,1.);
   fh1EtaALa                     = new TH1F("fh1EtaALa","#bar{#Lambda} entries ;#eta",200,-1.,1.);
-  fh3InvMassEtaTrackPtK0s       = new TH3F("fh3InvMassEtaTrackPtK0s","#eta; invMass (GeV/{#it{c}}^{2}); #it{p}_{T} (GeV/#it{c})", 200, -1., 1., 240, 0.4, 0.6, 140, 0., 14.);
-  fh3InvMassEtaTrackPtLa        = new TH3F("fh3InvMassEtaTrackPtLa", "#eta; invMass (GeV/{#it{c}}^{2}; #it{p}_{T} (GeV/#it{c}))",  200, -1., 1., 140, 1.06, 1.2, 140, 0., 14.);
-  fh3InvMassEtaTrackPtALa       = new TH3F("fh3InvMassEtaTrackPtALa","#eta; invMass (GeV/#it{c}^{2}); #it{p}_{T} (GeV/#it{c})",  200, -1., 1., 140, 1.06, 1.2, 140, 0., 14.);
-  fh3IMK0PerpCone               = new TH3F("fh3IMK0PerpCone","{K_{0}}^{s} content in perpendicular cone",39,5.,200., 400,0.3,0.7, 200,0.,20.);
-  fh3IMLaPerpCone               = new TH3F("fh3IMLaPerpCone","#Lambda content in perpendicular cone",39,5.,200., 140,1.06,1.2, 200,0.,20.);
-  fh3IMALaPerpCone              = new TH3F("fh3IMALaPerpCone","#Antilambda content in perpendicular cone",39,5.,200., 140,1.06,1.2, 200,0.,20.);
-  fh3IMK0MedianCone             = new TH3F("fh3IMK0MedianCone","{K_{0}}^{s} content in median cluster cone",39,5.,200., 400,0.3,0.7, 200,0.,20.);
-  fh3IMLaMedianCone             = new TH3F("fh3IMLaMedianCone","#Lambda content in median cluster cone",39,5.,200., 140,1.06,1.2, 200,0.,20.);
-  fh3IMALaMedianCone            = new TH3F("fh3IMALaMedianCone","#Antilambda content in median cluster cone",39,5.,200., 140,1.06,1.2, 200,0.,20.);
-
-  fh1noAssociatedK0s            = new TH1F("fh1noAssociatedK0s","not selected as associated particle",12,0.,12.);
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(1,"K0s: accepted as associated particle");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(2,"K0s: v0 not K0s pdg code (310)");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(3,"K0s: v0 is not primary particle");
-
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(4,"K0s: pos daughter is pion");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(5,"K0s: neg daughter is pion");
-
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(6,"K0s: pos daughter particle is proton");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(7,"K0s: pos daughter particle is electron"); 
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(8,"K0s: pos daughter particle is myon");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(9,"K0s: neg daughter particle is proton");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(10,"K0s: neg daughter particle is electron");  
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(11,"K0s: neg daughter particle is myon");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(12,"K0s: pos daughter particle is something else");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(13,"K0s: neg daughter particle is something else");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(14,"K0s: pos daughter not pion pdg code (211)");
-  fh1noAssociatedK0s->GetXaxis()->SetBinLabel(15,"K0s: neg daughter not pion pdg code (211)");
-
-  fh1TrackMultCone          = new TH1F("fh1TrackMultCone","track multiplicity in jet cone; number of tracks",200,0.,1000.);
-
-  fh2TrackMultCone          = new TH2F("fh2TrackMultCone","track multiplicity in jet cone vs. jet momentum; number of tracks; jet it{p}_{T} (GeV/it{c})",200,0.,1000.,39,5.,200.);
-
-  fFFHistosRecCuts         = new AliFragFuncHistos("RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
+
+  //histos for normalisation of MCC, RC, OC and NJ
+
+  fh1RC                         = new TH1F("fh1RC"," # random cones used",1,0.5,1.5);
+  fh1RCBiasK0                   = new TH1F("fh1RCBiasK0"," # random cones with K0s trigger particle",1,0.5,1.5);
+  fh1RCBiasLa                   = new TH1F("fh1RCBiasLa"," # random cones with La trigger particle",1,0.5,1.5);
+  fh1RCBiasALa                  = new TH1F("fh1RCBiasALa"," # random cones with ALa trigger particle",1,0.5,1.5);
+  fh1MCC                        = new TH1F("fh1MCC","# median cluster cones used",1,0.5,1.5);
+  fh1OC                         = new TH1F("fh1OC","# outside cones used, number of jet events",1,0.5,1.5);
+  fh1NJ                         = new TH1F("fh1NJ","# non-jet events used",1,0.5,1.5);
+
+  Int_t binsInvMassEtaTrackPtK0s[3] = {200, 200, 120};//eta,invM,trackPt
+  Double_t xminInvMassEtaTrackPtK0s[3] = {-1.,0.3,0.};
+  Double_t xmaxInvMassEtaTrackPtK0s[3] = {1.,0.7,12.};
+
+  fhnInvMassEtaTrackPtK0s       = new THnSparseF("fhnInvMassEtaTrackPtK0s","#eta; K0s invM (GeV/{#it{c}}^{2}); #it{p}_{T} (GeV/#it{c})",3,binsInvMassEtaTrackPtK0s,xminInvMassEtaTrackPtK0s,xmaxInvMassEtaTrackPtK0s);
+
+  Int_t binsInvMassEtaTrackPtLa[3] = {200, 200, 120};//eta,invM,trackPt
+  Double_t xminInvMassEtaTrackPtLa[3] = {-1.,1.05,0.};
+  Double_t xmaxInvMassEtaTrackPtLa[3] = {1.,1.25,12.};
+
+  fhnInvMassEtaTrackPtLa       = new THnSparseF("fhnInvMassEtaTrackPtLa","#eta; #Lambda invM (GeV/{#it{c}}^{2}); #it{p}_{T} (GeV/#it{c})",3,binsInvMassEtaTrackPtLa,xminInvMassEtaTrackPtLa,xmaxInvMassEtaTrackPtLa);
+
+  Int_t binsInvMassEtaTrackPtALa[3] = {200, 200, 120};//eta,invM,trackPt
+  Double_t xminInvMassEtaTrackPtALa[3] = {-1.,1.05,0.};
+  Double_t xmaxInvMassEtaTrackPtALa[3] = {1.,1.25,12.};
+
+  fhnInvMassEtaTrackPtALa       = new THnSparseF("fhnInvMassEtaTrackPtALa","#eta; #bar{#Lambda} invM (GeV/{#it{c}}^{2}); #it{p}_{T} (GeV/#it{c})",3,binsInvMassEtaTrackPtALa,xminInvMassEtaTrackPtALa,xmaxInvMassEtaTrackPtALa);
+
+  Int_t binsK0sPC[4] = {19, 200, 120, 200};
+  Double_t xminK0sPC[4] = {5.,0.3, 0., -1.};
+  Double_t xmaxK0sPC[4] = {100.,0.7, 12., 1.};
+  fhnK0sPC                      = new THnSparseF("fhnK0sPC","jet pT; K0s invM; particle pT; particle #eta",4,binsK0sPC,xminK0sPC,xmaxK0sPC);
+
+  Int_t binsLaPC[4] = {19, 200, 120, 200};
+  Double_t xminLaPC[4] = {5.,1.05, 0., -1.};
+  Double_t xmaxLaPC[4] = {100.,1.25, 12., 1.};
+  fhnLaPC                       = new THnSparseF("fhnLaPC","jet pT; #Lambda invM; particle pT; particle #eta",4,binsLaPC,xminLaPC,xmaxLaPC);
+
+  Int_t binsALaPC[4] = {19, 200, 120, 200};
+  Double_t xminALaPC[4] = {5.,1.05, 0., -1.};
+  Double_t xmaxALaPC[4] = {100.,1.25, 12., 1.};
+  fhnALaPC                      = new THnSparseF("fhnALaPC","jet pT; #bar#Lambda invM; particle pT; particle #eta",4,binsALaPC,xminALaPC,xmaxALaPC);
+
+  Int_t binsK0sMCC[3] = {200, 120, 200};
+  Double_t xminK0sMCC[3] = {0.3, 0., -1.};
+  Double_t xmaxK0sMCC[3] = {0.7, 12., 1.};
+  fhnK0sMCC                     = new THnSparseF("fhnK0sMCC","jet pT; K0s invM; particle pT; particle #eta",3,binsK0sMCC,xminK0sMCC,xmaxK0sMCC);
+
+  Int_t binsLaMCC[3] = {200, 120, 200};
+  Double_t xminLaMCC[3] = {1.05, 0., -1.};
+  Double_t xmaxLaMCC[3] = {1.25, 12., 1.};
+  fhnLaMCC                      = new THnSparseF("fhnLaMCC","jet pT; #Lambda invM; particle pT; particle #eta",3,binsLaMCC,xminLaMCC,xmaxLaMCC);
+
+  Int_t binsALaMCC[3] = {200, 120, 200};
+  Double_t xminALaMCC[3] = {1.05, 0., -1.};
+  Double_t xmaxALaMCC[3] = {1.25, 12., 1.};
+  fhnALaMCC                = new THnSparseF("fhnALaMCC","jet pT; #bara#Lambda invM; particle pT; particle #eta",3,binsALaMCC,xminALaMCC,xmaxALaMCC);
+
+  Int_t binsK0sRC[3] = {200, 120, 200};
+  Double_t xminK0sRC[3] = {0.3, 0., -1.};
+  Double_t xmaxK0sRC[3] = {0.7, 12., 1.};
+  fhnK0sRC                 = new THnSparseF("fhnK0sRC","jet pT; K0s invM; particle pT; particle #eta",3,binsK0sRC,xminK0sRC,xmaxK0sRC);
+
+  Int_t binsLaRC[3] = {200, 120, 200};
+  Double_t xminLaRC[3] = {1.05, 0., -1.};
+  Double_t xmaxLaRC[3] = {1.25, 12., 1.};
+  fhnLaRC                  = new THnSparseF("fhnLaRC","jet pT; #Lambda invM; particle pT; particle #eta",3,binsLaRC,xminLaRC,xmaxLaRC);
+
+  Int_t binsALaRC[3] = {200, 120, 200};
+  Double_t xminALaRC[3] = {1.05, 0., -1.};
+  Double_t xmaxALaRC[3] = {1.25, 12., 1.};
+  fhnALaRC                 = new THnSparseF("fhnALaRC","jet pT; #bara#Lambda invM; particle pT; particle #eta",3,binsALaRC,xminALaRC,xmaxALaRC);
+
+  Int_t binsK0sRCBias[3] = {200, 120, 200};
+  Double_t xminK0sRCBias[3] = {0.3, 0., -1.};
+  Double_t xmaxK0sRCBias[3] = {0.7, 12., 1.};
+  fhnK0sRCBias             = new THnSparseF("fhnK0sRCBias","jet pT; K0s invM; particle pT; particle #eta",3,binsK0sRCBias,xminK0sRCBias,xmaxK0sRCBias);
+
+  Int_t binsLaRCBias[3] = {200, 120, 200};
+  Double_t xminLaRCBias[3] = {1.05, 0., -1.};
+  Double_t xmaxLaRCBias[3] = {1.25, 12., 1.};
+  fhnLaRCBias              = new THnSparseF("fhnLaRCBias","jet pT; #Lambda invM; particle pT; particle #eta",3,binsLaRCBias,xminLaRCBias,xmaxLaRCBias);
+
+  Int_t binsALaRCBias[3] = {200, 120, 200};
+  Double_t xminALaRCBias[3] = {1.05, 0., -1.};
+  Double_t xmaxALaRCBias[3] = {1.25, 12., 1.};
+  fhnALaRCBias             = new THnSparseF("fhnALaRCBias","jet pT; #bara#Lambda invM; particle pT; particle #eta",3,binsALaRCBias,xminALaRCBias,xmaxALaRCBias);
+
+  Int_t binsK0sOC[3] = {200, 120, 200};
+  Double_t xminK0sOC[3] = {0.3, 0., -1.};
+  Double_t xmaxK0sOC[3] = {0.7, 12., 1.};
+  fhnK0sOC                     = new THnSparseF("fhnK0sOC","jet pT; K0s invM; particle pT; particle #eta",3,binsK0sOC,xminK0sOC,xmaxK0sOC);
+
+  Int_t binsLaOC[3] = {200, 120, 200};
+  Double_t xminLaOC[3] = {1.05, 0., -1.};
+  Double_t xmaxLaOC[3] = {1.25, 12., 1.};
+  fhnLaOC                      = new THnSparseF("fhnLaOC","jet pT; #Lambda invM; particle pT; particle #eta",3,binsLaOC,xminLaOC,xmaxLaOC);
+
+  Int_t binsALaOC[3] = {200, 120, 200};
+  Double_t xminALaOC[3] = {1.05, 0., -1.};
+  Double_t xmaxALaOC[3] = {1.25, 12., 1.};
+
+  fhnALaOC                      = new THnSparseF("fhnALaOC","jet pT; #bara#Lambda invM; particle pT; particle #eta",3,binsALaOC,xminALaOC,xmaxALaOC);
+
+  fh1AreaExcluded               = new TH1F("fh1AreaExcluded","area excluded for selected jets in event acceptance",50,0.,1.);
+
+  fh1MedianEta                  = new TH1F("fh1MedianEta","Median cluster axis ;#eta",200,-1.,1.);
+  fh1JetPtMedian                = new TH1F("fh1JetPtMedian"," (selected) jet it{p}_{T} distribution for MCC method; #GeV/it{c}",19,5.,100.);
+
+  fh1TrackMultCone              = new TH1F("fh1TrackMultCone","track multiplicity in jet cone; number of tracks",20,0.,50.);
+
+  fh2TrackMultCone              = new TH2F("fh2TrackMultCone","track multiplicity in jet cone vs. jet momentum; number of tracks; jet it{p}_{T} (GeV/it{c})",50,0.,50.,19,5.,100.);
+
+  Int_t binsNJK0[3] = {200, 120, 200};
+  Double_t xminNJK0[3] = {0.3, 0., -1.};
+  Double_t xmaxNJK0[3] = {0.7, 12., 1.};
+  fhnNJK0                       = new THnSparseF("fhnNJK0","K0s candidates in events wo selected jets;",3,binsNJK0,xminNJK0,xmaxNJK0);
+
+  Int_t binsNJLa[3] = {200, 120, 200};
+  Double_t xminNJLa[3] = {1.05, 0., -1.};
+  Double_t xmaxNJLa[3] = {1.25, 12., 1.};
+  fhnNJLa                    = new THnSparseF("fhnNJLa","La candidates in events wo selected jets; ",3,binsNJLa,xminNJLa,xmaxNJLa);
+
+  Int_t binsNJALa[3] = {200, 120, 200};
+  Double_t xminNJALa[3] = {1.05, 0., -1.};
+  Double_t xmaxNJALa[3] = {1.25, 12., 1.};
+  fhnNJALa                    = new THnSparseF("fhnNJALa","ALa candidates in events wo selected jets; ",3,binsNJALa,xminNJALa,xmaxNJALa);
+
+  fFFHistosRecCuts             = new AliFragFuncHistos("RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
                                                     fFFNBinsPt, fFFPtMin, fFFPtMax, 
                                                     fFFNBinsXi, fFFXiMin, fFFXiMax,  
                                                     fFFNBinsZ , fFFZMin , fFFZMax);
   
-  fV0QAK0                   = new AliFragFuncQATrackHistos("V0QAK0",fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, 
+  fV0QAK0                       = new AliFragFuncQATrackHistos("V0QAK0",fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, 
                                                            fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
                                                            fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, 
                                                            fQATrackHighPtThreshold);
   
-  fFFHistosRecCutsK0Evt      = new AliFragFuncHistos("RecCutsK0Evt", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
+  fFFHistosRecCutsK0Evt         = new AliFragFuncHistos("RecCutsK0Evt", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
                                                     fFFNBinsPt, fFFPtMin, fFFPtMax, 
                                                     fFFNBinsXi, fFFXiMin, fFFXiMax,  
                                                     fFFNBinsZ , fFFZMin , fFFZMax);
   
-  
+  /*
   fFFHistosIMK0AllEvt        = new AliFragFuncHistosInvMass("K0AllEvt", fFFIMNBinsJetPt, fFFIMJetPtMin, fFFIMJetPtMax, 
                                                            fFFIMNBinsInvM,fFFIMInvMMin,fFFIMInvMMax,
                                                            fFFIMNBinsPt, fFFIMPtMin, fFFIMPtMax, 
@@ -1432,10 +1580,6 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
                                                            fFFIMNBinsXi, fFFIMXiMin, fFFIMXiMax,  
                                                            fFFIMNBinsZ , fFFIMZMin , fFFIMZMax);
   
-  fFFHistosPhiCorrIMK0       = new AliFragFuncHistosPhiCorrInvMass("K0",fPhiCorrIMNBinsPt, fPhiCorrIMPtMin, fPhiCorrIMPtMax, 
-                                                                  fPhiCorrIMNBinsPhi, fPhiCorrIMPhiMin, fPhiCorrIMPhiMax,  
-                                                                  fPhiCorrIMNBinsInvM , fPhiCorrIMInvMMin , fPhiCorrIMInvMMax);
-  
   fFFHistosIMLaAllEvt        = new AliFragFuncHistosInvMass("LaAllEvt", fFFIMLaNBinsJetPt, fFFIMLaJetPtMin, fFFIMLaJetPtMax, 
                                                            fFFIMLaNBinsInvM,fFFIMLaInvMMin,fFFIMLaInvMMax,
                                                            fFFIMLaNBinsPt, fFFIMLaPtMin, fFFIMLaPtMax, 
@@ -1454,11 +1598,7 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
                                                            fFFIMLaNBinsPt, fFFIMLaPtMin, fFFIMLaPtMax, 
                                                            fFFIMLaNBinsXi, fFFIMLaXiMin, fFFIMLaXiMax,  
                                                            fFFIMLaNBinsZ , fFFIMLaZMin , fFFIMLaZMax);
-  
-  fFFHistosPhiCorrIMLa       = new AliFragFuncHistosPhiCorrInvMass("La",fPhiCorrIMLaNBinsPt, fPhiCorrIMLaPtMin, fPhiCorrIMLaPtMax, 
-                                                                  fPhiCorrIMLaNBinsPhi, fPhiCorrIMLaPhiMin, fPhiCorrIMLaPhiMax,  
-                                                                  fPhiCorrIMLaNBinsInvM , fPhiCorrIMLaInvMMin , fPhiCorrIMLaInvMMax);
-
  
   fFFHistosIMALaAllEvt        = new AliFragFuncHistosInvMass("ALaAllEvt", fFFIMLaNBinsJetPt, fFFIMLaJetPtMin, fFFIMLaJetPtMax, 
                                                            fFFIMLaNBinsInvM,fFFIMLaInvMMin,fFFIMLaInvMMax,
@@ -1477,84 +1617,199 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
                                                            fFFIMLaNBinsPt, fFFIMLaPtMin, fFFIMLaPtMax, 
                                                            fFFIMLaNBinsXi, fFFIMLaXiMin, fFFIMLaXiMax,  
                                                            fFFIMLaNBinsZ , fFFIMLaZMin , fFFIMLaZMax);
-  
-  fFFHistosPhiCorrIMALa       = new AliFragFuncHistosPhiCorrInvMass("ALa",fPhiCorrIMLaNBinsPt, fPhiCorrIMLaPtMin, fPhiCorrIMLaPtMax, 
-                                                                  fPhiCorrIMLaNBinsPhi, fPhiCorrIMLaPhiMin, fPhiCorrIMLaPhiMax,  
-                                                                  fPhiCorrIMLaNBinsInvM , fPhiCorrIMLaInvMMin , fPhiCorrIMLaInvMMax);
+  */
 
   //***************
   // MC histograms
   //***************
 
-  fh2MCgenK0Cone                = new TH2F("fh2MCgenK0Cone", "MC gen {K^{0}}^{s} #it{p}_{T}  in cone around rec jet axis versus jet #it{p}_{T}; jet #it{p}_{T}",39,5.,200.,200,0.,20.);
-  fh2MCgenLaCone                = new TH2F("fh2MCgenLaCone", "MC gen #Lambda #it{p}_{T} in cone around rec jet axis versus jet #it{p}_{T} ; jet #it{p}_{T}",39,5.,200.,200,0.,20.);
-  fh2MCgenALaCone               = new TH2F("fh2MCgenALaCone", "MC gen #Antilambda #it{p}_{T} in cone around rec jet axis versus jet #it{p}_{T}; jet #it{p}_{T}",39,5.,200.,200,0.,20.);
+  //fh2MCgenK0Cone                = new TH2F("fh2MCgenK0Cone", "MC gen {K^{0}}^{s} #it{p}_{T}  in cone around rec jet axis versus jet #it{p}_{T}; jet #it{p}_{T}",19,5.,100.,200,0.,20.);
+  //fh2MCgenLaCone                = new TH2F("fh2MCgenLaCone", "MC gen #Lambda #it{p}_{T} in cone around rec jet axis versus jet #it{p}_{T} ; jet #it{p}_{T}",19,5.,100.,200,0.,20.);
+  //fh2MCgenALaCone               = new TH2F("fh2MCgenALaCone", "MC gen #Antilambda #it{p}_{T} in cone around rec jet axis versus jet #it{p}_{T}; jet #it{p}_{T}",19,5.,100.,200,0.,20.);
 
-  fh2MCgenK0Cone->GetYaxis()->SetTitle("MC gen K^{0}}^{s} #it{p}_{T}");
-  fh2MCgenLaCone->GetYaxis()->SetTitle("MC gen #Lambda #it{p}_{T}");
-  fh2MCgenALaCone->GetYaxis()->SetTitle("MC gen #Antilambda #it{p}_{T}");
+  //fh2MCgenK0Cone->GetYaxis()->SetTitle("MC gen K^{0}}^{s} #it{p}_{T}");
+  //fh2MCgenLaCone->GetYaxis()->SetTitle("MC gen #Lambda #it{p}_{T}");
+  //fh2MCgenALaCone->GetYaxis()->SetTitle("MC gen #Antilambda #it{p}_{T}");
 
-  fh2MCEtagenK0Cone             = new TH2F("fh2MCEtagenK0Cone","MC gen {K^{0}}^{s} #it{p}_{T} #eta distribution in jet cone;#eta",39,5.,200.,200,-1.,1.);
-  fh2MCEtagenLaCone             = new TH2F("fh2MCEtagenLaCone","MC gen #Lambda #it{p}_{T} #eta distribution in jet cone;#eta",39,5.,200.,200,-1.,1.);
-  fh2MCEtagenALaCone            = new TH2F("fh2MCEtagenALaCone","MC gen #Antilambda #it{p}_{T} #eta distribution in jet cone;#eta",39,5.,200.,200,-1.,1.);
-  fh1FFIMK0ConeSmear            = new TH1F("fh1FFIMK0ConeSmear","Smeared jet pt study for K0s-in-cone-jets; smeared jet #it{p}_{T}", 39,5.,200.);
-  fh1FFIMLaConeSmear            = new TH1F("fh1FFIMLaConeSmear","Smeared jet pt study for La-in-cone-jets; smeared jet #it{p}_{T}", 39,5.,200.);
-  fh1FFIMALaConeSmear           = new TH1F("fh1FFIMALaConeSmear","Smeared jet pt study for ALa-in-cone-jets; smeared jet #it{p}_{T}", 39,5.,200.);
+  //fh2MCEtagenK0Cone             = new TH2F("fh2MCEtagenK0Cone","MC gen {K^{0}}^{s} #it{p}_{T} #eta distribution in jet cone;#eta",19,5.,100.,200,-1.,1.);
+  //fh2MCEtagenLaCone             = new TH2F("fh2MCEtagenLaCone","MC gen #Lambda #it{p}_{T} #eta distribution in jet cone;#eta",19,5.,100.,200,-1.,1.);
+  //fh2MCEtagenALaCone            = new TH2F("fh2MCEtagenALaCone","MC gen #Antilambda #it{p}_{T} #eta distribution in jet cone;#eta",19,5.,100.,200,-1.,1.);
+  fh1IMK0ConeSmear                = new TH1F("fh1IMK0ConeSmear","Smeared jet pt study for K0s-in-cone-jets; smeared jet #it{p}_{T}", 19,5.,100.);
+  fh1IMLaConeSmear                = new TH1F("fh1IMLaConeSmear","Smeared jet pt study for La-in-cone-jets; smeared jet #it{p}_{T}", 19,5.,100.);
+  fh1IMALaConeSmear               = new TH1F("fh1IMALaConeSmear","Smeared jet pt study for ALa-in-cone-jets; smeared jet #it{p}_{T}", 19,5.,100.);
   
-  fh3MCrecK0Cone                = new TH3F("fh3MCrecK0Cone", "MC rec {K^{0}}^{s} #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",39,5.,200., 400,0.3,0.7, 200,0.,20.);  
-  fh3MCrecLaCone                = new TH3F("fh3MCrecLaCone", "MC rec {#Lambda #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2});#it{p}_{T}",39,5.,200., 140,1.05,1.25, 200,0.,20.);            
-  fh3MCrecALaCone               = new TH3F("fh3MCrecALaCone", "MC rec {#Antilambda #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2});#it{p}_{T}",39,5.,200.,140,1.05,1.25, 200,0.,20.);
-  fh3MCrecK0ConeSmear           = new TH3F("fh3MCrecK0ConeSmear", "MC rec {K^{0}}^{s} #it{p}_{T}  in cone around jet axis matching MC gen particle, with jet p_{T} smeared; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",39,5.,200., 400,0.3,0.7, 200,0.,20.);  
-  fh3MCrecLaConeSmear           = new TH3F("fh3MCrecLaConeSmear", "MC rec {#Lambda #it{p}_{T}  in cone around jet axis matching MC gen particle, with jet p_{T} smeared; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2});#it{p}_{T}",39,5.,200., 140,1.06,1.2, 200,0.,20.);            
-  fh3MCrecALaConeSmear          = new TH3F("fh3MCrecALaConeSmear", "MC rec {#Antilambda #it{p}_{T}  in cone around jet axis matching MC gen particle, with jet p_{T} smeared; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2});#it{p}_{T}",39,5.,200.,140,1.06,1.2, 200,0.,20.);
-  fh3SecContinCone              = new TH3F("fh3SecContinCone","secondary contamination of jet cones; jet #it{p}_{T}; track #it{p}_{T}, #eta",39,5.,200.,200,0.,20.,200,-1.,1.);
-  fh3StrContinCone              = new TH3F("fh3StrContinCone","strange particle contamination of jet cones; jet #it{p}_{T}; track #it{p}_{T}, #eta",39,5.,200.,200,0.,20.,200,-1.,1.);
+  fh2CorrHijingLaProton           = new TH2F("fh2CorrHijingLaProton","#Lambda - proton pT correlation, Hijing;#it{p^{#Lambda}}_{T} (GeV/c);#it{p^{proton}}_{T} (GeV/c)",120,0.,12.,120,0.,12.);        
+  fh2CorrInjectLaProton           = new TH2F("fh2CorrInjectLaProton","#Lambda - proton pT correlation, Injected;#it{p^{#Lambda}}_{T} (GeV/c);#it{p^{proton}}_{T} (GeV/c)",120,0.,12.,120,0.,12.);
+  fh2CorrHijingALaAProton         = new TH2F("fh2CorrHijingALaAProton","#bar{#Lambda} - proton pT correlation, Hijing;#it{p^{#Lambda}}_{T} (GeV/c);#it{p^{#bar{proton}}}_{T} (GeV/c)",120,0.,12.,120,0.,12.);        
+  fh2CorrInjectALaAProton         = new TH2F("fh2CorrInjectALaAProton","#bar{#Lambda} - proton pT correlation, Injected;#it{p^{#Lambda}}_{T} (GeV/c);#it{p^{#bar{proton}}}_{T} (GeV/c)",120,0.,12.,120,0.,12.);
+  //12 new histograms: Cone, Incl, Lambda, Antilambda, Hijing, Injected:
+   
+  fh2MCEtaVsPtHijingLa              = new TH2F("fh2MCEtaVsPtHijingLa","MC Hijing gen. #Lambda #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
+  fh2MCEtaVsPtInjectLa              = new TH2F("fh2MCEtaVsPtInjectLa","MC injected gen. #Lambda  #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
+  fh2MCEtaVsPtHijingALa             = new TH2F("fh2MCEtaVsPtHijingALa","MC gen. Hijing  #bar{#Lambda} #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
+  fh2MCEtaVsPtInjectALa             = new TH2F("fh2MCEtaVsPtInjectALa","MC gen. injected #bar{#Lambda}  #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
+
+  Int_t binsrecMCHijingLaIncl[3] = {200, 120, 200};
+  Double_t xminrecMCHijingLaIncl[3] = {1.05, 0., -1.};
+  Double_t xmaxrecMCHijingLaIncl[3] = {1.25, 12., 1.};
+  fhnrecMCHijingLaIncl          = new THnSparseF("fhnrecMCHijingLaIncl","La inv. mass; particle pT; particle #eta",3,binsrecMCHijingLaIncl,xminrecMCHijingLaIncl,xmaxrecMCHijingLaIncl);
+
+  Int_t binsrecMCHijingLaCone[4] = {19, 200, 120, 200};
+  Double_t xminrecMCHijingLaCone[4] = {5., 1.05, 0., -1.};
+  Double_t xmaxrecMCHijingLaCone[4] = {100., 1.25, 12., 1.};
+  fhnrecMCHijingLaCone          = new THnSparseF("fhnrecMCHijingLaCone","La inv. mass; particle pT; particle #eta",4,binsrecMCHijingLaCone,xminrecMCHijingLaCone,xmaxrecMCHijingLaCone);
+
+  Int_t binsrecMCHijingALaIncl[3] = {200, 120, 200};
+  Double_t xminrecMCHijingALaIncl[3] = {1.05, 0., -1.};
+  Double_t xmaxrecMCHijingALaIncl[3] = {1.25, 12., 1.};
+  fhnrecMCHijingALaIncl         = new THnSparseF("fhnrecMCHijingALaIncl","ALa inv. mass; particle pT; particle #eta",3,binsrecMCHijingALaIncl,xminrecMCHijingALaIncl,xmaxrecMCHijingALaIncl);
+
+  Int_t binsrecMCHijingALaCone[4] = {19, 200, 120, 200};
+  Double_t xminrecMCHijingALaCone[4] = {5., 1.05, 0., -1.};
+  Double_t xmaxrecMCHijingALaCone[4] = {100., 1.25, 12., 1.};
+  fhnrecMCHijingALaCone         = new THnSparseF("fhnrecMCHijingALaCone","ALa inv. mass; particle pT; particle #eta",4,binsrecMCHijingALaCone,xminrecMCHijingALaCone,xmaxrecMCHijingALaCone);
+
+  Int_t binsrecMCInjectLaIncl[3] = {200, 120, 200};
+  Double_t xminrecMCInjectLaIncl[3] = {1.05, 0., -1.};
+  Double_t xmaxrecMCInjectLaIncl[3] = {1.25, 12., 1.};
+  fhnrecMCInjectLaIncl          = new THnSparseF("fhnrecMCInjectLaIncl","La inv. mass; particle pT; particle #eta",3,binsrecMCInjectLaIncl,xminrecMCInjectLaIncl,xmaxrecMCInjectLaIncl);
+
+  Int_t binsrecMCInjectLaCone[4] = {19, 200, 120, 200};
+  Double_t xminrecMCInjectLaCone[4] = {5., 1.05, 0., -1.};
+  Double_t xmaxrecMCInjectLaCone[4] = {100., 1.25, 12., 1.};
+  fhnrecMCInjectLaCone          = new THnSparseF("fhnrecMCInjectLaCone","La jet pT;inv. mass; particle pT; particle #eta",4,binsrecMCInjectLaCone,xminrecMCInjectLaCone,xmaxrecMCInjectLaCone);
+
+  Int_t binsrecMCInjectALaIncl[3] = {200, 120, 200};
+  Double_t xminrecMCInjectALaIncl[3] = {1.05, 0., -1.};
+  Double_t xmaxrecMCInjectALaIncl[3] = {1.25, 12., 1.};
+  fhnrecMCInjectALaIncl         = new THnSparseF("fhnrecMCInjectALaIncl","ALa inv. mass; particle pT; particle #eta",3,binsrecMCInjectALaIncl,xminrecMCInjectALaIncl,xmaxrecMCInjectALaIncl);
+
+  Int_t binsrecMCInjectALaCone[4] = {19, 200, 120, 200};
+  Double_t xminrecMCInjectALaCone[4] = {5., 1.05, 0., -1.};
+  Double_t xmaxrecMCInjectALaCone[4] = {100., 1.25, 12., 1.};
+  fhnrecMCInjectALaCone         = new THnSparseF("fhnrecMCInjectALaCone","ALa inv. mass; particle pT; particle #eta",4,binsrecMCInjectALaCone,xminrecMCInjectALaCone,xmaxrecMCInjectALaCone);
+
+
+  Int_t binsMCrecK0Cone[4] = {19, 200, 120, 200};
+  Double_t xminMCrecK0Cone[4] = {5.,0.3, 0., -1.};
+  Double_t xmaxMCrecK0Cone[4] = {100.,0.7, 12., 1.};
+  fhnMCrecK0Cone                = new THnSparseF("fhnMCrecK0Cone", "MC rec {K^{0}}^{s} #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",4,binsMCrecK0Cone,xminMCrecK0Cone,xmaxMCrecK0Cone);  
+
+  Int_t binsMCrecLaCone[4] = {19, 200, 120, 200};
+  Double_t xminMCrecLaCone[4] = {5.,0.3, 0., -1.};
+  Double_t xmaxMCrecLaCone[4] = {100.,0.7, 12., 1.};
+  fhnMCrecLaCone                = new THnSparseF("fhnMCrecLaCone", "MC rec {#Lambda #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",4,binsMCrecLaCone,xminMCrecLaCone,xmaxMCrecLaCone); 
+
+  Int_t binsMCrecALaCone[4] = {19, 200, 120, 200};
+  Double_t xminMCrecALaCone[4] = {5.,0.3, 0., -1.};
+  Double_t xmaxMCrecALaCone[4] = {100.,0.7, 12., 1.};
+  fhnMCrecALaCone                = new THnSparseF("fhnMCrecALaCone", "MC rec {#bar{#Lambda} #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",4,binsMCrecALaCone,xminMCrecALaCone,xmaxMCrecALaCone); 
+  
+  Int_t binsMCrecK0ConeSmear[4] = {19, 200, 120, 200};
+  Double_t xminMCrecK0ConeSmear[4] = {5.,0.3, 0., -1.};
+  Double_t xmaxMCrecK0ConeSmear[4] = {100.,0.7, 12., 1.};
+  fhnMCrecK0ConeSmear                = new THnSparseF("fhnMCrecK0ConeSmear", "MC rec {K^{0}}^{s} #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",4,binsMCrecK0ConeSmear,xminMCrecK0ConeSmear,xmaxMCrecK0ConeSmear);  
+
+  Int_t binsMCrecLaConeSmear[4] = {19, 200, 120, 200};
+  Double_t xminMCrecLaConeSmear[4] = {5.,1.05, 0., -1.};
+  Double_t xmaxMCrecLaConeSmear[4] = {100.,1.25, 12., 1.};
+  fhnMCrecLaConeSmear                = new THnSparseF("fhnMCrecLaConeSmear", "MC rec {#Lambda #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",4,binsMCrecLaConeSmear,xminMCrecLaConeSmear,xmaxMCrecLaConeSmear); 
+
+  Int_t binsMCrecALaConeSmear[4] = {19, 200, 120, 200};
+  Double_t xminMCrecALaConeSmear[4] = {5.,1.05, 0., -1.};
+  Double_t xmaxMCrecALaConeSmear[4] = {100.,1.25, 12., 1.};
+  fhnMCrecALaConeSmear                = new THnSparseF("fhnMCrecALaConeSmear", "MC rec {#bar{#Lambda} #it{p}_{T}  in cone around jet axis matching MC gen particle; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",4,binsMCrecALaConeSmear,xminMCrecALaConeSmear,xmaxMCrecALaConeSmear); 
+
+  Int_t binsK0sSecContinCone[3] = {19, 120, 200};
+  Double_t xminK0sSecContinCone[3] = {5.,0., -1.};
+  Double_t xmaxK0sSecContinCone[3] = {100.,12., 1.};
+  fhnK0sSecContinCone                = new THnSparseF("fhnK0sSecContinCone", "Secondary contamination {K^{0}}^{s} #it{p}_{T}  in cone around jet axis; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",3,binsK0sSecContinCone,xminK0sSecContinCone,xmaxK0sSecContinCone);  
+
+  Int_t binsLaSecContinCone[3] = {19, 120, 200};
+  Double_t xminLaSecContinCone[3] = {5.,0., -1.};
+  Double_t xmaxLaSecContinCone[3] = {100.,12., 1.};
+  fhnLaSecContinCone                = new THnSparseF("fhnLaSecContinCone", "Secondary contamination {#Lambda #it{p}_{T}  in cone around jet axis; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",3,binsLaSecContinCone,xminLaSecContinCone,xmaxLaSecContinCone);
+
+  Int_t binsALaSecContinCone[3] = {19, 120, 200};
+  Double_t xminALaSecContinCone[3] = {5.,0., -1.};
+  Double_t xmaxALaSecContinCone[3] = {100.,12., 1.};
+  fhnALaSecContinCone                = new THnSparseF("fhnALaSecContinCone", "Secondary contamination {#bar{#Lambda} #it{p}_{T}  in cone around jet axis; jet #it{p}_{T}; inv mass (GeV/#it{c}^{2};#it{p}_{T}",3,binsALaSecContinCone,xminALaSecContinCone,xmaxALaSecContinCone);
+
+  Int_t binsK0sIncl[3] = {200, 120, 200};
+  Double_t xminK0sIncl[3] = {0.3, 0., -1.};
+  Double_t xmaxK0sIncl[3] = {0.7, 12., 1.};
+  fhnK0sIncl                    = new THnSparseF("fhnK0sIncl","K0s inv. mass; particle pT; particle #eta",3,binsK0sIncl,xminK0sIncl,xmaxK0sIncl);
+
+  Int_t binsK0sCone[4] = {19, 200, 120, 200};
+  Double_t xminK0sCone[4] = {5.,0.3, 0., -1.};
+  Double_t xmaxK0sCone[4] = {100.,0.7, 12., 1.};
+  fhnK0sCone                    = new THnSparseF("fhnK0sCone","jet pT; K0s inv. mass; particle pT; particle #eta",4,binsK0sCone,xminK0sCone,xmaxK0sCone);
+
+  Int_t binsLaIncl[3] = {200, 120, 200};
+  Double_t xminLaIncl[3] = {1.05, 0., -1.};
+  Double_t xmaxLaIncl[3] = {1.25, 12., 1.};
+  fhnLaIncl                    = new THnSparseF("fhnLaIncl","La inv. mass; particle pT; particle #eta",3,binsLaIncl,xminLaIncl,xmaxLaIncl);
+
+  Int_t binsLaCone[4] = {19, 200, 120, 200};
+  Double_t xminLaCone[4] = {5.,1.05, 0., -1.};
+  Double_t xmaxLaCone[4] = {100.,1.25, 12., 1.};
+  fhnLaCone                    = new THnSparseF("fhnLaCone","jet pT; La inv. mass; particle pT; particle #eta",4,binsLaCone,xminLaCone,xmaxLaCone);
+
+  Int_t binsALaIncl[3] = {200, 120, 200};
+  Double_t xminALaIncl[3] = {1.05, 0., -1.};
+  Double_t xmaxALaIncl[3] = {1.25, 12., 1.};
+  fhnALaIncl                    = new THnSparseF("fhnALaIncl","ALa inv. mass; particle pT; particle #eta",3,binsALaIncl,xminALaIncl,xmaxALaIncl);
+
+  Int_t binsALaCone[4] = {19, 200, 120, 200};
+  Double_t xminALaCone[4] = {5.,1.05, 0., -1.};
+  Double_t xmaxALaCone[4] = {100.,1.25, 12., 1.};
+  fhnALaCone                    = new THnSparseF("fhnALaCone","jet pT; ALa inv. mass; particle pT; particle #eta",4,binsALaCone,xminALaCone,xmaxALaCone);
 
   fh1MCMultiplicityPrimary      = new TH1F("fh1MCMultiplicityPrimary", "MC Primary Particles;NPrimary;Count", 201, -0.5, 200.5);
   fh1MCMultiplicityTracks       = new TH1F("h1MCMultiplicityTracks", "MC Tracks;Ntracks;Count", 201, -0.5, 200.5);
-  // fh1MCmotherK0s             = new TH1F("fh1MCmotherK0s","K0s mother pdg codes",10,0.,10.);
-  fh1MCmotherLa                 = new TH1F("fh1MCmotherLa","Lambdas mother pdg codes",10,0.,10.);
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(1,"#Sigma^{-}");
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(2,"#Sigma^{0}");
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(3,"#Sigma^{+}");  
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(4,"#Omega^{-}");
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(5,"#Xi^{0}");
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(6,"#Xi^{-}");
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(7,"#Xi^{+}");
-  fh1MCmotherLa->GetXaxis()->SetBinLabel(8,"primary particle");
-  fh1MCmotherALa                = new TH1F("fh1MCmotherALa","Antilambdas mother pdg codes",10,0.,10.);
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(1,"#bar{#Sigma^{-}}");
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(2,"#bar{#Sigma^{0}}");
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(3,"#bar{#Sigma^{+}}");  
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(4,"#bar{#Omega^{-}}");
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(5,"#bar{#Xi^{0}}");
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(6,"#Xi^{-}");
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(7,"#Xi^{+}");
-  fh1MCmotherALa->GetXaxis()->SetBinLabel(8,"primary particle");
-  fh3FeedDownLa                 = new TH3F("fh3FeedDownLa","#Lambda stemming from feeddown from Xi(0/-)", 39, 5., 200., 200, 1.05, 1.25, 200,0.,20.);
-  fh3FeedDownALa                = new TH3F("fh3FeedDownALa","#bar#Lambda stemming from feeddown from Xibar(0/+)", 39, 5., 200., 200, 1.05, 1.25, 200, 0., 20.);
-  fh3FeedDownLaCone             = new TH3F("fh3FeedDownLaCone","#Lambda stemming from feeddown from Xi(0/-) in jet cone", 39, 5., 200., 200, 1.05, 1.25, 200,0.,20.);
-  fh3FeedDownALaCone            = new TH3F("fh3FeedDownALaCone","#bar#Lambda stemming from feeddown from Xibar(0/+) in jet cone", 39, 5., 200., 200, 1.05, 1.25, 200, 0., 20.);
-  fh1MCProdRadiusK0s            = new TH1F("fh1MCProdRadiusK0s","MC gen. MC K0s prod radius",600,0.,200.);
-  fh1MCProdRadiusLambda         = new TH1F("fh1MCProdRadiusLambda","MC gen. MC La prod radius",600,0.,200.);
-  fh1MCProdRadiusAntiLambda     = new TH1F("fh1MCProdRadiusAntiLambda","MC gen. MC ALa prod radius",600,0.,200.);
+
+
+  Int_t binsFeedDownLa[3] = {19, 200, 120};
+  Double_t xminFeedDownLa[3] = {5.,1.05, 0.};
+  Double_t xmaxFeedDownLa[3] = {100.,1.25, 12.};
+  fhnFeedDownLa                 = new THnSparseF("fhnFeedDownLa","#Lambda stemming from feeddown from Xi(0/-)",3,binsFeedDownLa,xminFeedDownLa,xmaxFeedDownLa);
+
+  Int_t binsFeedDownALa[3] = {19, 200, 120};
+  Double_t xminFeedDownALa[3] = {5.,1.05, 0.};
+  Double_t xmaxFeedDownALa[3] = {100.,1.25, 12.};
+  fhnFeedDownALa                 = new THnSparseF("fhnFeedDownALa","#bar#Lambda stemming from feeddown from Xibar(0/+)",3,binsFeedDownALa,xminFeedDownALa,xmaxFeedDownALa);
+
+  Int_t binsFeedDownLaCone[3] = {19, 200, 120};
+  Double_t xminFeedDownLaCone[3] = {5.,1.05, 0.};
+  Double_t xmaxFeedDownLaCone[3] = {100.,1.25, 12.};
+  fhnFeedDownLaCone             = new THnSparseF("fhnFeedDownLaCone","#Lambda stemming from feeddown from Xi(0/-) in jet cone",3,binsFeedDownLaCone,xminFeedDownLaCone,xmaxFeedDownLaCone);
+
+  Int_t binsFeedDownALaCone[3] = {19, 200, 120};
+  Double_t xminFeedDownALaCone[3] = {5.,1.05, 0.};
+  Double_t xmaxFeedDownALaCone[3] = {100.,1.25, 12.};
+  fhnFeedDownALaCone             = new THnSparseF("fhnFeedDownALaCone","#bar#Lambda stemming from feeddown from Xibar(0/+) in jet cone",3,binsFeedDownALaCone,xminFeedDownALaCone,xmaxFeedDownALaCone);
+
+
+  fh1MCProdRadiusK0s            = new TH1F("fh1MCProdRadiusK0s","MC gen. MC K0s prod radius",100,0.,100.);
+  fh1MCProdRadiusLambda         = new TH1F("fh1MCProdRadiusLambda","MC gen. MC La prod radius",100,0.,100.);
+  fh1MCProdRadiusAntiLambda     = new TH1F("fh1MCProdRadiusAntiLambda","MC gen. MC ALa prod radius",100,0.,100.);
 
   // Pt and inv mass distributions
 
-  fh1MCPtV0s                    = new TH1F("fh1MCPtV0s", "MC gen. V^{0} in rap range;#it{p}_{T} (GeV/#it{c})",200,0,20.);// 0.1 GeV/c steps
-  fh1MCPtK0s                    = new TH1F("fh1MCPtK0s", "MC gen. K^{0}_{s} in eta range;#it{p}_{T} (GeV/#it{c})",200,0.,20.);
-  fh1MCPtLambda                 = new TH1F("fh1MCPtLambda", "MC gen. #Lambda in rap range;#it{p}_{T} (GeV/#it{c})",200,0.,20.);
-  fh1MCPtAntiLambda             = new TH1F("fh1MCPtAntiLambda", "MC gen. #AntiLambda in rap range;#it{p}_{T} (GeV/#it{c})",200,0.,20.);
-  fh1MCXiPt                     = new TH1F("fh1MCXiPt", "MC gen. #Xi^{-/o};#it{p}_{T} (GeV/#it{c})",200,0.,20.);
-  fh1MCXibarPt                  = new TH1F("fh1MCXibarPt", "MC gen. #bar{#Xi}^{+/o};#it{p}_{T} (GeV/#it{c})",200,0.,20.);
-  fh2MCEtaVsPtK0s               = new TH2F("fh2MCEtaVsPtK0s","MC gen. K^{0}_{s} #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
-  fh2MCEtaVsPtLa                = new TH2F("fh2MCEtaVsPtLa","MC gen. #Lambda #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
-  fh2MCEtaVsPtALa               = new TH2F("fh2MCEtaVsPtALa","MC gen. #bar{#Lambda}  #eta; #it{p}_{T}",200,0.,20.,200,-1.,1.);
+  fh1MCPtV0s                    = new TH1F("fh1MCPtV0s", "MC gen. V^{0} in rap range;#it{p}_{T} (GeV/#it{c})",120,0,12.);// 0.1 GeV/c steps
+  fh1MCPtK0s                    = new TH1F("fh1MCPtK0s", "MC gen. K^{0}_{s} in eta range;#it{p}_{T} (GeV/#it{c})",120,0.,12.);
+  fh1MCPtLambda                 = new TH1F("fh1MCPtLambda", "MC gen. #Lambda in rap range;#it{p}_{T} (GeV/#it{c})",120,0.,12.);
+  fh1MCPtAntiLambda             = new TH1F("fh1MCPtAntiLambda", "MC gen. #AntiLambda in rap range;#it{p}_{T} (GeV/#it{c})",120,0.,12.);
+  fh1MCXiPt                     = new TH1F("fh1MCXiPt", "MC gen. #Xi^{-/o};#it{p}_{T} (GeV/#it{c})",120,0.,12.);
+  fh1MCXibarPt                  = new TH1F("fh1MCXibarPt", "MC gen. #bar{#Xi}^{+/o};#it{p}_{T} (GeV/#it{c})",120,0.,12.);
+  fh2MCEtaVsPtK0s               = new TH2F("fh2MCEtaVsPtK0s","MC gen. K^{0}_{s} #eta; #it{p}_{T}",120,0.,12.,200,-1.,1.);
+  fh2MCEtaVsPtLa                = new TH2F("fh2MCEtaVsPtLa","MC gen. #Lambda #eta; #it{p}_{T}",120,0.,12.,200,-1.,1.);
+  fh2MCEtaVsPtALa               = new TH2F("fh2MCEtaVsPtALa","MC gen. #bar{#Lambda}  #eta; #it{p}_{T}",120,0.,12.,200,-1.,1.);
 
   // Rapidity
-  fh1MCRapK0s                   = new TH1F("fh1MCRapK0s", "MC gen. K0s;rap with cut",200,-10,10); 
-  fh1MCRapLambda                = new TH1F("fh1MCRapLambda", "MC gen. #Lambda;rap",200,-10,10);
-  fh1MCRapAntiLambda            = new TH1F("fh1MCRapAntiLambda", "MC gen. #bar{#Lambda};rap",200,-10,10);
+  //fh1MCRapK0s                   = new TH1F("fh1MCRapK0s", "MC gen. K0s;rap with cut",200,-10,10); 
+  //fh1MCRapLambda                = new TH1F("fh1MCRapLambda", "MC gen. #Lambda;rap",200,-10,10);
+  //fh1MCRapAntiLambda            = new TH1F("fh1MCRapAntiLambda", "MC gen. #bar{#Lambda};rap",200,-10,10);
   fh1MCEtaAllK0s                = new TH1F("fh1MCEtaAllK0s", "MC gen. K0s;#eta",200,-1.,1.); 
   fh1MCEtaK0s                   = new TH1F("fh1MCEtaK0s", "MC gen. K0s;#eta with cut",200,-1.,1.); 
   fh1MCEtaLambda                = new TH1F("fh1MCEtaLambda", "MC gen. #Lambda;#eta",200,-1.,1.);
@@ -1563,18 +1818,16 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
   fV0QAK0->DefineHistos();
   fFFHistosRecCuts->DefineHistos();
   fFFHistosRecCutsK0Evt->DefineHistos();
-  fFFHistosIMK0AllEvt->DefineHistos();
+  /* fFFHistosIMK0AllEvt->DefineHistos();
   fFFHistosIMK0Jet->DefineHistos();
   fFFHistosIMK0Cone->DefineHistos();
-  fFFHistosPhiCorrIMK0->DefineHistos();
   fFFHistosIMLaAllEvt->DefineHistos();
   fFFHistosIMLaJet->DefineHistos();
   fFFHistosIMLaCone->DefineHistos();
-  fFFHistosPhiCorrIMLa->DefineHistos();
   fFFHistosIMALaAllEvt->DefineHistos();
   fFFHistosIMALaJet->DefineHistos();
   fFFHistosIMALaCone->DefineHistos();
-  fFFHistosPhiCorrIMALa->DefineHistos();
+  */
 
   const Int_t saveLevel = 5;
   if(saveLevel>0){
@@ -1600,33 +1853,29 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
     fCommonHistList->Add(fh1JetEta);        
     fCommonHistList->Add(fh1JetPhi);               
     fCommonHistList->Add(fh2JetEtaPhi);
-    fCommonHistList->Add(fh1V0JetPt); 
+    //fCommonHistList->Add(fh1V0JetPt); 
+    fCommonHistList->Add(fh1IMK0Cone);
+    fCommonHistList->Add(fh1IMLaCone);
+    fCommonHistList->Add(fh1IMALaCone);
     fCommonHistList->Add(fh2FFJetTrackEta);   
-    fCommonHistList->Add(fh1trackPosNCls);           
-    fCommonHistList->Add(fh1trackNegNCls);          
+    // fCommonHistList->Add(fh1trackPosNCls);           
+    //fCommonHistList->Add(fh1trackNegNCls);          
     fCommonHistList->Add(fh1trackPosEta);            
     fCommonHistList->Add(fh1trackNegEta);          
     fCommonHistList->Add(fh1V0Eta); 
-    fCommonHistList->Add(fh1V0totMom);        
-    fCommonHistList->Add(fh1CosPointAngle);        
-    fCommonHistList->Add(fh1Chi2Pos);                 
-    fCommonHistList->Add(fh1Chi2Neg);              
+    // fCommonHistList->Add(fh1V0totMom);        
+    fCommonHistList->Add(fh1CosPointAngle);                      
     fCommonHistList->Add(fh1DecayLengthV0); 
     fCommonHistList->Add(fh2ProperLifetimeK0sVsPtBeforeCut);
     fCommonHistList->Add(fh2ProperLifetimeK0sVsPtAfterCut);
-    fCommonHistList->Add(fh1ProperLifetimeV0BeforeCut);
-    fCommonHistList->Add(fh1ProperLifetimeV0AfterCut);
     fCommonHistList->Add(fh1V0Radius);     
     fCommonHistList->Add(fh1DcaV0Daughters);        
     fCommonHistList->Add(fh1DcaPosToPrimVertex);   
     fCommonHistList->Add(fh1DcaNegToPrimVertex);    
     fCommonHistList->Add(fh2ArmenterosBeforeCuts);
     fCommonHistList->Add(fh2ArmenterosAfterCuts);
-    fCommonHistList->Add(fh2BB3SigProton);
     fCommonHistList->Add(fh2BBLaPos);
     fCommonHistList->Add(fh2BBLaNeg);
-    fCommonHistList->Add(fh1CrossedRowsOverFindableNeg);
-    fCommonHistList->Add(fh1CrossedRowsOverFindablePos);
     fCommonHistList->Add(fh1PosDaughterCharge);
     fCommonHistList->Add(fh1NegDaughterCharge);
     fCommonHistList->Add(fh1PtMCK0s);
@@ -1634,44 +1883,86 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
     fCommonHistList->Add(fh1PtMCALa);
     fCommonHistList->Add(fh1EtaK0s);
     fCommonHistList->Add(fh1EtaLa);
-    fCommonHistList->Add(fh1EtaALa);  
-    fCommonHistList->Add(fh3InvMassEtaTrackPtK0s);
-    fCommonHistList->Add(fh3InvMassEtaTrackPtLa);
-    fCommonHistList->Add(fh3InvMassEtaTrackPtALa);
-    fCommonHistList->Add(fh1noAssociatedK0s); 
+    fCommonHistList->Add(fh1EtaALa);
+    fCommonHistList->Add(fh1RC);   
+    fCommonHistList->Add(fh1RCBiasK0);
+    fCommonHistList->Add(fh1RCBiasLa);
+    fCommonHistList->Add(fh1RCBiasALa);                       
+    fCommonHistList->Add(fh1MCC);                          
+    fCommonHistList->Add(fh1OC);                          
+    fCommonHistList->Add(fh1NJ);              
+    fCommonHistList->Add(fhnInvMassEtaTrackPtK0s);
+    fCommonHistList->Add(fhnInvMassEtaTrackPtLa);
+    fCommonHistList->Add(fhnInvMassEtaTrackPtALa);
     fCommonHistList->Add(fh1TrackMultCone);
     fCommonHistList->Add(fh2TrackMultCone);
-    fCommonHistList->Add(fh2MCgenK0Cone);
-    fCommonHistList->Add(fh2MCgenLaCone);
-    fCommonHistList->Add(fh2MCgenALaCone);
-    fCommonHistList->Add(fh2MCEtagenK0Cone);
-    fCommonHistList->Add(fh2MCEtagenLaCone);
-    fCommonHistList->Add(fh2MCEtagenALaCone);
-    fCommonHistList->Add(fh1FFIMK0ConeSmear);
-    fCommonHistList->Add(fh1FFIMLaConeSmear);
-    fCommonHistList->Add(fh1FFIMALaConeSmear);
-    fCommonHistList->Add(fh3MCrecK0Cone);
-    fCommonHistList->Add(fh3MCrecLaCone);
-    fCommonHistList->Add(fh3MCrecALaCone); 
-    fCommonHistList->Add(fh3MCrecK0ConeSmear);
-    fCommonHistList->Add(fh3MCrecLaConeSmear);
-    fCommonHistList->Add(fh3MCrecALaConeSmear); 
-    fCommonHistList->Add(fh3SecContinCone);
-    fCommonHistList->Add(fh3StrContinCone);
-    fCommonHistList->Add(fh3IMK0PerpCone);
-    fCommonHistList->Add(fh3IMLaPerpCone);
-    fCommonHistList->Add(fh3IMALaPerpCone);
-    fCommonHistList->Add(fh3IMK0MedianCone);
-    fCommonHistList->Add(fh3IMLaMedianCone);
-    fCommonHistList->Add(fh3IMALaMedianCone);
+    fCommonHistList->Add(fhnNJK0);
+    fCommonHistList->Add(fhnNJLa);
+    fCommonHistList->Add(fhnNJALa);
+    //fCommonHistList->Add(fh2MCgenK0Cone);
+    //fCommonHistList->Add(fh2MCgenLaCone);
+    //fCommonHistList->Add(fh2MCgenALaCone);
+    //fCommonHistList->Add(fh2MCEtagenK0Cone);
+    //fCommonHistList->Add(fh2MCEtagenLaCone);
+    //fCommonHistList->Add(fh2MCEtagenALaCone);
+    fCommonHistList->Add(fh2CorrHijingLaProton);
+    fCommonHistList->Add(fh2CorrInjectLaProton);
+    fCommonHistList->Add(fh2CorrHijingALaAProton);
+    fCommonHistList->Add(fh2CorrInjectALaAProton);
+    fCommonHistList->Add(fh2MCEtaVsPtHijingLa);
+    fCommonHistList->Add(fh2MCEtaVsPtInjectLa);
+    fCommonHistList->Add(fh2MCEtaVsPtHijingALa);
+    fCommonHistList->Add(fh2MCEtaVsPtInjectALa);
+    fCommonHistList->Add(fh1IMK0ConeSmear);
+    fCommonHistList->Add(fh1IMLaConeSmear);
+    fCommonHistList->Add(fh1IMALaConeSmear);
+    fCommonHistList->Add(fhnrecMCHijingLaIncl);
+    fCommonHistList->Add(fhnrecMCHijingLaCone);
+    fCommonHistList->Add(fhnrecMCHijingALaIncl);
+    fCommonHistList->Add(fhnrecMCHijingALaCone);
+    fCommonHistList->Add(fhnrecMCInjectLaIncl);
+    fCommonHistList->Add(fhnrecMCInjectLaCone);
+    fCommonHistList->Add(fhnrecMCInjectALaIncl);
+    fCommonHistList->Add(fhnrecMCInjectALaCone);
+    fCommonHistList->Add(fhnMCrecK0Cone);
+    fCommonHistList->Add(fhnMCrecLaCone);
+    fCommonHistList->Add(fhnMCrecALaCone); 
+    fCommonHistList->Add(fhnMCrecK0ConeSmear);
+    fCommonHistList->Add(fhnMCrecLaConeSmear);
+    fCommonHistList->Add(fhnMCrecALaConeSmear); 
+    fCommonHistList->Add(fhnK0sSecContinCone);
+    fCommonHistList->Add(fhnLaSecContinCone);
+    fCommonHistList->Add(fhnALaSecContinCone);
+    fCommonHistList->Add(fhnK0sIncl);
+    fCommonHistList->Add(fhnK0sCone);
+    fCommonHistList->Add(fhnLaIncl);
+    fCommonHistList->Add(fhnLaCone);
+    fCommonHistList->Add(fhnALaIncl);
+    fCommonHistList->Add(fhnALaCone);
+    fCommonHistList->Add(fhnK0sPC);
+    fCommonHistList->Add(fhnLaPC);
+    fCommonHistList->Add(fhnALaPC);
+    fCommonHistList->Add(fhnK0sMCC);
+    fCommonHistList->Add(fhnLaMCC);
+    fCommonHistList->Add(fhnALaMCC);
+    fCommonHistList->Add(fhnK0sRC);
+    fCommonHistList->Add(fhnLaRC);
+    fCommonHistList->Add(fhnALaRC);
+    fCommonHistList->Add(fhnK0sRCBias);
+    fCommonHistList->Add(fhnLaRCBias);
+    fCommonHistList->Add(fhnALaRCBias);
+    fCommonHistList->Add(fhnK0sOC);
+    fCommonHistList->Add(fhnLaOC);
+    fCommonHistList->Add(fhnALaOC);
+    fCommonHistList->Add(fh1AreaExcluded); 
+    fCommonHistList->Add(fh1MedianEta);
+    fCommonHistList->Add(fh1JetPtMedian);
     fCommonHistList->Add(fh1MCMultiplicityPrimary);       
     fCommonHistList->Add(fh1MCMultiplicityTracks);       
-    fCommonHistList->Add(fh1MCmotherLa);
-    fCommonHistList->Add(fh1MCmotherALa);
-    fCommonHistList->Add(fh3FeedDownLa);
-    fCommonHistList->Add(fh3FeedDownALa);
-    fCommonHistList->Add(fh3FeedDownLaCone);
-    fCommonHistList->Add(fh3FeedDownALaCone);
+    fCommonHistList->Add(fhnFeedDownLa);
+    fCommonHistList->Add(fhnFeedDownALa);
+    fCommonHistList->Add(fhnFeedDownLaCone);
+    fCommonHistList->Add(fhnFeedDownALaCone);
     fCommonHistList->Add(fh1MCProdRadiusK0s);
     fCommonHistList->Add(fh1MCProdRadiusLambda);
     fCommonHistList->Add(fh1MCProdRadiusAntiLambda);
@@ -1684,35 +1975,34 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
     fCommonHistList->Add(fh2MCEtaVsPtK0s); 
     fCommonHistList->Add(fh2MCEtaVsPtLa);
     fCommonHistList->Add(fh2MCEtaVsPtALa);     
-    fCommonHistList->Add(fh1MCRapK0s);
-    fCommonHistList->Add(fh1MCRapLambda);
-    fCommonHistList->Add(fh1MCRapAntiLambda);   
+    //fCommonHistList->Add(fh1MCRapK0s);
+    //fCommonHistList->Add(fh1MCRapLambda);
+    //fCommonHistList->Add(fh1MCRapAntiLambda);   
     fCommonHistList->Add(fh1MCEtaAllK0s);
     fCommonHistList->Add(fh1MCEtaK0s);
     fCommonHistList->Add(fh1MCEtaLambda);
     fCommonHistList->Add(fh1MCEtaAntiLambda);         
 
+
+
     fV0QAK0->AddToOutput(fCommonHistList);
     fFFHistosRecCuts->AddToOutput(fCommonHistList);
     fFFHistosRecCutsK0Evt->AddToOutput(fCommonHistList);
-    fFFHistosIMK0AllEvt->AddToOutput(fCommonHistList);
-    fFFHistosIMK0Jet->AddToOutput(fCommonHistList);
-    fFFHistosIMK0Cone->AddToOutput(fCommonHistList);
-    fFFHistosPhiCorrIMK0->AddToOutput(fCommonHistList);
-    fFFHistosIMLaAllEvt->AddToOutput(fCommonHistList);
-    fFFHistosIMLaJet->AddToOutput(fCommonHistList);
-    fFFHistosIMLaCone->AddToOutput(fCommonHistList);
-    fFFHistosPhiCorrIMLa->AddToOutput(fCommonHistList);
-    fFFHistosIMALaAllEvt->AddToOutput(fCommonHistList);
-    fFFHistosIMALaJet->AddToOutput(fCommonHistList);
-    fFFHistosIMALaCone->AddToOutput(fCommonHistList);
-    fFFHistosPhiCorrIMALa->AddToOutput(fCommonHistList);
+    // fFFHistosIMK0AllEvt->AddToOutput(fCommonHistList);
+    // fFFHistosIMK0Jet->AddToOutput(fCommonHistList);
+    // fFFHistosIMK0Cone->AddToOutput(fCommonHistList);
+    // fFFHistosIMLaAllEvt->AddToOutput(fCommonHistList);
+    // fFFHistosIMLaJet->AddToOutput(fCommonHistList);
+    // fFFHistosIMLaCone->AddToOutput(fCommonHistList);
+    // fFFHistosIMALaAllEvt->AddToOutput(fCommonHistList);
+    // fFFHistosIMALaJet->AddToOutput(fCommonHistList);
+    // fFFHistosIMALaCone->AddToOutput(fCommonHistList);
     
  
   }
 
-   // =========== Switch on Sumw2 for all histos ===========
-   for (Int_t i=0; i<fCommonHistList->GetEntries(); ++i){
+    // =========== Switch on Sumw2 for all histos ===========
+  for (Int_t i=0; i<fCommonHistList->GetEntries(); ++i){
 
    TH1 *h1 = dynamic_cast<TH1*>(fCommonHistList->At(i));
  
@@ -1724,7 +2014,7 @@ void AliAnalysisTaskJetChem::UserCreateOutputObjects()
 
   }
   TH1::AddDirectory(oldStatus);
+ PostData(1, fCommonHistList); 
 }
 
 //_______________________________________________
@@ -1741,6 +2031,14 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
   AliInputEventHandler* inputHandler = (AliInputEventHandler*)
     ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
   
+
+  //for AliPIDResponse:
+  //AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
+  //AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
+  fPIDResponse = inputHandler->GetPIDResponse();
+
+  if (!fPIDResponse){if(fDebug > 1) Printf("AliAnalysisTaskJetChem::UserExec(): fPIDResponse does not exist!"); return;}
+
   //std::cout<<"inputHandler->IsEventSelected(): "<<inputHandler->IsEventSelected()<<std::endl;
   //std::cout<<"fEvtSelectionMask: "<<fEvtSelectionMask<<std::endl;
   
@@ -1963,7 +2261,7 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
   
     //____ fetch jets _______________________________________________________________
 
-  Int_t nJCuts = GetListOfJets(fJetsRecCuts, kJetsRecAcceptance);//fetch list with jets
+  Int_t nJCuts = GetListOfJets(fJetsRecCuts, kJetsRecAcceptance);//fetch list with jets that survived all jet cuts: fJetsRecCuts
 
   Int_t nRecJetsCuts = 0;                                        //number of reconstructed jets after jet cuts
   if(nJCuts>=0) nRecJetsCuts = fJetsRecCuts->GetEntries(); 
@@ -1993,9 +2291,11 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
 
   Int_t nK0s = GetListOfV0s(fListK0s,fK0Type,kK0,myPrimaryVertex,fAOD);//all V0s in event with K0s assumption
   
+  if(fDebug>5){std::cout<<"fK0Type: "<<fK0Type<<" kK0: "<<kK0<<" myPrimaryVertex: "<<myPrimaryVertex<<" fAOD:  "<<fAOD<<std::endl;} 
+
   //std::cout<< "nK0s: "<<nK0s<<std::endl;
 
-  if(fDebug>2)Printf("%s:%d Selected Rec tracks after cuts: %d %d",(char*)__FILE__,__LINE__,nK0s,fListK0s->GetEntries());
+  if(fDebug>2)Printf("%s:%d Selected V0s after cuts: %d %d",(char*)__FILE__,__LINE__,nK0s,fListK0s->GetEntries());
   if(nK0s != fListK0s->GetEntries()) Printf("%s:%d Mismatch selected K0s: %d %d",(char*)__FILE__,__LINE__,nK0s,fListK0s->GetEntries());
   fh1K0Mult->Fill(fListK0s->GetEntries());
 
@@ -2031,23 +2331,31 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
       
       //MC gen K0s                  
       
-      Double_t fRapCurrentPart   = MyRapidity(mcp0->E(),mcp0->Pz());
+      //Double_t fRapCurrentPart   = MyRapidity(mcp0->E(),mcp0->Pz());
       Double_t fEtaCurrentPart   = mcp0->Eta();
       Double_t fPtCurrentPart    = mcp0->Pt();
       
       fh1MCEtaK0s->Fill(fEtaCurrentPart); 
-      fh1MCRapK0s->Fill(fRapCurrentPart);
+      //fh1MCRapK0s->Fill(fRapCurrentPart);
       fh1MCPtK0s->Fill(fPtCurrentPart);          
       
       fh2MCEtaVsPtK0s->Fill(fPtCurrentPart,fEtaCurrentPart);                  //eta cut, physical primary selection and decay mode considered
-      
+
     }//end of the loop
-    
-    
+        
     Int_t nMCgenLa = GetListOfMCParticles(fListMCgenLa,kLambda,fAOD); //fill TList with MC generated primary true Lambdas (list to fill, particletype, mc aod event)
     if(nMCgenLa != fListMCgenLa->GetEntries()) Printf("%s:%d Mismatch selected MCgenLa: %d %d",(char*)__FILE__,__LINE__,nMCgenLa,fListMCgenLa->GetEntries());
 
-       
+    TList *mclist = fAOD->GetList();   
+    TClonesArray *stackMC = 0x0;
+    stackMC = (TClonesArray*)mclist->FindObject(AliAODMCParticle::StdBranchName());
+    if (!stackMC) {
+      Printf("ERROR: AliAnalysisTaskJetChem.cxx: loop over MC gen. particles: stackMC not available!");
+    }
+    
+    AliAODMCHeader *mcHdr=(AliAODMCHeader*)mclist->FindObject(AliAODMCHeader::StdBranchName());
+    if(!mcHdr)Printf("ERROR: AliAnalysisTaskJetChem.cxx: loop over MC gen. particles: mcHdr not available!");
+         
     for(Int_t it=0; it<fListMCgenLa->GetSize(); ++it){ // loop MC generated La, filling histograms
       
       AliAODMCParticle* mcp0 = dynamic_cast<AliAODMCParticle*>(fListMCgenLa->At(it));
@@ -2055,18 +2363,33 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          
       //MC gen Lambdas  
       
-      Double_t fRapCurrentPart   = MyRapidity(mcp0->E(),mcp0->Pz());
+      //Double_t fRapCurrentPart   = MyRapidity(mcp0->E(),mcp0->Pz());
       Double_t fEtaCurrentPart   = mcp0->Eta();
       Double_t fPtCurrentPart    = mcp0->Pt();
+      TString generatorName;
       
       fh1MCEtaLambda->Fill(fEtaCurrentPart); 
-      fh1MCRapLambda->Fill(fRapCurrentPart);
+      //fh1MCRapLambda->Fill(fRapCurrentPart);
       fh1MCPtLambda->Fill(fPtCurrentPart);       
       fh2MCEtaVsPtLa->Fill(fPtCurrentPart,fEtaCurrentPart);                  //eta cut, physical primary selection and decay mode considered
-      
-    }//end of the loop
+
+      Int_t mcp0label = mcp0->GetLabel();
+      Bool_t istrackInject = IsTrackInjected(mcp0label, mcHdr, stackMC, generatorName);  
+    
+      //std::cout<<"generatorName: "<<generatorName<<std::endl;
 
 
+      if(generatorName == "Hijing"){
+       fh2MCEtaVsPtHijingLa->Fill(fPtCurrentPart,fEtaCurrentPart);
+      }
+      
+      if(istrackInject == kTRUE){
+       fh2MCEtaVsPtInjectLa->Fill(fPtCurrentPart,fEtaCurrentPart);
+      }  
+      
+    }//end of the loop
+      
+      
     Int_t nMCgenALa = GetListOfMCParticles(fListMCgenALa,kAntiLambda,fAOD); //fill TList with MC generated primary true Antilambdas (list to fill, particletype, mc aod event)
     if(nMCgenALa != fListMCgenALa->GetEntries()) Printf("%s:%d Mismatch selected MCgenALa: %d %d",(char*)__FILE__,__LINE__,nMCgenALa,fListMCgenALa->GetEntries());
   
@@ -2078,14 +2401,31 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
       
       //MC gen Antilambdas                  
       
-      Double_t fRapCurrentPart   = MyRapidity(mcp0->E(),mcp0->Pz());
+      //Double_t fRapCurrentPart   = MyRapidity(mcp0->E(),mcp0->Pz());
       Double_t fEtaCurrentPart   = mcp0->Eta();
       Double_t fPtCurrentPart    = mcp0->Pt();
-      
+      TString generatorName;
+
       fh1MCEtaAntiLambda->Fill(fEtaCurrentPart); 
-      fh1MCRapAntiLambda->Fill(fRapCurrentPart);
+      //fh1MCRapAntiLambda->Fill(fRapCurrentPart);
       fh1MCPtAntiLambda->Fill(fPtCurrentPart);   
       fh2MCEtaVsPtALa->Fill(fPtCurrentPart,fEtaCurrentPart);                  //eta cut, physical primary selection and decay mode considered
+
+
+      Int_t mcp0label = mcp0->GetLabel();
+      Bool_t istrackInject = IsTrackInjected(mcp0label, mcHdr, stackMC, generatorName);  
+    
+      //std::cout<<"generatorName: "<<generatorName<<std::endl;
+
+
+      if(generatorName == "Hijing"){
+       fh2MCEtaVsPtHijingALa->Fill(fPtCurrentPart,fEtaCurrentPart);
+      }
+      
+      if(istrackInject == kTRUE){
+       fh2MCEtaVsPtInjectALa->Fill(fPtCurrentPart,fEtaCurrentPart);
+      }  
+
        
     }//end of the loop
 
@@ -2106,17 +2446,16 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
   lPrimaryVtxPosition[0] = primVtx->GetX();
   lPrimaryVtxPosition[1] = primVtx->GetY();
   lPrimaryVtxPosition[2] = primVtx->GetZ();
-  
+  Double_t dRadiusExcludeCone = 2*GetFFRadius(); //2 times jet radius
   //------------------------------------------
-  for(Int_t it=0; it<fListK0s->GetSize(); ++it){ // loop all K0s 
-         
+ for(Int_t it=0; it<fListK0s->GetSize(); ++it){ 
+        
     AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListK0s->At(it));
     if(!v0) continue;
-    
+
     // VO's main characteristics to check the reconstruction cuts
     
-    Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
+    //Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
     Double_t invMK0s=0;
     Double_t trackPt=0;   
     Double_t fV0Radius      = -999;
@@ -2142,45 +2481,87 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
     
     CalculateInvMass(v0, kK0, invMK0s, trackPt);  //function to calculate invMass with TLorentzVector class
     
-    Double_t jetPt = fFFIMJetPtMin; // assign pro forma jet energy
-    //Double_t fRap = v0->RapK0Short();
+    //OUTSIDE CONES:########
+
     Double_t fEta = v0->PseudoRapV0();
+    Bool_t bIsInCone = kFALSE;//init boolean, is not in any cone (OC)
+    Int_t nRemainingJets = nRecJetsCuts; //init value    Int_t nRemainingJets = nRecJetsCuts; //init value 
+
+    for(Int_t ij=0; ij<nRecJetsCuts; ++ij){ // loop over all jets in event 
+      
+      AliAODJet* jet = (AliAODJet*) (fJetsRecCuts->At(ij));
+      jettracklist->Clear();
+      Double_t sumPt      = 0.;
+      Bool_t isBadJet     = kFALSE;
+      if(GetFFRadius()<=0){
+       GetJetTracksTrackrefs(jettracklist, jet, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);// list of jet tracks from trackrefs
+      } else {
+       GetJetTracksPointing(fTracksRecCuts, jettracklist, jet, GetFFRadius(), sumPt, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);  // fill list of tracks in cone around jet axis with cone Radius (= 0.4 standard)
+      }
+      
+      //leading track pt bias on jets inside this small jet loop
+      //APPLICATION OF REMAINING JET CUTS (leading track pt bias etc..):
+      if(isBadJet){
+       nRemainingJets = nRemainingJets-1;//remove one jet from nRemainingJets (was initialized with nRecJetsCuts) continue;//all bad jets are rejected
+       continue;
+      }
+
+      //if jet is selected, then check whether V0 is part of the jet cone:
+      if(IsParticleInCone(jet, v0, dRadiusExcludeCone) == kTRUE) {bIsInCone = kTRUE;}
+      
+      jettracklist->Clear();
+    }
+    
+    if((bIsInCone==kFALSE)&&(nRemainingJets > 0)){//K0s is not part of any selected jet in event, but its a jet event
+      Double_t vK0sOC[3] = {invMK0s,trackPt,fEta};
+      fhnK0sOC->Fill(vK0sOC);      
+    }
     
+    //end of outside cone K0s
+   
     Double_t fV0cosPointAngle = v0->CosPointingAngle(lPrimaryVtxPosition);
 
     lV0Position[0]= v0->DecayVertexV0X();  
     lV0Position[1]= v0->DecayVertexV0Y();  
     lV0Position[2]= v0->DecayVertexV0Z();
     
-    Double_t fV0mom[3];
-    
-    fV0mom[0]=v0->MomV0X();
-    fV0mom[1]=v0->MomV0Y();
-    fV0mom[2]=v0->MomV0Z();
-    Double_t fV0TotalMomentum = TMath::Sqrt(fV0mom[0]*fV0mom[0]+fV0mom[1]*fV0mom[1]+fV0mom[2]*fV0mom[2]);
     Double_t fV0DecayLength = v0->DecayLengthV0(lPrimaryVtxPosition);
     fV0Radius  = TMath::Sqrt(lV0Position[0]*lV0Position[0]+lV0Position[1]*lV0Position[1]);
+
     
     fV0QAK0->FillTrackQA(v0->Eta(), TVector2::Phi_0_2pi(v0->Phi()), v0->Pt()); 
-    fFFHistosIMK0AllEvt->FillFF(trackPt, invMK0s, jetPt, incrementJetPt);
+    //fFFHistosIMK0AllEvt->FillFF(trackPt, invMK0s, jetPt, incrementJetPt);
     //fh1trackPosNCls->Fill(trackPosNcls);
     //fh1trackNegNCls->Fill(trackNegNcls);
     fh1EtaK0s->Fill(fEta);
+
+    Double_t vK0sIncl[3] = {invMK0s,trackPt,fEta}; //fill all K0s in event into THnSparse of 3 dimensions
+    fhnK0sIncl->Fill(vK0sIncl);
+
+
     if(fAnalysisMC){
+      TString generatorName;
+      Bool_t isinjected;
       TList *listmc = fAOD->GetList();
-      Bool_t mclabelcheck = MCLabelCheck(v0, kK0, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+      Bool_t mclabelcheck = MCLabelCheck(v0, kK0, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
       //if(fPhysicalPrimary == kFALSE)continue;
       //std::cout<<"mclabelcheck: "<<mclabelcheck<<std::endl;
       //std::cout<<"IsPhysicalPrimary: "<<fPhysicalPrimary<<std::endl;
 
       if(mclabelcheck == kFALSE)continue;
-      fh3InvMassEtaTrackPtK0s->Fill(fEta,invMK0s,trackPt);//includes also feeddown particles
+      
+      Double_t vInvMassEtaTrackPtK0s[3] = {fEta,invMK0s,trackPt};
+      fhnInvMassEtaTrackPtK0s->Fill(vInvMassEtaTrackPtK0s);//includes also feeddown particles, mainly phi particles whose decay products are considered here as primary
+
+
       fh1PtMCK0s->Fill(MCPt);
     }
  
 
     fh1V0Eta->Fill(fEta);
-    fh1V0totMom->Fill(fV0TotalMomentum);
+    //fh1V0totMom->Fill(fV0TotalMomentum);
     fh1CosPointAngle->Fill(fV0cosPointAngle);
     fh1DecayLengthV0->Fill(fV0DecayLength);
     fh1V0Radius->Fill(fV0Radius);
@@ -2201,7 +2582,7 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
     if(!v0) continue;
     
     // VO's main characteristics to check the reconstruction cuts
-    Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
+    //  Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
     Double_t invMLa =0;
     Double_t trackPt=0;
     Double_t fV0Radius      = -999;
@@ -2224,19 +2605,49 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
     Double_t PosEta = trackPos->AliAODTrack::Eta();//daughter track charge is sometimes wrong here, account for that!!!
     Double_t NegEta = trackNeg->AliAODTrack::Eta();
     
+    Double_t fEta = v0->PseudoRapV0();
+    Bool_t bIsInCone = kFALSE;//init boolean, is not in any cone (OC)
+    Int_t nRemainingJets = nRecJetsCuts; //init value 
+
     CalculateInvMass(v0, kLambda, invMLa, trackPt);//function to calculate invMass with TLorentzVector class
     
     
-    Double_t jetPt = fFFIMJetPtMin; // assign pro forma jet energy
-    // Double_t fRap = v0->Y(3122);
-    Double_t fEta = v0->PseudoRapV0();
+    for(Int_t ij=0; ij<nRecJetsCuts; ++ij){ // loop over all jets in event 
+      
+      AliAODJet* jet = (AliAODJet*) (fJetsRecCuts->At(ij));
+      jettracklist->Clear();
+      Double_t sumPt      = 0.;
+      Bool_t isBadJet     = kFALSE;
+      if(GetFFRadius()<=0){
+       GetJetTracksTrackrefs(jettracklist, jet, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);// list of jet tracks from trackrefs
+      } else {
+       GetJetTracksPointing(fTracksRecCuts, jettracklist, jet, GetFFRadius(), sumPt, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);  // fill list of tracks in cone around jet axis with cone Radius (= 0.4 standard)
+      }
+      
+
+      //leading track pt bias on jets inside this small jet loop
+   
+      if(isBadJet){
+       nRemainingJets = nRemainingJets-1;//remove one jet from nRemainingJets (was initialized with nRecJetsCuts) continue;//all bad jets are rejected
+       continue;
+      }
+
+
+
+      if(IsParticleInCone(jet, v0, dRadiusExcludeCone) == kTRUE) {bIsInCone = kTRUE;}
+     
+      jettracklist->Clear();  
+    }  //end jet loop  
     
-    Double_t fV0mom[3];
+    if((bIsInCone == kFALSE)&&(nRemainingJets > 0)){//success! Lambda doesn't belong to any selected jet in event
+      Double_t vLaOC[3] = {invMLa, trackPt,fEta};
+      fhnLaOC->Fill(vLaOC); 
+    }
+    
+    // Double_t jetPt = fFFIMJetPtMin; // assign pro forma jet energy
+    // Double_t fRap = v0->Y(3122);
     
-    fV0mom[0]=v0->MomV0X();
-    fV0mom[1]=v0->MomV0Y();
-    fV0mom[2]=v0->MomV0Z();
-    Double_t fV0TotalMomentum = TMath::Sqrt(fV0mom[0]*fV0mom[0]+fV0mom[1]*fV0mom[1]+fV0mom[2]*fV0mom[2]);
     Double_t fV0DecayLength = v0->DecayLengthV0(lPrimaryVtxPosition);
     Double_t fV0cosPointAngle = v0->CosPointingAngle(lPrimaryVtxPosition);
     lV0Position[0]= v0->DecayVertexV0X();  
@@ -2245,20 +2656,50 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
     
     fV0Radius  = TMath::Sqrt(lV0Position[0]*lV0Position[0]+lV0Position[1]*lV0Position[1]);
     
-    fFFHistosIMLaAllEvt->FillFF(trackPt, invMLa, jetPt, incrementJetPt);
+    //fFFHistosIMLaAllEvt->FillFF(trackPt, invMLa, jetPt, incrementJetPt);
     //fh1trackPosNCls->Fill(trackPosNcls);
     //fh1trackNegNCls->Fill(trackNegNcls);
     fh1EtaLa->Fill(fEta);
-    if(fAnalysisMC){     
+
+    Double_t vLaIncl[3] = {invMLa,trackPt,fEta};
+    fhnLaIncl->Fill(vLaIncl);
+
+    if(fAnalysisMC){  
+   
+      TString generatorName;
+      Bool_t isinjected;
       TList* listmc = fAOD->GetList();
-      Bool_t mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+      Bool_t mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
       if(mclabelcheck == kFALSE)continue; 
       //if(fPhysicalPrimary == kFALSE)continue;
-       fh3InvMassEtaTrackPtLa->Fill(fEta,invMLa,trackPt);
+      
+      if(generatorName == "Hijing"){
+       Double_t vrecMCHijingLaIncl[3] = {invMLa,trackPt,fEta};
+       fhnrecMCHijingLaIncl->Fill(vrecMCHijingLaIncl);
+
+       Double_t protonPt = trackPos->Pt();
+       fh2CorrHijingLaProton->Fill(trackPt,protonPt);
+      }
+
+      if(isinjected == kTRUE){
+       Double_t vrecMCInjectLaIncl[3] = {invMLa,trackPt,fEta};
+       fhnrecMCInjectLaIncl->Fill(vrecMCInjectLaIncl);
+
+       Double_t protonPt = trackPos->Pt();
+       fh2CorrInjectLaProton->Fill(trackPt,protonPt);
+      }
+
+      Double_t vInvMassEtaTrackPtLa[3] = {fEta,invMLa,trackPt};
+      fhnInvMassEtaTrackPtLa->Fill(vInvMassEtaTrackPtLa);//includes also feed-down particles
+      fh1PtMCLa->Fill(MCPt);
+      
+
       fh1PtMCLa->Fill(MCPt);
+  
+
     }
     fh1V0Eta->Fill(fEta);
-    fh1V0totMom->Fill(fV0TotalMomentum);
+    //fh1V0totMom->Fill(fV0TotalMomentum);
     fh1CosPointAngle->Fill(fV0cosPointAngle);
     fh1DecayLengthV0->Fill(fV0DecayLength);
     fh1V0Radius->Fill(fV0Radius);
@@ -2297,45 +2738,101 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
       
     Double_t PosEta = trackPos->AliAODTrack::Eta();//daughter track charge is sometimes wrong here, account for that!!!
     Double_t NegEta = trackNeg->AliAODTrack::Eta();
-       
-    //Double_t trackPosNcls = trackPos->GetTPCNcls();//Get number of clusters for positive charged tracks //not used anymore by Strangeness PAG group
-    //Double_t trackNegNcls = trackNeg->GetTPCNcls();//Get number of clusters for negative charged tracks
+
+    Double_t fEta = v0->PseudoRapV0();
+    Bool_t bIsInCone = kFALSE;//init boolean for OC     
+    Int_t nRemainingJets = nRecJetsCuts; //init value 
     
     CalculateInvMass(v0, kAntiLambda, invMALa, trackPt);  //function to calculate invMass with TLorentzVector class
       
-    Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
-    Double_t jetPt = fFFIMJetPtMin; // assign pro forma jet energy
-    //      Double_t fRap = v0->Y(-3122);
-    Double_t fEta = v0->PseudoRapV0();
-    
-    Double_t fV0mom[3];
-    
-    fV0mom[0]=v0->MomV0X();
-    fV0mom[1]=v0->MomV0Y();
-    fV0mom[2]=v0->MomV0Z();
-    Double_t fV0TotalMomentum = TMath::Sqrt(fV0mom[0]*fV0mom[0]+fV0mom[1]*fV0mom[1]+fV0mom[2]*fV0mom[2]);
+    for(Int_t ij=0; ij<nRecJetsCuts; ++ij){ // loop over all jets in event 
+      
+      AliAODJet* jet = (AliAODJet*) (fJetsRecCuts->At(ij));
+      jettracklist->Clear();
+      Double_t sumPt      = 0.;
+      Bool_t isBadJet     = kFALSE;
 
-    Double_t fV0cosPointAngle = v0->CosPointingAngle(lPrimaryVtxPosition);
-    lV0Position[0]= v0->DecayVertexV0X();  
-    lV0Position[1]= v0->DecayVertexV0Y();  
-    lV0Position[2]= v0->DecayVertexV0Z();  
-    Double_t fV0DecayLength = v0->DecayLengthV0(lPrimaryVtxPosition);
-    fV0Radius  = TMath::Sqrt(lV0Position[0]*lV0Position[0]+lV0Position[1]*lV0Position[1]);
-       
-    fFFHistosIMALaAllEvt->FillFF(trackPt, invMALa, jetPt, incrementJetPt);
-    //fh1trackPosNCls->Fill(trackPosNcls);
+      if(GetFFRadius()<=0){
+       GetJetTracksTrackrefs(jettracklist, jet, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);// list of jet tracks from trackrefs
+      } else {
+       GetJetTracksPointing(fTracksRecCuts, jettracklist, jet, GetFFRadius(), sumPt, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);  // fill list of tracks in cone around jet axis with cone Radius (= 0.4 standard)
+      }
+      
+      //leading track pt bias on jets inside this small jet loop
+  
+      if(isBadJet){
+       nRemainingJets = nRemainingJets-1;//remove one jet from nRemainingJets (was initialized with nRecJetsCuts) continue;//all bad jets are rejected
+       continue;
+      }
+
+
+      if(IsParticleInCone(jet, v0, dRadiusExcludeCone) == kTRUE){
+       bIsInCone = kTRUE;      
+      }
+
+      jettracklist->Clear();
+    }
+    if((bIsInCone == kFALSE)&&(nRemainingJets > 0)){//success!
+      Double_t vALaOC[3] = {invMALa, trackPt,fEta};
+      fhnALaOC->Fill(vALaOC); 
+    }
+    
+    //Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
+    //Double_t jetPt = fFFIMJetPtMin; // assign pro forma jet energy
+    //      Double_t fRap = v0->Y(-3122);
+
+    
+    Double_t fV0cosPointAngle = v0->CosPointingAngle(lPrimaryVtxPosition);
+    lV0Position[0]= v0->DecayVertexV0X();  
+    lV0Position[1]= v0->DecayVertexV0Y();  
+    lV0Position[2]= v0->DecayVertexV0Z();  
+    Double_t fV0DecayLength = v0->DecayLengthV0(lPrimaryVtxPosition);
+    fV0Radius  = TMath::Sqrt(lV0Position[0]*lV0Position[0]+lV0Position[1]*lV0Position[1]);
+       
+    //fFFHistosIMALaAllEvt->FillFF(trackPt, invMALa, jetPt, incrementJetPt);
+    //fh1trackPosNCls->Fill(trackPosNcls);
     //fh1trackNegNCls->Fill(trackNegNcls);
     fh1EtaALa->Fill(fEta);
+
+    Double_t vALaIncl[3] = {invMALa,trackPt,fEta};
+    fhnALaIncl->Fill(vALaIncl);
+
     if(fAnalysisMC){
+      TString generatorName;
+      Bool_t isinjected;
       TList* listmc = fAOD->GetList();
-      Bool_t mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+      Bool_t mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
       if(mclabelcheck == kFALSE)continue; 
-      //if(fPhysicalPrimary == kFALSE)continue;
-      fh3InvMassEtaTrackPtALa->Fill(fEta,invMALa,trackPt);
+      //if(fPhysicalPrimary == kFALSE)continue;//take also feeddown particles into account
+      
+      if(generatorName == "Hijing"){
+       Double_t vrecMCHijingALaIncl[3] = {invMALa,trackPt,fEta};
+       fhnrecMCHijingALaIncl->Fill(vrecMCHijingALaIncl);
+
+       Double_t aprotonPt = trackNeg->Pt();
+               fh2CorrHijingALaAProton->Fill(trackPt,aprotonPt);
+      }
+
+
+      if(isinjected == kTRUE){
+       Double_t vrecMCInjectALaIncl[3] = {invMALa,trackPt,fEta};
+       fhnrecMCInjectALaIncl->Fill(vrecMCInjectALaIncl);
+
+       Double_t aprotonPt = trackNeg->Pt();
+               fh2CorrInjectALaAProton->Fill(trackPt,aprotonPt);
+
+      }
+
+
+      Double_t vInvMassEtaTrackPtALa[3] = {fEta,invMALa,trackPt};
+      fhnInvMassEtaTrackPtALa->Fill(vInvMassEtaTrackPtALa);
       fh1PtMCALa->Fill(MCPt);
+
     }
     fh1V0Eta->Fill(fEta);
-    fh1V0totMom->Fill(fV0TotalMomentum);
+    //fh1V0totMom->Fill(fV0TotalMomentum);
     fh1CosPointAngle->Fill(fV0cosPointAngle);
     fh1DecayLengthV0->Fill(fV0DecayLength);
     fh1V0Radius->Fill(fV0Radius);
@@ -2348,54 +2845,168 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
   
   //_____no jets events______________________________________________________________________________________________________________________________________
 
-  if(nRecJetsCuts == 0){
-
-    // std::cout<<"################## found event without any jet!!!!!###################"<<std::endl;
+  if(nRecJetsCuts == 0){//no jet events, before the remaining jet cuts are applied, the second part for the non-jet events comes inside the jet loop
+        
+    fh1NJ->Fill(1.);//for normalisation by number of NJ events for events in which no rec. jets are found right from the beginning and before even the leading track bias is applied
+    
+    if(fDebug>6) { std::cout<<"################## nRecJetsCuts == 0 ###################"<<std::endl;
+      //std::cout<<"fListK0s->GetSize() in NJ event: "<<fListK0s->GetSize()<<std::endl;
+    }
+    
+    for(Int_t it=0; it<fListK0s->GetSize(); ++it){ // loop all K0s 
+      
+      AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListK0s->At(it));
+      if(!v0) continue;
+      
+      Double_t invMK0s =0;
+      Double_t trackPt=0;
+      CalculateInvMass(v0, kK0, invMK0s, trackPt);
+      Double_t fEta = v0->Eta();
 
+      Double_t vNJK0[3] = {invMK0s,trackPt,fEta}; //fill all K0s in events wo selected jets
+      fhnNJK0->Fill(vNJK0);
+      
+    }
+    
+    for(Int_t it=0; it<fListLa->GetSize(); ++it){ // loop all La 
+      
+      AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListLa->At(it));
+      if(!v0) continue;
+      
+      Double_t invMLa =0;
+      Double_t trackPt=0;      
+      CalculateInvMass(v0, kLambda, invMLa, trackPt);
+      Double_t fEta = v0->Eta();
 
-  }
+      Double_t vNJLa[3] = {invMLa,trackPt,fEta}; //fill all K0s in events wo selected jets
+      fhnNJLa->Fill(vNJLa);
 
+    } 
+    
+    for(Int_t it=0; it<fListALa->GetSize(); ++it){ // loop all ALa 
+      
+      AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListALa->At(it));
+      if(!v0) continue;
+      
+      Double_t invMALa =0;
+      Double_t trackPt=0;      
+      CalculateInvMass(v0, kAntiLambda, invMALa, trackPt);
 
+      Double_t fEta = v0->Eta();
 
+      Double_t vNJALa[3] = {invMALa,trackPt,fEta}; //fill all K0s in events wo selected jets
+      fhnNJALa->Fill(vNJALa);
+   
+      
+    } 
+    
+  }//no jet events
+  
   //____ fill all jet related histos  ________________________________________________________________________________________________________________________
   //##########################jet loop########################################################################################################################
-  
+
+  Int_t nSelJets = nRecJetsCuts; //init value
+  Bool_t IsOCEvt = kFALSE; //init for this outside cones normalisation histo (total number of OC events)
+  Bool_t IsRCEvt = kFALSE; //init for that the random cone is placed only once per event
+  Bool_t IsMCCEvt = kFALSE; //init for that the median cluster cone is placed only once per event
+
   //fill jet histos in general
-  for(Int_t ij=0; ij<nRecJetsCuts; ++ij){                               // ij is an index running over the list of the reconstructed jets after cuts, all jets in event
+  for(Int_t ij=0; ij<nRecJetsCuts; ++ij){                               // ij is an index running over the list of the reconstructed jets after most of the cuts, but not yet the leading track bias, all jets in event are looped
     
     AliAODJet* jet = (AliAODJet*) (fJetsRecCuts->At(ij));
 
     Double_t jetPt  = jet->Pt();
     Double_t jetEta = jet->Eta();
     Double_t jetPhi = jet->Phi();
-
+    
     //if(ij==0){ // loop over leading jets for ij = 0, for ij>= 0 look into all jets
 
     if(ij>=0){//all jets in event
 
-      TList* jettracklist = new TList();
+      jettracklist->Clear();
       Double_t sumPt      = 0.;
       Bool_t isBadJet     = kFALSE;
       Int_t njetTracks    = 0;
+
       if(GetFFRadius()<=0){
        GetJetTracksTrackrefs(jettracklist, jet, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);// list of jet tracks from trackrefs
       } else {
-       GetJetTracksPointing(fTracksRecCuts, jettracklist, jet, GetFFRadius(), sumPt, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);  // fill list of tracks in cone around jet axis with cone Radius (= 0.4 standard)
+       GetJetTracksPointing(fTracksRecCuts, jettracklist, jet, GetFFRadius(), sumPt, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);  // fill list of charged hybrid tracks in cone around jet axis with cone Radius (= 0.4 standard), application of leading track cut
       }
-      
+
+      //not applied at the moment:
       if(GetFFMinNTracks()>0 && jettracklist->GetSize() <= GetFFMinNTracks()) isBadJet = kTRUE; // reject jets with less tracks than fFFMinNTracks
-      if(isBadJet) continue; // rejects jets in which no track has a track pt higher than 5 GeV/c (see AddTask macro)
-     
 
-      Float_t fJetAreaMin = 0.6*TMath::Pi()*GetFFRadius()*GetFFRadius(); // minimum jet area cut
+      //APPLICATION OF REMAINING JET CUTS (leading track pt bias etc..) + NJ events
+      if(isBadJet) {
 
-      //std::cout<<"GetFFRadius(): "<<GetFFRadius()<<std::endl;
-      //std::cout<<"jet->EffectiveAreaCharged()"<<jet->EffectiveAreaCharged()<<std::endl;
-      //std::cout<<"fJetAreaMin: "<<fJetAreaMin<<std::endl;
+       nSelJets = nSelJets-1;//remove one jet from nSelJets (was initialized with nRecJetsCuts)
 
-      if (jet->EffectiveAreaCharged() < fJetAreaMin)continue;// cut on jet area
+       if(nSelJets == 0){//case that event doesn't contain no selected jets at all and there are no jets remaining to be looped over
 
+         fh1NJ->Fill(1.);//for normalisation by number of NJ events
+         
+         for(Int_t it=0; it<fListK0s->GetSize(); ++it){ // loop all K0s 
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListK0s->At(it));
+           if(!v0) continue;
+           
+           Double_t invMK0s =0;
+           Double_t trackPt=0;
+           CalculateInvMass(v0, kK0, invMK0s, trackPt);
+           Double_t fEta = v0->Eta();
+           
+           Double_t vNJK0[3] = {invMK0s,trackPt,fEta}; //fill all K0s in events wo selected jets
+           fhnNJK0->Fill(vNJK0);
+           
+         }
+         
+         for(Int_t it=0; it<fListLa->GetSize(); ++it){ // loop all La 
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListLa->At(it));
+           if(!v0) continue;
+           
+           Double_t invMLa =0;
+           Double_t trackPt=0; 
+           CalculateInvMass(v0, kLambda, invMLa, trackPt);
+           Double_t fEta = v0->Eta();
+           
+           Double_t vNJLa[3] = {invMLa,trackPt,fEta}; //fill all K0s in events wo selected jets
+           fhnNJLa->Fill(vNJLa);
+           
+         } 
+         
+         for(Int_t it=0; it<fListALa->GetSize(); ++it){ // loop all ALa 
+      
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListALa->At(it));
+           if(!v0) continue;
+           
+           Double_t invMALa =0;
+           Double_t trackPt=0; 
+           CalculateInvMass(v0, kAntiLambda, invMALa, trackPt);
+           
+           Double_t fEta = v0->Eta();
+           
+           Double_t vNJALa[3] = {invMALa,trackPt,fEta}; //fill all K0s in events wo selected jets
+           fhnNJALa->Fill(vNJALa);
+           
+           
+         }       
+        
+       }
+       continue;//rejection of current jet
+      } // rejects jets in which no track has a track pt higher than 5 GeV/c (see AddTask macro)
+      
+      if(IsOCEvt == kFALSE){IsOCEvt = kTRUE;fh1OC->Fill(1.);}//the first found jet triggers an OC event and is filled only once into normalisation histo
+      
+      //Float_t fJetAreaMin = 0.6*TMath::Pi()*GetFFRadius()*GetFFRadius(); // minimum jet area cut, already applied in JetListOfJets() in FF Task
+
+      //if(fDebug > 2)  {if (jet->EffectiveAreaCharged() < fJetAreaMin) {std::cout<<" fCutjetArea cut removed a jet!!!!! Should not have to be done again!!"<<std::endl;}}// cut on jet area, already done by jet selection in FF task
+      
+      Double_t dAreaExcluded = TMath::Pi()*dRadiusExcludeCone*dRadiusExcludeCone; // area of the cone
+      dAreaExcluded -= AreaCircSegment(dRadiusExcludeCone,fCutjetEta-jet->Eta()); // positive eta overhang
+      dAreaExcluded -= AreaCircSegment(dRadiusExcludeCone,fCutjetEta+jet->Eta()); // negative eta overhang
+      fh1AreaExcluded->Fill(dAreaExcluded);//histo contains all areas that are jet related and have to be excluded concerning OC UE pt spectrum normalisation by area
 
       fh1JetEta->Fill(jetEta);        
       fh1JetPhi->Fill(jetPhi);                
@@ -2413,8 +3024,8 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
 
        Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
        
-       fFFHistosRecCuts->FillFF(trackPt, jetPt, incrementJetPt);
-       if(nK0s>0) fFFHistosRecCutsK0Evt->FillFF(trackPt, jetPt, incrementJetPt);
+       fFFHistosRecCuts->FillFF(trackPt, jetPt, incrementJetPt);//histo with tracks/jets after cut selection, for all events
+       if(nK0s>0) fFFHistosRecCutsK0Evt->FillFF(trackPt, jetPt, incrementJetPt);//only for K0s events
        fh2FFJetTrackEta->Fill(trackEta,jetPt);
 
 
@@ -2423,8 +3034,8 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
       njetTracks = jettracklist->GetSize();
 
       //____________________________________________________________________________________________________________________      
-      //alternative method to estimate secondary constribution in jet cone (second method you can see below in rec. K0s loop & rec. Lambdas loop & rec. Antilambdas loop)
-
+      //strangeness constribution to jet cone 
+      /*
       if(fAnalysisMC){
 
        TList *list = fAOD->GetList();  
@@ -2490,23 +3101,18 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
              if  (mfl == 3 && codeM != 3) isFromStrange = kTRUE;
            }
     
-           //cut on primary particles:
-
-
-
-
            if(isFromStrange == kTRUE){
 
              Double_t trackPt = part->Pt();
              Double_t trackEta = part->Eta();
-             fh3StrContinCone->Fill(jetPt, trackPt, trackEta);//MC gen. particle parameters, but rec. jet pt
+             //fh3StrContinCone->Fill(jetPt, trackPt, trackEta);//MC gen. particle parameters, but rec. jet pt
                      
              }//isFromStrange is kTRUE  
          } //end else
        }//end loop over jet tracks
        
       }// end fAnalysisMC
-      
+      */
 
       fh1TrackMultCone->Fill(njetTracks);
       fh2TrackMultCone->Fill(njetTracks,jetPt);      
@@ -2525,37 +3131,36 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        TVector3 v0MomVect(v0Mom);
        
        Double_t dPhiJetK0 = (jet->MomentumVector()->Vect()).DeltaPhi(v0MomVect);
-       Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
+       //      Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
        
-       if(incrementJetPt){fh1V0JetPt->Fill(jetPt);}
+       //      if(incrementJetPt){fh1V0JetPt->Fill(jetPt);}
 
        Double_t invMK0s =0;
        Double_t trackPt=0;     
        CalculateInvMass(v0, kK0, invMK0s, trackPt);  //function to calculate invMass with TLorentzVector class
        
-       fFFHistosIMK0Jet->FillFF(trackPt, invMK0s, jetPt, incrementJetPt);
-       fFFHistosPhiCorrIMK0->FillPhiCorr(trackPt,TVector2::Phi_0_2pi(dPhiJetK0),invMK0s);  //filled for MC with all particles, no association checks (pdg code, proper decay mode etc..) or matching to MC truth
-       
+       //      fFFHistosIMK0Jet->FillFF(trackPt, invMK0s, jetPt, incrementJetPt);
+       
+
        if(dPhiJetK0<fh1dPhiJetK0->GetXaxis()->GetXmin()) dPhiJetK0 += 2*TMath::Pi();
        fh1dPhiJetK0->Fill(dPhiJetK0);
        
       }
 
-      if(fListK0s->GetSize() == 0){ // no K0: increment jet pt spectrum 
+      // if(fListK0s->GetSize() == 0){ // no K0: increment jet pt spectrum 
        
-       Bool_t incrementJetPt = kTRUE;
-       fFFHistosIMK0Jet->FillFF(-1, -1, jetPt, incrementJetPt);
-      }
+      //       Bool_t incrementJetPt = kTRUE;
+       //      fFFHistosIMK0Jet->FillFF(-1, -1, jetPt, incrementJetPt);
+      //  }
       
       //____fetch reconstructed K0s in cone around jet axis:_______________________________________________________________________________
       
-      TList* jetConeK0list = new TList();
+      jetConeK0list->Clear();
 
       Double_t sumPtK0     = 0.;
       
       Bool_t isBadJetK0    = kFALSE; // dummy, do not use
 
-
       GetTracksInCone(fListK0s, jetConeK0list, jet, GetFFRadius(), sumPtK0, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJetK0); //reconstructed K0s in cone around jet axis
     
       if(fDebug>2)Printf("%s:%d nK0s total: %d, in jet cone: %d,FFRadius %f ",(char*)__FILE__,__LINE__,nK0s,jetConeK0list->GetEntries(),GetFFRadius());
@@ -2569,38 +3174,213 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        Bool_t   incrementJetPt = (it==0) ? kTRUE : kFALSE;
        Double_t invMK0s =0;
        Double_t trackPt=0;
+       Double_t fEta=0;
+       fEta = v0->Eta();
        
        CalculateInvMass(v0, kK0, invMK0s, trackPt);  //function to calculate invMass with TLorentzVector class
 
+
        if(fAnalysisMC){
          Double_t jetPtSmear = -1;  
          SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);  
-         if(incrementJetPt == kTRUE){fh1FFIMK0ConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
+         if(incrementJetPt == kTRUE){fh1IMK0ConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
        }
 
-       fFFHistosIMK0Cone->FillFF(trackPt, invMK0s, jetPt, incrementJetPt);
+       if(incrementJetPt==kTRUE){
+         fh1IMK0Cone->Fill(jetPt);}//normalisation by number of selected jets
+
+       //fFFHistosIMK0Cone->FillFF(trackPt, invMK0s, jetPt, incrementJetPt);
+       
+       Double_t vK0sCone[4] = {jetPt, invMK0s,trackPt,fEta};
+       fhnK0sCone->Fill(vK0sCone);
       }
       
       
       if(jetConeK0list->GetSize() == 0){ // no K0: increment jet pt spectrum 
        
-       Bool_t incrementJetPt = kTRUE;
-       fFFHistosIMK0Cone->FillFF(-1, -1, jetPt, incrementJetPt);
+       
+       Bool_t incrementJetPt = kTRUE;//jets without K0s will be only filled in TH1F only once, so no increment needed 
+       //fFFHistosIMK0Cone->FillFF(-1, -1, jetPt, incrementJetPt);
+       Double_t vK0sCone[4] = {jetPt, -1, -1, -1};
+       fhnK0sCone->Fill(vK0sCone);
+
+       if(incrementJetPt==kTRUE){
+         fh1IMK0Cone->Fill(jetPt);}//normalisation by number of selected jets
+
        if(fAnalysisMC){
          Double_t jetPtSmear = -1;  
          SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);  
-         if(incrementJetPt == kTRUE){fh1FFIMK0ConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
+         if(incrementJetPt == kTRUE){fh1IMK0ConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
        }
       }    
+      
+      //Random cones________________________________________________________________________
+     
+
+      if(IsRCEvt == kFALSE){//fetch random cone V0s only once per event
+       
+
+       IsRCEvt = kTRUE;//set boolean to kTRUE once a random cone is placed per event
+       
+       AliAODJet* jetRC = 0;
+       jetRC = GetRandomCone(fJetsRecCuts, fCutjetEta, 2*GetFFRadius());//fetch one random cone for each event 
+       
+       fListK0sRC->Clear();//list for K0s in random cone (RC), one RC per event
+       fListLaRC->Clear();
+       fListALaRC->Clear();
+
+       Double_t sumPtK0sRC = 0;
+       Double_t sumPtLaRC = 0;
+       Double_t sumPtALaRC = 0;
+       Bool_t isBadJetK0sRC = kFALSE;
+       Bool_t isBadJetLaRC = kFALSE;
+       Bool_t isBadJetALaRC = kFALSE;
+
+       
+       if(jetRC != 0) {//if random cone was selected properly and fullfilling all the requirements
+
+       //fetch V0s in RC:
+         fh1RC->Fill(1.);//for normalisation purposes
+
+         GetTracksInCone(fListK0s, fListK0sRC, jetRC, GetFFRadius(), sumPtK0sRC, 0, 0, isBadJetK0sRC);
+         
+         //________________fill RC with all V0s__________________
+         for(Int_t it=0; it<fListK0sRC->GetSize(); ++it){ // loop for K0s in random cone
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListK0sRC->At(it));
+           if(!v0) continue;
+           
+           Double_t invMK0s =0;
+           Double_t trackPt=0;
+           Double_t fEta=0;
+           fEta = v0->Eta();
+               
+           CalculateInvMass(v0, kK0, invMK0s, trackPt);  //function to calculate invMass with TLorentzVector class
+           
+           Double_t vK0sRC[3] = {invMK0s,trackPt,fEta};
+           fhnK0sRC->Fill(vK0sRC);
+         }
+         
+       
+         
+         GetTracksInCone(fListLa, fListLaRC, jetRC, GetFFRadius(), sumPtLaRC, 0, 0, isBadJetLaRC);
+         
+         for(Int_t it=0; it<fListLaRC->GetSize(); ++it){ // loop for Lambdas in random cone
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListLaRC->At(it));
+           if(!v0) continue;
+           
+           Double_t invMLa =0;
+           Double_t trackPt=0;
+           Double_t fEta=0;
+           fEta = v0->Eta();
+           
+           CalculateInvMass(v0, kLambda, invMLa, trackPt);  //function to calculate invMass with TLorentzVector class
+           
+           Double_t vLaRC[3] = {invMLa,trackPt,fEta};
+           fhnLaRC->Fill(vLaRC);
+         }
+       
+       
+         
+         GetTracksInCone(fListALa, fListALaRC, jetRC, GetFFRadius(), sumPtALaRC, 0, 0, isBadJetALaRC);
+         
+         for(Int_t it=0; it<fListALaRC->GetSize(); ++it){ // loop for Lambdas in random cone
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListALaRC->At(it));
+           if(!v0) continue;
+           
+           Double_t invMALa =0;
+           Double_t trackPt=0;
+           Double_t fEta=0;
+           fEta = v0->Eta();
+               
+           CalculateInvMass(v0, kAntiLambda, invMALa, trackPt);  //function to calculate invMass with TLorentzVector class
+           
+           Double_t vALaRC[3] = {invMALa,trackPt,fEta};
+           fhnALaRC->Fill(vALaRC);
+         }
+
+
+         if(isBadJetK0sRC == kFALSE){ //in case RC contains at least one K0s with minimum pT 
+           fh1RCBiasK0->Fill(1.);//for normalisation purposes
+
+           //________________fill RC (with trigger particle bias)_____________
+           for(Int_t it=0; it<fListK0sRC->GetSize(); ++it){ // loop for K0s in random cone
+             
+             AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListK0sRC->At(it));
+             if(!v0) continue;
+             
+             Double_t invMK0s =0;
+             Double_t trackPt=0;
+             Double_t fEta=0;
+             fEta = v0->Eta();
+             
+             CalculateInvMass(v0, kK0, invMK0s, trackPt);  //function to calculate invMass with TLorentzVector class
+             
+             //Double_t vK0sRC[3] = {invMK0s,trackPt,fEta};
+             //fhnK0sRCBias->Fill(vK0sRC);
+           }
+         }
+       
+         
+         if(isBadJetLaRC == kFALSE){ //in case RC contains at least one Lambda with minimum pT 
+           fh1RCBiasLa->Fill(1.);//for normalisation purposes
+           for(Int_t it=0; it<fListLaRC->GetSize(); ++it){ // loop for Lambdas in random cone
+             
+             AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListLaRC->At(it));
+             if(!v0) continue;
+             
+             Double_t invMLa =0;
+             Double_t trackPt=0;
+             Double_t fEta=0;
+             fEta = v0->Eta();
+           
+             CalculateInvMass(v0, kLambda, invMLa, trackPt);  //function to calculate invMass with TLorentzVector class
+             
+             //Double_t vLaRC[3] = {invMLa,trackPt,fEta};
+             //fhnLaRCBias->Fill(vLaRC);
+           }
+         }
+       
+         
+        
+         if(isBadJetALaRC == kFALSE){ //in case RC contains at least one Antilambda with minimum pT 
+           fh1RCBiasALa->Fill(1.);//for normalisation purposes
+           for(Int_t it=0; it<fListALaRC->GetSize(); ++it){ // loop for Lambdas in random cone
+             
+             AliAODv0* v0 = dynamic_cast<AliAODv0*>(fListALaRC->At(it));
+             if(!v0) continue;
+           
+             Double_t invMALa =0;
+             Double_t trackPt=0;
+             Double_t fEta=0;
+             fEta = v0->Eta();
+             
+             CalculateInvMass(v0, kAntiLambda, invMALa, trackPt);  //function to calculate invMass with TLorentzVector class
+             
+             //Double_t vALaRC[3] = {invMALa,trackPt,fEta};
+             //fhnALaRCBias->Fill(vALaRC);
+           }
+           
+         }
+
+       }
+       
+       fListK0sRC->Clear();
+       fListLaRC->Clear();
+       fListALaRC->Clear();
+      }
+
 
       //fetch particles in perpendicular cone to estimate UE event contribution to particle spectrum
       //these perpendicular cone particle spectra serve to subtract the particles in jet cones, that are stemming from the Underlying event, on a statistical basis
-      //for normalization the common jet pT spectrum is used: fh1FFIMK0Cone, fh1FFIMLaCone and fh1FFIMALaCone
+      //for normalization the common jet pT spectrum is used: fh1IMK0Cone, fh1IMLaCone and fh1IMALaCone
       
       //____fetch reconstructed K0s in cone perpendicular to jet axis:_______________________________________________________________________________
       
-      TList* jetPerpConeK0list = new TList();
-      
+  
+      jetPerpConeK0list->Clear();
       Double_t sumPerpPtK0     = 0.;
       
       GetTracksInPerpCone(fListK0s, jetPerpConeK0list, jet, GetFFRadius(), sumPerpPtK0); //reconstructed K0s in cone around jet axis
@@ -2614,60 +3394,168 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        
        Double_t invMPerpK0s =0;
        Double_t trackPt=0;
-       
+       Double_t fEta=0;
+
+       fEta = v0->Eta();       
        CalculateInvMass(v0, kK0, invMPerpK0s, trackPt);  //function to calculate invMass with TLorentzVector class
+       Double_t vK0sPC[4] = {jetPt, invMPerpK0s,trackPt,fEta};
+       
+       fhnK0sPC->Fill(vK0sPC);  //(x,y,z) //pay attention, this histogram contains the V0 content of both (+/- 90 degrees) perp. cones!!
        
-       fh3IMK0PerpCone->Fill(jetPt, invMPerpK0s, trackPt); //(x,y,z) //pay attention, this histogram contains the V0 content of both (+/- 90 degrees) perp. cones!!
       }
       
       
       if(jetPerpConeK0list->GetSize() == 0){ // no K0s in jet cone 
        
-       //Bool_t incrementPerpJetPt = kTRUE;
-       fh3IMK0PerpCone->Fill(jetPt, -1, -1);
+       Double_t vK0sPC[4] = {jetPt, -1, -1 , -999};//default values for case: no K0s is found in PC
+       fhnK0sPC->Fill(vK0sPC);
+       
       }
-   
-      // ____ rec K0s in median cluster___________________________________________________________________________________________________________ 
-      
-      TList* jetMedianConeK0list = new TList();
       
-      AliAODJet* medianCluster = GetMedianCluster();
 
-      Double_t sumMedianPtK0     = 0.;
+      if(IsMCCEvt == kFALSE){//median cluster only once for event
 
-      Bool_t isBadJetK0Median    = kFALSE; // dummy, do not use
-     
-      GetTracksInCone(fListK0s, jetMedianConeK0list, medianCluster, GetFFRadius(), sumMedianPtK0, 0., 0., isBadJetK0Median); //reconstructed K0s in median cone around jet axis
-      //GetTracksInCone(fListK0s, jetConeK0list, jet, GetFFRadius(), sumPtK0, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJetK0); //original use of function
-      
-      //cut parameters from Fragmentation Function task:
-      //Float_t fFFMinLTrackPt;   // reject jets with leading track with pt smaller than this value, use GetFFMinLTrackPt()
-      //Float_t fFFMaxTrackPt;    // reject jetscontaining any track with pt larger than this value, use GetFFMaxTrackPt()
-      
-      for(Int_t it=0; it<jetMedianConeK0list->GetSize(); ++it){ // loop for K0s in median cone
+       IsMCCEvt = kTRUE;
+
+      // if(ij==0){
+
+       AliAODJet* medianCluster = GetMedianCluster();
+
+       if(medianCluster){
+       // ____ rec K0s in median cluster___________________________________________________________________________________________________________ 
        
-       AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetMedianConeK0list->At(it));
-       if(!v0) continue;
+
+         jetMedianConeK0list->Clear();
+         jetMedianConeLalist->Clear();
+         jetMedianConeALalist->Clear();
+         
+         Double_t medianEta = medianCluster->Eta();
        
-       Double_t invMMedianK0s =0;
-       Double_t trackPt=0;
+       if(TMath::Abs(medianEta)<=fCutjetEta){
+         
+         fh1MedianEta->Fill(medianEta);
+         fh1JetPtMedian->Fill(jetPt);
+         fh1MCC->Fill(1.);//for normalisation by total number of median cluster jets
+         Double_t sumMedianPtK0     = 0.;
+         
+         Bool_t isBadJetK0Median    = kFALSE; // dummy, do not use
+         
+         GetTracksInCone(fListK0s, jetMedianConeK0list, medianCluster, GetFFRadius(), sumMedianPtK0, 0., 0., isBadJetK0Median); //reconstructed K0s in median cone around jet axis
+         //GetTracksInCone(fListK0s, jetConeK0list, jet, GetFFRadius(), sumPtK0, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJetK0); //original use of function
+         
+         //cut parameters from Fragmentation Function task:
+         //Float_t fFFMinLTrackPt;   // reject jets with leading track with pt smaller than this value, use GetFFMinLTrackPt()
+         //Float_t fFFMaxTrackPt;    // reject jetscontaining any track with pt larger than this value, use GetFFMaxTrackPt()
+         
+         for(Int_t it=0; it<jetMedianConeK0list->GetSize(); ++it){ // loop for K0s in median cone
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetMedianConeK0list->At(it));
+           if(!v0) continue;
+           
+           Double_t invMMedianK0s =0;
+           Double_t trackPt=0;
+           Double_t fEta=0;
+           
+           fEta = v0->Eta();
+           CalculateInvMass(v0, kK0, invMMedianK0s, trackPt);  //function to calculate invMass with TLorentzVector class       
+           Double_t vK0sMCC[3] = {invMMedianK0s,trackPt,fEta};
+           fhnK0sMCC->Fill(vK0sMCC);
+           
+         }
+         
+         if(jetMedianConeK0list->GetSize() == 0){ // no K0s in median cluster cone 
+          
+           Double_t vK0sMCC[3] = {-1, -1, -999};
+           fhnK0sMCC->Fill(vK0sMCC);
+          
+         }
+         
+         //__________________________________________________________________________________________________________________________________________
+         // ____ rec Lambdas in median cluster___________________________________________________________________________________________________________ 
+         
+         Double_t sumMedianPtLa     = 0.;
+         Bool_t isBadJetLaMedian    = kFALSE; // dummy, do not use
+         
+         GetTracksInCone(fListLa, jetMedianConeLalist, medianCluster, GetFFRadius(), sumMedianPtLa, 0, 0, isBadJetLaMedian); //reconstructed Lambdas in median cone around jet axis
+         
+         //cut parameters from Fragmentation Function task:
+         //Float_t fFFMinLTrackPt;   // reject jets with leading track with pt smaller than this value, use GetFFMinLTrackPt()
+         //Float_t fFFMaxTrackPt;    // reject jets containing any track with pt larger than this value, use GetFFMaxTrackPt()
+         
+         for(Int_t it=0; it<jetMedianConeLalist->GetSize(); ++it){ // loop for Lambdas in perpendicular cone
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetMedianConeLalist->At(it));
+           if(!v0) continue;
+         
+           Double_t invMMedianLa =0;
+           Double_t trackPt=0;
+           Double_t fEta=0;
+           fEta = v0->Eta();
+
+           CalculateInvMass(v0, kLambda, invMMedianLa, trackPt);  //function to calculate invMass with TLorentzVector class
+           
+           Double_t vLaMCC[3] = {invMMedianLa,trackPt,fEta};
+           fhnLaMCC->Fill(vLaMCC);
+         }
+         
+         if(jetMedianConeLalist->GetSize() == 0){ // no Lambdas in median cluster cone 
+          
+           Double_t vLaMCC[4] = {jetPt, -1, -1, -999};
+           fhnLaMCC->Fill(vLaMCC); 
+           
+         }
+         
        
-       CalculateInvMass(v0, kK0, invMMedianK0s, trackPt);  //function to calculate invMass with TLorentzVector class
+         // ____ rec Antilambdas in median cluster___________________________________________________________________________________________________________ 
        
-       fh3IMK0MedianCone->Fill(jetPt, invMMedianK0s, trackPt); //(x,y,z)
-      }
-      
-      if(jetMedianConeK0list->GetSize() == 0){ // no K0s in median cluster cone 
+         
+         Double_t sumMedianPtALa     = 0.;
+         
+         Bool_t isBadJetALaMedian    = kFALSE; // dummy, do not use
+         
+         GetTracksInCone(fListALa, jetMedianConeALalist, medianCluster, GetFFRadius(), sumMedianPtALa, 0, 0, isBadJetALaMedian); //reconstructed Antilambdas in median cone around jet axis
+         
+         
+         //cut parameters from Fragmentation Function task:
+         //Float_t fFFMinLTrackPt;   // reject jets with leading track with pt smaller than this value, use GetFFMinLTrackPt()
+         //Float_t fFFMaxTrackPt;    // reject jets containing any track with pt larger than this value, use GetFFMaxTrackPt()
        
-       fh3IMK0MedianCone->Fill(jetPt, -1, -1);
-      }
-      
+         for(Int_t it=0; it<jetMedianConeALalist->GetSize(); ++it){ // loop for Antilambdas in median cluster cone
+           
+           AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetMedianConeALalist->At(it));
+           if(!v0) continue;
+           
+           Double_t invMMedianALa =0;
+           Double_t trackPt=0;
+           Double_t fEta=0;
+           
+           fEta = v0->Eta();
+
+           CalculateInvMass(v0, kAntiLambda, invMMedianALa, trackPt);  //function to calculate invMass with TLorentzVector class
+           Double_t vALaMCC[3] = {invMMedianALa,trackPt,fEta};
+           fhnALaMCC->Fill(vALaMCC); 
+           
+         }
+         
+         if(jetMedianConeALalist->GetSize() == 0){ // no Antilambdas in median cluster cone 
+
+           Double_t vALaMCC[4] = {jetPt, -1, -1, -999};
+           fhnALaMCC->Fill(vALaMCC); 
+           
+         }
+       }//median cluster eta cut 
+       
+        jetMedianConeK0list->Clear();
+       jetMedianConeLalist->Clear();
+       jetMedianConeALalist->Clear();
+                   
+       }//if mediancluster is existing
+      }//end (IsMCCEvt == kFALSE)
       //_________________________________________________________________________________________________________________________________________
       
       //____fetch reconstructed Lambdas in cone perpendicular to jet axis:__________________________________________________________________________
       
-      TList* jetPerpConeLalist = new TList();
-      
+      jetPerpConeLalist->Clear();
       Double_t sumPerpPtLa     = 0.;
       
       GetTracksInPerpCone(fListLa, jetPerpConeLalist, jet, GetFFRadius(), sumPerpPtLa); //reconstructed Lambdas in cone around jet axis //pay attention, this histogram contains the V0 content of both (+/- 90 degrees) perp. cones!!
@@ -2681,60 +3569,28 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        
        Double_t invMPerpLa =0;
        Double_t trackPt=0;
+       Double_t fEta=0;
+       fEta = v0->Eta();
        
        CalculateInvMass(v0, kLambda, invMPerpLa, trackPt);  //function to calculate invMass with TLorentzVector class
-       
-       fh3IMLaPerpCone->Fill(jetPt, invMPerpLa, trackPt);
+       Double_t vLaPC[4] = {jetPt, invMPerpLa,trackPt,fEta};
+       fhnLaPC->Fill(vLaPC);  //(x,y,z) //pay attention, this histogram contains the V0 content of both (+/- 90 degrees) perp. cones!!
+
       }
       
       
       if(jetPerpConeLalist->GetSize() == 0){ // no Lambdas in jet
        
-       fh3IMLaPerpCone->Fill(jetPt, -1, -1);
-       
-      }
-      
-      //__________________________________________________________________________________________________________________________________________
-          // ____ rec Lambdas in median cluster___________________________________________________________________________________________________________ 
-      
-      TList* jetMedianConeLalist = new TList();
-      
-      //AliAODJet* medianCluster = GetMedianCluster(); //already loaded at part for K0s ??
-
-      Double_t sumMedianPtLa     = 0.;
-      Bool_t isBadJetLaMedian    = kFALSE; // dummy, do not use
-     
-      GetTracksInCone(fListLa, jetMedianConeLalist, medianCluster, GetFFRadius(), sumMedianPtLa, 0, 0, isBadJetLaMedian); //reconstructed Lambdas in median cone around jet axis
-     
-         //cut parameters from Fragmentation Function task:
-      //Float_t fFFMinLTrackPt;   // reject jets with leading track with pt smaller than this value, use GetFFMinLTrackPt()
-      //Float_t fFFMaxTrackPt;    // reject jets containing any track with pt larger than this value, use GetFFMaxTrackPt()
-      
-      for(Int_t it=0; it<jetMedianConeLalist->GetSize(); ++it){ // loop for Lambdas in perpendicular cone
-       
-       AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetMedianConeLalist->At(it));
-       if(!v0) continue;
-       
-       Double_t invMMedianLa =0;
-       Double_t trackPt=0;
-       
-       CalculateInvMass(v0, kLambda, invMMedianLa, trackPt);  //function to calculate invMass with TLorentzVector class
+       Double_t vLaPC[4] = {jetPt, -1, -1 , -999};//default values for case: no K0s is found in PC
+       fhnLaPC->Fill(vLaPC);
        
-       fh3IMLaMedianCone->Fill(jetPt, invMMedianLa, trackPt); //(x,y,z)
-      }
-      
-      if(jetMedianConeLalist->GetSize() == 0){ // no Lambdas in median cluster cone 
        
-       fh3IMLaMedianCone->Fill(jetPt, -1, -1);
       }
       
-      //_________________________________________________________________________________________________________________________________________
-      
       
       //____fetch reconstructed Antilambdas in cone perpendicular to jet axis:___________________________________________________________________
-      
-      TList* jetPerpConeALalist = new TList();
-      
+      jetPerpConeALalist->Clear();
       Double_t sumPerpPtALa     = 0.;
       
       GetTracksInPerpCone(fListALa, jetPerpConeALalist, jet, GetFFRadius(), sumPerpPtALa); //reconstructed Antilambdas in cone around jet axis //pay attention, this histogram contains the V0 content of both (+/- 90 degrees) perp. cones!!
@@ -2748,60 +3604,26 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        
        Double_t invMPerpALa =0;
        Double_t trackPt=0;
-       
+       Double_t fEta=0;
+       fEta = v0->Eta();
+
        CalculateInvMass(v0, kAntiLambda, invMPerpALa, trackPt);  //function to calculate invMass with TLorentzVector class
-       
-       fh3IMALaPerpCone->Fill(jetPt, invMPerpALa, trackPt);
+       Double_t vALaPC[4] = {jetPt, invMPerpALa,trackPt,fEta};
+       fhnALaPC->Fill(vALaPC);
        
       }
       
       
       if(jetPerpConeALalist->GetSize() == 0){ // no Antilambda 
 
-       fh3IMALaPerpCone->Fill(jetPt, -1, -1);
-       
-      }
-      
-
-          // ____ rec Antilambdas in median cluster___________________________________________________________________________________________________________ 
-      
-      TList* jetMedianConeALalist = new TList();
-      
-      //AliAODJet* medianCluster = GetMedianCluster(); //already loaded at part for K0s
+       Double_t vALaPC[4] = {jetPt, -1, -1, -999};
+       fhnALaPC->Fill(vALaPC);
 
-      Double_t sumMedianPtALa     = 0.;
-      
-      Bool_t isBadJetALaMedian    = kFALSE; // dummy, do not use
-     
-      GetTracksInCone(fListALa, jetMedianConeALalist, medianCluster, GetFFRadius(), sumMedianPtALa, 0, 0, isBadJetALaMedian); //reconstructed Antilambdas in median cone around jet axis
-     
-         
-      //cut parameters from Fragmentation Function task:
-      //Float_t fFFMinLTrackPt;   // reject jets with leading track with pt smaller than this value, use GetFFMinLTrackPt()
-      //Float_t fFFMaxTrackPt;    // reject jets containing any track with pt larger than this value, use GetFFMaxTrackPt()
-      
-      for(Int_t it=0; it<jetMedianConeALalist->GetSize(); ++it){ // loop for Antilambdas in median cluster cone
-       
-       AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetMedianConeALalist->At(it));
-       if(!v0) continue;
-       
-       Double_t invMMedianALa =0;
-       Double_t trackPt=0;
-       
-       CalculateInvMass(v0, kAntiLambda, invMMedianALa, trackPt);  //function to calculate invMass with TLorentzVector class
-       
-       fh3IMALaMedianCone->Fill(jetPt, invMMedianALa, trackPt); //(x,y,z)
-      }
-      
-      if(jetMedianConeALalist->GetSize() == 0){ // no Antilambdas in median cluster cone 
-       
-       fh3IMALaMedianCone->Fill(jetPt, -1, -1);
       }
-      
-      //_________________________________________________________________________________________________________________________________________
-      
+   
 
 
+      //###########################################################################################################
       //MC Analysis 
       //__________________________________________________________________________________________________________________________________________
       
@@ -2857,8 +3679,10 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          Double_t genLaPt = mcp->Pt();
 
          //std::cout<<"Incl FD, genLaPt:"<<genLaPt<<std::endl;
-                 
-         fh3FeedDownLa->Fill(5., invMLaFDcand, genLaPt);
+         
+         Double_t vFeedDownLa[3] = {5., invMLaFDcand, genLaPt};
+         fhnFeedDownLa->Fill(vFeedDownLa);       
+        
          
        }//end loop over feeddown candidates for Lambda particles in jet cone
        //fetch MC truth in jet cones, denominator of rec. efficiency in jet cones
@@ -2901,7 +3725,9 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
 
          //std::cout<<"Cone FD, genLaPt:"<<genLaPt<<std::endl;
 
-         fh3FeedDownLaCone->Fill(jetPt, invMLaFDcand, genLaPt);
+         Double_t vFeedDownLaCone[3] = {jetPt, invMLaFDcand, genLaPt};
+         fhnFeedDownLaCone->Fill(vFeedDownLaCone);
+
          
        }//end loop over feeddown candidates for Lambda particles in jet cone
        
@@ -2937,8 +3763,10 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          AliAODMCParticle *mcp=(AliAODMCParticle*)st->UncheckedAt(v0lab);
            
          Double_t genALaPt = mcp->Pt();
-                 
-         fh3FeedDownALa->Fill(5., invMALaFDcand, genALaPt);
+
+         Double_t vFeedDownALa[3] = {5., invMALaFDcand, genALaPt};
+         fhnFeedDownALa->Fill(vFeedDownALa);
+
          
        }//end loop over feeddown candidates for Antilambda particles
 
@@ -2975,8 +3803,10 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          AliAODMCParticle *mcp=(AliAODMCParticle*)st->UncheckedAt(v0lab);
            
          Double_t genALaPt = mcp->Pt();
-                 
-         fh3FeedDownALaCone->Fill(jetPt, invMALaFDcand, genALaPt);
+       
+         Double_t vFeedDownALaCone[3] = {jetPt, invMALaFDcand, genALaPt};
+         fhnFeedDownALaCone->Fill(vFeedDownALaCone);
+
          
        }//end loop over feeddown candidates for Antilambda particles in jet cone
        
@@ -2988,7 +3818,7 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        Bool_t isBadJetMCgenK0s  = kFALSE; // dummy, do not use
        
        
-       fListMCgenK0sCone = new TList();      //MC generated K0s in (only geometrical) jet cone (these are MC gen K0s falling geometrically into jet cone (R = 0.4) around jet axis, that was found by anti-kt jet finder, particles can stem from fragmentation but also from underlying event!!)
+       fListMCgenK0sCone->Clear(); //MC generated K0s in (only geometrical) jet cone (these are MC gen K0s falling geometrically into jet cone (R = 0.4) around jet axis, that was found by anti-kt jet finder, particles can stem from fragmentation but also from underlying event!!)
        
        //first: sampling MC gen K0s       
        
@@ -2997,7 +3827,7 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        if(fDebug>2)Printf("%s:%d nMCgenK0s in jet cone: %d,FFRadius %f ",(char*)__FILE__,__LINE__,fListMCgenK0sCone->GetEntries(),GetFFRadius());
        
        
-       for(Int_t it=0; it<fListMCgenK0sCone->GetSize(); ++it){ // loop MC generated K0s in cone around jet axis
+       /*      for(Int_t it=0; it<fListMCgenK0sCone->GetSize(); ++it){ // loop MC generated K0s in cone around jet axis
          
          AliAODMCParticle* mcp0 = dynamic_cast<AliAODMCParticle*>(fListMCgenK0sCone->At(it));
          if(!mcp0) continue;
@@ -3006,10 +3836,10 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          Double_t fEtaMCgenK0s   = mcp0->Eta();
          Double_t fPtMCgenK0s    = mcp0->Pt();
          
-         fh2MCgenK0Cone->Fill(jetPt,fPtMCgenK0s); 
-         fh2MCEtagenK0Cone->Fill(jetPt,fEtaMCgenK0s);
+         //fh2MCgenK0Cone->Fill(jetPt,fPtMCgenK0s); 
+         // fh2MCEtagenK0Cone->Fill(jetPt,fEtaMCgenK0s);
          
-       }
+         }*/
        
        //check whether the reconstructed K0s in jet cone are stemming from MC gen K0s (on MCgenK0s list):__________________________________________________
        
@@ -3040,10 +3870,11 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          
          const AliAODTrack *trackMCNeg=(AliAODTrack *)(v0c->GetDaughter(nnum));
          const AliAODTrack *trackMCPos=(AliAODTrack *)(v0c->GetDaughter(pnum));
-         
+         Bool_t isinjected;      
+         TString generatorName;
          TList *listmc = fAOD->GetList();
                  
-         Bool_t mclabelcheck = MCLabelCheck(v0c, kK0, trackMCNeg, trackMCPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode);
+         Bool_t mclabelcheck = MCLabelCheck(v0c, kK0, trackMCNeg, trackMCPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode, generatorName, isinjected);
                          
          if(mclabelcheck == kFALSE)continue; 
          if(fPhysicalPrimary == kFALSE)continue;  //requirements for rec. V0 associated to MC true primary particle
@@ -3061,14 +3892,18 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
            
            if(particleMatching == kFALSE)continue;                                              //if reconstructed V0 particle doesn't match to the associated MC particle go to next stack entry          
            CalculateInvMass(v0c, kK0, invMK0Match, fPtMCrecK0Match);
+           Double_t fEta = v0c->Eta();
+           Double_t fPtMCgenK0s    = mcp0->Pt();//pt has to be always MC truth value!
            
-           Double_t fPtMCgenK0s    = mcp0->Pt();
-           
-           fh3MCrecK0Cone->Fill(jetPt,invMK0Match,fPtMCgenK0s);                                 //fill matching rec. K0s in 3D histogram
+           Double_t vMCrecK0Cone[4] = {jetPt, invMK0Match,fPtMCgenK0s,fEta};
+           fhnMCrecK0Cone->Fill(vMCrecK0Cone);             //fill matching rec. K0s in 3D histogram
 
-           SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);           //jetPt, cent, jetRadius, ptmintrack, &jetPtSmear        
-           
-           fh3MCrecK0ConeSmear->Fill(jetPtSmear,invMK0Match,fPtMCgenK0s);    //fill matching rec. K0s in 3D histogram, jet pT smeared according to deltaptjet distribution width  
+           SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);       //jetPt, cent, jetRadius, ptmintrack, &jetPtSmear 
+        
+           Double_t vMCrecK0ConeSmear[4] = {jetPtSmear, invMK0Match,fPtMCgenK0s,fEta};
+           fhnMCrecK0ConeSmear->Fill(vMCrecK0ConeSmear); 
+
+           //fill matching rec. K0s in 3D histogram, jet pT smeared according to deltaptjet distribution width  
   
 
          } // end MCgenK0s / MCgenK0sCone loop
@@ -3116,14 +3951,18 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
                if(!mctrackPos) continue;
                Double_t trackPosPt = mctrackPos->Pt();
                Double_t trackPosEta = mctrackPos->Eta();
-               fh3SecContinCone->Fill(jetPt, trackPosPt, trackPosEta);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo 
+
+               Double_t vK0sSecContinCone[3] = {jetPt, trackPosPt, trackPosEta};
+               fhnK0sSecContinCone->Fill(vK0sSecContinCone);}           //if it's the case, fill jet pt, daughter track pt and track eta in histo 
              
              if(particleLabel == negAssLabel){
                AliAODMCParticle* mctrackNeg = dynamic_cast<AliAODMCParticle*>(stackMC->At(negAssLabel));
                if(!mctrackNeg) continue;
                Double_t trackNegPt = mctrackNeg->Pt();
                Double_t trackNegEta = mctrackNeg->Eta();
-               fh3SecContinCone->Fill(jetPt, trackNegPt, trackNegEta);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo
+       
+               Double_t vK0sSecContinCone[3] = {jetPt, trackNegPt, trackNegEta};
+               fhnK0sSecContinCone->Fill(vK0sSecContinCone);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo
            }
          }
                  
@@ -3135,20 +3974,16 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        
        //________________________________________________________________________________________________________________________________________________________
          
-
-
-       delete fListMCgenK0sCone;
+       fListMCgenK0sCone->Clear();
        
        
       }//end fAnalysisMC
       
-      delete jetConeK0list;      
-      delete jetPerpConeK0list;
-      delete jetPerpConeLalist;
-      delete jetPerpConeALalist;
-      delete jetMedianConeK0list;
-      delete jetMedianConeLalist;
-      delete jetMedianConeALalist;
+      jetConeK0list->Clear();      
+      jetPerpConeK0list->Clear();
+      jetPerpConeLalist->Clear();
+      jetPerpConeALalist->Clear();
 
       //---------------La--------------------------------------------------------------------------------------------------------------------------------------------
       
@@ -3169,27 +4004,26 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
         Double_t trackPt=0;
 
         CalculateInvMass(v0, kLambda, invMLa, trackPt); //function to calculate invMass with TLorentzVector class
-       Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
+       //      Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
 
        //if(incrementJetPt){fh1V0JetPt->Fill(jetPt);}
 
-       fFFHistosIMLaJet->FillFF(trackPt, invMLa, jetPt, incrementJetPt);
-       fFFHistosPhiCorrIMLa->FillPhiCorr(trackPt,TVector2::Phi_0_2pi(dPhiJetLa),invMLa);
-       
+       //fFFHistosIMLaJet->FillFF(trackPt, invMLa, jetPt, incrementJetPt);
+       
        if(dPhiJetLa<fh1dPhiJetLa->GetXaxis()->GetXmin()) dPhiJetLa += 2*TMath::Pi();
        fh1dPhiJetLa->Fill(dPhiJetLa);
       }
 
-      if(fListLa->GetSize() == 0){ // no La: increment jet pt spectrum 
+      /*   if(fListLa->GetSize() == 0){ // no La: increment jet pt spectrum 
        
-       Bool_t incrementJetPt = kTRUE;
-       fFFHistosIMLaJet->FillFF(-1, -1, jetPt, incrementJetPt);
-      }
+          Bool_t incrementJetPt = kTRUE;
+          fFFHistosIMLaJet->FillFF(-1, -1, jetPt, incrementJetPt);
+       }*/
        
   
       // ____fetch rec. Lambdas in cone around jet axis_______________________________________________________________________________________
       
-      TList* jetConeLalist = new TList();
+      jetConeLalist->Clear();
       Double_t sumPtLa     = 0.;
       Bool_t isBadJetLa    = kFALSE; // dummy, do not use
 
@@ -3200,32 +4034,87 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
       for(Int_t it=0; it<jetConeLalist->GetSize(); ++it){ // loop La in jet cone
        
        AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetConeLalist->At(it));
-       if(!v0) continue;                                                                                                                                                                                                         
+       if(!v0) continue;                     
+
+       Int_t nnum;
+       Int_t pnum;
+       
+       Bool_t daughtercheck = DaughterTrackCheck(v0, nnum, pnum);
+       if(daughtercheck == kFALSE)continue;                                                 
        Double_t invMLa =0;
        Double_t trackPt=0;
-       
+       Double_t fEta = 0;
+
+       fEta = v0->Eta();
+
         CalculateInvMass(v0, kLambda, invMLa, trackPt); //function to calculate invMass with TLorentzVector class
        
-       Bool_t   incrementJetPt = (it==0) ? kTRUE : kFALSE;
+       Bool_t   incrementJetPt = (it==0) ? kTRUE : kFALSE;//needed for all histos, which serve for normalisation
        
        if(fAnalysisMC){
+
+         Int_t negDaughterpdg;
+         Int_t posDaughterpdg;
+         Int_t motherType;
+         Int_t v0Label;
          Double_t jetPtSmear = -1;  
+         Double_t MCPt;
+         Bool_t fPhysicalPrimary = -1;
+         Int_t MCv0PDGCode =0;
+         TString generatorName;
+
          SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);  
-         if(incrementJetPt == kTRUE){fh1FFIMLaConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
-       }
+         if(incrementJetPt == kTRUE){fh1IMLaConeSmear->Fill(jetPtSmear);
+           
+           const AliAODTrack *trackNeg=(AliAODTrack *)(v0->GetDaughter(nnum));
+           const AliAODTrack *trackPos=(AliAODTrack *)(v0->GetDaughter(pnum)); 
+           
+           TList *listmc = fAOD->GetList();
+           Bool_t isinjected;      
+           Bool_t mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode, generatorName, isinjected);
+           if(mclabelcheck == kFALSE)continue;
+
+           //std::cout<<"generatorName: "<<generatorName<<std::endl;
+          
+           if(generatorName == "Hijing"){
+           Double_t vrecMCHijingLaCone[4] = {jetPt, invMLa,trackPt,fEta};          
+           fhnrecMCHijingLaCone->Fill(vrecMCHijingLaCone);
+           }
+
+           if(isinjected == kTRUE){
+           Double_t vrecMCInjectLaCone[4] = {jetPt, invMLa,trackPt,fEta};
+           fhnrecMCInjectLaCone->Fill(vrecMCInjectLaCone);
+           }
 
-       fFFHistosIMLaCone->FillFF(trackPt, invMLa, jetPt, incrementJetPt);
+         }//fill TH1F for normalization purposes 
+       }//end MC analysis part
+       
+       if(incrementJetPt==kTRUE){
+         fh1IMLaCone->Fill(jetPt);}//normalisation by number of selected jets
+       
+       //fFFHistosIMLaCone->FillFF(trackPt, invMLa, jetPt, incrementJetPt);   
+       Double_t vLaCone[4] = {jetPt, invMLa,trackPt,fEta};
+       fhnLaCone->Fill(vLaCone);     
       }
 
       if(jetConeLalist->GetSize() == 0){ // no La: increment jet pt spectrum 
        
        Bool_t incrementJetPt = kTRUE;
-       fFFHistosIMLaCone->FillFF(-1, -1, jetPt, incrementJetPt);
+       //      fFFHistosIMLaCone->FillFF(-1, -1, jetPt, incrementJetPt);
+       Double_t vLaCone[4] = {jetPt, -1, -1, -1};
+       fhnLaCone->Fill(vLaCone);
+       
+       if(incrementJetPt==kTRUE){
+         fh1IMLaCone->Fill(jetPt);}//normalisation by number of selected jets
 
        if(fAnalysisMC){ 
          Double_t jetPtSmear;  
          SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);  
-         if(incrementJetPt == kTRUE)fh1FFIMLaConeSmear->Fill(jetPtSmear);}
+         if(incrementJetPt == kTRUE){
+           fh1IMLaConeSmear->Fill(jetPtSmear);
+         
+         }
+       }
 
       }
       
@@ -3237,13 +4126,13 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        Bool_t isBadJetMCgenLa  = kFALSE; // dummy, do not use 
        
        //sampling MC gen. Lambdas in cone around reconstructed jet axis      
-       fListMCgenLaCone = new TList(); 
-       
+
+       fListMCgenLaCone->Clear();
        GetTracksInCone(fListMCgenLa, fListMCgenLaCone, jet, GetFFRadius(), sumPtMCgenLa, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJetMCgenLa);//fetch MC generated Lambdas in cone of resolution parameter R around jet axis 
        
        if(fDebug>2)Printf("%s:%d nMCgenLa in jet cone: %d,FFRadius %f ",(char*)__FILE__,__LINE__,fListMCgenLaCone->GetEntries(),GetFFRadius());
        
-       for(Int_t it=0; it<fListMCgenLaCone->GetSize(); ++it){ // loop MC generated La in cone around jet axis
+       /*      for(Int_t it=0; it<fListMCgenLaCone->GetSize(); ++it){ // loop MC generated La in cone around jet axis
          
          AliAODMCParticle* mcp0 = dynamic_cast<AliAODMCParticle*>(fListMCgenLaCone->At(it));
          if(!mcp0) continue;
@@ -3252,16 +4141,14 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          Double_t fEtaMCgenLa   = mcp0->Eta();
          Double_t fPtMCgenLa    = mcp0->Pt();
     
-         fh2MCgenLaCone->Fill(jetPt,fPtMCgenLa);
-         fh2MCEtagenLaCone->Fill(jetPt,fEtaMCgenLa);
-       }
+         // fh2MCgenLaCone->Fill(jetPt,fPtMCgenLa);
+         //fh2MCEtagenLaCone->Fill(jetPt,fEtaMCgenLa);
+         }*/
        
        
        //check whether the reconstructed La are stemming from MC gen La on fListMCgenLa List:__________________________________________________
 
        for(Int_t ic=0; ic<jetConeLalist->GetSize(); ++ic){//loop over all reconstructed La within jet cone, new definition
-
-         //for(Int_t ic=0; ic<fListLa->GetSize(); ++ic){//old definition
          
          Int_t negDaughterpdg;
          Int_t posDaughterpdg;
@@ -3275,10 +4162,11 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          Bool_t fPhysicalPrimary = -1;
          Int_t MCv0PDGCode =0;
          Double_t jetPtSmear = -1;
+         TString generatorName;
 
          AliAODv0* v0c = dynamic_cast<AliAODv0*>(jetConeLalist->At(ic));//new definition
 
-         //AliAODv0* v0c = dynamic_cast<AliAODv0*>(fListLa->At(ic));//old definition
+        
          if(!v0c) continue;
          
          Bool_t daughtercheck = DaughterTrackCheck(v0c, nnum, pnum);
@@ -3288,15 +4176,14 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          const AliAODTrack *trackMCPos=(AliAODTrack *)(v0c->GetDaughter(pnum));        
 
          TList *listmc = fAOD->GetList();
-         
-         Bool_t mclabelcheck = MCLabelCheck(v0c, kLambda, trackMCNeg, trackMCPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode);
+         Bool_t isinjected;      
+         Bool_t mclabelcheck = MCLabelCheck(v0c, kLambda, trackMCNeg, trackMCPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode, generatorName, isinjected);
 
          if(mclabelcheck == kFALSE)continue;
          if(fPhysicalPrimary == kFALSE)continue;
          
          for(Int_t it=0; it<fListMCgenLa->GetSize(); ++it){//new definition                                  // loop over MC generated K0s in cone around jet axis
 
-           // for(Int_t it=0; it<fListMCgenLaCone->GetSize(); ++it){//old definition                                  // loop over MC generated La in cone around jet axis
 
            //Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
            
@@ -3313,12 +4200,14 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
            CalculateInvMass(v0c, kLambda, invMLaMatch, fPtMCrecLaMatch);
          
            Double_t fPtMCgenLa    = mcp0->Pt();
-           
-           fh3MCrecLaCone->Fill(jetPt,invMLaMatch,fPtMCgenLa);                        //fill matching rec. K0s 3D histogram
+           Double_t fEta          = v0c->Eta();//rec. MC particle
+           Double_t vMCrecLaCone[4] = {jetPt, invMLaMatch,fPtMCgenLa,fEta};
+           fhnMCrecLaCone->Fill(vMCrecLaCone); 
 
            SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);
 
-           fh3MCrecLaConeSmear->Fill(jetPtSmear,invMLaMatch,fPtMCgenLa);              //fill matching rec. Lambdas in 3D histogram, jet pT smeared according to deltaptjet distribution width     
+           Double_t vMCrecLaConeSmear[4] = {jetPtSmear, invMLaMatch,fPtMCgenLa,fEta};
+           fhnMCrecLaConeSmear->Fill(vMCrecLaConeSmear);  //fill matching rec. Lambdas in 3D histogram, jet pT smeared according to deltaptjet distribution width     
                
 
          } // end MCgenLa loop
@@ -3361,8 +4250,12 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
 
                Double_t trackPosPt = trackPos->Pt();
                Double_t trackPosEta = trackPos->Eta();
-               fh3SecContinCone->Fill(jetPt, trackPosPt, trackPosEta);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo 
-             
+               Double_t vLaSecContinCone[3] = {jetPt, trackPosPt, trackPosEta};
+               fhnLaSecContinCone->Fill(vLaSecContinCone);
+               
+             }       //if it's the case, fill jet pt, daughter track pt and track eta in histo 
+                   
+              
              if(particleLabel == negAssLabel){
 
                AliAODMCParticle* mctrackNeg = dynamic_cast<AliAODMCParticle*>(stackMC->At(negAssLabel));
@@ -3370,20 +4263,24 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
 
                Double_t trackNegPt = trackNeg->Pt();
                Double_t trackNegEta = trackNeg->Eta();
-               fh3SecContinCone->Fill(jetPt, trackNegPt, trackNegEta);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo
+               
+               Double_t vLaSecContinCone[3] = {jetPt, trackNegPt, trackNegEta};
+               fhnLaSecContinCone->Fill(vLaSecContinCone);
+
+               
+             }              //if it's the case, fill jet pt, daughter track pt and track eta in histo
            }
          }
 
-                 
-           
+                           
        } //end rec-La-in-cone loop
        //________________________________________________________________________________________________________________________________________________________
        
-       delete fListMCgenLaCone;
+       fListMCgenLaCone->Clear();
        
       }//end fAnalysisMC
       
-      delete jetConeLalist;
+      jetConeLalist->Clear();
          
       
  
@@ -3407,27 +4304,26 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
         Double_t trackPt=0;
 
         CalculateInvMass(v0, kAntiLambda, invMALa, trackPt); //function to calculate invMass with TLorentzVector class
-       Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
+       //Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
 
        //if(incrementJetPt){fh1V0JetPt->Fill(jetPt);}
 
-       fFFHistosIMALaJet->FillFF(trackPt, invMALa, jetPt, incrementJetPt);
-       fFFHistosPhiCorrIMALa->FillPhiCorr(trackPt,TVector2::Phi_0_2pi(dPhiJetALa),invMALa);
-       
+       //fFFHistosIMALaJet->FillFF(trackPt, invMALa, jetPt, incrementJetPt);
+       
        if(dPhiJetALa<fh1dPhiJetALa->GetXaxis()->GetXmin()) dPhiJetALa += 2*TMath::Pi();
        fh1dPhiJetALa->Fill(dPhiJetALa);
       }
 
-      if(fListALa->GetSize() == 0){ // no ALa: increment jet pt spectrum 
+      // if(fListALa->GetSize() == 0){ // no ALa: increment jet pt spectrum 
        
-       Bool_t incrementJetPt = kTRUE;
-       fFFHistosIMALaJet->FillFF(-1, -1, jetPt, incrementJetPt);
-      }
+      //       Bool_t incrementJetPt = kTRUE;
+       //fFFHistosIMALaJet->FillFF(-1, -1, jetPt, incrementJetPt);
+      //}
        
   
       // ____fetch rec. Antilambdas in cone around jet axis_______________________________________________________________________________________
       
-      TList* jetConeALalist = new TList();
+      jetConeALalist->Clear();
       Double_t sumPtALa     = 0.;
       Bool_t isBadJetALa    = kFALSE; // dummy, do not use
 
@@ -3438,32 +4334,85 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
       for(Int_t it=0; it<jetConeALalist->GetSize(); ++it){ // loop ALa in jet cone
        
        AliAODv0* v0 = dynamic_cast<AliAODv0*>(jetConeALalist->At(it));
-       if(!v0) continue;                                                                                                                                                                                                         
+       if(!v0) continue;                    
+       
+
+       Int_t nnum;
+       Int_t pnum; 
+
+       Bool_t daughtercheck = DaughterTrackCheck(v0, nnum, pnum);
+       if(daughtercheck == kFALSE)continue; 
+       
+                                          
        Double_t invMALa =0;
        Double_t trackPt=0;
-       
+       Double_t fEta = 0;
+
+       fEta = v0->Eta();
+
         CalculateInvMass(v0, kAntiLambda, invMALa, trackPt); //function to calculate invMass with TLorentzVector class
        
        Bool_t   incrementJetPt = (it==0) ? kTRUE : kFALSE;
 
        if(fAnalysisMC){    //jet pt smearing study for Antilambdas
-         Double_t jetPtSmear = -1;  
+
+         Int_t negDaughterpdg;
+         Int_t posDaughterpdg;
+         Int_t motherType;
+         Int_t v0Label;
+         Double_t jetPtSmear = -1;
+         Double_t MCPt;
+         Bool_t fPhysicalPrimary = -1;
+         Int_t MCv0PDGCode =0;
+         TString generatorName;
+
          SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);  
-         if(incrementJetPt == kTRUE){fh1FFIMALaConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
-       }
-       
-       fFFHistosIMALaCone->FillFF(trackPt, invMALa, jetPt, incrementJetPt);
+         const AliAODTrack *trackNeg=(AliAODTrack *)(v0->GetDaughter(nnum));
+         const AliAODTrack *trackPos=(AliAODTrack *)(v0->GetDaughter(pnum));   
+           
+           TList *listmc = fAOD->GetList();
+           Bool_t isinjected;      
+           Bool_t mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode, generatorName, isinjected);
+           if(mclabelcheck == kFALSE)continue;
+
+           //std::cout<<"generatorName: "<<generatorName<<std::endl;
+          
+           if(generatorName == "Hijing"){
+           Double_t vrecMCHijingALaCone[4] = {jetPt, invMALa,trackPt,fEta};        
+           fhnrecMCHijingALaCone->Fill(vrecMCHijingALaCone);
+           }
+
+           if(isinjected == kTRUE){
+           Double_t vrecMCInjectALaCone[4] = {jetPt, invMALa,trackPt,fEta};
+           fhnrecMCInjectALaCone->Fill(vrecMCInjectALaCone);
+           }
+
+         if(incrementJetPt == kTRUE){fh1IMALaConeSmear->Fill(jetPtSmear);}                          //fill TH1F for normalization purposes 
+       }//end fAnalysisMC
+
+       if(incrementJetPt==kTRUE){
+         fh1IMALaCone->Fill(jetPt);}//normalisation by number of selected jets
+
+       //fFFHistosIMALaCone->FillFF(trackPt, invMALa, jetPt, incrementJetPt);
+       Double_t vALaCone[4] = {jetPt, invMALa,trackPt,fEta};
+       fhnALaCone->Fill(vALaCone);
       }
 
       if(jetConeALalist->GetSize() == 0){ // no ALa: increment jet pt spectrum 
        
        Bool_t incrementJetPt = kTRUE;
-       fFFHistosIMALaCone->FillFF(-1, -1, jetPt, incrementJetPt);
+       
+       if(incrementJetPt==kTRUE){
+         fh1IMALaCone->Fill(jetPt);}//normalisation by number of selected jets
+
+       //fFFHistosIMALaCone->FillFF(-1, -1, jetPt, incrementJetPt);
+       Double_t vALaCone[4] = {jetPt, -1, -1, -1};
+       fhnALaCone->Fill(vALaCone);
 
        if(fAnalysisMC){ 
          Double_t jetPtSmear;  
          SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);  
-         if(incrementJetPt == kTRUE)fh1FFIMALaConeSmear->Fill(jetPtSmear);}
+         if(incrementJetPt == kTRUE)fh1IMALaConeSmear->Fill(jetPtSmear);}
 
       }
       
@@ -3475,13 +4424,13 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
        Bool_t isBadJetMCgenALa  = kFALSE; // dummy, do not use 
        
        //sampling MC gen Antilambdas in cone around reconstructed jet axis      
-       fListMCgenALaCone = new TList(); 
+       fListMCgenALaCone->Clear();
        
        GetTracksInCone(fListMCgenALa, fListMCgenALaCone, jet, GetFFRadius(), sumPtMCgenALa, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJetMCgenALa);//MC generated K0s in cone around jet axis 
        
        if(fDebug>2)Printf("%s:%d nMCgenALa in jet cone: %d,FFRadius %f ",(char*)__FILE__,__LINE__,fListMCgenALaCone->GetEntries(),GetFFRadius());
        
-       for(Int_t it=0; it<fListMCgenALaCone->GetSize(); ++it){ // loop MC generated La in cone around jet axis
+       /*      for(Int_t it=0; it<fListMCgenALaCone->GetSize(); ++it){ // loop MC generated La in cone around jet axis
          
          AliAODMCParticle* mcp0 = dynamic_cast<AliAODMCParticle*>(fListMCgenALaCone->At(it));
          if(!mcp0) continue;
@@ -3490,9 +4439,9 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          Double_t fEtaMCgenALa   = mcp0->Eta();
          Double_t fPtMCgenALa    = mcp0->Pt();
     
-         fh2MCgenALaCone->Fill(jetPt,fPtMCgenALa);
-         fh2MCEtagenALaCone->Fill(jetPt,fEtaMCgenALa);
-       }
+         //fh2MCgenALaCone->Fill(jetPt,fPtMCgenALa);
+         //fh2MCEtagenALaCone->Fill(jetPt,fEtaMCgenALa);
+         }*/
        
        
        //check whether the reconstructed ALa are stemming from MC gen ALa on MCgenALa List:__________________________________________________
@@ -3511,6 +4460,7 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
          Bool_t fPhysicalPrimary = -1;
          Int_t MCv0PDGCode =0;
          Double_t jetPtSmear = -1;
+         TString generatorName;
          
          AliAODv0* v0c = dynamic_cast<AliAODv0*>(jetConeALalist->At(ic));
          if(!v0c) continue;
@@ -3523,8 +4473,8 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
 
          TList *listmc = fAOD->GetList();
          if(!listmc)continue;
-
-         Bool_t mclabelcheck = MCLabelCheck(v0c, kAntiLambda, trackMCNeg, trackMCPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode);
+         Bool_t isinjected;
+         Bool_t mclabelcheck = MCLabelCheck(v0c, kAntiLambda, trackMCNeg, trackMCPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PDGCode, generatorName, isinjected);
 
          if(mclabelcheck == kFALSE)continue;
          if(fPhysicalPrimary == kFALSE)continue;
@@ -3543,13 +4493,14 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
            CalculateInvMass(v0c, kAntiLambda, invMALaMatch, fPtMCrecALaMatch);
          
            Double_t fPtMCgenALa  = mcp0->Pt();
-           
-           fh3MCrecALaCone->Fill(jetPt,invMALaMatch,fPtMCgenALa);                          //fill matching rec. K0s 3D histogram
+           Double_t fEta = v0c->Eta();
+           Double_t vMCrecALaCone[4] = {jetPt, invMALaMatch,fPtMCgenALa,fEta};
+           fhnMCrecALaCone->Fill(vMCrecALaCone);   //fill matching rec. Antilambda in 3D histogram
 
            SmearJetPt(jetPt,cl,GetFFRadius(),GetFFMinLTrackPt(),jetPtSmear);
-           
-           fh3MCrecALaConeSmear->Fill(jetPtSmear,invMALaMatch,fPtMCgenALa); 
            
+           Double_t vMCrecALaConeSmear[4] = {jetPtSmear, invMALaMatch,fPtMCgenALa,fEta};
+           fhnMCrecALaConeSmear->Fill(vMCrecALaConeSmear);   //fill matching rec. Antilambda in 3D histogram
 
          } // end MCgenALa loop
 
@@ -3600,7 +4551,13 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
                if(!trackPosPt)continue;
                if(!trackPosEta)continue;
 
-               fh3SecContinCone->Fill(jetPt, trackPosPt, trackPosEta);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo 
+               Double_t vLaSecContinCone[3] = {jetPt, trackPosPt, trackPosEta};
+               fhnLaSecContinCone->Fill(vLaSecContinCone);
+
+
+
+               //fh3SecContinCone->Fill(jetPt, trackPosPt, trackPosEta);
+             }              //if it's the case, fill jet pt, daughter track pt and track eta in histo 
              
              if(particleLabel == negAssLabel){
 
@@ -3613,27 +4570,40 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
                if(!trackNegPt)continue;
                if(!trackNegEta)continue;
 
-               fh3SecContinCone->Fill(jetPt, trackNegPt, trackNegEta);}              //if it's the case, fill jet pt, daughter track pt and track eta in histo
+               Double_t vLaSecContinCone[3] = {jetPt, trackNegPt, trackNegEta};
+               fhnLaSecContinCone->Fill(vLaSecContinCone);
+
+               //fh3SecContinCone->Fill(jetPt, trackNegPt, trackNegEta);
+             }              //if it's the case, fill jet pt, daughter track pt and track eta in histo
            }
          }
          
        } //end rec-ALa-in-cone loop
        //________________________________________________________________________________________________________________________________________________________
        
-       delete fListMCgenALaCone;
        
+       fListMCgenALaCone->Clear();     
       }//end fAnalysisMC
       
-      delete jetConeALalist;
-      delete jettracklist; //had been initialised at jet loop beginning
-
-
-      }//end of if 'leading' or 'all jet' requirement
+      
+      jetConeALalist->Clear();
+      jettracklist->Clear();
+    }//end of if 'leading' or 'all jet' requirement
   }//end of jet loop
-
   
-
-
+  jettracklist->Clear();
+  jetConeK0list->Clear();
+  jetConeLalist->Clear();
+  jetConeALalist->Clear();
+  jetPerpConeK0list->Clear();
+  jetPerpConeLalist->Clear();
+  jetPerpConeALalist->Clear();
+  jetMedianConeK0list->Clear();
+  jetMedianConeLalist->Clear();
+  jetMedianConeALalist->Clear();
+  fListK0sRC->Clear();
+  fListLaRC->Clear();
+  fListALaRC->Clear();
   fTracksRecCuts->Clear();
   fJetsRecCuts->Clear();
   fBckgJetsRec->Clear();
@@ -3647,9 +4617,14 @@ void AliAnalysisTaskJetChem::UserExec(Option_t *)
   fListMCgenK0s->Clear();
   fListMCgenLa->Clear();
   fListMCgenALa->Clear();
+  fListMCgenK0sCone->Clear();
+  fListMCgenLaCone->Clear();
+  fListMCgenALaCone->Clear();
   
   //Post output data.
-  PostData(1, fCommonHistList);    
+  PostData(1, fCommonHistList); 
+  //end of event loop
+   
 }
 
 // ____________________________________________________________________________________________
@@ -3759,6 +4734,12 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
     return -1;
   }
   
+  
+  if(fDebug>5){std::cout<<"AliAnalysisTaskJetChem::GetListOfV0s(): type: "<<type<<" particletype: "<<particletype<<"aod: "<<aod<<std::endl;
+    if(type==kTrackUndef){std::cout<<"AliAnalysisTaskJetChem::GetListOfV0s(): kTrackUndef!! "<<std::endl;}
+  }
+  
+  
   if(type==kTrackUndef) return 0;
 
   if(!primVertex) return 0;
@@ -3769,6 +4750,9 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
   lPrimaryVtxPosition[1] = primVertex->GetY();
   lPrimaryVtxPosition[2] = primVertex->GetZ();
 
+  if(fDebug>5){ std::cout<<"AliAnalysisTaskJetChem::GetListOfV0s(): aod->GetNumberOfV0s: "<<aod->GetNumberOfV0s()<<std::endl; }
+
+
   for(int i=0; i<aod->GetNumberOfV0s(); i++){ // loop over V0s
     
 
@@ -3836,7 +4820,10 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
 
     /////////////////////////////////////////////////////////////
     //V0 and track Cuts:
-    
+   
+
+    if(fDebug>7){if(!(IsK0InvMass(invMK0s)) && !(IsLaInvMass(invMLa)) && !(IsLaInvMass(invMALa))){std::cout<<"AliAnalysisTaskJetChem::GetListOfV0s: invM not in selected mass window "<<std::endl;}}
     if(!(IsK0InvMass(invMK0s)) && !(IsLaInvMass(invMLa)) && !(IsLaInvMass(invMALa)))continue; 
     
     //  Double_t PosEta = trackPos->AliAODTrack::Eta();//daughter track charge is sometimes wrong here, account for that!!!
@@ -3876,7 +4863,7 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
     Float_t fMROverPtLambda = fMassLambda*fROverPt; // m*R/pT
 
     //___________________
-    Double_t fRap = -999;//init values
+    //Double_t fRap = -999;//init values
     Double_t fEta = -999;
     Double_t fV0cosPointAngle = -999;
     Double_t fV0DecayLength = v0->DecayLengthV0(lPrimaryVtxPosition);
@@ -3951,11 +4938,11 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
 
     fV0Radius  = TMath::Sqrt(lV0Position[0]*lV0Position[0]+lV0Position[1]*lV0Position[1]);
     
-    if(particletype == kK0)         {fRap = v0->RapK0Short();
+    if(particletype == kK0)         {//fRap = v0->RapK0Short();
                                      fEta = v0->PseudoRapV0();}
-    if(particletype == kLambda)     {fRap = v0->RapLambda();
+    if(particletype == kLambda)     {//fRap = v0->RapLambda();
                                      fEta = v0->PseudoRapV0();}
-    if(particletype == kAntiLambda) {fRap = v0->Y(-3122);
+    if(particletype == kAntiLambda) {//fRap = v0->Y(-3122);
                                      fEta = v0->PseudoRapV0();}
 
 
@@ -3973,8 +4960,8 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
     Double_t ArmenterosPt=-999;
     Double_t PosPl;
     Double_t NegPl;
-    Double_t PosPt;
-    Double_t NegPt;   
+    //Double_t PosPt;
+    //Double_t NegPt;   
     
     if(particletype == kK0){
       
@@ -3995,10 +4982,10 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
       TVector3 v0Neg(pm[0],pm[1],pm[2]);
       TVector3 v0totMom(v0mom[0], v0mom[1], v0mom[2]); //vector for tot v0 momentum
       
-      PosPt = v0Pos.Perp(v0totMom);             //longitudinal momentum of positive charged daughter track
+      //PosPt = v0Pos.Perp(v0totMom);             //longitudinal momentum of positive charged daughter track
       PosPl = v0Pos.Dot(v0totMom)/v0totMom.Mag();  //transversal momentum of positive charged daughter track
          
-      NegPt = v0Neg.Perp(v0totMom);             //longitudinal momentum of negative charged daughter track
+      //NegPt = v0Neg.Perp(v0totMom);             //longitudinal momentum of negative charged daughter track
       NegPl = v0Neg.Dot(v0totMom)/v0totMom.Mag();  //transversal momentum of nergative charged daughter track
       
       ArmenterosAlpha = 1.-2./(1+(PosPl/NegPl));  
@@ -4063,24 +5050,12 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
     //Proper Lifetime Cut: DecayLength3D * PDGmass / |p_tot| < 3*2.68cm (ctau(betagamma=1))  ;  |p|/mass = beta*gamma
     //////////////////////////////////////////////
     
-    //cut on 3D DistOverTotMom
-    /*  if(particletype == kK0){
-      
-      fh2ProperLifetimeK0sVsPtBeforeCut->Fill(trackPt,fDistOverTotMomK0s); //fill these histos after all other cuts
-      fh1ProperLifetimeV0BeforeCut->Fill(fDistOverTotMomK0s);
-      if(fDistOverTotMomK0s >= (fCutV0DecayMax * avDecayLengthK0s))continue;
-      fh1ProperLifetimeV0AfterCut->Fill(fDistOverTotMomK0s);
-      fh2ProperLifetimeK0sVsPtAfterCut->Fill(trackPt,fDistOverTotMomK0s); 
-    } 
-    */
     
 //cut on 2D DistOverTransMom
     if(particletype == kK0){//the cut on Lambdas you can find above
       
       fh2ProperLifetimeK0sVsPtBeforeCut->Fill(trackPt,fMROverPtK0s); //fill these histos after all other cuts
-      fh1ProperLifetimeV0BeforeCut->Fill(fMROverPtK0s);
       if(fMROverPtK0s > (fCutV0DecayMax * avDecayLengthK0s))continue;
-      fh1ProperLifetimeV0AfterCut->Fill(fMROverPtK0s);
       fh2ProperLifetimeK0sVsPtAfterCut->Fill(trackPt,fMROverPtK0s); 
       
       //Double_t phi = v0->Phi();
@@ -4116,10 +5091,11 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
        
        
        //first for all Lambda and Antilambda candidates____________________________________________________________________
-       
+       TString generatorName;
+       Bool_t isinjected;
        if(particletype == kLambda){
          
-         mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+         mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
          
          
          if((motherType == 3312)||(motherType == 3322)){//mother of v0 is neutral or negative Xi
@@ -4129,26 +5105,32 @@ Int_t AliAnalysisTaskJetChem::GetListOfV0s(TList *list, const Int_t type, const
        }
        
        if(particletype == kAntiLambda){
-         mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+         
+         mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
          
          if((motherType == -3312)||(motherType == -3322)){
            fListFeeddownALaCand->Add(v0); //fill TList with ass. particles, stemming from feeddown from Xi(bar) decays                   
          }
        }
       }
+
       
       //_only true primary particles survive the following checks_______________________________________________________________________________________________
-      
+      TString generatorName;
+         Bool_t isinjected;
       if(particletype == kK0){
-       mclabelcheck = MCLabelCheck(v0, kK0, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+
+       mclabelcheck = MCLabelCheck(v0, kK0, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
        if(mclabelcheck == kFALSE)continue;      
       }
       if(particletype == kLambda){
-       mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+
+       mclabelcheck = MCLabelCheck(v0, kLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
        if(mclabelcheck == kFALSE)continue;     
       }
       if(particletype == kAntiLambda){
-       mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode);
+
+       mclabelcheck = MCLabelCheck(v0, kAntiLambda, trackNeg, trackPos, listmc, negDaughterpdg, posDaughterpdg, motherType, v0Label, MCPt, fPhysicalPrimary, MCv0PdgCode, generatorName, isinjected);
        if(mclabelcheck == kFALSE)continue;      
       }
       
@@ -4276,8 +5258,8 @@ Int_t AliAnalysisTaskJetChem::GetListOfMCParticles(TList *outputlist, const Int_
   // get MC generated particles
 
   Int_t fPdgcodeCurrentPart = 0; //pdg code current particle
-  Double_t fRapCurrentPart  = 0; //get rapidity
-  Double_t fPtCurrentPart   = 0; //get transverse momentum
+  //Double_t fRapCurrentPart  = 0; //get rapidity
+  //Double_t fPtCurrentPart   = 0; //get transverse momentum
   Double_t fEtaCurrentPart = 0;  //get pseudorapidity 
 
   //variable for check: physical primary particle
@@ -4421,9 +5403,9 @@ Int_t AliAnalysisTaskJetChem::GetListOfMCParticles(TList *outputlist, const Int_
  
       //Is close enough to primary vertex to be considered as primary-like?
       
-      fRapCurrentPart   = MyRapidity(p0->E(),p0->Pz());
+      //fRapCurrentPart   = MyRapidity(p0->E(),p0->Pz());
       fEtaCurrentPart   = p0->Eta();
-      fPtCurrentPart    = p0->Pt();
+      //fPtCurrentPart    = p0->Pt();
             
       if (TMath::Abs(fEtaCurrentPart) < fCutEta){
        // if (TMath::Abs(fRapCurrentPart) > fCutRap)continue;    //rap cut for crosschecks
@@ -4482,12 +5464,11 @@ Double_t AliAnalysisTaskJetChem::MyRapidity(Double_t rE, Double_t rPz) const
 } 
 //----------------------------------------------------------------------------
 
-// ________________________________________________________________________________________________________________________//function to get the MC gen. jet particles
 
 void AliAnalysisTaskJetChem::GetTracksInCone(TList* inputlist, TList* outputlist, const AliAODJet* jet, 
                                                                const Double_t radius, Double_t& sumPt, const Double_t minPt, const Double_t maxPt, Bool_t& isBadPt)
 {
-  // fill list of tracks in cone around jet axis  
+  // fill list of V0 tracks in cone around jet axis  
 
   sumPt = 0;
   Bool_t isBadMaxPt = kFALSE;
@@ -4498,7 +5479,9 @@ void AliAnalysisTaskJetChem::GetTracksInCone(TList* inputlist, TList* outputlist
   jet->PxPyPz(jetMom);
   TVector3 jet3mom(jetMom);
 
-  for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++){
+  //if(jetets < jetetscutr)continue;
+
+  for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++){//loop over all K0s found in event
 
     AliVParticle* track = dynamic_cast<AliVParticle*>(inputlist->At(itrack));
     if(!track)continue;
@@ -4508,7 +5491,7 @@ void AliAnalysisTaskJetChem::GetTracksInCone(TList* inputlist, TList* outputlist
 
     Double_t dR = jet3mom.DeltaR(track3mom);
 
-    if(dR<radius){
+    if(dR<radius){//fill all the V0s inside cone into outputlist, radius is reutrn value of GetFFRadius() 
 
       outputlist->Add(track);
       
@@ -4640,8 +5623,10 @@ void AliAnalysisTaskJetChem::GetTracksInPerpCone(TList* inputlist, TList* output
 
 // _______________________________________________________________________________________________________________________________________________________
 
-Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,const AliAODTrack* trackNeg, const AliAODTrack* trackPos, TList *listmc, Int_t& negDaughterpdg, Int_t& posDaughterpdg, Int_t& motherType, Int_t& v0Label, Double_t& MCPt, Bool_t& fPhysicalPrimary, Int_t& MCv0PDGCode){
-                                
+Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,const AliAODTrack* trackNeg, const AliAODTrack* trackPos, TList *listmc, Int_t& negDaughterpdg, Int_t& posDaughterpdg, Int_t& motherType, Int_t& v0Label, Double_t& MCPt, Bool_t& fPhysicalPrimary, Int_t& MCv0PDGCode, TString& generatorName, Bool_t& isinjected){
+                               
+  if(!v0)return kFALSE;
+
   TClonesArray *stackmc = 0x0;
   stackmc = (TClonesArray*)listmc->FindObject(AliAODMCParticle::StdBranchName()); //get MCAOD branch in data
   if (!stackmc)
@@ -4665,9 +5650,7 @@ Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,con
      
       mcXv=header->GetVtxX(); mcYv=header->GetVtxY(); mcZv=header->GetVtxZ();
 
-      Int_t trackinjected = IsTrackInjected(v0, header, stackmc); //requires AliAODTrack instead of AliVTrack
-
-      if(trackinjected == 0){std::cout<<"HIJING track injected!!: "<<trackinjected<<std::endl;}
+      
 
       //mc label checks
      
@@ -4684,10 +5667,6 @@ Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,con
   
          AliAODMCParticle *mcv0 = (AliAODMCParticle *)stackmc->UncheckedAt(v0Label);  //fetch MC ass. particle to v0 (mother of the both charged daughter tracks)
         
-         //do not use anymore: 
-         //fPhysicalPrimary = mcv0->IsPhysicalPrimary(); 
-
-        
          Float_t fDistPrimaryMax = 0.01; // [cm] max distance of production point to the primary vertex (criterion for choice of MC particles considered as primary)
          
          // Get the distance between production point of the MC mother particle and the primary vertex
@@ -4700,14 +5679,19 @@ Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,con
          fPhysicalPrimary = kFALSE;//init
 
          fPhysicalPrimary = (fDistPrimary < fDistPrimaryMax);
-
-         //if(fPhysicalPrimary == kTRUE){std::cout<<"hello*********!!!!!!!!!!!!! "<<std::endl;} 
-         //if(fPhysicalPrimary == kFALSE)return kFALSE;          
-         
          MCv0PDGCode = mcv0->GetPdgCode();
-         
-         //std::cout<<"MCv0PDGCode: "<<MCv0PDGCode<<std::endl;
-         
+
+         //if(fPhysicalPrimary == kTRUE){//look only at physical primary particles
+
+         isinjected = IsTrackInjected(v0Label, header, stackmc, generatorName);
+
+           //trackinjected is kFALSE if it is either Hijing or has no generator name
+           // std::cout<<" "<<std::endl;
+           // std::cout<<"#### next particle: ####"<<std::endl;
+           //std::cout<<"Is track injected: "<< trackinjected <<std::endl;
+           // std::cout<<"pdg code: "<<MCv0PDGCode<<std::endl; 
+           // std::cout<<"v0Label: "<<v0Label<<std::endl;
+                 
          MCPt = mcv0->Pt();//for MC data, always use MC gen. pt for any pt distributions, also for the spectra, used for normalisation
          //for feed-down checks later
          
@@ -4744,7 +5728,7 @@ Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,con
               if(TMath::Abs(posDaughterpdg) != 211){return kFALSE;}//one or both of the daughters are not a pion
               if(TMath::Abs(negDaughterpdg) != 211){return kFALSE;}
               
-              if(MCv0PDGCode != 310)  {fh1noAssociatedK0s->Fill(1.);return kFALSE;}
+              if(MCv0PDGCode != 310)  {return kFALSE;}
             }
             
             if(particletype == kLambda){
@@ -4759,7 +5743,7 @@ Bool_t AliAnalysisTaskJetChem::MCLabelCheck(AliAODv0* v0, Int_t particletype,con
               if(MCv0PDGCode != -3122)return kFALSE;
               if(posDaughterpdg != 211)return kFALSE;
               if(negDaughterpdg !=-2212)return kFALSE;    //pdg code check for Antilambda daughters
-              //if(fPhysicalPrimary == 1){fh1MCmotherALa->Fill(7.);}
+           
               
               //{if((motherType == -3312)||(motherType == -3322)){continue;}//if bar{Xi0} and Xi+ is motherparticle of Antilambda, particle is rejected
               //}        
@@ -4848,51 +5832,16 @@ Bool_t AliAnalysisTaskJetChem::DaughterTrackCheck(AliAODv0* v0, Int_t& nnum, Int
     }
 }
 
-//_______________________________________________________________________________________________________________________________________________________
-
-Int_t AliAnalysisTaskJetChem::IsTrackInjected(AliAODv0 *v0, AliAODMCHeader *header, TClonesArray *arrayMC){//info in TString should be available from 2011 data productions on..
-  
-  if(!v0){std::cout << " !part " << std::endl;return 1;}
-  if(!header){std::cout << " !header " << std::endl;return 1;}
-  if(!arrayMC){std::cout << " !arrayMC " << std::endl;return 1;}
-
-  Int_t lab=v0->GetLabel();
-  if(lab<0) {return 1;} 
-  TString bbb = GetGenerator(lab,header);
-  TString empty="";
-  
-  // std::cout << " TString bbb: " << bbb << std::endl;
-
-  //  std::cout << " FIRST CALL " << bbb << std::endl;
-  
-  while(bbb.IsWhitespace()){
-    AliAODMCParticle *mcpart= (AliAODMCParticle*)arrayMC->At(lab);
-    if(!mcpart){return 1;}
-    Int_t mother = mcpart->GetMother();
-    lab=mother;
-    bbb = GetGenerator(mother,header);
-    std::cout << "Testing " << bbb << " "  << std::endl;
-  }
-
-  std::cout << " FINAL CALL " << bbb << std::endl;
-  
-  //std::transform(bbb.begin(), bbb.end(), bbb.begin(), ::tolower);   //convert TString bbb into lower case, to avoid that TString could be  written in lower or upper case
-
-  if(bbb.Contains("ijing")){std::cout << " particle is injected!! " << std::endl; return 0;}//if TString returns something with "ijing" return this method with 0 -> select out all HIJING particles, all others return with "1"
-  
-  return 1;
-}
-
 //______________________________________________________________________
 TString AliAnalysisTaskJetChem::GetGenerator(Int_t label, AliAODMCHeader* header){
-   Int_t nsumpart=0;
-   TList *lh=header->GetCocktailHeaders();
-   Int_t nh=lh->GetEntries();
+  Int_t nsumpart=0;//number of particles
+  TList *lh=header->GetCocktailHeaders();//TList with all generator headers
+  Int_t nh=lh->GetEntries();//number of entries in TList with all headers
+
    for(Int_t i=0;i<nh;i++){
      AliGenEventHeader* gh=(AliGenEventHeader*)lh->At(i);
-     TString genname=gh->GetName();
-     Int_t npart=gh->NProduced();
+     TString genname=gh->GetName();//name of particle generator
+     Int_t npart=gh->NProduced();//number of stable or undecayed particles in MC stack block (?)
      if(label>=nsumpart && label<(nsumpart+npart)) return genname;
      nsumpart+=npart;
    }
@@ -4900,6 +5849,56 @@ TString AliAnalysisTaskJetChem::GetGenerator(Int_t label, AliAODMCHeader* header
    return empty;
  }
 
+//_____________________________________________________________________
+void AliAnalysisTaskJetChem::GetTrackPrimaryGenerator(Int_t lab, AliAODMCHeader *header,TClonesArray *arrayMC,TString &nameGen){
+
+  // method to check if a particle is stemming from a given generator
+
+  nameGen=GetGenerator(lab,header);
+  
+  //  Int_t countControl=0;
+  
+  while(nameGen.IsWhitespace()){
+    AliAODMCParticle *mcpart= (AliAODMCParticle*)arrayMC->At(lab);//get MC generated particle for particle MC label
+    if(!mcpart){
+      printf("AliAnalysisTaskJetChem::IsTrackInjected - BREAK: No valid AliAODMCParticle at label %i\n",lab);
+      break;
+    }
+    Int_t mother = mcpart->GetMother();
+
+    if(mother<0){
+      printf("AliAnalysisTaskJetChem::IsTrackInjected - BREAK: Reached primary particle without valid mother\n");
+      break;
+    }
+    lab=mother;
+    nameGen=GetGenerator(mother,header);
+
+    // countControl++;
+    // if(countControl>=10){ // 10 = arbitrary number; protection from infinite loops
+    //   printf("AliVertexingHFUtils::IsTrackInjected - BREAK: Protection from infinite loop active\n");
+    //   break;
+    // }
+
+  }
+  
+  return;
+}
+
+
+//---------------------------------------------------------------------------------------------------------------------
+Bool_t AliAnalysisTaskJetChem::IsTrackInjected(Int_t lab, AliAODMCHeader *header,TClonesArray *arrayMC, TString& nameGen){
+  // method to check if a v0 particle comes from the signal event or from the underlying Hijing event
+  //TString nameGen;
+
+  GetTrackPrimaryGenerator(lab, header, arrayMC, nameGen);
+  
+  if(nameGen.IsWhitespace() || nameGen.Contains("ijing")) return kFALSE;//particle has either no info about generator or is Hijing particle, so it is not injected
+  
+  //std::cout<<"generator name: "<<nameGen<<std::endl;
+
+  return kTRUE;
+}
+
 //_________________________________________________________________________________________________________________________________________
 Double_t AliAnalysisTaskJetChem::SmearJetPt(Double_t jetPt, Int_t /*cent*/, Double_t /*jetRadius*/, Double_t /*ptmintrack*/, Double_t& jetPtSmear){       
   
@@ -4975,6 +5974,72 @@ Double_t AliAnalysisTaskJetChem::SmearJetPt(Double_t jetPt, Int_t /*cent*/, Doub
 }
 
 
+//______________________________________________________________________________________________________________________
+//____________________________________________________________________________________________________________________
+
+Bool_t AliAnalysisTaskJetChem::IsParticleInCone(const AliVParticle* part1, const AliVParticle* part2, Double_t dRMax) const
+{
+// decides whether a particle is inside a jet cone
+  if (!part1 || !part2)
+    return kFALSE;
+
+  TVector3 vecMom2(part2->Px(),part2->Py(),part2->Pz());
+  TVector3 vecMom1(part1->Px(),part1->Py(),part1->Pz());
+  Double_t dR = vecMom2.DeltaR(vecMom1); // = sqrt(dEta*dEta+dPhi*dPhi)
+  if(dR<dRMax) // momentum vectors of part1 and part2 are closer than dRMax
+    return kTRUE;
+  return kFALSE;
+}
+//__________________________________________________________________________________________________________________
+
+
+Bool_t AliAnalysisTaskJetChem::IsRCJCOverlap(TList* recjetlist, const AliVParticle* part, Double_t dDistance) const{
+  
+  if(!recjetlist) return kFALSE;
+  if(!part) return kFALSE;
+  if(!dDistance) return kFALSE;
+  Int_t nRecJetsCuts = fJetsRecCuts->GetEntries(); 
+  
+  for(Int_t i=0; i<nRecJetsCuts; ++i){   //loop over all reconstructed jets in events      
+    AliAODJet* jet = (AliAODJet*) (recjetlist->At(i));
+    if(!jet){if(fDebug>2)std::cout<<"AliAnalysisTaskJetChem::IsRCJCOverlap jet pointer invalid!"<<std::endl;continue;}
+    if(IsParticleInCone(jet, part, dDistance) == kTRUE)return kTRUE;//RC and JC are overlapping
+    
+  }//end loop testing RC-JC overlap
+  return kFALSE;//RC and JC are not overlapping -> good!
+}
+
+//_______________________________________________________________________________________________________________________
+AliAODJet* AliAnalysisTaskJetChem::GetRandomCone(TList* jetlist, Double_t dEtaConeMax, Double_t dDistance) const
+{ 
+  TLorentzVector vecRdCone;
+  AliAODJet* jetRC = 0;//random cone candidate
+  Double_t dEta, dPhi; //random eta and phi value for RC
+  Bool_t IsRCoutJC = kFALSE;//check whether RC is not overlapping with any selected jet cone in event
+  Int_t iRCTrials = 10;//search at maximum 10 times for random cone that doesn't overlap with jet cone
+  
+  for(Int_t i=0; i<iRCTrials; iRCTrials++){
+    
+    dEta = dEtaConeMax*(2*fRandom->Rndm()-1.); //random eta value in range: [-dEtaConeMax,+dEtaConeMax]
+    dPhi = TMath::TwoPi()*fRandom->Rndm(); //random phi value in range: [0,2*Pi]
+    vecRdCone.SetPtEtaPhiM(1.,dEta,dPhi,0.);
+    jetRC = new AliAODJet(vecRdCone);//new RC candidate
+
+    if (!IsRCJCOverlap(jetlist,jetRC,dDistance))
+        {
+          IsRCoutJC = kTRUE; //std::cout<<"RC and JC are not overlapping!!!"<<std::endl;
+          break;
+        }
+      else
+        delete jetRC; //RC is overlapping with JC, delete this RC candidate
+         
+  }
+  if(!IsRCoutJC) {jetRC = 0;}//in case no random cone was selected
+
+  return jetRC;
+}
+
+
 // _______________________________________________________________________________________________________________________
 AliAODJet* AliAnalysisTaskJetChem::GetMedianCluster()
 {
@@ -5000,6 +6065,7 @@ AliAODJet* AliAnalysisTaskJetChem::GetMedianCluster()
 
     bgrDensity[ij] = density;
     indices[ij]    = ij;
+
   }
    
   TMath::Sort(nBckgClusters, bgrDensity, indices); 
@@ -5007,42 +6073,33 @@ AliAODJet* AliAnalysisTaskJetChem::GetMedianCluster()
   // get median cluster
 
   AliAODJet* medianCluster = 0;
-  Double_t   medianDensity = 0;
 
   if(TMath::Odd(nBckgClusters)){
 
-    //Int_t medianIndex = indices[(Int_t) (0.5*(nBckgClusters-1))];
     Int_t medianIndex = indices[(Int_t) (0.5*(nBckgClusters+1))];
 
     medianCluster = (AliAODJet*)(fBckgJetsRec->At(medianIndex));
     
-    Double_t clusterPt = medianCluster->Pt();
-    Double_t area      = medianCluster->EffectiveAreaCharged();
-    
-    if(area>0) medianDensity = clusterPt/area;
+    //Double_t clusterPt = medianCluster->Pt();
+    //Double_t area      = medianCluster->EffectiveAreaCharged();
   }
   else{
 
-    //Int_t medianIndex1 = indices[(Int_t) (0.5*nBckgClusters-1)];
-    //Int_t medianIndex2 = indices[(Int_t) (0.5*nBckgClusters)];
-
     Int_t medianIndex1 = indices[(Int_t) (0.5*nBckgClusters)];
     Int_t medianIndex2 = indices[(Int_t) (0.5*nBckgClusters+1)];
 
     AliAODJet* medianCluster1 = (AliAODJet*)(fBckgJetsRec->At(medianIndex1));
     AliAODJet* medianCluster2 = (AliAODJet*)(fBckgJetsRec->At(medianIndex2));
     
-    Double_t density1 = 0;
-    Double_t clusterPt1 = medianCluster1->Pt();
-    Double_t area1      = medianCluster1->EffectiveAreaCharged();
-    if(area1>0) density1 = clusterPt1/area1;
+    // Double_t density1 = 0;
+    //Double_t clusterPt1 = medianCluster1->Pt();
+    //Double_t area1      = medianCluster1->EffectiveAreaCharged();
+    //if(area1>0) Double_t density1 = clusterPt1/area1;
     
-    Double_t density2 = 0;
-    Double_t clusterPt2 = medianCluster2->Pt();
-    Double_t area2      = medianCluster2->EffectiveAreaCharged();
-    if(area2>0) density2 = clusterPt2/area2;
-    
-    medianDensity = 0.5*(density1+density2);
+    // Double_t density2 = 0;
+    //Double_t clusterPt2 = medianCluster2->Pt();
+    //Double_t area2      = medianCluster2->EffectiveAreaCharged();
+    // if(area2>0) Double_t density2 = clusterPt2/area2;
     
     medianCluster = ( (gRandom->Rndm()>0.5) ? medianCluster1 : medianCluster2 );  // select one randomly to avoid adding areas
   }
@@ -5052,3 +6109,26 @@ AliAODJet* AliAnalysisTaskJetChem::GetMedianCluster()
 
   return medianCluster;
 }    
+
+//____________________________________________________________________________________________
+
+Double_t AliAnalysisTaskJetChem::AreaCircSegment(Double_t dRadius, Double_t dDistance) const
+{
+// calculate area of a circular segment defined by the circle radius and the (oriented) distance between the secant line and the circle centre
+  Double_t dEpsilon = 1e-2;
+  Double_t dR = dRadius;
+  Double_t dD = dDistance;
+  if (TMath::Abs(dR)<dEpsilon)
+    {
+      if(fDebug>0) printf("AliAnalysisTaskJetChem::AreaCircSegment: Error: Too small radius: %f < %f\n",dR,dEpsilon);
+      return 0.;
+    }
+  if (dD>=dR)
+    return 0.;
+  if (dD<=-dR)
+    return TMath::Pi()*dR*dR;
+  return dR*dR*TMath::ACos(dD/dR)-dD*TMath::Sqrt(dR*dR-dD*dD);
+}
+
+
+