using correct branch name
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 May 2012 08:23:06 +0000 (08:23 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 May 2012 08:23:06 +0000 (08:23 +0000)
PWGJE/UserTasks/AliAnalysisTaskCheckSingleTrackJetRejection.cxx
PWGJE/UserTasks/AliAnalysisTaskJetHadronCorrelation.cxx

index 22affa8..12c15fe 100755 (executable)
@@ -325,7 +325,8 @@ void AliAnalysisTaskCheckSingleTrackJetRejection::UserExec(Option_t *)
                                cAdd += Form("_Cut%05d",(int)(1000.*TrackPtcut));
                                cAdd += Form("_Skip%02d",SkipCone);
                                TString Branchname_gen,Branchname_rec;
-                               Branchname_gen = Form("clustersMCKINE2_%s%s",JFAlg.Data(),cAdd.Data());
+                               //Branchname_gen = Form("clustersMCKINE2_%s%s",JFAlg.Data(),cAdd.Data());
+                               Branchname_gen = Form("clustersAODMC2_%s%s",JFAlg.Data(),cAdd.Data());
                                Branchname_rec = Form("clustersAOD_%s%s",JFAlg.Data(),cAdd.Data());
 
 
@@ -341,7 +342,10 @@ void AliAnalysisTaskCheckSingleTrackJetRejection::UserExec(Option_t *)
                                                                if(algorithm==1)fJetBranch   = Branchname_rec.Data();
 
                                                                TClonesArray* jets = dynamic_cast <TClonesArray*> (fAODIn->FindListObject(fJetBranch.Data()));
-                                                               if(!jets)continue;
+                                                               if(!jets){
+                                                                                               printf(" Tere are no Branch named %s \n",fJetBranch.Data());
+                                                                                               continue;
+                                                               }
                                                                Int_t nj = jets->GetEntriesFast();
                                                                if (fDebug) printf("There are %5d jets in the event \n", nj);
 
@@ -400,7 +404,6 @@ void AliAnalysisTaskCheckSingleTrackJetRejection::UserExec(Option_t *)
                                                                                                                                for(int cut=0;cut<6;cut++){
                                                                                                                                                                double min_R=10.;
                                                                                                                                                                for(int njetAOD=0;njetAOD<Jet_n[1];njetAOD++){
-                                                                                                                                                                 fJetBranch   = "clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip00";
                                                                                                                                                                  jets = dynamic_cast <TClonesArray*> (fAODIn->FindListObject(fJetBranch.Data()));
                                                                                                                                                                  if(!jets)continue;
                                                                                                                                                                  jetsAOD = (AliAODJet*) (jets->At(njetAOD));
@@ -586,8 +589,6 @@ Float_t AliAnalysisTaskCheckSingleTrackJetRejection::GetTotalEvents(const char*
                                Listname = Form("pwg4cluster_AOD__%s%s",JFAlg.Data(),cAdd.Data());
 
                                TFile *feventstat = TFile::Open(Form("%s%s",file_es.Data(),"JetTasksOutput.root"));
-                               //gROOT->Cd("PWG4_cluster_AOD__KT06_B0_Filter00256_Cut00150_Skip00");
-                               //TList *templist     = (TList*)gROOT->FindObject("pwg4cluster_AOD__KT06_B0_Filter00256_Cut00150_Skip00");
                                gROOT->Cd(Dirname.Data());
                                TList *templist     = (TList*)gROOT->FindObject(Listname.Data());
                                TH1F* temphist = (TH1F*)templist->FindObject("fh1Trials");
index 74325eb..c796f5c 100755 (executable)
@@ -503,16 +503,15 @@ void AliAnalysisTaskJetHadronCorrelation::UserExec(Option_t *)
                                cAdd += Form("_Cut%05d",(int)(1000.*TrackPtcut));
                                cAdd += Form("_Skip%02d",SkipCone);
                                TString Branchname_gen,Branchname_gen2,Branchname_rec;
-                               Branchname_gen  = Form("clustersMCKINE_%s%s",JFAlg.Data(),cAdd.Data());
-                               Branchname_gen2 = Form("clustersMCKINE2_%s%s",JFAlg.Data(),cAdd.Data());
+                               //Branchname_gen  = Form("clustersMCKINE_%s%s",JFAlg.Data(),cAdd.Data());
+                               //Branchname_gen2 = Form("clustersMCKINE2_%s%s",JFAlg.Data(),cAdd.Data());
+                               Branchname_gen  = Form("clustersAODMC_%s%s",JFAlg.Data(),cAdd.Data());
+                               Branchname_gen2 = Form("clustersAODMC2_%s%s",JFAlg.Data(),cAdd.Data());
                                Branchname_rec  = Form("clustersAOD_%s%s",JFAlg.Data(),cAdd.Data());
 
 
                                for(int algorithm=0;algorithm<3;algorithm++){
                                                                //for LHC11a1  LHC11a2
-                                                               //if(algorithm==0)fJetBranch   = "clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip00";
-                                                               //if(algorithm==1)fJetBranch   = "clustersMCKINE2_ANTIKT04_B0_Filter00256_Cut00150_Skip00";
-                                                               //if(algorithm==2)fJetBranch   = "clustersMCKINE_ANTIKT04_B0_Filter00256_Cut00150_Skip00";
                                                                if(algorithm==0)fJetBranch   = Branchname_rec.Data();
                                                                if(algorithm==1)fJetBranch   = Branchname_gen2.Data();
                                                                if(algorithm==2)fJetBranch   = Branchname_gen.Data();
@@ -520,7 +519,10 @@ void AliAnalysisTaskJetHadronCorrelation::UserExec(Option_t *)
                                                                if((!IsMC&&(algorithm==1||algorithm==2)))continue;
 
                                                                TClonesArray* jets = dynamic_cast <TClonesArray*> (fAODIn->FindListObject(fJetBranch.Data()));
-                                                               if(!jets)continue;
+                                                               if(!jets){
+                                                                                               printf(" Tere are no Branch named %s \n",fJetBranch.Data());
+                                                                                               continue;
+                                                               }
                                                                Int_t nj = jets->GetEntriesFast();
                                                                if (fDebug) printf("There are %5d jets in the event \n", nj);
                                                                AliAODJet* jetsAOD;
@@ -794,8 +796,6 @@ Float_t AliAnalysisTaskJetHadronCorrelation::GetTotalEvents(const char* currFile
                                Listname = Form("pwg4cluster_AOD__%s%s",JFAlg.Data(),cAdd.Data());
 
                                TFile *feventstat = TFile::Open(Form("%s%s",file_es.Data(),"JetTasksOutput.root"));
-                               //gROOT->Cd("PWG4_cluster_AOD__KT06_B0_Filter00256_Cut00150_Skip00");
-                               //TList *templist     = (TList*)gROOT->FindObject("pwg4cluster_AOD__KT06_B0_Filter00256_Cut00150_Skip00");
                                gROOT->Cd(Dirname.Data());
                                TList *templist     = (TList*)gROOT->FindObject(Listname.Data());
                                TH1F* temphist = (TH1F*)templist->FindObject("fh1Trials");