-AliAnalysisTaskLocalRho: fixed uninitialized tlists in kLocal mode
authormvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Aug 2013 09:41:25 +0000 (09:41 +0000)
committermvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Aug 2013 09:41:25 +0000 (09:41 +0000)
-AliAnlaysisTaskRhoVnModulation: safer event selection: abort when rho = 0
from Redmer

PWGJE/EMCALJetTasks/AliAnalysisTaskLocalRho.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskRhoVnModulation.cxx
PWGJE/EMCALJetTasks/macros/AddTaskLocalRho.C

index a3b06fe..ef13892 100644 (file)
@@ -185,6 +185,17 @@ void AliAnalysisTaskLocalRho::UserCreateOutputObjects()
         // increase readability of output list
     fOutputList->Sort();
     PostData(1, fOutputList);
+    switch (fRunModeType) {
+        case kLocal : {
+            fOutputListGood = new TList();
+            fOutputListGood->SetOwner(kTRUE);
+            fOutputListBad = new TList();
+            fOutputListBad->SetOwner(kTRUE);
+            PostData(2, fOutputListGood);
+            PostData(3, fOutputListBad);
+        } break;
+        default: break;
+    }
 }
 //_____________________________________________________________________________
 TH1F* AliAnalysisTaskLocalRho::BookTH1F(const char* name, const char* x, Int_t bins, Double_t min, Double_t max, Int_t c, Bool_t append)
index efcf79e..eb565c1 100644 (file)
@@ -1234,6 +1234,7 @@ Bool_t AliAnalysisTaskRhoVnModulation::PassesCuts(AliVEvent* event)
     if(fExplicitOutlierCut == 2010 || fExplicitOutlierCut == 2011) {
        if(!PassesCuts(fExplicitOutlierCut)) return kFALSE;
     }
+    if(fRho->GetVal() <= 0 ) return kFALSE;
     if(fFillQAHistograms) FillQAHistograms(event);
     return kTRUE;
 }
index 2542879..77c0845 100644 (file)
@@ -82,10 +82,10 @@ AliAnalysisTaskLocalRho* AddTaskLocalRho(
   switch (runMode) {
       case AliAnalysisTaskLocalRho::kLocal : {
           gStyle->SetOptFit(1);
-          AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("good_fits_%s", name.Data()), 
+          AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("good_fits_%s", name), 
                                                            TList::Class(),AliAnalysisManager::kOutputContainer,
                                                            Form("%s", AliAnalysisManager::GetCommonFileName()));
-          AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(Form("bad_fits_%s", name.Data()),
+          AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(Form("bad_fits_%s", name),
                                                            TList::Class(),AliAnalysisManager::kOutputContainer,
                                                             Form("%s", AliAnalysisManager::GetCommonFileName()));
           mgr->ConnectOutput (jetTask, 2, coutput2);