]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGGA/CaloTrackCorrelations/macros/AddTaskGammaJetCorrelation.C
move histogram settings in the isolation analysis to the histogram settings container...
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / macros / AddTaskGammaJetCorrelation.C
index 597cd493a72fe0582e125b396206bda611f27797..fd10d91a8f300aa4e52b64039fdd35ae36c8c36e 100644 (file)
@@ -3,10 +3,12 @@
 // based on AddTaskIsoPhoton by Gustavo Conesa & Marie Germain.
 
 //new macro
-TString kGammaJetCorrelationName          = "";//done
+TString kGammaJetCorrelationName          = "";
 
-AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  isoCone          = 0.4,
-                                                               const Float_t  isoPth           = 0.5,
+AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  isoCone       = 0.4,
+                                                               const Float_t  isoPth        = 0.5,
+                                                               const Double_t maxLambda0Cut = 0.5,
+                                                               const Int_t    maxNLMcut     = 2,
                                                                const Bool_t   timecut       = kFALSE,
                                                                const TString  calorimeter   = "EMCAL",
                                                                const Bool_t   simulation    = kFALSE,
@@ -23,6 +25,11 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  i
                                                                const Int_t    maxCen        = -1,
                                                                const TString  jetBranchName = "clustersAOD_ANTIKT04_B0_Filter00272_Cut00150_Skip00",
                                                                const TString  jetBkgBranchName = "jeteventbackground_clustersAOD_KT04_B0_Filter00768_Cut00150_Skip00",
+                const Float_t  jetMinPt      = 0,
+                const Float_t  minDeltaPhi   = 1.5,
+                                                               const Float_t  maxDeltaPhi   = 4.5,
+                                                               const Float_t  minPtRatio    = 0,
+                                                               const Float_t  maxPtRatio    = 5,   
                                                                const Int_t    debug         = -1,
                                                                const Bool_t   printSettings = kFALSE,
                                                                const Double_t scaleFactor   = -1
@@ -47,17 +54,20 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  i
     return NULL;
   }
   
+  // Make sure the B field is enabled for track selection, some cuts need it
+  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
+
 //  inputDataType = "AOD";
 //  if(!kData.Contains("delta"))
 //    inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
   
   //input jets
-  TString     kDeltaAODJetName   = "AliAOD.Jets.root"; //Jet input AOD name
-  if(kDeltaAODJetName.Length()!=0)
+  TString     deltaAODJetName   = "AliAOD.Jets.root"; //Jet input AOD name
+  if(deltaAODJetName.Length()!=0)
     {
       // External file with Jets
-     // aodHandler->AddFriend(kDeltaAODJetName.Data());
-      mgr->RegisterExtraFile(kDeltaAODJetName.Data());
+     // aodHandler->AddFriend(deltaAODJetName.Data());
+      mgr->RegisterExtraFile(deltaAODJetName.Data());
       cout<<"Jet file registered "<<endl;
       cout<<"Extra files: "<<mgr->GetExtraFiles()<<endl;
     }
@@ -85,7 +95,7 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  i
   maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
   
   // General frame setting and configuration
-  maker->SetReader   (ConfigureReader(mgr->GetInputEventHandler()->GetDataType(),calorimeter,useKinematics,simulation,eventsel,nonlin,timecut,collision,trigger,firedTrigger,clustersArray,mix,minCen,maxCen,debug,printSettings)   ); 
+  maker->SetReader   (ConfigureReader(mgr->GetInputEventHandler()->GetDataType(),calorimeter,useKinematics,simulation,eventsel,nonlin,timecut,collision,trigger,firedTrigger,clustersArray,jetBranchName,jetBkgBranchName,mix,minCen,maxCen,debug,printSettings)   ); 
   maker->SetCaloUtils(ConfigureCaloUtils(clustersArray,collision,nonlin,exotic,simulation,timecut,debug,printSettings)); 
   
   // Analysis tasks setting and configuration
@@ -97,9 +107,9 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  i
   //Float_t isoCone = -1;
   //Float_t isoPth  = -1;
   
-  maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,simulation,debug,printSettings), n++); // Photon cluster selection
+  maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,simulation,maxLambda0Cut,maxNLMcut,debug,printSettings), n++); // Photon cluster selection
   maker->AddAnalysis(ConfigureIsolationAnalysis(calorimeter,collision,"Photon", partInCone,thresType, isoCone, isoPth,tm,kFALSE,simulation,debug,printSettings), n++); // Photon isolation   
-  maker->AddAnalysis(ConfigurePhotonJetAnalysis(simulation,debug,printSettings), n++);// photon-jet correlation analysis
+  maker->AddAnalysis(ConfigurePhotonJetAnalysis(calorimeter,isoCone,jetMinPt,minDeltaPhi,maxDeltaPhi,minPtRatio,maxPtRatio,simulation,debug,printSettings), n++);// photon-jet correlation analysis
 
   maker->SetAnaDebug(debug)  ;
   maker->SwitchOnHistogramsMaker()  ;
@@ -150,15 +160,18 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t  i
 }
 
 //____________________________________
-AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calorimeter = "EMCAL",Bool_t useKinematics = kFALSE,Bool_t simulation = kFALSE,Bool_t   eventsel      = kFALSE,Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE,
+AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calorimeter = "EMCAL",Bool_t useKinematics = kFALSE,
+                                    Bool_t simulation = kFALSE,Bool_t   eventsel      = kFALSE,Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE,
                                     TString  collision     = "pp",TString trigger="MB",TString firedTrigger="EG1",
-                                    TString  clustersArray = "V1",
-                                    Bool_t  mix           = kFALSE;
+                                    TString  clustersArray = "V1", TString  jetBranchName = "jets", TString  jetBkgBranchName = "jets",
+                                    Bool_t  mix           = kFALSE,
                                     Float_t minCen = -1, Float_t maxCen = -1,
                                     Int_t debug = -1,Bool_t printSettings = kFALSE)
 {
   
-  if(simu)
+  Bool_t useTender=kTRUE;
+
+  if(simulation)
   {
     if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
   }
@@ -173,8 +186,11 @@ AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calor
   else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
   
   reader->SetDebug(debug);//10 for lots of messages
-  //reader->SetDebug(10);//10 for lots of messages
-  //reader->SetDebug(2);//10 for lots of messages
+
+  if(useTender){
+    reader->SwitchOffTriggerPatchMatching();
+    reader->SwitchOffBadTriggerEventsRemoval();
+  }
 
   if(simulation)
   {
@@ -251,7 +267,7 @@ AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calor
        printf("Set time cut \n");
        reader->SwitchOnUseEMCALTimeCut();
        //Absolute window
-       reader->SetEMCALTimeCut(-20.,20.); // default is -25ns-20ns
+       reader->SetEMCALTimeCut(-30.,30.); // default is -25ns-20ns
       }
     else
       {
@@ -304,12 +320,25 @@ AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calor
   //  reader->SwitchOffCTS();//here changed 0n->off
   reader->SwitchOnCTS();//here changed 0n->off
 
+  reader->SwitchOffRecalculateVertexBC();
+  reader->SwitchOffVertexBCEventSelection();
+  
+  reader->SwitchOffUseTrackTimeCut();
+  reader->SetTrackTimeCut(0,50);
+
   if(inputDataType=="ESD")
   {
-    gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
-    AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
+    //Hybrids 2011
+    AliESDtrackCuts * esdTrackCuts  = CreateTrackCutsPWGJE(10001008);
     reader->SetTrackCuts(esdTrackCuts);
-    reader->SwitchOnConstrainTrackToVertex();
+    AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
+    reader->SetTrackComplementaryCuts(esdTrackCuts2);
+    
+    //Hybrids 2010
+    //AliESDtrackCuts * esdTrackCuts  = CreateTrackCutsPWGJE(10001006);
+    //reader->SetTrackCuts(esdTrackCuts);
+    //AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
+    //reader->SetTrackComplementaryCuts(esdTrackCuts2);
   }
   else if(inputDataType=="AOD")
   {
@@ -321,8 +350,7 @@ AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calor
   // Calorimeter
   
   reader->SetEMCALClusterListName(clustersArray);
-  //  if(clustersArray == "" && !kTender)
-  if(clustersArray == "")
+  if(clustersArray == "" && !useTender)
   {
     printf("**************** Standard EMCAL clusters branch analysis **************** \n");
     reader->SwitchOnClusterRecalculation();
@@ -407,16 +435,17 @@ AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calor
   }
   
   if(printSettings) reader->Print("");
-  reader->Print("");
   
   return reader;
   
 }
 
 //_______________________________________
-AliCalorimeterUtils* ConfigureCaloUtils( TString  clustersArray = "V1",TString  collision     = "pp",Bool_t nonlin = kTRUE,Bool_t exotic = kTRUE ,Bool_t simulation = kFALSE,Bool_t timecut = kFALSE,Int_t debug = -1,Bool_t print = kFALSE)
+AliCalorimeterUtils* ConfigureCaloUtils( TString  clustersArray = "V1",TString  collision     = "pp",Bool_t nonlin = kTRUE,Bool_t exotic = kTRUE ,Bool_t simulation = kFALSE,Bool_t timecut = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE)
 {
   
+  Bool_t useTender=kTRUE;
+
   AliCalorimeterUtils *cu = new AliCalorimeterUtils;
   cu->SetDebug(debug);
   
@@ -443,39 +472,43 @@ AliCalorimeterUtils* ConfigureCaloUtils( TString  clustersArray = "V1",TString
   //else         
   cu->SwitchOffRecalculateClusterTrackMatching();
   
-  cu->SwitchOnBadChannelsRemoval() ;
-  //cu->SwitchOffBadChannelsRemoval() ;// <<<----changed here 
-  
-  //EMCAL settings
+  if(useTender)
+    cu->SwitchOffBadChannelsRemoval() ;
+  else
+    cu->SwitchOnBadChannelsRemoval() ;
 
+  //EMCAL settings
   if(!simulation)
     cu->SwitchOnLoadOwnEMCALGeometryMatrices();
-  
-  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
-
-  if(!simulation)
-  {
-    cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
-    //if(clustersArray == "" && !kTender) cu->SwitchOnRunDepCorrection(); 
-    if(clustersArray == "") cu->SwitchOnRunDepCorrection(); 
-  }
-
-  cu->SwitchOnEMCALOADB();//FIX ME!!!
 
-  gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
-  ConfigureEMCALRecoUtils(recou,
-                          simulation,                             
-                          exotic,
-                          nonlin,
-                         kFALSE, // e calib
-                          kFALSE, // bad map
-                          kFALSE); // time calib
+  if(!useTender){  
+    AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
+    
+    if(!simulation)
+      {
+       cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
+       //if(clustersArray == "" && !kTender) cu->SwitchOnRunDepCorrection(); 
+       if(clustersArray == "") cu->SwitchOnRunDepCorrection(); 
+      }
+    
+    cu->SwitchOnEMCALOADB();//FIX ME!!!
+
+    gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
+    ConfigureEMCALRecoUtils(recou,
+                           simulation,                             
+                           exotic,
+                           nonlin,
+                           kFALSE, // e calib
+                           kFALSE, // bad map
+                           kFALSE); // time calib
     //kCalibE, 
     //kBadMap,
     //kCalibT);   
-  recou->SetExoticCellDiffTimeCut(1e10);
-  if(timecut) recou->SetExoticCellDiffTimeCut(50.);
-  
+    recou->SetExoticCellDiffTimeCut(1e10);
+    if(timecut) recou->SetExoticCellDiffTimeCut(50.);
+  }//end tender
+
+
   if( nonlin ) 
   { 
 //    printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
@@ -492,11 +525,12 @@ AliCalorimeterUtils* ConfigureCaloUtils( TString  clustersArray = "V1",TString
     cu->SwitchOnCorrectClusterLinearity();
   }
     
-  
-  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
-  printf("ConfigureCaloUtils() - EMCAL BadMap        ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
-  
-    
+  if(!useTender){
+    printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
+    printf("ConfigureCaloUtils() - EMCAL BadMap        ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
+  }
+
+  cu->SetNumberOfSuperModulesUsed(10);
   // PHOS 
   cu->SwitchOffLoadOwnPHOSGeometryMatrices();
     
@@ -507,7 +541,7 @@ AliCalorimeterUtils* ConfigureCaloUtils( TString  clustersArray = "V1",TString
 }
 
 //_____________________________________
-AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm = kFALSE,Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE)
+AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm = kFALSE,Bool_t simulation = kFALSE,Double_t maxLambda0Cut=0.5,Int_t maxNLMcut=2,Int_t debug = -1,Bool_t printSettings = kFALSE)
 {
   
   AliAnaPhoton *ana = new AliAnaPhoton();
@@ -529,16 +563,15 @@ AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm =
   else 
   {//EMCAL
     ana->SetNCellCut(1);// At least 2 cells
-    //ana->SetNCellCut(0);// At least 2 cells <<<----changed here 
     ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
     ana->SetMaxEnergy(1000); 
-    ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off 
+    //ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off //<<<---modified here
     // restrict to less than 100 ns when time calibration is on 
     ana->SetMinDistanceToBadChannel(2, 4, 6); 
     // Not useful if M02 cut is already strong
-    //ana->SetNLMCut(1, 2) ;
+    ana->SetNLMCut(1, maxNLMcut) ;//[1,2]
     //ana->SetNLMCut(1, 10) ;//<<<----changed here 
-    ana->SetNLMCut(1, 1) ;//<<<----changed here 
+    //ana->SetNLMCut(1, 1) ;//<<<----changed here 
   }
   
   if(tm)
@@ -554,13 +587,12 @@ AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm =
   
   
   //PID cuts (shower shape)
-  //ana->SwitchOffCaloPID(); //<<<----changed here 
   ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
   AliCaloPID* caloPID = ana->GetCaloPID();
   //Not used in bayesian
   
   //EMCAL
-  caloPID->SetEMCALLambda0CutMax(0.50);//0.27 was before//0.50//<<<----changed here
+  caloPID->SetEMCALLambda0CutMax(maxLambda0Cut);//0.27 was before//0.50//<<<----changed here
   caloPID->SetEMCALLambda0CutMin(0.10);
   
   caloPID->SetEMCALDEtaCut(0.025);
@@ -569,7 +601,7 @@ AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm =
   //PHOS
   caloPID->SetPHOSDispersionCut(2.5);
   caloPID->SetPHOSRCut(2.);
-  if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
+  //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
       
   ana->SwitchOnFillShowerShapeHistograms();  // Filled before photon shower shape selection <<<--- changed here
   //ana->SwitchOffFillShowerShapeHistograms();  // Filled before photon shower shape selection
@@ -579,8 +611,8 @@ AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm =
   
   //if(!kData.Contains("delta")) 
   //{
-  //  ana->SetOutputAODName(Form("Photon%s",kGammaJetCorrelationName.Data()));
-  //  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+  ana->SetOutputAODName(Form("Photon%s",kGammaJetCorrelationName.Data()));
+  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
   //  //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
   //}
   //else 
@@ -618,7 +650,6 @@ AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString calorimeter = "EMCAL
 {
   
   AliAnaParticleIsolation *ana = new AliAnaParticleIsolation();
-  //ana->SetDebug(debug);
   ana->SetDebug(debug);
     
   ana->SwitchOnFiducialCut();
@@ -635,7 +666,7 @@ AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString calorimeter = "EMCAL
       ana->GetFiducialCut()->SetSimpleCTSFiducialCut  (0.6, 0, 360) ;    
   }
   
-  ana->SetMinPt(3);//<<---changed here
+  ana->SetMinPt(10);//<<---changed here
   
   // Input / output delta AOD settings
   
@@ -725,9 +756,6 @@ AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString calorimeter = "EMCAL
 
   SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
   
-  ana->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
-  ana->SetHistoPtSumRangeAndNBins   (0, 100, 250);
-  
   if(particle=="Hadron"  || particle.Contains("CTS"))
   {
     ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
@@ -805,6 +833,10 @@ void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges,TString calorimeter
   histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
   histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);
   
+  // Isolation
+  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
+  histoRanges->SetHistoPtSumRangeAndNBins   (0, 100, 250);
+  
 }
 
 //_________________
@@ -888,7 +920,10 @@ UInt_t SetTriggerMaskFromName(TString trigger)
 
 }
 
-AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE){
+AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(TString calorimeter = "EMCAL",Float_t gammaConeSize = 0.3, Float_t  jetMinPt  = 0, 
+                                                              Float_t  minDeltaPhi   = 1.5,Float_t  maxDeltaPhi   = 4.5,
+                                                              Float_t  minPtRatio    = 0,Float_t  maxPtRatio    = 5,
+                                                              Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE){
 
   AliAnaParticleJetFinderCorrelation *ana = new AliAnaParticleJetFinderCorrelation();
   ana->SetDebug(debug);
@@ -901,15 +936,16 @@ AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(Bool_t simulation
   ana->SelectIsolated(kTRUE); // do correlation with isolated photons <<---changed here
   ana->SetMakeCorrelationInHistoMaker(kFALSE);
   ana->SetPtThresholdInCone(0.150);//<<---- change here
-  ana->SetDeltaPhiCutRange(TMath::Pi()/2.,TMath::Pi()*3./2.);//Mostly Open Cuts 
+  //ana->SetDeltaPhiCutRange(TMath::Pi()/2.,TMath::Pi()*3./2.);//Mostly Open Cuts 
+  ana->SetDeltaPhiCutRange(minDeltaPhi,maxDeltaPhi);  // Delta phi cut for correlation
   ana->SetJetConeSize(0.4);//jet cone size / check the reco jet name
-  ana->SetJetMinPt(5);//min jet pt
+  ana->SetJetMinPt(jetMinPt);//min jet pt
   ana->SetJetAreaFraction(0.8);//min area fraction was 0.6
   ana->SetMinPt(0.3);//min cluster pt repeated from reader
-  ana->SetGammaConeSize(0.3);//isolation cone repeated from isolation ana
-
+  ana->SetGammaConeSize(gammaConeSize);//isolation cone repeated from isolation ana
+  //ana->SetRatioCutRange(0.01,5.); //Mostly Open Cuts //0.01-5//<<---- change here
+  ana->SetRatioCutRange(minPtRatio,maxPtRatio); // Delta pt cut for correlation
 
-  ana->SetRatioCutRange(0.01,5.); //Mostly Open Cuts //0.01-5//<<---- change here
   ana->UseJetRefTracks(kTRUE); //Working now
   //Set Histograms bins and ranges
   SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below 0,100,200
@@ -917,15 +953,15 @@ AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(Bool_t simulation
   //      ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
   //      ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
 
-  ana->SwitchOnNonStandardJetFromReader();
+  //  ana->SwitchOnNonStandardJetFromReader();
   ana->SwitchOnBackgroundJetFromReader();
   //background subtraction for photons
   //ana->SwitchOnBackgroundSubtractionGamma();
   ana->SwitchOffBackgroundSubtractionGamma();
 
   ana->SwitchOnSaveGJTree();
-  //ana->SwitchOnMostOpposite();
-  ana->SwitchOnMostEnergetic();
+  ana->SwitchOnMostOpposite();
+  //ana->SwitchOnMostEnergetic();
 
 
   //if(useKinematics) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms