]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
moved some files, added generator function to addtask macro
authorrbertens <rbertens@cern.ch>
Sat, 3 May 2014 15:49:08 +0000 (17:49 +0200)
committerrbertens <rbertens@cern.ch>
Sat, 3 May 2014 15:49:25 +0000 (17:49 +0200)
PWG/FLOW/Tasks/AliJetFlowTools.cxx
PWG/FLOW/Tasks/AliJetFlowTools.h
PWGCF/FLOW/Attic/AddTaskJetFlow.C [moved from PWGCF/FLOW/macros/AddTaskJetFlow.C with 100% similarity]
PWGCF/FLOW/macros/AddTaskJetFlowMC.C

index ca1dd8658eb03034ef1cfc664b7be3a9059746d4..3c1c83f2ad4e7721c6604be60eceb7016613e1a4 100644 (file)
@@ -1667,6 +1667,34 @@ void AliJetFlowTools::GetCorrelatedUncertainty(
             SavePadToPDF(relativeErrorVariation);
             Style(AddLegend(gPad));
             relativeErrorVariation->Write();
+
+            // now smoothen the diced response error (as it is expected to be flat)
+            // this is done by fitting a constant to the diced resonse error histo
+            //
+            TF1* lin = new TF1("lin", "[0]", rangeLow, rangeUp);
+            relativeErrorVariationInUp->Fit(lin, "L", "", rangeLow, rangeUp);
+            if(!gMinuit->fISW[1] == 3) printf(" fit is NOT ok ! " );
+            for(Int_t i(0); i < relativeErrorVariationInUp->GetNbinsX(); i++) {
+                relativeErrorVariationInUp->SetBinContent(i+1, lin->GetParameter(0));
+            }
+            relativeErrorVariationInLow->Fit(lin, "L", "", rangeLow, rangeUp);
+            printf(" > Fit over diced resonse, new value for all bins is %.4f < \n ", lin->GetParameter(0));
+            for(Int_t i(0); i < relativeErrorVariationInUp->GetNbinsX(); i++) {
+                relativeErrorVariationInLow->SetBinContent(i+1, 0);//lin->GetParameter(0));
+            }
+            relativeErrorVariationOutUp->Fit(lin, "L", "", rangeLow, rangeUp);
+            printf(" > Fit over diced resonse, new value for all bins is %.4f < \n ", lin->GetParameter(0));
+            for(Int_t i(0); i < relativeErrorVariationInUp->GetNbinsX(); i++) {
+                relativeErrorVariationOutUp->SetBinContent(i+1, lin->GetParameter(0));
+            }
+            relativeErrorVariationOutLow->Fit(lin, "L", "", rangeLow, rangeUp);
+            printf(" > Fit over diced resonse, new value for all bins is %.4f < \n ", lin->GetParameter(0));
+            for(Int_t i(0); i < relativeErrorVariationInUp->GetNbinsX(); i++) {
+                relativeErrorVariationOutLow->SetBinContent(i+1, 0);//lin->GetParameter(0));
+            }
+
+        
+        
         }
     }
     // call the functions for a second set of systematic sources
@@ -2001,7 +2029,8 @@ void AliJetFlowTools::GetShapeUncertainty(
                 rangeLow, 
                 rangeUp,
                 readMe,
-                "recBin");
+                "recBin",
+                fRMS);
         if(relativeErrorRecBinOutUp) {
             // canvas with the error from regularization strength
             TCanvas* relativeErrorRecBin(new TCanvas("relativeErrorRecBin"," relativeErrorRecBin"));
@@ -2097,10 +2126,10 @@ void AliJetFlowTools::GetShapeUncertainty(
         if(relativeErrorMethodInLow) dInLow = relativeErrorMethodInLow->GetBinContent(b+1);
         if(relativeErrorMethodOutLow) dOutLow = relativeErrorMethodOutLow->GetBinContent(b+1);
         if(fSymmRMS) {  // take first category as symmetric
-//            aInLow = aInUp*1.5;
-//            aOutLow = aOutUp*1.5;
             aInLow = aInUp;
             aOutLow = aOutUp;
+            cInLow = cInUp;
+            cOutLow = cOutUp;   // other sources
             if(dInLow < dInUp) dInLow = dInUp;
             if(dOutLow < dOutUp) dOutLow = dOutUp;
         }
index 900bf5b28af4275f0b0dfb24d1180ef850d1a5fd..efa10c08cc0c36f89560c963380cc0dbbdf1e622 100644 (file)
@@ -258,8 +258,11 @@ class AliJetFlowTools {
             t->Draw("same");
             return t;
         } 
-        static TLatex*          AddLogo(Bool_t logo, Double_t xmin = .59, Double_t ymax = .81) {
-            return AddTLatex(xmin, ymax, logo ? "ALICE Preliminary" : "ALICE");
+        static TLatex*          AddLogo(Int_t logo, Double_t xmin = .59, Double_t ymax = .81) {
+            if(logo == 0) return AddTLatex(xmin, ymax, "ALICE");
+            else if (logo == 1) return AddTLatex(xmin, ymax, "ALICE Preliminary");
+            else if (logo == 2) return AddTLatex(xmin, ymax, "ALICE Simulation");
+            return 0x0;
         }
         static TLatex*          AddSystem() {
             return AddTLatex(0.55, 87, "Pb-Pb #sqrt{#it{s}}}_{NN} = 2.76 TeV");
index be06436c7d6e530c32fe403df246e854f514addf..bace1e4c5aaf30945e6133867139c2bb321b663c 100644 (file)
@@ -35,3 +35,11 @@ AliAnalysisTaskJetFlowMC* AddTaskJetFlowMC(
   mgr->ConnectOutput (eTask, 1, mgr->CreateContainer(Form("%s_container", fileName.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, fileName.Data()));
   return eTask;
 }
+
+namespace TaskJetFlowMC{
+    TF1* GetSpectrum() {
+        TF1* spectrum = new TF1("fspectrum", "[0]*(TMath::Power([1], 2)*x*TMath::Exp(-[1]*x))+(x>1)*[2]*(1.17676e-01*TMath::Sqrt(0.1396*0.1396+x*x)*TMath::Power(1.+1./[3]/8.21795e-01*TMath::Sqrt(0.1396*0.1396+x*x),-1.*[3]))*(1/(1 + TMath::Exp(-(x - [4])/[5])))", .2, 200.);
+        fspectrum->SetParameters(2434401791.20528 ,2.98507 ,10069622.25117 ,5.50000 ,2.80000 ,0.20000 );
+        return fspectrum;   
+    }
+}