]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
extension for mixed harmonics and some ^M
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Mar 2010 15:11:33 +0000 (15:11 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Mar 2010 15:11:33 +0000 (15:11 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithNestedLoops.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx
PWG2/FLOW/macros/redoFinish.C
PWG2/FLOW/macros/runFlowAnalysis.C
PWG2/FLOW/macros/runFlowAnalysisOnTheFly.C

index 3326d3abaec0f0bed4824f653c4e72779eb9f650..b4b6d9f70bddc7d255def7e33cd31b5a50a7cf2a 100644 (file)
@@ -86,6 +86,7 @@ fImQnk(NULL),
 fSpk(NULL),
 f3pCorrelatorEBE(NULL),
 fNonIsotropicTermsEBE(NULL),
+fProfileList(NULL),
 f3pCorrelatorPro(NULL),
 fNonIsotropicTermsPro(NULL),
 f3pCorrelatorVsMPro(NULL),
@@ -99,7 +100,7 @@ fDetectorBiasVsMHist(NULL),
 fNonIsotropicTermsVsMHist(NULL)
 {
  // Constructor. 
\r // Base list to hold all output objects:
+  // Base list to hold all output objects:
  fHistList = new TList();
  fHistListName = new TString("cobjMH");
  fHistList->SetName(fHistListName->Data());
@@ -108,6 +109,9 @@ fNonIsotropicTermsVsMHist(NULL)
  // List to hold histograms with phi, pt and eta weights:      
  fWeightsList = new TList();
  
+ // List to hold all all-event profiles:      
+ fProfileList = new TList();
  // List to hold objects with final results:      
  fResultsList = new TList();
  
@@ -303,7 +307,7 @@ void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHis
 {
  // Get pointers to all objects saved in the output file.
  
- // a) Get pointers for common control histograms.\r 
+ // a) Get pointers for common control histograms. 
  if(outputListHistos)
  {     
   this->SetHistList(outputListHistos);
@@ -314,7 +318,9 @@ void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHis
    cout<<endl;
    exit(0);
   }
+  this->GetPointersForBaseHistograms();
   this->GetPointersForCommonHistograms();
+  this->GetPointersForAllEventProfiles();
   this->GetPointersForResultsHistograms();
  } else 
    {
@@ -328,6 +334,27 @@ void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHis
 
 //================================================================================================================
 
+void AliFlowAnalysisWithMixedHarmonics::GetPointersForBaseHistograms() 
+{
+ // Get pointers to base histograms.
+ TString analysisSettingsName = "fAnalysisSettings";
+ TProfile *analysisSettings = dynamic_cast<TProfile*>(fHistList->FindObject(analysisSettingsName.Data()));
+ if(analysisSettings) 
+ {
+  this->SetAnalysisSettings(analysisSettings); 
+ } else
+   {
+    cout<<endl;
+    cout<<" WARNING (MH): analysisSettings is NULL in AFAWMH::GPFBH() !!!!"<<endl;
+    cout<<endl;
+    exit(0);  
+   }
+} // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForBaseHistograms()
+
+//================================================================================================================
+
 void AliFlowAnalysisWithMixedHarmonics::GetPointersForCommonHistograms() 
 {
  // Get pointers to common control histograms.
@@ -349,6 +376,46 @@ void AliFlowAnalysisWithMixedHarmonics::GetPointersForCommonHistograms()
 
 //================================================================================================================
 
+void AliFlowAnalysisWithMixedHarmonics::GetPointersForAllEventProfiles() 
+{
+ // Get pointers to histograms holding final results.
+ TList *profileList = NULL;
+ profileList = dynamic_cast<TList*>(fHistList->FindObject("Profiles"));
+ if(!profileList) 
+ {
+  cout<<"WARNING: profileList is NULL in AFAWMH::GPFAEP() !!!!"<<endl;
+  exit(0); 
+ }  
+ TString s3pCorrelatorProName = "f3pCorrelatorPro";
+ TProfile *h3pCorrelatorPro = dynamic_cast<TProfile*>(profileList->FindObject(s3pCorrelatorProName.Data()));
+ if(h3pCorrelatorPro)
+ {
+  this->Set3pCorrelatorPro(h3pCorrelatorPro);  
+ }
+ TString s3pCorrelatorVsMProName = "f3pCorrelatorVsMPro";
+ TProfile *h3pCorrelatorVsMPro = dynamic_cast<TProfile*>(profileList->FindObject(s3pCorrelatorVsMProName.Data()));
+ if(h3pCorrelatorVsMPro)
+ {
+  this->Set3pCorrelatorVsMPro(h3pCorrelatorVsMPro);  
+ }
+ TString nonIsotropicTermsProName = "fNonIsotropicTermsPro";
+ TProfile *nonIsotropicTermsPro = dynamic_cast<TProfile*>(profileList->FindObject(nonIsotropicTermsProName.Data()));
+ if(nonIsotropicTermsPro)
+ {
+  this->SetNonIsotropicTermsPro(nonIsotropicTermsPro);  
+ }
+ TString nonIsotropicTermsVsMProName = "fNonIsotropicTermsVsMPro";
+ TProfile2D *nonIsotropicTermsVsMPro = dynamic_cast<TProfile2D*>(profileList->FindObject(nonIsotropicTermsVsMProName.Data()));
+ if(nonIsotropicTermsVsMPro)
+ {
+  this->SetNonIsotropicTermsVsMPro(nonIsotropicTermsVsMPro);  
+ }
+} // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForAllEventProfiles()
+
+//================================================================================================================
+
 void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms() 
 {
  // Get pointers to histograms holding final results.
@@ -367,19 +434,37 @@ void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms()
  {
   this->Set3pCorrelatorHist(h3pCorrelatorHist);  
  }
+ TString s3pCorrelatorVsMHistName = "f3pCorrelatorVsMHist";
+ TH1D *h3pCorrelatorVsMHist = dynamic_cast<TH1D*>(resultsList->FindObject(s3pCorrelatorVsMHistName.Data()));
+ if(h3pCorrelatorVsMHist)
+ {
+  this->Set3pCorrelatorVsMHist(h3pCorrelatorVsMHist);  
+ }
  TString detectorBiasHistName = "fDetectorBiasHist";
  TH1D *detectorBiasHist = dynamic_cast<TH1D*>(resultsList->FindObject(detectorBiasHistName.Data()));
  if(detectorBiasHist)
  {
   this->SetDetectorBiasHist(detectorBiasHist);  
  }
+ TString detectorBiasVsMHistName = "fDetectorBiasVsMHist";
+ TH1D *detectorBiasVsMHist = dynamic_cast<TH1D*>(resultsList->FindObject(detectorBiasVsMHistName.Data()));
+ if(detectorBiasVsMHist)
+ {
+  this->SetDetectorBiasVsMHist(detectorBiasVsMHist);  
+ }
  TString nonIsotropicTermsHistName = "fNonIsotropicTermsHist";
  TH1D *nonIsotropicTermsHist = dynamic_cast<TH1D*>(resultsList->FindObject(nonIsotropicTermsHistName.Data()));
  if(nonIsotropicTermsHist)
  {
   this->SetNonIsotropicTermsHist(nonIsotropicTermsHist);  
+ }  
+ TString nonIsotropicTermsVsMHistName = "fNonIsotropicTermsVsMHist";
+ TH2D *nonIsotropicTermsVsMHist = dynamic_cast<TH2D*>(resultsList->FindObject(nonIsotropicTermsVsMHistName.Data()));
+ if(nonIsotropicTermsVsMHist)
+ {
+  this->SetNonIsotropicTermsVsMHist(nonIsotropicTermsVsMHist);  
  }
-  
+
 } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms()
 
 //================================================================================================================
@@ -413,6 +498,10 @@ void AliFlowAnalysisWithMixedHarmonics::BookAndNestAllLists()
  fWeightsList->SetName("Weights");
  fWeightsList->SetOwner(kTRUE);   
  fHistList->Add(fWeightsList); 
+ // Profiles:
+ fProfileList->SetName("Profiles");
+ fProfileList->SetOwner(kTRUE);   
+ fHistList->Add(fProfileList); 
  // Results:
  fResultsList->SetName("Results");
  fResultsList->SetOwner(kTRUE);   
@@ -485,7 +574,7 @@ void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities()
  // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with wrong error):
  TString s3pCorrelatorProName = "f3pCorrelatorPro";
  f3pCorrelatorPro = new TProfile(s3pCorrelatorProName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> for all events (errors are wrong here!)",1,0,1,"s");
- fHistList->Add(f3pCorrelatorPro);
+ fProfileList->Add(f3pCorrelatorPro);
  // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with correct error):
  TString s3pCorrelatorHistName = "f3pCorrelatorHist";
  f3pCorrelatorHist = new TH1D(s3pCorrelatorHistName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> for all events",1,0,1);
@@ -503,7 +592,7 @@ void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities()
  fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(8,"sin(n(2#phi_{1}-#phi_{2}))");
  fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(9,"cos(n(#phi_{1}-#phi_{2}-#phi_{3}))");
  fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(10,"sin(n(#phi_{1}-#phi_{2}-#phi_{3})");  
- fHistList->Add(fNonIsotropicTermsPro);
+ fProfileList->Add(fNonIsotropicTermsPro);
  // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for all events (with correct errors):
  TString nonIsotropicTermsHistName = "fNonIsotropicTermsHist";
  fNonIsotropicTermsHist = new TH1D(nonIsotropicTermsHistName.Data(),"Non-isotropic terms for all events",10,0,10);
@@ -533,7 +622,7 @@ void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities()
   f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
  }
  f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
- fHistList->Add(f3pCorrelatorVsMPro);
+ fProfileList->Add(f3pCorrelatorVsMPro);
  // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with correct error):
  TString s3pCorrelatorVsMHistName = "f3pCorrelatorVsMHist";
  f3pCorrelatorVsMHist = new TH1D(s3pCorrelatorVsMHistName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> vs M for all events",fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1);
@@ -561,7 +650,7 @@ void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities()
   fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
  }
  fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
- fHistList->Add(fNonIsotropicTermsVsMPro);
+ fProfileList->Add(fNonIsotropicTermsVsMPro);
  // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for all events (with correct errors):
  TString nonIsotropicTermsVsMHistName = "fNonIsotropicTermsVsMHist";
  fNonIsotropicTermsVsMHist = new TH2D(nonIsotropicTermsVsMHistName.Data(),"Non-isotropic terms for all events vs M ",10,0,10,fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1);
@@ -732,7 +821,85 @@ void AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInMake()
 void AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInFinish()
 {
  // Check pointers used in method Finish().
-                                                                                                                                                                                                                                                                                                                                   
+ if(!fAnalysisSettings)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fAnalysisSettings is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }
+ if(!f3pCorrelatorPro)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !f3pCorrelatorPro is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }
+ if(!fNonIsotropicTermsPro)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fNonIsotropicTermsPro is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ } 
+ if(!f3pCorrelatorVsMPro)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !f3pCorrelatorVsMPro is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }
+ if(!fNonIsotropicTermsVsMPro)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fNonIsotropicTermsVsMPro is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }
+ if(!f3pCorrelatorHist)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !f3pCorrelatorHist is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }                                                                                                                                                                                                                                                                                                                                   
+ if(!fNonIsotropicTermsHist)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fNonIsotropicTermsHist is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }
+ if(!fDetectorBiasHist)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fDetectorBiasHist is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }   
+ if(!f3pCorrelatorVsMHist)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !f3pCorrelatorVsMHist is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }                                                                                                                                                                                                                                                                                                                                   
+ if(!fNonIsotropicTermsVsMHist)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fNonIsotropicTermsVsMHist is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }
+ if(!fDetectorBiasVsMHist)
+ {                        
+  cout<<endl;
+  cout<<" WARNING (MH): !fDetectorBiasVsMHist is NULL !!!!"<<endl;
+  cout<<endl;
+  exit(0);
+ }   
+
 } // end of AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInFinish()
 
 //================================================================================================================
index 508c773bcdc0c1fc3ae69e205071c79603d5f1eb..beb3371dccd5b2de28cc736227bd7500d90e05b2 100644 (file)
@@ -66,7 +66,9 @@ class AliFlowAnalysisWithMixedHarmonics
     virtual void QuantifyBiasFromDetectorEffects();
   // 4.) Method GetOutputHistograms and method called within it:
   virtual void GetOutputHistograms(TList *outputListHistos);
+    virtual void GetPointersForBaseHistograms();
     virtual void GetPointersForCommonHistograms();
+    virtual void GetPointersForAllEventProfiles();
     virtual void GetPointersForResultsHistograms();
   // 5.) Other methods:   
   virtual void WriteHistograms(TString outputFileName);
@@ -79,7 +81,7 @@ class AliFlowAnalysisWithMixedHarmonics
   void SetAnalysisLabel(const char *al) {this->fAnalysisLabel->Append(*al);}; 
   TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
   void SetAnalysisSettings(TProfile* const as) {this->fAnalysisSettings = as;};
-  TH1D* GetAnalysisSettings() const {return this->fAnalysisSettings;};
+  TProfile* GetAnalysisSettings() const {return this->fAnalysisSettings;};
   void SetCorrelatorInteger(Int_t const ci) {this->fCorrelatorInteger = ci;};
   Int_t GetCorrelatorInteger() const {return this->fCorrelatorInteger;}; 
   void SetNoOfMultipicityBins(Int_t const nomb) {this->fNoOfMultipicityBins = nomb;};
@@ -108,13 +110,15 @@ class AliFlowAnalysisWithMixedHarmonics
   TH1D* GetPtWeights() const {return this->fPtWeights;};
   void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
   TH1D* GetEtaWeights() const {return this->fEtaWeights;};
+  void SetProfileList(TList* const plist) {this->fProfileList = plist;}
+  TList* GetProfileList() const {return this->fProfileList;}  
   void Set3pCorrelatorPro(TProfile* const s3pPro) {this->f3pCorrelatorPro = s3pPro;};
   TProfile* Get3pCorrelatorPro() const {return this->f3pCorrelatorPro;};
-  void SetfNonIsotropicTermsPro(TProfile* const nitPro) {this->fNonIsotropicTermsPro = nitPro;};
+  void SetNonIsotropicTermsPro(TProfile* const nitPro) {this->fNonIsotropicTermsPro = nitPro;};
   TProfile* GetNonIsotropicTermsPro() const {return this->fNonIsotropicTermsPro;};
-  void Set3pCorrelatoVsMrPro(TProfile* const s3pVsMPro) {this->f3pCorrelatorVsMPro = s3pVsMPro;};
+  void Set3pCorrelatorVsMPro(TProfile* const s3pVsMPro) {this->f3pCorrelatorVsMPro = s3pVsMPro;};
   TProfile* Get3pCorrelatorVsMPro() const {return this->f3pCorrelatorVsMPro;};
-  void SetfNonIsotropicTermsVsMPro(TProfile2D* const nitVsMPro) {this->fNonIsotropicTermsVsMPro = nitVsMPro;};
+  void SetNonIsotropicTermsVsMPro(TProfile2D* const nitVsMPro) {this->fNonIsotropicTermsVsMPro = nitVsMPro;};
   TProfile2D* GetNonIsotropicTermsVsMPro() const {return this->fNonIsotropicTermsVsMPro;};
   void SetResultsList(TList* const rlist) {this->fResultsList = rlist;}
   TList* GetResultsList() const {return this->fResultsList;}  
@@ -174,6 +178,7 @@ class AliFlowAnalysisWithMixedHarmonics
   TH1D *f3pCorrelatorEBE; // 3-p correlator <cos[n(2phi1-phi2-phi3)]> for single event
   TH1D *fNonIsotropicTermsEBE; // correction terms to 3-p correlator <cos[n(2phi1-phi2-phi3)]> for single event
   // 4.) Profiles:
+  TList *fProfileList; // list holding all all-event profiles 
   TProfile *f3pCorrelatorPro; // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with wrong errors)
   TProfile *fNonIsotropicTermsPro; // correction terms to 3-p correlator <cos[n(2phi1-phi2-phi3)]> for all events (with wrong errors)
   TProfile *f3pCorrelatorVsMPro; // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with wrong errors) versus multiplicity
index bdf3124735c964d497d049ab17c982572317dfb9..175928ac47677c3875373ce7e751095ec1ed33d3 100644 (file)
@@ -41,7 +41,7 @@
 #include "AliFlowAnalysisWithNestedLoops.h"
 
 class TH1;
-class TList;\r
+class TList;
 ClassImp(AliFlowAnalysisWithNestedLoops)
 
 //================================================================================================================
@@ -76,7 +76,7 @@ fResultsList(NULL),
 fRelativeAngleDistribution(NULL)
 {
  // Constructor. 
\r // Base list to hold all output objects:
+  // Base list to hold all output objects:
  fHistList = new TList();
  fHistListName = new TString("cobjNL");
  fHistList->SetName(fHistListName->Data());
@@ -187,7 +187,7 @@ void AliFlowAnalysisWithNestedLoops::Make(AliFlowEventSimple* anEvent)
     
  } // end of for(Int_t i=0;i<nPrim;i++) 
   
-} // end of AliFlowAnalysisWithNestedLoops::Make(AliFlowEventSimple* anEvent)\r
+} // end of AliFlowAnalysisWithNestedLoops::Make(AliFlowEventSimple* anEvent)
 //================================================================================================================
 
 void AliFlowAnalysisWithNestedLoops::Finish()
@@ -208,7 +208,7 @@ void AliFlowAnalysisWithNestedLoops::GetOutputHistograms(TList *outputListHistos
 {
  // Get pointers to all objects saved in the output file.
  
- // a) Get pointers for common control histograms.\r 
+ // a) Get pointers for common control histograms. 
  if(outputListHistos)
  {     
   this->SetHistList(outputListHistos);
index 6797f0ef560c65783290a85325c6a90e70cc6174..5b72b8c0c1729c66813edd269f0fe1a084877a9a 100644 (file)
@@ -6041,7 +6041,7 @@ void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms()
  if(commonHist8th) this->SetCommonHists8th(commonHist8th);  
  TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; 
  commonHistResults2ndOrderName += fAnalysisLabel->Data(); 
- AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>\r                                              (fHistList->FindObject(commonHistResults2ndOrderName.Data()));
+ AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>                                              (fHistList->FindObject(commonHistResults2ndOrderName.Data()));
  if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd);   
  TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC";
  commonHistResults4thOrderName += fAnalysisLabel->Data();
@@ -9818,7 +9818,7 @@ void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsi
  Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1)
                 + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k
  //..............................................................................................
-        \r // 1-particle:
+         // 1-particle:
  Double_t cosP1nW1 = 0.; // <<w1 cos(n*(phi1))>>
    
  if(dMult>0 && (*fSMpk)(0,1) !=0.)
index 376e17780bdf55b8b1abb24c4ba822f7e9df0b30..61e58b02476953eaeb156ab3080fa25f80b853a9 100644 (file)
@@ -15,8 +15,8 @@ void redoFinish(TString type="ESD", Int_t mode=mLocal)
  // Final output file name holding final results for large statistics sample:
  TString outputFileName = "AnalysisResults.root"; 
  
- const Int_t nMethods = 10;
- TString method[nMethods] = {"MCEP","SP","GFC","QC","FQD","LYZ1SUM","LYZ1PROD","LYZ2SUM","LYZ2PROD","LYZEP"};
+ const Int_t nMethods = 12;
+ TString method[nMethods] = {"MCEP","SP","GFC","QC","FQD","LYZ1SUM","LYZ1PROD","LYZ2SUM","LYZ2PROD","LYZEP","MH","NL"};
  
  // Load needed libraries:                       
  LoadLibrariesRF(mode);  
@@ -173,6 +173,24 @@ void redoFinish(TString type="ESD", Int_t mode=mLocal)
    lyzep->Finish();
    dirFile[i]->Add(list[i],kTRUE);
    dirFile[i]->Write(dirFile[i]->GetName(),TObject::kSingleKey+TObject::kOverwrite);
+  } 
+  // MH:
+  else if(list[i] && strcmp(list[i]->GetName(),"cobjMH")==0)
+  {
+   AliFlowAnalysisWithMixedHarmonics* mh = new AliFlowAnalysisWithMixedHarmonics();
+   mh->GetOutputHistograms(list[i]);
+   mh->Finish();
+   dirFile[i]->Add(list[i],kTRUE);
+   dirFile[i]->Write(dirFile[i]->GetName(),TObject::kSingleKey+TObject::kOverwrite);
+  } 
+  // NL:
+  else if(list[i] && strcmp(list[i]->GetName(),"cobjNL")==0)
+  {
+   AliFlowAnalysisWithNestedLoops* nl = new AliFlowAnalysisWithNestedLoops();
+   nl->GetOutputHistograms(list[i]);
+   nl->Finish();
+   dirFile[i]->Add(list[i],kTRUE);
+   dirFile[i]->Write(dirFile[i]->GetName(),TObject::kSingleKey+TObject::kOverwrite);
   }                
  } // End of for(Int_t i=0;i<nMethods;i++)
 
@@ -258,7 +276,9 @@ void LoadLibrariesRF(const libModes mode) {
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithCumulants.cxx+");
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx+"); 
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.cxx+");
-       
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.cxx+");    
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithNestedLoops.cxx+");          
+    
     cout << "finished loading macros!" << endl;  
     
   } // end of else if (mode==mLocalSource) 
index 70b9bda69ae316150fc6622f45add3112b8cfd12..f448b36886175326df6bb9476e1fa0f19855782e 100644 (file)
@@ -15,6 +15,8 @@ Bool_t LYZEP    = kFALSE;
 Bool_t GFC      = kTRUE;
 Bool_t QC       = kTRUE;
 Bool_t FQD      = kTRUE;
+Bool_t MH       = kTRUE; 
+Bool_t NL       = kFALSE; 
 Bool_t MCEP     = kFALSE; //does not work yet 24/12/08
 //--------------------------------------------------------------------------------------
 
@@ -145,7 +147,9 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
   AliFlowAnalysisWithLeeYangZeros *lyz2prod = NULL;
   AliFlowAnalysisWithLYZEventPlane *lyzep = NULL;
   AliFlowAnalysisWithScalarProduct *sp = NULL;
-  AliFlowAnalysisWithMCEventPlane *mcep = NULL;   
+  AliFlowAnalysisWithMCEventPlane *mcep = NULL;     
+  AliFlowAnalysisWithMixedHarmonics *mh = NULL;
+  AliFlowAnalysisWithNestedLoops *nl = NULL;
 
   //MCEP = monte carlo event plane
   if (MCEP) {
@@ -156,34 +160,35 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
   //QC = Q-cumulants  
   if(QC) { 
     AliFlowAnalysisWithQCumulants* qc = new AliFlowAnalysisWithQCumulants();
-    qc->Init();
     if(listWithWeights) qc->SetWeightsList(listWithWeights);
     if(usePhiWeights) qc->SetUsePhiWeights(usePhiWeights);
     if(usePtWeights) qc->SetUsePtWeights(usePtWeights);
     if(useEtaWeights) qc->SetUseEtaWeights(useEtaWeights);
+    qc->Init();
   }
   
   //GFC = Generating Function Cumulants 
   if(GFC) {
     AliFlowAnalysisWithCumulants* gfc = new AliFlowAnalysisWithCumulants();
-    gfc->Init();
     if(listWithWeights) gfc->SetWeightsList(listWithWeights);
     if(usePhiWeights) gfc->SetUsePhiWeights(usePhiWeights);
     if(usePtWeights) gfc->SetUsePtWeights(usePtWeights);
     if(useEtaWeights) gfc->SetUseEtaWeights(useEtaWeights);
+    gfc->Init();
   }
   
   //FQD = Fitting q-distribution 
   if(FQD) {
     AliFlowAnalysisWithFittingQDistribution* fqd = new AliFlowAnalysisWithFittingQDistribution();
-    fqd->Init();
     if(listWithWeights) fqd->SetWeightsList(listWithWeights);
     if(usePhiWeights) fqd->SetUsePhiWeights(usePhiWeights);
+    fqd->Init();
   }
 
   //SP = Scalar Product 
   if(SP) {
     AliFlowAnalysisWithScalarProduct* sp = new AliFlowAnalysisWithScalarProduct();
+    if(usePhiWeights) sp->SetUsePhiWeights(usePhiWeights);
     sp->Init();
   }
 
@@ -266,6 +271,25 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
       }
     }
   }
+  // MH = Mixed Harmonics:  
+  if(MH) { 
+    AliFlowAnalysisWithMixedHarmonics* mh = new AliFlowAnalysisWithMixedHarmonics();
+    if(listWithWeights) mh->SetWeightsList(listWithWeights);
+    //if(usePhiWeights) mh->SetUsePhiWeights(usePhiWeights); // to be improved (enabled)
+    //if(usePtWeights) mh->SetUsePtWeights(usePtWeights); // to be improved (enabled)
+    //if(useEtaWeights) mh->SetUseEtaWeights(useEtaWeights); // to be improved (enabled)
+    mh->Init();
+  }
+  // NL = Nested Loops:  
+  if(NL) { 
+    AliFlowAnalysisWithNestedLoops* nl = new AliFlowAnalysisWithNestedLoops();
+    if(listWithWeights) nl->SetWeightsList(listWithWeights);
+    //if(usePhiWeights) nl->SetUsePhiWeights(usePhiWeights); // to be improved (enabled)
+    //if(usePtWeights) nl->SetUsePtWeights(usePtWeights); // to be improved (enabled)
+    //if(useEtaWeights) nl->SetUseEtaWeights(useEtaWeights); // to be improved (enabled)
+    nl->Init();
+  }
+
   //------------------------------------------------------------------------
   
   
@@ -389,7 +413,9 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
              if(LYZ2SUM) lyz2sum->Make(fEvent);
              if(LYZ2PROD)lyz2prod->Make(fEvent);
              if(LYZEP)   lyzep->Make(fEvent,ep);
-             if(SP)      sp->Make(fEvent);
+             if(SP)      sp->Make(fEvent);           
+             if(MH)      mh->Make(fEvent);
+             if(NL)      nl->Make(fEvent);
              //-----------------------------------------------------------
              fCount++;
              //cout << "# " << fCount << " events processed" << endl;
@@ -406,8 +432,8 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
  TString outputFileName = "AnalysisResults.root";  
  TFile *outputFile = new TFile(outputFileName.Data(),"RECREATE");
  // create a new file for each method wich will hold list with final results:
- const Int_t nMethods = 10;
- TString method[nMethods] = {"MCEP","SP","GFC","QC","FQD","LYZ1SUM","LYZ1PROD","LYZ2SUM","LYZ2PROD","LYZEP"};
+ const Int_t nMethods = 12;
+ TString method[nMethods] = {"MCEP","SP","GFC","QC","FQD","LYZ1SUM","LYZ1PROD","LYZ2SUM","LYZ2PROD","LYZEP","MH","NL"};
  TDirectoryFile *dirFileFinal[nMethods] = {NULL};
  TString fileNameMethod[nMethods]; 
  for(Int_t i=0;i<nMethods;i++)
@@ -430,6 +456,8 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
  if(LYZ2SUM) {lyz2sum->Finish(); lyz2sum->WriteHistograms(dirFileFinal[7]);}
  if(LYZ2PROD){lyz2prod->Finish();lyz2prod->WriteHistograms(dirFileFinal[8]);}
  if(LYZEP)   {lyzep->Finish();   lyzep->WriteHistograms(dirFileFinal[9]);}
+ if(MH)      {mh->Finish();      mh->WriteHistograms(dirFileFinal[10]);}
+ if(NL)      {nl->Finish();      nl->WriteHistograms(dirFileFinal[11]);}
  //---------------------------------------------------------------------------------------  
  
  outputFile->Close();
@@ -582,7 +610,9 @@ void LoadLibraries(const anaModes mode) {
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.cxx+");
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithCumulants.cxx+");
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx+"); 
-    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.cxx+");    
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithNestedLoops.cxx+");
     
     // Class to fill the FlowEvent without aliroot dependence
     // can be found in the directory FlowEventMakers
index 564c0f62ad01d5119916795582262e4a9fade9aa..a0b8e214c798434d8c3e9fedf354fba57d24c9eb 100644 (file)
@@ -691,7 +691,6 @@ void LoadLibraries(const anaModes mode) {
  
     // In root inline compile
 
-   
     // Constants  
     gROOT->LoadMacro("AliFlowCommon/AliFlowCommonConstants.cxx+");
     gROOT->LoadMacro("AliFlowCommon/AliFlowLYZConstants.cxx+");
@@ -723,6 +722,8 @@ void LoadLibraries(const anaModes mode) {
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithCumulants.cxx+");
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx+"); 
     gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.cxx+"); 
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithNestedLoops.cxx+");
     
     // Class to fill the FlowEvent on the fly (generate Monte Carlo events)
     gROOT->LoadMacro("AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx+");