remove analysis classes new implemention
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 May 2008 08:10:07 +0000 (08:10 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 May 2008 08:10:07 +0000 (08:10 +0000)
28 files changed:
PWG4/AliAnaGamma.cxx [deleted file]
PWG4/AliAnaGamma.h [deleted file]
PWG4/AliAnaGammaCorrelation.cxx [deleted file]
PWG4/AliAnaGammaCorrelation.h [deleted file]
PWG4/AliAnaGammaHadron.cxx [deleted file]
PWG4/AliAnaGammaHadron.h [deleted file]
PWG4/AliAnaGammaJetFinder.cxx [deleted file]
PWG4/AliAnaGammaJetFinder.h [deleted file]
PWG4/AliAnaGammaJetLeadCone.cxx [deleted file]
PWG4/AliAnaGammaJetLeadCone.h [deleted file]
PWG4/AliAnaGammaParton.cxx [deleted file]
PWG4/AliAnaGammaParton.h [deleted file]
PWG4/AliAnaGammaPhos.cxx [deleted file]
PWG4/AliAnaGammaPhos.h [deleted file]
PWG4/AliAnaGammaSelection.cxx [deleted file]
PWG4/AliAnaGammaSelection.h [deleted file]
PWG4/AliAnalysisTaskGamma.cxx [deleted file]
PWG4/AliAnalysisTaskGamma.h [deleted file]
PWG4/AliGammaDataReader.cxx [deleted file]
PWG4/AliGammaDataReader.h [deleted file]
PWG4/AliGammaMCDataReader.cxx [deleted file]
PWG4/AliGammaMCDataReader.h [deleted file]
PWG4/AliGammaMCReader.cxx [deleted file]
PWG4/AliGammaMCReader.h [deleted file]
PWG4/AliGammaReader.cxx [deleted file]
PWG4/AliGammaReader.h [deleted file]
PWG4/PWG4GammaLinkDef.h [deleted file]
PWG4/libPWG4Gamma.pkg [deleted file]

diff --git a/PWG4/AliAnaGamma.cxx b/PWG4/AliAnaGamma.cxx
deleted file mode 100644 (file)
index ed1fe26..0000000
+++ /dev/null
@@ -1,463 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.4  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Base class for gamma and correlation analysis
-// It is called by the task class AliAnalysisGammaTask and it connects the input (ESD/AOD/MonteCarlo)
-// got with AliGammaReader (produces TClonesArrays of TParticles), with the analysis classes 
-// AliAnaGammaDirect, AliAnaGammaCorrelation ....
-//
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-
-#include <TParticle.h>
-#include <TH2.h>
-
-//---- AliRoot system ---- 
-#include "AliAnaGamma.h" 
-#include "AliGammaReader.h" 
-#include "AliAnaGammaDirect.h" 
-#include "AliAnaGammaCorrelation.h" 
-#include "AliAnaGammaSelection.h" 
-#include "AliNeutralMesonSelection.h"
-#include "AliAODCaloCluster.h"
-#include "AliAODEvent.h"
-#include "Riostream.h"
-#include "AliLog.h"
-
-ClassImp(AliAnaGamma)
-
-
-//____________________________________________________________________________
-  AliAnaGamma::AliAnaGamma() : 
-    TObject(),
-    fOutputContainer(0x0), 
-    fAnaType(0),  fCalorimeter(0), fData(0x0), fKine(0x0), 
-    fReader(0x0), fGammaDirect(0x0), fGammaCorrelation(0x0), fGammaSelection(0x0),
-    fNeutralMesonSelection(0x0), fAODclusters(0x0), fNAODclusters(0)
-{
-  //Default Ctor
-
-  //Initialize parameters, pointers and histograms
-  if(!fReader)
-    fReader = new AliGammaReader();
-  if(!fGammaDirect)
-    fGammaDirect = new AliAnaGammaDirect();
-  if(!fGammaCorrelation)
-    fGammaCorrelation = new AliAnaGammaCorrelation();
-  if(!fGammaSelection)
-    fGammaSelection = new AliAnaGammaSelection();
-  if(!fNeutralMesonSelection)
-    fNeutralMesonSelection = new AliNeutralMesonSelection();
-
-  fAODclusters = 0;
-
-  InitParameters();
-  
-}
-
-//____________________________________________________________________________
-AliAnaGamma::AliAnaGamma(const AliAnaGamma & g) :   
-  TObject(),
-  fOutputContainer(g. fOutputContainer), 
-  fAnaType(g.fAnaType),  fCalorimeter(g.fCalorimeter), 
-  fData(g.fData), fKine(g.fKine),fReader(g.fReader),
-  fGammaDirect(g.fGammaDirect), fGammaCorrelation(g.fGammaCorrelation),
-  fGammaSelection(g.fGammaSelection),
-  fNeutralMesonSelection(g.fNeutralMesonSelection),  
-  fAODclusters(g. fAODclusters), fNAODclusters(g.fNAODclusters)
-{
-  // cpy ctor
-  
-}
-
-//_________________________________________________________________________
-AliAnaGamma & AliAnaGamma::operator = (const AliAnaGamma & source)
-{
-  // assignment operator
-
-  if(this == &source)return *this;
-  ((TObject *)this)->operator=(source);
-
-  fOutputContainer = source.fOutputContainer ;
-  fAnaType = source.fAnaType;
-  fCalorimeter = source.fCalorimeter ;
-  fData = source.fData ; 
-  fKine = source.fKine ;
-  fReader = source.fReader ;
-  fGammaDirect = source.fGammaDirect ;
-  fGammaCorrelation = source.fGammaCorrelation ;
-  fGammaSelection = source.fGammaSelection ;
-  fNeutralMesonSelection = source.fNeutralMesonSelection ;
-
-  return *this;
-
-}
-
-//____________________________________________________________________________
-AliAnaGamma::~AliAnaGamma() 
-{
-  // Remove all pointers.
-
-  // Protection added in case of NULL pointers (MG)
-  if (fOutputContainer) {
-     fOutputContainer->Clear();
-     delete fOutputContainer ;
-  }   
-
-  if (fData) delete fData ; 
-  if (fKine) delete fKine ;
-  if (fReader) delete fReader ;
-  if (fGammaDirect) delete fGammaDirect ;
-  if (fGammaCorrelation) delete fGammaCorrelation ;
-  if (fGammaSelection) delete fGammaSelection ;
-  if (fNeutralMesonSelection) delete fNeutralMesonSelection ;
-
-}
-
-//________________________________________________________________________
-void AliAnaGamma::Init()
-{  
-
-  //Init container histograms and other common variables
-
-  //Histograms container
-  fOutputContainer = new TList ;
-  
-  //Fill container with appropriate histograms
-  
-  //Set selection  analysis histograms
-  TList * selectcontainer =  fGammaSelection->GetCreateOutputObjects(); 
-  for(Int_t i = 0; i < selectcontainer->GetEntries(); i++){
-    Bool_t  add = kTRUE ;
-    TString name = (selectcontainer->At(i))->GetName();   
-    if(!fReader->IsEMCALOn() && name.Contains("EMCAL")) add = kFALSE;
-    if(!fReader->IsPHOSOn() && name.Contains("PHOS"))   add = kFALSE;
-    if(!fReader->IsCTSOn() &&  !fGammaSelection->FillCTS() && name.Contains("CTS"))   add = kFALSE;
-    if(add) fOutputContainer->Add(selectcontainer->At(i)) ;
-  }  //Set selection  analysis histograms
-  
-  //Set prompt photon analysis histograms
-  TList * promptcontainer =  fGammaDirect->GetCreateOutputObjects(); 
-  for(Int_t i = 0; i < promptcontainer->GetEntries(); i++)
-    fOutputContainer->Add(promptcontainer->At(i)) ;
-  
-  //Check if selected options are correct or set them when necessary
-  if(fReader->GetDataType() == AliGammaReader::kMCData){
-    fGammaDirect->SetMC();//Only useful with AliGammaMCDataReader, by default kFALSE
-    fGammaSelection->SetMC();//Only useful with AliGammaMCDataReader, by default kFALSE
-  }
-  
-  if(fAnaType == kCorrelation){
-    
-    //Check if selected options are correct
-    if (fGammaDirect->GetICMethod()==AliAnaGammaDirect::kSeveralIC)
-      AliFatal("Correlation not allowed with multiple isolation cuts, kCorrelation and kSeveralIC do not go together");
-    
-    if(fGammaCorrelation->GetCorrelationType() == AliAnaGammaCorrelation::kParton && 
-       fReader->GetDataType() != AliGammaReader::kMC)
-      AliFatal("kParton must be analyzed with data kMC");
-    
-    //Set the parameters for the neutral pair selection depending on the analysis, 
-    fNeutralMesonSelection->SetDeltaPhiCutRange(fGammaCorrelation->GetDeltaPhiMinCut(), 
-                                               fGammaCorrelation->GetDeltaPhiMaxCut());  
-    
-
-    if(fGammaCorrelation->GetCorrelationType() == AliAnaGammaCorrelation::kHadron){
-      fNeutralMesonSelection->SetPhiPtSelection(AliNeutralMesonSelection::kSelectPhiMinPt);
-      fNeutralMesonSelection->SetMinPt(fGammaCorrelation->GetMinPtHadron());
-      
-    }
-    
-    if(fGammaCorrelation->GetCorrelationType() == AliAnaGammaCorrelation::kJetLeadCone){
-      fNeutralMesonSelection->SetPhiPtSelection(AliNeutralMesonSelection::kSelectPhiPtRatio);
-      fNeutralMesonSelection->SetRatioCutRange(fGammaCorrelation->GetRatioMinCut(), 
-                                              fGammaCorrelation->GetRatioMaxCut());
-    }
-
-    //Set the neutral mesosn selection histograms
-    TList * neutralmesoncontainer =  fNeutralMesonSelection->GetCreateOutputObjects();
-    if(fNeutralMesonSelection->AreNeutralMesonSelectionHistosKept()){
-      for(Int_t i = 0; i < neutralmesoncontainer->GetEntries(); i++)
-       fOutputContainer->Add(neutralmesoncontainer->At(i)) ;
-    }
-    
-    //Set correlation histograms
-    TList * correlationcontainer =  fGammaCorrelation->GetCreateOutputObjects();
-    for(Int_t i = 0; i < correlationcontainer->GetEntries(); i++)
-      fOutputContainer->Add(correlationcontainer->At(i)) ;
-    fGammaCorrelation->SetOutputContainer(fOutputContainer);
-    fGammaCorrelation->SetNeutralMesonSelection(fNeutralMesonSelection);
-  }//kCorrelation  
-  
-}
-
-//____________________________________________________________________________
-void AliAnaGamma::InitParameters()
-{
-
-  //Init data members
-  fAnaType = kPrompt;
-  fCalorimeter = "EMCAL";
-
-}
-
-//__________________________________________________________________
-void AliAnaGamma::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-  Info("Print", "%s %s", GetName(), GetTitle() ) ;
-  printf("Analysis type           =     %d\n", fAnaType) ;
-  printf("Calorimeter           =     %s\n", fCalorimeter.Data()) ;
-
-  switch(fAnaType)
-    {
-    case kPrompt:
-      {
-       fGammaDirect->Print("");
-      }// case kIsolationCut
-      break;
-   
-    case kCorrelation:
-      {
-       fGammaCorrelation->Print("");
-      }//  case kCorrelation
-      break;
-      
-    }//switch
-} 
-
-
-//____________________________________________________________________________
-Bool_t AliAnaGamma::ProcessEvent(){
-  //Process analysis for this event
-
-  if(!fOutputContainer)
-    AliFatal("Histograms not initialized");
-
-  //CreateTLists with arrays of TParticles. Filled with particles only relevant for the analysis.
-
-  TClonesArray * plCTS      = new TClonesArray("TParticle",1000); // All particles refitted in Central Tracking System (ITS+TPC)
-  TClonesArray * plEMCAL    = new TClonesArray("TParticle",1000);   // All particles measured in Jet Calorimeter (EMCAL)
-  TClonesArray * plPHOS     = new TClonesArray("TParticle",1000);  // All particles measured  Gamma calorimeter
-  TClonesArray * plPrimCTS      = new TClonesArray("TParticle",1000); // primary tracks
-  TClonesArray * plPrimEMCAL    = new TClonesArray("TParticle",1000);   // primary emcal clusters
-  TClonesArray * plPrimPHOS     = new TClonesArray("TParticle",1000);  // primary phos clusters
-  TClonesArray * plParton   = new TClonesArray("TParticle",1000);  // All partons
-  //Fill lists with photons, neutral particles and charged particles
-  //look for the highest energy photon in the event inside fCalorimeter
-    
-  //Fill particle lists 
-  if(fReader->GetDataType() == AliGammaReader::kData){
-    AliDebug(1,"Data analysis");
-    fReader->CreateParticleList(fData, NULL,plCTS,plEMCAL,plPHOS,NULL,NULL,NULL); 
-  }
-  else if( fReader->GetDataType()== AliGammaReader::kMC){
-    AliDebug(1,"Kinematics analysis");
-    fReader->CreateParticleList(fKine, NULL,plCTS,plEMCAL,plPHOS,plParton,NULL,NULL); 
-  }
-  else if(fReader->GetDataType() == AliGammaReader::kMCData) {
-   AliDebug(1,"Data + Kinematics analysis");
-   fReader->CreateParticleList(fData, fKine,plCTS,plEMCAL,plPHOS,plPrimCTS,plPrimEMCAL,plPrimPHOS); 
-  }
-  else
-    AliError("Option not implemented");
-
-  //Fill AOD with calorimeter
-  //Temporal solution, just for testing
-  //FillAODs(plPHOS,plEMCAL);  
-
-  //Select particles to do the final analysis.
-  if(fReader->IsEMCALOn()) fGammaSelection->Selection("EMCAL",plEMCAL,plPrimEMCAL);
-  if(fReader->IsPHOSOn())  fGammaSelection->Selection("PHOS",plPHOS,plPrimPHOS);
-  if(fReader->IsCTSOn() &&  fGammaSelection->FillCTS()) fGammaSelection->Selection("CTS",plCTS,plPrimCTS);
-
-
-  //Search highest energy prompt gamma in calorimeter
-  if(fCalorimeter == "PHOS")
-    MakeAnalysis(plPHOS, plEMCAL, plCTS, plParton, plPrimPHOS) ; 
-  else if (fCalorimeter == "EMCAL")
-    MakeAnalysis(plEMCAL, plPHOS, plCTS,plParton, plPrimEMCAL) ; 
-  else
-    AliFatal("Wrong calorimeter name");
-
-  plCTS->Clear() ;
-  plEMCAL->Clear() ;
-  plPHOS->Clear() ;
-  plParton->Clear() ;
-  plPrimCTS->Clear() ;
-  plPrimEMCAL->Clear() ;
-  plPrimPHOS->Clear() ;
-
-  delete plCTS ;
-  delete plPHOS ;
-  delete plEMCAL ;
-  delete plParton ;
-  delete plPrimCTS ;
-  delete plPrimPHOS ;
-  delete plPrimEMCAL ;
-
-  return kTRUE;
-
-}
-
-//____________________________________________________________________________
-void AliAnaGamma::MakeAnalysis(TClonesArray * plCalo, TClonesArray * plNe, TClonesArray * plCTS, TClonesArray * plParton, TClonesArray * plPrimCalo)  {
-  
-  TParticle * pGamma = new TParticle ;
-  Bool_t isInCalo = kFALSE ;
-  
-  switch(fAnaType)
-    {
-      
-      //Only Prompt photon analysis
-    case kPrompt:
-      {          
-       AliDebug(1,"kPrompt analysis");
-       switch(fGammaDirect->GetICMethod())
-         {
-           
-         case AliAnaGammaDirect::kSeveralIC:
-           {
-             fGammaDirect->MakeSeveralICAnalysis(plCalo, plCTS);
-             AliDebug(1,"kSeveralIC analysis");
-           }
-           break;
-           
-         default :
-           {
-             fGammaDirect->GetPromptGamma(plCalo, plCTS,plPrimCalo, pGamma,isInCalo);
-             if(!isInCalo)
-               AliDebug(1,"Prompt gamma not found");
-           }
-           break;
-         }//IC method
-      }// case kPrompt:
-      break;
-      
-      //Correlate prompt photon with something: parton, hadron, jet.
-    case kCorrelation:
-      {
-       AliDebug(1,"kCorrelation analysis");
-       //Find prompt photon    
-       fGammaDirect->GetPromptGamma(plCalo, plCTS,plPrimCalo, pGamma,isInCalo);
-
-       if(isInCalo){//If prompt photon found, do correlation
-         
-         switch(fGammaCorrelation->GetCorrelationType())
-           {
-           case AliAnaGammaCorrelation::kParton:
-             {
-               AliDebug(1,"kParton correlation");
-               fGammaCorrelation->MakeGammaCorrelation(pGamma, plParton, NULL);
-             }//  case kParton
-             break;
-      
-           case AliAnaGammaCorrelation::kHadron:
-             {
-               AliDebug(1,"kHadron correlation");
-               fGammaCorrelation->MakeGammaCorrelation(pGamma, plCTS, plNe);
-             }//  case kHadron
-             break;
-
-           case AliAnaGammaCorrelation::kJetLeadCone:
-             {         
-               AliDebug(1,"kJetLeadCone correlation");
-               fGammaCorrelation->MakeGammaCorrelation(pGamma, plCTS, plNe);
-             }//  case kJetLeadCone
-             break;
-             
-           case AliAnaGammaCorrelation::kJetFinder:
-             { 
-               AliDebug(1,"kJetFinder correlation");
-               printf("Analysis not implemented \n");
-             }//  case kJetFinder
-             break;
-           }// switch correlation
-       }// is in calo
-       else  AliDebug(2,"Prompt gamma not found");
-      }// case kCorrelation
-      break;
-
-    } //switch(fAnaType)
-
-  delete pGamma ; 
-  
-}
-
-//____________________________________________________
-void AliAnaGamma::AddCluster(AliAODCaloCluster p)
-{
-// Add new jet to the list
-  cout<<"AOD list pointer "<<fAODclusters<<" nAODclusters "<<fNAODclusters<<endl;
-  cout<<"list entries "<<fAODclusters->GetEntries()<<endl;
-  new ((*fAODclusters)[fNAODclusters++]) AliAODCaloCluster(p);
-}
-
-//___________________________________________________
-void AliAnaGamma::ConnectAOD(AliAODEvent* aod)
-{
-// Connect to the AOD
-  fAODclusters = aod->GetCaloClusters();
-}
-
-//____________________________________________________________________________
-void AliAnaGamma::FillAODs(TClonesArray * plPHOS, TClonesArray * plEMCAL){
-  //Fill AOD caloClusters
-  //Temporal method, just for testing AOD creation
-  
-  //Fill AOD with PHOS clusters
-  Int_t nphos =  plPHOS->GetEntries() ;
-  cout<<"PHOS entries "<<nphos<<endl;
-  for(Int_t ipr = 0;ipr < nphos ; ipr ++ ){
-    TParticle * particle = dynamic_cast<TParticle *>(plPHOS->At(ipr)) ;
-    Float_t pos []= {0,0,0};
-    AliAODCaloCluster phos(ipr,0,0x0,particle->Energy(),pos,0x0,AliAODCluster::kPHOSNeutral,0);
-    AddCluster(phos);
-  }
-  
-  //Fill AOD with EMCAL clusters
-  cout<<"EMCAL entries "<<plEMCAL->GetEntries()<<endl;
-  for(Int_t ipr = 0;ipr < plEMCAL->GetEntries() ; ipr ++ ){
-    TParticle * particle = dynamic_cast<TParticle *>(plEMCAL->At(ipr)) ;
-    Float_t pos []= {0,0,0};
-    AliAODCaloCluster emcal(ipr+nphos,0,0x0,particle->Energy(),pos,0x0,AliAODCluster::kEMCALClusterv1,0);
-    AddCluster(emcal);
-  }
-}
diff --git a/PWG4/AliAnaGamma.h b/PWG4/AliAnaGamma.h
deleted file mode 100644 (file)
index e237eb7..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#ifndef ALIANAGAMMA_H
-#define ALIANAGAMMA_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.4  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Base class for gamma and correlation analysis
-// It is called by the task class AliAnalysisGammaTask and it connects the input (ESD/AOD/MonteCarlo)
-// got with AliGammaReader (produces TClonesArrays of TParticles), with the analysis classes 
-// AliAnaGammaDirect, AliAnaGammaCorrelation ....
-//
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-#include <TParticle.h> 
-#include <TList.h> 
-#include <TClonesArray.h> 
-#include <TH2F.h>
-#include<TObject.h>
-#include <TTree.h>
-
-// --- AliRoot system ---
-#include <AliLog.h>
-#include "AliAODCaloCluster.h"
-
-class AliGammaReader ;
-class AliAnaGammaDirect ;
-class AliAnaGammaCorrelation ;
-class AliAnaGammaSelection ;
-class AliNeutralMesonSelection ;
-class AliAODEvent;
-
-// --- AliRoot
-class AliAnaGamma : public TObject {
-
-public: 
-  
-  AliAnaGamma() ; // default ctor
-  AliAnaGamma(const AliAnaGamma & g) ; // cpy ctor
-  AliAnaGamma & operator = (const AliAnaGamma & g) ;//cpy assignment
-  virtual ~AliAnaGamma() ; //virtual dtor
-
-  enum Anatype {kPrompt, kCorrelation};
-
-  //Setter and getters
-  TList * GetOutputContainer()      const {return fOutputContainer ; }
-
-  Int_t GetAnalysisType() const {return fAnaType ; }
-  void SetAnalysisType(Int_t ana ){  fAnaType = ana ; }
-
-  TString GetCalorimeter() const {return fCalorimeter ; }
-  void SetCalorimeter(TString calo) {if (calo == "PHOS" || calo == "EMCAL") fCalorimeter = calo ;
-    else AliFatal("Wrong calorimeter name") ; }
-
-  TObject * GetData() const {return fData ; }
-  TObject * GetKine() const {return fKine ;}
-  void SetData(TObject * data) {fData = data ; }
-  void SetKine(TObject * kine) {fKine = kine ; }
-
-  AliGammaReader * GetReader() const {return fReader ; }
-  void SetReader(AliGammaReader * reader) { fReader = reader ; }
-
-  AliAnaGammaDirect * GetGammaDirect() const { return fGammaDirect ; }
-  AliAnaGammaCorrelation * GetGammaCorrelation() const { return fGammaCorrelation  ;}
-  AliAnaGammaSelection * GetGammaSelection() const { return fGammaSelection ;}
-  AliNeutralMesonSelection * GetNeutralMesonSelection() const { return fNeutralMesonSelection  ; }
-
-  void SetGammaDirect(AliAnaGammaDirect * dg) { fGammaDirect = dg ; }
-  void SetGammaCorrelation(AliAnaGammaCorrelation * gc) { fGammaCorrelation = gc ;}
-  void SetGammaSelection(AliAnaGammaSelection * gs) { fGammaSelection = gs ;}
-  void SetNeutralMesonSelection(AliNeutralMesonSelection * nms) { fNeutralMesonSelection = nms ; }
-
-  //AOD stuff  
-  void   AddCluster(AliAODCaloCluster p);
-  void   ConnectAOD(AliAODEvent* aod);
-  void   FillAODs(TClonesArray * plPHOS, TClonesArray * plEMCAL);
-
-  //Others
-  void Init();
-  void InitParameters();
-
-  void MakeAnalysis(TClonesArray * plCalo, TClonesArray * plNe, TClonesArray * plCTS, TClonesArray *plParton, TClonesArray * plPrimCalo)  ;  
-
-  void Print(const Option_t * opt) const;
-
-  Bool_t ProcessEvent() ;
-
- private:
-  
-  //General Data members
-  TList  *fOutputContainer ; // output data container
-  Int_t      fAnaType; //Analysis type to be done
-  TString fCalorimeter; //Prompt photon detector
-  TObject * fData ; //! ESD
-  TObject * fKine ; //! Stack
-  AliGammaReader *      fReader ; // Pointer to reader 
-  AliAnaGammaDirect *   fGammaDirect ; // Pointer to prompt gamma algorithm 
-  AliAnaGammaCorrelation *   fGammaCorrelation ; // Pointer to gamma correlation algorithm
-  AliAnaGammaSelection *   fGammaSelection ; // Pointer to gamma selection algorithm
-  AliNeutralMesonSelection *  fNeutralMesonSelection ; // Pointer to pair selection for pi0 identification.
-  TClonesArray* fAODclusters;        //! reconstructed jets
-  Int_t         fNAODclusters;       //! number of reconstructed jets
-
-  ClassDef(AliAnaGamma,1)
-} ;
-
-#endif //ALIANAGAMMA_H
-
-
-
diff --git a/PWG4/AliAnaGammaCorrelation.cxx b/PWG4/AliAnaGammaCorrelation.cxx
deleted file mode 100644 (file)
index facdf16..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Base class for the analysis of gamma correlations  
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-
-#include <TParticle.h>
-#include <TH2.h>
-
-//---- AliRoot system ----
-#include "AliAnaGammaCorrelation.h" 
-#include "AliNeutralMesonSelection.h" 
-#include "Riostream.h"
-#include "AliLog.h"
-
-ClassImp(AliAnaGammaCorrelation)
-
-
-//____________________________________________________________________________
-  AliAnaGammaCorrelation::AliAnaGammaCorrelation() : 
-    TObject(), fOutputContainer(0x0),   
-    fNeutralMesonSelection(0x0), fCorrelationType(0),
-    fJetsOnlyInCTS(0),
-    fMinPtHadron(0),
-    fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), 
-    fRatioMaxCut(0.), fRatioMinCut(0.)
-{
-  //Default Ctor
-
-  //Initialize parameters
-
-  if(!fNeutralMesonSelection)
-    fNeutralMesonSelection = new AliNeutralMesonSelection();
-  
-  //Initialize parameters
-  InitParameters();
-}
-
-//____________________________________________________________________________
-AliAnaGammaCorrelation::AliAnaGammaCorrelation(const AliAnaGammaCorrelation & g) :   
-  TObject(), fOutputContainer(g.fOutputContainer),  
-  fNeutralMesonSelection(g.fNeutralMesonSelection),
-  fCorrelationType(g.fCorrelationType),
-  fJetsOnlyInCTS(g.fJetsOnlyInCTS), 
-  fMinPtHadron(g.fMinPtHadron),
-  fDeltaPhiMaxCut(g.fDeltaPhiMaxCut), fDeltaPhiMinCut(g.fDeltaPhiMinCut), 
-  fRatioMaxCut(g.fRatioMaxCut), fRatioMinCut(g.fRatioMinCut) 
-{
-  // cpy ctor
-
-}
-
-//_________________________________________________________________________
-AliAnaGammaCorrelation & AliAnaGammaCorrelation::operator = (const AliAnaGammaCorrelation & source)
-{
-  // assignment operator
-
-  if(this == &source)return *this;
-  ((TObject *)this)->operator=(source);
-
-  fOutputContainer = source.fOutputContainer;  
-  fNeutralMesonSelection = source.fNeutralMesonSelection ;
-  fCorrelationType = source.fCorrelationType;
-  fJetsOnlyInCTS = source.fJetsOnlyInCTS ;
-
-  fMinPtHadron = source.fMinPtHadron ;
-  fDeltaPhiMaxCut = source.fDeltaPhiMaxCut ; fDeltaPhiMinCut = source.fDeltaPhiMinCut ; 
-  fRatioMaxCut = source.fRatioMaxCut ; fRatioMinCut = source.fRatioMinCut ; 
-
-
-
-  return *this;
-
-}
-
-//____________________________________________________________________________
-AliAnaGammaCorrelation::~AliAnaGammaCorrelation() 
-{
-   // Remove all pointers except analysis output pointers.
-}
-
- //____________________________________________________________________________
-void AliAnaGammaCorrelation::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-  fCorrelationType = kHadron ;
-  //-----------kHadron----------------
-  fMinPtHadron = 0.   ;
-  //-----------kHadron & kJetLeadCone----------------
-  fJetsOnlyInCTS = kFALSE ;
-  fDeltaPhiMaxCut      = 4.5;
-  fDeltaPhiMinCut      = 1.5 ;
-  //-----------kJetLeadCone----------------
-  fRatioMaxCut = 1.0 ; 
-  fRatioMinCut = 0.1 ; 
-
-}
-
-//__________________________________________________________________
-void AliAnaGammaCorrelation::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-  Info("Print", "%s %s", GetName(), GetTitle() ) ;
-  printf("Correlation           =     %d\n", fCorrelationType) ;  
-  
-  printf("pT Hadron       >    %f\n", fMinPtHadron) ; 
-  printf("Phi gamma-Hadron      <     %f\n", fDeltaPhiMaxCut) ; 
-  printf("Phi gamma-Hadron      >     %f\n", fDeltaPhiMinCut) ;
-  printf("Ratio pt hadron/gamma      <     %f\n", fRatioMaxCut) ; 
-  printf("Ratio pt hadron/gamma      >     %f\n", fRatioMinCut) ;
-
-} 
diff --git a/PWG4/AliAnaGammaCorrelation.h b/PWG4/AliAnaGammaCorrelation.h
deleted file mode 100644 (file)
index 3cae78a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef ALIANAGAMMACORRELATION_H
-#define ALIANAGAMMACORRELATION_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Base class for  gamma correlations 
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-#include <TParticle.h> 
-#include <TClonesArray.h> 
-#include <TH2F.h>
-#include<TObject.h>
-#include<TList.h>
-
-class AliNeutralMesonSelection ;
-
-class AliAnaGammaCorrelation : public TObject {
-
-public: 
-  
-  AliAnaGammaCorrelation() ; // default ctor
-  AliAnaGammaCorrelation(const AliAnaGammaCorrelation & g) ; // cpy ctor
-  AliAnaGammaCorrelation & operator = (const AliAnaGammaCorrelation & g) ;//cpy assignment
-  virtual ~AliAnaGammaCorrelation() ; //virtual dtor
-
-  enum Corrtype {kParton, kHadron, kJetLeadCone, kJetFinder};
-
-  //General methods
-
-  AliNeutralMesonSelection * GetNeutralMesonSelection() 
-  { return fNeutralMesonSelection ; }
-  void SetNeutralMesonSelection(AliNeutralMesonSelection * nms) 
-  { fNeutralMesonSelection = nms ; } 
-
-  TList * GetOutputContainer() const {return fOutputContainer ;} 
-  void SetOutputContainer(TList * oc) {fOutputContainer = oc ;}  
-
-  void InitParameters();
-
-  Int_t GetCorrelationType() const {  return fCorrelationType ; }
-  void SetCorrelationType(Int_t ana ){  fCorrelationType = ana ; }
-
-  void Print(const Option_t * opt) const;
-  Bool_t     AreJetsOnlyInCTS() const {return fJetsOnlyInCTS ; } 
-  void SetJetsOnlyInCTS(Bool_t opt){fJetsOnlyInCTS = opt; }
-
-  virtual TList * GetCreateOutputObjects() {return fOutputContainer ;}
-  virtual void MakeGammaCorrelation(TParticle * ,  TClonesArray *, TClonesArray *)  {;}
-
-  //Gamma hadron correlations methods: kHadron
-  Float_t    GetMinPtHadron() const {return fMinPtHadron ; }
-  void SetMinPtHadron(Float_t pt){fMinPtHadron = pt; };
-  
-  Double_t GetDeltaPhiMaxCut() const {return fDeltaPhiMaxCut ; }
-  Double_t GetDeltaPhiMinCut() const {return fDeltaPhiMinCut ; }
-  void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
-  {fDeltaPhiMaxCut =phimax;  fDeltaPhiMinCut =phimin;}
-
-  Double_t GetRatioMaxCut() const {return fRatioMaxCut ; }
-  Double_t GetRatioMinCut() const {return fRatioMinCut ; }
-  void SetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
-  {fRatioMaxCut = ratiomax;  fRatioMinCut = ratiomin;}
-  
-  private:
-  
-  TList * fOutputContainer; //Histograms container
-  AliNeutralMesonSelection *  fNeutralMesonSelection ; //! Pointer to pair selection for pi0 identification.
-
-  Int_t  fCorrelationType; //Type of correlation analysis
-  Bool_t   fJetsOnlyInCTS ;    // Jets measured only in TPC+ITS.
-  
-  private:
-  //Gamma hadron correlations data members kGammaHadron
-  Double_t   fMinPtHadron;       // Minimum pt of hadron (kHadron)
-  Double_t   fDeltaPhiMaxCut ;      // Minimum Delta Phi Gamma-Hadron/jet in leading cone
-  Double_t   fDeltaPhiMinCut ;      //  Maximum Delta Phi Gamma-Hadron/ jet in leading cone
-  Double_t   fRatioMaxCut ;    // Leading particle/gamma Ratio cut maximum (kLeadJetCone)
-  Double_t   fRatioMinCut ;    // Leading particle/gamma Ratio cut minimum (kLeadJetCone)
-  
-  ClassDef(AliAnaGammaCorrelation,1)
-} ;
-
-#endif //ALIANAGAMMACORRELATION_H
-
-
-
diff --git a/PWG4/AliAnaGammaHadron.cxx b/PWG4/AliAnaGammaHadron.cxx
deleted file mode 100644 (file)
index 8dd2dc7..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.7  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- * Revision 1.5  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.4.4.2  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for the analysis of gamma - hadron correlations
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-#include "Riostream.h"
-
-//---- AliRoot system ----
-#include "AliLog.h"
-#include "AliNeutralMesonSelection.h" 
-#include "AliAnaGammaHadron.h" 
-
-ClassImp(AliAnaGammaHadron)
-
-
-//____________________________________________________________________________
-  AliAnaGammaHadron::AliAnaGammaHadron() : 
-    AliAnaGammaCorrelation(),
-    fhPhiCharged(0), fhPhiNeutral(0), fhEtaCharged(0), fhEtaNeutral(0), 
-    fhDeltaPhiGammaCharged(0),  fhDeltaPhiGammaNeutral(0), 
-    fhDeltaEtaGammaCharged(0), fhDeltaEtaGammaNeutral(0),
-    fhDeltaPhiChargedPt(0),  
-    fhCorrelationGammaNeutral(0), fhCorrelationGammaCharged(0)
-{
-  //Default Ctor
-  
-  SetCorrelationType(kHadron);
-  //Initialize parameters
-  InitParameters();
-}
-
-//____________________________________________________________________________
-AliAnaGammaHadron::AliAnaGammaHadron(const AliAnaGammaHadron & g) :   
-  AliAnaGammaCorrelation(g),
-  fhPhiCharged(g.fhPhiCharged), fhPhiNeutral(g.fhPhiNeutral), 
-  fhEtaCharged(g.fhEtaCharged), fhEtaNeutral(g.fhEtaNeutral), 
-  fhDeltaPhiGammaCharged(g.fhDeltaPhiGammaCharged),  
-  fhDeltaPhiGammaNeutral(g.fhDeltaPhiGammaNeutral), 
-  fhDeltaEtaGammaCharged(g.fhDeltaEtaGammaCharged), 
-  fhDeltaEtaGammaNeutral(g.fhDeltaEtaGammaNeutral), 
-  fhDeltaPhiChargedPt(g.fhDeltaPhiChargedPt), 
-  fhCorrelationGammaNeutral(g.fhCorrelationGammaNeutral), 
-  fhCorrelationGammaCharged(g.fhCorrelationGammaCharged)
-{
-  // cpy ctor
-
-}
-
-//_________________________________________________________________________
-AliAnaGammaHadron & AliAnaGammaHadron::operator = (const AliAnaGammaHadron & source)
-{
-  // assignment operator
-
-  if(this == &source)return *this;
-  ((AliAnaGammaCorrelation *)this)->operator=(source);
-  
-  fhPhiCharged = source.fhPhiCharged ; fhPhiNeutral = source.fhPhiNeutral ; 
-  fhEtaCharged = source.fhEtaCharged ; fhEtaNeutral = source.fhEtaNeutral ; 
-  fhDeltaPhiGammaCharged = source.fhDeltaPhiGammaCharged ;  
-  fhDeltaPhiGammaNeutral = source.fhDeltaPhiGammaNeutral ; 
-  fhDeltaEtaGammaCharged = source.fhDeltaEtaGammaCharged ; 
-  fhDeltaEtaGammaNeutral = source.fhDeltaEtaGammaNeutral ; 
-  fhDeltaPhiChargedPt = source.fhDeltaPhiChargedPt ;
-
-  fhCorrelationGammaNeutral = source.fhCorrelationGammaNeutral ; 
-  fhCorrelationGammaCharged = source.fhCorrelationGammaCharged ; 
-
-  return *this;
-
-}
-
-//____________________________________________________________________________
-AliAnaGammaHadron::~AliAnaGammaHadron() 
-{
-  // Remove all pointers except analysis output pointers.
-}
-
-
-//________________________________________________________________________
-TList *  AliAnaGammaHadron::GetCreateOutputObjects()
-{  
-
-  // Create histograms to be saved in output file and 
-  // store them in fOutputContainer
-  TList * outputContainer = new TList() ; 
-  outputContainer->SetName("GammaCorrelationHistos") ; 
-  
-  fhPhiCharged  = new TH2F
-    ("PhiCharged","#phi_{#pi^{#pm}}  vs p_{T #gamma}",
-     120,0,120,120,0,7); 
-  fhPhiCharged->SetYTitle("#phi_{#pi^{#pm}} (rad)");
-  fhPhiCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  fhEtaCharged  = new TH2F
-    ("EtaCharged","#eta_{#pi^{#pm}}  vs p_{T #gamma}",
-     120,0,120,120,-1,1); 
-  fhEtaCharged->SetYTitle("#eta_{#pi^{#pm}} (rad)");
-  fhEtaCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  fhDeltaPhiGammaCharged  = new TH2F
-    ("DeltaPhiGammaCharged","#phi_{#gamma} - #phi_{charged #pi} vs p_{T #gamma}",
-     200,0,120,200,0,6.4); 
-  fhDeltaPhiGammaCharged->SetYTitle("#Delta #phi");
-  fhDeltaPhiGammaCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-
-  fhDeltaPhiChargedPt  = new TH2F
-    ("DeltaPhiChargedPt","#phi_{#gamma} - #phi_{charged #pi} vs p_{T #pi}",
-     200,0,120,200,0,6.4);
-  fhDeltaPhiChargedPt->SetYTitle("#Delta #phi");
-  fhDeltaPhiChargedPt->SetXTitle("p_{T #pi} (GeV/c)");
-
-  fhDeltaEtaGammaCharged  = new TH2F
-    ("DeltaEtaGammaCharged","#eta_{#gamma} - #eta_{#pi^{#pm}} vs p_{T #gamma}",
-     200,0,120,200,-2,2); 
-  fhDeltaEtaGammaCharged->SetYTitle("#Delta #eta");
-  fhDeltaEtaGammaCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-
-  fhCorrelationGammaCharged  = 
-    new TH2F("CorrelationGammaCharged","z_{#gamma #pi} = p_{T #pi^{#pm}} / p_{T #gamma}",
-            240,0.,120.,1000,0.,1.2); 
-  fhCorrelationGammaCharged->SetYTitle("z_{#gamma #pi}");
-  fhCorrelationGammaCharged->SetXTitle("p_{T #gamma}");
-  
-  outputContainer->Add(fhPhiCharged) ;
-  outputContainer->Add(fhEtaCharged) ;
-  outputContainer->Add(fhDeltaPhiGammaCharged) ; 
-  outputContainer->Add(fhDeltaEtaGammaCharged) ;
-  outputContainer->Add(fhCorrelationGammaCharged) ;
-  outputContainer->Add(fhDeltaPhiChargedPt) ;
-
-  if(!AreJetsOnlyInCTS()){
-    //---- kHadron and kJetLeadCone ----
-    fhPhiNeutral  = new TH2F
-      ("PhiNeutral","#phi_{#pi^{0}}  vs p_{T #gamma}",
-       120,0,120,120,0,7); 
-    fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
-    fhPhiNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhEtaNeutral  = new TH2F
-      ("EtaNeutral","#eta_{#pi^{0}}  vs p_{T #gamma}",
-       120,0,120,120,-1,1); 
-    fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
-    fhEtaNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhDeltaPhiGammaNeutral  = new TH2F
-      ("DeltaPhiGammaNeutral","#phi_{#gamma} - #phi_{#pi^{0}} vs p_{T #gamma}",
-       200,0,120,200,0,6.4); 
-    fhDeltaPhiGammaNeutral->SetYTitle("#Delta #phi");
-    fhDeltaPhiGammaNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhDeltaEtaGammaNeutral  = new TH2F
-      ("DeltaEtaGammaNeutral","#eta_{#gamma} - #eta_{#pi^{#pm}} vs p_{T #gamma}",
-       200,0,120,200,-2,2); 
-    fhDeltaEtaGammaNeutral->SetYTitle("#Delta #eta");
-    fhDeltaEtaGammaNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhCorrelationGammaNeutral  = 
-      new TH2F("CorrelationGammaNeutral","z_{#gamma #pi} = p_{T #pi^{0}} / p_{T #gamma}",
-              240,0.,120.,1000,0.,1.2); 
-    fhCorrelationGammaNeutral->SetYTitle("z_{#gamma #pi}");
-    fhCorrelationGammaNeutral->SetXTitle("p_{T #gamma}");
-
-    outputContainer->Add(fhPhiNeutral) ;  
-    outputContainer->Add(fhEtaNeutral) ;   
-    outputContainer->Add(fhDeltaPhiGammaNeutral) ; 
-    outputContainer->Add(fhDeltaEtaGammaNeutral) ; 
-    outputContainer->Add(fhCorrelationGammaNeutral) ;
-  }
-
-  SetOutputContainer(outputContainer);
-  
-  return outputContainer;
-}
-
- //____________________________________________________________________________
-void AliAnaGammaHadron::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-
-  SetMinPtHadron(2.)   ;
-  SetDeltaPhiCutRange(1.5,4.5);
-  SetJetsOnlyInCTS(kFALSE) ;
-
-}
-
-//__________________________________________________________________
-void AliAnaGammaHadron::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-  Info("Print", "%s %s", GetName(), GetTitle() ) ;
-  printf("Correlation analysis           =     %d\n", kHadron) ;
-  printf("pT Hadron       >    %f\n", GetMinPtHadron()) ; 
-  printf("Phi gamma-Hadron      <     %f\n", GetDeltaPhiMaxCut()) ; 
-  printf("Phi gamma-Hadron      >     %f\n", GetDeltaPhiMinCut()) ;
-  
-
-} 
-
-//____________________________________________________________________________
-void  AliAnaGammaHadron::MakeGammaCorrelation(TParticle * pGamma, TClonesArray * plCTS, TClonesArray * plCalo)  
-{  
-  //Gamma Hadron Correlation Analysis
-  AliDebug(2, "Make gamma-hadron correlation");
-
-  MakeGammaChargedCorrelation(pGamma, plCTS);  
-  if(!AreJetsOnlyInCTS())
-  MakeGammaNeutralCorrelation(pGamma, plCalo);
-    
-
-}
-
-//____________________________________________________________________________
-void  AliAnaGammaHadron::MakeGammaChargedCorrelation(TParticle * pGamma, TClonesArray * pl)
-{  
-  //Gamma Charged Hadron Correlation Analysis
-  AliDebug(2,"Make gamma-charged hadron correlation");
-
-  Double_t ptg  = pGamma->Pt();
-  Double_t phig = pGamma->Phi();
-  Double_t pt    = -100.;
-  Double_t rat   = -100.; 
-  Double_t phi   = -100. ;
-
-  for(Int_t ipr = 0;ipr < pl->GetEntries() ; ipr ++ ){
-    
-    TParticle * particle = dynamic_cast<TParticle *>(pl->At(ipr)) ;
-
-    pt    = particle->Pt();
-    rat   = pt/ptg ;
-    phi   = particle->Phi() ;
-    
-    AliDebug(3,Form("pt %f, phi %f, phi gamma %f. Cuts:  delta phi min %f,  max%f, pT min %f",pt,phi,phig,GetDeltaPhiMinCut(),GetDeltaPhiMaxCut(),GetMinPtHadron()));
-    
-    fhEtaCharged->Fill(ptg,particle->Eta());
-    fhPhiCharged->Fill(ptg,phi);
-    fhDeltaEtaGammaCharged->Fill(ptg,pGamma->Eta()-particle->Eta());
-    fhDeltaPhiGammaCharged->Fill(ptg,phig-phi);
-    fhDeltaPhiChargedPt->Fill(pt,phig-phi);
-
-    //Selection within angular and energy limits
-    if(((phig-phi)> GetDeltaPhiMinCut()) && ((phig-phi)<GetDeltaPhiMaxCut()) && pt > GetMinPtHadron()){
-      AliDebug(2,Form("Selected: pt %f, phi %f",pt,phi));
-      fhCorrelationGammaCharged->Fill(ptg,rat);
-    } 
-  }//particle loop
-}
-
-//____________________________________________________________________________
-void  AliAnaGammaHadron::MakeGammaNeutralCorrelation(TParticle * pGamma, TClonesArray * pl)  
-{  
-  //Gamma Neutral Hadron Correlation Analysis
-  AliDebug(2,"Make gamma-neutral hadron correlation");
-
-  Double_t pt = -100.;
-  Double_t rat = -100.; 
-  Double_t phi = -100. ;
-  Double_t ptg  = pGamma->Pt();
-  Double_t phig = pGamma->Phi();
-  
-  TIter next(pl);
-  TParticle * particlei = 0;
-  TParticle * particlej = 0;
-  TLorentzVector gammai;
-  TLorentzVector gammaj;
-
-  Int_t iPrimary = -1;
-  Int_t ksPdg = 0;
-  Int_t jPrimary=-1;
-  
-  while ( (particlei = (TParticle*)next()) ) {
-    iPrimary++;          
-    ksPdg = particlei->GetPdgCode();
-    AliDebug(2, Form("neutral particles opposite to gamma: pt %f, pdg %d", particlei->Pt(),ksPdg));
-    //2 gamma overlapped, found with PID
-    if(ksPdg == 111){ 
-      pt  = particlei->Pt();
-      rat = pt/ptg ;
-      phi = particlei->Phi() ;
-      fhEtaNeutral->Fill(ptg,particlei->Eta());
-      fhPhiNeutral->Fill(ptg,phi);
-      fhDeltaEtaGammaNeutral->Fill(ptg,pGamma->Eta()-particlei->Eta());
-      fhDeltaPhiGammaNeutral->Fill(ptg,phig-phi);
-      
-      //Selection within angular and energy limits
-      if( (phig-phi)>GetDeltaPhiMinCut() && (phig-phi)<GetDeltaPhiMaxCut() && pt > GetMinPtHadron()){
-       fhCorrelationGammaNeutral ->Fill(ptg,rat);
-       AliDebug(2,Form("Selected pi0: pt %f, phi %f",pt,phi));
-      }// cuts
-    }// pdg = 111
-
-    //Make invariant mass analysis
-    else if(ksPdg == 22){//  gamma i
-      
-      //Search the photon companion in case it comes from  a Pi0 decay
-      //Apply several cuts to select the good pair;
-      particlei->Momentum(gammai);
-       jPrimary=-1;
-      TIter next2(pl);
-      while ( (particlej = (TParticle*)next2()) ) {
-       jPrimary++;
-       if(jPrimary>iPrimary){
-         ksPdg = particlej->GetPdgCode();
-         particlej->Momentum(gammaj);
-         if(ksPdg == 22 ){
-
-           phi = (gammai+gammaj).Phi();
-           if(phi < 0)
-             phi+=TMath::TwoPi();
-           rat          = (gammai+gammaj).Pt()/ptg ;
-                   
-           //Fill histograms
-           fhEtaNeutral->Fill(ptg,(gammai+gammaj).Eta());
-           fhPhiNeutral->Fill(ptg,phi);
-           fhDeltaEtaGammaNeutral->Fill(ptg,pGamma->Eta()-(gammai+gammaj).Eta());
-           fhDeltaPhiGammaNeutral->Fill(ptg,phig-phi);
-
-           //Select good pair (good phit, pt cuts, aperture and invariant mass)
-           if(GetNeutralMesonSelection()->SelectPair(pGamma, gammai, gammaj)){
-             AliDebug(2,Form("Selected gamma pair: pt %f, phi %f",(gammai+gammaj).Pt(),phi));
-             //correlation histogram
-             fhCorrelationGammaNeutral ->Fill(ptg,rat);
-           }//pair selection
-         }//if pair of gammas
-       }//jPrimary>iPrimary
-      }//while
-    }// if pdg = 22
-  }//while
-  
-}
diff --git a/PWG4/AliAnaGammaHadron.h b/PWG4/AliAnaGammaHadron.h
deleted file mode 100644 (file)
index b81d6f3..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef ALIANAGAMMAHADRON_H
-#define ALIANAGAMMAHADRON_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.4  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.3.4.2  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class that contains the algorithm for the analysis of gamma - hadron correlations
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-#include "AliAnaGammaCorrelation.h"
-
-class AliAnaGammaHadron : public AliAnaGammaCorrelation {
-
-public: 
-  
-  AliAnaGammaHadron() ; // default ctor
-  AliAnaGammaHadron(const AliAnaGammaHadron & g) ; // cpy ctor
-  AliAnaGammaHadron & operator = (const AliAnaGammaHadron & g) ;//cpy assignment
-  virtual ~AliAnaGammaHadron() ; //virtual dtor
-
-  TList * GetCreateOutputObjects();
-
-  void InitParameters();
-
-  void Print(const Option_t * opt) const;
-  void MakeGammaCorrelation(TParticle *pGamma, TClonesArray * plCTS,   TClonesArray * plNe) ;
-  void MakeGammaChargedCorrelation(TParticle *pGamma, TClonesArray * pl) ;
-  void MakeGammaNeutralCorrelation(TParticle *pGamma, TClonesArray * pl)  ;
-
-  private:
-  
-  //Histograms
-  TH2F * fhPhiCharged  ; //Phi distribution of charged particles
-  TH2F * fhPhiNeutral   ;  //Phi distribution of neutral particles
-  TH2F * fhEtaCharged  ; //Eta distribution of charged particles
-  TH2F * fhEtaNeutral   ; //Eta distribution of neutral particles
-  TH2F * fhDeltaPhiGammaCharged  ;  //Difference of charged particle phi and prompt gamma phi as function of gamma pT
-  TH2F * fhDeltaPhiGammaNeutral   ;  //Difference of neutral particle phi and prompt gamma phi as function of gamma pT
-  TH2F * fhDeltaEtaGammaCharged  ;  //Difference of charged particle eta and prompt gamma eta as function of gamma pT
-  TH2F * fhDeltaEtaGammaNeutral  ;  //Difference of neutral particle eta and prompt gamma eta as function of gamma pT
-  TH2F * fhDeltaPhiChargedPt  ;  //Difference of charged particle eta and prompt gamma eta as function of charged pT
-
-  TH2F * fhCorrelationGammaNeutral  ; //Neutral hadron correlation histogram 
-  TH2F * fhCorrelationGammaCharged  ; //Charged hadron correlation histogram
-  
-  ClassDef(AliAnaGammaHadron,1)
-} ;
-
-#endif //ALIANAGAMMAHADRON_H
-
-
-
diff --git a/PWG4/AliAnaGammaJetFinder.cxx b/PWG4/AliAnaGammaJetFinder.cxx
deleted file mode 100644 (file)
index c426399..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.3  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for the analysis of gamma-jet (standard jet finder) correlations
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-#include "Riostream.h"
-
-//---- AliRoot system ----
-#include "AliAnaGammaJetFinder.h" 
-#include "AliLog.h"
-  
-  ClassImp(AliAnaGammaJetFinder)
-  
-
-//____________________________________________________________________________
-  AliAnaGammaJetFinder::AliAnaGammaJetFinder() : 
-    AliAnaGammaCorrelation(),   
-    fhDeltaEtaJet(0), fhDeltaPhiJet(0), 
-    fhDeltaPtJet(0), fhPtRatJet(0)
-{
-  //Default Ctor
-
-  SetCorrelationType(kJetFinder);
-  //Initialize parameters
-  InitParameters();
-}
-
-//____________________________________________________________________________
-AliAnaGammaJetFinder::AliAnaGammaJetFinder(const AliAnaGammaJetFinder & g) :   
-  AliAnaGammaCorrelation(g),   
-  fhDeltaEtaJet(g.fhDeltaEtaJet), fhDeltaPhiJet(g.fhDeltaPhiJet), 
-  fhDeltaPtJet(g.fhDeltaPtJet), fhPtRatJet(g.fhPtRatJet)
-{
-  // cpy ctor
-
-}
-
-//_________________________________________________________________________
-AliAnaGammaJetFinder & AliAnaGammaJetFinder::operator = (const AliAnaGammaJetFinder & source)
-{
-  // assignment operator
-
-  if(this == &source)return *this;
-  ((AliAnaGammaCorrelation *)this)->operator=(source);
-  fhDeltaEtaJet = source.fhDeltaEtaJet;
-  fhDeltaPhiJet = source.fhDeltaPhiJet;
-  fhDeltaPtJet = source.fhDeltaPtJet;
-  fhPtRatJet = source.fhPtRatJet;
-  
-  return *this;
-
-}
-
-//____________________________________________________________________________
-AliAnaGammaJetFinder::~AliAnaGammaJetFinder() 
-{
-   // Remove all pointers except analysis output pointers.
-}
-
-
-//________________________________________________________________________
-TList *  AliAnaGammaJetFinder::GetCreateOutputObjects()
-{  
-  // Create histograms to be saved in output file and 
-  // store them in fOutputContainer
-
-  AliDebug(1,"Init jet histograms");
-
-  TList * outputContainer = new TList() ; 
-  outputContainer->SetName("GammaJetHistos") ; 
-
-  //---kJet---
-  fhDeltaPhiJet  = new TH2F
-    ("DeltaPhiJet","#phi_{#gamma} - #phi_{jet} vs p_{T #gamma}",
-     200,0,120,200,0,6.4); 
-  fhDeltaPhiJet->SetYTitle("#Delta #phi");
-  fhDeltaPhiJet->SetXTitle("p_{T #gamma} (GeV/c)");
-  outputContainer->Add(fhDeltaPhiJet);
-
-  fhDeltaEtaJet  = new TH2F
-    ("DeltaEtaJet","#eta_{#gamma} - #eta_{jet} vs p_{T #gamma}",
-     200,0,120,200,-2,2); 
-  fhDeltaEtaJet->SetYTitle("#Delta #eta");
-  fhDeltaEtaJet->SetXTitle("p_{T #gamma} (GeV/c)");
-  outputContainer->Add(fhDeltaEtaJet);
-
-  fhDeltaPtJet  = new TH2F
-    ("DeltaPtJet","#p_{T #gamma} - #p_{T jet} vs p_{T #gamma}",
-     200,0,120,100,-10,10); 
-  fhDeltaPtJet->SetYTitle("#Delta #p_{T}");
-  fhDeltaPtJet->SetXTitle("p_{T #gamma} (GeV/c)"); 
-  outputContainer->Add(fhDeltaPtJet);
-
-  fhPtRatJet  = new TH2F
-    ("PtRatJet","#p_{T jet} / #p_{T #gamma} vs p_{T #gamma}",
-     200,0,120,200,0,5); 
-  fhPtRatJet->SetYTitle("ratio");
-  fhPtRatJet->SetXTitle("p_{T #gamma} (GeV/c)");
-  outputContainer->Add(fhPtRatJet);
-
-  SetOutputContainer(outputContainer);
-
-  return outputContainer;
-}
-
- //____________________________________________________________________________
-void AliAnaGammaJetFinder::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-
-  ;
-
-}
-
-//__________________________________________________________________
-void AliAnaGammaJetFinder::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-} 
-
-//__________________________________________________________________
-void  AliAnaGammaJetFinder::MakeGammaCorrelation(TParticle * pGamma, TClonesArray *pl, TClonesArray *) 
-{
-  //Gamma -Jet  Correlation Analysis
-  AliDebug(2, "Begin jet analysis");
-  cout<<pGamma<<" "<<pl<<endl;
-  AliInfo("Not implemented");  
-} 
diff --git a/PWG4/AliAnaGammaJetFinder.h b/PWG4/AliAnaGammaJetFinder.h
deleted file mode 100644 (file)
index def8b49..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef ALIANAGAMMAJETFINDER_H
-#define ALIANAGAMMAJETFINDER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class that contains the algorithm for the analysis of gamma-jet (standard finder) correlation 
-//-- Author: Gustavo Conesa (INFN-LNF)
-
-#include "AliAnaGammaCorrelation.h"
-     
-class AliAnaGammaJetFinder : public AliAnaGammaCorrelation {
-       
-  public: 
-       
-       AliAnaGammaJetFinder() ; // default ctor
-       AliAnaGammaJetFinder(const AliAnaGammaJetFinder & g) ; // cpy ctor
-       AliAnaGammaJetFinder & operator = (const AliAnaGammaJetFinder & g) ;//cpy assignment
-       virtual ~AliAnaGammaJetFinder() ; //virtual dtor
-              
-       TList * GetCreateOutputObjects();
-       
-       void InitParameters();
-       
-       void Print(const Option_t * opt) const;
-       
-       void MakeGammaCorrelation( TParticle * pGamma, TClonesArray *pl, TClonesArray *)  ;
-       
-  private:
-       
-       TH2F * fhDeltaEtaJet; // Difference of jet eta and prompt gamma eta as function of gamma pT
-       TH2F * fhDeltaPhiJet;  // Difference of jet phi and prompt gamma phi as function of gamma pT
-       TH2F * fhDeltaPtJet; // Difference of jet pT and prompt gamma pT as function of gamma pT
-       TH2F * fhPtRatJet; // Ratio of jet pT and prompt gamma pT as function of gamma pT
-       
-       ClassDef(AliAnaGammaJetFinder,1)
- } ;
-
-
-#endif //ALIANAGAMMAJETFINDER_H
-
-
-
diff --git a/PWG4/AliAnaGammaJetLeadCone.cxx b/PWG4/AliAnaGammaJetLeadCone.cxx
deleted file mode 100644 (file)
index be3f98a..0000000
+++ /dev/null
@@ -1,1202 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.3  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for the analysis of gamma-jet correlations:
-// 1)Take the prompt photon found with AliAnaGammaDirect,
-// 2) Search for the highest pt leading particle opposite to the photon within a phi, pt window
-// 3) Take all particles around leading in a cone R with pt larger than threshold and construct the jet
-//
-//  Class created from old AliPHOSGammaJet 
-//  (see AliRoot versions previous Release 4-09)
-//
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-
-//---- AliRoot system ----
-#include "AliNeutralMesonSelection.h"
-#include "AliAnaGammaJetLeadCone.h"  
-#include "AliLog.h"
-
-ClassImp(AliAnaGammaJetLeadCone)
-
-
-//____________________________________________________________________________
-  AliAnaGammaJetLeadCone::AliAnaGammaJetLeadCone() : 
-    AliAnaGammaCorrelation(),  fPbPb(kFALSE),     
-    fSeveralConeAndPtCuts(0),  
-    fEtaEMCALCut(0.),
-    fJetCTSRatioMaxCut(0.), fJetCTSRatioMinCut(0.), fJetRatioMaxCut(0.),
-    fJetRatioMinCut(0.), 
-    fJetNCone(0),fJetNPt(0), fJetCone(0), 
-    fJetPtThreshold(0),fJetPtThresPbPb(0),
-    fPtJetSelectionCut(0.0), fSelect(0),
-    fhPhiCharged(0), fhPhiNeutral(0), fhEtaCharged(0), fhEtaNeutral(0), 
-    fhDeltaPhiGammaCharged(0),  fhDeltaPhiGammaNeutral(0), 
-    fhDeltaEtaGammaCharged(0), fhDeltaEtaGammaNeutral(0), 
-    fhAnglePairLeading(), fhInvMassPairLeading(), 
-    fhChargedRatio(0), fhNeutralRatio (0), 
-    fhNBkg (0), fhNLeading(0), fhNJet(0), fhJetRatio(0), fhJetPt (0), 
-    fhBkgRatio (0), fhBkgPt(0),  fhJetFragment(0), fhBkgFragment(0), 
-    fhJetPtDist(0),  fhBkgPtDist(0) 
-{
-  //Default Ctor
-
-  //Initialize parameters
-
-  SetCorrelationType(kJetLeadCone);
-
-  for(Int_t i = 0; i<10; i++){
-    fJetCones[i]         = 0.0 ;
-    fJetNameCones[i]     = ""  ;
-    fJetPtThres[i]      = 0.0 ;
-    fJetNamePtThres[i]  = ""  ;
-    if( i < 6 ){
-      fJetXMin1[i]     = 0.0 ;
-      fJetXMin2[i]     = 0.0 ;
-      fJetXMax1[i]     = 0.0 ;
-      fJetXMax2[i]     = 0.0 ;
-      fBkgMean[i]      = 0.0 ;
-      fBkgRMS[i]       = 0.0 ;
-      if( i < 2 ){
-       fJetE1[i]        = 0.0 ;
-       fJetE2[i]        = 0.0 ;
-       fJetSigma1[i]    = 0.0 ;
-       fJetSigma2[i]    = 0.0 ;
-       fPhiEMCALCut[i]  = 0.0 ;
-      }
-    }
-  }
-
-  InitParameters();
-}
-
-//____________________________________________________________________________
-AliAnaGammaJetLeadCone::AliAnaGammaJetLeadCone(const AliAnaGammaJetLeadCone & g) :   
-  AliAnaGammaCorrelation(g), fPbPb(g.fPbPb), 
-  fSeveralConeAndPtCuts(g.fSeveralConeAndPtCuts), 
-  fEtaEMCALCut(g.fEtaEMCALCut),
-  fJetCTSRatioMaxCut(g.fJetCTSRatioMaxCut),
-  fJetCTSRatioMinCut(g.fJetCTSRatioMinCut), fJetRatioMaxCut(g.fJetRatioMaxCut),
-  fJetRatioMinCut(g.fJetRatioMinCut),  fJetNCone(g.fJetNCone),
-  fJetNPt(g.fJetNPt), fJetCone(g.fJetCone),
-  fJetPtThreshold(g.fJetPtThreshold),fJetPtThresPbPb(g.fJetPtThresPbPb),
-  fPtJetSelectionCut(g.fPtJetSelectionCut), fSelect(g.fSelect),  
-  fhPhiCharged(g.fhPhiCharged), fhPhiNeutral(g.fhPhiNeutral), 
-  fhEtaCharged(g.fhEtaCharged), fhEtaNeutral(g.fhEtaNeutral), 
-  fhDeltaPhiGammaCharged(g.fhDeltaPhiGammaCharged),  
-  fhDeltaPhiGammaNeutral(g.fhDeltaPhiGammaNeutral), 
-  fhDeltaEtaGammaCharged(g.fhDeltaEtaGammaCharged), 
-  fhDeltaEtaGammaNeutral(g.fhDeltaEtaGammaNeutral), 
-  fhAnglePairLeading(g.fhAnglePairLeading), fhInvMassPairLeading(g.fhInvMassPairLeading), 
-  fhChargedRatio(g.fhChargedRatio), fhNeutralRatio(g.fhNeutralRatio), 
-  fhNBkg(g. fhNBkg), fhNLeading(g. fhNLeading), fhNJet(g.fhNJet), fhJetRatio(g.fhJetRatio), fhJetPt(g.fhJetPt), 
-  fhBkgRatio (g.fhBkgRatio), fhBkgPt(g.fhBkgPt),  fhJetFragment(g.fhJetFragment), fhBkgFragment(g.fhBkgFragment), 
-  fhJetPtDist(g.fhJetPtDist),  fhBkgPtDist(g.fhBkgPtDist)   
-{
-  // cpy ctor
-
-  for(Int_t i = 0; i<10; i++){
-    fJetCones[i]        = g.fJetCones[i] ;
-    fJetNameCones[i]    = g.fJetNameCones[i] ;
-    fJetPtThres[i]      = g.fJetPtThres[i] ;
-    fJetNamePtThres[i]  = g.fJetNamePtThres[i] ;
-    if( i < 6 ){
-      fJetXMin1[i]       = g.fJetXMin1[i] ;
-      fJetXMin2[i]       = g.fJetXMin2[i] ;
-      fJetXMax1[i]       = g.fJetXMax1[i] ;
-      fJetXMax2[i]       = g.fJetXMax2[i] ;
-      fBkgMean[i]        = g.fBkgMean[i] ;
-      fBkgRMS[i]         = g.fBkgRMS[i] ;
-      if( i < 2 ){
-       fJetE1[i]        = g.fJetE1[i] ;
-       fJetE2[i]        = g.fJetE2[i] ;
-       fJetSigma1[i]    = g.fJetSigma1[i] ;
-       fJetSigma2[i]    = g.fJetSigma2[i] ;
-       fPhiEMCALCut[i]  = g.fPhiEMCALCut[i] ;
-      }
-    }          
-  } 
-
-  
-}
-
-//_________________________________________________________________________
-AliAnaGammaJetLeadCone & AliAnaGammaJetLeadCone::operator = (const AliAnaGammaJetLeadCone & source)
-{
-  // assignment operator
-
-  if(this == &source)return *this;
-  ((AliAnaGammaCorrelation *)this)->operator=(source);
-
-  fSeveralConeAndPtCuts = source.fSeveralConeAndPtCuts ; 
-  fPbPb = source.fPbPb ;
-  fEtaEMCALCut = source.fEtaEMCALCut ;
-  fJetCTSRatioMaxCut = source.fJetCTSRatioMaxCut ;
-  fJetCTSRatioMinCut = source.fJetCTSRatioMinCut ; fJetRatioMaxCut = source.fJetRatioMaxCut ;
-  fJetRatioMinCut = source.fJetRatioMinCut ;  fJetNCone = source.fJetNCone ;
-  fJetNPt = source.fJetNPt ; fJetCone = source.fJetCone ; 
-  fJetPtThreshold = source.fJetPtThreshold ;
-  fJetPtThresPbPb = source.fJetPtThresPbPb ;
-  fPtJetSelectionCut = source.fPtJetSelectionCut ;
-  fSelect = source.fSelect ;  fhChargedRatio = source.fhChargedRatio ; fhNeutralRatio = source.fhNeutralRatio ; 
-
-  fhPhiCharged = source.fhPhiCharged ; fhPhiNeutral = source.fhPhiNeutral ; 
-  fhEtaCharged = source.fhEtaCharged ; fhEtaNeutral = source.fhEtaNeutral ; 
-  fhDeltaPhiGammaCharged = source.fhDeltaPhiGammaCharged ;  
-  fhDeltaPhiGammaNeutral = source.fhDeltaPhiGammaNeutral ; 
-  fhDeltaEtaGammaCharged = source.fhDeltaEtaGammaCharged ; 
-  fhDeltaEtaGammaNeutral = source.fhDeltaEtaGammaNeutral ; 
-  
-  fhAnglePairLeading = source.fhAnglePairLeading ; 
-  fhInvMassPairLeading = source.fhInvMassPairLeading ; 
-  fhNBkg = source. fhNBkg ; fhNLeading = source. fhNLeading ; 
-  fhNJet = source.fhNJet ; fhJetRatio = source.fhJetRatio ; fhJetPt = source.fhJetPt ; 
-  fhBkgRatio  = source.fhBkgRatio ; fhBkgPt = source.fhBkgPt ;  
-  fhJetFragment = source.fhJetFragment ; fhBkgFragment = source.fhBkgFragment ; 
-  fhJetPtDist = source.fhJetPtDist ;  fhBkgPtDist = source.fhBkgPtDist ;
-
-
-  for(Int_t i = 0; i<10; i++){
-    fJetCones[i]        = source.fJetCones[i] ;
-    fJetNameCones[i]    = source.fJetNameCones[i] ;
-    fJetPtThres[i]      = source.fJetPtThres[i] ;
-    fJetNamePtThres[i]  = source.fJetNamePtThres[i] ;
-    if( i < 6 ){
-      fJetXMin1[i]       = source.fJetXMin1[i] ;
-      fJetXMin2[i]       = source.fJetXMin2[i] ;
-      fJetXMax1[i]       = source.fJetXMax1[i] ;
-      fJetXMax2[i]       = source.fJetXMax2[i] ;
-      fBkgMean[i]        = source.fBkgMean[i] ;
-      fBkgRMS[i]         = source.fBkgRMS[i] ;
-      if( i < 2 ){
-       fJetE1[i]        = source.fJetE1[i] ;
-       fJetE2[i]        = source.fJetE2[i] ;
-       fJetSigma1[i]    = source.fJetSigma1[i] ;
-       fJetSigma2[i]    = source.fJetSigma2[i] ;
-       fPhiEMCALCut[i]  = source.fPhiEMCALCut[i] ;
-      }
-    }          
-  } 
-
-  return *this;
-
-}
-
-//____________________________________________________________________________
-AliAnaGammaJetLeadCone::~AliAnaGammaJetLeadCone() 
-{
-   // Remove all pointers except analysis output pointers.
-
-}
-
-
-
-//________________________________________________________________________
-TList *  AliAnaGammaJetLeadCone::GetCreateOutputObjects()
-{  
-  // Create histograms to be saved in output file and 
-  // store them in fOutputContainer
-  AliDebug(1,"Init jet in leading cone histograms");
-  
-  TList * outputContainer = new TList() ; 
-  outputContainer->SetName("GammaJetCorrelationHistos") ; 
-
-  fhChargedRatio  = new TH2F
-    ("ChargedRatio","p_{T leading charge} /p_{T #gamma} vs p_{T #gamma}",
-     120,0,120,120,0,1); 
-  fhChargedRatio->SetYTitle("p_{T lead charge} /p_{T #gamma}");
-  fhChargedRatio->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  fhPhiCharged  = new TH2F
-    ("PhiCharged","#phi_{#pi^{#pm}}  vs p_{T #gamma}",
-     120,0,120,120,0,7); 
-  fhPhiCharged->SetYTitle("#phi_{#pi^{#pm}} (rad)");
-  fhPhiCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  fhEtaCharged  = new TH2F
-    ("EtaCharged","#eta_{#pi^{#pm}}  vs p_{T #gamma}",
-     120,0,120,120,-1,1); 
-  fhEtaCharged->SetYTitle("#eta_{#pi^{#pm}} (rad)");
-  fhEtaCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  fhDeltaPhiGammaCharged  = new TH2F
-    ("DeltaPhiGammaCharged","#phi_{#gamma} - #phi_{charged #pi} vs p_{T #gamma}",
-     200,0,120,200,0,6.4); 
-  fhDeltaPhiGammaCharged->SetYTitle("#Delta #phi");
-  fhDeltaPhiGammaCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  fhDeltaEtaGammaCharged  = new TH2F
-    ("DeltaEtaGammaCharged","#eta_{#gamma} - #eta_{#pi^{#pm}} vs p_{T #gamma}",
-     200,0,120,200,-2,2); 
-  fhDeltaEtaGammaCharged->SetYTitle("#Delta #eta");
-  fhDeltaEtaGammaCharged->SetXTitle("p_{T #gamma} (GeV/c)");
-  
-  outputContainer->Add(fhPhiCharged) ;
-  outputContainer->Add(fhEtaCharged) ;
-  outputContainer->Add(fhChargedRatio) ;
-  outputContainer->Add(fhDeltaPhiGammaCharged) ; 
-  outputContainer->Add(fhDeltaEtaGammaCharged) ; 
-
-  if(!AreJetsOnlyInCTS()){
-    
-    fhNeutralRatio  = new TH2F
-      ("NeutralRatio","p_{T leading  #pi^{0}} /p_{T #gamma} vs p_{T #gamma}",
-       120,0,120,120,0,1); 
-    fhNeutralRatio->SetYTitle("p_{T lead  #pi^{0}} /p_{T #gamma}");
-    fhNeutralRatio->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    //
-    fhAnglePairLeading  = new TH2F
-      ("AnglePairLeading",
-       "Angle between all #gamma pair finally selected vs p_{T  #pi^{0}}",
-       200,0,50,200,0,0.2); 
-    fhAnglePairLeading->SetYTitle("Angle (rad)");
-    fhAnglePairLeading->SetXTitle("E_{ #pi^{0}} (GeV/c)");
-    
-    fhInvMassPairLeading  = new TH2F
-      ("InvMassPairLeading",
-       "Invariant Mass of #gamma pair selected vs p_{T #gamma}",
-       120,0,120,360,0,0.5); 
-    fhInvMassPairLeading->SetYTitle("Invariant Mass (GeV/c^{2})");
-    fhInvMassPairLeading->SetXTitle("p_{T #gamma} (GeV/c)");
-
-    fhPhiNeutral  = new TH2F
-      ("PhiNeutral","#phi_{#pi^{0}}  vs p_{T #gamma}",
-       120,0,120,120,0,7); 
-    fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)");
-    fhPhiNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhEtaNeutral  = new TH2F
-      ("EtaNeutral","#eta_{#pi^{0}}  vs p_{T #gamma}",
-       120,0,120,120,-1,1); 
-    fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)");
-    fhEtaNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhDeltaPhiGammaNeutral  = new TH2F
-      ("DeltaPhiGammaNeutral","#phi_{#gamma} - #phi_{#pi^{0}} vs p_{T #gamma}",
-       200,0,120,200,0,6.4); 
-    fhDeltaPhiGammaNeutral->SetYTitle("#Delta #phi");
-    fhDeltaPhiGammaNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-    
-    fhDeltaEtaGammaNeutral  = new TH2F
-      ("DeltaEtaGammaNeutral","#eta_{#gamma} - #eta_{#pi^{#pm}} vs p_{T #gamma}",
-       200,0,120,200,-2,2); 
-    fhDeltaEtaGammaNeutral->SetYTitle("#Delta #eta");
-    fhDeltaEtaGammaNeutral->SetXTitle("p_{T #gamma} (GeV/c)");
-
-    outputContainer->Add(fhPhiNeutral) ;  
-    outputContainer->Add(fhEtaNeutral) ;  
-    outputContainer->Add(fhNeutralRatio) ; 
-    outputContainer->Add(fhDeltaPhiGammaNeutral) ; 
-    outputContainer->Add(fhDeltaEtaGammaNeutral) ;
-    
-    outputContainer->Add(fhInvMassPairLeading) ; 
-    outputContainer->Add(fhAnglePairLeading) ; 
-  }
-  
-  if(!fSeveralConeAndPtCuts){// not several cones
-    
-    //Count
-    fhNBkg = new TH1F("NBkg","bkg multiplicity",9000,0,9000); 
-    fhNBkg->SetYTitle("counts");
-    fhNBkg->SetXTitle("N");
-    outputContainer->Add(fhNBkg) ; 
-    
-    fhNLeading  = new TH2F
-      ("NLeading","Accepted Jet Leading", 240,0,120,240,0,120); 
-    fhNLeading->SetYTitle("p_{T charge} (GeV/c)");
-    fhNLeading->SetXTitle("p_{T #gamma}(GeV/c)");
-    outputContainer->Add(fhNLeading) ; 
-    
-    fhNJet  = new TH1F("NJet","Accepted jets",240,0,120); 
-    fhNJet->SetYTitle("N");
-    fhNJet->SetXTitle("p_{T #gamma}(GeV/c)");
-    outputContainer->Add(fhNJet) ; 
-    
-    //Ratios and Pt dist of reconstructed (not selected) jets
-    //Jet
-    fhJetRatio  = new TH2F
-      ("JetRatio","p_{T jet lead}/p_{T #gamma} vs p_{T #gamma}",
-       240,0,120,200,0,10);
-    fhJetRatio->SetYTitle("p_{T jet lead #pi^{0}}/p_{T #gamma}");
-    fhJetRatio->SetXTitle("p_{T #gamma} (GeV/c)");
-    outputContainer->Add(fhJetRatio) ; 
-    
-    fhJetPt  = new TH2F
-      ("JetPt", "p_{T jet lead} vs p_{T #gamma}",240,0,120,400,0,200);
-    fhJetPt->SetYTitle("p_{T jet}");
-    fhJetPt->SetXTitle("p_{T #gamma} (GeV/c)");
-    outputContainer->Add(fhJetPt) ; 
-    
-    //Bkg
-    
-    fhBkgRatio  = new TH2F
-      ("BkgRatio","p_{T bkg lead}/p_{T #gamma} vs p_{T #gamma}",
-       240,0,120,200,0,10);
-    fhBkgRatio->SetYTitle("p_{T bkg lead charge}/p_{T #gamma}");
-    fhBkgRatio->SetXTitle("p_{T #gamma} (GeV/c)");
-    outputContainer->Add(fhBkgRatio) ;
-    
-    fhBkgPt  = new TH2F
-      ("BkgPt","p_{T jet lead} vs p_{T #gamma}",240,0,120,400,0,200);
-    fhBkgPt->SetYTitle("p_{T jet lead charge}/p_{T #gamma}");
-    fhBkgPt->SetXTitle("p_{T #gamma} (GeV/c)");
-    outputContainer->Add(fhBkgPt) ;
-    
-    //Jet Distributions
-    
-    fhJetFragment  = 
-      new TH2F("JetFragment","x = p_{T i charged}/p_{T #gamma}",
-              240,0.,120.,1000,0.,1.2); 
-    fhJetFragment->SetYTitle("x_{T}");
-    fhJetFragment->SetXTitle("p_{T #gamma}");
-    outputContainer->Add(fhJetFragment) ;
-    
-    fhBkgFragment  = new TH2F
-      ("BkgFragment","x = p_{T i charged}/p_{T #gamma}",
-       240,0.,120.,1000,0.,1.2);
-    fhBkgFragment->SetYTitle("x_{T}");
-    fhBkgFragment->SetXTitle("p_{T #gamma}");
-    outputContainer->Add(fhBkgFragment) ;
-    
-    fhJetPtDist  = 
-      new TH2F("JetPtDist","x = p_{T i charged}",240,0.,120.,400,0.,200.); 
-    fhJetPtDist->SetXTitle("p_{T #gamma} (GeV/c)");
-    outputContainer->Add(fhJetPtDist) ;
-    
-    fhBkgPtDist  = new TH2F
-      ("BkgPtDist","x = p_{T i charged}",240,0.,120.,400,0.,200.); 
-    fhBkgPtDist->SetXTitle("p_{T #gamma} (GeV/c)");
-    outputContainer->Add(fhBkgPtDist) ;
-    
-  }//not several cones
-  else{ //If we want to study the jet for different cones and pt
-    for(Int_t icone = 0; icone<fJetNCone; icone++){//icone
-      for(Int_t ipt = 0; ipt<fJetNPt;ipt++){ //ipt
-       
-       //Jet
-       
-       fhJetRatios[icone][ipt]  = new TH2F
-         ("JetRatioCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt], 
-          "p_{T jet lead #pi^{0}}/p_{T #gamma} vs p_{T #gamma}, cone ="
-          +fJetNameCones[icone]+", pt>" +fJetNamePtThres[ipt]+" GeV/c",
-          240,0,120,200,0,10);
-       fhJetRatios[icone][ipt]->
-         SetYTitle("p_{T jet lead #pi^{0}}/p_{T #gamma}");
-       fhJetRatios[icone][ipt]->SetXTitle("p_{T #gamma} (GeV/c)");
-       outputContainer->Add(fhJetRatios[icone][ipt]) ; 
-       
-       
-       fhJetPts[icone][ipt]  = new TH2F
-         ("JetPtCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt], 
-          "p_{T jet lead #pi^{0}}/p_{T #gamma} vs p_{T #gamma}, cone ="
-          +fJetNameCones[icone]+", pt>" +fJetNamePtThres[ipt]+" GeV/c",
-          240,0,120,400,0,200);
-       fhJetPts[icone][ipt]->
-         SetYTitle("p_{T jet lead #pi^{0}}/p_{T #gamma}");
-       fhJetPts[icone][ipt]->SetXTitle("p_{T #gamma} (GeV/c)");
-       outputContainer->Add(fhJetPts[icone][ipt]) ; 
-       
-       //Bkg
-       fhBkgRatios[icone][ipt]  = new TH2F
-         ("BkgRatioCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt], 
-          "p_{T bkg lead #pi^{0}}/p_{T #gamma} vs p_{T #gamma}, cone ="
-          +fJetNameCones[icone]+", pt>" +fJetNamePtThres[ipt]+" GeV/c",
-          240,0,120,200,0,10);
-       fhBkgRatios[icone][ipt]->
-         SetYTitle("p_{T bkg lead #pi^{0}}/p_{T #gamma}");
-       fhBkgRatios[icone][ipt]->SetXTitle("p_{T #gamma} (GeV/c)");
-       outputContainer->Add(fhBkgRatios[icone][ipt]) ; 
-       
-       fhBkgPts[icone][ipt]  = new TH2F
-         ("BkgPtCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt], 
-          "p_{T jet lead #pi^{0}}/p_{T #gamma} vs p_{T #gamma}, cone ="
-          +fJetNameCones[icone]+", pt>" +fJetNamePtThres[ipt]+" GeV/c",
-          240,0,120,400,0,200);
-       fhBkgPts[icone][ipt]->
-         SetYTitle("p_{T jet lead #pi^{0}}/p_{T #gamma}");
-       fhBkgPts[icone][ipt]->SetXTitle("p_{T #gamma} (GeV/c)");
-       outputContainer->Add(fhBkgPts[icone][ipt]) ; 
-       
-       //Counts
-       fhNBkgs[icone][ipt]  = new TH1F
-         ("NBkgCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "bkg multiplicity cone ="+fJetNameCones[icone]+", pt>" 
-          +fJetNamePtThres[ipt]+" GeV/c",9000,0,9000); 
-       fhNBkgs[icone][ipt]->SetYTitle("counts");
-       fhNBkgs[icone][ipt]->SetXTitle("N");
-       outputContainer->Add(fhNBkgs[icone][ipt]) ; 
-       
-       fhNLeadings[icone][ipt]  = new TH2F
-         ("NLeadingCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "p_{T #gamma} vs p_{T #pi^{0}} cone ="+fJetNameCones[icone]+", pt>" 
-          +fJetNamePtThres[ipt]+" GeV/c",120,0,120,120,0,120); 
-       fhNLeadings[icone][ipt]->SetYTitle("p_{T #pi^{0}}(GeV/c)");
-       fhNLeadings[icone][ipt]->SetXTitle("p_{T #gamma}(GeV/c)");
-       outputContainer->Add(fhNLeadings[icone][ipt]) ; 
-       
-       fhNJets[icone][ipt]  = new TH1F
-         ("NJetCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "Number of neutral jets, cone ="+fJetNameCones[icone]+", pt>" 
-          +fJetNamePtThres[ipt]+" GeV/c",120,0,120); 
-       fhNJets[icone][ipt]->SetYTitle("N");
-       fhNJets[icone][ipt]->SetXTitle("p_{T #gamma}(GeV/c)");
-       outputContainer->Add(fhNJets[icone][ipt]) ; 
-       
-       //Fragmentation Function
-       fhJetFragments[icone][ipt]  = new TH2F
-         ("JetFragmentCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "x_{T} = p_{T i}/p_{T #gamma}, cone ="+fJetNameCones[icone]+", pt>" 
-          +fJetNamePtThres[ipt]+" GeV/c",120,0.,120.,240,0.,1.2); 
-       fhJetFragments[icone][ipt]->SetYTitle("x_{T}");
-       fhJetFragments[icone][ipt]->SetXTitle("p_{T #gamma}");
-       outputContainer->Add(fhJetFragments[icone][ipt]) ; 
-       
-       fhBkgFragments[icone][ipt]  = new TH2F
-         ("BkgFragmentCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "x_{T} = p_{T i}/p_{T #gamma}, cone ="+fJetNameCones[icone]+", pt>" 
-          +fJetNamePtThres[ipt]+" GeV/c",120,0.,120.,240,0.,1.2); 
-       fhBkgFragments[icone][ipt]->SetYTitle("x_{T}");
-       fhBkgFragments[icone][ipt]->SetXTitle("p_{T #gamma}");
-       outputContainer->Add(fhBkgFragments[icone][ipt]) ; 
-       
-       //Jet particle distribution
-       
-       fhJetPtDists[icone][ipt]  = new TH2F
-         ("JetPtDistCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "p_{T i}, cone ="+fJetNameCones[icone]+", pt>" +fJetNamePtThres[ipt]+
-          " GeV/c",120,0.,120.,120,0.,120.); 
-       fhJetPtDists[icone][ipt]->SetXTitle("p_{T #gamma} (GeV/c)");
-       outputContainer->Add(fhJetPtDists[icone][ipt]) ; 
-       
-       fhBkgPtDists[icone][ipt]  = new TH2F
-         ("BkgPtDistCone"+fJetNameCones[icone]+"Pt"+fJetNamePtThres[ipt],
-          "p_{T i}, cone ="+fJetNameCones[icone]+", pt>" +fJetNamePtThres[ipt]+
-          " GeV/c",120,0.,120.,120,0.,120.); 
-       fhBkgPtDists[icone][ipt]->SetXTitle("p_{T #gamma} (GeV/c)");
-       outputContainer->Add(fhBkgPtDists[icone][ipt]) ; 
-       
-      }//ipt
-    } //icone
-  }//If we want to study any cone or pt threshold
-
-  SetOutputContainer(outputContainer);
-
-  return outputContainer;
-}
-
-  //____________________________________________________________________________
-  void AliAnaGammaJetLeadCone::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-  SetJetsOnlyInCTS(kFALSE) ;
-  fPbPb                = kFALSE ;
-  fEtaEMCALCut     = 0.7 ;
-  fPhiEMCALCut[0] = 80. *TMath::Pi()/180.;
-  fPhiEMCALCut[1] = 190.*TMath::Pi()/180.;
-  SetDeltaPhiCutRange(2.9,3.4) ; 
-  SetRatioCutRange(0.1,1.0) ; 
-
-  //Jet selection parameters
-  //Fixed cut   
-  fJetRatioMaxCut = 1.2 ; 
-  fJetRatioMinCut = 0.3 ; 
-  fJetCTSRatioMaxCut = 1.2 ;
-  fJetCTSRatioMinCut = 0.3 ;
-  fSelect         = 0  ;
-
-  //Cut depending on gamma energy
-
-  fPtJetSelectionCut = 20.; //For Low pt jets+BKG, another limits applied
-  //Reconstructed jet energy dependence parameters 
-  //e_jet = a1+e_gamma b2. 
-  //Index 0-> Pt>2 GeV r = 0.3; Index 1-> Pt>0.5 GeV r = 0.3
-  fJetE1[0] = -5.75; fJetE1[1] = -4.1;
-  fJetE2[0] = 1.005; fJetE2[1] = 1.05;
-
-  //Reconstructed sigma of jet energy dependence parameters 
-  //s_jet = a1+e_gamma b2. 
-  //Index 0-> Pt>2 GeV r = 0.3; Index 1-> Pt>0.5 GeV r = 0.3
-  fJetSigma1[0] = 2.65;   fJetSigma1[1] = 2.75;
-  fJetSigma2[0] = 0.0018; fJetSigma2[1] = 0.033;
-
-  //Background mean energy and RMS
-  //Index 0-> No BKG; Index 1-> BKG > 2 GeV; 
-  //Index 2-> (low pt jets)BKG > 0.5 GeV;
-  //Index > 2, same for CTS conf
-  fBkgMean[0] = 0.; fBkgMean[1] = 8.8 ; fBkgMean[2] = 69.5;
-  fBkgMean[3] = 0.; fBkgMean[4] = 6.4;  fBkgMean[5] = 48.6;
-  fBkgRMS[0]  = 0.; fBkgRMS[1]  = 7.5;  fBkgRMS[2]  = 22.0; 
-  fBkgRMS[3]  = 0.; fBkgRMS[4]  = 5.4;  fBkgRMS[5]  = 13.2; 
-
-  //Factor x of min/max = E -+ x * sigma. Obtained after selecting the
-  //limits for monoenergetic jets.
-  //Index 0-> No BKG; Index 1-> BKG > 2 GeV; 
-  //Index 2-> (low pt jets) BKG > 0.5 GeV;
-  //Index > 2, same for CTS conf
-
-  fJetXMin1[0] =-0.69 ; fJetXMin1[1] = 0.39 ; fJetXMin1[2] =-0.88 ; 
-  fJetXMin1[3] =-2.0  ; fJetXMin1[4] =-0.442 ; fJetXMin1[5] =-1.1  ;
-  fJetXMin2[0] = 0.066; fJetXMin2[1] = 0.038; fJetXMin2[2] = 0.034; 
-  fJetXMin2[3] = 0.25 ; fJetXMin2[4] = 0.113; fJetXMin2[5] = 0.077 ;
-  fJetXMax1[0] =-3.8  ; fJetXMax1[1] =-0.76 ; fJetXMax1[2] =-3.6  ; 
-  fJetXMax1[3] =-2.7  ; fJetXMax1[4] =-1.21 ; fJetXMax1[5] =-3.7  ;
-  fJetXMax2[0] =-0.012; fJetXMax2[1] =-0.022; fJetXMax2[2] = 0.016; 
-  fJetXMax2[3] =-0.024; fJetXMax2[4] =-0.008; fJetXMax2[5] = 0.027;
-
-
-  //Different cones and pt thresholds to construct the jet
-
-  fJetCone        = 0.3  ;
-  fJetPtThreshold = 0.5   ;
-  fJetPtThresPbPb = 2.   ;
-  fJetNCone       = 4    ;
-  fJetNPt         = 4    ;
-  fJetCones[0]    = 0.2  ; fJetNameCones[0]   = "02" ;
-  fJetCones[1]    = 0.3  ; fJetNameCones[1]   = "03" ;
-  fJetCones[2]    = 0.4  ; fJetNameCones[2]   = "04" ;
-  fJetCones[2]    = 0.5  ; fJetNameCones[2]   = "05" ;
-
-  fJetPtThres[0]  = 0.0  ; fJetNamePtThres[0] = "00" ;
-  fJetPtThres[1]  = 0.5  ; fJetNamePtThres[1] = "05" ;
-  fJetPtThres[2]  = 1.0  ; fJetNamePtThres[2] = "10" ;
-  fJetPtThres[3]  = 2.0  ; fJetNamePtThres[3] = "20" ;
-}
-
-//__________________________________________________________________
-void AliAnaGammaJetLeadCone::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-  Info("Print", "%s %s", GetName(), GetTitle() ) ;
-  printf("Correlation analysis           =     %d\n",kJetLeadCone) ;
-  
-  
-  printf("Phi gamma-Leading      <     %f\n", GetDeltaPhiMaxCut()) ; 
-  printf("Phi gamma-Leading      >     %f\n", GetDeltaPhiMinCut()) ;
-  printf("pT Leading / pT Gamma             <     %f\n", GetRatioMaxCut()) ; 
-  printf("pT Leading / pT Gamma             >     %f\n", GetRatioMinCut()) ;
-  
-  if(fSelect == 2){
-    printf("pT Jet / pT Gamma                     <    %f\n", fJetRatioMaxCut) ; 
-    printf("pT Jet / pT Gamma                     >    %f\n", fJetRatioMinCut) ;
-    printf("pT Jet (Only CTS)/ pT Gamma   <    %f\n", fJetCTSRatioMaxCut) ; 
-    printf("pT Jet (Only CTS)/ pT Gamma   >    %f\n", fJetCTSRatioMinCut) ;
-  }
-  
-} 
-
-//__________________________________________________________________
-void  AliAnaGammaJetLeadCone::MakeGammaCorrelation(TParticle * pGamma, TClonesArray * plCTS,  TClonesArray * plNe) 
-{
-  //Gamma Jet Correlation Analysis
-  AliDebug(2, "Make correlation");
-  
-  TParticle *pLeading = new TParticle; //It will contain the kinematics of the found leading particle
-  
-  //Search leading particles in CTS and EMCAL 
-  if(GetLeadingParticle(plCTS, plNe, pGamma, pLeading)){
-    
-    AliDebug(1,Form("Leading: pt %f, phi %f, eta %f", pLeading->Pt(),pLeading->Phi(),pLeading->Eta())) ;
-    
-    //Search Jet
-    if(!fSeveralConeAndPtCuts)
-      MakeJet(plCTS, plNe, pGamma, pLeading, "");
-    else{
-      for(Int_t icone = 0; icone<fJetNCone; icone++) {
-       for(Int_t ipt = 0; ipt<fJetNPt;ipt++) {  
-         TString lastname ="Cone"+ fJetNameCones[icone]+"Pt"+ fJetNamePtThres[ipt];
-         fJetCone=fJetCones[icone];
-         fJetPtThreshold=fJetPtThres[ipt];
-         MakeJet(plCTS, plNe, pGamma, pLeading, lastname);
-       }//icone
-      }//ipt
-    }//fSeveralConeAndPtCuts
-  }//Leading
-       
-  AliDebug(2, "End of analysis, delete pointers");
-
-  pLeading->Delete();
-
-} 
-
-//____________________________________________________________________________
-Bool_t  AliAnaGammaJetLeadCone::GetLeadingParticle(TClonesArray * plCTS, TClonesArray * plNe,  
-                                           TParticle * pGamma, TParticle * pLeading) 
-{
-  //Search Charged or Neutral leading particle, select the highest one.
-  
-  TParticle * pLeadingCh = new TParticle();
-  TParticle * pLeadingPi0 = new TParticle();
-  
-  Double_t ptg  =  pGamma->Pt(); 
-  Double_t phig = pGamma->Phi(); 
-  Double_t etag = pGamma->Eta(); 
-  
-  if(!AreJetsOnlyInCTS())
-    {
-      AliDebug(3, "GetLeadingPi0");
-      GetLeadingPi0(plNe, pGamma, pLeadingPi0) ;
-      AliDebug(3, "GetLeadingCharge");
-      GetLeadingCharge(plCTS, pGamma, pLeadingCh) ;
-      
-      Double_t ptch = pLeadingCh->Pt(); 
-      Double_t phich = pLeadingCh->Phi(); 
-      Double_t etach = pLeadingCh->Eta(); 
-      Double_t ptpi = pLeadingPi0->Pt(); 
-      Double_t phipi = pLeadingPi0->Phi(); 
-      Double_t etapi = pLeadingPi0->Eta(); 
-
-      //Is leading cone inside EMCAL acceptance?
-      
-      Bool_t insidech = kFALSE ;
-      if((phich - fJetCone) >  fPhiEMCALCut[0] && 
-        (phich + fJetCone) <  fPhiEMCALCut[1] && 
-       (etach-fJetCone) < fEtaEMCALCut )
-       insidech = kTRUE ;
-      
-      Bool_t insidepi = kFALSE ;
-      if((phipi - fJetCone) >  fPhiEMCALCut[0] && 
-        (phipi + fJetCone) <  fPhiEMCALCut[1] &&
-       (etapi-fJetCone) < fEtaEMCALCut )
-       insidepi = kTRUE ;
-
-      AliDebug(2,Form("Leading:  charged pt %f, pi0 pt  %f",ptch,ptpi)) ;
-      
-      if (ptch > 0 || ptpi > 0)
-       {
-         if(insidech && (ptch > ptpi))
-           {
-           
-             AliDebug(1,"Leading found in CTS");
-             pLeading->SetMomentum(pLeadingCh->Px(),pLeadingCh->Py(),pLeadingCh->Pz(),pLeadingCh->Energy());
-             AliDebug(3,Form("Final leading found in CTS, pt %f, phi %f, eta %f",ptch,phich,etach)) ;
-             fhChargedRatio->Fill(ptg,ptch/pGamma->Pt());
-             fhEtaCharged->Fill(ptg,etach);
-             fhPhiCharged->Fill(ptg,phich);
-             fhDeltaPhiGammaCharged->Fill(ptg,pGamma->Phi()-phich);
-             fhDeltaEtaGammaCharged->Fill(ptg,pGamma->Eta()-etach);
-             return 1;
-           }
-         
-         else if((ptpi > ptch) && insidepi)
-           {
-             AliDebug(1,"Leading found in EMCAL");
-             pLeading->SetMomentum(pLeadingPi0->Px(),pLeadingPi0->Py(),pLeadingPi0->Pz(),pLeadingPi0->Energy());
-             AliDebug(3,Form("Final leading found in EMCAL, pt %f, phi %f, eta %f",ptpi,phipi,etapi)) ;
-             fhNeutralRatio ->Fill(ptg,ptpi/ptg);
-             fhEtaNeutral->Fill(ptg,etapi);
-             fhPhiNeutral->Fill(ptg,phipi);
-             fhDeltaPhiGammaNeutral->Fill(ptg,phig-phipi);
-             fhDeltaEtaGammaNeutral->Fill(ptg,etag-etapi);
-             return 1;     
-           }
-
-         else{
-           AliDebug(3,"NO LEADING PARTICLE FOUND");}
-         return 0; 
-       }
-      else{
-       AliDebug(3,"NO LEADING PARTICLE FOUND");
-       return 0;
-      }
-    }
-  else
-    {
-      //No calorimeter present for Leading particle detection
-      GetLeadingCharge(plCTS, pGamma, pLeading) ;
-      Double_t ptch = pLeading->Pt(); 
-      Double_t phich = pLeading->Phi(); 
-      Double_t etach = pLeading->Eta(); 
-      if(ptch > 0){
-       fhChargedRatio->Fill(ptg,ptch/ptg);
-       fhEtaCharged->Fill(ptg,etach);
-       fhPhiCharged->Fill(ptg,phich);
-       fhDeltaPhiGammaCharged->Fill(ptg,phig-phich);
-       fhDeltaEtaGammaCharged->Fill(ptg,etag-etach);
-       AliDebug(3,Form("Leading found :  pt %f, phi %f, eta %f",ptch,phich,etach)) ;
-       return 1;
-      }
-      else
-       {
-         AliDebug(3,"NO LEADING PARTICLE FOUND");      
-         return 0;
-       }
-    }
-}
-
-//____________________________________________________________________________
-void  AliAnaGammaJetLeadCone::GetLeadingCharge(TClonesArray * pl, TParticle * pGamma, TParticle * pLeading) const 
-{  
-  //Search for the charged particle with highest with 
-  //Phi=Phi_gamma-Pi and pT=0.1E_gamma 
-  Double_t pt  = -100.;
-  Double_t phi = -100.;
-
-  for(Int_t ipr = 0;ipr < pl->GetEntries() ; ipr ++ ){
-
-    TParticle * particle = dynamic_cast<TParticle *>(pl->At(ipr)) ;
-
-    Double_t ptl  = particle->Pt();
-    Double_t rat  = ptl/pGamma->Pt() ;
-    Double_t phil = particle->Phi() ;
-    Double_t phig = pGamma->Phi();
-
-    //Selection within angular and energy limits
-    if(((phig-phil)> GetDeltaPhiMinCut()) && ((phig-phil)<GetDeltaPhiMaxCut()) &&
-        (rat > GetRatioMinCut()) && (rat < GetRatioMaxCut())  && (ptl  > pt)) {
-       phi = phil ;
-       pt  = ptl ;
-       pLeading->SetMomentum(particle->Px(),particle->Py(),particle->Pz(),particle->Energy());
-       AliDebug(4,Form("Charge in CTS: pt %f eta %f phi %f pt/Eg %f \n", pt, particle->Eta(), phi,rat)) ;
-     }
-  }
-  
-  AliDebug(1,Form("Leading in CTS: pt %f eta %f phi %f pt/Eg %f \n", pt, pLeading->Eta(), phi,pt/pGamma->Pt())) ;
-
-}
-
-
-//____________________________________________________________________________
-void  AliAnaGammaJetLeadCone::GetLeadingPi0(TClonesArray * pl, TParticle * pGamma, TParticle * pLeading)  
-{  
-
-  //Search for the neutral pion with highest with 
-  //Phi=Phi_gamma-Pi and pT=0.1E_gamma 
-  Double_t pt  = -100.;
-  Double_t phi = -100.;
-  Double_t ptl = -100.;
-  Double_t rat = -100.; 
-  Double_t phil = -100. ;
-  Double_t ptg  = pGamma->Pt();
-  Double_t phig = pGamma->Phi();
-
-  TIter next(pl);
-  TParticle * particlei = 0;
-  TParticle * particlej = 0;
-  TLorentzVector gammai;
-  TLorentzVector gammaj;
-
-  Int_t iPrimary = -1;
-  Double_t angle = 0., e = 0., invmass = 0.;
-  Int_t ksPdg = 0;
-  Int_t jPrimary=-1;
-
-  while ( (particlei = (TParticle*)next()) ) {
-    iPrimary++;          
-    ksPdg = particlei->GetPdgCode();
-    
-    ptl  = particlei->Pt();   
-    //2 gamma overlapped, found with PID
-     if(ksPdg == 111){ 
-       rat = ptl/ptg ;
-       phil = particlei->Phi() ;
-       //Selection within angular and energy limits
-       if(ptl > pt  && rat > GetRatioMinCut()  && rat < GetRatioMaxCut()  && 
-         (phig-phil) > GetDeltaPhiMinCut() && (phig-phil) < GetDeltaPhiMaxCut() )
-        {
-          phi = phil ;
-          pt  = ptl ;
-          pLeading->SetMomentum(particlei->Px(),particlei->Py(),particlei->Pz(),particlei->Energy());
-          AliDebug(4,Form("Pi0 candidate: pt %f eta %f phi %f pt/Eg %f \n",  pLeading->Pt(), pLeading->Eta(),  pLeading->Phi(),  pLeading->Pt()/pGamma->Pt())) ;
-        }// cuts
-     }// pdg = 111
-
-    //Make invariant mass analysis
-    else if(ksPdg == 22){//  gamma i
-      //Search the photon companion in case it comes from  a Pi0 decay
-      //Apply several cuts to select the good pair
-      particlei->Momentum(gammai);
-      jPrimary=-1;
-      TIter next2(pl);
-      while ( (particlej = (TParticle*)next2()) ) {
-       jPrimary++;
-       if(jPrimary>iPrimary){
-         ksPdg = particlej->GetPdgCode();
-         particlej->Momentum(gammaj);
-         if(ksPdg == 22 && GetNeutralMesonSelection()->SelectPair(pGamma, gammai, gammaj))
-         {
-           //Info("GetLeadingPi0","Egammai %f, Egammaj %f", 
-           //gammai.Pt(),gammaj.Pt());
-           ptl  = (gammai+gammaj).Pt();
-           phil = (gammai+gammaj).Phi();
-           if(phil < 0)
-             phil+=TMath::TwoPi();
-           rat = ptl/ptg ;
-             
-           if(ptl > pt ){
-             pt       = ptl;
-             phi      = phil ;
-             e       = (gammai+gammaj).E();
-             angle   = gammaj.Angle(gammai.Vect());
-             invmass = (gammai+gammaj).M();
-             pLeading->SetMomentum( (gammai+gammaj).Px(), (gammai+gammaj).Py(), (gammai+gammaj).Pz(), (gammai+gammaj).E());
-             AliDebug(4,Form("Pi0 candidate: pt %f eta %f phi %f pt/Eg %f \n",  pLeading->Pt(), pLeading->Eta(),  pLeading->Phi(),  pLeading->Pt()/pGamma->Pt())) ;
-           }
-         }//if pdg = 22, pair selected
-       }//iprimary<jprimary
-      }//while
-    }// if pdg = 22
-  }//while
-  
-  //Final pi0 found, highest pair energy, fill histograms
-  if(e > 0.){
-    fhInvMassPairLeading->Fill(e,invmass);
-    fhAnglePairLeading->Fill(e,angle);
-  }
-  
-  AliDebug(3,Form("Leading EMCAL: pt %f eta %f phi %f pt/Eg %f \n",  pLeading->Pt(), pLeading->Eta(),  pLeading->Phi(),  pLeading->Pt()/pGamma->Pt())) ;
-}
-
-
-//__________________________________________________________________________-
-Bool_t AliAnaGammaJetLeadCone::IsJetSelected(const Double_t ptg, const Double_t ptj){
-  //Check if the energy of the reconstructed jet is within an energy window
-
-  Double_t par[6];
-  Double_t xmax[2];
-  Double_t xmin[2];
-
-  Int_t iCTS = 0;
-  if(AreJetsOnlyInCTS())
-    iCTS = 3 ;
-
-  if(!fPbPb){
-    //Phythia alone, jets with pt_th > 0.2, r = 0.3 
-    par[0] = fJetE1[0]; par[1] = fJetE2[0]; 
-    //Energy of the jet peak
-    //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit
-    par[2] = fJetSigma1[0]; par[3] = fJetSigma2[0];
-    //Sigma  of the jet peak
-    //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit
-    par[4] = fBkgMean[0 + iCTS]; par[5] = fBkgRMS[0 + iCTS];
-    //Parameters reserved for PbPb bkg.
-    xmax[0] = fJetXMax1[0 + iCTS]; xmax[1] = fJetXMax2[0 + iCTS];
-    xmin[0] = fJetXMin1[0 + iCTS]; xmin[1] = fJetXMin2[0 + iCTS];
-    //Factor that multiplies sigma to obtain the best limits, 
-    //by observation, of mono jet ratios (ptjet/ptg)
-    //X_jet = fJetX1[0]+fJetX2[0]*e_gamma
-   
-  }
-  else{
-    if(ptg > fPtJetSelectionCut){
-      //Phythia +PbPb with  pt_th > 2 GeV/c, r = 0.3 
-      par[0] = fJetE1[0]; par[1] = fJetE2[0]; 
-      //Energy of the jet peak, same as in pp
-      //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit
-      par[2] = fJetSigma1[0]; par[3] = fJetSigma2[0];
-      //Sigma  of the jet peak, same as in pp
-      //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit
-      par[4] = fBkgMean[1 + iCTS]; par[5] = fBkgRMS[1 + iCTS];
-      //Mean value and RMS of PbPb Bkg 
-      xmax[0] = fJetXMax1[1 + iCTS]; xmax[1] = fJetXMax2[1 + iCTS];
-      xmin[0] = fJetXMin1[1 + iCTS]; xmin[1] = fJetXMin2[1 + iCTS];
-      //Factor that multiplies sigma to obtain the best limits, 
-      //by observation, of mono jet ratios (ptjet/ptg) mixed with PbPb Bkg, 
-      //pt_th > 2 GeV, r = 0.3
-      //X_jet = fJetX1[0]+fJetX2[0]*e_gamma
-     
-    }
-    else{
-      //Phythia + PbPb with  pt_th > 0.5 GeV/c, r = 0.3
-      par[0] = fJetE1[1]; par[1] = fJetE2[1]; 
-      //Energy of the jet peak, pt_th > 2 GeV/c, r = 0.3 
-      //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit
-      par[2] = fJetSigma1[1]; par[3] = fJetSigma2[1];
-      //Sigma  of the jet peak, pt_th > 2 GeV/c, r = 0.3
-      //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit
-      par[4] = fBkgMean[2 + iCTS]; par[5] = fBkgRMS[2 + iCTS];
-      //Mean value and RMS of PbPb Bkg in a 0.3 cone, pt > 2 GeV.
-      xmax[0] = fJetXMax1[2 + iCTS]; xmax[1] = fJetXMax2[2 + iCTS];
-      xmin[0] = fJetXMin1[2 + iCTS]; xmin[1] = fJetXMin2[2 + iCTS];
-      //Factor that multiplies sigma to obtain the best limits, 
-      //by observation, of mono jet ratios (ptjet/ptg) mixed with PbPb Bkg, 
-      //pt_th > 2 GeV, r = 0.3
-      //X_jet = fJetX1[0]+fJetX2[0]*e_gamma
-     
-    }//If low pt jet in bkg
-  }//if Bkg
-
- //Calculate minimum and maximum limits of the jet ratio.
-  Double_t min = CalculateJetRatioLimit(ptg, par, xmin);
-  Double_t max = CalculateJetRatioLimit(ptg, par, xmax);
-  
-  AliDebug(3,Form("Jet selection?  : Limits min %f, max %f,  pt_jet %f,  pt_gamma %f, pt_jet / pt_gamma %f",min,max,ptj,ptg,ptj/ptg));
-
-  if(( min < ptj/ptg ) && ( max > ptj/ptg))
-    return kTRUE;
-  else
-    return kFALSE;
-
-}
-
-//____________________________________________________________________________
-void AliAnaGammaJetLeadCone::MakeJet(TClonesArray * plCTS, TClonesArray * plNe, 
-                                    TParticle * pGamma, TParticle* pLeading,TString lastname)
-{
-  //Fill the jet with the particles around the leading particle with 
-  //R=fJetCone and pt_th = fJetPtThres. Calculate the energy of the jet and 
-  //check if we select it. Fill jet histograms
-  
-  TClonesArray * jetList = new TClonesArray("TParticle",1000);
-  TClonesArray * bkgList = new TClonesArray("TParticle",1000);
-
-  TLorentzVector jet   (0,0,0,0);  
-  TLorentzVector bkg(0,0,0,0);
-  TLorentzVector lv (0,0,0,0);
-
-  Double_t ptjet = 0.0;
-  Double_t ptbkg = 0.0;
-  Int_t n0 = 0;
-  Int_t n1 = 0;  
-  Bool_t b1 = kFALSE;
-  Bool_t b0 = kFALSE;
-  
-  Double_t ptg  = pGamma->Pt();
-  Double_t phig = pGamma->Phi();
-  Double_t ptl  = pLeading->Pt();
-  Double_t phil = pLeading->Phi();
-  Double_t etal = pLeading->Eta();
-
-  Float_t ptcut = fJetPtThreshold;
-  if(fPbPb && !fSeveralConeAndPtCuts && ptg > fPtJetSelectionCut)  ptcut = fJetPtThresPbPb ;
-  //Add charged particles to jet
-  TIter nextch(plCTS) ; 
-  TParticle * particle = 0 ; 
-  while ( (particle = dynamic_cast<TParticle*>(nextch())) ) {
-    
-    b0 = kFALSE;
-    b1 = kFALSE;
-
-    //Particles in jet 
-    SetJet(particle, b0, fJetCone, etal, phil) ;  
-
-    if(b0){
-      new((*jetList)[n0++]) TParticle(*particle) ;
-      particle->Momentum(lv);
-      if(particle->Pt() > ptcut ){
-       jet+=lv;
-       ptjet+=particle->Pt();
-      }
-    }
-
-    //Background around (phi_gamma-pi, eta_leading)
-    SetJet(particle, b1, fJetCone,etal, phig) ;
-
-    if(b1) { 
-      new((*bkgList)[n1++]) TParticle(*particle) ;
-      particle->Momentum(lv);
-      if(particle->Pt() > ptcut ){
-       bkg+=lv;
-       ptbkg+=particle->Pt();    
-      }  
-    }
-  }
-
-   //Add neutral particles to jet
-  TIter nextne(plNe) ; 
-  particle = 0 ; 
-  while ( (particle = dynamic_cast<TParticle*>(nextne())) ) {
-    
-    b0 = kFALSE;
-    b1 = kFALSE;
-
-    //Particles in jet 
-    SetJet(particle, b0, fJetCone, etal, phil) ;  
-
-    if(b0){
-      new((*jetList)[n0++]) TParticle(*particle) ;
-      particle->Momentum(lv);
-      if(particle->Pt() > ptcut ){
-       jet+=lv;
-       ptjet+=particle->Pt();
-      }
-    }
-
-    //Background around (phi_gamma-pi, eta_leading)
-    SetJet(particle, b1, fJetCone,etal, phig) ;
-
-    if(b1) { 
-      new((*bkgList)[n1++]) TParticle(*particle) ;
-      particle->Momentum(lv);
-      if(particle->Pt() > ptcut ){
-       bkg+=lv;
-       ptbkg+=particle->Pt();    
-      }  
-    }
-  }
-  
-  ptjet = jet.Pt();
-  ptbkg = bkg.Pt();
-
-  if(ptjet > 0.) {
-
-    AliDebug(2,Form("Gamma   pt %f, Jet pt %f, Bkg pt %f",ptg,ptjet,ptbkg));
-    
-    //Fill histograms
-    
-    Double_t ratjet   = ptjet/ptg ;
-    Double_t ratbkg  = ptbkg/ptg ;
-
-    dynamic_cast<TH2F*>
-      (GetOutputContainer()->FindObject("JetRatio"+lastname))
-      ->Fill(ptg,ratjet);       
-    dynamic_cast<TH2F*>
-      (GetOutputContainer()->FindObject("JetPt"+lastname))
-      ->Fill(ptg,ptjet);
-    
-    dynamic_cast<TH2F*>
-      (GetOutputContainer()->FindObject("BkgRatio"+lastname))
-      ->Fill(ptg,ratbkg);
-    
-    dynamic_cast<TH2F*>
-      (GetOutputContainer()->FindObject("BkgPt"+lastname))
-      ->Fill(ptg,ptbkg);
-
-    //Jet selection
-    Bool_t kSelect = kFALSE;
-    if(fSelect == 0)
-      kSelect = kTRUE; //Accept all jets, no restriction
-    else if(fSelect == 1){
-      //Selection with parametrized cuts
-      if(IsJetSelected(ptg,ptjet))   kSelect = kTRUE;
-    }
-    else if(fSelect == 2){
-      //Simple selection
-      if(!AreJetsOnlyInCTS()){
-       if((ratjet <  fJetRatioMaxCut) && (ratjet > fJetRatioMinCut )) kSelect = kTRUE;
-      }
-      else{
-       if((ratjet <  fJetCTSRatioMaxCut) && (ratjet > fJetCTSRatioMinCut )) kSelect = kTRUE;
-      }
-    }
-    else
-      AliError("Jet selection option larger than 2, DON'T SELECT JETS");
-    
-    
-     if(kSelect){
-       AliDebug(1,Form("Jet Selected: pt %f ", ptjet)) ;
-      
-       FillJetHistos(jetList, ptg, ptl,"Jet",lastname);
-       FillJetHistos(bkgList, ptg, ptl, "Bkg",lastname);
-     }
-  } //ptjet > 0
-  
-  jetList ->Delete();
-  bkgList ->Delete();
-  
-}
-
-//___________________________________________________________________
-void AliAnaGammaJetLeadCone::SetJet(TParticle * part, Bool_t & b, Float_t cone, 
-                            Double_t eta, Double_t phi)
-{
-
-  //Check if the particle is inside the cone defined by the leading particle
-  b = kFALSE;
-  
-  if(phi > TMath::TwoPi())
-    phi-=TMath::TwoPi();
-  if(phi < 0.)
-    phi+=TMath::TwoPi();
-  
-  Double_t  rad = 10000 + cone;
-  
-  if(TMath::Abs(part->Phi()-phi) <= (TMath::TwoPi() - cone))
-    rad = TMath::Sqrt(TMath::Power(part->Eta()-eta,2)+
-                     TMath::Power(part->Phi()-phi,2));
-  else{
-    if(part->Phi()-phi > TMath::TwoPi() - cone)
-      rad = TMath::Sqrt(TMath::Power(part->Eta()-eta,2)+
-                       TMath::Power((part->Phi()-TMath::TwoPi())-phi,2));
-    if(part->Phi()-phi < -(TMath::TwoPi() - cone))
-      rad = TMath::Sqrt(TMath::Power(part->Eta()-eta,2)+
-                       TMath::Power((part->Phi()+TMath::TwoPi())-phi,2));
-  }
-
-  if(rad < cone )
-    b = kTRUE;
-  
-}
-
-//____________________________________________________________________________
-void AliAnaGammaJetLeadCone::FillJetHistos(TClonesArray * pl, Double_t ptg, Double_t ptl, TString type, TString lastname)
-{
-  //Fill histograms wth jet fragmentation 
-  //and number of selected jets and leading particles
-  //and the background multiplicity
-  TParticle * particle = 0 ;
-  Int_t ipr = 0;
-  Float_t  charge = 0;
-  
-  TIter next(pl) ; 
-  while ( (particle = dynamic_cast<TParticle*>(next())) ) {
-    ipr++ ;
-    Double_t pt = particle->Pt();
-    
-    charge = TDatabasePDG::Instance()
-      ->GetParticle(particle->GetPdgCode())->Charge();
-    if(charge != 0){//Only jet Charged particles 
-      dynamic_cast<TH2F*>
-       (GetOutputContainer()->FindObject(type+"Fragment"+lastname))
-       ->Fill(ptg,pt/ptg);
-      dynamic_cast<TH2F*>
-       (GetOutputContainer()->FindObject(type+"PtDist"+lastname))
-       ->Fill(ptg,pt);
-    }//charged
-    
-  }//while
-  
-  if(type == "Bkg")
-    dynamic_cast<TH1F*>
-      (GetOutputContainer()->FindObject("NBkg"+lastname))
-      ->Fill(ipr);
-  else{
-    dynamic_cast<TH1F*>
-      (GetOutputContainer()->FindObject("NJet"+lastname))->
-      Fill(ptg);
-    dynamic_cast<TH2F*>
-      (GetOutputContainer()->FindObject("NLeading"+lastname))
-      ->Fill(ptg,ptl);
-  }
-  
-}
diff --git a/PWG4/AliAnaGammaJetLeadCone.h b/PWG4/AliAnaGammaJetLeadCone.h
deleted file mode 100644 (file)
index e5c6caf..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-#ifndef ALIANAGAMMAJETLEADCONE_H
-#define ALIANAGAMMAJETLEADCONE_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class that contains the algorithm for the reconstruction of jet, cone around leading particle
-// 1)Take the prompt photon found with AliAnaGammaDirect,
-// 2) Search for the highest pt leading particle opposite to the photon within a phi, pt window
-// 3) Take all particles around leading in a cone R with pt larger than threshold and construct the jet
-//
-//  Class created from old AliPHOSGammaJet
-//  (see AliRoot versions previous Release 4-09)
-//-- Author: Gustavo Conesa (INFN-LNF)
-
-#include "AliAnaGammaCorrelation.h"
-
-class AliAnaGammaJetLeadCone : public AliAnaGammaCorrelation {
-
-public: 
-  
-  AliAnaGammaJetLeadCone() ; // default ctor
-  AliAnaGammaJetLeadCone(const AliAnaGammaJetLeadCone & g) ; // cpy ctor
-  AliAnaGammaJetLeadCone & operator = (const AliAnaGammaJetLeadCone & g) ;//cpy assignment
-  virtual ~AliAnaGammaJetLeadCone() ; //virtual dtor
-  
-  TList * GetCreateOutputObjects();
-
-  void InitParameters();
-
-  void Print(const Option_t * opt) const;
-  Bool_t   AreSeveralConeAndPtCuts() const {return fSeveralConeAndPtCuts ; }
-  void SetSeveralConeAndPtCuts(Bool_t several){fSeveralConeAndPtCuts = several ;}
-
-  Bool_t   IsPbPb() const {return fPbPb ; }
-  void SetPbPb(Bool_t opt){fPbPb = opt; }
-
-  Double_t GetEtaEMCALCut() const {return fEtaEMCALCut;}
-  Double_t GetPhiEMCALCut(Int_t i) const {return fPhiEMCALCut[i];}
-  void SetEtaEMCALCut(Double_t etacut) {fEtaEMCALCut = etacut ; }
-  void SetPhiEMCALCut(Double_t phi, Int_t i){fPhiEMCALCut[i] = phi; }
-
-  Double_t GetPtJetSelectionCut() const {return fPtJetSelectionCut ; }
-  Double_t GetJetRatioMaxCut() const {return fJetRatioMaxCut ; }
-  Double_t GetJetRatioMinCut() const {return fJetRatioMinCut ; }
-  void SetPtJetSelectionCut(Double_t cut){fPtJetSelectionCut = cut; }
-  void SetJetSelection(UInt_t select){ fSelect= select ; }
-
-  Int_t       GetJetNCones() const {return fJetNCone ; }
-  Int_t       GetJetNPtThres() const {return fJetNPt ; }
-  Float_t    GetJetCone() const {return fJetCone ; }
-  Float_t    GetJetPtThreshold() const {return fJetPtThreshold ; }
-  Float_t    GetJetPtThresPbPb() const {return fJetPtThresPbPb ; }
-  Float_t    GetJetCones(Int_t i) const {return fJetCones[i] ; }
-  Float_t    GetJetPtThreshold(Int_t i) const {return fJetPtThres[i] ; }
-  TString   GetJetConeName(Int_t i) const {return fJetNameCones[i] ; }
-  TString   GetJetPtThresName(Int_t i) const {return fJetNamePtThres[i] ; }
-
-  void SetJetNCones(Int_t n){fJetNCone = n ; }
-  void SetJetNPtThresholds(Int_t n){fJetNPt = n ; }
-  void SetJetCones(Int_t i, Float_t cone, TString sc)
-    {fJetCones[i] = cone ; fJetNameCones[i] = sc; };
-  void SetCone(Float_t cone)
-    {fJetCone = cone; }
-  void SetJetPtThreshold(Float_t pt){fJetPtThreshold = pt; };
-  void SetJetPtThresPbPb(Float_t pt){fJetPtThresPbPb = pt; };
-  void SetJetPtThresholds(Int_t i,Float_t pt, TString spt){fJetPtThres[i] = pt ; 
-  fJetNamePtThres[i] = spt; };
-
-  void SetJetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
-    {fJetRatioMaxCut =ratiomax;  fJetRatioMinCut = ratiomin ; }
-  void SetJetCTSRatioCutRange(Double_t ratiomin, Double_t ratiomax)
-    {fJetCTSRatioMaxCut =ratiomax;  fJetCTSRatioMinCut = ratiomin ; }
-  
-  void MakeGammaCorrelation(TParticle * pGamma, TClonesArray * plCTS,   TClonesArray * plNe) ;
-  
-  private:
-
-  Double_t CalculateJetRatioLimit(const Double_t ptg, const Double_t *param, 
-                                 const Double_t *x){
-    return 0; // dummy implementation
-  }
-  void FillJetHistos(TClonesArray * pl, Double_t ptg, Double_t ptl,TString type, TString lastname);
-
-  Bool_t IsJetSelected(const Double_t ptg, const Double_t ptjet);
-
-  void MakeJet(TClonesArray * plCTS, TClonesArray * plNe, 
-              TParticle * pGamma, TParticle* pLeading, TString lastname); 
-  
-  void GetLeadingCharge(TClonesArray * pl, TParticle *pGamma, TParticle * pLeading) const ;
-  void GetLeadingPi0   (TClonesArray * pl, TParticle *pGamma, TParticle * pLeading)  ;
-  Bool_t GetLeadingParticle(TClonesArray * plCTS, TClonesArray * plNe, 
-                           TParticle *pGamma, TParticle * pLeading) ;
-  
-  void SetJet(TParticle * part, Bool_t & b, Float_t cone, Double_t eta, 
-             Double_t phi);
-
-  private:
-
-  Bool_t       fPbPb;          // PbPb event
-  Bool_t       fSeveralConeAndPtCuts;     //  To play with the jet cone size and pt th.
-
-  Double_t   fEtaEMCALCut ;         // Eta EMCAL acceptance
-  Double_t   fPhiEMCALCut[2] ; // Phi cut maximum
-
-  //Jet selection parameters
-  //Fixed cuts (old)
-  Double_t   fJetCTSRatioMaxCut ; // Leading particle/gamma Ratio cut maximum
-  Double_t   fJetCTSRatioMinCut ; // Leading particle/gamma Ratio cut minimum
-  Double_t   fJetRatioMaxCut ; // Jet/gamma Ratio cut maximum
-  Double_t   fJetRatioMinCut ; // Jet/gamma Ratio cut minimum
-
-  //Cuts depending on jet pt
-  Double_t fJetE1[2];    //Rec. jet energy parameters
-  Double_t fJetE2[2];    //Rec. jet energy parameters
-  Double_t fJetSigma1[2];//Rec. sigma of jet energy  parameters
-  Double_t fJetSigma2[2];//Rec. sigma of jet energy  parameters
-  Double_t fBkgMean[6];  //Background mean energy 
-  Double_t fBkgRMS[6];   //Background RMS
-  Double_t fJetXMin1[6]; //X Factor to set jet min limit for pp
-  Double_t fJetXMin2[6]; //X Factor to set jet min limit for PbPb
-  Double_t fJetXMax1[6]; //X Factor to set jet max limit for pp
-  Double_t fJetXMax2[6]; //X Factor to set jet max limit for PbPb
-
-  Int_t         fJetNCone ;            // Number of jet cones sizes
-  Int_t         fJetNPt   ;            // Number of jet particle pT threshold
-  Double_t   fJetCone  ;            // Jet cone sizes under study (!fSeveralConeAndPtCuts)
-  Double_t   fJetCones[10];         // Jet cone sizes under study (fSeveralConeAndPtCuts)
-  TString     fJetNameCones[10];     // String name of cone to append to histos
-  Double_t   fJetPtThreshold;       // Jet pT threshold under study(!fSeveralConeAndPtCuts)
-  Double_t   fJetPtThresPbPb;       // Jet pT threshold under study(!fSeveralConeAndPtCuts)
-  Double_t   fJetPtThres[10];       // Jet pT threshold under study(fSeveralConeAndPtCuts)
-  TString     fJetNamePtThres[10];   // String name of pt th to append to histos
-  Double_t   fPtJetSelectionCut; // Jet pt to change to low pt jets analysis
-  UInt_t       fSelect  ;   //kTRUE: Selects all jets, no limits.
-  //Histograms
-  //Particle distributions
-  TH2F * fhPhiCharged  ; //Phi distribution of charged particles
-  TH2F * fhPhiNeutral   ;  //Phi distribution of neutral particles
-  TH2F * fhEtaCharged  ;  //Eta distribution of charged particles
-  TH2F * fhEtaNeutral   ;  //Eta distribution of neutral particles
-  //Leading particle distributions
-  TH2F * fhDeltaPhiGammaCharged  ;   //Difference of charged particle phi and prompt gamma phi as function of gamma pT
-  TH2F * fhDeltaPhiGammaNeutral   ;  //Difference of neutral particle phi and prompt gamma phi as function of gamma pT
-  TH2F * fhDeltaEtaGammaCharged  ;  //Difference of charged particle eta and prompt gamma eta as function of gamma pT
-  TH2F * fhDeltaEtaGammaNeutral  ;   //Difference of charged particle eta and prompt gamma eta as function of charged pT
-
-  TH2F * fhAnglePairLeading  ; //Aperture angle of decay photons of leading pi0
-  TH2F * fhInvMassPairLeading  ; //Invariant mass of decay photons of leading pi0
-  TH2F * fhChargedRatio  ; //Ratio of leading charge and prompt gamma
-  TH2F * fhNeutralRatio   ;  //Ratio of leading neutral and prompt gamma
-  TH1F * fhNBkg   ; //Bakground multiplicity
-  TH2F * fhNLeading  ; //Accepted leading particle pt distribution
-
-  //Jet distributions
-  //Fixed cone and pt threshold
-  TH1F * fhNJet  ; //Accepted reconstructed Jet pt distribution 
-  TH2F * fhJetRatio  ; //Ratio of pt jet and pt gamma
-  TH2F * fhJetPt   ; //reconstructed pt jet vs prompt pt gamma
-  TH2F * fhBkgRatio   ; //leading pt bakground / pt gamma 
-  TH2F * fhBkgPt  ; //leading pt bakground vs pt gamma 
-  TH2F * fhJetFragment  ; //Accepted reconstructed jet fragmentation function
-  TH2F * fhBkgFragment  ;  //Background "fragmentation function"
-  TH2F * fhJetPtDist  ; //Jet particle pt distribution
-  TH2F * fhBkgPtDist  ; //Background jet particle pt distribution
-
-  //Variable cone and pt threshold
-  TH2F * fhJetRatios[5][5]; //Ratio of pt jet and pt gamma
-  TH2F * fhJetPts[5][5]; //reconstructed pt jet vs prompt pt gamma
-  TH2F * fhBkgRatios[5][5];  //leading pt bakground / pt gamma 
-  TH2F * fhBkgPts[5][5]; //leading pt bakground vs pt gamma 
-  
-  TH2F * fhNLeadings[5][5];  //Accepted leading particle pt distribution
-  TH1F * fhNJets[5][5]; //Accepted reconstructed Jet pt distribution 
-  TH1F * fhNBkgs[5][5]; //Bakground multiplicity
-  
-  TH2F * fhJetFragments[5][5];//Accepted reconstructed jet fragmentation function
-  TH2F * fhBkgFragments[5][5];  //Background "fragmentation function"
-  TH2F * fhJetPtDists[5][5]; //Jet particle pt distribution
-  TH2F * fhBkgPtDists[5][5]; //Background jet particle pt distribution
-  
-
-  ClassDef(AliAnaGammaJetLeadCone,1)
-} ;
-
-#endif //ALIANAGAMMAJETLEADCONE_H
-
-
-
diff --git a/PWG4/AliAnaGammaParton.cxx b/PWG4/AliAnaGammaParton.cxx
deleted file mode 100644 (file)
index f3a824a..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.3  2007/09/26 11:07:19  schutz
- * Update classes for the new analysis framwork
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-//_________________________________________________________________________
-// Class for the analysis of gamma-parton correlations
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-#include "Riostream.h"
-
-//---- AliRoot system ----
-#include "AliAnaGammaParton.h" 
-#include "AliLog.h"
-  
-  ClassImp(AliAnaGammaParton)
-  
-
-//____________________________________________________________________________
-  AliAnaGammaParton::AliAnaGammaParton() : 
-    AliAnaGammaCorrelation(),   
-    fhDeltaEtaParton(0), fhDeltaPhiParton(0), 
-    fhDeltaPtParton(0), fhPtRatParton(0)
-{
-  //Default Ctor
-
-  SetCorrelationType(kParton);
-  //Initialize parameters
-  InitParameters();
-}
-
-//____________________________________________________________________________
-AliAnaGammaParton::AliAnaGammaParton(const AliAnaGammaParton & g) :   
-  AliAnaGammaCorrelation(g),   
-  fhDeltaEtaParton(g.fhDeltaEtaParton), fhDeltaPhiParton(g.fhDeltaPhiParton), 
-  fhDeltaPtParton(g.fhDeltaPtParton), fhPtRatParton(g.fhPtRatParton)
-{
-  // cpy ctor
-
-}
-
-//_________________________________________________________________________
-AliAnaGammaParton & AliAnaGammaParton::operator = (const AliAnaGammaParton & source)
-{
-  // assignment operator
-
-  if(this == &source)return *this;
-  ((AliAnaGammaCorrelation *)this)->operator=(source);
-  fhDeltaEtaParton = source.fhDeltaEtaParton;
-  fhDeltaPhiParton = source.fhDeltaPhiParton;
-  fhDeltaPtParton = source.fhDeltaPtParton;
-  fhPtRatParton = source.fhPtRatParton;
-  
-  return *this;
-
-}
-
-//____________________________________________________________________________
-AliAnaGammaParton::~AliAnaGammaParton() 
-{
-  // Remove all pointers except analysis output pointers.
-
-}
-
-
-//________________________________________________________________________
-TList *  AliAnaGammaParton::GetCreateOutputObjects()
-{  
-  // Create histograms to be saved in output file and 
-  // store them in fOutputContainer
-
-  AliDebug(1,"Init parton histograms");
-
-  TList * outputContainer = new TList() ; 
-  outputContainer->SetName("GammaPartonHistos") ; 
-
-  //---kParton---
-  fhDeltaPhiParton  = new TH2F
-    ("DeltaPhiParton","#phi_{#gamma} - #phi_{parton} vs p_{T #gamma}",
-     200,0,120,200,0,6.4); 
-  fhDeltaPhiParton->SetYTitle("#Delta #phi");
-  fhDeltaPhiParton->SetXTitle("p_{T #gamma} (GeV/c)");
-  outputContainer->Add(fhDeltaPhiParton);
-
-  fhDeltaEtaParton  = new TH2F
-    ("DeltaEtaParton","#eta_{#gamma} - #eta_{parton} vs p_{T #gamma}",
-     200,0,120,200,-2,2); 
-  fhDeltaEtaParton->SetYTitle("#Delta #eta");
-  fhDeltaEtaParton->SetXTitle("p_{T #gamma} (GeV/c)");
-  outputContainer->Add(fhDeltaEtaParton);
-
-  fhDeltaPtParton  = new TH2F
-    ("DeltaPtParton","#p_{T #gamma} - #p_{T parton} vs p_{T #gamma}",
-     200,0,120,100,-10,10); 
-  fhDeltaPtParton->SetYTitle("#Delta #p_{T}");
-  fhDeltaPtParton->SetXTitle("p_{T #gamma} (GeV/c)"); 
-  outputContainer->Add(fhDeltaPtParton);
-
-  fhPtRatParton  = new TH2F
-    ("PtRatParton","#p_{T parton} / #p_{T #gamma} vs p_{T #gamma}",
-     200,0,120,200,0,5); 
-  fhPtRatParton->SetYTitle("ratio");
-  fhPtRatParton->SetXTitle("p_{T #gamma} (GeV/c)");
-  outputContainer->Add(fhPtRatParton);
-
-  SetOutputContainer(outputContainer);
-
-  return outputContainer;
-}
-
- //____________________________________________________________________________
-void AliAnaGammaParton::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-
-  ;
-
-}
-
-//__________________________________________________________________
-void AliAnaGammaParton::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-} 
-
-//__________________________________________________________________
-void  AliAnaGammaParton::MakeGammaCorrelation(TParticle * pGamma, TClonesArray *pl, TClonesArray *) 
-{
-  //Gamma Parton Correlation Analysis
-  AliDebug(2, "Begin parton analysis");
-  
-  Double_t ptg  = pGamma->Pt();
-  Double_t phig = pGamma->Phi();
-  Double_t etag = pGamma->Eta();
-  
-  Double_t pt    = -100.;
-  Double_t eta   = -100.; 
-  Double_t phi   = -100. ;
-  for(Int_t ipr = 0;ipr < pl->GetEntries() ; ipr ++ ){//fCaloList==parton list
-    TParticle * particle = dynamic_cast<TParticle *>(pl->At(ipr)) ;
-    
-    if(particle->GetPdgCode() !=22 && (ipr ==4 || ipr == 5)){// 6 or 7 in list.
-      //Only good for gamma-jet events
-      pt    = particle->Pt();
-      phi   = particle->Phi() ;
-      eta   = particle->Eta() ;
-    }
-  }
-  
-  fhDeltaEtaParton->Fill(ptg,etag-eta);
-  fhDeltaPhiParton->Fill(ptg,phig-phi);
-  fhDeltaPtParton->Fill(ptg,ptg-pt);
-  fhPtRatParton->Fill(ptg,pt/ptg);
-  
-  AliDebug(2, "End of parton analysis");
-  
-} 
diff --git a/PWG4/AliAnaGammaParton.h b/PWG4/AliAnaGammaParton.h
deleted file mode 100644 (file)
index e2342ff..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef ALIANAGAMMAPARTON_H
-#define ALIANAGAMMAPARTON_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.3  2007/09/26 11:07:19  schutz
- * Update classes for the new analysis framwork
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class that contains the algorithm for the analysis of gamma-parton correlation 
-//-- Author: Gustavo Conesa (INFN-LNF)
-
-#include "AliAnaGammaCorrelation.h"
-     
-class AliAnaGammaParton : public AliAnaGammaCorrelation {
-       
-  public: 
-       
-       AliAnaGammaParton() ; // default ctor
-       AliAnaGammaParton(const AliAnaGammaParton & g) ; // cpy ctor
-       AliAnaGammaParton & operator = (const AliAnaGammaParton & g) ;//cpy assignment
-       virtual ~AliAnaGammaParton() ; //virtual dtor
-              
-       TList * GetCreateOutputObjects();
-       
-       void InitParameters();
-       
-       void Print(const Option_t * opt) const;
-       
-       void MakeGammaCorrelation( TParticle * pGamma, TClonesArray *pl, TClonesArray *)  ;
-       
-  private:
-       
-       TH2F * fhDeltaEtaParton; //Difference of parton eta and prompt gamma eta
-       TH2F * fhDeltaPhiParton; //Difference of parton phi and prompt gamma phi
-       TH2F * fhDeltaPtParton; //Difference of parton pT and prompt gamma pT
-       TH2F * fhPtRatParton; //Ratio of parton pT and prompt gamma pT
-       
-       ClassDef(AliAnaGammaParton,1)
- } ;
-
-
-#endif //ALIANAGAMMAPARTON_H
-
-
-
diff --git a/PWG4/AliAnaGammaPhos.cxx b/PWG4/AliAnaGammaPhos.cxx
deleted file mode 100644 (file)
index 5b795cf..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id: */
-
-//_________________________________________________________________________
-// A basic analysis task to analyse photon detected by PHOS
-// A basic analysis task to analyse photon detected by PHOS
-// A basic analysis task to analyse photon detected by PHOS
-// A basic analysis task to analyse photon detected by PHOS
-// A basic analysis task to analyse photon detected by PHOS
-//
-//*-- Yves Schutz 
-//////////////////////////////////////////////////////////////////////////////
-
-#include <TCanvas.h>
-#include <TChain.h>
-#include <TFile.h> 
-#include <TH1.h>
-#include <TLegend.h> 
-#include <TNtuple.h>
-#include <TROOT.h> 
-#include <TVector3.h> 
-
-#include "AliAnaGammaPhos.h" 
-#include "AliAnalysisManager.h"
-#include "AliESDEvent.h" 
-#include "AliESDCaloCluster.h" 
-#include "AliAODEvent.h"
-#include "AliAODHandler.h"
-#include "AliLog.h"
-
-//______________________________________________________________________________
-AliAnaGammaPhos::AliAnaGammaPhos() : 
-  fChain(0x0),
-  fDebug(0),
-  fESD(0x0),
-  fAOD(0x0),
-  fAODPhotons(0x0), 
-  fPhotonsInPhos(0),
-  fTreeA(0x0),
-  fPhotonId(1.0),
-  fOutputList(0x0), 
-  fhPHOSPos(0),
-  fhPHOS(0),
-  fhPHOSEnergy(0),
-  fhPHOSDigits(0),
-  fhPHOSRecParticles(0),
-  fhPHOSPhotons(0),
-  fhPHOSInvariantMass(0),
-  fhPHOSDigitsEvent(0)
-{
-  //Default constructor
-}
-//______________________________________________________________________________
-AliAnaGammaPhos::AliAnaGammaPhos(const char *name) : 
-  AliAnalysisTask(name,""),  
-  fChain(0x0),
-  fDebug(0),
-  fESD(0x0),
-  fAOD(0x0),
-  fAODPhotons(0x0), 
-  fPhotonsInPhos(0),
-  fTreeA(0x0),
-  fPhotonId(1.0),
-  fOutputList(0x0), 
-  fhPHOSPos(0),
-  fhPHOS(0),
-  fhPHOSEnergy(0),
-  fhPHOSDigits(0),
-  fhPHOSRecParticles(0),
-  fhPHOSPhotons(0),
-  fhPHOSInvariantMass(0),
-  fhPHOSDigitsEvent(0)
-{
-  // Constructor.
-  // Input slot #0 
-  DefineInput(0, TChain::Class());
-  // Output slots 
-  DefineOutput(0,  TTree::Class()) ; 
-  DefineOutput(1,  TList::Class()) ; 
-}
-
-//____________________________________________________________________________
-AliAnaGammaPhos::AliAnaGammaPhos(const AliAnaGammaPhos& ap) :
-  AliAnalysisTask(ap.GetName(),""),  
-  fChain(ap.fChain),
-  fDebug(ap.fDebug),
-  fESD(ap.fESD),
-  fAOD(ap.fAOD),
-  fAODPhotons(ap.fAODPhotons), 
-  fPhotonsInPhos(ap.fPhotonsInPhos),
-  fTreeA(ap.fTreeA),
-  fPhotonId(ap.fPhotonId),
-  fOutputList(ap.fOutputList), 
-  fhPHOSPos(ap.fhPHOSPos),
-  fhPHOS(ap.fhPHOS),
-  fhPHOSEnergy(ap.fhPHOSEnergy),
-  fhPHOSDigits(ap.fhPHOSDigits),
-  fhPHOSRecParticles(ap.fhPHOSRecParticles),
-  fhPHOSPhotons(ap.fhPHOSPhotons),
-  fhPHOSInvariantMass(ap.fhPHOSInvariantMass),
-  fhPHOSDigitsEvent(ap.fhPHOSDigitsEvent)
-{ 
-  // cpy ctor
-}
-
-//_____________________________________________________________________________
-AliAnaGammaPhos& AliAnaGammaPhos::operator = (const AliAnaGammaPhos& ap)
-{
-// assignment operator
-
-  this->~AliAnaGammaPhos();
-  new(this) AliAnaGammaPhos(ap);
-  return *this;
-}
-
-//______________________________________________________________________________
-AliAnaGammaPhos::~AliAnaGammaPhos()
-{
-  // dtor
-  //  fOutputList->Clear() ; 
-  //delete fOutputList ;
-}
-
-
-//______________________________________________________________________________
-void AliAnaGammaPhos::ConnectInputData(const Option_t*)
-{
-  // Initialisation of branch container and histograms 
-    
-  AliInfo(Form("*** Initialization of %s", GetName())) ; 
-  
-  // Get input data
-  fChain = dynamic_cast<TChain *>(GetInputData(0)) ;
-  if (!fChain) {
-    AliError(Form("Input 0 for %s not found\n", GetName()));
-    return ;
-  }
-  
-  fESD = new AliESDEvent();
-  fESD->ReadFromTree(fChain);
-
-}
-
-//________________________________________________________________________
-void AliAnaGammaPhos::CreateOutputObjects()
-{  
-  // Create the outputs containers
-  OpenFile(0) ;
-  AliAODHandler* handler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());  
-  fTreeA = handler->GetTree() ; 
-  fAOD   = handler->GetAOD();
-  fAODPhotons = fAOD->GetCaloClusters() ; 
-  
-
-  OpenFile(1) ; 
-
-  fhPHOSPos            = new TNtuple("PHOSPos"         , "Position in PHOS"  , "x:y:z");
-  fhPHOS               = new TNtuple("PHOS"            , "PHOS"  , "event:digits:clusters:photons");
-  fhPHOSEnergy         = new TH1D("PHOSEnergy"         , "PHOSEnergy"        , 100, 0., 100. ) ;
-  fhPHOSDigits         = new TH1I("PHOSDigitsCluster"  , "PHOSDigits"        , 20 , 0 , 20  ) ;
-  fhPHOSRecParticles   = new TH1D("PHOSRecParticles"   , "PHOSRecParticles" , 20 , 0., 20. ) ;
-  fhPHOSPhotons        = new TH1I("PHOSPhotons"        , "PHOSPhotons"       , 20 , 0 , 20  ) ;
-  fhPHOSInvariantMass  = new TH1D("PHOSInvariantMass"  , "PHOSInvariantMass" , 400, 0., 400.) ;
-  fhPHOSDigitsEvent    = new TH1I("PHOSDigitsEvent"    , "PHOSDigitsEvent"   , 30 , 0 , 30  ) ;
-  
-  // create output container
-  
-  fOutputList = new TList() ; 
-  fOutputList->SetName(GetName()) ; 
-
-  fOutputList->AddAt(fhPHOSPos,             0) ; 
-  fOutputList->AddAt(fhPHOS,                1) ; 
-  fOutputList->AddAt(fhPHOSEnergy,          2) ; 
-  fOutputList->AddAt(fhPHOSDigits,          3) ; 
-  fOutputList->AddAt(fhPHOSRecParticles,    4) ; 
-  fOutputList->AddAt(fhPHOSPhotons,         5) ; 
-  fOutputList->AddAt(fhPHOSInvariantMass,   6) ; 
-  fOutputList->AddAt(fhPHOSDigitsEvent,     7) ; 
-}
-
-//______________________________________________________________________________
-void AliAnaGammaPhos::Exec(Option_t *) 
-{
-  // Processing of one event
-  
-  Long64_t entry = fChain->GetReadEntry() ;
-  
-  if (!fESD) {
-    AliError("fESD is not connected to the input!") ; 
-    return ; 
-  }
-  
-  // if ( !((entry-1)%100) ) 
-  AliInfo(Form("%s ----> Processing event # %lld",  (dynamic_cast<TChain *>(fChain))->GetFile()->GetName(), entry)) ; 
-  
-  //************************  PHOS *************************************
-  TRefArray * caloClustersArr  = new TRefArray();  
-  fESD->GetPHOSClusters(caloClustersArr);
-
-  const Int_t kNumberOfPhosClusters   = caloClustersArr->GetEntries() ;  
-  
-  TVector3 ** phosVector       = new TVector3*[kNumberOfPhosClusters] ;
-  Float_t  * phosPhotonsEnergy = new Float_t[kNumberOfPhosClusters] ;
-  Int_t      phosCluster ; 
-  Int_t      numberOfDigitsInPhos   = 0 ;
-  
-  fPhotonsInPhos  = 0 ;
-  // loop over the PHOS Cluster
-  for(phosCluster = 0 ; phosCluster < kNumberOfPhosClusters ; phosCluster++) {
-    AliESDCaloCluster * caloCluster = (AliESDCaloCluster *) caloClustersArr->At(phosCluster) ;
-    //AliESDCaloCluster * caloCluster = fESD->GetCaloCluster(phosCluster) ;
-    if (caloCluster) {
-      Float_t pos[3] ;
-      caloCluster->GetPosition( pos ) ;
-      fhPHOSEnergy->Fill( caloCluster->E() ) ;
-      fhPHOSPos->Fill( pos[0], pos[1], pos[2] ) ;
-      fhPHOSDigits->Fill(entry, caloCluster->GetNCells() ) ;
-      numberOfDigitsInPhos += caloCluster->GetNCells() ;
-      Double_t * pid = caloCluster->GetPid() ;
-      if(pid[AliPID::kPhoton] > GetPhotonId() ) {
-       phosVector[fPhotonsInPhos] = new TVector3(pos[0],pos[1],pos[2]) ;
-       phosPhotonsEnergy[fPhotonsInPhos]=caloCluster->E() ;
-        //new ((*fAODPhotons)[fPhotonsInPhos++;]) AliAODPhoton ( );
-      }
-    }
-  } //PHOS clusters
-    
-  fhPHOSRecParticles->Fill(kNumberOfPhosClusters);
-  fhPHOSPhotons->Fill(fPhotonsInPhos);
-  fhPHOSDigitsEvent->Fill(numberOfDigitsInPhos);
-  fhPHOS->Fill(entry, numberOfDigitsInPhos, kNumberOfPhosClusters, fPhotonsInPhos) ; 
-
-  // invariant Mass
-  if (fPhotonsInPhos > 1 ) {
-    Int_t phosPhoton1, phosPhoton2 ; 
-    for(phosPhoton1 = 0 ; phosPhoton1 < fPhotonsInPhos ; phosPhoton1++) {
-      for(phosPhoton2 = phosPhoton1 + 1 ; phosPhoton2 < fPhotonsInPhos ; phosPhoton2++) {      
-       Float_t tempMass = TMath::Sqrt( 2 * phosPhotonsEnergy[phosPhoton1] * phosPhotonsEnergy[phosPhoton2] *
-                                       ( 1 - TMath::Cos(phosVector[phosPhoton1]->Angle(*phosVector[phosPhoton2])) ) 
-                                       );
-       fhPHOSInvariantMass->Fill(tempMass*1000.);
-      }
-    }    
-  }
-    
-  PostData(0, fTreeA) ; 
-  PostData(1, fOutputList);
-
-  delete [] phosVector ; 
-  delete [] phosPhotonsEnergy ; 
-  
-}
-
-
-//______________________________________________________________________________
-void AliAnaGammaPhos::Init()
-{
-  // Intialisation of parameters
-  AliInfo("Doing initialisation") ; 
-  SetPhotonId(0.9) ; 
-}
-
-//______________________________________________________________________________
-void AliAnaGammaPhos::Terminate(Option_t *)
-{
-  // Processing when the event loop is ended
-
-//   fOutputList = (TList*)GetOutputData(0);  
-//   fhPHOSPos            = (TNtuple*)fOutputList->At(0);
-//   fhPHOS               = (TNtuple*)fOutputList->At(1);
-//   fhPHOSEnergy         = (TH1D*)fOutputList->At(2);
-//   fhPHOSDigits         = (TH1I*)fOutputList->At(3);
-//   fhPHOSRecParticles   = (TH1D*)fOutputList->At(4);
-//   fhPHOSPhotons        = (TH1I*)fOutputList->At(5);
-//   fhPHOSInvariantMass  = (TH1D*)fOutputList->At(6);
-//   fhPHOSDigitsEvent    = (TH1I*)fOutputList->At(7);
-
-  
-  Bool_t problem = kFALSE ; 
-  AliInfo(Form(" *** %s Report:", GetName())) ; 
-  printf("        PHOSEnergy Mean         : %5.3f , RMS : %5.3f \n", fhPHOSEnergy->GetMean(),         fhPHOSEnergy->GetRMS()         ) ;
-  printf("        PHOSDigits Mean         : %5.3f , RMS : %5.3f \n", fhPHOSDigits->GetMean(),         fhPHOSDigits->GetRMS()         ) ;
-  printf("        PHOSRecParticles Mean   : %5.3f , RMS : %5.3f \n", fhPHOSRecParticles->GetMean(),   fhPHOSRecParticles->GetRMS()   ) ;
-  printf("        PHOSPhotons Mean        : %5.3f , RMS : %5.3f \n", fhPHOSPhotons->GetMean(),        fhPHOSPhotons->GetRMS()        ) ;
-  printf("        PHOSInvariantMass Mean  : %5.3f , RMS : %5.3f \n", fhPHOSInvariantMass->GetMean(),  fhPHOSInvariantMass->GetRMS()  ) ;
-  printf("        PHOSDigitsEvent Mean    : %5.3f , RMS : %5.3f \n", fhPHOSDigitsEvent->GetMean(),    fhPHOSDigitsEvent->GetRMS()    ) ;
-
-  TCanvas  * cPHOS = new TCanvas("cPHOS", "PHOS ESD Test", 400, 10, 600, 700) ;
-  cPHOS->Divide(3, 2);
-
-  cPHOS->cd(1) ; 
-  if ( fhPHOSEnergy->GetMaximum() > 0. ) 
-    gPad->SetLogy();
-  fhPHOSEnergy->SetAxisRange(0, 25.);
-  fhPHOSEnergy->SetLineColor(2);
-  fhPHOSEnergy->Draw();
-
-  cPHOS->cd(2) ; 
-  fhPHOSDigits->SetAxisRange(0,25.);
-  fhPHOSDigits->SetLineColor(2);
-  fhPHOSDigits->Draw();
-
-  cPHOS->cd(3) ; 
-  if ( fhPHOSRecParticles->GetMaximum() > 0. ) 
-    gPad->SetLogy();
-  fhPHOSRecParticles->SetAxisRange(0, 25.);
-  fhPHOSRecParticles->SetLineColor(2);
-  fhPHOSRecParticles->Draw();
-
-  cPHOS->cd(4) ; 
-  if ( fhPHOSPhotons->GetMaximum() > 0. ) 
-    gPad->SetLogy();
-  fhPHOSPhotons->SetAxisRange(0,25.);
-  fhPHOSPhotons->SetLineColor(2);
-  fhPHOSPhotons->Draw();
-
-  cPHOS->cd(5) ; 
-  fhPHOSInvariantMass->SetLineColor(2);
-  fhPHOSInvariantMass->Draw();
-  cPHOS->cd(6) ; 
-  if ( fhPHOSDigitsEvent->GetMaximum() > 0. ) 
-    gPad->SetLogy();
-  fhPHOSDigitsEvent->SetAxisRange(0,40.);
-  fhPHOSDigitsEvent->SetLineColor(2);
-  fhPHOSDigitsEvent->Draw();
-  cPHOS->Print("PHOS.eps");
-  char line[1024] ; 
-  sprintf(line, ".!tar -zcf %s.tar.gz *.eps", GetName()) ; 
-  gROOT->ProcessLine(line);
-  sprintf(line, ".!rm -fR *.eps"); 
-  gROOT->ProcessLine(line);
-  AliInfo(Form("!!! All the eps files are in %s.tar.gz !!!", GetName())) ;
-
-  char * report ; 
-  if(problem)
-    report="Problems found, please check!!!";  
-  else 
-    report="OK";
-
-  AliInfo(Form("*** %s Summary Report: %s \n",GetName(), report)) ; 
-}
diff --git a/PWG4/AliAnaGammaPhos.h b/PWG4/AliAnaGammaPhos.h
deleted file mode 100644 (file)
index b7c565e..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef ALIANAGAMMAPHOS_H
-#define ALIANAGAMMAPHOS_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-//______________________________________________________________________________
-// A basic analysis task to analyse photon detected by PHOS
-// A basic analysis task to analyse photon detected by PHOS
-// A basic analysis task to analyse photon detected by PHOS
-//
-//*-- Yves Schutz 
-//////////////////////////////////////////////////////////////////////////////
-
-#include <TTree.h> 
-#include "AliAnalysisTask.h"  
-
-class AliESDEvent ; 
-class AliAOD ; 
-class AliAODEvent ; 
-class TNtuple ;
-class TH1D ; 
-class TH1I ; 
-class TTree ; 
-
-class AliAnaGammaPhos : public AliAnalysisTask {
-
-public:
-  AliAnaGammaPhos() ;
-  AliAnaGammaPhos(const char *name) ;
-  AliAnaGammaPhos(const AliAnaGammaPhos& ap) ;   
-  AliAnaGammaPhos& operator = (const AliAnaGammaPhos& ap) ;
-  virtual ~AliAnaGammaPhos() ;
-   
-  virtual void ConnectInputData(Option_t * = "");
-  virtual void CreateOutputObjects(); 
-  virtual void Init() ;        
-  virtual void LocalInit() { Init() ; }
-  virtual void Exec(Option_t * opt = "") ;
-  const Float_t  GetPhotonId() const { return fPhotonId ; }
-  void SetDebugLevel(Int_t level) { fDebug = level ; }
-  void SetPhotonId(Float_t threshold) { fPhotonId = threshold ; }
-  virtual void Terminate(Option_t * opt = "") ;
-
-private:
-  // input and output
-  TTree        * fChain ;         //!pointer to the analyzed TTree or TChain
-  Int_t          fDebug ;         // Debug flag
-  AliESDEvent       * fESD ;           //! ESD
-  AliAODEvent  * fAOD ;           //! AOD
-  TClonesArray * fAODPhotons ;    //! reconstructed photons
-  Int_t          fPhotonsInPhos ; //! number of photons found
-  TTree        * fTreeA ;         // tree of identified photons 
-  // task parameters
-  Float_t   fPhotonId ;  // threshold for photon identification 
-
-  // Histograms
-  TList   * fOutputList ;      //! output data list
-  TNtuple * fhPHOSPos ;                // PHOS (x,y)
-  TNtuple * fhPHOS ;           // all PHOS parameters
-  TH1D    * fhPHOSEnergy ;     // PHOS energy 
-  TH1I    * fhPHOSDigits ;     // PHOS numer of SDigits 
-  TH1D    * fhPHOSRecParticles ;// PHOS number of RecParticles
-  TH1I    * fhPHOSPhotons ;            // PHOS number of photons
-  TH1D    * fhPHOSInvariantMass ;// PHOS invariant mass
-  TH1I    * fhPHOSDigitsEvent ;                //PHOS numbet of Sdigits per event      
-   
-  ClassDef(AliAnaGammaPhos, 1); // a PHOS photon analysis task 
-};
-#endif // ALIANAGAMMAPHOS_H
diff --git a/PWG4/AliAnaGammaSelection.cxx b/PWG4/AliAnaGammaSelection.cxx
deleted file mode 100644 (file)
index a237ad4..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.1  2007/10/29 13:50:39  gustavo
- * New class for particle selection
- *
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for plotting particle/cluster/track distributions without cuts 
-// and select clusters/tracks/particles needed in the analysis
-// depending on PID criteria or other. 
-//
-//
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-  
-  
-// --- ROOT system --- 
-#include <TParticle.h>
-#include <TH2.h>
-#include <TList.h>
-#include "Riostream.h"
-#include "TROOT.h"
-
-// --- AliRoot system --- 
-#include "AliAnaGammaSelection.h" 
-#include "AliLog.h"
-
-ClassImp(AliAnaGammaSelection)
-  
-//____________________________________________________________________________
-  AliAnaGammaSelection::AliAnaGammaSelection() : 
-    TObject(), fAnaMC(0), fFillCTS(0), 
-    fntEMCAL(0), fntPHOS(0), fntCTS(0)
-{
-  //default ctor
-  
-  //Initialize parameters
-  InitParameters();
-
-}
-
-//____________________________________________________________________________
-AliAnaGammaSelection::AliAnaGammaSelection(const AliAnaGammaSelection & g) : 
-  TObject(g), fAnaMC(g.fAnaMC), fFillCTS(g.fFillCTS), 
-  fntEMCAL(g.fntEMCAL),  fntPHOS(g.fntPHOS),  fntCTS(g.fntCTS)
-{
-  // cpy ctor
-
-}
-
-//_________________________________________________________________________
-AliAnaGammaSelection & AliAnaGammaSelection::operator = (const AliAnaGammaSelection & source)
-{
-  // assignment operator
-  
-  if(&source == this) return *this;
-
-  fAnaMC = source.fAnaMC ;
-  fFillCTS = source.fFillCTS ;
-  fntEMCAL = source.fntEMCAL ;  
-  fntPHOS = source.fntPHOS ;
-  fntCTS = source.fntCTS ;
-
-  return *this;
-  
-}
-
-//____________________________________________________________________________
-AliAnaGammaSelection::~AliAnaGammaSelection() 
-{
-   // Remove all pointers except analysis output pointers.
-
-}
-
-//________________________________________________________________________
-TList *  AliAnaGammaSelection::GetCreateOutputObjects()
-{  
-
-  // Create histograms to be saved in output file and 
-  // store them in outputContainer
-  TList * outputContainer = new TList() ; 
-  outputContainer->SetName("SelectionHistos") ; 
-  
-//   //Histograms of highest gamma identified in Event
-//   fhNGamma  = new TH1F("NGamma","Number of #gamma over calorimeter",240,0,120); 
-//   fhNGamma->SetYTitle("N");
-//   fhNGamma->SetXTitle("p_{T #gamma}(GeV/c)");
-//   outputContainer->Add(fhNGamma) ; 
-  
-  //NTUPLE
-  fntEMCAL = new TNtuple("ntEMCAL", "Tree of EMCAL particles before selection", "pt:phi:eta:pdg:status:ptprimary:phiprimary:etaprimary:pdgprimary:statusprimary");
-  outputContainer->Add(fntEMCAL) ;
-  fntPHOS = new TNtuple("ntPHOS", "Tree of PHOS particles before selection", "pt:phi:eta:pdg:status:ptprimary:phiprimary:etaprimary:pdgprimary:statusprimary");
-  //outputContainer->Add(fntPHOS) ;
-  fntCTS = new TNtuple("ntCTS", "Tree of CTS particles before selection", "pt:phi:eta:pdg:status:ptprimary:phiprimary:etaprimary:pdgprimary:statusprimary");
-  //outputContainer->Add(fntCTS) ;
-  
-//  gROOT->cd();
-
-  return outputContainer ;
-
-}
-
-//____________________________________________________________________________
-void AliAnaGammaSelection::Selection(TString det, TClonesArray * pl, TClonesArray * plPrim) const 
-{
-  //Select particles from detector "det"
-
-  //Keep some particle info before selection
-  Float_t pt = 0, ptprimary = 0 ;
-  Float_t phi = 0, phiprimary = 0 ;
-  Float_t eta = 0, etaprimary = 0 ;
-  Int_t pdg = 0, pdgprimary = 0 ;
-  Int_t status = 0, statusprimary = 0 ;
-
-  for(Int_t ipr = 0;ipr < pl->GetEntries() ; ipr ++ ){
-    TParticle * particle = dynamic_cast<TParticle *>(pl->At(ipr)) ;
-    pt = particle->Pt();
-    phi = particle->Phi();
-    eta = particle->Eta();
-    pdg =  TMath::Abs(particle->GetPdgCode()) ;
-    status = particle->GetStatusCode(); // = 2 means decay gamma!!!
-    
-    if(fAnaMC){
-      TParticle * primary = dynamic_cast<TParticle *>(plPrim->At(ipr)) ;
-      ptprimary = primary->Pt();
-      phiprimary = primary->Phi();
-      etaprimary = primary->Eta();
-      pdgprimary =  TMath::Abs(primary->GetPdgCode()) ;
-      statusprimary = primary->GetStatusCode(); // = 2 means decay gamma!!!
-    }
-
-    gROOT->cd();
-    if(det == "EMCAL")
-    fntEMCAL->Fill(pt,phi,eta,pdg,status,ptprimary,phiprimary, etaprimary,pdgprimary,statusprimary);
-    else if(det == "PHOS")
-      fntPHOS->Fill(pt,phi,eta,pdg,status,ptprimary,phiprimary, etaprimary,pdgprimary,statusprimary);
-    else
-      fntCTS->Fill(pt,phi,eta,pdg,status,ptprimary,phiprimary, etaprimary,pdgprimary,statusprimary);
-  }
-  
-}
-
-  //____________________________________________________________________________
-void AliAnaGammaSelection::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-
-  fAnaMC = kFALSE ;
-  fFillCTS = kFALSE ;
-}
-
-
-//__________________________________________________________________
-void AliAnaGammaSelection::Print(const Option_t * opt) const
-{
-  
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-  Info("Print", "%s %s", GetName(), GetTitle() ) ; 
-  printf("Is MC option selected     %d\n",  fAnaMC) ;
-  printf("    \n") ;
-  
-} 
diff --git a/PWG4/AliAnaGammaSelection.h b/PWG4/AliAnaGammaSelection.h
deleted file mode 100644 (file)
index be49f51..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef ALIANAGAMMASELECTION_H
-#define ALIANAGAMMASELECTION_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for plotting particle/cluster/track distributions without cuts 
-// and select clusters/tracks/particles needed in the analysis
-// depending on PID criteria or other. 
-//
-//
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-#include <TParticle.h> 
-#include <TClonesArray.h> 
-#include "TObject.h" 
-#include <TH2F.h>
-#include <TNtuple.h>
-#include <TString.h>
-
-class TList ;
-
-class AliAnaGammaSelection : public TObject {
-
-public: 
-
-  AliAnaGammaSelection() ; // default ctor
-  AliAnaGammaSelection(const AliAnaGammaSelection & g) ; // cpy ctor
-  AliAnaGammaSelection & operator = (const AliAnaGammaSelection & g) ;//cpy assignment
-  virtual ~AliAnaGammaSelection() ; //virtual dtor
-  
-  enum Det {kEMCAL, kPHOS, kCTS};
-
-  void InitParameters();
-  
-  Bool_t     IsMC() const {return fAnaMC ; };
-  Bool_t      FillCTS() const {return fFillCTS ;};
-
-  TList *  GetCreateOutputObjects();
-  void Selection(TString det, TClonesArray * pl, TClonesArray * plPrim)  const;
-  
-  void Print(const Option_t * opt)const;
-
-  void SetFillCTS(Bool_t f) {fFillCTS = f;}
-  void SetMC()    {fAnaMC = kTRUE ; }
-  
-  
-  private:
-  Bool_t fAnaMC ; //Set in case of using MCData reader 
-  Bool_t fFillCTS ; //Keep CTS info in fntCTS
-  
-  //Histograms  
-  TNtuple *    fntEMCAL ; //ntuple of EMCAL particles before selection.
-  TNtuple *    fntPHOS ; //ntuple of PHOS particles before selection.
-  TNtuple *    fntCTS ; //ntuple of CTS particles before selection.
-
-  ClassDef(AliAnaGammaSelection,1)
-} ;
-
-#endif //ALIANAGAMMASELECTION_H
-
-
-
diff --git a/PWG4/AliAnalysisTaskGamma.cxx b/PWG4/AliAnalysisTaskGamma.cxx
deleted file mode 100644 (file)
index 5b5ffcb..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-// root
-#include <TROOT.h>
-#include <TSystem.h>
-#include <TInterpreter.h>
-#include <TChain.h>
-#include <TFile.h>
-#include <Riostream.h>
-
-// analysis
-#include "AliAnalysisTaskGamma.h"
-#include "AliAnalysisManager.h"
-#include "AliESDInputHandler.h"
-#include "AliMCEventHandler.h"
-#include "AliMCEvent.h"
-#include "AliAnaGamma.h"
-#include "AliGammaReader.h"
-#include "AliESDEvent.h"
-#include "AliAODEvent.h"
-#include "AliAODHandler.h"
-#include "AliStack.h"
-#include "AliLog.h"
-
-ClassImp(AliAnalysisTaskGamma)
-
-////////////////////////////////////////////////////////////////////////
-
-  AliAnalysisTaskGamma::AliAnalysisTaskGamma():
-    AliAnalysisTaskSE(),
-    fAna(0x0),
-    fOutputContainer(0x0),
-    fConfigName(0)
-{
-  // Default constructor
-}
-
-//_____________________________________________________
-AliAnalysisTaskGamma::AliAnalysisTaskGamma(const char* name):
-    AliAnalysisTaskSE(name),
-    fAna(0x0),
-    fOutputContainer(0x0),
-    fConfigName("ConfigGammaAnalysis")
-{
-  // Default constructor
-
-  DefineOutput(1, TList::Class());
-
-}
-
-//_____________________________________________________
-AliAnalysisTaskGamma::~AliAnalysisTaskGamma() 
-{
-  // Remove all pointers
-  if(fOutputContainer){
-    fOutputContainer->Clear() ; 
-    delete fOutputContainer ;
-  }
-
-}
-
-//_____________________________________________________
-void AliAnalysisTaskGamma::UserCreateOutputObjects()
-{
-  // Create the output container
-  
-  //AODs
-
-  fAna->ConnectAOD(AODEvent());
-
-  //Histograms container
-  OpenFile(1);
-  fOutputContainer = fAna->GetOutputContainer();
-  
-}
-
-//_____________________________________________________
-void AliAnalysisTaskGamma::Init()
-{
-  // Initialization
-  AliDebug(1,"Begin");
-  
-  // Call configuration file
-
-  if(fConfigName == ""){
-    fConfigName="ConfigGammaAnalysis";
-  }
-  AliInfo(Form("### Configuration file is %s.C ###", fConfigName.Data()));
-  gROOT->LoadMacro(fConfigName+".C");
-  fAna = (AliAnaGamma*) gInterpreter->ProcessLine("ConfigGammaAnalysis()");
-  
-  if(!fAna)
-    AliFatal("Analysis pointer not initialized, abort analysis!");
-  
-  // Initialise Gamma Analysis
-  fAna->Init();
-  
-  AliDebug(1,"End");
-  
-}
-
-
-//_____________________________________________________
-void AliAnalysisTaskGamma::UserExec(Option_t */*option*/)
-{
-  // Execute analysis for current event
-  //
-
-  //Get the type of data, check if type is correct
-  Int_t  datatype = fAna->GetReader()->GetDataType();
-  if(datatype != AliGammaReader::kData && 
-     datatype != AliGammaReader::kMC && 
-     datatype != AliGammaReader::kMCData){
-    AliFatal("Wrong type of data");
-    return ;
-  }
-  
-  fAna->SetData(InputEvent());
-  
-  //In case of montecarlo analysis, pass the stack also.
-  if((datatype == AliGammaReader::kMC || datatype == AliGammaReader::kMCData ) && MCEvent())
-    fAna -> SetKine(MCEvent()->Stack());
-  
-  //Process event
-  fAna->ProcessEvent();
-  
-  PostData(1, fOutputContainer);
-  
-}
-
-//_____________________________________________________
-void AliAnalysisTaskGamma::Terminate(Option_t */*option*/)
-{
-  // Terminate analysis
-  //
-  AliDebug(1,"Do nothing in Terminate");
-  //fAna->Terminate();
-}
-
diff --git a/PWG4/AliAnalysisTaskGamma.h b/PWG4/AliAnalysisTaskGamma.h
deleted file mode 100644 (file)
index 8a748f1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef ALIANALYSISTASKGAMMA_H
-#define ALIANALYSISTASKGAMMA_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-#include "AliAnalysisTaskSE.h"
-class AliAnaGamma;
-class AliESDEvent;
-class AliAODEvent;
-class TList;
-
-class AliAnalysisTaskGamma : public AliAnalysisTaskSE
-{
- public:
-    AliAnalysisTaskGamma();
-    AliAnalysisTaskGamma(const char* name);
-    virtual ~AliAnalysisTaskGamma() ;// virtual dtor
-    // Implementation of interface methods
-    virtual void UserCreateOutputObjects();
-    virtual void Init();
-    virtual void LocalInit() {Init();}
-    virtual void UserExec(Option_t *option);
-    virtual void Terminate(Option_t *option);
-
-    void SetConfigFileName(TString name ) {fConfigName = name ; }
-    TString GetConfigFileName() const {return fConfigName ; }
-
- private:
-    AliAnalysisTaskGamma(const AliAnalysisTaskGamma&); // Not implemented
-    AliAnalysisTaskGamma& operator=(const AliAnalysisTaskGamma&); // Not implemented
-
-    AliAnaGamma* fAna; //  Pointer to the jet finder 
-    TList * fOutputContainer ; // Histogram container
-    TString fConfigName ; //Configuration file name
-
-    ClassDef(AliAnalysisTaskGamma, 2); // Analysis task for standard gamma correlation analysis
-};
-#endif //ALIANALYSISTASKGAMMA_H
diff --git a/PWG4/AliGammaDataReader.cxx b/PWG4/AliGammaDataReader.cxx
deleted file mode 100644 (file)
index 5dbdd83..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for reading data (ESDs) in order to do prompt gamma correlations
-//  Class created from old AliPHOSGammaJet 
-//  (see AliRoot versions previous Release 4-09)
-//
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-#include <TParticle.h>
-#include <TFormula.h>
-
-//---- ANALYSIS system ----
-#include "AliGammaDataReader.h" 
-#include "AliESDEvent.h"
-#include "AliESDVertex.h"
-#include "AliESDCaloCluster.h"
-#include "AliLog.h"
-
-ClassImp(AliGammaDataReader)
-
-//____________________________________________________________________________
-AliGammaDataReader::AliGammaDataReader() : 
-  AliGammaReader()
-{
-  //Default Ctor
-  
-  //Initialize parameters
-  fDataType=kData;
-  
-}
-
-//____________________________________________________________________________
-AliGammaDataReader::AliGammaDataReader(const AliGammaDataReader & g) :   
-  AliGammaReader(g)
-{
-  // cpy ctor
-}
-
-//_________________________________________________________________________
-AliGammaDataReader & AliGammaDataReader::operator = (const AliGammaDataReader & source)
-{
-  // assignment operator
-
-  if(&source == this) return *this;
-
-  return *this;
-
-}
-
-//____________________________________________________________________________
-void AliGammaDataReader::CreateParticleList(TObject * data, TObject *,
-                                           TClonesArray * plCTS, 
-                                           TClonesArray * plEMCAL,  
-                                           TClonesArray * plPHOS, 
-                                           TClonesArray * , 
-                                           TClonesArray * ,  
-                                           TClonesArray * ){
-  
-  //Create a list of particles from the ESD. These particles have been measured 
-  //by the Central Tracking system (TPC+ITS+...), PHOS and EMCAL 
-
-  AliESDEvent* esd = (AliESDEvent*) data;
-
-  Int_t npar  = 0 ;
-  Double_t *pid = new Double_t[AliPID::kSPECIESN];  
-   AliDebug(3,"Fill particle lists");
-  
-  //Get vertex for momentum calculation  
-  Double_t v[3] ; //vertex ;
-  esd->GetVertex()->GetXYZ(v) ; 
-  
-  //########### CALORIMETERS ##############
-    
-  Int_t nCaloCluster = esd->GetNumberOfCaloClusters() ;  
-  Int_t indexPH = plPHOS->GetEntries() ;
-  Int_t indexEM = plEMCAL->GetEntries() ;
-  
-
-  for (npar =  0; npar <  nCaloCluster; npar++) {//////////////CaloCluster loop
-    AliESDCaloCluster * clus = esd->GetCaloCluster(npar) ; // retrieve cluster from esd
-    Int_t type = clus->GetClusterType();
-    
-    //########### PHOS ##############
-    if(fSwitchOnPHOS && type ==  AliESDCaloCluster::kPHOSCluster){
-      AliDebug(4,Form("PHOS clusters: E %f, match %d", clus->E(),clus->GetTrackMatched()));
-      
-      if(clus->GetTrackMatched()==-1){
-       TLorentzVector momentum ;
-       clus->GetMomentum(momentum, v);      
-       Double_t phi = momentum.Phi();
-       if(phi<0) phi+=TMath::TwoPi() ;
-       if(momentum.Pt() > fNeutralPtCut &&  TMath::Abs(momentum.Eta()) < fPHOSEtaCut &&
-          phi > fPhiPHOSCut[0] && phi < fPhiPHOSCut[1] ) {
-         
-         pid=clus->GetPid();   
-         Int_t pdg = 22;
-           
-         if(IsPHOSPIDOn()){
-           AliDebug(5,Form("E %1.2f; PID: ph %0.2f, pi0 %0.2f, el %0.2f, conv el %0.2f,pi %0.2f, k %0.2f, p %0.2f, k0 %0.2f, n %0.2f, mu %0.2f ",
-                           momentum.E(),pid[AliPID::kPhoton],pid[AliPID::kPi0],pid[AliPID::kElectron],pid[AliPID::kEleCon],pid[AliPID::kPion],
-                           pid[AliPID::kKaon],pid[AliPID::kProton], pid[AliPID::kKaon0],pid[AliPID::kNeutron], pid[AliPID::kMuon]));
-           
-           Float_t wPhoton =  fPHOSPhotonWeight;
-           Float_t wPi0 =  fPHOSPi0Weight;
-           
-           if(fPHOSWeightFormula){
-             wPhoton = fPHOSPhotonWeightFormula->Eval(momentum.E()) ;
-             wPi0 =    fPHOSPi0WeightFormula->Eval(momentum.E());
-           }
-           
-           if(pid[AliPID::kPhoton] > wPhoton) 
-             pdg = kPhoton ;
-           else if(pid[AliPID::kPi0] > wPi0) 
-             pdg = kPi0 ; 
-           else if(pid[AliPID::kElectron] > fPHOSElectronWeight)  
-             pdg = kElectron ;
-           else if(pid[AliPID::kEleCon] > fPHOSElectronWeight) 
-             pdg = kEleCon ;
-           else if(pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton] > fPHOSChargeWeight) 
-             pdg = kChargedHadron ;  
-           else if(pid[AliPID::kKaon0]+pid[AliPID::kNeutron] > fPHOSNeutralWeight) 
-             pdg = kNeutralHadron ; 
-           
-           else if(pid[AliPID::kElectron]+pid[AliPID::kEleCon]+pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton]  >  
-                   pid[AliPID::kPhoton] + pid[AliPID::kPi0]+pid[AliPID::kKaon0]+pid[AliPID::kNeutron]) 
-             pdg = kChargedUnknown  ; 
-           else 
-             pdg = kNeutralUnknown ; 
-           //neutral cluster, unidentifed.
-         }
-         
-         if(pdg != kElectron && pdg != kEleCon && pdg !=kChargedHadron && pdg !=kChargedUnknown ){//keep only neutral particles in the array
-           TParticle * particle = new TParticle(pdg, 1, -1, -1, -1, -1, 
-                                                momentum.Px(), momentum.Py(), momentum.Pz(), momentum.E(), v[0], v[1], v[2], 0);
-           
-           AliDebug(4,Form("PHOS added: pdg %d, pt %f, phi %f, eta %f", pdg, particle->Pt(),particle->Phi(),particle->Eta()));
-           
-           new((*plPHOS)[indexPH++])   TParticle(*particle) ;
-         }
-         else AliDebug(4,Form("PHOS charged cluster NOT added: pdg %d, pt %f, phi %f, eta %f\n", 
-                              pdg, momentum.Pt(),momentum.Phi(),momentum.Eta()));      
-         
-       }//pt, eta, phi cut
-       else    AliDebug(4,"Particle not added");
-      }//track-match?
-    }//PHOS cluster
-
-    //################ EMCAL ##############
-    else if(fSwitchOnEMCAL &&  type ==  AliESDCaloCluster::kEMCALClusterv1){
-      AliDebug(4,Form("EMCAL clusters: E %f, match %d", clus->E(),clus->GetTrackMatched()));
-      
-      if(clus->GetTrackMatched()==-1 ){
-       TLorentzVector momentum ;
-       clus->GetMomentum(momentum, v); 
-       Double_t phi = momentum.Phi();
-       if(phi<0) phi+=TMath::TwoPi() ;
-       if(momentum.Pt() > fNeutralPtCut &&  TMath::Abs(momentum.Eta()) < fEMCALEtaCut &&
-          phi > fPhiEMCALCut[0] && phi < fPhiEMCALCut[1] ) {
-         
-         pid=clus->GetPid();   
-         Int_t pdg = 22;
-         
-         if(IsEMCALPIDOn()){
-           AliDebug(5,Form("E %1.2f; PID: ph %0.2f, pi0 %0.2f, el %0.2f, conv el %0.2f,pi %0.2f, k %0.2f, p %0.2f, k0 %0.2f, n %0.2f, mu %0.2f ",
-                           momentum.E(),pid[AliPID::kPhoton],pid[AliPID::kPi0],pid[AliPID::kElectron],pid[AliPID::kEleCon],pid[AliPID::kPion],
-                           pid[AliPID::kKaon],pid[AliPID::kProton], pid[AliPID::kKaon0],pid[AliPID::kNeutron], pid[AliPID::kMuon]));
-           
-           if(pid[AliPID::kPhoton] > fEMCALPhotonWeight) 
-             pdg = kPhoton ;
-           else if(pid[AliPID::kPi0] > fEMCALPi0Weight) 
-             pdg = kPi0 ; 
-           else if(pid[AliPID::kElectron] > fEMCALElectronWeight)  
-             pdg = kElectron ;
-           else if(pid[AliPID::kEleCon] > fEMCALElectronWeight) 
-             pdg = kEleCon ;
-           else if(pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton] > fEMCALChargeWeight) 
-             pdg = kChargedHadron ;  
-           else if(pid[AliPID::kKaon0]+pid[AliPID::kNeutron] > fEMCALNeutralWeight) 
-             pdg = kNeutralHadron ; 
-           else if(pid[AliPID::kElectron]+pid[AliPID::kEleCon]+pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton]  >  
-                   pid[AliPID::kPhoton] + pid[AliPID::kPi0]+pid[AliPID::kKaon0]+pid[AliPID::kNeutron]) 
-             pdg = kChargedUnknown ; 
-           else 
-             pdg = kNeutralUnknown ;
-         }
-         
-         if(pdg != kElectron && pdg != kEleCon && pdg !=kChargedHadron && pdg !=kChargedUnknown){//keep only neutral particles in the array
-           
-           TParticle * particle = new TParticle(pdg, 1, -1, -1, -1, -1, 
-                                                momentum.Px(), momentum.Py(), momentum.Pz(), momentum.E(), v[0], v[1], v[2], 0);
-           AliDebug(4,Form("EMCAL cluster added: pdg %f, pt %f, phi %f, eta %f", pdg, particle->Pt(),particle->Phi(),particle->Eta()));
-           
-           new((*plEMCAL)[indexEM++])   TParticle(*particle) ;
-         }
-         else AliDebug(4,Form("EMCAL charged cluster NOT added: pdg %d, pt %f, phi %f, eta %f", 
-                              pdg, momentum.Pt(),momentum.Phi(),momentum.Eta()));
-         
-       }//pt, phi, eta cut
-       else    AliDebug(4,"Particle not added");
-      }//track-matched
-    }//EMCAL cluster
-
-  }//cluster loop
-
-
-  //########### CTS (TPC+ITS) #####################
-  Int_t nTracks   = esd->GetNumberOfTracks() ;
-  Int_t indexCh  = plCTS->GetEntries() ;
-  
-  if(fSwitchOnCTS){
-    AliDebug(3,Form("Number of tracks %d",nTracks));
-    
-    for (npar =  0; npar <  nTracks; npar++) {////////////// track loop
-      AliESDtrack * track = esd->GetTrack(npar) ; // retrieve track from esd
-      
-      //We want tracks fitted in the detectors:
-      ULong_t status=AliESDtrack::kTPCrefit;
-      status|=AliESDtrack::kITSrefit;
-      
-      //We want tracks whose PID bit is set:
-      //     ULong_t status =AliESDtrack::kITSpid;
-      //     status|=AliESDtrack::kTPCpid;
-      
-      if ( (track->GetStatus() & status) == status) {//Check if the bits we want are set
-       // Do something with the tracks which were successfully
-       // re-fitted 
-       Double_t en = 0; //track ->GetTPCsignal() ;
-       Double_t mom[3];
-       track->GetPxPyPz(mom) ;
-       Double_t px = mom[0];
-       Double_t py = mom[1];
-       Double_t pz = mom[2]; //Check with TPC people if this is correct.
-       Int_t pdg = 11; //Give any charged PDG code, in this case electron.
-       //I just want to tag the particle as charged
-       TParticle * particle = new TParticle(pdg, 1, -1, -1, -1, -1, 
-                                            px, py, pz, en, v[0], v[1], v[2], 0);
-       
-       //TParticle * particle = new TParticle() ;
-       //particle->SetMomentum(px,py,pz,en) ;
-       if(particle->Pt() > fChargedPtCut && TMath::Abs(particle->Eta())<fCTSEtaCut)
-         new((*plCTS)[indexCh++])       TParticle(*particle) ;    
-      }// select track from refit
-    }//track loop
-  }//CTS
-  
-  AliDebug(3,Form("Particle lists filled, tracks  %d , clusters: EMCAL %d, PHOS %d", indexCh,indexEM,indexPH));
-  
-}
-
diff --git a/PWG4/AliGammaDataReader.h b/PWG4/AliGammaDataReader.h
deleted file mode 100644 (file)
index 19ee021..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef ALIGAMMADATAREADER_H
-#define ALIGAMMADATAREADER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/21 08:38:20  schutz
- * Missing heared file added
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for reading data (ESDs) in order to do prompt gamma correlations
-//  Class created from old AliPHOSGammaJet
-//  (see AliRoot versions previous Release 4-09)
-
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system --- 
-
-// --- AliRoot system ---
-#include "AliGammaReader.h" 
-
-class AliGammaDataReader : public AliGammaReader {
-
-public: 
-
-  AliGammaDataReader() ; // ctor
-  AliGammaDataReader(const AliGammaDataReader & g) ; // cpy ctor
-  AliGammaDataReader & operator = (const AliGammaDataReader & g) ;//cpy assignment
-  virtual ~AliGammaDataReader() {;} //virtual dtor
-
-  void CreateParticleList(TObject * esd, TObject *,TClonesArray * plCh, 
-                         TClonesArray * plEMCAL, TClonesArray * plPHOS, TClonesArray *,TClonesArray *, TClonesArray *);
-  
- private:
-
-  ClassDef(AliGammaDataReader,1)
-} ;
-
-#endif //ALIGAMMADATAREADER_H
-
-
-
diff --git a/PWG4/AliGammaMCDataReader.cxx b/PWG4/AliGammaMCDataReader.cxx
deleted file mode 100644 (file)
index b0ed072..0000000
+++ /dev/null
@@ -1,427 +0,0 @@
-
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.5  2007/12/14 10:54:15  gustavo
- * Protection against cluster labels larger than kinematics entries
- *
- * Revision 1.4  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for reading data (Kinematics and ESDs) in order to do prompt gamma correlations
-//  Class created from old AliPHOSGammaJet 
-//  (see AliRoot versions previous Release 4-09)
-//
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-#include <TFormula.h>
-#include <TParticle.h>
-//---- ANALYSIS system ----
-#include "AliGammaMCDataReader.h" 
-#include "AliESDEvent.h"
-#include "AliESDVertex.h"
-#include "AliESDCaloCluster.h"
-#include "AliStack.h"
-#include "AliLog.h"
-
-ClassImp(AliGammaMCDataReader)
-
-//____________________________________________________________________________
-  AliGammaMCDataReader::AliGammaMCDataReader() : 
-    AliGammaReader()
-{
-  //Default Ctor
-  
-  //Initialize parameters
-  fDataType=kMCData;
-  
-}
-
-//____________________________________________________________________________
-AliGammaMCDataReader::AliGammaMCDataReader(const AliGammaMCDataReader & g) :   
-  AliGammaReader(g)
-{
-  // cpy ctor
-}
-
-//_________________________________________________________________________
-AliGammaMCDataReader & AliGammaMCDataReader::operator = (const AliGammaMCDataReader & source)
-{
-  // assignment operator
-  
-  if(&source == this) return *this;
-  
-
-  return *this;
-  
-}
-
-//____________________________________________________________________________
-void AliGammaMCDataReader::CreateParticleList(TObject * data, TObject * kine,
-                                             TClonesArray * plCTS, 
-                                             TClonesArray * plEMCAL,  
-                                             TClonesArray * plPHOS,   
-                                             TClonesArray * plPrimCTS, 
-                                             TClonesArray * plPrimEMCAL, 
-                                             TClonesArray * plPrimPHOS){
-  
-  //Create a list of particles from the ESD. These particles have been measured 
-  //by the Central Tracking system (TPC+ITS+...), PHOS and EMCAL 
-  //Also create particle list with mothers.
-
-  AliESDEvent* esd = (AliESDEvent*) data;
-  AliStack* stack = (AliStack*) kine;
-  
-  Int_t npar  = 0 ;
-  Double_t *pid = new Double_t[AliPID::kSPECIESN];  
-  AliDebug(3,"Fill particle lists");
-  
-  //Get vertex for momentum calculation  
-  Double_t v[3] ; //vertex ;
-  esd->GetVertex()->GetXYZ(v) ; 
-  
-  //########### CALORIMETERS ##############  
-  Int_t nCaloCluster = esd->GetNumberOfCaloClusters() ;  
-  Int_t indexPH = plPHOS->GetEntries() ;
-  Int_t indexEM = plEMCAL->GetEntries() ;
-  
-  for (npar =  0; npar <  nCaloCluster; npar++) {//////////////CaloCluster loop
-    AliESDCaloCluster * clus = esd->GetCaloCluster(npar) ; // retrieve cluster from esd
-    Int_t type = clus->GetClusterType();
-    
-    //########### PHOS ##############
-    if(fSwitchOnPHOS && type ==  AliESDCaloCluster::kPHOSCluster){
-      AliDebug(4,Form("PHOS clusters: E %f, match %d", clus->E(),clus->GetTrackMatched()));
-      
-      if(clus->GetTrackMatched()==-1){
-       TLorentzVector momentum ;
-       clus->GetMomentum(momentum, v);      
-       Double_t phi = momentum.Phi();
-       if(phi<0) phi+=TMath::TwoPi() ;
-       if(momentum.Pt() > fNeutralPtCut &&  TMath::Abs(momentum.Eta()) < fPHOSEtaCut &&
-          phi > fPhiPHOSCut[0] && phi < fPhiPHOSCut[1] ) {
-         
-         pid=clus->GetPid();   
-         Int_t pdg = 22;
-         
-         if(IsPHOSPIDOn()){
-           AliDebug(5,Form("E %1.2f; PID: ph %0.2f, pi0 %0.2f, el %0.2f, conv el %0.2f,pi %0.2f, k %0.2f, p %0.2f, k0 %0.2f, n %0.2f, mu %0.2f ",
-                           momentum.E(),pid[AliPID::kPhoton],pid[AliPID::kPi0],pid[AliPID::kElectron],pid[AliPID::kEleCon],pid[AliPID::kPion],
-                           pid[AliPID::kKaon],pid[AliPID::kProton], pid[AliPID::kKaon0],pid[AliPID::kNeutron], pid[AliPID::kMuon]));
-           
-           Float_t wPhoton =  fPHOSPhotonWeight;
-           Float_t wPi0 =  fPHOSPi0Weight;
-           
-           if(fPHOSWeightFormula){
-             wPhoton = fPHOSPhotonWeightFormula->Eval(momentum.E()) ;
-             wPi0 =    fPHOSPi0WeightFormula->Eval(momentum.E());
-           }
-           
-           if(pid[AliPID::kPhoton] > wPhoton) 
-             pdg = kPhoton ;
-           else if(pid[AliPID::kPi0] > wPi0) 
-             pdg = kPi0 ; 
-           else if(pid[AliPID::kElectron] > fPHOSElectronWeight)  
-             pdg = kElectron ;
-           else if(pid[AliPID::kEleCon] > fPHOSElectronWeight) 
-             pdg = kEleCon ;
-           else if(pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton] > fPHOSChargeWeight) 
-             pdg = kChargedHadron ;  
-           else if(pid[AliPID::kKaon0]+pid[AliPID::kNeutron] > fPHOSNeutralWeight) 
-             pdg = kNeutralHadron ; 
-           
-           else if(pid[AliPID::kElectron]+pid[AliPID::kEleCon]+pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton]  >  
-                   pid[AliPID::kPhoton] + pid[AliPID::kPi0]+pid[AliPID::kKaon0]+pid[AliPID::kNeutron]) 
-             pdg = kChargedUnknown  ; 
-           else 
-             pdg = kNeutralUnknown ; 
-           //neutral cluster, unidentifed.
-         }
-         
-         if(pdg != kElectron && pdg != kEleCon && pdg !=kChargedHadron && pdg !=kChargedUnknown ){//keep only neutral particles in the array
-
-           TParticle * particle = new TParticle(pdg, 1, -1, -1, -1, -1, momentum.Px(), momentum.Py(), momentum.Pz(), momentum.E(), v[0], v[1], v[2], 0);           
-           new((*plPHOS)[indexPH])   TParticle(*particle) ;
-           AliDebug(4,Form("PHOS added: pdg %d, pt %f, phi %f, eta %f", pdg, particle->Pt(),particle->Phi(),particle->Eta()));
-           //###############
-           //Check kinematics
-           //###############
-           TParticle * pmother = new TParticle();
-           Int_t label = clus->GetLabel();
-           if(label < stack->GetNtrack())
-             pmother = GetMotherParticle(label,stack, "PHOS",momentum);
-           else 
-             AliInfo(Form("PHOS: Bad label %d, too large, NPrimaries %d",label,stack->GetNtrack()));
-           new((*plPrimPHOS)[indexPH])   TParticle(*pmother) ;
-           
-           indexPH++;
-         }
-         else AliDebug(4,Form("PHOS charged cluster NOT added: pdg %d, pt %f, phi %f, eta %f\n", 
-                              pdg, momentum.Pt(),momentum.Phi(),momentum.Eta()));      
-         
-       }//pt, eta, phi cut
-       else    AliDebug(4,"Particle not added");
-      }//track-match?
-    }//PHOS cluster
-
-    //################ EMCAL ##############
-    else if(fSwitchOnEMCAL &&  type ==  AliESDCaloCluster::kEMCALClusterv1){
-      AliDebug(4,Form("EMCAL clusters: E %f, match %d", clus->E(),clus->GetTrackMatched()));
-      
-      if(clus->GetTrackMatched()==-1 ){
-       TLorentzVector momentum ;
-       clus->GetMomentum(momentum, v); 
-       Double_t phi = momentum.Phi();
-       if(phi<0) phi+=TMath::TwoPi() ;
-       if(momentum.Pt() > fNeutralPtCut &&  TMath::Abs(momentum.Eta()) < fEMCALEtaCut &&
-          phi > fPhiEMCALCut[0] && phi < fPhiEMCALCut[1] ) {
-         
-         pid=clus->GetPid();   
-         Int_t pdg = 22;
-         
-         if(IsEMCALPIDOn()){
-           AliDebug(5,Form("E %1.2f; PID: ph %0.2f, pi0 %0.2f, el %0.2f, conv el %0.2f,pi %0.2f, k %0.2f, p %0.2f, k0 %0.2f, n %0.2f, mu %0.2f ",
-                           momentum.E(),pid[AliPID::kPhoton],pid[AliPID::kPi0],pid[AliPID::kElectron],pid[AliPID::kEleCon],pid[AliPID::kPion],
-                           pid[AliPID::kKaon],pid[AliPID::kProton], pid[AliPID::kKaon0],pid[AliPID::kNeutron], pid[AliPID::kMuon]));
-           
-           if(pid[AliPID::kPhoton] > fEMCALPhotonWeight) 
-             pdg = kPhoton ;
-           else if(pid[AliPID::kPi0] > fEMCALPi0Weight) 
-             pdg = kPi0 ; 
-           else if(pid[AliPID::kElectron] > fEMCALElectronWeight)  
-             pdg = kElectron ;
-           else if(pid[AliPID::kEleCon] > fEMCALElectronWeight) 
-             pdg = kEleCon ;
-           else if(pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton] > fEMCALChargeWeight) 
-             pdg = kChargedHadron ;  
-           else if(pid[AliPID::kKaon0]+pid[AliPID::kNeutron] > fEMCALNeutralWeight) 
-             pdg = kNeutralHadron ; 
-           else if(pid[AliPID::kElectron]+pid[AliPID::kEleCon]+pid[AliPID::kPion]+pid[AliPID::kKaon]+pid[AliPID::kProton]  >  
-                   pid[AliPID::kPhoton] + pid[AliPID::kPi0]+pid[AliPID::kKaon0]+pid[AliPID::kNeutron]) 
-             pdg = kChargedUnknown ; 
-           else 
-             pdg = kNeutralUnknown ;
-         }
-         
-         if(pdg != kElectron && pdg != kEleCon && pdg !=kChargedHadron && pdg !=kChargedUnknown){//keep only neutral particles in the array
-
-           TParticle * particle = new TParticle(pdg, 1, -1, -1, -1, -1, momentum.Px(), momentum.Py(), momentum.Pz(), momentum.E(), v[0], v[1], v[2], 0);
-           new((*plEMCAL)[indexEM])   TParticle(*particle) ;
-           AliDebug(4,Form("EMCAL cluster added: pdg %f, pt %f, phi %f, eta %f", pdg, particle->Pt(),particle->Phi(),particle->Eta()));
-           
-           //###############
-           //Check kinematics
-           //###############
-           TParticle * pmother = new TParticle();
-           Int_t label = clus->GetLabel();
-           if(label < stack->GetNtrack())
-             pmother = GetMotherParticle(label,stack, "EMCAL",momentum);
-           else 
-             AliInfo(Form("EMCAL: Bad label %d, too large, NPrimaries %d",label,stack->GetNtrack()));      
-           new((*plPrimEMCAL)[indexEM])   TParticle(*pmother) ;
-
-           indexEM++;
-         }
-         else AliDebug(4,Form("EMCAL charged cluster NOT added: pdg %d, pt %f, phi %f, eta %f", 
-                              pdg, momentum.Pt(),momentum.Phi(),momentum.Eta()));
-         
-       }//pt, phi, eta cut
-       else    AliDebug(4,"Particle not added");
-      }//track-matched
-    }//EMCAL cluster
-
-  }//cluster loop
-
-
-  //########### CTS (TPC+ITS) #####################
-  Int_t nTracks   = esd->GetNumberOfTracks() ;
-  Int_t indexCh  = plCTS->GetEntries() ;
-
-  if(fSwitchOnCTS){
-    AliDebug(3,Form("Number of tracks %d",nTracks));
-  
-    for (npar =  0; npar <  nTracks; npar++) {////////////// track loop
-      AliESDtrack * track = esd->GetTrack(npar) ; // retrieve track from esd
-      
-      //We want tracks fitted in the detectors:
-      ULong_t status=AliESDtrack::kTPCrefit;
-      status|=AliESDtrack::kITSrefit;
-    
-      //We want tracks whose PID bit is set:
-      //     ULong_t status =AliESDtrack::kITSpid;
-      //     status|=AliESDtrack::kTPCpid;
-      
-      if ( (track->GetStatus() & status) == status) {//Check if the bits we want are set
-       // Do something with the tracks which were successfully
-       // re-fitted 
-       Double_t en = 0; //track ->GetTPCsignal() ;
-       Double_t mom[3];
-       track->GetPxPyPz(mom) ;
-       Double_t px = mom[0];
-       Double_t py = mom[1];
-       Double_t pz = mom[2]; //Check with TPC people if this is correct.
-       Int_t pdg = 11; //Give any charged PDG code, in this case electron.
-       //I just want to tag the particle as charged
-       
-       //Check kinematics
-       Int_t label = TMath::Abs(track->GetLabel());
-       TParticle * pmother = new TParticle();
-       pmother = stack->Particle(label);
-       
-       TParticle * particle = new TParticle(pdg, 1, -1, -1, -1, -1, 
-                                            px, py, pz, en, v[0], v[1], v[2], 0);
-       
-       if(particle->Pt() > fChargedPtCut && TMath::Abs(particle->Eta())<fCTSEtaCut){
-         new((*plCTS)[indexCh])       TParticle(*particle) ;   
-         new((*plPrimCTS)[indexCh])       TParticle(*pmother) ;
-         indexCh++;    
-         
-       }//kinematic selection
-      }//select track from refit
-    }//track loop    
-  }//CTS
-
-  AliDebug(3,Form("Particle lists filled, tracks  %d , clusters: EMCAL %d, PHOS %d", indexCh,indexEM,indexPH));
-
-}
-
-TParticle * AliGammaMCDataReader:: GetMotherParticle(Int_t label, AliStack *stack, TString calo,  TLorentzVector momentum)
-{
-  //Gets the primary particle and do some checks:
-  //Check if primary is inside calorimeter and look the mother outsie
-  //Check if mother is a decay photon, in which case check if decay was overlapped
-  
-  Float_t minangle = 0;
-  Float_t ipdist = 0;
-  TParticle * pmother = new TParticle();
-
-  if(calo == "PHOS"){
-    ipdist= fPHOSIPDistance;
-    minangle = fPHOSMinAngle; 
-  }
-  else if (calo == "EMCAL"){
-    ipdist = fEMCALIPDistance;
-    minangle = fEMCALMinAngle;
-  }
-
-
-  if(label>=0){
-    pmother = stack->Particle(label);
-    Int_t mostatus = pmother->GetStatusCode();
-    Int_t mopdg    = TMath::Abs(pmother->GetPdgCode());
-    
-    //Check if mother is a conversion inside the calorimeter
-    //In such case, return the mother before the calorimeter.
-    //First approximation.
-    Float_t vy = TMath::Abs(pmother->Vy()) ;
-
-    if( mostatus == 0 && vy >= ipdist){
-
-      //cout<<"Calo: "<<calo<<" vy "<<vy<<" E clus "<<momentum.E()<<" Emother "<<pmother->Energy()<<" "
-      //  <<pmother->GetName()<<endl;
-
-      while( vy >= ipdist){//inside calorimeter
-       AliDebug(4,Form("Conversion inside calorimeter, mother vertex %0.2f, IP distance %0.2f", vy, ipdist));
-       pmother =  stack->Particle(pmother->GetMother(0));
-       vy = TMath::Abs(pmother->Vy()) ;
-       //cout<<" label "<<label<<" Mother: "<<pmother->GetName()<<" E "<<pmother->Energy()<<" Status "<<pmother->GetStatusCode()<<"  and vertex "<<vy<<endl;
-       mostatus = pmother->GetStatusCode();
-       mopdg    = TMath::Abs(pmother->GetPdgCode());
-      }//while vertex is inside calorimeter
-      //cout<<"Calo: "<<calo<<" final vy "<<vy<<" E clus "<<momentum.E()<<" Emother "<<pmother->Energy()<<" "
-      //  <<pmother->GetName()<<endl;
-    }//check status and vertex
-
-    AliDebug(4,Form("%s, ESD E %2.2f, PID %d,  mother: E %2.2f, label %d, status %d,  vertex %3.2f, mother 2 %d, grandmother %d \n",
-                   calo.Data(),momentum.E(),pmother->Energy(), label, pmother->GetPdgCode(),
-                   pmother->GetStatusCode(), vy, pmother->GetMother(0), stack->GetPrimary(label)));
-    
-    //Check Decay photons
-    if(mopdg == 22){
-      
-      //his mother was a pi0?
-      TParticle * pmotherpi0 =  stack->Particle(pmother->GetMother(0));
-      if( pmotherpi0->GetPdgCode() == 111){
-
-       AliDebug(4,Form(" %s: E cluster %2.2f, E gamma %2.2f, Mother Pi0, E %0.2f, status %d, daughters %d\n",
-                       calo.Data(), momentum.E(),pmother->Energy(),pmotherpi0->Energy(), 
-                       pmotherpi0->GetStatusCode(), pmotherpi0->GetNDaughters()));
-       
-       if(pmotherpi0->GetNDaughters() == 1) mostatus = 2 ; //signal that this photon can only be decay, not overlapped.
-       else if(pmotherpi0->GetNDaughters() == 2){
-         
-         TParticle * pd1 = stack->Particle(pmotherpi0->GetDaughter(0));
-         TParticle * pd2 = stack->Particle(pmotherpi0->GetDaughter(1));
-         //if(pmotherpi0->Energy()> 10 ){
-//       cout<<"Two "<<calo<<" daugthers, pi0 label "<<pmother->GetMother(0)<<" E :"<<pmotherpi0->Energy()<<endl;
-//       cout<<" 1) label "<<pmotherpi0->GetDaughter(0)<<" pdg "<<pd1->GetPdgCode()<<" E  "<<pd1->Energy()
-//           <<" phi "<<pd1->Phi()*TMath::RadToDeg()<<" eta "<<pd1->Eta()
-//           <<" mother label "<<pd1->GetMother(0)<<" n daug "<<pd1->GetNDaughters() <<endl;
-//         cout<<" 2) label "<<pmotherpi0->GetDaughter(1)<<" pdg "<<pd2->GetPdgCode()<<" E  "<<pd2->Energy()
-//             <<" phi "<<pd2->Phi()*TMath::RadToDeg()<<" eta "<<pd2->Eta()<<" mother label "
-//             <<pd2->GetMother(0)<<" n daug "<<pd2->GetNDaughters() <<endl;
-           //}
-         if(pd1->GetPdgCode() == 22 && pd2->GetPdgCode() == 22){
-           TLorentzVector lv1 , lv2 ;
-           pd1->Momentum(lv1);
-           pd2->Momentum(lv2);
-           Double_t angle = lv1.Angle(lv2.Vect());
-//         if(pmotherpi0->Energy()> 10 )
-//           cout<<"angle*ipdist "<<angle*ipdist<<" mindist "<< minangle <<endl;
-           if (angle < minangle){
-             //There is overlapping, pass the pi0 as mother
-             
-             AliDebug(4,Form(">>>> %s cluster with E %2.2f is a overlapped pi0, E %2.2f, angle %2.4f < anglemin %2.4f\n",
-                             calo.Data(), momentum.E(), pmotherpi0->Energy(), angle, minangle));           
-            
-             pmother = pmotherpi0 ;
-             
-           }
-           else mostatus = 2 ; // gamma decay not overlapped
-         }// daughters are photons
-         else mostatus = 2; // daughters are e-gamma or e-e, no overlapped, or charged cluster
-       }//2 daughters
-       else AliDebug(4,Form("pi0 has %d daughters",pmotherpi0->GetNDaughters()));
-      }//pi0 decay photon?
-    }//photon 
-
-    pmother->SetStatusCode(mostatus); // if status = 2, decay photon.
-
-  }//label >=0
-  else AliInfo(Form("Negative Kinematic label of PHOS cluster:  %d",label));
-
-  return pmother ;
-
-}
diff --git a/PWG4/AliGammaMCDataReader.h b/PWG4/AliGammaMCDataReader.h
deleted file mode 100644 (file)
index 88af3d2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef ALIGAMMAMCDATAREADER_H
-#define ALIGAMMAMCDATAREADER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for reading data (Kinematics and ESDs) in order to do prompt gamma correlations
-//  Class created from old AliPHOSGammaJet
-//  (see AliRoot versions previous Release 4-09)
-
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-
-// --- AliRoot system ---
-#include "AliGammaReader.h" 
-
-class AliGammaMCDataReader : public AliGammaReader {
-
-public: 
-
-  AliGammaMCDataReader() ; // ctor
-  AliGammaMCDataReader(const AliGammaMCDataReader & g) ; // cpy ctor
-  AliGammaMCDataReader & operator = (const AliGammaMCDataReader & g) ;//cpy assignment
-  virtual ~AliGammaMCDataReader() {;} //virtual dtor
-
-  void CreateParticleList(TObject * esd, TObject * stack, 
-                         TClonesArray * plCh, TClonesArray * plEMCAL, TClonesArray * plPHOS,
-                         TClonesArray * plPrimCh, TClonesArray * plPrimEMCAL, TClonesArray * plPrimPHOS);
-
-  TParticle *  GetMotherParticle(Int_t label, AliStack *stack,  TString calo, TLorentzVector momentum) ;
-
-  private:
-
-  ClassDef(AliGammaMCDataReader,1)
-} ;
-
-#endif //ALIGAMMAMCDATAREADER_H
-
-
-
diff --git a/PWG4/AliGammaMCReader.cxx b/PWG4/AliGammaMCReader.cxx
deleted file mode 100644 (file)
index d606dac..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is         *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.5  2007/11/17 16:41:07  gustavo
- * mc handler should not be set in the analysis task, but in the startup analysis macro (MG)
- *
- * Revision 1.4  2007/10/29 13:48:42  gustavo
- * Corrected coding violations
- *
- *
- */
-
-//_________________________________________________________________________
-// Class for reading data (Kinematics) in order to do prompt gamma correlations
-//  Class created from old AliPHOSGammaJet 
-//  (see AliRoot versions previous Release 4-09)
-//
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-
-#include <TFile.h>
-#include <TParticle.h>
-#include <TH2.h>
-#include <TChain.h>
-#include <TRandom.h>
-#include <TArrayI.h>
-#include <TClonesArray.h>
-
-//---- ANALYSIS system ----
-#include "AliGammaMCReader.h" 
-#include "Riostream.h"
-#include "AliLog.h"
-#include "AliStack.h"
-
-ClassImp(AliGammaMCReader)
-
-//____________________________________________________________________________
-AliGammaMCReader::AliGammaMCReader() : 
-  AliGammaReader(), fDecayPi0(0), fCheckOverlapping(kFALSE),  fNeutralParticlesArray(0x0)
-{
-  //Ctor
-  
-  //Initialize parameters
-  InitParameters();
-  fDataType = kMC;  
-  
-}
-
-//____________________________________________________________________________
-AliGammaMCReader::AliGammaMCReader(const AliGammaMCReader & g) :   
-  AliGammaReader(g), fDecayPi0(g.fDecayPi0), fCheckOverlapping(g.fCheckOverlapping),
-  fNeutralParticlesArray(g.fNeutralParticlesArray?new TArrayI(*g.fNeutralParticlesArray):0x0)
-{
-  // cpy ctor
-}
-
-//_________________________________________________________________________
-AliGammaMCReader & AliGammaMCReader::operator = (const AliGammaMCReader & source)
-{
-  // assignment operator
-
-  if(&source == this) return *this;
-
-  fDecayPi0 = source.fDecayPi0; 
-  fCheckOverlapping = source.fCheckOverlapping;
-  delete fNeutralParticlesArray;
-  fNeutralParticlesArray = source.fNeutralParticlesArray?new TArrayI(*source.fNeutralParticlesArray):0x0;
-  return *this;
-
-}
-
-//_________________________________
-AliGammaMCReader::~AliGammaMCReader() {
-  //Dtor
-
-  delete fNeutralParticlesArray ;
-
-}
-
-//___________________________________________________________________________
-void AliGammaMCReader::CaseDecayGamma(Int_t index, TParticle * particle, AliStack * sta,
-                                 TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                                 TClonesArray * plPHOS, Int_t &indexPHOS){
-  //In case pi0 are decayed by pythia, check if mother is pi0 and in such case look if 
-  //there is overlapping. Send particle=pi0 if there is overlapping. 
-
-  TParticle * pmother =sta->Particle(particle->GetFirstMother());
-  if(pmother->GetPdgCode() == 111 && pmother->GetNDaughters() == 2) {//Do not consider 3 particle decay case
-    Int_t idaug0 = pmother->GetDaughter(0);
-    Int_t idaug1 = pmother->GetDaughter(1);
-    TParticle * pdaug0 = sta -> Particle(idaug0);
-    TParticle * pdaug1 = sta -> Particle(idaug1);
-
-    if((index ==  idaug0 &&  pdaug0->Pt() > fNeutralPtCut) ||
-       (index ==  idaug1 &&  pdaug0->Pt() <= fNeutralPtCut)){//Check decay when first daughter arrives, do nothing with second.
-
-      FillListWithDecayGammaOrPi0(pmother, pdaug0, pdaug1, plEMCAL, indexEMCAL, plPHOS, indexPHOS);
-    
-    }
-  }//mother is a pi0 with 2 daughters
-  else{
-    
-    if(IsInPHOS(particle->Phi(),particle->Eta())) {
-      TParticle * pmother =sta->Particle(particle->GetFirstMother());     
-      SetPhotonStatus(particle,pmother);     
-      new((*plPHOS)[indexPHOS++])  TParticle(*particle) ;
-    }
-    else if(IsInEMCAL(particle->Phi(),particle->Eta())){
-      TParticle * pmother =sta->Particle(particle->GetFirstMother());     
-      SetPhotonStatus(particle,pmother);
-      new((*plEMCAL)[indexEMCAL++])  TParticle(*particle) ;
-    }
-  } 
-}
-
-//___________________________________________________________________________
- void AliGammaMCReader::CaseGeantDecay(TParticle * particle, AliStack * stack,
-                                  TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                                  TClonesArray * plPHOS, Int_t &indexPHOS){
-   //Find decay gamma from pi0, decayed by GEANT and put them in the list.
-   
-   Int_t ndaug = particle->GetNDaughters() ;
-   TParticle * d1 = new TParticle();
-   TParticle * d2 = new TParticle();
-   
-   if(ndaug > 0){//At least 1 daugther
-     d1 = stack->Particle(particle->GetDaughter(0));
-     if (ndaug > 1 ) 
-       d2 = stack->Particle(particle->GetDaughter(1));
-     
-     FillListWithDecayGammaOrPi0(particle, d1, d2, plEMCAL, indexEMCAL, plPHOS, indexPHOS);
-     
-   }// ndaugh > 0
- }
-
-//___________________________________________________________________________
-void AliGammaMCReader::CasePi0Decay(TParticle * pPi0, 
-                                   TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                                   TClonesArray * plPHOS, Int_t &indexPHOS){
-  
-  //Decays pi0, see if aperture angle is small and then add the pi0 or the 2 gamma
-  
-  TLorentzVector lvPi0, lvGamma1, lvGamma2 ;
-  //Double_t angle = 0;
-  
-  lvPi0.SetPxPyPzE(pPi0->Px(),pPi0->Py(),pPi0->Pz(),pPi0->Energy());
-
-  //Decay
-  MakePi0Decay(lvPi0,lvGamma1,lvGamma2);//,angle);
-  
-  //Check if Pi0 is in the acceptance of the calorimeters, if aperture angle is small, keep it
-  TParticle * pPhoton1 = new TParticle(22,1,0,0,0,0,lvGamma1.Px(),lvGamma1.Py(),
-                                     lvGamma1.Pz(),lvGamma1.E(),0,0,0,0);   
-  TParticle * pPhoton2 = new TParticle(22,1,0,0,0,0,lvGamma2.Px(),lvGamma2.Py(),
-                                     lvGamma2.Pz(),lvGamma2.E(),0,0,0,0);
-
-  FillListWithDecayGammaOrPi0(pPi0, pPhoton1, pPhoton2, plEMCAL, indexEMCAL, plPHOS, indexPHOS);
-}
-
-//_______________________________________________________________
-void AliGammaMCReader::InitParameters()
-{
-  
-  //Initialize the parameters of the analysis.
-
-  fDecayPi0 = kGeantDecay;
-  fCheckOverlapping = kTRUE ;
-
-  Int_t pdgarray[]={12,14,16};// skip neutrinos
-  fNeutralParticlesArray = new TArrayI(3, pdgarray);
-
-}
-
-//____________________________________________________________________________
-void AliGammaMCReader::CreateParticleList(TObject * data, TObject *, 
-                                         TClonesArray * plCh, 
-                                         TClonesArray * plEMCAL,  
-                                         TClonesArray * plPHOS,
-                                         TClonesArray *plParton,TClonesArray *,TClonesArray *)
-{
-  //Create list of particles from EMCAL, PHOS and CTS. 
-  AliStack * stack = (AliStack *) data ;
-  Int_t indexCh     = plCh->GetEntries() ;
-  Int_t indexEMCAL = plEMCAL->GetEntries() ;
-  Int_t indexPHOS = plPHOS->GetEntries() ;
-  Int_t indexParton = plParton->GetEntries() ;
-  Int_t iParticle = 0 ;
-  Double_t charge = 0.;
-    
-  for (iParticle=0 ; iParticle <  stack->GetNprimary() ; iParticle++) {
-    TParticle * particle = stack->Particle(iParticle); 
-
-    //Keep partons
-    if(particle->GetStatusCode() == 21 && iParticle>=2){//All partons, not nucleus
-      new((*plParton)[indexParton++])  TParticle(*particle) ;
-    }
-
-    //Keep Stable particles 
-    if((particle->GetStatusCode() == 1) && (particle->Pt() > 0)){
-      
-      charge = TDatabasePDG::Instance()->GetParticle(particle->GetPdgCode())->Charge();
-      
-      //---------- Charged particles ----------------------
-      if( fSwitchOnCTS && (charge != 0) && (particle->Pt() > fChargedPtCut)){
-       //Particles in CTS acceptance
-       if(TMath::Abs(particle->Eta())<fCTSEtaCut){  
-         //Fill lists
-         new((*plCh)[indexCh++])       TParticle(*particle) ;
-       }
-      }
-
-      //-------------Neutral particles ----------------------
-      else if((charge == 0) && particle->Pt() > fNeutralPtCut ){ //&&  
-       //TMath::Abs(particle->GetPdgCode())>16){//Avoid neutrinos
-       
-       if(particle->GetPdgCode()!=111){
-         //In case that we force PYTHIA to decay pi0, and we want to check the overlapping of 
-         // the decay gamma.
-         if(particle->GetPdgCode() == 22 && fDecayPi0==kDecayGamma){
-           CaseDecayGamma(iParticle,particle, stack,plEMCAL, indexEMCAL, plPHOS, indexPHOS); //If pythia decays pi0
-         }
-         else{
-           //Take out some particles like neutrinos
-           if(!SkipNeutralParticles(particle->GetPdgCode()) && !particle->IsPrimary()){ // protection added (MG)
-             TParticle * pmother =stack->Particle(particle->GetFirstMother());                
-             if(IsInPHOS(particle->Phi(),particle->Eta())){
-               if(particle->GetPdgCode()==22)SetPhotonStatus(particle,pmother);     
-               new((*plPHOS)[indexPHOS++])  TParticle(*particle) ;
-             }
-             else if(IsInEMCAL(particle->Phi(),particle->Eta())){
-               if(particle->GetPdgCode()==22) SetPhotonStatus(particle,pmother); 
-               new((*plEMCAL)[indexEMCAL++])  TParticle(*particle) ;
-             }
-           }//skip neutral particles
-         }//Case kDecayGamma
-       }//no pi0
-       else{
-         if(fDecayPi0 == kNoDecay){//keep the pi0 do not decay
-           if(IsInPHOS(particle->Phi(),particle->Eta()))
-             new((*plPHOS)[indexPHOS++])  TParticle(*particle) ;
-           else if(IsInEMCAL(particle->Phi(),particle->Eta()))
-             new((*plEMCAL)[indexEMCAL++])  TParticle(*particle) ;
-         }//nodecay
-         else if(fDecayPi0 == kDecay)
-           CasePi0Decay(particle,plEMCAL,indexEMCAL,plPHOS, indexPHOS);
-         else if(fDecayPi0 == kGeantDecay)
-           CaseGeantDecay(particle, stack,plEMCAL, indexEMCAL, plPHOS, indexPHOS);
-       }//pi0  
-      }//neutral particle
-    }//stable particle
-    else if(particle->GetStatusCode() == 11 && (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221) && particle->Pt() > 5 ){//hardcoded pt threshold to avoid too many particles
-      if(IsInPHOS(particle->Phi(),particle->Eta()))
-       new((*plPHOS)[indexPHOS++])  TParticle(*particle) ;
-      else if(IsInEMCAL(particle->Phi(),particle->Eta()))
-       new((*plEMCAL)[indexEMCAL++])  TParticle(*particle) ;
-    }
-  }//particle loop
-}
-
-
-//___________________________________________________________________________
-void AliGammaMCReader::FillListWithDecayGammaOrPi0(TParticle * pPi0, TParticle * pdaug0, TParticle * pdaug1,
-                                  TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                                  TClonesArray * plPHOS, Int_t &indexPHOS){
-
-  //Check if decay gamma overlapp in calorimeter, in such case keep the pi0, if not keep both photons.
-  Bool_t  overlap = kFALSE ;
-  TLorentzVector lv1 , lv2 ;
-  pdaug0->Momentum(lv1);
-  pdaug1->Momentum(lv2);
-  if(fCheckOverlapping){
-    Double_t angle = lv1.Angle(lv2.Vect());
-    
-    if(IsInEMCAL(pPi0->Phi(), pPi0->Eta()))
-      {
-       if (angle < fEMCALMinAngle){
-         pPi0->SetStatusCode(1);
-         new((*plEMCAL)[indexEMCAL++])       TParticle(*pPi0) ;
-         overlap = kTRUE;
-       }
-      }//in EMCAL?
-    
-    else if(IsInPHOS(pPi0->Phi(), pPi0->Eta())){
-      if (angle < fPHOSMinAngle){
-       pPi0->SetStatusCode(1);
-       new((*plPHOS)[indexPHOS++])       TParticle(*pPi0) ;
-       overlap = kTRUE;
-      }
-    }//in PHOS?
-
-  }//fCheckOverlapping
-
-  //Fill with gammas if not overlapp
-  if(!overlap){
-    if(pdaug0->GetPdgCode() == 22 || TMath::Abs(pdaug0->GetPdgCode() ) == 11 ){
-      pdaug0->SetStatusCode(kPi0DecayPhoton);
-      if(IsInEMCAL(pdaug0->Phi(),pdaug0->Eta()) &&  pdaug0->Pt() > fNeutralPtCut)
-       new((*plEMCAL)[indexEMCAL++])       TParticle(*pdaug0) ;
-      else if(IsInPHOS(pdaug0->Phi(),pdaug0->Eta()) &&  pdaug0->Pt() > fNeutralPtCut)
-       new((*plPHOS)[indexPHOS++])       TParticle(*pdaug0) ;
-    }
-    
-    if(pdaug1->GetPdgCode() == 22 || TMath::Abs(pdaug1->GetPdgCode() ) == 11 ){
-      pdaug1->SetStatusCode(kPi0DecayPhoton);
-      if(IsInEMCAL(pdaug1->Phi(),pdaug1->Eta()) &&  pdaug1->Pt() > fNeutralPtCut)
-       new((*plEMCAL)[indexEMCAL++])       TParticle(*pdaug1) ;
-      else if(IsInPHOS(pdaug1->Phi(),pdaug1->Eta()) &&  pdaug1->Pt() > fNeutralPtCut)
-       new((*plPHOS)[indexPHOS++])       TParticle(*pdaug1) ;
-    }
-  }// overlap?
-
- }
-
-
-//___________________________________________________________________________
-Bool_t  AliGammaMCReader::IsInEMCAL(Double_t phi, Double_t eta) const {
-  //Check if particle is in EMCAL acceptance
-  if(fSwitchOnEMCAL){
-    if(phi<0)
-      phi+=TMath::TwoPi();
-    if( phi > fPhiEMCALCut[0] && phi < fPhiEMCALCut[1] && 
-       TMath::Abs(eta)<fEMCALEtaCut) return kTRUE ;
-    else  return kFALSE;     
-  }
-  return kFALSE ;
-}
-
-//___________________________________________________________________________
-Bool_t  AliGammaMCReader::IsInPHOS(Double_t phi, Double_t eta) const {
-  //Check if particle is in PHOS acceptance
-  
-  if(fSwitchOnPHOS){
-    if(phi<0)
-      phi+=TMath::TwoPi();
-    if( phi > fPhiPHOSCut[0] && phi < fPhiPHOSCut[1] && 
-       TMath::Abs(eta)<fPHOSEtaCut) return kTRUE ;
-    else  return kFALSE;
-  }
-  
-  return kFALSE ;
-}
-
-//____________________________________________________________________________
-void AliGammaMCReader::MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, 
-                               TLorentzVector &p2){//, Double_t &angle) {
-  // Perform isotropic decay pi0 -> 2 photons
-  // p0 is pi0 4-momentum (inut)
-  // p1 and p2 are photon 4-momenta (output)
-  //  cout<<"Boost vector"<<endl;
-  Double_t mPi0 = TDatabasePDG::Instance()->GetParticle(111)->Mass();
-  TVector3 b = p0.BoostVector();
-  //cout<<"Parameters"<<endl;
-  //Double_t mPi0   = p0.M();
-  Double_t phi    = TMath::TwoPi() * gRandom->Rndm();
-  Double_t cosThe = 2 * gRandom->Rndm() - 1;
-  Double_t cosPhi = TMath::Cos(phi);
-  Double_t sinPhi = TMath::Sin(phi);
-  Double_t sinThe = TMath::Sqrt(1-cosThe*cosThe);
-  Double_t ePi0   = mPi0/2.;
-  //cout<<"ePi0 "<<ePi0<<endl;
-  //cout<<"Components"<<endl;
-  p1.SetPx(+ePi0*cosPhi*sinThe);
-  p1.SetPy(+ePi0*sinPhi*sinThe);
-  p1.SetPz(+ePi0*cosThe);
-  p1.SetE(ePi0);
-  //cout<<"p1: "<<p1.Px()<<" "<<p1.Py()<<" "<<p1.Pz()<<" "<<p1.E()<<endl;
-  //cout<<"p1 Mass: "<<p1.Px()*p1.Px()+p1.Py()*p1.Py()+p1.Pz()*p1.Pz()-p1.E()*p1.E()<<endl;
-  p2.SetPx(-ePi0*cosPhi*sinThe);
-  p2.SetPy(-ePi0*sinPhi*sinThe);
-  p2.SetPz(-ePi0*cosThe);
-  p2.SetE(ePi0);
-  //cout<<"p2: "<<p2.Px()<<" "<<p2.Py()<<" "<<p2.Pz()<<" "<<p2.E()<<endl;
-  //cout<<"p2 Mass: "<<p2.Px()*p2.Px()+p2.Py()*p2.Py()+p2.Pz()*p2.Pz()-p2.E()*p2.E()<<endl;
-  //cout<<"Boost "<<b.X()<<" "<<b.Y()<<" "<<b.Z()<<endl;
-  p1.Boost(b);
-  //cout<<"p1: "<<p1.Px()<<" "<<p1.Py()<<" "<<p1.Pz()<<" "<<p1.E()<<endl;
-  p2.Boost(b);
-  //cout<<"p2: "<<p2.Px()<<" "<<p2.Py()<<" "<<p2.Pz()<<" "<<p2.E()<<endl;
-  //cout<<"angle"<<endl;
-  //angle = p1.Angle(p2.Vect());
-  //cout<<angle<<endl;
-}
-
-//________________________________________________________________
-void AliGammaMCReader::Print(const Option_t * opt) const
-{
-  
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-  
-  Info("Print", "%s %s", GetName(), GetTitle() ) ;
-  
-  printf("Decay Pi0?          : %d\n", fDecayPi0) ;
-  printf("Check Overlapping?          : %d\n", fCheckOverlapping) ;
-
-}
-
-
-
-//________________________________________________________________
-void AliGammaMCReader::SetPhotonStatus(TParticle* pphoton, TParticle* pmother)
-{
-
-  //Check the origin of the photon and tag it  as decay from pi0, from eta, from other mesons, or prompt or fragmentation.
-  
-  if(pmother->GetStatusCode() != 21 ){
-    if(pmother->GetStatusCode() ==11){
-      if(pmother->GetPdgCode()==111) pphoton->SetStatusCode(kPi0DecayPhoton);//decay gamma from pi0
-      if(pmother->GetPdgCode()==221) pphoton->SetStatusCode(kEtaDecayPhoton);//decay gamma from eta
-      else pphoton->SetStatusCode(kOtherDecayPhoton);// decay gamma from other pphotons        
-    }
-    else        pphoton->SetStatusCode(kUnknown);
-  }
-  else if(pmother->GetPdgCode()==22)   pphoton->SetStatusCode(kPromptPhoton);//Prompt photon
-  else pphoton->SetStatusCode(kFragmentPhoton); //Fragmentation photon
-  
-}
-
-//________________________________________________________________
-Bool_t AliGammaMCReader::SkipNeutralParticles(Int_t pdg) const {
-  //Check if pdg is equal to one of the neutral particles list
-  //These particles will be skipped from analysis.
-
-  for(Int_t i= 0; i < fNeutralParticlesArray->GetSize(); i++)
-    if(TMath::Abs(pdg) ==  fNeutralParticlesArray->At(i)) return kTRUE ;
-  
-  return kFALSE; 
-  
-}
diff --git a/PWG4/AliGammaMCReader.h b/PWG4/AliGammaMCReader.h
deleted file mode 100644 (file)
index a0c2306..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef ALIGAMMAMCREADER_H
-#define ALIGAMMAMCREADER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- *
- */
-
-//_________________________________________________________________________
-// Class for reading data (Kinematics) in order to do prompt gamma correlations
-//  Class created from old AliPHOSGammaJet
-//  (see AliRoot versions previous Release 4-09)
-
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-class TArrayI ;
-
-// --- AliRoot system ---
-#include "AliGammaReader.h" 
-class AliGammaMCReader : public AliGammaReader {
-
-public: 
-
-  AliGammaMCReader() ; // ctor
-  AliGammaMCReader(const AliGammaMCReader & g) ; // cpy ctor
-  AliGammaMCReader & operator = (const AliGammaMCReader & g) ;//cpy assignment
-  virtual ~AliGammaMCReader() ;//virtual dtor
-
-  enum DecayType {kNoDecay, kGeantDecay, kDecay, kDecayGamma};
-  void InitParameters();
-
-  Bool_t  IsInEMCAL(Double_t phi, Double_t eta) const ;
-  Bool_t  IsInPHOS(Double_t phi, Double_t eta) const ;
-
-  Int_t    GetDecayPi0Flag() const {return fDecayPi0 ; }
-
-  void Print(const Option_t * opt) const;
-  
-  void SetDecayPi0Flag(Int_t d){ fDecayPi0 = d ; }
-
-  void SetCheckOverlapping(Bool_t check){fCheckOverlapping = check ;}
-  Bool_t IsCheckOverlappingOn() const {return fCheckOverlapping ;}
-
-  void SetPhotonStatus(TParticle* pphoton, TParticle* mother);
-
-  void AddNeutralParticlesArray(TArrayI & array)  
-  { fNeutralParticlesArray   = new TArrayI(array) ; }
-  TArrayI * GetNeutralParticlesArray() const   {return  fNeutralParticlesArray;}
-
-  private:
-  
-  void CaseDecayGamma(Int_t index, TParticle * particle, AliStack * stack,
-                     TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                     TClonesArray * plPHOS, Int_t &indexPHOS);
-  
-  void CaseGeantDecay(TParticle * particle, AliStack * stack,
-                     TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                     TClonesArray * plPHOS, Int_t &indexPHOS);
-  
-  void CasePi0Decay(TParticle * particle, TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                   TClonesArray * plPHOS, Int_t &indexPHOS);
-  
-  void CreateParticleList(TObject * stack, TObject * ,
-                         TClonesArray * plCh, TClonesArray * plEMCAL, 
-                         TClonesArray * plPHOS, TClonesArray * plParton,TClonesArray *,TClonesArray *);
-  
-  void FillListWithDecayGammaOrPi0(TParticle * pPi0, TParticle * pdaug0, TParticle * pdaug1,
-                                  TClonesArray * plEMCAL, Int_t &indexEMCAL,
-                                  TClonesArray * plPHOS, Int_t &indexPHOS);  
-  void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2);//, Double_t &angle);
-  
-  Bool_t SkipNeutralParticles(Int_t pdg) const ;
-  private:
-  
-  Int_t      fDecayPi0; //Options to study pi0 decay
-  Bool_t   fCheckOverlapping; // if True, check if gammas from decay overlapp in calorimeters.
-  TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of the list.
-  ClassDef(AliGammaMCReader,1)
-} ;
-
-
-#endif //ALIGAMMAMCREADER_H
-
-
-
diff --git a/PWG4/AliGammaReader.cxx b/PWG4/AliGammaReader.cxx
deleted file mode 100644 (file)
index 7f635ff..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and 
-// Central Barrel Tracking detectors.
-// Not all MC particles/tracks/clusters are kept, some kinematical restrictions are done.
-// Mother class of : AliGammaDataReader: Fills ESD data in 3 TClonesArrays (PHOS, EMCAL, CTS)
-//                 : AliGammaMCReader: Fills Kinematics data in 3 TClonesArrays (PHOS, EMCAL, CTS)
-//                 : AliGammaMCDataReader: Fills ESD data in 3 TClonesArrays (PHOS, EMCAL, CTS) 
-//                             and MC data in other 3 TClonesArray
-//*-- Author: Gustavo Conesa (LNF-INFN) 
-//////////////////////////////////////////////////////////////////////////////
-
-
-// --- ROOT system ---
-#include <TFormula.h>
-#include <TMath.h>
-
-//---- ANALYSIS system ----
-#include "AliGammaReader.h"
-
-ClassImp(AliGammaReader)
-
-
-//____________________________________________________________________________
-AliGammaReader::AliGammaReader() : 
-  TObject(), fDataType(0),
-  fSwitchOnEMCAL(0),  fSwitchOnPHOS(0),  fSwitchOnCTS(0),
-  fCTSEtaCut(0.), fEMCALEtaCut(0.), fPHOSEtaCut(0.),
-  fNeutralPtCut(0.), fChargedPtCut(0.),
-  fEMCALIPDistance(0.),   fPHOSIPDistance(0.), 
-  fEMCALMinAngle(0.),   fPHOSMinAngle(0.), 
-  fEMCALPID(0),fPHOSPID(0),
-  fEMCALPhotonWeight(0.), fEMCALPi0Weight(0.),  fEMCALElectronWeight(0.),  
-  fEMCALChargeWeight(0.),fEMCALNeutralWeight(0.),
-  fPHOSPhotonWeight(0.), fPHOSPi0Weight(0.),  fPHOSElectronWeight(0.), 
-  fPHOSChargeWeight(0.) , fPHOSNeutralWeight(0.) ,
-  fPHOSWeightFormula(0), fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0) 
-{
-  //Ctor
-
-  fPhiEMCALCut[0]=0.;
-  fPhiEMCALCut[1]=0.;
-  fPhiPHOSCut[0]=0.;
-  fPhiPHOSCut[1]=0.;
-  //Initialize parameters
-  InitParameters();
-}
-
-//____________________________________________________________________________
-AliGammaReader::AliGammaReader(const AliGammaReader & g) :   
-  TObject(g), fDataType(g.fDataType),
-  fSwitchOnEMCAL(g.fSwitchOnEMCAL),  fSwitchOnPHOS(g.fSwitchOnPHOS),  fSwitchOnCTS(g.fSwitchOnCTS),
-  fCTSEtaCut(g.fCTSEtaCut),  fEMCALEtaCut(g.fEMCALEtaCut),  fPHOSEtaCut(g.fPHOSEtaCut),
-  fNeutralPtCut(g.fNeutralPtCut), fChargedPtCut(g.fChargedPtCut),
-  fEMCALIPDistance(g.fEMCALIPDistance),  fPHOSIPDistance(g.fPHOSIPDistance),  
-  fEMCALMinAngle(g.fEMCALMinAngle),  fPHOSMinAngle(g.fPHOSMinAngle), 
-  fEMCALPID(g.fEMCALPID), 
-  fPHOSPID(g.fPHOSPID),
-  fEMCALPhotonWeight(g.fEMCALPhotonWeight), 
-  fEMCALPi0Weight(g.fEMCALPi0Weight), 
-  fEMCALElectronWeight(g.fEMCALElectronWeight), 
-  fEMCALChargeWeight(g.fEMCALChargeWeight), 
-  fEMCALNeutralWeight(g.fEMCALNeutralWeight), 
-  fPHOSPhotonWeight(g.fPHOSPhotonWeight),
-  fPHOSPi0Weight(g.fPHOSPi0Weight),
-  fPHOSElectronWeight(g.fPHOSElectronWeight), 
-  fPHOSChargeWeight(g.fPHOSChargeWeight),
-  fPHOSNeutralWeight(g.fPHOSNeutralWeight),
-  fPHOSWeightFormula(g.fPHOSWeightFormula), 
-  fPHOSPhotonWeightFormula(g.fPHOSPhotonWeightFormula), 
-  fPHOSPi0WeightFormula(g.fPHOSPi0WeightFormula) 
-{
-  // cpy ctor
-
-  fPhiEMCALCut[0]=g.fPhiEMCALCut[0];
-  fPhiEMCALCut[1]=g.fPhiEMCALCut[1];
-  fPhiPHOSCut[0]=g.fPhiPHOSCut[0];
-  fPhiPHOSCut[1]=g.fPhiPHOSCut[1];
-}
-
-//_________________________________________________________________________
-AliGammaReader & AliGammaReader::operator = (const AliGammaReader & source)
-{
-  // assignment operator
-
-  if(&source == this) return *this;
-
-  fDataType = source.fDataType ;
-
-  fSwitchOnEMCAL = source.fSwitchOnEMCAL;  
-  fSwitchOnPHOS = source.fSwitchOnPHOS;
-  fSwitchOnCTS = source.fSwitchOnCTS;
-
-  fCTSEtaCut = source.fCTSEtaCut;  
-  fEMCALEtaCut = source.fEMCALEtaCut;  
-  fPHOSEtaCut = source.fPHOSEtaCut;
-  fNeutralPtCut = source.fNeutralPtCut;
-  fChargedPtCut = source.fChargedPtCut; 
-
-  fPhiEMCALCut[0]=source.fPhiEMCALCut[0];
-  fPhiEMCALCut[1]=source.fPhiEMCALCut[1];
-  fPhiPHOSCut[0]=source.fPhiPHOSCut[0];
-  fPhiPHOSCut[1]=source.fPhiPHOSCut[1];
-
-  fEMCALIPDistance = source.fEMCALIPDistance; 
-  fPHOSIPDistance = source.fPHOSIPDistance; 
-  fEMCALMinAngle = source.fEMCALMinAngle; 
-  fPHOSMinAngle = source.fPHOSMinAngle; 
-
-  fEMCALPID = source.fEMCALPID ;
-  fPHOSPID = source.fPHOSPID ;
-
-  fEMCALPhotonWeight = source. fEMCALPhotonWeight ;
-  fEMCALPi0Weight = source.fEMCALPi0Weight ;
-  fEMCALElectronWeight = source.fEMCALElectronWeight; 
-  fEMCALChargeWeight = source.fEMCALChargeWeight;
-  fEMCALNeutralWeight = source.fEMCALNeutralWeight;
-
-  fPHOSPhotonWeight = source.fPHOSPhotonWeight ;
-  fPHOSPi0Weight = source.fPHOSPi0Weight ;
-  fPHOSElectronWeight = source.fPHOSElectronWeight; 
-  fPHOSChargeWeight = source.fPHOSChargeWeight;
-  fPHOSNeutralWeight = source.fPHOSNeutralWeight;
-
-  fPHOSWeightFormula       = source.fPHOSWeightFormula; 
-  fPHOSPhotonWeightFormula = source.fPHOSPhotonWeightFormula; 
-  fPHOSPi0WeightFormula    = source.fPHOSPi0WeightFormula;
-
-
-  return *this;
-
-}
-
-//_______________________________________________________________
-void AliGammaReader::InitParameters()
-{
-  //Initialize the parameters of the analysis.
-  fDataType = kData ;
-
-  fSwitchOnEMCAL = kTRUE ;  
-  fSwitchOnPHOS = kTRUE ;
-  fSwitchOnCTS = kTRUE ;
-
-  fCTSEtaCut         = 0.7 ;  
-  fEMCALEtaCut         = 0.7 ;  
-  fPHOSEtaCut         = 0.12 ;
-  fPhiEMCALCut[0] = 80 *TMath::DegToRad();
-  fPhiEMCALCut[1] = 190*TMath::DegToRad();
-  fPhiPHOSCut[0] = 220. *TMath::DegToRad();
-  fPhiPHOSCut[1] = 320.*TMath::DegToRad();
-  fNeutralPtCut   = 0.5 ;
-  fChargedPtCut   = 0.5 ;
-
-  fEMCALMinAngle    =   2.5 * TMath::DegToRad() ;  
-  fPHOSMinAngle    = 0.45 * TMath::DegToRad() ; //3.6 ;
-  fEMCALIPDistance    = 450. ;//cm  
-  fPHOSIPDistance    = 445. ;//cm 460 (EMCA) - 15 (CPV)
-
-  //pid, only for ESD data
-  fEMCALPID = kFALSE;
-  fPHOSPID = kFALSE;
-
-  fEMCALPhotonWeight = 0.8 ;
-  fEMCALPi0Weight = 0.5 ;
-  fEMCALElectronWeight = 0.8 ;
-  fEMCALChargeWeight = 0.5 ;
-  fEMCALNeutralWeight = 0.5 ;
-
-  fPHOSPhotonWeight = 0.75 ;
-  fPHOSPi0Weight = 0.8 ;
-  fPHOSElectronWeight = 0.5 ;
-  fPHOSChargeWeight = 0.5 ;
-  fPHOSNeutralWeight = 0.5 ;
-
-  //Formula to set the PID weight threshold for photon or pi0
-  fPHOSWeightFormula = kTRUE;
-  fPHOSPhotonWeightFormula = 
-    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))");
-  fPHOSPi0WeightFormula = 
-    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))");
-
-}
-
-
-//________________________________________________________________
-void AliGammaReader::Print(const Option_t * opt) const
-{
-
-  //Print some relevant parameters set for the analysis
-  if(! opt)
-    return;
-
-  Info("Print", "%s %s", GetName(), GetTitle() ) ;
-  printf("Data type           : %d\n", fDataType) ;
-
-  printf(" EMCAL on?          : %d\n", fSwitchOnEMCAL) ;
-  printf(" PHOS on?          : %d\n", fSwitchOnPHOS) ;
-  printf(" CTS on?          : %d\n", fSwitchOnCTS) ;
-
-  printf("CTS Eta cut           : %f\n", fCTSEtaCut) ;
-  printf("EMCAL Eta cut           : %f\n", fEMCALEtaCut) ;
-  printf("PHOS Eta cut           : %f\n", fPHOSEtaCut) ;
-  printf("Phi EMCAL cut           : [%f, %f]\n", fPhiEMCALCut[0],fPhiEMCALCut[1]) ;
-  printf("Phi PHOS cut           : [%f, %f]\n", fPhiPHOSCut[0],fPhiPHOSCut[1]) ;
-  printf("pT neutral cut           : %f GeV/c\n", fNeutralPtCut) ;
-  printf("pT charged cut           : %f GeV/c\n", fChargedPtCut) ;
-
-  if(fDataType == kMC || fDataType == kMCData){
-    printf("IP distance to PHOS         : %f\n", fPHOSIPDistance) ;
-    printf("IP distance to EMCAL         : %f\n", fEMCALIPDistance) ;
-    printf("Min gamma decay aperture angle in PHOS         : %f\n", fPHOSMinAngle) ;
-    printf("Min gamma decay aperture angle in EMCAL         : %f\n", fEMCALMinAngle) ;
-  }
-  
-  if(fDataType != kMC){
-    printf("PHOS PID on?               =     %d\n",  fPHOSPID) ; 
-    printf("EMCAL PID  on?         =     %d\n",  fEMCALPID) ;
-    printf("PHOS PID weight , photon %f, pi0 %f, e %f, charge %f, neutral %f \n",  
-          fPHOSPhotonWeight,  fPHOSPi0Weight, 
-          fPHOSElectronWeight,  fPHOSChargeWeight,   fPHOSNeutralWeight) ; 
-    printf("EMCAL PID weight, photon %f, pi0 %f, e %f, charge %f, neutral %f\n",   
-          fEMCALPhotonWeight,  fEMCALPi0Weight, 
-          fEMCALElectronWeight,  fEMCALChargeWeight,  fEMCALNeutralWeight) ; 
-    
-    printf("PHOS Parametrized weight on?               =     %d\n",  fPHOSWeightFormula) ; 
-    if(fPHOSWeightFormula){
-      printf(">>>>>>>>>>> Photon weight formula<<<<<<<<<<<<\n");
-      fPHOSPhotonWeightFormula->Print();
-      printf(">>>>>>>>>>> Pi0    weight formula<<<<<<<<<<<<\n");
-      fPHOSPhotonWeightFormula->Print();
-    }
-  }
-
-} 
-
-
diff --git a/PWG4/AliGammaReader.h b/PWG4/AliGammaReader.h
deleted file mode 100644 (file)
index b8d6f15..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-#ifndef ALIGAMMAREADER_H
-#define ALIGAMMAREADER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice     */
-/* $Id$ */
-
-/* History of cvs commits:
- *
- * $Log$
- * Revision 1.2  2007/08/17 12:40:04  schutz
- * New analysis classes by Gustavo Conesa
- *
- * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
- * new analysis classes in the the new analysis framework
- *
- *
- */
-
-//_________________________________________________________________________
-// Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and 
-// Central Barrel Tracking detectors.
-// Not all MC particles/tracks/clusters are kept, some kinematical restrictions are done.
-// Mother class of : AliGammaDataReader: Fills ESD data in 3 TClonesArrays (PHOS, EMCAL, CTS)
-//                 : AliGammaMCReader: Fills Kinematics data in 3 TClonesArrays (PHOS, EMCAL, CTS)
-//                 : AliGammaMCDataReader: Fills ESD data in 3 TClonesArrays (PHOS, EMCAL, CTS) 
-//                             and MC data in other 3 TClonesArray
-//*-- Author: Gustavo Conesa (INFN-LNF)
-
-// --- ROOT system ---
-#include "TObject.h" 
-
-class TClonesArray ; 
-class TFormula ;
-class TParticle ; 
-class Riostream ;
-//--- AliRoot system ---
-
-class AliStack ;
-class AliESDEvent ; 
-class AliLog ;
-
-class AliGammaReader : public TObject {
-
-public: 
-
-  AliGammaReader() ; // ctor
-  AliGammaReader(const AliGammaReader & g) ; // cpy ctor
-  AliGammaReader & operator = (const AliGammaReader & g) ;//cpy assignment
-  virtual ~AliGammaReader() {;} //virtual dtor
-
-  enum PidType {
-    kPhoton = 22,
-    kPi0 = 111,
-    kEta = 221, 
-    kElectron = 11, 
-    kEleCon = 13, 
-    kNeutralHadron = 2112, 
-    kChargedHadron = 211, 
-    kNeutralUnknown = 130, 
-    kChargedUnknown=321
-  };
-
-  enum PhotonStatusType {
-    kPromptPhoton=2,
-    kFragmentPhoton=3,
-    kPi0DecayPhoton=4, 
-    kEtaDecayPhoton=5, 
-    kOtherDecayPhoton=6,
-    kUnknown=7
-  };
-
-  enum Datatype {kData, kMC, kMCData};
-  
-  void InitParameters();
-
-  Int_t GetDataType() const { return fDataType ; }
-  void SetDataType(Int_t data ){fDataType = data ; }
-
-  virtual Float_t  GetCTSEtaCut() const {return fCTSEtaCut ; }
-  virtual Float_t  GetEMCALEtaCut() const {return fEMCALEtaCut ; }
-  virtual Float_t  GetPHOSEtaCut() const {return fPHOSEtaCut ; }
-  virtual Float_t  GetPhiEMCALCut(Int_t i) { return  fPhiEMCALCut[i]  ; }
-  virtual Float_t  GetPhiPHOSCut(Int_t i) { return  fPhiPHOSCut[i]  ; }
-  virtual Float_t  GetNeutralPtCut()    {  return fNeutralPtCut  ; }
-  virtual Float_t  GetChargedPtCut()  {  return fChargedPtCut  ; }
-
-  virtual Float_t  GetEMCALIPDistance()  const {  return fEMCALIPDistance ; }
-  virtual Float_t  GetPHOSIPDistance()  const {  return fPHOSIPDistance ; }
-  virtual Float_t  GetEMCALMinAngle()  const {  return fEMCALMinAngle ; }
-  virtual Float_t  GetPHOSMinAngle()  const {  return fPHOSMinAngle ; }
-
-  virtual Bool_t   IsEMCALPIDOn() const {return fEMCALPID ; }
-  virtual Bool_t   IsPHOSPIDOn() const {return fPHOSPID ; }
-  virtual Float_t  GetEMCALPhotonWeight() const  { return  fEMCALPhotonWeight  ; }
-  virtual Float_t  GetEMCALPi0Weight() const     {  return fEMCALPi0Weight  ; }
-  virtual Float_t  GetEMCALElectronWeight() const  { return  fEMCALElectronWeight  ; }
-  virtual Float_t  GetEMCALChargeWeight() const     {  return fEMCALChargeWeight  ; }
-  virtual Float_t  GetEMCALNeutralWeight() const     {  return fEMCALNeutralWeight  ; }
-  virtual Float_t  GetPHOSPhotonWeight() const   {  return fPHOSPhotonWeight  ; }
-  virtual Float_t  GetPHOSPi0Weight() const   {  return fPHOSPi0Weight  ; }
-  virtual Float_t  GetPHOSElectronWeight() const   {  return fPHOSElectronWeight  ; }
-  virtual Float_t  GetPHOSChargeWeight() const   {  return fPHOSChargeWeight  ; }
-  virtual Float_t  GetPHOSNeutralWeight() const   {  return fPHOSNeutralWeight  ; }
-
-  virtual Bool_t  IsPHOSPIDWeightFormulaOn() const   {  return fPHOSWeightFormula  ; } 
-  virtual TFormula * GetPHOSPhotonWeightFormula() const     {  return fPHOSPhotonWeightFormula  ; } 
-  virtual TFormula * GetPHOSPi0WeightFormula() const    {  return fPHOSPi0WeightFormula  ; }
-
-  virtual void Print(const Option_t * opt)const;
-  
-  virtual void SetCTSEtaCut(Float_t eta){ fCTSEtaCut= eta ; }
-  virtual void SetEMCALEtaCut(Float_t eta){ fEMCALEtaCut= eta ; }
-  virtual void SetPHOSEtaCut(Float_t eta){ fPHOSEtaCut= eta ; }
-  virtual void SetPhiEMCALCut(Float_t  phi0, Float_t  phi1)
-  { fPhiEMCALCut[0]= phi0 ; fPhiEMCALCut[1]= phi1 ;}
-  virtual void SetPhiPHOSCut(Float_t  phi0, Float_t  phi1)
-  { fPhiPHOSCut[0]= phi0 ; fPhiPHOSCut[1]= phi1 ;}
-  virtual void SetNeutralPtCut(Float_t  pt){  fNeutralPtCut = pt ; }
-  virtual void SetChargedPtCut(Float_t  pt){  fChargedPtCut = pt ; }
-
- virtual void SetEMCALIPDistance(Float_t  d){  fEMCALIPDistance = d ; }
-  virtual void SetPHOSIPDistance(Float_t  d){  fPHOSIPDistance = d ; }
-  virtual void SetEMCALMinAngle(Float_t  d){  fEMCALMinAngle = d ; }
-  virtual void SetPHOSMinAngle(Float_t  d){  fPHOSMinAngle = d ; }
-  
-  virtual void SetEMCALPIDOn(Bool_t pid){ fEMCALPID= pid ; }
-  virtual void SetPHOSPIDOn(Bool_t pid){ fPHOSPID= pid ; }
-  virtual void SetEMCALPhotonWeight(Float_t  w){  fEMCALPhotonWeight = w ; }
-  virtual void SetEMCALPi0Weight(Float_t  w){  fEMCALPi0Weight = w ; }
-  virtual void SetEMCALElectronWeight(Float_t  w){  fEMCALElectronWeight = w ; }
-  virtual void SetEMCALChargeWeight(Float_t  w){  fEMCALChargeWeight = w ; }
-  virtual void SetEMCALNeutralWeight(Float_t  w){  fEMCALNeutralWeight = w ; }
-  virtual void SetPHOSPhotonWeight(Float_t  w){  fPHOSPhotonWeight = w ; }
-  virtual void SetPHOSPi0Weight(Float_t  w){  fPHOSPi0Weight = w ; }
-  virtual void SetPHOSElectronWeight(Float_t  w){  fPHOSElectronWeight = w ; }
-  virtual void SetPHOSChargeWeight(Float_t  w){  fPHOSChargeWeight = w ; }
-  virtual void SetPHOSNeutralWeight(Float_t  w){  fPHOSNeutralWeight = w ; }
-
-  virtual void UsePHOSPIDWeightFormula(Bool_t par)  { fPHOSWeightFormula  = par; } 
-  virtual void SetPHOSPhotonWeightFormula(TFormula * photon)    {  fPHOSPhotonWeightFormula  = photon; } 
-  virtual void SetPHOSPi0WeightFormula(TFormula * pi0)   {  fPHOSPi0WeightFormula  = pi0; }
-
-  virtual Bool_t IsEMCALOn() const  { return fSwitchOnEMCAL ; }
-  virtual Bool_t IsPHOSOn() const  { return fSwitchOnPHOS ; }
-  virtual Bool_t IsCTSOn() const  { return fSwitchOnCTS ; }
-  
-  virtual void SwitchOnEMCAL(Bool_t sw) {fSwitchOnEMCAL = sw ; }
-  virtual void SwitchOnPHOS(Bool_t sw) {fSwitchOnPHOS = sw ; }
-  virtual void SwitchOnCTS(Bool_t sw) {fSwitchOnCTS = sw ; }
-
-  virtual void CreateParticleList(TObject* , TObject * , 
-                                 TClonesArray * , TClonesArray * , TClonesArray *,  
-                                 TClonesArray * , TClonesArray * , TClonesArray * ) {;}
-  
- protected:
-  
-  Int_t        fDataType ; //Select MC:Kinematics, Data:ESD/AOD, MCData:Both
-  
-  Bool_t     fSwitchOnEMCAL ; //Do not consider EMCAL neutral particles/clusters
-  Bool_t     fSwitchOnPHOS ;//Do not consider PHOS neutral particles/clusters
-  Bool_t     fSwitchOnCTS ;//Do not consider tracks/ charged particles
-
-  //Kinematical cuts
-  Float_t      fCTSEtaCut ;//CTS  pseudorapidity acceptance
-  Float_t      fEMCALEtaCut ;//EMCAL pseudorapidity acceptance
-  Float_t      fPHOSEtaCut ;//PHOS pseudorapidity acceptance
-  Float_t      fPhiEMCALCut[2]; //EMCAL phi acceptance 
-  Float_t      fPhiPHOSCut[2];  //PHOS phi acceptance
-  Float_t      fNeutralPtCut; //pT Threshold on neutral particles
-  Float_t      fChargedPtCut;  // pT  Threshold on charged particles
-
-  //Overlapping 
-  Float_t      fEMCALIPDistance; //Calorimeter IP distance.
-  Float_t      fPHOSIPDistance; //Calorimeter IP distance
-  Float_t      fEMCALMinAngle; //Gamma decay minimum aperture angle for overlapping.
-  Float_t      fPHOSMinAngle; //Gamma decay minimum aperture angle for overlapping.
-
-  //PID
-  Bool_t       fEMCALPID ;//Fill EMCAL particle lists with particles with corresponding pid
-  Bool_t       fPHOSPID;  //Fill PHOS particle lists with particles with corresponding pid
-  Float_t      fEMCALPhotonWeight; //Bayesian PID weight for photons in EMCAL 
-  Float_t      fEMCALPi0Weight;  //Bayesian PID weight for pi0 in EMCAL 
-  Float_t      fEMCALElectronWeight; //Bayesian PID weight for electrons in EMCAL 
-  Float_t      fEMCALChargeWeight;  //Bayesian PID weight for charged hadrons in EMCAL 
-  Float_t      fEMCALNeutralWeight;  //Bayesian PID weight for neutral hadrons in EMCAL 
-  Float_t      fPHOSPhotonWeight; //Bayesian PID weight for photons in PHOS 
-  Float_t      fPHOSPi0Weight; //Bayesian PID weight for pi0 in PHOS 
-  Float_t      fPHOSElectronWeight; //Bayesian PID weight for electrons in PHOS 
-  Float_t      fPHOSChargeWeight; //Bayesian PID weight for charged hadrons in PHOS 
-  Float_t      fPHOSNeutralWeight; //Bayesian PID weight for neutral hadrons in PHOS 
-
-  Bool_t  fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy
-  TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight
-  TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight
-  
-  ClassDef(AliGammaReader,1)
-} ;
-
-
-#endif //ALIGAMMAREADER_H
-
-
-
diff --git a/PWG4/PWG4GammaLinkDef.h b/PWG4/PWG4GammaLinkDef.h
deleted file mode 100644 (file)
index 2228216..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifdef __CINT__
-#pragma link off all globals;
-#pragma link off all classes;
-#pragma link off all functions;
-
-#pragma link C++ class AliAnaCaloTrigger+;
-#pragma link C++ class AliAnaCaloTriggerMC+;
-#pragma link C++ class AliAnaGammaPhos+;
-#pragma link C++ class AliAnaScale+;
-#pragma link C++ class AliNeutralMesonSelection+;
-#pragma link C++ class AliAnaGamma+;
-#pragma link C++ class AliAnaGammaDirect+;
-#pragma link C++ class AliAnaGammaCorrelation+;
-#pragma link C++ class AliAnaGammaParton+;
-#pragma link C++ class AliAnaGammaHadron+;
-#pragma link C++ class AliAnaGammaJetLeadCone+;
-#pragma link C++ class AliAnaGammaJetFinder+;
-#pragma link C++ class AliAnalysisTaskGamma+;
-#pragma link C++ class AliGammaReader+;
-#pragma link C++ class AliGammaDataReader+;
-#pragma link C++ class AliGammaMCReader+;
-#pragma link C++ class AliGammaMCDataReader+;
-#pragma link C++ class AliAnaGammaSelection+;
-
-#endif
diff --git a/PWG4/libPWG4Gamma.pkg b/PWG4/libPWG4Gamma.pkg
deleted file mode 100644 (file)
index 5374f82..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#-*- Mode: Makefile -*-
-
-SRCS = AliAnaCaloTrigger.cxx AliAnaCaloTriggerMC.cxx \
-       AliAnaGammaPhos.cxx AliNeutralMesonSelection.cxx \
-       AliAnaScale.cxx \
-       AliAnaGamma.cxx  AliAnaGammaDirect.cxx  \
-       AliAnaGammaCorrelation.cxx  AliAnaGammaParton.cxx AliAnaGammaHadron.cxx AliAnaGammaJetLeadCone.cxx  AliAnaGammaJetFinder.cxx \
-       AliAnalysisTaskGamma.cxx \
-       AliGammaReader.cxx AliGammaDataReader.cxx \
-       AliGammaMCReader.cxx  AliGammaMCDataReader.cxx \
-       AliAnaGammaSelection.cxx
-
-HDRS:= $(SRCS:.cxx=.h) 
-
-DHDR:= PWG4GammaLinkDef.h
-
-EXPORT:=$(SRCS:.cxx=.h)
-
-ifeq (win32gcc,$(ALICE_TARGET))
-PACKSOFLAGS:= $(SOFLAGS) -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) -lSTEERBase \
-                         -lESD -lAOD -lANALYSIS -lANALYSISalice \
-                         -L$(shell root-config --libdir) -lEG
-endif