Use aod track selection wrapper inside the task, when running on aods
authormfasel <mfasel@lbl.gov>
Tue, 23 Sep 2014 12:40:53 +0000 (14:40 +0200)
committermverweij <marta.verweij@cern.ch>
Wed, 24 Sep 2014 08:53:08 +0000 (10:53 +0200)
PWGJE/CMakelibPWGJEEMCALJetTasks.pkg
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.h
PWGJE/EMCALJetTasks/UserTasks/AliEMCalPtTaskTrackSelectionESD.cxx
PWGJE/PWGJEEMCALJetTasksLinkDef.h

index d42c9ac..1467606 100644 (file)
@@ -90,6 +90,7 @@ set ( SRCS
  EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.cxx 
  EMCALJetTasks/UserTasks/AliEMCalPtTaskVTrackSelection.cxx
  EMCALJetTasks/UserTasks/AliEMCalPtTaskTrackSelectionESD.cxx
+ EMCALJetTasks/UserTasks/AliEMCalPtTaskTrackSelectionAOD.cxx
 )
 
 # Add code that needs fastjet or FJWrapper here
index a26ca34..8cbeaa7 100644 (file)
@@ -49,6 +49,7 @@
 
 #include "AliEMCalHistoContainer.h"
 #include "AliEMCalPtTaskVTrackSelection.h"
+#include "AliEMCalPtTaskTrackSelectionAOD.h"
 #include "AliEMCalPtTaskTrackSelectionESD.h"
 #include "AliAnalysisTaskPtEMCalTrigger.h"
 
@@ -695,6 +696,17 @@ namespace EMCalTriggerPtAnalysis {
        }
 
        //______________________________________________________________________________
+       void AliAnalysisTaskPtEMCalTrigger::AddCutsForAOD(AliESDtrackCuts* trackCuts, UInt_t filterbits) {
+               /*
+                * Add new track cuts to the task
+                *
+                * @param trackCuts: Object of type AliESDtrackCuts
+                */
+               fListTrackCuts->AddLast(new AliEMCalPtTaskTrackSelectionAOD(trackCuts, filterbits));
+       }
+
+
+       //______________________________________________________________________________
        TString AliAnalysisTaskPtEMCalTrigger::BuildTriggerString() {
                /*
                 * Build trigger string from the trigger maker
index 08258d4..434d6cb 100644 (file)
@@ -36,6 +36,7 @@ public:
        virtual Bool_t Run();
 
        void AddESDTrackCuts(AliESDtrackCuts *trackCuts);
+       void AddCutsForAOD(AliESDtrackCuts *trackCuts, UInt_t filterBits);
        void SetEtaRange(double etamin, double etamax) { fEtaRange.SetLimits(etamin, etamax); }
        void SetPtRange(double ptmin, double ptmax) { fPtRange.SetLimits(ptmin, ptmax); }
        void SetSwapEta() { fSwapEta = kTRUE; }
index d885ebc..e817c50 100644 (file)
@@ -74,9 +74,12 @@ AliEMCalPtTaskTrackSelectionESD& AliEMCalPtTaskTrackSelectionESD::operator=(
         */
        AliEMCalPtTaskVTrackSelection::operator=(ref);
        if(&ref != this){
-               this->~AliEMCalPtTaskTrackSelectionESD();
+               if(fTrackCuts) {
+                       delete fTrackCuts;
+                       fTrackCuts = NULL;
+               }
+               if(ref.fTrackCuts) fTrackCuts = new AliESDtrackCuts(*(ref.fTrackCuts));
        }
-       if(ref.fTrackCuts) fTrackCuts = new AliESDtrackCuts(*(ref.fTrackCuts));
        return *this;
 }
 
index 89bb4b0..b96ee9c 100644 (file)
@@ -77,6 +77,7 @@
 #pragma link C++ class EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger+;
 #pragma link C++ class EMCalTriggerPtAnalysis::AliEMCalPtTaskVTrackSelection+;
 #pragma link C++ class EMCalTriggerPtAnalysis::AliEMCalPtTaskTrackSelectionESD+;
+#pragma link C++ class EMCalTriggerPtAnalysis::AliEMCalPtTaskTrackSelectionAOD+;
 
 #ifdef HAVE_FASTJET
 #pragma link C++ class AliEmcalJetTask+;