Allow Jet only histos in DCorr task
authorcbianchi <cbianchi@cern.ch>
Fri, 4 Apr 2014 14:17:10 +0000 (16:17 +0200)
committermvl <marco.van.leeuwen@cern.ch>
Sun, 6 Apr 2014 09:51:18 +0000 (11:51 +0200)
PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx
PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.h
PWGJE/FlavourJetTasks/macros/AddTaskFlavourJetCorrelations.C

index a72665d..0939132 100644 (file)
@@ -81,7 +81,7 @@ fJetOnlyMode(0)
 
 //_______________________________________________________________________________
 
-AliAnalysisTaskFlavourJetCorrelations::AliAnalysisTaskFlavourJetCorrelations(const Char_t* name, AliRDHFCuts* cuts,ECandidateType candtype) :
+AliAnalysisTaskFlavourJetCorrelations::AliAnalysisTaskFlavourJetCorrelations(const Char_t* name, AliRDHFCuts* cuts,ECandidateType candtype, Bool_t jetOnly) :
 AliAnalysisTaskEmcalJet(name,kTRUE),
 fUseMCInfo(kTRUE),
 fUseReco(kTRUE),  
@@ -99,7 +99,7 @@ fLeadingJetOnly(kFALSE),
 fJetRadius(0),
 fCandidateArray(0),
 fSideBandArray(0),
-fJetOnlyMode(0)
+fJetOnlyMode(jetOnly)
 {
    //
    // Constructor. Initialization of Inputs and Outputs
index 8c5dfc7..1ed0ae0 100644 (file)
@@ -46,7 +46,7 @@ class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
   enum ECandidateType{ kD0toKpi, kDstartoKpipi };
 
   AliAnalysisTaskFlavourJetCorrelations();
-  AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype);
+  AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype, Bool_t jetOnly=kFALSE);
   virtual ~AliAnalysisTaskFlavourJetCorrelations();
 
   virtual void     UserCreateOutputObjects();
@@ -64,8 +64,7 @@ class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
   // set usage of reconstructed tracks
   void   SetUseReco(Bool_t reco) {fUseReco=reco;}
   Bool_t GetUseReco() {return fUseReco;}
-  //used in AddTaskFlavourJetCorrelation only
-  void SetJetOnlyMode(Bool_t mode=kTRUE) {fJetOnlyMode=mode;}
+  //no setter because needed in the constructor
   Bool_t GetJetOnlyMode() {return fJetOnlyMode;}
   
   void SetMassLimits(Double_t range, Int_t pdg);
index 7552dd8..08bfbeb 100644 (file)
@@ -32,7 +32,7 @@ AliAnalysisTaskFlavourJetCorrelations *AddTaskFlavourJetCorrelations(
      
      // create the task
      AliAnalysisTaskFlavourJetCorrelations *task = new AliAnalysisTaskFlavourJetCorrelations("AnaTaskFlavourJetCorrelations", 
-       dummyDcut, dummycand);
+       dummyDcut, dummycand, bJetOnly);
      task->SetJetsName(jetArrname);
      task->SetMC(theMCon);
      task->SetUseReco(reco);
@@ -40,7 +40,6 @@ AliAnalysisTaskFlavourJetCorrelations *AddTaskFlavourJetCorrelations(
      task->SetJetAcceptanceType(cutType);
      task->SetJetPtCut(jptcut);
      task->SetPercAreaCut(percjetareacut);
-     task->SetJetOnlyMode();
      mgr->AddTask(task);
 
      if(theMCon) {