]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added plotting versus refmult and modified some classes to not stream
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Jul 2010 12:34:17 +0000 (12:34 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Jul 2010 12:34:17 +0000 (12:34 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.h
PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.cxx
PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.h
PWG2/FLOW/Tools/macros/plotCumulants.C

index 6cfa85b6b7209738322beb8e9d13d21ffba0600d..e163fcc6dabf485ccf238be104020e6d67c9470b 100644 (file)
@@ -148,7 +148,7 @@ class AliFlowAnalysisWithLYZEventPlane {
   Double_t  fQ2sum;                           // flow vector sum squared
      
 
-  ClassDef(AliFlowAnalysisWithLYZEventPlane, 1);          // lyz analysis 
+  ClassDef(AliFlowAnalysisWithLYZEventPlane,0);          // lyz analysis 
 };
 
  #endif
index a3c10a11cee16e4bd486ab8fadec6294981df428..3a080a7434dd7269aa0655cd43b23079d57d9fa2 100644 (file)
@@ -170,7 +170,7 @@ class AliFlowAnalysisWithLeeYangZeros {
   AliFlowCommonHist*        fCommonHists;     //control histograms
   AliFlowCommonHistResults* fCommonHistsRes;  //final results histograms
  
-  ClassDef(AliFlowAnalysisWithLeeYangZeros,1)  // macro for rootcint
+  ClassDef(AliFlowAnalysisWithLeeYangZeros,0)  // macro for rootcint
 };
  
      
index a95302145e4ba4466db30c80a2b24dd7ab6559af..d0271dfb0315fd46aea28020d494796aa115f493 100644 (file)
@@ -153,7 +153,7 @@ class AliFlowAnalysisWithMCEventPlane {
    TProfile *fPairCorrelator[2]; // profiles used to calculate <cos[n(phi_{pair}-RP)]> and <sin[n(phi_{pair}-RP)]> (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2
    Double_t fXinPairAngle; // x in definition phi_{pair} = x*phi1+(1-x)*phi2
                                        
-   ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // Analyse particle distribution versus MC reaction plane
+   ClassDef(AliFlowAnalysisWithMCEventPlane,0)  // Analyse particle distribution versus MC reaction plane
      };
 
      
index e8ebad14fb427683e89c9edf1e5f887de34ccf0f..b90fa34772a90f117804667c42ec9473edb07695 100644 (file)
@@ -123,7 +123,6 @@ AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
  fIntFlowCorrelationsEBE(NULL),
  fIntFlowEventWeightsForCorrelationsEBE(NULL),
  fIntFlowCorrelationsAllEBE(NULL),
- fReferenceMultiplicityEBE(0.),
  fAvMultiplicity(NULL),
  fIntFlowCorrelationsPro(NULL),
  fIntFlowCorrelationsAllPro(NULL),
@@ -261,7 +260,6 @@ void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
  Double_t wPt  = 1.; // pt weight
  Double_t wEta = 1.; // eta weight
  
- fReferenceMultiplicityEBE = anEvent->GetReferenceMultiplicity(); // reference multiplicity for current event
  Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane)
   
  // a) Fill the common control histograms and call the method to fill fAvMultiplicity:
index 2d624b3968778990a8898fcae12f9ac3239608c3..bc04a8663c9d23cc88d91cccaca58db8c1512a32 100644 (file)
@@ -436,8 +436,7 @@ class AliFlowAnalysisWithQCumulants{
   TH1D *fIntFlowEventWeightsForCorrelationsEBE; // 1st bin: eW_<2>, 2nd bin: eW_<4>, 3rd bin: eW_<6>, 4th bin: eW_<8>
   TH1D *fIntFlowCorrelationsAllEBE; // to be improved (add comment)
   TH1D *fIntFlowCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance
-  TH1D *fIntFlowEventWeightForCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance
-  Double_t fReferenceMultiplicityEBE; // reference multiplicity  
+  TH1D *fIntFlowEventWeightForCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance 
   //  3d.) profiles:
   TProfile *fAvMultiplicity; // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8
   TProfile *fIntFlowCorrelationsPro; // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!) 
@@ -554,7 +553,7 @@ class AliFlowAnalysisWithQCumulants{
   TProfile *fDiffFlowDirectCorrelations[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
   TProfile *fDiffFlowDirectCorrectionTermsForNUA[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
                   
-  ClassDef(AliFlowAnalysisWithQCumulants, 1);
+  ClassDef(AliFlowAnalysisWithQCumulants, 0);
 };
 
 //================================================================================================================
index 4e7ba5aac0fbacd5d2b28e58feb1e286623e64d1..c24989af2e801096de1b57b2be4e56029923c546 100644 (file)
@@ -63,6 +63,7 @@ AliFlowCommonHist::AliFlowCommonHist():
   fHistProMeanPtperBin(NULL),
   fHistQ(NULL),
   fHarmonic(NULL),
+  fRefMultVsNoOfRPs(NULL),
   fHistList(NULL)
 {
   
@@ -92,6 +93,7 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a):
   fHistProMeanPtperBin(new TProfile(*a.fHistProMeanPtperBin)),
   fHistQ(new TH1F(*a.fHistQ)),
   fHarmonic(new TProfile(*a.fHarmonic)),
+  fRefMultVsNoOfRPs(new TProfile(*a.fRefMultVsNoOfRPs)),
   fHistList(NULL)
 {
   // copy constructor
@@ -116,6 +118,7 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a):
   fHistList-> Add(fHistPhiEtaPOI);
   fHistList-> Add(fHistProMeanPtperBin); 
   fHistList-> Add(fHarmonic);  
+  fHistList-> Add(fRefMultVsNoOfRPs);
   fHistList-> Add(fHistQ);           
   //  TListIter next = TListIter(a.fHistList);
 
@@ -164,6 +167,7 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a):
     fHistProMeanPtperBin(NULL),
     fHistQ(NULL),
     fHarmonic(NULL),
+    fRefMultVsNoOfRPs(NULL),
     fHistList(NULL)
 {
 
@@ -320,6 +324,13 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a):
   sName +=anInput;
   fHarmonic = new TProfile(sName.Data(),sName.Data(),1,0,1);
   fHarmonic ->SetYTitle("harmonic");
+  
+  //<reference multiplicity> versus # of RPs
+  sName = "Reference_Multiplicity_Vs_Number_Of_RPs_";
+  sName +=anInput;
+  fRefMultVsNoOfRPs = new TProfile(sName.Data(),sName.Data(),iNbinsMult, dMultMin, dMultMax);
+  fRefMultVsNoOfRPs->SetYTitle("<reference multiplicity>");
+  fRefMultVsNoOfRPs->SetXTitle("# of RPs");
 
   //list of histograms if added here also add in copy constructor
   fHistList = new TList();
@@ -341,7 +352,8 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a):
   fHistList-> Add(fHistPhiEtaRP);  
   fHistList-> Add(fHistPhiEtaPOI);
   fHistList-> Add(fHistProMeanPtperBin);
-  fHistList-> Add(fHarmonic);  
+  fHistList-> Add(fHarmonic); 
+  fHistList-> Add(fRefMultVsNoOfRPs); 
   fHistList-> Add(fHistQ);           
 
 }
@@ -372,6 +384,7 @@ AliFlowCommonHist::~AliFlowCommonHist()
   delete fHistProMeanPtperBin;
   delete fHistQ;
   delete fHarmonic;
+  delete fRefMultVsNoOfRPs;
   delete fHistList;
 }
 
@@ -464,6 +477,9 @@ Bool_t AliFlowCommonHist::FillControlHistograms(AliFlowEventSimple* anEvent)
   
   fHistMultRP->Fill(dMultRP);
   fHistMultPOI->Fill(dMultPOI);
+  
+  //<reference multiplicity> versus # of RPs:
+  fRefMultVsNoOfRPs->Fill(dMultRP+0.5,anEvent->GetReferenceMultiplicity(),1.);
 
   return kTRUE; 
 }
index aa154dc99d781dca684e337d3b9d96417d9d4564..71a8540fcb84fa97217973b0df3179d84424f9cc 100644 (file)
@@ -60,7 +60,8 @@ class AliFlowCommonHist: public TNamed {
   TH2F*     GetHistPhiEtaPOI()       {return fHistPhiEtaPOI;  } ; 
   TProfile* GetHistProMeanPtperBin() {return fHistProMeanPtperBin; } ;
   TH1F*     GetHistQ()               {return fHistQ; } ;    
-  TProfile* GetHarmonic()            {return fHarmonic; } ;        
+  TProfile* GetHarmonic()            {return fHarmonic; } ; 
+  TProfile* GetRefMultVsNoOfRPs()    {return fRefMultVsNoOfRPs; } ;
   TList*    GetHistList()            {return fHistList;} ;  
 
   virtual Double_t  Merge(TCollection *aList);  //merge function
@@ -94,6 +95,7 @@ class AliFlowCommonHist: public TNamed {
   TProfile* fHistProMeanPtperBin; //mean pt for each pt bin (for POI selection)
   TH1F*     fHistQ;               //Qvector distribution
   TProfile* fHarmonic;            //harmonic 
+  TProfile* fRefMultVsNoOfRPs;    //<reference multiplicity> versus # of RPs
 
   TList*    fHistList;            //list to hold all histograms  
 
index 73d509e4f9b956cece2d7cb6e9e0f0388473a4fb..517b8ccb80a5f83d06f46ca5bcddfa876f4d0f02 100644 (file)
@@ -1,26 +1,32 @@
 // add comment
  
 // Set how many output analysis files in total you want to access:
-const Int_t nFiles = 2;
+const Int_t nFiles = 1;
  
 // Set how many of those output analysis files you want to represent with a mesh (usually used to represent results of simulations):
-const Int_t nSim = 1;
+const Int_t nSim = 0;
  
 // Set paths of all output analysis files (first the ones to be represented with mesh (simulations), then the ones to be represented with markers (real data))
-TString files[nFiles] = {"sim/pythia/LHC10a18","data/mergedBC"};
+TString files[nFiles] = {"data"};
  
 // Set analysis types for all output analysis files (can be "ESD","AOD","MC",""):
-TString type[nFiles] = {"ESD","ESD"};
+TString type[nFiles] = {"ESD"};
  
 // Set mesh color:
-Int_t meshColor[nSim] = {kBlue-10};
+Int_t meshColor[nSim] = {};
 
 // Set marker styles:
 Int_t markerStyle[nFiles-nSim] = {kStar};
 
+// Set marker colors:
+Int_t markerColor[nFiles-nSim] = {kBlack};
+
 // Set legend entries:
-TString legendEntry[nFiles] = {"Pythia (LHC10a18)","7 TeV data (LHC10b, LHC10c)"};
+TString legendEntry[nFiles] = {"pp example run"};
  
+// Set if you whish to plot cumulants versus <reference multiplicity> (by default they are plotted versus # of RPs):
+Bool_t plotCumulantsVsReferenceMultiplicity = kTRUE;
+
 // Set flow values whose theoretical contribution to cumulants will be shown on the plots with the straight coloured lines: 
 Bool_t showTheoreticalLines = kFALSE;
 const Int_t nFlowValues = 2;
@@ -28,7 +34,7 @@ Double_t v[nFlowValues] = {0.1,0.05};
 Int_t lineColor[nFlowValues] = {kRed,kBlue}; 
 
 // If the statistical error of 6th and 8th order cumulant is huge you may prefer not to show them:
-Bool_t plotOnly2ndAnd4thOrderCumulant = kFALSE;
+Bool_t plotOnly2ndAnd4thOrderCumulant = kTRUE;
 
 // For comparison sake show also GFC results with dotted line:
 Bool_t showAlsoGFCResults = kFALSE;
@@ -42,6 +48,7 @@ TFile *commonOutputFiles[nFiles] = {NULL}; // common output files "AnalysisResul
 TList *lists[nFiles][nMethods] = {{NULL}}; // lists cobj<method> holding objects with results for each method
 TH1D *cumulantsVsM[nFiles][nMethods][4] = {{{NULL}}}; // histograms with results for cumulants vs multiplicity (4 stands for 4 cumulant orders)
 TLine *lines[nFlowValues][4] = {{NULL}}; // lines denoting theoretical flow contribution to cumulants
+TProfile *refMultVsNoOfRPs = NULL; // <reference multipicity> versus # of RPs
 
 // Ranges for plots:
 Double_t xMin[4]={0.};
@@ -145,7 +152,8 @@ void Plot()
    if(cumulantsVsM[f][0][co])
    {
     cumulantsVsM[f][0][co]->Draw("e1same"); 
-    cumulantsVsM[f][0][co]->SetMarkerStyle(markerStyle[f-nSim]);    
+    cumulantsVsM[f][0][co]->SetMarkerStyle(markerStyle[f-nSim]);  
+    cumulantsVsM[f][0][co]->SetMarkerColor(markerColor[f-nSim]); 
     if(co==0)
     {
      if(showAlsoGFCResults)
@@ -168,7 +176,24 @@ void Plot()
   // Draw legend:
   if(co==0){legend->Draw("same");}
  } // end of for(Int_t co=0;co<4;co++) // cumulant order
-
+ // Plot also <reference multiplicity> vs # of RPs:
+ if(plotCumulantsVsReferenceMultiplicity)
+ {
+  if(refMultVsNoOfRPs)
+  {
+   TCanvas *cRefMultVsNoOfRPs = new TCanvas("cRefMultVsNoOfRPs","#LTreference multiplicity#GT vs # of RPs");
+   refMultVsNoOfRPs->SetTitle("");
+   refMultVsNoOfRPs->GetXaxis()->SetRangeUser(0,refMultVsNoOfRPs->FindLastBinAbove());
+   refMultVsNoOfRPs->Draw();   
+  } else
+    {
+     cout<<endl;
+     cout<<"WARNING: refMultVsNoOfRPs is NULL in Plot() !!!!"<<endl;
+     cout<<endl;
+    }
+ }   
 } // end of void Plot()
  
 // =====================================================================================
@@ -293,6 +318,8 @@ void DetermineMinMax()
 void GetHistograms()
 {
  // Get histograms with results for cumulants vs multiplicity.
+ if(plotCumulantsVsReferenceMultiplicity) {GetProfileForRefMultVsNoOfRPs();}
   
  TString qcFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"};
  TString gfcFlag[4] = {"GFC{2}","GFC{4}","GFC{6}","GFC{8}"};
@@ -310,6 +337,10 @@ void GetHistograms()
      for(Int_t co=0;co<4;co++)
      {
       cumulantsVsM[f][m][co] = dynamic_cast<TH1D*> (temp->FindObject(Form("fIntFlowQcumulantsVsM, %s",qcFlag[co].Data())));
+      if(plotCumulantsVsReferenceMultiplicity)
+      {
+       Map(cumulantsVsM[f][m][co]);
+      }    
      } 
     } 
    } // end of if(!(strcmp(method[m].Data(),"QC")))
@@ -322,6 +353,10 @@ void GetHistograms()
      for(Int_t co=0;co<4;co++)
      {
       cumulantsVsM[f][m][co] = dynamic_cast<TH1D*> (temp->FindObject(Form("fReferenceFlowCumulantsVsM, %s",gfcFlag[co].Data())));
+      if(plotCumulantsVsReferenceMultiplicity)
+      {
+       Map(cumulantsVsM[f][m][co]);
+      }
      }
     } 
    } // end of else if(!(strcmp(method[m].Data(),"QC")))
@@ -332,6 +367,53 @@ void GetHistograms()
 
 // =====================================================================================
 
+void GetProfileForRefMultVsNoOfRPs()
+{
+ // Get profile holding <reference multiplicity> versus # of RPs.
+ AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*> (lists[0][0]->FindObject("AliFlowCommonHistQC"));
+ if(commonHist && commonHist->GetRefMultVsNoOfRPs())
+ {
+  refMultVsNoOfRPs = commonHist->GetRefMultVsNoOfRPs();
+ } else
+   {
+    cout<<endl;
+    cout<<"WARNING: commonHist && commonHist->GetRefMultVsNoOfRPs() is NULL in method"<<endl;
+    cout<<"         GetProfileForRefMultVsNoOfRPs() !!!! But was searching only in the file"<<endl;
+    cout<<"         "<<commonOutputFiles[0]->GetName()<<", though."<<endl;
+    cout<<"         Do you have this file available?"<<endl; 
+    cout<<endl;
+   }
+} // end of void GetProfileForRefMultVsNoOfRPs()
+
+// =====================================================================================
+
+void Map(TH1D *hist)
+{
+ // Map cumulant versus # of RPs into cumulants versus <reference multiplicity>.
+ TH1D *temp = NULL;
+ if(hist)
+ {
+  temp = (TH1D*) hist->Clone();
+  temp->Reset();
+  Int_t nBins = hist->GetNbinsX();
+  for(Int_t b=1;b<=nBins;b++)
+  {
+   temp->SetBinContent((Int_t)refMultVsNoOfRPs->GetBinContent(b),hist->GetBinContent(b));
+   temp->SetBinError((Int_t)refMultVsNoOfRPs->GetBinContent(b),hist->GetBinError(b));
+  }
+ }
+  
+ hist = temp;
+   
+ return;
+  
+} // end of Map()
+
+// =====================================================================================
+
 TGraphErrors* GetGraphErrors(Int_t bin, Int_t nFiles, TH1D** qc)
 {
  TGraphErrors *ge = new TGraphErrors(nFiles);
@@ -357,7 +439,14 @@ TH1D* StyleHist(TString yAxisTitle, Int_t co)
  // y-axis:
  styleHist->GetYaxis()->SetRangeUser(yMin[co],yMax[co]);
    
- styleHist->GetXaxis()->SetTitle("M");
+ if(plotCumulantsVsReferenceMultiplicity)
+ {
+  styleHist->GetXaxis()->SetTitle("#LTreference multiplicity#GT");     
+ } else
+   {
+    styleHist->GetXaxis()->SetTitle("# of RPs");         
+   }
  styleHist->GetYaxis()->SetTitle(yAxisTitle.Data());
  
  return styleHist;