]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
modified macros for getting balance function in the old way (first project over full...
authorMichael Weber <m.weber@cern.ch>
Fri, 13 Dec 2013 17:49:01 +0000 (18:49 +0100)
committerMichael Weber <m.weber@cern.ch>
Fri, 13 Dec 2013 17:49:01 +0000 (18:49 +0100)
PWGCF/EBYE/macros/drawBalanceFunction2DPsi.C
PWGCF/EBYE/macros/drawBalanceFunctionPsi.C

index 9a156bf65b6b0576660d724438343403f7f54ab6..1be247630ec4d63c7ce43357117e10d55187683a 100644 (file)
@@ -1318,7 +1318,8 @@ void drawBFPsi2DFromCorrelationFunctions(const char* lhcPeriod = "LHC10h",
                                         Double_t ptAssociatedMin = -1.,
                                         Double_t ptAssociatedMax = -1.,
                                         TString eventClass = "Multiplicity",
-                                        Bool_t bRootMoments = kFALSE
+                                        Bool_t bRootMoments = kFALSE,
+                                        Bool_t bFullPhiForEtaProjection = kFALSE
 ) {
   //Macro that draws the BF distributions for each centrality bin
   //for reaction plane dependent analysis
@@ -1443,16 +1444,32 @@ void drawBFPsi2DFromCorrelationFunctions(const char* lhcPeriod = "LHC10h",
 
   c0->SaveAs(pngName.Data());
 
+ // do the full range for the projection on eta (for cross checking with published results)
+ if(bFullPhiForEtaProjection){
+   
+   drawProjections(gHistBalanceFunction2D,
+                  kTRUE,
+                  1,72,
+                  gCentrality,
+                  psiMin,psiMax,
+                  ptTriggerMin,ptTriggerMax,
+                  ptAssociatedMin,ptAssociatedMax,
+                  kTRUE,
+                  eventClass.Data(),
+                  bRootMoments);
+ }
+ else{
   drawProjections(gHistBalanceFunction2D,
-                 kTRUE,
-                 1,36,
-                 gCentrality,
-                 psiMin,psiMax,
-                 ptTriggerMin,ptTriggerMax,
-                 ptAssociatedMin,ptAssociatedMax,
-                 kTRUE,
-                 eventClass,
-                 bRootMoments);
+                  kTRUE,
+                  1,36,
+                  gCentrality,
+                  psiMin,psiMax,
+                  ptTriggerMin,ptTriggerMax,
+                  ptAssociatedMin,ptAssociatedMax,
+                  kTRUE,
+                  eventClass.Data(),
+                  bRootMoments);
+ }
 
   drawProjections(gHistBalanceFunction2D,
                  kFALSE,
index 37d1b2f6c898504da46496c298ce881d161c460b..36d6f9d4959244ff7a3192f0f7b1b72f505af6d3 100644 (file)
@@ -569,7 +569,66 @@ void draw(TList *listBF, TList *listBFShuffled, TList *listBFMixed,
     Printf("RMS: %lf - Error: %lf",gHistBalanceFunctionSubtracted->GetRMS(),gHistBalanceFunctionSubtracted->GetRMSError());
     Printf("Skeweness: %lf - Error: %lf",gHistBalanceFunctionSubtracted->GetSkewness(1),gHistBalanceFunctionSubtracted->GetSkewness(11));
     Printf("Kurtosis: %lf - Error: %lf",gHistBalanceFunctionSubtracted->GetKurtosis(1),gHistBalanceFunctionSubtracted->GetKurtosis(11));
+
+    // store in txt files
+
+    Bool_t kProjectInEta = kFALSE;
+    if(gDeltaEtaDeltaPhi==1) //Delta eta
+      kProjectInEta = kTRUE;
+
+    TString meanFileName = "";
+    if(kProjectInEta) 
+      meanFileName= "deltaEtaProjection_Mean.txt";
+    else              
+      meanFileName = "deltaPhiProjection_Mean.txt";
+    ofstream fileMean(meanFileName.Data(),ios::app);
+    fileMean << " " << gHistBalanceFunctionSubtracted->GetMean() << " " <<gHistBalanceFunctionSubtracted->GetMeanError()<<endl;
+    fileMean.close();
+
+    TString rmsFileName = "";
+    if(kProjectInEta) 
+      rmsFileName = "deltaEtaProjection_Rms.txt";
+    else              
+      rmsFileName = "deltaPhiProjection_Rms.txt";
+    ofstream fileRms(rmsFileName.Data(),ios::app);
+    fileRms << " " << gHistBalanceFunctionSubtracted->GetRMS() << " " <<gHistBalanceFunctionSubtracted->GetRMSError()<<endl;
+    fileRms.close();
+
+    TString skewnessFileName = "";
+    if(kProjectInEta) 
+      skewnessFileName = "deltaEtaProjection_Skewness.txt";
+    else              
+      skewnessFileName = "deltaPhiProjection_Skewness.txt";
+    ofstream fileSkewness(skewnessFileName.Data(),ios::app);
+    fileSkewness << " " << gHistBalanceFunctionSubtracted->GetSkewness(1) << " " <<gHistBalanceFunctionSubtracted->GetSkewness(11)<<endl;
+    fileSkewness.close();
+
+    TString kurtosisFileName = "";
+    if(kProjectInEta) 
+      kurtosisFileName = "deltaEtaProjection_Kurtosis.txt";
+    else
+      kurtosisFileName = "deltaPhiProjection_Kurtosis.txt";              
+    ofstream fileKurtosis(kurtosisFileName.Data(),ios::app);
+    fileKurtosis << " " << gHistBalanceFunctionSubtracted->GetKurtosis(1) << " " <<gHistBalanceFunctionSubtracted->GetKurtosis(11)<<endl;
+    fileKurtosis.close();
+
+    // Weighted mean as calculated for 1D analysis
+    Double_t weightedMean, weightedMeanError;
+    GetWeightedMean1D(gHistBalanceFunctionSubtracted,kProjectInEta,1,-1,weightedMean,weightedMeanError);
+    Printf("Weighted Mean: %lf - Error: %lf",weightedMean, weightedMeanError);
+    
+    // store in txt files
+    TString weightedMeanFileName = "";
+    if(kProjectInEta) 
+      weightedMeanFileName = "deltaEtaProjection_WeightedMean.txt";
+    else              
+      weightedMeanFileName = "deltaPhiProjection_WeightedMean.txt";
+    ofstream fileWeightedMean(weightedMeanFileName.Data(),ios::app);
+    fileWeightedMean << " " << weightedMean << " " <<weightedMeanError<<endl;
+    fileWeightedMean.close();
+  
   }
+
   // calculate the moments by hand
   else{