Corrected analysis configuration and execution files after changes in PartCorr frame...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Dec 2008 11:46:16 +0000 (11:46 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Dec 2008 11:46:16 +0000 (11:46 +0000)
14 files changed:
PWG4/macros/ConfigAnalysisESDExample.C
PWG4/macros/ConfigAnalysisGammaDirect.C
PWG4/macros/ConfigAnalysisGammaHadronCorrelation.C
PWG4/macros/ConfigAnalysisGammaJetFinderCorrelation.C
PWG4/macros/ConfigAnalysisGammaJetLCCorrelation.C
PWG4/macros/ConfigAnalysisGammaPartonCorrelation.C
PWG4/macros/ConfigAnalysisMCExample.C [new file with mode: 0644]
PWG4/macros/ConfigAnalysisPhoton.C [new file with mode: 0644]
PWG4/macros/ConfigAnalysisPi0.C [new file with mode: 0644]
PWG4/macros/ConfigAnalysisPi0EbE.C [new file with mode: 0644]
PWG4/macros/ConfigAnalysisPi0EbEIsolated.C [new file with mode: 0644]
PWG4/macros/ana.C
PWG4/macros/anaExampleTask.C
PWG4/macros/anaPartCorrJetAn.C

index 6d4af63..087b719 100644 (file)
@@ -4,7 +4,7 @@
 //------------------------------------
 // Configuration macro example:
 //
-// Do prompt photon analysis with ESDs
+// Do example analysis with MC
 //
 // Author : Gustavo Conesa Balbastre (INFN-LNF)
 //------------------------------------
@@ -21,18 +21,15 @@ AliAnaPartCorrMaker*  ConfigAnalysis()
   
   //Detector Fidutial Cuts
   AliFidutialCut * fidCut = new AliFidutialCut();
-  //Select particles depending on acceptance
-  //kFALSE, open cuts
-  fidCut->DoCTSFidutialCut(kTRUE) ;
+  fidCut->DoCTSFidutialCut(kFALSE) ;
   fidCut->DoEMCALFidutialCut(kTRUE) ;
   fidCut->DoPHOSFidutialCut(kTRUE) ;
   
-  //Select particles in one region of the detectors
-  fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+  //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
   fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  
-  //Select particles in N regions of the detectors
+  fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
+  //   //Fidutial cut EMCAL,  5 regions
   //   Float_t etamax[]={0.67,0.51,0.16,-0.21,-0.61};
   //   TArrayF etamaxarr(5,etamax);
   //   fidCut->AddEMCALFidCutMaxEtaArray(etamaxarr);
@@ -48,113 +45,70 @@ AliAnaPartCorrMaker*  ConfigAnalysis()
   //   TArrayF phiminarr(6,phimin);
   //   fidCut->AddEMCALFidCutMinPhiArray(phiminarr);
   
-  //   //Fidutial cut PHOS
-  //   TArrayF etamaxarr(1,etamax); 
-  //   etamaxarr.SetAt(0.12,0);
-  //   fidCut->AddPHOSFidCutMaxEtaArray(etamaxarr);
-  //   TArrayF etaminarr(1,etamin); 
-  //   etaminarr.SetAt(-0.12,0);
-  //   fidCut->AddPHOSFidCutMinEtaArray(etaminarr);
-  //   TArrayF phimaxarr(1,phimax);
-  //   phimaxarr.SetAt(320.*TMath::DegToRad(),0);   
-  //   fidCut->AddPHOSFidCutMaxPhiArray(phimaxarr); 
-  //   TArrayF phiminarr(1,phimin);
-  //   phiminarr.SetAt(220.*TMath::DegToRad(),0);   
-  //   fidCut->AddPHOSFidCutMinPhiArray(phiminarr);
-  
-  //   //Fidutial cut CTS
-  //   TArrayF etamaxarr(1,etamax); 
-  //   etamaxarr.SetAt(0.12,0);
-  //   fidCut->AddCTSFidCutMaxEtaArray(etamaxarr);
-  //   TArrayF etaminarr(1,etamin); 
-  //   etaminarr.SetAt(-0.12,0);
-  //   fidCut->AddCTSFidCutMinEtaArray(etaminarr);
-  //   TArrayF phimaxarr(1,phimax);
-  //   phimaxarr.SetAt(320.*TMath::DegToRad(),0);   
-  //   fidCut->AddCTSFidCutMaxPhiArray(phimaxarr); 
-  //   TArrayF phiminarr(1,phimin);
-  //   phiminarr.SetAt(220.*TMath::DegToRad(),0);   
-  //   fidCut->AddCTSFidCutMinPhiArray(phiminarr);
-  
   fidCut->Print("");
   
   //-----------------------------------------------------------  
   // Reader
   //-----------------------------------------------------------
-  AliCaloTrackReader *reader = new AliCaloTrackESDReader();
+  AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
   reader->SetDebug(-1);
   
-  //Switch on or off the detectors information that you want
-  //It will fill the corresponding detector arrays
-  reader->SwitchOnEMCAL();
-  reader->SwitchOnCTS();
+ //Switch on or off the detectors information that you want
+  reader->SwitchOffEMCAL();
+  reader->SwitchOffCTS();
   reader->SwitchOnPHOS();
-  reader->SwitchOnEMCALCells();
+  reader->SwitchOffEMCALCells();
   reader->SwitchOnPHOSCells();
-  //reader->SwitchOffEMCAL();
-  //reader->SwitchOffCTS();
-  //reader->SwitchOffPHOS();
-  //reader->SwitchOffEMCALCells();
-  //reader->SwitchOffPHOSCells();
 
   //Min particle pT
-  //Selections done while filling the detector arrays
-  reader->SetEMCALPtMin(0.5); 
-  reader->SetPHOSPtMin(0.5);
-  reader->SetCTSPtMin(0.2);
+  reader->SetEMCALPtMin(0.); 
+  reader->SetPHOSPtMin(0.);
+  reader->SetCTSPtMin(.2);
  
   reader->SetFidutialCut(fidCut);
-
   reader->Print("");
   
-  
   //---------------------------------------------------------------------
   // Analysis algorithm
   //---------------------------------------------------------------------
   
-  //Some settings for the analysis
-
   //Detector Fidutial Cuts for analysis part
-  //You can define different cuts for your analysis
   AliFidutialCut * fidCut2 = new AliFidutialCut();
   fidCut2->DoCTSFidutialCut(kFALSE) ;
   fidCut2->DoEMCALFidutialCut(kTRUE) ;
   fidCut2->DoPHOSFidutialCut(kTRUE) ;
   
-  fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,160.);
-  fidCut2->SetSimplePHOSFidutialCut(0.13,220.,280.);
+  //fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+  fidCut2->SetSimpleEMCALFidutialCut(0.5,100.,150.);
+  fidCut2->SetSimplePHOSFidutialCut(0.1,240.,280.);
 
   AliCaloPID * pid = new AliCaloPID();
   // use selection with simple weights
   pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
   pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
-  // use more complicated selection, particle weight depending on cluster energy,
-  // only for PHOS
-  //   pid->UsePHOSPIDWeightFormula(kTRUE);
-  //   TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
-  //   TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
-  //   pid->SetPHOSPhotonWeightFormula(photonF);
-  //   pid->SetPHOSPi0WeightFormula(pi0F);
-  
+  // use more complicated selection, particle weight depending on cluster energy
+//   pid->UsePHOSPIDWeightFormula(kTRUE);
+//   TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
+//   TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
+//   pid->SetPHOSPhotonWeightFormula(photonF);
+//   pid->SetPHOSPi0WeightFormula(pi0F);
+
+
   AliAnaExample *ana = new AliAnaExample();
   ana->SetDebug(-1);
-  //Do PID selection with settings defined up
   ana->SetCaloPID(pid);
-  ana->SwitchOnCaloPID();
-  //Do Acceptance selection with settings defined up
   ana->SetFidutialCut(fidCut2);
+  ana->SetDetector("PHOS");
+  //ana->SwitchOnDataMC();
+  ana->SetMinPt(0.);
+  ana->SetOutputAODName("Example");
+  ana->SetOutputAODClassName("AliAODPWG4Particle"); //Or AliAODPWG4ParticleCorrelation
+  //Set Histrograms bins and ranges
+//     ana->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;  
 
-  ana->SetPdg(AliCaloPID::kPhoton); //plot identified photons
-  ana->SetDetector("PHOS"); //Detector for the analysis
-  ana->SetMinPt(2);// Minimum pt of clusters/tracks
-  
-  ana->SwitchOnDataMC() ; //Access to the stack and fill 
-  // some histograms with MC information
-
-  ana->Print("");
-
-  //AliAnaExample *ana2 = new AliAnaExample();
+//AliAnaExample *ana2 = new AliAnaExample();
   
   //---------------------------------------------------------------------
   // Set  analysis algorithm and reader
@@ -163,13 +117,11 @@ AliAnaPartCorrMaker*  ConfigAnalysis()
   maker->SetReader(reader);//pointer to reader
   maker->AddAnalysis(ana,0);
   //maker->AddAnalysis(ana2,1);
-  maker->SetAODBranchName("Test");
-  maker->SetAnaDebug(1)  ;
-  maker->SwitchOnAODsMaker()  ;
-  //maker->SwitchOffAODsMaker() ; 
+  maker->SetAnaDebug(-1)  ;
   maker->SwitchOnHistogramsMaker()  ;
   //maker->SwitchOffHistogramsMaker() ;  
-
+  maker->SwitchOnAODsMaker()  ;
+  //maker->SwitchOffAODsMaker() ; 
   
   maker->Print("");
   //
index e46a7b6..604bd44 100644 (file)
@@ -1,4 +1,5 @@
-/* $Id:$ */
+/* $Id: $ */
+/* $Log$ */
 
 //------------------------------------
 // Configuration macro example:
 // Do prompt photon analysis with ESDs
 // Gamma in PHOS, 
 // for EMCAL, PHOS by EMCAL where necessary
+// First find photons with AliAnaPhoton, then 
+// isolate them with AliAnaParticleIsolation
 //
 // Author : Gustavo Conesa Balbastre (INFN-LNF)
 //------------------------------------
 
 AliAnaPartCorrMaker*  ConfigAnalysis()
 {
-  //
-  // Configuration goes here
-  // 
-  printf("======================== \n");
-  printf("ConfigAnalysis() \n");
-  printf("======================== \n");
-  
-  
-  //Detector Fidutial Cuts
-  AliFidutialCut * fidCut = new AliFidutialCut();
-  fidCut->DoCTSFidutialCut(kTRUE) ;
-  //fidCut->DoEMCALFidutialCut(kFALSE) ;
-  fidCut->DoPHOSFidutialCut(kTRUE) ;
-  
-  fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
-   
-  fidCut->Print("");
-  
-  //-----------------------------------------------------------  
-  // Reader
-  //-----------------------------------------------------------
-  AliCaloTrackReader *reader = new AliCaloTrackESDReader();
-  reader->SetDebug(-1);
-
-  //Switch on or off the detectors information that you want
-  reader->SwitchOffEMCAL();
-  reader->SwitchOnCTS();
-  reader->SwitchOnPHOS();
-  
-  //Min particle pT
-  //reader->SetEMCALPtMin(0.5); 
-  reader->SetPHOSPtMin(0.5);
-  reader->SetCTSPtMin(0.2);
-  
-  reader->SetFidutialCut(fidCut);
-  reader->Print("");
-  
-  
-  //---------------------------------------------------------------------
-  // Analysis algorithm
-  //---------------------------------------------------------------------
-  
-  //Detector Fidutial Cuts for analysis part
-  AliFidutialCut * fidCut2 = new AliFidutialCut();
-  fidCut2->DoCTSFidutialCut(kFALSE) ;
-  //fidCut2->DoEMCALFidutialCut(kTRUE) ;
-  fidCut2->DoPHOSFidutialCut(kFALSE) ;
-  
-  fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut2->Print("");
-
-  AliCaloPID * pid = new AliCaloPID();
-  // use selection with simple weights
-  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
-  pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
-  // use more complicated selection, particle weight depending on cluster energy
-//   pid->UsePHOSPIDWeightFormula(kTRUE);
-//   TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
-//   TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
-//   pid->SetPHOSPhotonWeightFormula(photonF);
-//   pid->SetPHOSPi0WeightFormula(pi0F);
-  pid->Print("");
-
-  AliIsolationCut * ic = new AliIsolationCut();
-  ic->SetConeSize(0.4);
-  ic->SetPtThreshold(1.);
-  ic->SetICMethod(AliIsolationCut::kPtThresIC);
-  ic->Print("");
-
-  AliAnaGammaDirect *ana = new AliAnaGammaDirect();
-  ana->SetDebug(-1);
-  ana->SetMinPt(5.);
-  ana->SetCaloPID(pid);
-  ana->SetFidutialCut(fidCut2);
-  ana->SetIsolationCut(ic) ;
-  ana->SetDetector("PHOS");
-  ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms
-
-  ana->SwitchOnCaloPID();
-  ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
-  ana->SwitchOnFidutialCut();
-  //Select clusters with no pair, if both clusters with pi0 mass
-  ana->SwitchOffInvariantMass();
-  //Do isolation cut
-  ana->SwitchOnIsolation();
-
-  //Do or not do isolation with previously produced AODs.
-  //No effect if use of SwitchOnSeveralIsolation()
-  ana->SwitchOffReIsolation();
-
-  //Multiple IC
-  ana->SwitchOffSeveralIsolation() ;
-//   ana->SwitchOnSeveralIsolation() ;
-//   ana->SetNCones(2) ;     
-//   ana->SetNPtThresFrac(2) ;     
-//   ana->SetConeSizes(0, 0.3) ; ana->SetConeSizes(1, 0.4) ;    
-//   ana->SetPtThresholds(0, 0.5) ;     ana->SetPtThresholds(1, 1.) ;   
-//   ana->SetPtFractions(0, 1.) ;   ana->SetPtFractions(1, 1.5) ;  
-
-  ana->Print("");
-
-  //---------------------------------------------------------------------
-  // Set  analysis algorithm and reader
-  //---------------------------------------------------------------------
-  maker = new AliAnaPartCorrMaker();
-  maker->SetReader(reader);//pointer to reader
-  maker->AddAnalysis(ana,0);
-  maker->SetAODBranchName("Photon");
-  maker->SetAnaDebug(1)  ;
-  maker->SwitchOnHistogramsMaker()  ;
-  //maker->SwitchOffHistogramsMaker() ;  
-  maker->SwitchOnAODsMaker()  ;
-  //maker->SwitchOffAODsMaker() ; 
-  
-  maker->Print("");
-  //
-  printf("======================== \n");
-  printf("END ConfigAnalysis() \n");
-  printf("======================== \n");
-  return maker ;
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kFALSE) ;
+       fidCut->DoEMCALFidutialCut(kFALSE) ;
+       fidCut->DoPHOSFidutialCut(kFALSE) ;
+       
+       //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       //fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       
+       fidCut->Print("");
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOffEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOnPHOS();
+       
+       //Min particle pT
+       reader->SetEMCALPtMin(0.2); 
+       reader->SetPHOSPtMin(0.2);
+       reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       //>>>> First Analysis <<<<
+       //Detector Fidutial Cuts for analysis part
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoCTSFidutialCut(kFALSE) ;
+       fidCut2->DoEMCALFidutialCut(kFALSE) ;
+       fidCut2->DoPHOSFidutialCut(kFALSE) ;
+       
+       //fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut2->SetSimplePHOSFidutialCut(0.12,220.,320.);
+       
+//     //Select particles in N regions of the detectors
+//     Float_t etamax[]={0.67,0.51,0.16,-0.21,-0.61};
+//     TArrayF etamaxarr(5,etamax);
+//     fidCut2->AddEMCALFidCutMaxEtaArray(etamaxarr);
+//     Float_t etamin[]={0.61,0.21,-0.16,-0.51,-0.67};
+//     TArrayF etaminarr(5,etamin);
+//     fidCut2->AddEMCALFidCutMinEtaArray(etaminarr);
+//     Float_t phimax[]={99., 119., 139., 159., 179., 189.};
+//     TArrayF phimaxarr(6,phimax);
+//     fidCut2->AddEMCALFidCutMaxPhiArray(phimaxarr);
+//     Float_t phimin[]={81., 101.  , 121. , 141. , 161. , 181. };
+//     TArrayF phiminarr(6,phimin);
+//     fidCut2->AddEMCALFidCutMinPhiArray(phiminarr);
+//     fidCut2->Print("");
+//     
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       // use more complicated selection, particle weight depending on cluster energy
+       // pid->UsePHOSPIDWeightFormula(kTRUE);
+       // TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
+       // TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
+       // pid->SetPHOSPhotonWeightFormula(photonF);
+       // pid->SetPHOSPi0WeightFormula(pi0F);
+       pid->Print("");
+       
+       
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(0.2);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("PHOS");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOnCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOnFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       //Set Histrograms bins and ranges
+       //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+       //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+       //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anaphoton->Print("");
+       
+       // >>>> Second Analysis <<<< Isolate the photons
+       AliIsolationCut * ic = new AliIsolationCut();
+       ic->SetConeSize(0.5);
+       ic->SetPtThreshold(1.);
+       ic->SetICMethod(AliIsolationCut::kPtThresIC);
+       ic->Print("");
+       
+       AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
+       anaisol->SetDebug(-1);
+       anaisol->SetMinPt(5);
+       anaisol->SetInputAODName("Photons");
+       anaisol->SetCalorimeter("PHOS");
+       anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       //Select clusters with no pair, if both clusters with pi0 mass
+       anaisol->SwitchOffInvariantMass();
+       //anaisol->SetNeutralMesonSelection(nms);
+       //Do isolation cut
+       anaisol->SetIsolationCut(ic);   
+       //Do or not do isolation with previously produced AODs.
+       //No effect if use of SwitchOnSeveralIsolation()
+       anaisol->SwitchOffReIsolation();
+       //Multiple IC
+       anaisol->SwitchOffSeveralIsolation() ;
+       
+       anaisol->Print("");
+       
+               
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anaisol,1);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       //maker->SwitchOffHistogramsMaker() ;  
+       maker->SwitchOnAODsMaker()  ;
+       //maker->SwitchOffAODsMaker() ; 
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
 }
index 6784370..2deaa28 100644 (file)
 // Configuration macro example:
 //
 // Do prompt photon - hadron correlation analysis with ESDs
+// First find photons with AliAnaPhoton, then
+// isolate them with AliAnaParticleIsolation and finally correlate 
+// them with AliAnaParticleHadronCorrelation
 //
 // Author : Gustavo Conesa Balbastre (INFN-LNF)
 //------------------------------------
 
 AliAnaPartCorrMaker*  ConfigAnalysis()
 {
-  //
-  // Configuration goes here
-  // 
-  printf("======================== \n");
-  printf("ConfigAnalysis() \n");
-  printf("======================== \n");
-  
-  
-  //Detector Fidutial Cuts
-  AliFidutialCut * fidCut = new AliFidutialCut();
-  fidCut->DoCTSFidutialCut(kTRUE) ;
-  fidCut->DoEMCALFidutialCut(kTRUE) ;
-  fidCut->DoPHOSFidutialCut(kTRUE) ;
-  
-  fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut->Print("");
-  
-  //-----------------------------------------------------------  
-  // Reader
-  //-----------------------------------------------------------
-  AliCaloTrackReader *reader = new AliCaloTrackESDReader();
-  reader->SetDebug(-1);
-
-  //Switch on or off the detectors information that you want
-  reader->SwitchOnEMCAL();
-  reader->SwitchOnCTS();
-  reader->SwitchOnPHOS();
-  reader->SwitchOffEMCALCells();
-  reader->SwitchOffPHOSCells();
-
-  //Min particle pT
-  reader->SetEMCALPtMin(0.5); 
-  reader->SetPHOSPtMin(0.5);
-  reader->SetCTSPtMin(0.2);
-  
-  reader->SetFidutialCut(fidCut);
-  reader->Print("");
-  
-  
-  //---------------------------------------------------------------------
-  // Analysis algorithm
-  //---------------------------------------------------------------------
-  
-  //Detector Fidutial Cuts for analysis part
-  AliFidutialCut * fidCut2 = new AliFidutialCut();
-  fidCut2->DoCTSFidutialCut(kFALSE) ;
-  fidCut2->DoEMCALFidutialCut(kTRUE) ;
-  fidCut2->DoPHOSFidutialCut(kFALSE) ;
-  
-  fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut2->Print("");
-
-  AliCaloPID * pid = new AliCaloPID();
-  // use selection with simple weights
-  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
-  pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
-  
-  pid->Print("");
-
-  AliIsolationCut * ic = new AliIsolationCut();
-  ic->SetConeSize(0.4);
-  ic->SetPtThreshold(1.);
-  ic->SetICMethod(AliIsolationCut::kPtThresIC);
-  ic->Print("");
-
-  //Photon Analysis
-  AliAnaGammaDirect *ana = new AliAnaGammaDirect();
-  ana->SetDebug(-1);
-  ana->SetMinPt(5.);
-  ana->SetCaloPID(pid);
-  ana->SetFidutialCut(fidCut2);
-  ana->SetIsolationCut(ic) ;
-  ana->SetDetector("PHOS");
-  ana->SwitchOnIsolation();
-  ana->SwitchOnCaloPID();
-  ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
-  ana->SwitchOffFidutialCut();
-  ana->SwitchOffInvariantMass();
-  ana->SwitchOffDataMC() ;
-
-  ana->Print("");
-
-  //Photon- hadron correlation
-  AliAnaParticleHadronCorrelation *ana2 = new AliAnaParticleHadronCorrelation();
-  ana2->SetDebug(-1);
-  ana2->SetCaloPID(pid);
-  ana2->SwitchOnCaloPID();
-  ana2->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
-  ana2->SwitchOffFidutialCut();
-  ana2->SetPtCutRange(1,100);
-  ana2->SetDeltaPhiCutRange(1.5,4.5);
-  
-  ana2->Print("");
-  //---------------------------------------------------------------------
-  // Set  analysis algorithm and reader
-  //---------------------------------------------------------------------
-  maker = new AliAnaPartCorrMaker();
-  maker->SetReader(reader);//pointer to reader
-  maker->AddAnalysis(ana,0);
-  maker->AddAnalysis(ana2,1);
-  maker->SetAODBranchName("PhotonHadronCorrelation");
-  maker->SetAnaDebug(-1)  ;
-  maker->SwitchOnHistogramsMaker()  ;
-  //maker->SwitchOffHistogramsMaker() ;  
-  maker->SwitchOnAODsMaker()  ;
-  //maker->SwitchOffAODsMaker() ; 
-  
-  maker->Print("");
-  //
-  printf("======================== \n");
-  printf("END ConfigAnalysis() \n");
-  printf("======================== \n");
-  return maker ;
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kTRUE) ;
+       fidCut->DoEMCALFidutialCut(kTRUE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       
+       fidCut->Print("");
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOnPHOS();
+       reader->SwitchOffEMCALCells();
+       reader->SwitchOffPHOSCells();
+       
+       
+       //Min particle pT
+       reader->SetEMCALPtMin(0.5); 
+       reader->SetPHOSPtMin(0.5);
+       reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       //<<<< first analysis >>> select the photons
+       //Detector Fidutial Cuts for analysis part
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoCTSFidutialCut(kFALSE) ;
+       fidCut2->DoEMCALFidutialCut(kTRUE) ;
+       fidCut2->DoPHOSFidutialCut(kFALSE) ;
+       
+       fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       fidCut2->Print("");
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       
+       pid->Print("");
+       
+       
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(0.2);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("PHOS");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOnCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOnFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       //Set Histrograms bins and ranges
+       //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+       //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+       //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anaphoton->Print("");
+       
+       // >>>> Second Analysis <<<< Isolate the photons
+       AliIsolationCut * ic = new AliIsolationCut();
+       ic->SetConeSize(0.5);
+       ic->SetPtThreshold(1.);
+       ic->SetICMethod(AliIsolationCut::kPtThresIC);
+       ic->Print("");
+       
+       AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
+       anaisol->SetDebug(-1);
+       anaisol->SetMinPt(5);
+       anaisol->SetInputAODName("Photons");
+       anaisol->SetCalorimeter("PHOS");
+       anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       //Select clusters with no pair, if both clusters with pi0 mass
+       anaisol->SwitchOffInvariantMass();
+       //anaisol->SetNeutralMesonSelection(nms);
+       //Do isolation cut
+       anaisol->SetIsolationCut(ic);   
+       //Do or not do isolation with previously produced AODs.
+       //No effect if use of SwitchOnSeveralIsolation()
+       anaisol->SwitchOffReIsolation();
+       //Multiple IC
+       anaisol->SwitchOffSeveralIsolation() ;
+               
+       anaisol->Print("");
+       
+       //<<<Third analysis>>> Isolated Photon- hadron correlation
+       AliAnaParticleHadronCorrelation *anacorr = new AliAnaParticleHadronCorrelation();
+       anacorr->SetInputAODName("Photons");
+       anacorr->SetDebug(-1);
+       anacorr->SetCaloPID(pid);
+       anacorr->SwitchOnCaloPID();
+       anacorr->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
+       anacorr->SwitchOffFidutialCut();
+       anacorr->SetPtCutRange(1,100);
+       anacorr->SetDeltaPhiCutRange(1.5,4.5);
+       //Set Histrograms bins and ranges
+       //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+       //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+       //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;   
+       anacorr->Print("");
+       
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anaisol,1);
+       maker->AddAnalysis(anacorr,2);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       maker->SwitchOnAODsMaker()  ;
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
 }
 
index 9cb3006..84c076c 100644 (file)
 // Configuration macro example:
 //
 // Do prompt photon - jet (JETAN) correlation analysis with ESDs
+// First find photons with AliAnaPhoton, then
+// isolate them with AliAnaParticleIsolation and finally correlate           
+// them with AliAnaParticleJetFinderCorrelation
 //
 // Author : Gustavo Conesa Balbastre (INFN-LNF)
 //------------------------------------
 
 AliAnaPartCorrMaker*  ConfigAnalysis()
 {
-  //
-  // Configuration goes here
-  // 
-  printf("======================== \n");
-  printf("ConfigAnalysis() \n");
-  printf("======================== \n");
-  
-  
-  //Detector Fidutial Cuts
-  AliFidutialCut * fidCut = new AliFidutialCut();
-  fidCut->DoCTSFidutialCut(kTRUE) ;
-  fidCut->DoEMCALFidutialCut(kTRUE) ;
-  fidCut->DoPHOSFidutialCut(kTRUE) ;
-  
-  fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut->Print("");
-  
-  //-----------------------------------------------------------  
-  // Reader
-  //-----------------------------------------------------------
-  AliCaloTrackReader *reader = new AliCaloTrackESDReader();
-  reader->SetDebug(-1);
-
-  //Switch on or off the detectors information that you want
-  reader->SwitchOnEMCAL();
-  reader->SwitchOnCTS();
-  reader->SwitchOnPHOS();
-  reader->SwitchOffEMCALCells();
-  reader->SwitchOffPHOSCells();
-
-  //Min particle pT
-  reader->SetEMCALPtMin(0.5); 
-  reader->SetPHOSPtMin(0.5);
-  reader->SetCTSPtMin(0.2);
-  
-  reader->SetFidutialCut(fidCut);
-  reader->Print("");
-  
-  
-  //---------------------------------------------------------------------
-  // Analysis algorithm
-  //---------------------------------------------------------------------
-  
-  //Detector Fidutial Cuts for analysis part
-  AliFidutialCut * fidCut2 = new AliFidutialCut();
-  fidCut2->DoCTSFidutialCut(kFALSE) ;
-  fidCut2->DoEMCALFidutialCut(kTRUE) ;
-  fidCut2->DoPHOSFidutialCut(kFALSE) ;
-  
-  fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut2->Print("");
-
-  AliCaloPID * pid = new AliCaloPID();
-  // use selection with simple weights
-  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
-  pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
-  
-  pid->Print("");
-
-  AliIsolationCut * ic = new AliIsolationCut();
-  ic->SetConeSize(0.4);
-  ic->SetPtThreshold(1.);
-  ic->SetICMethod(AliIsolationCut::kPtThresIC);
-  ic->Print("");
-
-  //Photon Analysis
-  AliAnaGammaDirect *ana = new AliAnaGammaDirect();
-  ana->SetDebug(-1);
-  ana->SetMinPt(5.);
-  ana->SetCaloPID(pid);
-  ana->SetFidutialCut(fidCut2);
-  ana->SetIsolationCut(ic) ;
-  ana->SetDetector("EMCAL");
-  ana->SwitchOnIsolation();
-  ana->SwitchOnCaloPID();
-  ana->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
-  ana->SwitchOffFidutialCut();
-  ana->SwitchOffInvariantMass();
-  ana->SwitchOffDataMC() ;
-
-  ana->Print("");
-
-  //Photon - JETAN correlation
-  AliAnaParticleJetFinderCorrelation *ana2 = new AliAnaParticleJetFinderCorrelation();
-  ana2->SetDebug(-1);
-  ana2->SetConeSize(1);  
-  ana2->SetPtThresholdInCone(0.5);
-  ana2->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts 
-  ana2->SetRatioCutRange(0.01,3); //Mostly Open Cuts
-  ana2->UseJetRefTracks(kFALSE); //Not working now
-  ana2->Print("");
-  
-  //---------------------------------------------------------------------
-  // Set  analysis algorithm and reader
-  //---------------------------------------------------------------------
-  maker = new AliAnaPartCorrMaker();
-  maker->SetReader(reader);//pointer to reader
-  maker->AddAnalysis(ana,0);
-  maker->AddAnalysis(ana2,1);
-  maker->SetAODBranchName("PhotonJetCorrelation");
-  maker->SetAnaDebug(-1)  ;
-  maker->SwitchOnHistogramsMaker()  ;
-  //maker->SwitchOffHistogramsMaker() ;  
-  maker->SwitchOnAODsMaker()  ;
-  //maker->SwitchOffAODsMaker() ; 
-  
-  maker->Print("");
-  //
-  printf("======================== \n");
-  printf("END ConfigAnalysis() \n");
-  printf("======================== \n");
-  return maker ;
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kTRUE) ;
+       fidCut->DoEMCALFidutialCut(kTRUE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       
+       fidCut->Print("");
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOnPHOS();
+       
+       //Min particle pT
+       reader->SetEMCALPtMin(0.5); 
+       reader->SetPHOSPtMin(0.5);
+       reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       //<<<< first analysis >>> select the photons
+       //Detector Fidutial Cuts for analysis part
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoCTSFidutialCut(kFALSE) ;
+       fidCut2->DoEMCALFidutialCut(kTRUE) ;
+       fidCut2->DoPHOSFidutialCut(kFALSE) ;
+       
+       fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       fidCut2->Print("");
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       
+       pid->Print("");
+       
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(0.2);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("PHOS");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOnCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOnFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       //Set Histrograms bins and ranges
+       //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+       //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+       //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anaphoton->Print("");
+       
+       // >>>> Second Analysis <<<< Isolate the photons
+       AliIsolationCut * ic = new AliIsolationCut();
+       ic->SetConeSize(0.5);
+       ic->SetPtThreshold(1.);
+       ic->SetICMethod(AliIsolationCut::kPtThresIC);
+       ic->Print("");
+       
+       AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
+       anaisol->SetDebug(-1);
+       anaisol->SetMinPt(5);
+       anaisol->SetInputAODName("Photons");
+       anaisol->SetCalorimeter("PHOS");
+       anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       //Select clusters with no pair, if both clusters with pi0 mass
+       anaisol->SwitchOffInvariantMass();
+       //anaisol->SetNeutralMesonSelection(nms);
+       //Do isolation cut
+       anaisol->SetIsolationCut(ic);   
+       //Do or not do isolation with previously produced AODs.
+       //No effect if use of SwitchOnSeveralIsolation()
+       anaisol->SwitchOffReIsolation();
+       //Multiple IC
+       anaisol->SwitchOffSeveralIsolation() ;
+       
+       anaisol->Print("");
+       
+       //<<<Third analysis>>> Isolated Photon- Jet An correlation 
+       AliAnaParticleJetFinderCorrelation *anacorr = new AliAnaParticleJetFinderCorrelation();
+       anacorr->SetInputAODName("Photons");
+       anacorr->SetDebug(-1);
+       anacorr->SetConeSize(1);  
+       anacorr->SetPtThresholdInCone(0.5);
+       anacorr->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts 
+       anacorr->SetRatioCutRange(0.01,3); //Mostly Open Cuts
+       anacorr->UseJetRefTracks(kFALSE); //Not working now
+       anacorr->Print("");
+       
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anaisol,1);
+       maker->AddAnalysis(anacorr,2);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       maker->SwitchOnAODsMaker()  ;
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
 }
 
index 1a27896..bbb9f1d 100644 (file)
 //------------------------------------
 // Configuration macro example:
 //
-// Do prompt photon - jet leading in cone correlation  analysis 
+// Do prompt photon - jet correlation analysis with ESDs
+// First find photons with AliAnaPhoton, then
+// isolate them with AliAnaParticleIsolation and finally correlate           
+// them with AliAnaParticleJetLeadingConeCorrelation
 //
 // Author : Gustavo Conesa Balbastre (INFN-LNF)
 //------------------------------------
 
 AliAnaPartCorrMaker*  ConfigAnalysis()
 {
-  //
-  // Configuration goes here
-  // 
-  printf("======================== \n");
-  printf("ConfigAnalysis() \n");
-  printf("======================== \n");
-  
-  
-  //Detector Fidutial Cuts
-  AliFidutialCut * fidCut = new AliFidutialCut();
-  fidCut->DoCTSFidutialCut(kTRUE) ;
-  fidCut->DoEMCALFidutialCut(kTRUE) ;
-  fidCut->DoPHOSFidutialCut(kTRUE) ;
-  
-  fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut->Print("");
-  
-  //-----------------------------------------------------------  
-  // Reader
-  //-----------------------------------------------------------
-  AliCaloTrackReader *reader = new AliCaloTrackESDReader();
-  reader->SetDebug(-1);
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kTRUE) ;
+       fidCut->DoEMCALFidutialCut(kTRUE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       
+       fidCut->Print("");
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOnPHOS();
+       
+       //Min particle pT
+       reader->SetEMCALPtMin(0.5); 
+       reader->SetPHOSPtMin(0.5);
+       reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       //<<<< first analysis >>> select the photons
+       //Detector Fidutial Cuts for analysis part
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoCTSFidutialCut(kFALSE) ;
+       fidCut2->DoEMCALFidutialCut(kTRUE) ;
+       fidCut2->DoPHOSFidutialCut(kFALSE) ;
+       
+       fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       fidCut2->Print("");
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       
+       pid->Print("");
+       
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(0.2);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("PHOS");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOnCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOnFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       //Set Histrograms bins and ranges
+       //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+       //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+       //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anaphoton->Print("");
+       
+       // >>>> Second Analysis <<<< Isolate the photons
+       AliIsolationCut * ic = new AliIsolationCut();
+       ic->SetConeSize(0.5);
+       ic->SetPtThreshold(1.);
+       ic->SetICMethod(AliIsolationCut::kPtThresIC);
+       ic->Print("");
+       
+       AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
+       anaisol->SetDebug(-1);
+       anaisol->SetMinPt(5);
+       anaisol->SetInputAODName("Photons");
+       anaisol->SetCalorimeter("PHOS");
+       anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       //Select clusters with no pair, if both clusters with pi0 mass
+       anaisol->SwitchOffInvariantMass();
+       //anaisol->SetNeutralMesonSelection(nms);
+       //Do isolation cut
+       anaisol->SetIsolationCut(ic);   
+       //Do or not do isolation with previously produced AODs.
+       //No effect if use of SwitchOnSeveralIsolation()
+       anaisol->SwitchOffReIsolation();
+       //Multiple IC
+       anaisol->SwitchOffSeveralIsolation() ;
+       
+       anaisol->Print("");
+       
+       //<<<Third analysis>>> Isolated Photon- Jet Leading in opposite Cone correlation
+       AliAnaParticleJetLeadingConeCorrelation *anacorr = new AliAnaParticleJetLeadingConeCorrelation();
+       anacorr->SetDebug(-1);
+       anacorr->SetInputAODName("Photons");
+       anacorr->SwitchOnCaloPID();
+       anacorr->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
+       anacorr->SwitchOffFidutialCut();
+       anacorr->SwitchOffJetsOnlyInCTS();
+       anacorr->SwitchOffJetsRecalculation();
+       //Analysis cuts for leading particle selection
+       anacorr->SetDeltaPhiCutRange(1.5,4.5); //Back-Leading particle angular cut
+       anacorr->SetLeadingRatioCutRange(0.,3);//Cut for the momentum of leading
+       //Analysis cuts for jet selection
+       anacorr->SetppCollisions(); //Jet particles Pt threshold for different collisions
+       anacorr->SetCone(0.7); //Jet cone size
+       anacorr->SetJetPtThreshold(0.2); //Jet particle threshold 
+       anacorr->SetJetRatioCutRange(0.7, 1.3);//Only if SwitchOffJetsOnlyInCTS(); and SetJetSelectionMode(2)
+       anacorr->SetJetCTSRatioCutRange(0.3,1.3); //Only if SwitchOnJetsOnlyInCTS(); and SetJetSelectionMode(2)
 
-  //Switch on or off the detectors information that you want
-  reader->SwitchOnEMCAL();
-  reader->SwitchOnCTS();
-  reader->SwitchOnPHOS();
-  reader->SwitchOffEMCALCells();
-  reader->SwitchOffPHOSCells();
-
-  //Min particle pT
-  reader->SetEMCALPtMin(0.5); 
-  reader->SetPHOSPtMin(0.5);
-  reader->SetCTSPtMin(0.2);
-  
-  reader->SetFidutialCut(fidCut);
-  reader->Print("");
-  
-  
-  //---------------------------------------------------------------------
-  // Analysis algorithm
-  //---------------------------------------------------------------------
-  
-  //Detector Fidutial Cuts for analysis part
-  AliFidutialCut * fidCut2 = new AliFidutialCut();
-  fidCut2->DoCTSFidutialCut(kFALSE) ;
-  fidCut2->DoEMCALFidutialCut(kTRUE) ;
-  fidCut2->DoPHOSFidutialCut(kFALSE) ;
-  
-  fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut2->Print("");
-
-  AliCaloPID * pid = new AliCaloPID();
-  // use selection with simple weights
-  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
-  pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
-  
-  pid->Print("");
-
-  AliIsolationCut * ic = new AliIsolationCut();
-  ic->SetConeSize(0.4);
-  ic->SetPtThreshold(1.);
-  ic->SetICMethod(AliIsolationCut::kPtThresIC);
-  ic->Print("");
-
-  //Photon Analysis
-  AliAnaGammaDirect *ana = new AliAnaGammaDirect();
-  ana->SetDebug(-1);
-  ana->SetMinPt(5.);
-  ana->SetCaloPID(pid);
-  ana->SetFidutialCut(fidCut2);
-  ana->SetIsolationCut(ic) ;
-  ana->SetDetector("PHOS");
-  ana->SwitchOnIsolation();
-  ana->SwitchOnCaloPID();
-  ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
-  ana->SwitchOffFidutialCut();
-  ana->SwitchOffInvariantMass();
-  ana->SwitchOffDataMC() ;
-
-  ana->Print("");
-
-  //Photon hadron correlation
-  AliAnaParticleJetLeadingConeCorrelation *ana2 = new AliAnaParticleJetLeadingConeCorrelation();
-  ana2->SetDebug(-1);
-  ana2->SwitchOnCaloPID();
-  ana2->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
-  ana2->SwitchOffFidutialCut();
-  ana2->SwitchOffJetsOnlyInCTS();
-  ana2->SwitchOffJetsRecalculation();
-  //Analysis cuts for leading particle selection
-  ana2->SetDeltaPhiCutRange(1.5,4.5); //Back-Leading particle angular cut
-  ana2->SetLeadingRatioCutRange(0.,3);//Cut for the momentum of leading
-  //Analysis cuts for jet selection
-  ana2->SetppCollisions(); //Jet particles Pt threshold for different collisions
-  ana2->SetCone(0.7); //Jet cone size
-  ana2->SetJetPtThreshold(0.2); //Jet particle threshold 
-  ana2->SetJetRatioCutRange(0.7, 1.3);//Only if SwitchOffJetsOnlyInCTS(); and SetJetSelectionMode(2)
-  ana2->SetJetCTSRatioCutRange(0.3,1.3); //Only if SwitchOnJetsOnlyInCTS(); and SetJetSelectionMode(2)
-
-  ana2->Print("");
-  //---------------------------------------------------------------------
-  // Set  analysis algorithm and reader
-  //---------------------------------------------------------------------
-  maker = new AliAnaPartCorrMaker();
-  maker->SetReader(reader);//pointer to reader
-  maker->AddAnalysis(ana,0);
-  maker->AddAnalysis(ana2,1);
-  maker->SetAODBranchName("PhotonJetLCCorrelation");
-  maker->SetAnaDebug(-1)  ;
-  maker->SwitchOnHistogramsMaker()  ;
-  //maker->SwitchOffHistogramsMaker() ;  
-  maker->SwitchOnAODsMaker()  ;
-  //maker->SwitchOffAODsMaker() ; 
-  
-  maker->Print("");
-  //
-  printf("======================== \n");
-  printf("END ConfigAnalysis() \n");
-  printf("======================== \n");
-  return maker ;
+       anacorr->Print("");     
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anaisol,1);
+       maker->AddAnalysis(anacorr,2);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       maker->SwitchOnAODsMaker()  ;
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
 }
 
index 96e0df1..6c8e296 100644 (file)
 /* $Id: $ */
-/* $Log$ */
 
 //------------------------------------
 // Configuration macro example:
 //
-// Do prompt photon and parton correlation analysis
+// Do prompt photon - parton correlation analysis with ESDs
+// First find photons with AliAnaPhoton, then
+// isolate them with AliAnaParticleIsolation and finally correlate           
+// them with AliAnaParticlePartonCorrelation
 //
 // Author : Gustavo Conesa Balbastre (INFN-LNF)
 //------------------------------------
 
 AliAnaPartCorrMaker*  ConfigAnalysis()
 {
-  //
-  // Configuration goes here
-  // 
-  printf("======================== \n");
-  printf("ConfigAnalysis() \n");
-  printf("======================== \n");
-  
-  
-  //Detector Fidutial Cuts
-  AliFidutialCut * fidCut = new AliFidutialCut();
-  fidCut->DoCTSFidutialCut(kTRUE) ;
-  fidCut->DoEMCALFidutialCut(kTRUE) ;
-  fidCut->DoPHOSFidutialCut(kTRUE) ;
-  
-  fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  
-  fidCut->Print("");
-  
-  //-----------------------------------------------------------  
-  // Reader
-  //-----------------------------------------------------------
-  AliCaloTrackReader *reader = new AliCaloTrackESDReader();
-  reader->SetDebug(-1);
-
-  //Switch on or off the detectors information that you want
-  reader->SwitchOnEMCAL();
-  reader->SwitchOnCTS();
-  reader->SwitchOnPHOS();
-  reader->SwitchOffEMCALCells();
-  reader->SwitchOffPHOSCells();
-
-  //Min particle pT
-  reader->SetEMCALPtMin(0.5); 
-  reader->SetPHOSPtMin(0.5);
-  reader->SetCTSPtMin(0.2);
-  
-  reader->SetFidutialCut(fidCut);
-  reader->Print("");
-  
-  
-  //---------------------------------------------------------------------
-  // Analysis algorithm
-  //---------------------------------------------------------------------
-  
-  //Detector Fidutial Cuts for analysis part
-  AliFidutialCut * fidCut2 = new AliFidutialCut();
-  fidCut2->DoCTSFidutialCut(kFALSE) ;
-  fidCut2->DoEMCALFidutialCut(kTRUE) ;
-  fidCut2->DoPHOSFidutialCut(kFALSE) ;
-  
-  fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
-  fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
-  fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
-  fidCut2->Print("");
-
-  AliCaloPID * pid = new AliCaloPID();
-  // use selection with simple weights
-  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
-  pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
-  pid->Print("");
-
-  AliIsolationCut * ic = new AliIsolationCut();
-  ic->SetConeSize(0.4);
-  ic->SetPtThreshold(1.);
-  ic->SetICMethod(AliIsolationCut::kPtThresIC);
-  ic->Print("");
-
-  //Photon Analysis
-  AliAnaGammaDirect *ana = new AliAnaGammaDirect();
-  ana->SetDebug(-1);
-  ana->SetMinPt(5.);
-  ana->SetCaloPID(pid);
-  ana->SetFidutialCut(fidCut2);
-  ana->SetIsolationCut(ic) ;
-  ana->SetDetector("PHOS");
-  ana->SwitchOnIsolation();
-  //ana->SwitchOffIsolation();
-  ana->SwitchOffReIsolation(); //Do not do isolation with previously produced AODs.
-  ana->SwitchOffCaloPID();
-  ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
-  ana->SwitchOffFidutialCut();
-  ana->SwitchOffDataMC() ;
-
-  ana->Print("");
-
-  //Photon parton correlation
-  AliAnaParticlePartonCorrelation *ana2 = new AliAnaParticlePartonCorrelation();
-  ana2->SetDebug(2);
-  //ana2->Print("");
-
-  //---------------------------------------------------------------------
-  // Set  analysis algorithm and reader
-  //---------------------------------------------------------------------
-  maker = new AliAnaPartCorrMaker();
-  maker->SetReader(reader);//pointer to reader
-  maker->AddAnalysis(ana,0);
-  maker->AddAnalysis(ana2,1);
-  maker->SetAODBranchName("PhotonHadronCorrelation");
-  maker->SetAnaDebug(1)  ;
-  maker->SwitchOnHistogramsMaker()  ;
-  //maker->SwitchOffHistogramsMaker() ;  
-  maker->SwitchOnAODsMaker()  ;
-  //maker->SwitchOffAODsMaker() ; 
-  
-  maker->Print("");
-  //
-  printf("======================== \n");
-  printf("END ConfigAnalysis() \n");
-  printf("======================== \n");
-  return maker ;
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kTRUE) ;
+       fidCut->DoEMCALFidutialCut(kTRUE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       
+       fidCut->Print("");
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOnPHOS();
+       
+       //Min particle pT
+       reader->SetEMCALPtMin(0.5); 
+       reader->SetPHOSPtMin(0.5);
+       reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       //<<<< first analysis >>> select the photons
+       //Detector Fidutial Cuts for analysis part
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoCTSFidutialCut(kFALSE) ;
+       fidCut2->DoEMCALFidutialCut(kTRUE) ;
+       fidCut2->DoPHOSFidutialCut(kFALSE) ;
+       
+       fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
+       fidCut2->Print("");
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       
+       pid->Print("");
+       
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(0.2);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("PHOS");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOnCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOnFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       //Set Histrograms bins and ranges
+       //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+       //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+       //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anaphoton->Print("");
+       
+       // >>>> Second Analysis <<<< Isolate the photons
+       AliIsolationCut * ic = new AliIsolationCut();
+       ic->SetConeSize(0.5);
+       ic->SetPtThreshold(1.);
+       ic->SetICMethod(AliIsolationCut::kPtThresIC);
+       ic->Print("");
+       
+       AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
+       anaisol->SetDebug(-1);
+       anaisol->SetMinPt(5);
+       anaisol->SetInputAODName("Photons");
+       anaisol->SetCalorimeter("PHOS");
+       anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       //Select clusters with no pair, if both clusters with pi0 mass
+       anaisol->SwitchOffInvariantMass();
+       //anaisol->SetNeutralMesonSelection(nms);
+       //Do isolation cut
+       anaisol->SetIsolationCut(ic);   
+       //Do or not do isolation with previously produced AODs.
+       //No effect if use of SwitchOnSeveralIsolation()
+       anaisol->SwitchOffReIsolation();
+       //Multiple IC
+       anaisol->SwitchOffSeveralIsolation() ;
+       
+       anaisol->Print("");
+       
+       //<<<Third analysis>>> Isolated Photon- parton correlation 
+       AliAnaParticlePartonCorrelation *anacorr = new AliAnaParticlePartonCorrelation();
+       anacorr->SetInputAODName("Photons");
+       anacorr->SetDebug(-1);
+       
+       anacorr->Print("");
+       
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anaisol,1);
+       maker->AddAnalysis(anacorr,2);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       //maker->SwitchOffHistogramsMaker() ;  
+       maker->SwitchOnAODsMaker()  ;
+       //maker->SwitchOffAODsMaker() ; 
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
 }
+
diff --git a/PWG4/macros/ConfigAnalysisMCExample.C b/PWG4/macros/ConfigAnalysisMCExample.C
new file mode 100644 (file)
index 0000000..8db429e
--- /dev/null
@@ -0,0 +1,125 @@
+/* $Id:  $ */
+/* $Log$ */
+
+//------------------------------------
+// Configuration macro example:
+//
+// Do example analysis with MC
+//
+// Author : Gustavo Conesa Balbastre (INFN-LNF)
+//------------------------------------
+
+AliAnaPartCorrMaker*  ConfigAnalysis()
+{
+  //
+  // Configuration goes here
+  // 
+  printf("======================== \n");
+  printf("ConfigAnalysis() \n");
+  printf("======================== \n");
+  
+  
+  //Detector Fidutial Cuts
+  AliFidutialCut * fidCut = new AliFidutialCut();
+  fidCut->DoCTSFidutialCut(kFALSE) ;
+  fidCut->DoEMCALFidutialCut(kFALSE) ;
+  fidCut->DoPHOSFidutialCut(kTRUE) ;
+  
+  //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+  //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+  fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+  
+  //   //Fidutial cut EMCAL, 5 regions
+  //   Float_t etamax[]={0.67,0.51,0.16,-0.21,-0.61};
+  //   TArrayF etamaxarr(5,etamax);
+  //   fidCut->AddEMCALFidCutMaxEtaArray(etamaxarr);
+  //   Float_t etamin[]={0.61,0.21,-0.16,-0.51,-0.67};
+  //   TArrayF etaminarr(5,etamin);
+  //   fidCut->AddEMCALFidCutMinEtaArray(etaminarr);
+  //   Float_t phimax[]={99.*TMath::DegToRad(), 119.*TMath::DegToRad(), 139.*TMath::DegToRad(), 
+  //               159.*TMath::DegToRad(), 179.*TMath::DegToRad(), 189.*TMath::DegToRad()};
+  //   TArrayF phimaxarr(6,phimax);
+  //   fidCut->AddEMCALFidCutMaxPhiArray(phimaxarr);
+  //   Float_t phimin[]={81.*TMath::DegToRad(), 101.*TMath::DegToRad(), 121.*TMath::DegToRad(), 
+  //               141.*TMath::DegToRad(), 161.*TMath::DegToRad(), 181.*TMath::DegToRad()};
+  //   TArrayF phiminarr(6,phimin);
+  //   fidCut->AddEMCALFidCutMinPhiArray(phiminarr);
+  
+  fidCut->Print("");
+  
+  //-----------------------------------------------------------  
+  // Reader
+  //-----------------------------------------------------------
+  AliCaloTrackMCReader *reader = new AliCaloTrackMCReader();
+  reader->SetDebug(-1);
+  
+ //Switch on or off the detectors information that you want
+  reader->SwitchOffEMCAL();
+  reader->SwitchOffCTS();
+  reader->SwitchOnPHOS();
+  reader->SwitchOffEMCALCells();
+  reader->SwitchOffPHOSCells();
+
+  //Min particle pT
+  reader->SetEMCALPtMin(0.); 
+  reader->SetPHOSPtMin(0.);
+  reader->SetCTSPtMin(.2);
+  reader->SetFidutialCut(fidCut);
+  reader->Print("");
+  
+  
+  //---------------------------------------------------------------------
+  // Analysis algorithm
+  //---------------------------------------------------------------------
+  
+  //Detector Fidutial Cuts for analysis part
+  AliFidutialCut * fidCut2 = new AliFidutialCut();
+  fidCut2->DoCTSFidutialCut(kFALSE) ;
+  fidCut2->DoEMCALFidutialCut(kFALSE) ;
+  fidCut2->DoPHOSFidutialCut(kTRUE) ;
+  fidCut2->SetSimplePHOSFidutialCut(0.1,240.,280.);
+
+  AliCaloPID * pid = new AliCaloPID();
+  // use selection with simple weights
+  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+  pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+  // use more complicated selection, particle weight depending on cluster energy
+//   pid->UsePHOSPIDWeightFormula(kTRUE);
+//   TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
+//   TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
+//   pid->SetPHOSPhotonWeightFormula(photonF);
+//   pid->SetPHOSPi0WeightFormula(pi0F);
+
+
+  AliAnaExample *ana = new AliAnaExample();
+  ana->SetDebug(-1);
+  ana->SetCaloPID(pid);
+  ana->SetFidutialCut(fidCut2);
+  ana->SetDetector("PHOS");
+  //ana->SwitchOnDataMC();
+  ana->SetMinPt(0.);
+  ana->SetOutputAODName("Example");
+  ana->SetOutputAODClassName("AliAODPWG4Particle"); //Or AliAODPWG4ParticleCorrelation
+  //Set Histrograms bins and ranges
+//     ana->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;  
+  
+  //---------------------------------------------------------------------
+  // Set  analysis algorithm and reader
+  //---------------------------------------------------------------------
+  maker = new AliAnaPartCorrMaker();
+  maker->SetReader(reader);//pointer to reader
+  maker->AddAnalysis(ana,0);
+  maker->SetAnaDebug(-1)  ;
+  maker->SwitchOnHistogramsMaker()  ;  
+  maker->SwitchOnAODsMaker()  ;
+  
+  maker->Print("");
+  //
+  printf("======================== \n");
+  printf("END ConfigAnalysis() \n");
+  printf("======================== \n");
+  return maker ;
+}
diff --git a/PWG4/macros/ConfigAnalysisPhoton.C b/PWG4/macros/ConfigAnalysisPhoton.C
new file mode 100644 (file)
index 0000000..ddc9a92
--- /dev/null
@@ -0,0 +1,122 @@
+/* $Id: $ */
+/* $Log$ */
+
+//------------------------------------
+// Configuration macro example:
+//
+// Do photon identification analysis with ESDs
+// Gamma in PHOS. For EMCAL clusters change 
+// PHOS by EMCAL where necessary
+//
+// Author : Gustavo Conesa Balbastre (INFN-LNF)
+//------------------------------------
+
+AliAnaPartCorrMaker*  ConfigAnalysis()
+{
+  //
+  // Configuration goes here
+  // 
+  printf("======================== \n");
+  printf("ConfigAnalysis() \n");
+  printf("======================== \n");
+  
+  
+  //Detector Fidutial Cuts
+  AliFidutialCut * fidCut = new AliFidutialCut();
+  fidCut->DoCTSFidutialCut(kFALSE) ;
+  fidCut->DoEMCALFidutialCut(kFALSE) ;
+  fidCut->DoPHOSFidutialCut(kFALSE) ;
+  
+  //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+  //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+  //fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
+   
+  fidCut->Print("");
+  
+  //-----------------------------------------------------------  
+  // Reader
+  //-----------------------------------------------------------
+  AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+  reader->SetDebug(-1);
+
+  //Switch on or off the detectors information that you want
+  reader->SwitchOffEMCAL();
+  reader->SwitchOffCTS();
+  reader->SwitchOnPHOS();
+  
+  //Min particle pT
+  //reader->SetEMCALPtMin(0.5); 
+  reader->SetPHOSPtMin(0.5);
+  //reader->SetCTSPtMin(0.2);
+  
+  reader->SetFidutialCut(fidCut);
+  reader->Print("");
+  
+  
+  //---------------------------------------------------------------------
+  // Analysis algorithm
+  //---------------------------------------------------------------------
+  
+  //Detector Fidutial Cuts for analysis part
+  AliFidutialCut * fidCut2 = new AliFidutialCut();
+  fidCut2->DoCTSFidutialCut(kFALSE) ;
+  fidCut2->DoEMCALFidutialCut(kFALSE) ;
+  fidCut2->DoPHOSFidutialCut(kFALSE) ;
+  
+  //fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
+  //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+  //fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
+
+  fidCut2->Print("");
+
+  AliCaloPID * pid = new AliCaloPID();
+  // use selection with simple weights
+  pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+  // use more complicated selection, particle weight depending on cluster energy
+//   pid->UsePHOSPIDWeightFormula(kTRUE);
+//   TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
+//   TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
+//   pid->SetPHOSPhotonWeightFormula(photonF);
+//   pid->SetPHOSPi0WeightFormula(pi0F);
+
+  pid->SetDispersionCut(1.5);
+  pid->SetTOFCut(5.e-9);
+  pid->SetDebug(-1);
+  pid->Print("");
+
+  AliAnaPhoton *ana = new AliAnaPhoton();
+  ana->SetDebug(-1);
+  ana->SetMinPt(5.);
+  ana->SetMinDistanceToBadChannel(2, 4, 5);
+  ana->SetCaloPID(pid);
+  ana->SetFidutialCut(fidCut2);
+  ana->SetCalorimeter("PHOS");
+  ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms
+  ana->SwitchOffCaloPID();
+  ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+  ana->SwitchOffFidutialCut();
+  ana->SetOutputAODName("Photons");
+  ana->SetOutputAODClassName("AliAODPWG4Particle");
+  //Set Histrograms bins and ranges
+//     ana->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+  ana->Print("");
+
+  //---------------------------------------------------------------------
+  // Set  analysis algorithm and reader
+  //---------------------------------------------------------------------
+  maker = new AliAnaPartCorrMaker();
+  maker->SetReader(reader);//pointer to reader
+  maker->AddAnalysis(ana,0);
+  maker->SetAnaDebug(-1)  ;
+  maker->SwitchOnHistogramsMaker()  ;
+  maker->SwitchOnAODsMaker()  ;
+  
+  maker->Print("");
+  //
+  printf("======================== \n");
+  printf("END ConfigAnalysis() \n");
+  printf("======================== \n");
+  return maker ;
+}
diff --git a/PWG4/macros/ConfigAnalysisPi0.C b/PWG4/macros/ConfigAnalysisPi0.C
new file mode 100644 (file)
index 0000000..9754f0a
--- /dev/null
@@ -0,0 +1,132 @@
+/* $Id: $ */
+/* $Log$ */
+
+//------------------------------------
+// Configuration macro example:
+//
+// Do photon identification analysis with ESDs
+// in PHOS, after, pi0 identification with Invariant mass. 
+// For EMCAL, change PHOS by EMCAL where necessary
+//
+// Author : Gustavo Conesa Balbastre (INFN-LNF)
+//------------------------------------
+
+AliAnaPartCorrMaker*  ConfigAnalysis()
+{
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kFALSE) ;
+       fidCut->DoEMCALFidutialCut(kFALSE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
+       
+       fidCut->Print("");
+       
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);//10 for lots of messages
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOnPHOS();
+       
+       //Min particle pT
+       //reader->SetEMCALPtMin(0.5); 
+       reader->SetPHOSPtMin(0.5);
+       //reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7); 
+       // use more complicated selection, particle weight depending on cluster energy
+       //   pid->UsePHOSPIDWeightFormula(kTRUE);
+       //   TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
+       //   TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
+       //   pid->SetPHOSPhotonWeightFormula(photonF);
+       //   pid->SetPHOSPi0WeightFormula(pi0F);
+       
+       pid->SetDispersionCut(1.5);
+       pid->SetTOFCut(5.e-9);
+       pid->SetDebug(-1);
+       pid->Print("");
+       
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(1);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       //anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("PHOS");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOffCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOffFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4Particle");
+       //Set Histrograms bins and ranges
+//     anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;   anaphoton->Print("");
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoPHOSFidutialCut(kTRUE) ;
+       fidCut2->SetSimplePHOSFidutialCut(0.12,220.,320.);
+       
+       fidCut->Print("");
+               
+       AliAnaPi0 *anapi0 = new AliAnaPi0();
+       anapi0->SetDebug(-1);//10 for lots of messages
+        anapi0->SetInputAODName("Photons");
+       anapi0->SetCaloPID(pid);
+//     anapi0->SetNCentrBin(5); //number of bins in centrality 
+//     anapi0->SetNZvertBin(5); //number of bins for vertex position
+//     anapi0->SetNRPBin(6); //number of bins in reaction plain
+//     anapi0->SetNMaxEvMix(20);//Maximal number of events for mixing
+       anapi0->SetCalorimeter("PHOS");
+       anapi0->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level. Not used if real geometry
+       anapi0->SwitchOnFidutialCut();
+       anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
+       anapi0->Print("");
+       
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anapi0,1);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       maker->SwitchOnAODsMaker()  ;
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
+}
diff --git a/PWG4/macros/ConfigAnalysisPi0EbE.C b/PWG4/macros/ConfigAnalysisPi0EbE.C
new file mode 100644 (file)
index 0000000..30c9fe5
--- /dev/null
@@ -0,0 +1,138 @@
+/* $Id: $ */
+/* $Log$ */
+
+//------------------------------------
+// Configuration macro example:
+//
+// Do photon identification analysis with ESDs
+// in EMCAL, after pi0 identification event by event
+// in photon paris invariant mass and aperture angle widow
+// For PHOS, change EMCAL by PHOS where necessary
+//
+// Author : Gustavo Conesa Balbastre (INFN-LNF)
+//------------------------------------
+
+AliAnaPartCorrMaker*  ConfigAnalysis()
+{
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kFALSE) ;
+       fidCut->DoEMCALFidutialCut(kFALSE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
+       
+       fidCut->Print("");
+       
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);//10 for lots of messages
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOffPHOS();
+       
+       //Min particle pT
+       //reader->SetEMCALPtMin(0.5); 
+       reader->SetPHOSPtMin(0.5);
+       //reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       
+       pid->SetDispersionCut(1.5);
+       pid->SetTOFCut(5.e-9);
+       pid->SetDebug(-1);
+       pid->Print("");
+
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(1);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       //anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("EMCAL");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOffCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOffFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4Particle");
+       //Set Histrograms bins and ranges
+//     anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;   anaphoton->Print("");
+
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut2 = new AliFidutialCut();
+       fidCut2->DoPHOSFidutialCut(kTRUE) ;
+       fidCut2->SetSimplePHOSFidutialCut(0.12,220.,320.);
+       
+       fidCut->Print("");
+       
+       // >>> Second Analysis <<<
+       
+       AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
+       nms->SetInvMassCutRange(0.10, 0.17)     ;
+       nms->KeepNeutralMesonSelectionHistos(kTRUE);
+       //Set Histrograms bins and ranges
+//     nms->SetHistoERangeAndNBins(0, 50, 100) ;
+//     nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
+//     nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ;  
+
+       AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
+       anapi0->SetDebug(-1);//10 for lots of messages
+       anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
+       anapi0->SetInputAODName("Photons");
+       anapi0->SetOutputAODName("Pi0s");
+       anapi0->SetOutputAODClassName("AliAODPWG4Particle");
+       anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
+       anapi0->SetNeutralMesonSelection(nms);
+       //Set Histrograms bins and ranges
+//     anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anapi0->Print("");
+       
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anapi0,1);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       maker->SwitchOnAODsMaker()  ;
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
+}
diff --git a/PWG4/macros/ConfigAnalysisPi0EbEIsolated.C b/PWG4/macros/ConfigAnalysisPi0EbEIsolated.C
new file mode 100644 (file)
index 0000000..90a7a9f
--- /dev/null
@@ -0,0 +1,173 @@
+/* $Id: $ */
+/* $Log$ */
+
+//------------------------------------
+// Configuration macro example:
+//
+// Do photon identification analysis with ESDs
+// in EMCAL, after pi0 identification event by event
+// in photon paris invariant mass and aperture angle widow.
+// After, study the isolation of the selected pi0.
+// For PHOS, change EMCAL by PHOS where necessary
+// Do photon identification analysis with ESDs
+//
+// Author : Gustavo Conesa Balbastre (INFN-LNF)
+//------------------------------------
+
+AliAnaPartCorrMaker*  ConfigAnalysis()
+{
+       //
+       // Configuration goes here
+       // 
+       printf("======================== \n");
+       printf("ConfigAnalysis() \n");
+       printf("======================== \n");
+       
+       
+       //Detector Fidutial Cuts
+       AliFidutialCut * fidCut = new AliFidutialCut();
+       fidCut->DoCTSFidutialCut(kFALSE) ;
+       fidCut->DoEMCALFidutialCut(kFALSE) ;
+       fidCut->DoPHOSFidutialCut(kTRUE) ;
+       
+       //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
+       //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
+       //fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
+       
+       fidCut->Print("");
+       
+       //-----------------------------------------------------------  
+       // Reader
+       //-----------------------------------------------------------
+       AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
+       reader->SetDebug(-1);//10 for lots of messages
+       
+       //Switch on or off the detectors information that you want
+       reader->SwitchOnEMCAL();
+       reader->SwitchOnCTS();
+       reader->SwitchOffPHOS();
+       
+       //Min particle pT
+       reader->SetEMCALPtMin(0.5); 
+       //reader->SetPHOSPtMin(0.5);
+       reader->SetCTSPtMin(0.2);
+       
+       reader->SetFidutialCut(fidCut);
+       reader->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Analysis algorithm
+       //---------------------------------------------------------------------
+       
+       AliCaloPID * pid = new AliCaloPID();
+       // use selection with simple weights
+       pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
+       pid->SetDispersionCut(1.5);
+       pid->SetTOFCut(5.e-9);
+       pid->SetDebug(-1);
+       pid->Print("");
+
+       AliAnaPhoton *anaphoton = new AliAnaPhoton();
+       anaphoton->SetDebug(-1); //10 for lots of messages
+       anaphoton->SetMinPt(1);
+       anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
+       anaphoton->SetCaloPID(pid);
+       //anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
+       anaphoton->SetCalorimeter("EMCAL");
+       anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       anaphoton->SwitchOffCaloPID();
+       anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
+       anaphoton->SwitchOffFidutialCut();
+       anaphoton->SetOutputAODName("Photons");
+       anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       //Set Histrograms bins and ranges
+//     anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anaphoton->Print("");
+
+       // >>> Second Analysis <<<
+       
+       AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
+       nms->SetInvMassCutRange(0.10, 0.17)     ;
+       nms->KeepNeutralMesonSelectionHistos(kTRUE);
+       //Set Histrograms bins and ranges
+//     nms->SetHistoERangeAndNBins(0, 50, 100) ;
+//     nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
+//     nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ;  
+       
+       AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
+       anapi0->SetDebug(-1);//10 for lots of messages
+       anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
+       anapi0->SetInputAODName("Photons");
+       anapi0->SetOutputAODName("Pi0s");
+       anapi0->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+       anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
+       anapi0->SetNeutralMesonSelection(nms);
+       //Set Histrograms bins and ranges
+//     anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
+       anapi0->Print("");
+       
+       // >>>> Third Analysis <<<<
+       AliIsolationCut * ic = new AliIsolationCut();
+       ic->SetConeSize(0.4);
+       ic->SetPtThreshold(1.);
+       ic->SetICMethod(AliIsolationCut::kPtThresIC);
+       ic->Print("");
+       
+       AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
+       anaisol->SetDebug(-1);
+       anaisol->SetInputAODName("Pi0s");
+       anaisol->SetMinPt(5);
+       anaisol->SetCalorimeter("EMCAL"); //Must be the same calorimeter where pi0/photon falls
+       anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
+       //Select clusters with no pair, if both clusters with pi0 mass
+       anaisol->SwitchOffInvariantMass(); //It is a pi0 not needed
+       //anaisol->SetNeutralMesonSelection(nms);
+       //Do isolation cut
+       anaisol->SetIsolationCut(ic);   
+       //Do or not do isolation with previously produced AODs.
+       //No effect if use of SwitchOnSeveralIsolation()
+       anaisol->SwitchOffReIsolation();
+       
+       //Multiple IC
+       anaisol->SwitchOffSeveralIsolation() ;
+       //Make sure that the initial isolation cut parameters set in AliIsolationCut 
+       //pointer are relativelly open.
+//     anaisol->SetNCones(2) ;     
+//     anaisol->SetNPtThresFrac(2) ;     
+//     anaisol->SetConeSizes(0, 0.3) ;         anaisol->SetConeSizes(1, 0.4) ;    
+//     anaisol->SetPtThresholds(0, 0.5) ;      anaisol->SetPtThresholds(1, 1.) ;   
+//     anaisol->SetPtFractions(0, 1.) ;        anaisol->SetPtFractions(1, 1.5) ;  
+       //Set Histrograms bins and ranges
+//     anaisol->SetHistoPtRangeAndNBins(0, 50, 100) ;
+//     anaisol->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
+//     anaisol->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;     
+       anaisol->SetHistoPtSumRangeAndNBins(0, 10, 100) ;
+       anaisol->SetHistoPtInConeRangeAndNBins(0, 50, 100) ;    
+       anaisol->Print("");
+       
+       
+       //---------------------------------------------------------------------
+       // Set  analysis algorithm and reader
+       //---------------------------------------------------------------------
+       maker = new AliAnaPartCorrMaker();
+       maker->SetReader(reader);//pointer to reader
+       maker->AddAnalysis(anaphoton,0);
+       maker->AddAnalysis(anapi0,1);
+       maker->AddAnalysis(anaisol,2);
+       maker->SetAnaDebug(-1)  ;
+       maker->SwitchOnHistogramsMaker()  ;
+       maker->SwitchOnAODsMaker()  ;
+       
+       maker->Print("");
+       //
+       printf("======================== \n");
+       printf("END ConfigAnalysis() \n");
+       printf("======================== \n");
+       return maker ;
+}
index 94bf134..4aaed1b 100644 (file)
@@ -1,7 +1,4 @@
 /* $Id:  $ */
-/* $Log$
-/* */
-
 //--------------------------------------------------
 // Example macro to do analysis with the 
 // analysis classes in PWG4PartCorr
@@ -22,9 +19,8 @@ enum anaModes {mLocal, mLocalCAF,mPROOF,mGRID};
 //Settings to read locally several files, only for "mLocal" mode
 //The different values are default, they can be set with environmental 
 //variables: INDIR, PATTERN, NEVENT, respectivelly
-char * kInDir = "/home/user/data"; 
-char * kPattern = ""; // Data are in diles /data/Run0, 
-// /Data/Run1 ...
+char * kInDir = "/user/data/files/"; 
+char * kPattern = ""; // Data are in files kInDir/kPattern+i 
 Int_t kEvent = 1; // Number of files
 //---------------------------------------------------------------------------
 //Collection file for grid analysis
@@ -41,7 +37,7 @@ const Int_t kNumberOfEventsPerFile = 100;
 
 const Bool_t kMC = kTRUE; //With real data kMC = kFALSE
 const TString kInputData = "ESD";
-void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisESDExample")
+void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisPhoton")
 {
   // Main
 
@@ -91,13 +87,14 @@ void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisESDExample")
       mgr->SetInputEventHandler(aodHandler);
     }
 
-    //mgr->SetDebugLevel(10); // For debugging
+    //mgr->SetDebugLevel(-1); // For debugging, do not uncomment if you want no messages.
 
     //-------------------------------------------------------------------------
     //Define task, put here any other task that you want to use.
     //-------------------------------------------------------------------------
     AliAnalysisTaskParticleCorrelation * taskpwg4 = new AliAnalysisTaskParticleCorrelation ("Particle");
     taskpwg4->SetConfigFileName(configName); //Default name is ConfigAnalysis
+               
     mgr->AddTask(taskpwg4);
     
     // Create containers for input/output
@@ -116,7 +113,9 @@ void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisESDExample")
     //Scaling task
     //-----------------------
     Int_t nfiles = chainxs->GetEntries();
+    //cout<<"Get? "<<kGetXSectionFromFileAndScale<<" nfiles "<<nfiles<<endl;
     if(kGetXSectionFromFileAndScale && nfiles > 0){
+      //cout<<"Init AnaScale"<<endl;
       //Get the cross section
       Double_t xsection=0; 
       Float_t ntrials = 0;
@@ -124,6 +123,8 @@ void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisESDExample")
       
       AliAnaScale * scale = new AliAnaScale("scale") ;
       scale->Set(xsection/ntrials/kNumberOfEventsPerFile/nfiles) ;
+      scale->MakeSumw2(kFALSE);//If you want histograms with error bars set to kTRUE
+      //scale->SetDebugLevel(2);
       mgr->AddTask(scale);
       
       AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("histosscaled", TList::Class(),
@@ -146,6 +147,9 @@ void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisESDExample")
     mgr->InitAnalysis();
     mgr->PrintStatus();
     mgr->StartAnalysis(smode.Data(),chain);
+
+cout <<" Analysis ended sucessfully "<< endl ;
+
   }
   else cout << "Chain was not produced ! "<<endl;
   
@@ -174,8 +178,10 @@ void  LoadLibraries(const anaModes mode) {
     //gSystem->Load("libAOD");
     //gSystem->Load("libANALYSIS");
     //gSystem->Load("libANALYSISalice");
-    //gSystem->Load("libPWG4PartCorr");
-    
+    //gSystem->Load("libPHOSUtils");
+    //gSystem->Load("libPWG4PartCorrBase");
+    //gSystem->Load("libPWG4PartCorrDep");
+       
     //--------------------------------------------------------
     //If you want to use root and par files from aliroot
     //--------------------------------------------------------  
@@ -184,8 +190,12 @@ void  LoadLibraries(const anaModes mode) {
     SetupPar("AOD");
     SetupPar("ANALYSIS");
     SetupPar("ANALYSISalice");
-    SetupPar("PWG4PartCorr");
-    
+//If your analysis needs PHOS geometry uncomment following lines
+//     SetupPar("PHOSUtils");
+//     //Create Geometry
+//    TGeoManager::Import("geometry.root") ; //need file "geometry.root" in local dir!!!!
+     SetupPar("PWG4PartCorrBase");
+     SetupPar("PWG4PartCorrDep");
   }
 
   //---------------------------------------------------------
@@ -202,7 +212,8 @@ void  LoadLibraries(const anaModes mode) {
     //    gProof->ClearPackage("ESD");
     //    gProof->ClearPackage("AOD");
     //    gProof->ClearPackage("ANALYSIS");   
-    //    gProof->ClearPackage("PWG4PartCorr");
+    //    gProof->ClearPackage("PWG4PartCorrBase");
+    //    gProof->ClearPackage("PWG4PartCorrDep");
     
     // Enable the STEERBase Package
     gProof->UploadPackage("STEERBase.par");
@@ -216,10 +227,14 @@ void  LoadLibraries(const anaModes mode) {
     // Enable the Analysis Package
     gProof->UploadPackage("ANALYSIS.par");
     gProof->EnablePackage("ANALYSIS");
-    // Enable gamma jet analysis
-    gProof->UploadPackage("PWG4PartCorr.par");
-    gProof->EnablePackage("PWG4PartCorr");
-    //
+       // Enable the PHOS geometry Package
+    //gProof->UploadPackage("PHOSUtils.par");
+    //gProof->EnablePackage("PHOSUtils");
+    // Enable PartCorr analysis
+    gProof->UploadPackage("PWG4PartCorrBase.par");
+    gProof->EnablePackage("PWG4PartCorrBase");
+       gProof->UploadPackage("PWG4PartCorrDep.par");
+    gProof->EnablePackage("PWG4PartCorrDep");    
     gProof->ShowEnabledPackages();
   }  
   
@@ -238,7 +253,7 @@ void SetupPar(char* pararchivename)
     TString processline(Form(".! make %s", parpar.Data())) ; 
     gROOT->ProcessLine(processline.Data()) ;
     gSystem->ChangeDirectory(cdir) ; 
-    processline = Form(".! mv /tmp/%s .", parpar.Data()) ;
+    processline = Form(".! mv $ALICE_ROOT/%s .", parpar.Data()) ;
     gROOT->ProcessLine(processline.Data()) ;
   } 
   if ( gSystem->AccessPathName(pararchivename) ) {  
index 36dfa0c..3035574 100644 (file)
@@ -179,8 +179,9 @@ void  LoadLibraries(const anaModes mode) {
     //gSystem->Load("libAOD");
     //gSystem->Load("libANALYSIS");
     //gSystem->Load("libANALYSISalice");
-    //gSystem->Load("libPWG4PartCorr");
-    
+    //gSystem->Load("libPWG4PartCorrBase");
+     //gSystem->Load("libPWG4PartCorrDep");
+
     //--------------------------------------------------------
     //If you want to use root and par files from aliroot
     //--------------------------------------------------------  
@@ -189,8 +190,8 @@ void  LoadLibraries(const anaModes mode) {
     SetupPar("AOD");
     SetupPar("ANALYSIS");
     SetupPar("ANALYSISalice");
-    SetupPar("PWG4PartCorr");
-    
+    SetupPar("PWG4PartCorrBase");
+    SetupPar("PWG4PartCorrDep");
   }
 
   //---------------------------------------------------------
@@ -203,12 +204,6 @@ void  LoadLibraries(const anaModes mode) {
     // TProof::Reset("proof://mgheata@lxb6046.cern.ch"); 
     TProof::Open("proof://mgheata@lxb6046.cern.ch");
     
-    //    gProof->ClearPackages();
-    //    gProof->ClearPackage("ESD");
-    //    gProof->ClearPackage("AOD");
-    //    gProof->ClearPackage("ANALYSIS");   
-    //    gProof->ClearPackage("PWG4Gamma");
-    
     // Enable the STEERBase Package
     gProof->UploadPackage("STEERBase.par");
     gProof->EnablePackage("STEERBase");
@@ -221,9 +216,11 @@ void  LoadLibraries(const anaModes mode) {
     // Enable the Analysis Package
     gProof->UploadPackage("ANALYSIS.par");
     gProof->EnablePackage("ANALYSIS");
-    // Enable gamma jet analysis
-    gProof->UploadPackage("PWG4Gamma.par");
-    gProof->EnablePackage("PWG4Gamma");
+    // Enable PartCorr analysis
+    gProof->UploadPackage("PWG4PartCorrBase.par");
+    gProof->EnablePackage("PWG4PartCorrBase");
+    gProof->UploadPackage("PWG4PartCorrDep.par");
+    gProof->EnablePackage("PWG4PartCorrDep");
     //
     gProof->ShowEnabledPackages();
   }  
index 5427d11..cbe0598 100644 (file)
@@ -21,9 +21,8 @@ enum anaModes {mLocal, mLocalCAF,mPROOF,mGRID};
 //Settings to read locally several files, only for "mLocal" mode
 //The different values are default, they can be set with environmental 
 //variables: INDIR, PATTERN, NEVENT, respectivelly
-char * kInDir = "/home/group/alice/schutz/analysis/PWG4/data"; 
-char * kPattern = ""; // Data are in diles /data/Run0, 
-// /Data/Run1 ...
+char * kInDir = "/user/data/files"; 
+char * kPattern = ""; // Data are in files kInDir/kPattern+i
 Int_t kEvent = 1; // Number of files
 //---------------------------------------------------------------------------
 //Collection file for grid analysis
@@ -33,14 +32,14 @@ char * kXML = "collection.xml";
 //Put name of file containing xsection 
 //Put number of events per ESD file
 //This is an specific case for normalization of Pythia files.
-const Bool_t kGetXSectionFromFileAndScale = kTRUE ;
+const Bool_t kGetXSectionFromFileAndScale = kFALSE ;
 const char * kXSFileName = "pyxsec.root";
 const Int_t kNumberOfEventsPerFile = 100; 
 //---------------------------------------------------------------------------
 
 const Bool_t kMC = kTRUE; //With real data kMC = kFALSE
 const TString kInputData = "ESD";
-void anaPartCorrJETAN(Int_t mode=mLocal, TString configName = "ConfigAnalysisExample")
+void anaPartCorrJetAn(Int_t mode=mLocal, TString configName = "ConfigAnalysisGammaJetFinderCorrelation")
 {
   // Main
 
@@ -90,14 +89,14 @@ void anaPartCorrJETAN(Int_t mode=mLocal, TString configName = "ConfigAnalysisExa
       mgr->SetInputEventHandler(aodHandler);
     }
 
-    mgr->SetDebugLevel(10); // For debugging
+   //mgr->SetDebugLevel(-1); // For debugging, uncomment for lots of messages
 
     //-------------------------------------------------------------------------
     //Define task, put here any other task that you want to use.
     //-------------------------------------------------------------------------
        
-       AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
-    jetana->SetDebugLevel(-1);
+    AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
+    //jetana->SetDebugLevel(-1);
     mgr->AddTask(jetana);
        
     AliAnalysisTaskParticleCorrelation * taskpwg4 = new AliAnalysisTaskParticleCorrelation ("Particle");
@@ -120,8 +119,8 @@ void anaPartCorrJETAN(Int_t mode=mLocal, TString configName = "ConfigAnalysisExa
     mgr->ConnectOutput (taskpwg4,     0, coutput1 );
     mgr->ConnectOutput (taskpwg4,     1, coutput2 );
        
-       mgr->ConnectInput  (jetana,     0, cinput1);
-       mgr->ConnectOutput (jetana,     0, coutput1 );
+    mgr->ConnectInput  (jetana,     0, cinput1);
+    mgr->ConnectOutput (jetana,     0, coutput1 );
     mgr->ConnectOutput (jetana,     1, coutput3 );
 
     //------------------------  
@@ -147,10 +146,10 @@ void anaPartCorrJETAN(Int_t mode=mLocal, TString configName = "ConfigAnalysisExa
       mgr->ConnectInput  (scale,     0, coutput2);
       mgr->ConnectOutput (scale,     0, coutput4 );
          
-         AliAnaScale * scalejet = new AliAnaScale("scalejet") ;
+      AliAnaScale * scalejet = new AliAnaScale("scalejet") ;
       scalejet->Set(xsection/ntrials/kNumberOfEventsPerFile/nfiles) ;
       scalejet->MakeSumw2(kFALSE);
-      scalejet->SetDebugLevel(2);
+      //scalejet->SetDebugLevel(2);
       mgr->AddTask(scalejet);
       
       AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("jethistosscaled", TList::Class(),
@@ -204,9 +203,11 @@ void  LoadLibraries(const anaModes mode) {
     //gSystem->Load("libAOD");
     //gSystem->Load("libANALYSIS");
     //gSystem->Load("libANALYSISalice");
-        //gSystem->Load("libJETAN");
-        //gSystem->Load("libPWG4PartCorr");
-    
+    //gSystem->Load("libJETAN");
+    //gSystem->Load("libPHOSUtils");
+    //gSystem->Load("libPWG4PartCorrBase");
+    //gSystem->Load("libPWG4PartCorrDep");
+       
     //--------------------------------------------------------
     //If you want to use root and par files from aliroot
     //--------------------------------------------------------  
@@ -215,8 +216,13 @@ void  LoadLibraries(const anaModes mode) {
     SetupPar("AOD");
     SetupPar("ANALYSIS");
     SetupPar("ANALYSISalice");
-       SetupPar("JETAN");
-    SetupPar("PWG4PartCorr");
+    SetupPar("JETAN");
+    //If your analysis needs PHOS geometry uncomment following lines
+//      SetupPar("PHOSUtils");
+//      //Create Geometry
+//    TGeoManager::Import("geometry.root") ; //need file "geometry.root" in local dir!!!!
+    SetupPar("PWG4PartCorrBase");
+    SetupPar("PWG4PartCorrDep");
     
   }
 
@@ -234,8 +240,9 @@ void  LoadLibraries(const anaModes mode) {
     //    gProof->ClearPackage("ESD");
     //    gProof->ClearPackage("AOD");
     //    gProof->ClearPackage("ANALYSIS"); 
-       //    gProof->ClearPackage("JETAN");  
-       //    gProof->ClearPackage("PWG4PartCorr");
+    //    gProof->ClearPackage("JETAN");  
+    //    gProof->ClearPackage("PWG4PartCorrDep");
+    //    gProof->ClearPackage("PWG4PartCorrBase");
     
     // Enable the STEERBase Package
     gProof->UploadPackage("STEERBase.par");
@@ -249,12 +256,17 @@ void  LoadLibraries(const anaModes mode) {
     // Enable the Analysis Package
     gProof->UploadPackage("ANALYSIS.par");
     gProof->EnablePackage("ANALYSIS");
-       // Enable JETAN
+    // Enable JETAN
     gProof->UploadPackage("JETAN.par");
     gProof->EnablePackage("JETAN");
-    // Enable gamma jet analysis
-    gProof->UploadPackage("PWG4PartCorr.par");
-    gProof->EnablePackage("PWG4PartCorr");
+    // Enable PHOSUtils
+    //gProof->UploadPackage("PHOSUtils.par");
+    //gProof->EnablePackage("PHOSUtils");
+    // Enable PartCorr analysis
+    gProof->UploadPackage("PWG4PartCorrBase.par");
+    gProof->EnablePackage("PWG4PartCorrBase");
+    gProof->UploadPackage("PWG4PartCorrDep.par");
+    gProof->EnablePackage("PWG4PartCorrDep");
     //
     gProof->ShowEnabledPackages();
   }