Fixes for reading from AOD, fetch the branches for each event, reduce printout
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Jan 2011 10:23:10 +0000 (10:23 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Jan 2011 10:23:10 +0000 (10:23 +0000)
JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx
JETAN/AliAnalysisTaskJetCluster.cxx

index 63c53bb..5318f5c 100644 (file)
@@ -298,7 +298,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/)
     if(fDebug&&evBkg)Printf("%s:%d Backgroundbranch %s found",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());
   }
 
-  if(!evBkg){
+  if(!evBkg&&(fSubtraction==kArea||fSubtraction==kRhoRecalc)){
     if(fDebug){
       Printf("%s:%d Backgroundbranch %s not found",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());
       PrintAODContents();
@@ -307,7 +307,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/)
     return;
   }
 
-  if(!bkgClusters){
+  if(!bkgClusters&&(fSubtraction==kRhoRecalc)){
     if(fDebug){
       Printf("%s:%d Background cluster branch %s not found",(char*)__FILE__,__LINE__,bkgClusterName.Data());
       PrintAODContents();
@@ -316,7 +316,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/)
     return;
   }
 
-  if(!bkgClustersRC){
+  if(!bkgClustersRC&&(fSubtraction==kRhoRC)){
     if(fDebug){
       Printf("%s:%d Background cluster RC branch %s not found",(char*)__FILE__,__LINE__,bkgClusterRCName.Data());
       PrintAODContents();
index 5e67a67..fc61126 100644 (file)
@@ -668,7 +668,7 @@ void AliAnalysisTaskJetCluster::UserExec(Option_t */*option*/)
   AliAODJetEventBackground* externalBackground = 0;
   if(!externalBackground&&fBackgroundBranch.Length()){
     externalBackground =  (AliAODJetEventBackground*)(AODEvent()->FindListObject(fBackgroundBranch.Data()));
-    Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
+    if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
   }
   //
   // Execute analysis for current event