From 9ecb11ddf181c56110ea66d3693be9c7bead7327 Mon Sep 17 00:00:00 2001 From: mfasel Date: Fri, 19 Dec 2014 17:28:15 +0100 Subject: [PATCH] Fix for periods which do not contain trigger information: ===================================================================== The default setting for the trigger patch container is moved to the constructor, so that add macro or lego train can override it. The add macro gets a new parameter which tells the macro the trigger patch container name: In case it is empty, the trigger patch component will not be created and the container will be replaced by an empty string. Otherwise the container will be set, and the trigger patch component will be created. --- .../Tracks/AliAnalysisTaskPtEMCalTriggerV1.cxx | 2 +- PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTriggerV1.C | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/PWGJE/EMCALJetTasks/Tracks/AliAnalysisTaskPtEMCalTriggerV1.cxx b/PWGJE/EMCALJetTasks/Tracks/AliAnalysisTaskPtEMCalTriggerV1.cxx index ca9aa6556a6..9835ec5909d 100644 --- a/PWGJE/EMCALJetTasks/Tracks/AliAnalysisTaskPtEMCalTriggerV1.cxx +++ b/PWGJE/EMCALJetTasks/Tracks/AliAnalysisTaskPtEMCalTriggerV1.cxx @@ -66,6 +66,7 @@ AliAnalysisTaskPtEMCalTriggerV1::AliAnalysisTaskPtEMCalTriggerV1(const char* nam fTaskGroups->SetOwner(); fBinning = new AliEMCalTriggerBinningComponent(); SetMakeGeneralHistograms(kTRUE); + SetCaloTriggerPatchInfoName("EmcalTriggers"); // Default settings here, to be able to override it in the wagon configuration } //______________________________________________________________________________ @@ -83,7 +84,6 @@ void AliAnalysisTaskPtEMCalTriggerV1::UserCreateOutputObjects() { * Initialise all analysis components */ AliAnalysisTaskEmcal::UserCreateOutputObjects(); - SetCaloTriggerPatchInfoName("EmcalTriggers"); AliEMCalTriggerBinningFactory binmaker; binmaker.Create(fBinning); diff --git a/PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTriggerV1.C b/PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTriggerV1.C index fa85a57b359..bb9d9554f96 100644 --- a/PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTriggerV1.C +++ b/PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTriggerV1.C @@ -25,6 +25,7 @@ AliAnalysisTask* AddTaskPtEMCalTriggerV1( const char *nclusterContainer = "", const char *njetcontainerData = "", const char *njetcontainerMC = "", + const char *ntriggerContainer = "", double jetradius = 0.5 ) { @@ -53,8 +54,14 @@ AliAnalysisTask* AddTaskPtEMCalTriggerV1( } // Add components - EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup *noselect = new EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup("noselect"); - noselect->AddAnalysisComponent(new EMCalTriggerPtAnalysis::AliEMCalTriggerPatchAnalysisComponent("patchanalysis")); + if(strlen(ntriggerContainer)){ + pttriggertask->SetCaloTriggerPatchInfoName(ntriggerContainer); + EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup *noselect = new EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup("noselect"); + noselect->AddAnalysisComponent(new EMCalTriggerPtAnalysis::AliEMCalTriggerPatchAnalysisComponent("patchanalysis")); + pttriggertask->AddAnalysisGroup(noselect); + } else { + pttriggertask->SetCaloTriggerPatchInfoName(""); + } double jetpt[4] = {40., 60., 80., 100.}; EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup *defaultselect = new EMCalTriggerPtAnalysis::AliEMCalTriggerTaskGroup("defaultselect"); @@ -73,7 +80,6 @@ AliAnalysisTask* AddTaskPtEMCalTriggerV1( for(int ijpt = 0; ijpt < 4; ijpt++) AddRecJetComponent(defaultselect, CreateDefaultTrackCuts(), jetpt[ijpt], isMC, isSwapEta); - pttriggertask->AddAnalysisGroup(noselect); pttriggertask->AddAnalysisGroup(defaultselect); // Add containers -- 2.43.0