]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix for periods which do not contain trigger information:
authormfasel <mfasel@lbl.gov>
Fri, 19 Dec 2014 16:28:15 +0000 (17:28 +0100)
committermfasel <mfasel@lbl.gov>
Fri, 19 Dec 2014 16:36:21 +0000 (17:36 +0100)
=====================================================================
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.

PWGJE/EMCALJetTasks/Tracks/AliAnalysisTaskPtEMCalTriggerV1.cxx
PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTriggerV1.C

index ca9aa6556a6c129d806c73129716c59b9c3f7d99..9835ec5909d572db0a139911b0358149079ac96e 100644 (file)
@@ -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);
index fa85a57b359991b31cafa27b9f0ed7faf2fea499..bb9d9554f960fa9e10e01ab79838dc59e37638f0 100644 (file)
@@ -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