add option not to exclude 2 leading jets from the median
authorlcunquei <lcunquei@cern.ch>
Fri, 18 Jul 2014 14:49:41 +0000 (16:49 +0200)
committermvl <marco.van.leeuwen@cern.ch>
Sat, 19 Jul 2014 12:15:33 +0000 (14:15 +0200)
JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx
JETAN/AliAnalysisTaskJetBackgroundSubtract.h

index 4244b81..b183099 100644 (file)
@@ -65,6 +65,7 @@ AliAnalysisTaskJetBackgroundSubtract::AliAnalysisTaskJetBackgroundSubtract():
   fReplaceString2("B%d"),
   fSubtraction(k4Area),
   fKeepJets(kFALSE),
+  fExclude2Leading(kTRUE),
   fInJetArrayList(0x0),
   fOutJetArrayList(0x0),
   fh2CentvsRho(0x0),
@@ -93,6 +94,7 @@ AliAnalysisTaskJetBackgroundSubtract::AliAnalysisTaskJetBackgroundSubtract(const
   fReplaceString2("B%d"),
   fSubtraction(k4Area),
   fKeepJets(kFALSE),
+  fExclude2Leading(kTRUE),
   fInJetArrayList(0x0),
   fOutJetArrayList(0x0),
   fh2CentvsRho(0x0),
@@ -415,8 +417,13 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/)
 
    if(fSubtraction==kArea) rho = evBkg->GetBackground(1);
    if(fSubtraction==k4Area){
+     if(fExclude2Leading==kTRUE){
      rho = evBkg->GetBackground(0);
-     sigma=evBkg->GetSigma(0);
+     sigma=evBkg->GetSigma(0);}
+
+     if(fExclude2Leading==kFALSE){
+       rho=evBkg->GetBackground(3);
+       sigma=evBkg->GetSigma(3);}
    }
 
    if(fSubtraction==kRhoRecalc){
index 895b19b..631da29 100644 (file)
@@ -50,6 +50,7 @@ class AliAnalysisTaskJetBackgroundSubtract : public AliAnalysisTaskSE
     virtual void   SetSubtractionMethod(Int_t i){fSubtraction = i;}
     virtual Int_t  GetSubtractionMethod(){return fSubtraction;}
     virtual void   SetKeepJets(Bool_t b = kTRUE){fKeepJets = b;}
+    virtual void   SetExclude2Leading(Bool_t b=kTRUE){fExclude2Leading=b;}
     virtual void   SetBackgroundBranch(char* c){fBackgroundBranch = c;}  
     virtual void   SetNonStdOutputFile(char* c){fNonStdFile = c;}  
     virtual void   SetToReplace(char* c){fReplaceString1 = c;}  
@@ -84,9 +85,10 @@ class AliAnalysisTaskJetBackgroundSubtract : public AliAnalysisTaskSE
     TString         fReplaceString2;     // To construct the new output name   
     Int_t           fSubtraction;       // Parameter for subtraction mode 
     Bool_t          fKeepJets;          // keeps the jets with negative p_t rescaled to 0.1 GeV
+    Bool_t          fExclude2Leading;     //background excluding 2 leading jets, background 3 in AliAnalysisTaskJetCluster.cxx
     TList *fInJetArrayList; //! transient list to make ease the handling of input jets
     TList *fOutJetArrayList; //! transient list to make ease the reset of output jets
-
+  
     TH2F*         fh2CentvsRho;   //! centrality vs background density  
     TH2F*         fh2CentvsSigma;   //! centrality vs background sigma  
     TH2F*         fh2MultvsRho;   //! centrality vs background density