]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added fHarmonic setter and getter + bug fix for RP's and POI's last in in pt and...
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Oct 2009 09:36:37 +0000 (09:36 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Oct 2009 09:36:37 +0000 (09:36 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx
PWG2/FLOW/macros/runFlowAnalysisOnTheFly.C

index 75d3bc7e34432a63866752c41d0f21dcbb754981..2586732e87876b0aab5941b7dc6336cbb3e6d7e6 100644 (file)
@@ -59,7 +59,8 @@ ClassImp(AliFlowAnalysisWithMCEventPlane)
    fHistProDiffFlowPtEtaPOI(NULL),
    fHistProDiffFlowPtPOI(NULL),
    fHistProDiffFlowEtaPOI(NULL),
    fHistProDiffFlowPtEtaPOI(NULL),
    fHistProDiffFlowPtPOI(NULL),
    fHistProDiffFlowEtaPOI(NULL),
-   fHistSpreadOfFlow(NULL)
+   fHistSpreadOfFlow(NULL),
+   fHarmonic(2)\r
 {
 
   // Constructor.
 {
 
   // Constructor.
@@ -124,6 +125,9 @@ void AliFlowAnalysisWithMCEventPlane::Init() {
   fCommonHistsRes = new AliFlowCommonHistResults("AliFlowCommonHistResultsMCEP");
   fHistList->Add(fCommonHistsRes);
   
   fCommonHistsRes = new AliFlowCommonHistResults("AliFlowCommonHistResultsMCEP");
   fHistList->Add(fCommonHistsRes);
   
+  // store harmonic in common control histogram: 
+  (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic);
+  
   fHistRP = new TH1F("Flow_RP_MCEP","Flow_RP_MCEP",100,0.,3.14);
   fHistRP->SetXTitle("Reaction Plane Angle");
   fHistRP->SetYTitle("Counts");
   fHistRP = new TH1F("Flow_RP_MCEP","Flow_RP_MCEP",100,0.,3.14);
   fHistRP->SetXTitle("Reaction Plane Angle");
   fHistRP->SetYTitle("Counts");
@@ -171,7 +175,7 @@ void AliFlowAnalysisWithMCEventPlane::Init() {
   fHistList->Add(fHistSpreadOfFlow);           
  
   fEventNumber = 0;  //set number of events to zero
   fHistList->Add(fHistSpreadOfFlow);           
  
   fEventNumber = 0;  //set number of events to zero
-      
+        
 } 
  
 //-----------------------------------------------------------------------
 } 
  
 //-----------------------------------------------------------------------
@@ -187,7 +191,7 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
     fCommonHists->FillControlHistograms(anEvent);
 
     //get the Q vector from the FlowEvent
     fCommonHists->FillControlHistograms(anEvent);
 
     //get the Q vector from the FlowEvent
-    AliFlowVector vQ = anEvent->GetQ(); 
+    AliFlowVector vQ = anEvent->GetQ(fHarmonic); 
     //cout<<"vQ.Mod() = " << vQ.Mod() << endl;
     //for chi calculation:
     *fQsum += vQ;
     //cout<<"vQ.Mod() = " << vQ.Mod() << endl;
     //for chi calculation:
     *fQsum += vQ;
@@ -198,7 +202,7 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
     fHistRP->Fill(aRP);   
     
     Double_t dPhi = 0.;
     fHistRP->Fill(aRP);   
     
     Double_t dPhi = 0.;
-    Double_t dv2  = 0.;
+    Double_t dv  = 0.;
     Double_t dPt  = 0.;
     Double_t dEta = 0.;
     //Double_t dPi = TMath::Pi();  
     Double_t dPt  = 0.;
     Double_t dEta = 0.;
     //Double_t dPi = TMath::Pi();  
@@ -215,33 +219,33 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
        if (pTrack){
          if (pTrack->InRPSelection()){
             dPhi = pTrack->Phi();
        if (pTrack){
          if (pTrack->InRPSelection()){
             dPhi = pTrack->Phi();
-            dv2  = TMath::Cos(2*(dPhi-aRP));
+            dv  = TMath::Cos(fHarmonic*(dPhi-aRP));
                 dPt  = pTrack->Pt();
                 dEta = pTrack->Eta();
             //no-name int. flow (to be improved = name needed!):
                 dPt  = pTrack->Pt();
                 dEta = pTrack->Eta();
             //no-name int. flow (to be improved = name needed!):
-            fHistProIntFlow->Fill(0.,dv2);
+            fHistProIntFlow->Fill(0.,dv);
             //no-name int. flow e-b-e (to be improved = name needed!):
             //no-name int. flow e-b-e (to be improved = name needed!):
-            flowEBE->Fill(0.,dv2);
+            flowEBE->Fill(0.,dv);
             //differential flow (Pt, Eta, RP):
             //differential flow (Pt, Eta, RP):
-            fHistProDiffFlowPtEtaRP->Fill(dPt,dEta,dv2,1.);
+            fHistProDiffFlowPtEtaRP->Fill(dPt,dEta,dv,1.);
             //differential flow (Pt, RP):
             //differential flow (Pt, RP):
-            fHistProDiffFlowPtRP->Fill(dPt,dv2,1.);
+            fHistProDiffFlowPtRP->Fill(dPt,dv,1.);
             //differential flow (Eta, RP):
             //differential flow (Eta, RP):
-            fHistProDiffFlowEtaRP->Fill(dEta,dv2,1.);
+            fHistProDiffFlowEtaRP->Fill(dEta,dv,1.);
           }
          if (pTrack->InPOISelection()) {
            dPhi = pTrack->Phi();
            //if (dPhi<0.) dPhi+=2*TMath::Pi();
            //calculate flow v2:
           }
          if (pTrack->InPOISelection()) {
            dPhi = pTrack->Phi();
            //if (dPhi<0.) dPhi+=2*TMath::Pi();
            //calculate flow v2:
-           dv2  = TMath::Cos(2*(dPhi-aRP));
+           dv  = TMath::Cos(fHarmonic*(dPhi-aRP));
            dPt  = pTrack->Pt();
            dEta = pTrack->Eta();
            //differential flow (Pt, Eta, POI):
            dPt  = pTrack->Pt();
            dEta = pTrack->Eta();
            //differential flow (Pt, Eta, POI):
-            fHistProDiffFlowPtEtaPOI->Fill(dPt,dEta,dv2,1.);
+            fHistProDiffFlowPtEtaPOI->Fill(dPt,dEta,dv,1.);
            //differential flow (Pt, POI):
            //differential flow (Pt, POI):
-            fHistProDiffFlowPtPOI->Fill(dPt,dv2,1.);
+            fHistProDiffFlowPtPOI->Fill(dPt,dv,1.);
             //differential flow (Eta, POI):
             //differential flow (Eta, POI):
-            fHistProDiffFlowEtaPOI->Fill(dEta,dv2,1.); 
+            fHistProDiffFlowEtaPOI->Fill(dEta,dv,1.); 
          }           
        }//track selected
       }//loop over tracks
          }           
        }//track selected
       }//loop over tracks
@@ -315,13 +319,19 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
    
   Int_t iNbinsPt  = AliFlowCommonConstants::GetNbinsPt();  
   Int_t iNbinsEta = AliFlowCommonConstants::GetNbinsEta(); 
    
   Int_t iNbinsPt  = AliFlowCommonConstants::GetNbinsPt();  
   Int_t iNbinsEta = AliFlowCommonConstants::GetNbinsEta(); 
+  
+  // access harmonic:
+  if(fCommonHists && fCommonHists->GetHarmonic())\r
+  {
+   fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else?)
+  } 
          
   // no-name int. flow (to be improved):
   Double_t dV = fHistProIntFlow->GetBinContent(1);  
   Double_t dErrV = fHistProIntFlow->GetBinError(1); // to be improved (treatment of errors for non-Gaussian distribution needed!)  
   // fill no-name int. flow (to be improved):
   fCommonHistsRes->FillIntegratedFlow(dV,dErrV);
          
   // no-name int. flow (to be improved):
   Double_t dV = fHistProIntFlow->GetBinContent(1);  
   Double_t dErrV = fHistProIntFlow->GetBinError(1); // to be improved (treatment of errors for non-Gaussian distribution needed!)  
   // fill no-name int. flow (to be improved):
   fCommonHistsRes->FillIntegratedFlow(dV,dErrV);
-  cout<<"dV{MC} is       "<<dV<<" +- "<<dErrV<<endl;
+  cout<<"dV"<<fHarmonic<<"{MC} is       "<<dV<<" +- "<<dErrV<<endl;
   
   //RP:
   TH1F* fHistPtRP = fCommonHists->GetHistPtRP(); 
   
   //RP:
   TH1F* fHistPtRP = fCommonHists->GetHistPtRP(); 
@@ -332,7 +342,7 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
   //differential flow (RP, Pt): 
   Double_t dvPtRP = 0.;           
   Double_t dErrvPtRP = 0.;
   //differential flow (RP, Pt): 
   Double_t dvPtRP = 0.;           
   Double_t dErrvPtRP = 0.;
-  for(Int_t b=1;b<iNbinsPt;b++)
+  for(Int_t b=1;b<=iNbinsPt;b++)
   {
    dvPtRP    = fHistProDiffFlowPtRP->GetBinContent(b);
    dErrvPtRP = fHistProDiffFlowPtRP->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
   {
    dvPtRP    = fHistProDiffFlowPtRP->GetBinContent(b);
    dErrvPtRP = fHistProDiffFlowPtRP->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
@@ -353,12 +363,12 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
   }
   // fill integrated flow (RP):
   fCommonHistsRes->FillIntegratedFlowRP(dVRP,dErrVRP);
   }
   // fill integrated flow (RP):
   fCommonHistsRes->FillIntegratedFlowRP(dVRP,dErrVRP);
-  cout<<"dV{MC} (RP) is  "<<dVRP<<" +- "<<dErrVRP<<endl;
+  cout<<"dV"<<fHarmonic<<"{MC} (RP) is  "<<dVRP<<" +- "<<dErrVRP<<endl;
   
   //differential flow (RP, Eta): 
   Double_t dvEtaRP = 0.;           
   Double_t dErrvEtaRP = 0.;
   
   //differential flow (RP, Eta): 
   Double_t dvEtaRP = 0.;           
   Double_t dErrvEtaRP = 0.;
-  for(Int_t b=1;b<iNbinsEta;b++)
+  for(Int_t b=1;b<=iNbinsEta;b++)
   {
    dvEtaRP    = fHistProDiffFlowEtaRP->GetBinContent(b);
    dErrvEtaRP = fHistProDiffFlowEtaRP->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
   {
    dvEtaRP    = fHistProDiffFlowEtaRP->GetBinContent(b);
    dErrvEtaRP = fHistProDiffFlowEtaRP->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
@@ -371,21 +381,21 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
   Double_t dVPOI = 0.;
   Double_t dErrVPOI = 0.;
   Double_t dSumPOI = 0.;
   Double_t dVPOI = 0.;
   Double_t dErrVPOI = 0.;
   Double_t dSumPOI = 0.;
-  Double_t dv2proPtPOI = 0.;
+  Double_t dvproPtPOI = 0.;
   Double_t dErrdifcombPtPOI = 0.; 
   Double_t dErrdifcombPtPOI = 0.; 
-  Double_t dv2proEtaPOI = 0.;
+  Double_t dvproEtaPOI = 0.;
   Double_t dErrdifcombEtaPOI = 0.;   
   //Pt:
   if(fHistProDiffFlowPtPOI) {
   Double_t dErrdifcombEtaPOI = 0.;   
   //Pt:
   if(fHistProDiffFlowPtPOI) {
-    for(Int_t b=1;b<iNbinsPt;b++){
-      dv2proPtPOI = fHistProDiffFlowPtPOI->GetBinContent(b);
+    for(Int_t b=1;b<=iNbinsPt;b++){
+      dvproPtPOI = fHistProDiffFlowPtPOI->GetBinContent(b);
       dErrdifcombPtPOI = fHistProDiffFlowPtPOI->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
       //fill TH1D
       dErrdifcombPtPOI = fHistProDiffFlowPtPOI->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
       //fill TH1D
-      fCommonHistsRes->FillDifferentialFlowPtPOI(b, dv2proPtPOI, dErrdifcombPtPOI); 
+      fCommonHistsRes->FillDifferentialFlowPtPOI(b, dvproPtPOI, dErrdifcombPtPOI); 
       if (fHistPtPOI){
        //integrated flow (POI)
        dYieldPtPOI = fHistPtPOI->GetBinContent(b);
       if (fHistPtPOI){
        //integrated flow (POI)
        dYieldPtPOI = fHistPtPOI->GetBinContent(b);
-       dVPOI += dv2proPtPOI*dYieldPtPOI;
+       dVPOI += dvproPtPOI*dYieldPtPOI;
        dSumPOI += dYieldPtPOI;
        //error on integrated flow
        dErrVPOI += dYieldPtPOI*dYieldPtPOI*dErrdifcombPtPOI*dErrdifcombPtPOI;
        dSumPOI += dYieldPtPOI;
        //error on integrated flow
        dErrVPOI += dYieldPtPOI*dYieldPtPOI*dErrdifcombPtPOI*dErrdifcombPtPOI;
@@ -397,19 +407,19 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
     dErrVPOI /= (dSumPOI*dSumPOI);
     dErrVPOI = TMath::Sqrt(dErrVPOI); 
   }
     dErrVPOI /= (dSumPOI*dSumPOI);
     dErrVPOI = TMath::Sqrt(dErrVPOI); 
   }
-  cout<<"dV{MC} (POI) is "<<dVPOI<<" +- "<<dErrVPOI<<endl;
+  cout<<"dV"<<fHarmonic<<"{MC} (POI) is "<<dVPOI<<" +- "<<dErrVPOI<<endl;
 
   fCommonHistsRes->FillIntegratedFlowPOI(dVPOI,dErrVPOI);
   
   //Eta:
   if(fHistProDiffFlowEtaPOI)
   {
 
   fCommonHistsRes->FillIntegratedFlowPOI(dVPOI,dErrVPOI);
   
   //Eta:
   if(fHistProDiffFlowEtaPOI)
   {
-   for(Int_t b=1;b<iNbinsEta;b++)
+   for(Int_t b=1;b<=iNbinsEta;b++)
    {
    {
-    dv2proEtaPOI = fHistProDiffFlowEtaPOI->GetBinContent(b);
+    dvproEtaPOI = fHistProDiffFlowEtaPOI->GetBinContent(b);
     dErrdifcombEtaPOI = fHistProDiffFlowEtaPOI->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
     //fill common hist results:
     dErrdifcombEtaPOI = fHistProDiffFlowEtaPOI->GetBinError(b);//to be improved (treatment of errors for non-Gaussian distribution needed!)
     //fill common hist results:
-    fCommonHistsRes->FillDifferentialFlowEtaPOI(b, dv2proEtaPOI, dErrdifcombEtaPOI); 
+    fCommonHistsRes->FillDifferentialFlowEtaPOI(b, dvproEtaPOI, dErrdifcombEtaPOI); 
    }
   }   
   
    }
   }   
   
index d29d0276952149e8ed0853377137284a348a7fa7..e8677cd3936ab47c0c0c35d01ad1aaddba12afc9 100644 (file)
@@ -97,6 +97,10 @@ class AliFlowAnalysisWithMCEventPlane {
    void      SetHistSpreadOfFlow(TH1D* aHistSpreadOfFlow) 
      {this->fHistSpreadOfFlow = aHistSpreadOfFlow; }    
    
    void      SetHistSpreadOfFlow(TH1D* aHistSpreadOfFlow) 
      {this->fHistSpreadOfFlow = aHistSpreadOfFlow; }    
    
+   // harmonic:
+   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
+   Int_t GetHarmonic() const {return this->fHarmonic;};
  private:
  
    AliFlowAnalysisWithMCEventPlane(const AliFlowAnalysisWithMCEventPlane& aAnalysis);             //copy constructor
  private:
  
    AliFlowAnalysisWithMCEventPlane(const AliFlowAnalysisWithMCEventPlane& aAnalysis);             //copy constructor
@@ -125,7 +129,8 @@ class AliFlowAnalysisWithMCEventPlane {
    TProfile*    fHistProDiffFlowPtPOI;    // profile used to calculate the differential flow (Pt) of POI particles 
    TProfile*    fHistProDiffFlowEtaPOI;   // profile used to calculate the differential flow (Eta) of POI particles
    TH1D*        fHistSpreadOfFlow;        // histogram filled with NONAME integrated flow calculated e-b-e    
    TProfile*    fHistProDiffFlowPtPOI;    // profile used to calculate the differential flow (Pt) of POI particles 
    TProfile*    fHistProDiffFlowEtaPOI;   // profile used to calculate the differential flow (Eta) of POI particles
    TH1D*        fHistSpreadOfFlow;        // histogram filled with NONAME integrated flow calculated e-b-e    
-   
+   Int_t        fHarmonic;                // harmonic 
+    
    ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // Analyse particle distribution versus MC reaction plane
      };
 
    ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // Analyse particle distribution versus MC reaction plane
      };
 
index 2299641d9e042898040d0da661aaa22318a2fbfb..00e09066e3473dbbb605c4fb0a3f5097dcc14294 100644 (file)
@@ -736,7 +736,12 @@ void AliFlowAnalysisWithQCumulants::Finish()
  // ******************************\r
  \r
  this->AccessConstants();          \r
  // ******************************\r
  \r
  this->AccessConstants();          \r
\r
+ if(fCommonHists && fCommonHists->GetHarmonic())\r
+ {
+  fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else)
+ } 
+\r
  // **************************\r
  // **** ACCESS THE FLAGS ****\r
  // **************************    \r
  // **************************\r
  // **** ACCESS THE FLAGS ****\r
  // **************************    \r
@@ -3144,42 +3149,51 @@ void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName)
 \r
 void AliFlowAnalysisWithQCumulants::BookCommonHistograms()\r
 {\r
 \r
 void AliFlowAnalysisWithQCumulants::BookCommonHistograms()\r
 {\r
- // book common control histograms and common histograms for final results\r
\r
- // common control histogram (ALL events)\r
- fCommonHists = new AliFlowCommonHist("AliFlowCommonHistQC");\r
+ // Book common control histograms and common histograms for final results.\r
+ // common control histogram (ALL events)
+ TString commonHistsName = "AliFlowCommonHistQC";\r
+ commonHistsName += fAnalysisLabel->Data();
+ fCommonHists = new AliFlowCommonHist(commonHistsName.Data());\r
  fHistList->Add(fCommonHists);  \r
  fHistList->Add(fCommonHists);  \r
\r
  // common control histogram (for events with 2 and more particles)\r
  // common control histogram (for events with 2 and more particles)\r
- fCommonHists2nd = new AliFlowCommonHist("AliFlowCommonHist2ndOrderQC");\r
+ TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC";\r
+ commonHists2ndOrderName += fAnalysisLabel->Data();
+ fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data());\r
  fHistList->Add(fCommonHists2nd);  \r
  fHistList->Add(fCommonHists2nd);  \r
\r
  // common control histogram (for events with 4 and more particles)\r
  // common control histogram (for events with 4 and more particles)\r
- fCommonHists4th = new AliFlowCommonHist("AliFlowCommonHist4thOrderQC");\r
+ TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC";\r
+ commonHists4thOrderName += fAnalysisLabel->Data();
+ fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data());\r
  fHistList->Add(fCommonHists4th);  \r
  fHistList->Add(fCommonHists4th);  \r
\r
  // common control histogram (for events with 6 and more particles)\r
  // common control histogram (for events with 6 and more particles)\r
- fCommonHists6th = new AliFlowCommonHist("AliFlowCommonHist6thOrderQC");\r
+ TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC";\r
+ commonHists6thOrderName += fAnalysisLabel->Data();
+ fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data());\r
  fHistList->Add(fCommonHists6th);  \r
  fHistList->Add(fCommonHists6th);  \r
\r
  // common control histogram (for events with 8 and more particles)\r
  // common control histogram (for events with 8 and more particles)\r
- fCommonHists8th = new AliFlowCommonHist("AliFlowCommonHist8thOrderQC");\r
- fHistList->Add(fCommonHists8th);  \r
-  \r
+ TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC";\r
+ commonHists8thOrderName += fAnalysisLabel->Data();
+ fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data());\r
+ fHistList->Add(fCommonHists8th);    \r
  // common histograms for final results (calculated for events with 2 and more particles)\r
  // common histograms for final results (calculated for events with 2 and more particles)\r
- fCommonHistsResults2nd = new AliFlowCommonHistResults("AliFlowCommonHistResults2ndOrderQC");\r
- fHistList->Add(fCommonHistsResults2nd); \r
\r
+ TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC";\r
+ commonHistResults2ndOrderName += fAnalysisLabel->Data();
+ fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data());\r
+ fHistList->Add(fCommonHistsResults2nd);  \r
  // common histograms for final results (calculated for events with 4 and more particles)\r
  // common histograms for final results (calculated for events with 4 and more particles)\r
- fCommonHistsResults4th = new AliFlowCommonHistResults("AliFlowCommonHistResults4thOrderQC");\r
- fHistList->Add(fCommonHistsResults4th);\r
\r
+ TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC";\r
+ commonHistResults4thOrderName += fAnalysisLabel->Data();
+ fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data());\r
+ fHistList->Add(fCommonHistsResults4th); \r
  // common histograms for final results (calculated for events with 6 and more particles)\r
  // common histograms for final results (calculated for events with 6 and more particles)\r
- fCommonHistsResults6th = new AliFlowCommonHistResults("AliFlowCommonHistResults6thOrderQC");\r
- fHistList->Add(fCommonHistsResults6th); \r
\r
+ TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC";\r
+ commonHistResults6thOrderName += fAnalysisLabel->Data();
+ fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data());\r
+ fHistList->Add(fCommonHistsResults6th);  
  // common histograms for final results (calculated for events with 8 and more particles)\r
  // common histograms for final results (calculated for events with 8 and more particles)\r
- fCommonHistsResults8th = new AliFlowCommonHistResults("AliFlowCommonHistResults8thOrderQC");\r
+ TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC";\r
+ commonHistResults8thOrderName += fAnalysisLabel->Data();
+ fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data());\r
  fHistList->Add(fCommonHistsResults8th); \r
  \r
 } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms()\r
  fHistList->Add(fCommonHistsResults8th); \r
  \r
 } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms()\r
@@ -8488,31 +8502,49 @@ void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags()
 \r
 void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms(TList *outputListHistos) \r
 {\r
 \r
 void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms(TList *outputListHistos) \r
 {\r
- // a) Access all pointers to common control and common result histograms and profiles.\r
+ // Access all pointers to common control and common result histograms and profiles.\r
  \r
  if(outputListHistos)  \r
  {\r
  \r
  if(outputListHistos)  \r
  {\r
-  AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject("AliFlowCommonHistQC"));\r
-  if(commonHist) this->SetCommonHists(commonHist); \r
-  AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject("AliFlowCommonHist2ndOrderQC"));\r
-  if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd); \r
-  AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject("AliFlowCommonHist4thOrderQC"));\r
-  if(commonHist4th) this->SetCommonHists4th(commonHist4th);\r
-  AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject("AliFlowCommonHist6thOrderQC"));\r
-  if(commonHist6th) this->SetCommonHists6th(commonHist6th);\r
-  AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject("AliFlowCommonHist8thOrderQC"));\r
-  if(commonHist8th) this->SetCommonHists8th(commonHist8th);\r
+  TString commonHistsName = "AliFlowCommonHistQC";\r
+  commonHistsName += fAnalysisLabel->Data();\r
+  AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHistsName.Data()));\r
+  if(commonHist) this->SetCommonHists(commonHist); 
+  TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC";\r
+  commonHists2ndOrderName += fAnalysisLabel->Data();
+  AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists2ndOrderName.Data()));\r
+  if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd);   
+  TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC";\r
+  commonHists4thOrderName += fAnalysisLabel->Data();\r
+  AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists4thOrderName.Data()));\r
+  if(commonHist4th) this->SetCommonHists4th(commonHist4th);  
+  TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC";\r
+  commonHists6thOrderName += fAnalysisLabel->Data();
+  AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists6thOrderName.Data()));\r
+  if(commonHist6th) this->SetCommonHists6th(commonHist6th);  \r
+  TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC";\r
+  commonHists8thOrderName += fAnalysisLabel->Data();
+  AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists8thOrderName.Data()));\r
+  if(commonHist8th) this->SetCommonHists8th(commonHist8th);  
+  TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; \r
+  commonHistResults2ndOrderName += fAnalysisLabel->Data(); \r
   AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>\r
   AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>\r
-                                               (outputListHistos->FindObject("AliFlowCommonHistResults2ndOrderQC"));\r
-  if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd); \r
+                                               (outputListHistos->FindObject(commonHistResults2ndOrderName.Data()));\r
+  if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd);   
+  TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC";\r
+  commonHistResults4thOrderName += fAnalysisLabel->Data();
   AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*>\r
   AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*>\r
-                                               (outputListHistos->FindObject("AliFlowCommonHistResults4thOrderQC"));\r
-  if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th);\r
+                                               (outputListHistos->FindObject(commonHistResults4thOrderName.Data()));\r
+  if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th);  
+  TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC";\r
+  commonHistResults6thOrderName += fAnalysisLabel->Data();\r
   AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*>\r
   AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*>\r
-                                               (outputListHistos->FindObject("AliFlowCommonHistResults6thOrderQC"));\r
-  if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th);\r
+                                               (outputListHistos->FindObject(commonHistResults6thOrderName.Data()));\r
+  if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th);  
+  TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC";\r
+  commonHistResults8thOrderName += fAnalysisLabel->Data();\r
   AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*>\r
   AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*>\r
-                                               (outputListHistos->FindObject("AliFlowCommonHistResults8thOrderQC"));  \r
+                                               (outputListHistos->FindObject(commonHistResults8thOrderName.Data()));  \r
   if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th);\r
  } else\r
    {\r
   if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th);\r
  } else\r
    {\r
index c4dabb75fafa3f5b9746ab2dc95dfcace6d0714e..aa96e75e40b994a32a75e509a677499a5cce7a65 100644 (file)
@@ -210,6 +210,7 @@ int runFlowAnalysisOnTheFly(Int_t mode=mLocal, Int_t nEvts=440)
  // MCEP = monte carlo event plane
  if (MCEP) {
    AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane();
  // MCEP = monte carlo event plane
  if (MCEP) {
    AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane();
+   // mcep->SetHarmonic(2); // default is v2
    mcep->Init();
  }
 
    mcep->Init();
  }
 
@@ -220,7 +221,9 @@ int runFlowAnalysisOnTheFly(Int_t mode=mLocal, Int_t nEvts=440)
    if(usePhiWeights) qc->SetUsePhiWeights(usePhiWeights);
    if(usePtWeights) qc->SetUsePtWeights(usePtWeights);
    if(useEtaWeights) qc->SetUseEtaWeights(useEtaWeights);
    if(usePhiWeights) qc->SetUsePhiWeights(usePhiWeights);
    if(usePtWeights) qc->SetUsePtWeights(usePtWeights);
    if(useEtaWeights) qc->SetUseEtaWeights(useEtaWeights);
-   qc->SetCalculate2DFlow(kTRUE);   
+   // qc->SetHarmonic(2); // default is v2
+   // qc->SetApplyCorrectionForNUA(kTRUE); // default
+   // qc->SetCalculate2DFlow(kFALSE); // default  
    qc->SetEvaluateNestedLoopsForIntFlow(kFALSE);
    qc->SetEvaluateNestedLoopsForDiffFlow(kFALSE);
    qc->Init();  
    qc->SetEvaluateNestedLoopsForIntFlow(kFALSE);
    qc->SetEvaluateNestedLoopsForDiffFlow(kFALSE);
    qc->Init();