Update by Markus Fasel (Markus.Fasel@cern.ch)
authorrhaake <ruediger.haake@cern.ch>
Mon, 11 Aug 2014 23:31:18 +0000 (01:31 +0200)
committerrhaake <ruediger.haake@cern.ch>
Mon, 11 Aug 2014 23:32:32 +0000 (01:32 +0200)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.h
PWGJE/EMCALJetTasks/macros/AddTaskPtEMCalTrigger.C

index d7b63bd..4c1db4f 100644 (file)
@@ -77,6 +77,7 @@ namespace EMCalTriggerPtAnalysis {
 
                // Set default cuts
                fEtaRange.SetLimits(-0.8, 0.8);
+               fPtRange.SetLimits(0.15, 100.);
 
        }
 
@@ -236,8 +237,8 @@ namespace EMCalTriggerPtAnalysis {
                // Loop over all tracks (No cuts applied)
                for(int itrk = 0; itrk < fInputEvent->GetNumberOfTracks(); ++itrk){
                        track = dynamic_cast<AliESDtrack *>(fInputEvent->GetTrack(itrk));
-                       // first fill without pielup cut
-                       if(fEtaRange.IsInRange(track->Eta())) continue;
+                       if(!fEtaRange.IsInRange(track->Eta())) continue;
+                       if(!fPtRange.IsInRange(track->Pt())) continue;
                        if(triggers[0]) FillTrackHist("MinBias", track, zv, isPileupEvent, 0);
                        if(!triggerstrings.size()) // Non-EMCal-triggered
                                FillTrackHist("NoEMCal", track, zv, isPileupEvent, 0);
@@ -259,6 +260,7 @@ namespace EMCalTriggerPtAnalysis {
                                TIter trackIter(acceptedTracks.get());
                                while((track = dynamic_cast<AliESDtrack *>(trackIter()))){
                                        if(!fEtaRange.IsInRange(track->Eta())) continue;
+                                       if(!fPtRange.IsInRange(track->Pt())) continue;
                                        if(triggers[0]) FillTrackHist("MinBias", track, zv, isPileupEvent, icut + 1);
                                        if(!triggerstrings.size()) // Non-EMCal-triggered
                                                FillTrackHist("NoEMCal", track, zv, isPileupEvent, icut + 1);
index c498b13..efd2d99 100644 (file)
@@ -35,6 +35,7 @@ public:
 
        void AddTrackCuts(AliESDtrackCuts *trackCuts) { fListTrackCuts->Add(trackCuts); }
        void SetEtaRange(double etamin, double etamax) { fEtaRange.SetLimits(etamin, etamax); }
+       void SetPtRange(double ptmin, double ptmax) { fPtRange.SetLimits(ptmin, ptmax); }
 
 private:
        AliAnalysisTaskPtEMCalTrigger(const AliAnalysisTaskPtEMCalTrigger &);
@@ -53,6 +54,7 @@ private:
 
        // Cuts
        AliCutValueRange<double>      fEtaRange;              // Eta Selection Range
+       AliCutValueRange<double>          fPtRange;                               // Pt Selection Range
 
        ClassDef(AliAnalysisTaskPtEMCalTrigger, 1);           // Analysis of EMCal triggered events
 };
index 5306baf..7e2beb4 100644 (file)
@@ -21,6 +21,7 @@ AliAnalysisTask* AddTaskPtEMCalTrigger(){
         EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger *pttriggertask = new EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger("ptemcaltriggertask");
         pttriggertask->SelectCollisionCandidates(AliVEvent::kINT7 | AliVEvent::kEMC7);                          // Select both INT7 or EMC7 triggered events
         mgr->AddTask(pttriggertask);
+        pttriggertask->SetPtRange(2., 100.);
 
         // Create charged hadrons pPb standard track cuts
         AliESDtrackCuts *standardTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(true, 1);