]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Make clones of cut histos, and flag as scaled
authorcholm <Christian.Holm.Christensen@cern.ch>
Wed, 24 Sep 2014 11:15:40 +0000 (13:15 +0200)
committermkrzewic <mikolaj.krzewicki@cern.ch>
Mon, 29 Sep 2014 08:47:49 +0000 (10:47 +0200)
PWGLF/FORWARD/analysis2/AliFMDSharingFilter.cxx

index dc3a3e1e539eb7bbc34a941c8c7ae934f12d58c0..6c65c5c667ccf97fce493b569e5f6e7b5738f219 100644 (file)
@@ -584,14 +584,18 @@ AliFMDSharingFilter::Terminate(const TList* dir, TList* output, Int_t nEvents)
   TH2* lowCuts  = static_cast<TH2*>(d->FindObject("lowCuts"));
   TH2* highCuts = static_cast<TH2*>(d->FindObject("highCuts"));
   if (lowCuts && nFiles) {
-    lowCuts->Scale(1. / nFiles->GetVal());
-    out->Add(lowCuts->Clone());
+    TH1* oh = static_cast<TH1*>(lowCuts->Clone());
+    oh->Scale(1. / nFiles->GetVal());  
+    oh->SetBit(BIT(20));
+    out->Add(oh);
   }
   else 
     AliWarning("low cuts histogram not found in input list");
   if (highCuts && nFiles) {
-    highCuts->Scale(1. / nFiles->GetVal());
-    out->Add(highCuts->Clone());
+    TH1* oh = static_cast<TH1*>(highCuts->Clone());
+    oh->Scale(1. / nFiles->GetVal());
+    oh->SetBit(BIT(20));
+    out->Add(oh);
   }
   else 
     AliWarning("high cuts histogram not found in input list");