]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add some more static variables
authorrbertens <rbertens@cern.ch>
Fri, 5 Dec 2014 16:11:13 +0000 (17:11 +0100)
committerrbertens <rbertens@cern.ch>
Fri, 5 Dec 2014 16:11:24 +0000 (17:11 +0100)
PWG/FLOW/Tasks/AliJetFlowTools.cxx
PWG/FLOW/Tasks/AliJetFlowTools.h

index 2710b730ffaddaf46b89bb225a214c25e3b0c350..c55ac51b4b4d73a4c598084e7c401e7e8a546368 100644 (file)
@@ -1747,7 +1747,6 @@ void AliJetFlowTools::GetCorrelatedUncertainty(
         Float_t rangeLow,               // lower pt range
         Float_t rangeUp,                // upper pt range
         Float_t corr,                   // correlation strength
-        Float_t reductionPct,           // multiply final uncertainties by this number
         TString in,                     // input file name (created by this unfolding class)
         TString out                     // output file name (which will hold results of the systematic test)
         ) const
@@ -1763,9 +1762,6 @@ void AliJetFlowTools::GetCorrelatedUncertainty(
     readMe->ls();
     TFile* output(new TFile(out.Data(), "RECREATE"));   // create new output file
 
-    // later we'll multiply error square with this, so square here
-    reductionPct *= reductionPct;
-
     // create some null placeholder pointers
     TH1D* relativeErrorVariationInLow(0x0);
     TH1D* relativeErrorVariationInUp(0x0);
@@ -1919,11 +1915,9 @@ void AliJetFlowTools::GetCorrelatedUncertainty(
         if(relativeError2ndVariationOutLow) bOutLow = relativeError2ndVariationOutLow->GetBinContent(b+1);
         dInLow  = aInLow*aInLow + bInLow*bInLow + cInLow*cInLow;
         if(sym) dInLow += aInUp*aInUp;
-        dInLow *= reductionPct;         // for testing purposes
         if(dInLow > 0) relativeErrorInLow->SetBinContent(b+1, -1*TMath::Sqrt(dInLow));
         dOutLow = aOutLow*aOutLow + bOutLow*bOutLow + cOutLow*cOutLow;
         if(sym) dOutLow += aOutUp*aOutUp;
-        dOutLow *= reductionPct;        // for testing purposes
         if(dOutLow > 0) relativeErrorOutLow->SetBinContent(b+1, -1.*TMath::Sqrt(dOutLow));
     }
     // project the estimated errors on the nominal ratio
@@ -2050,7 +2044,6 @@ void AliJetFlowTools::GetShapeUncertainty(
         Float_t rangeLow,               // lower pt range
         Float_t rangeUp,                // upper pt range
         Float_t corr,                   // correlation strength
-        Float_t reductionPct,           // multiply final uncertainties by this number
         TString in,                     // input file name (created by this unfolding class)
         TString out                     // output file name (which will hold results of the systematic test)
         ) const
@@ -2066,9 +2059,6 @@ void AliJetFlowTools::GetShapeUncertainty(
     readMe->ls();
     TFile* output(new TFile(out.Data(), "RECREATE"));   // create new output file
 
-    // later we'll multiply error square with this, so square here
-    reductionPct *= reductionPct;
-
     // create some null placeholder pointers
     TH1D* relativeErrorRegularizationInLow(0x0);
     TH1D* relativeErrorRegularizationInUp(0x0);
@@ -2267,10 +2257,8 @@ void AliJetFlowTools::GetShapeUncertainty(
         if(relativeErrorMethodInUp) dInUp = relativeErrorMethodInUp->GetBinContent(b+1);
         if(relativeErrorMethodOutUp) dOutUp = relativeErrorMethodOutUp->GetBinContent(b+1);
         eInUp  = aInUp*aInUp + bInUp*bInUp + cInUp*cInUp + dInUp*dInUp;
-        eInUp *= reductionPct;
         if(eInUp > 0) relativeErrorInUp->SetBinContent(b+1, 1.*TMath::Sqrt(eInUp));
         eOutUp = aOutUp*aOutUp + bOutUp*bOutUp + cOutUp*cOutUp + dOutUp*dOutUp;
-        eOutUp *= reductionPct;
         if(eOutUp > 0) relativeErrorOutUp->SetBinContent(b+1, 1.*TMath::Sqrt(eOutUp));
         // for the lower bound
         if(relativeErrorRegularizationInLow) aInLow = relativeErrorRegularizationInLow->GetBinContent(b+1);
@@ -2291,10 +2279,8 @@ void AliJetFlowTools::GetShapeUncertainty(
         }
 
         eInLow  = aInLow*aInLow + bInLow*bInLow + cInLow*cInLow + dInLow*dInLow;
-        eInLow *= reductionPct;         // can be used for testing
         if(eInLow > 0) relativeErrorInLow->SetBinContent(b+1, -1.*TMath::Sqrt(eInLow));
         eOutLow = aOutLow*aOutLow + bOutLow*bOutLow + cOutLow*cOutLow + dOutLow*dOutLow;
-        eOutLow *= reductionPct;        // can be used for testing
         if(eOutLow > 0) relativeErrorOutLow->SetBinContent(b+1, -1.*TMath::Sqrt(eOutLow));
     }
     // project the estimated errors on the nominal ratio
@@ -4258,7 +4244,12 @@ void AliJetFlowTools::GetSignificance(
     iterator = 0;
     printf(" double shape[] = {\n");
     for(Int_t i(low); i < up+1; i++) { 
+        y = shape->GetErrorYhigh(i);
+        y*=gReductionFactor;
+        shape->SetPointEYhigh(i, y);
         y = shape->GetErrorYlow(i);
+        y*=gReductionFactor;
+        shape->SetPointEYlow(i, y);
         if(i==up) printf("%.4f}; \n\n", y);
         else printf("%.4f, \n", y);
         gShape->SetAt(y, iterator);
index ed2bab9b1d64effeca2fa50ead442df0a1028115..65c335c7d5d5a8e30dd0f61f20ab1c168f439597 100644 (file)
@@ -65,8 +65,9 @@ class AliJetFlowTools {
             kDeltaPhi,                  // default for delta phi
             kEmpty };                   // default style
         // setters, interface to the class
-        void            SetOffsetStart(Int_t g)         {gOffsetStop = g;}
-        void            SetOffsetStop(Int_t g)          {gOffsetStart = g;}
+        void            SetOffsetStart(Int_t g)         {gOffsetStop            = g;}
+        void            SetOffsetStop(Int_t g)          {gOffsetStart           = g;}
+        void            SetReductionFactor(Float_t g)   {gReductionFactor       = g;}
         void            SetSaveFull(Bool_t b)           {fSaveFull              = b;}
         void            SetInputList(TList* list)       {
             fInputList          = list;
@@ -204,7 +205,6 @@ class AliJetFlowTools {
                 Float_t rangeLow = 20,
                 Float_t rangeUp = 80,
                 Float_t corr = .5,
-                Float_t reductionPct = 1.,
                 TString in = "UnfoldedSpectra.root", 
                 TString out = "CorrelatedUncertainty.root") const;
         void            GetShapeUncertainty(
@@ -222,7 +222,6 @@ class AliJetFlowTools {
                 Float_t rangeLow = 20,
                 Float_t rangeUp = 80,
                 Float_t corr = .0,
-                Float_t reductionPct = 1.,
                 TString in = "UnfoldedSpectra.root", 
                 TString out = "ShapeUncertainty.root") const;
         Bool_t          SetRawInput (
@@ -490,6 +489,7 @@ TLatex* tex = new TLatex(xmin, ymax, string.Data());
         
         static Int_t            gOffsetStart;           // see initialization below
         static Int_t            gOffsetStop;            // see initialization below
+        static Float_t          gReductionFactor;       // multiply shape uncertainty by this factor
 
         // copy and assignment 
         AliJetFlowTools(const AliJetFlowTools&);             // not implemented
@@ -503,6 +503,7 @@ TArrayD* AliJetFlowTools::gShape        = new TArrayD(6);       // then used in
 TArrayD* AliJetFlowTools::gCorr         = new TArrayD(6);       // to calculate the significance of the results
 Int_t    AliJetFlowTools::gOffsetStart  =  1;           // start chi2 fit from this bin w.r.t. the binning supplied in the 'GetCorr/GetShape' functions
 Int_t    AliJetFlowTools::gOffsetStop   = -1;           // stop chi2 fit at this bin w.r.t. the binning supplied in the 'GetCorr/GetShape' functions
+Float_t  AliJetFlowTools::gReductionFactor      = .5;   // multiply shape uncertainty by this factor
 
 #endif
 //_____________________________________________________________________________