from Ante Bilandzic:
authormkrzewic <mkrzewic@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Mar 2013 16:09:17 +0000 (16:09 +0000)
committermkrzewic <mkrzewic@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Mar 2013 16:09:17 +0000 (16:09 +0000)
1.) Added setter for 'exact number of RPs' to be taken for the analysis, which is now synchronized with Miko\l aj's way to shuffle;
2.) Added 2D histos for direct correlations of <2>, <4>, <6> and <8> vs M (relevant for chasing the outliers);
3.) Few minor additions here and there.

PWG/FLOW/Base/AliFlowAnalysisWithFittingQDistribution.cxx
PWG/FLOW/Base/AliFlowAnalysisWithFittingQDistribution.h
PWG/FLOW/Base/AliFlowAnalysisWithQCumulants.cxx
PWG/FLOW/Base/AliFlowAnalysisWithQCumulants.h
PWG/FLOW/Tasks/AliAnalysisTaskFittingQDistribution.cxx
PWG/FLOW/Tasks/AliAnalysisTaskFittingQDistribution.h
PWG/FLOW/Tasks/AliAnalysisTaskQCumulants.cxx
PWG/FLOW/Tasks/AliAnalysisTaskQCumulants.h

index e5238a8..067a71b 100644 (file)
@@ -107,7 +107,8 @@ AliFlowAnalysisWithFittingQDistribution::AliFlowAnalysisWithFittingQDistribution
  fSigma2Max(2.5),
  fFinalResultIsFromSigma2Fitted(kTRUE),
  fPrintOnTheScreen(kTRUE),
- fDoFit(kTRUE)
+ fDoFit(kTRUE),
+ fExactNoRPs(0)
  {
   // constructor 
   
@@ -199,18 +200,22 @@ void AliFlowAnalysisWithFittingQDistribution::Make(AliFlowEventSimple* anEvent)
  Double_t wEta = 1.; // eta weight 
  Double_t dReQ = 0.; // real part of Q-vector 
  Double_t dImQ = 0.; // imaginary part of Q-vector
+ Int_t nCounterNoRPs = 0; // needed only for shuffling
  Int_t n = fHarmonic; // shortcut for the harmonic 
  Double_t dSumOfParticleWeights = 0.; // when particle weights are not used dSumOfParticleWeights is equal to multiplicity
  AliFlowTrackSimple *aftsTrack = NULL;  
  Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks
+ if(fExactNoRPs > 0 && anEvent->GetNumberOfRPs()<fExactNoRPs){return;} // shuffling
                                                                                     
  // Start loop over particles:
  for(Int_t i=0;i<nPrim;i++) 
- { 
+ {  
+  if(fExactNoRPs > 0 && nCounterNoRPs>fExactNoRPs){continue;} // needed only for shuffling
   aftsTrack=anEvent->GetTrack(i);
   if(aftsTrack)
   {
    if(!(aftsTrack->InRPSelection())){continue;} // consider only tracks which are RPs    
+   nCounterNoRPs++;
    dPhi = aftsTrack->Phi();
    dPt  = aftsTrack->Pt();
    dEta = aftsTrack->Eta();
@@ -260,7 +265,7 @@ void AliFlowAnalysisWithFittingQDistribution::Make(AliFlowEventSimple* anEvent)
         dMultiplicityBin = nNumberOfPOIsEBE+0.5;
        }
    // Fill qDist vs M:
-   fqDistributionVsMult->Fill(q,dMultiplicityBin); 
+   fqDistributionVsMult->Fill(dMultiplicityBin,q); 
   } // end of if(fStoreqDistributionVsMult)
  } // end of if(dSumOfParticleWeights > 1.)
 
@@ -780,19 +785,18 @@ void AliFlowAnalysisWithFittingQDistribution::BookEverythingForDistributions()
  {
   TString fqDistributionVsMultName = "fqDistributionVsMult";
   fqDistributionVsMultName += fAnalysisLabel->Data();
-  fqDistributionVsMult = new TH2D(Form("%s",fqDistributionVsMultName.Data()),"q-distribution vs M",fqNbins,fqMin,fqMax,fnBinsMult,fMinMult,fMaxMult);  
-  fqDistributionVsMult->GetXaxis()->SetTitle(Form("q_{%d}=|Q_{%d}|/#sqrt{M}",fHarmonic,fHarmonic));
+  fqDistributionVsMult = new TH2D(Form("%s",fqDistributionVsMultName.Data()),"q-distribution vs M",fnBinsMult,fMinMult,fMaxMult,fqNbins,fqMin,fqMax);  
+  fqDistributionVsMult->GetYaxis()->SetTitle(Form("q_{%d}=|Q_{%d}|/#sqrt{M}",fHarmonic,fHarmonic));
   if(fMultiplicityIs==AliFlowCommonConstants::kRP)
   {
-   fqDistributionVsMult->GetYaxis()->SetTitle("# RPs"); 
+   fqDistributionVsMult->GetXaxis()->SetTitle("# RPs"); 
   } else if(fMultiplicityIs==AliFlowCommonConstants::kExternal)
     {
-     fqDistributionVsMult->GetYaxis()->SetTitle("Reference multiplicity (from ESD)");
+     fqDistributionVsMult->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
     } else if(fMultiplicityIs==AliFlowCommonConstants::kPOI)
       {
-       fqDistributionVsMult->GetYaxis()->SetTitle("# POIs"); 
+       fqDistributionVsMult->GetXaxis()->SetTitle("# POIs"); 
       } 
-  fqDistributionVsMult->GetZaxis()->SetTitle("Counts");
   fHistList->Add(fqDistributionVsMult);
  } // end of if(fStoreqDistributionVsMult)
  // Sum of particle weights: 
@@ -840,7 +844,7 @@ void AliFlowAnalysisWithFittingQDistribution::BookEverythingForDistributions()
  // Book profile fFittingParameters which will hold all fitting parameters:
  TString fFittingParametersName = "fFittingParameters";
  fFittingParametersName += fAnalysisLabel->Data(); 
- fFittingParameters = new TProfile(fFittingParametersName.Data(),"Parameters for fitting q-distribution",12,0,12);
+ fFittingParameters = new TProfile(fFittingParametersName.Data(),"Parameters for fitting q-distribution",13,0,13);
  fFittingParameters->SetLabelSize(0.05);
  fFittingParameters->GetXaxis()->SetBinLabel(1,"treshold");
  fFittingParameters->GetXaxis()->SetBinLabel(2,Form("starting v_{%d}",fHarmonic));
@@ -854,6 +858,7 @@ void AliFlowAnalysisWithFittingQDistribution::BookEverythingForDistributions()
  fFittingParameters->GetXaxis()->SetBinLabel(10,"fStoreqDistributionVsMult"); 
  fFittingParameters->GetXaxis()->SetBinLabel(11,"fMultiplicityIs"); 
  fFittingParameters->GetXaxis()->SetBinLabel(12,"fDoFit"); 
+ fFittingParameters->GetXaxis()->SetBinLabel(13,"fExactNoRPs"); 
  fHistList->Add(fFittingParameters);
 
 } // end of void AliFlowAnalysisWithFittingQDistribution::BookEverythingForDistributions()
@@ -1074,6 +1079,7 @@ void AliFlowAnalysisWithFittingQDistribution::StoreFittingParameters()
       fFittingParameters->Fill(10.5,2); // 2 = # of Particles of Interest
      } 
  fFittingParameters->Fill(11.5,fDoFit); 
+ fFittingParameters->Fill(12.5,fExactNoRPs); 
  
 } // end of void AliFlowAnalysisWithFittingQDistribution::StoreFittingParameters()
 
@@ -1094,5 +1100,6 @@ void AliFlowAnalysisWithFittingQDistribution::AccessFittingParameters()
  fPrintOnTheScreen = (Bool_t)fFittingParameters->GetBinContent(9);
  fStoreqDistributionVsMult = (Bool_t)fFittingParameters->GetBinContent(10);
  fDoFit = (Bool_t)fFittingParameters->GetBinContent(12);
+ fExactNoRPs = (Int_t)fFittingParameters->GetBinContent(13);
  
 } // end of void AliFlowAnalysisWithFittingQDistribution::AccessFittingParameters()
index 15d504d..1ac9c5d 100644 (file)
@@ -154,6 +154,8 @@ class AliFlowAnalysisWithFittingQDistribution{
   Bool_t GetPrintOnTheScreen() const {return this->fPrintOnTheScreen;};  
   void SetDoFit(Bool_t df) {this->fDoFit = df;};
   Bool_t GetDoFit() const {return this->fDoFit;};  
+  void SetExactNoRPs(Int_t const enr) {this->fExactNoRPs = enr;};
+  Int_t GetExactNoRPs() const {return this->fExactNoRPs;};
   
  private:
   AliFlowAnalysisWithFittingQDistribution(const AliFlowAnalysisWithFittingQDistribution &afawfqd);
@@ -216,6 +218,7 @@ class AliFlowAnalysisWithFittingQDistribution{
   Bool_t fFinalResultIsFromSigma2Fitted; // the result obtained with sigma^2 fitted or sigma^2 fixed is being stored
   Bool_t fPrintOnTheScreen; // print or not the final results on the screen
   Bool_t fDoFit; // do the final fit
+  Int_t fExactNoRPs; // when shuffled, select only this number of RPs for the analysis
   
   ClassDef(AliFlowAnalysisWithFittingQDistribution, 0);
 };
index 66c0aea..a1ce18a 100644 (file)
@@ -129,6 +129,7 @@ AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
  fMinimumBiasReferenceFlow(kTRUE), 
  fForgetAboutCovariances(kFALSE), 
  fStorePhiDistributionForOneEvent(kFALSE),
+ fExactNoRPs(0),
  fReQ(NULL),
  fImQ(NULL),
  fSpk(NULL),
@@ -242,6 +243,7 @@ AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
   this->InitializeArraysForVarious();
   this->InitializeArraysForNestedLoops();
   this->InitializeArraysForMixedHarmonics();
+  this->InitializeArraysForControlHistograms();
   
  } // end of constructor
  
@@ -335,7 +337,9 @@ void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
  Double_t wPt  = 1.; // pt weight
  Double_t wEta = 1.; // eta weight
  Double_t wTrack = 1.; // track weight
+ Int_t nCounterNoRPs = 0; // needed only for shuffling
  fNumberOfRPsEBE = anEvent->GetNumberOfRPs(); // number of RPs (i.e. number of reference particles)
+ if(fExactNoRPs > 0 && fNumberOfRPsEBE<fExactNoRPs){return;}
  fNumberOfPOIsEBE = anEvent->GetNumberOfPOIs(); // number of POIs (i.e. number of particles of interest)
  fReferenceMultiplicityEBE = anEvent->GetReferenceMultiplicity(); // reference multiplicity for current event
  Double_t ptEta[2] = {0.,0.}; // 0 = dPt, 1 = dEta
@@ -347,17 +351,18 @@ void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
                                                                                                                                                                                                                                                                                         
  // d) Loop over data and calculate e-b-e quantities Q_{n,k}, S_{p,k} and s_{p,k}:
  Int_t nPrim = anEvent->NumberOfTracks();  // nPrim = total number of primary tracks
-
  AliFlowTrackSimple *aftsTrack = NULL;
  Int_t n = fHarmonic; // shortcut for the harmonic 
  for(Int_t i=0;i<nPrim;i++) 
  { 
+  if(fExactNoRPs > 0 && nCounterNoRPs>fExactNoRPs){continue;}
   aftsTrack=anEvent->GetTrack(i);
   if(aftsTrack)
   {
    if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())){continue;} // safety measure: consider only tracks which are RPs or POIs
    if(aftsTrack->InRPSelection()) // RP condition:
    {    
+    nCounterNoRPs++;
     dPhi = aftsTrack->Phi();
     dPt  = aftsTrack->Pt();
     dEta = aftsTrack->Eta();
@@ -1645,7 +1650,7 @@ void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow()
  // a) Book profile to hold all flags for integrated flow:
  TString intFlowFlagsName = "fIntFlowFlags";
  intFlowFlagsName += fAnalysisLabel->Data();
- fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",16,0.,16.);
+ fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",17,0.,17.);
  fIntFlowFlags->SetTickLength(-0.01,"Y");
  fIntFlowFlags->SetMarkerStyle(25);
  fIntFlowFlags->SetLabelSize(0.04);
@@ -1667,6 +1672,7 @@ void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow()
  fIntFlowFlags->GetXaxis()->SetBinLabel(14,"fFillMultipleControlHistograms");
  fIntFlowFlags->GetXaxis()->SetBinLabel(15,"Calculate all correlations vs M");
  fIntFlowFlags->GetXaxis()->SetBinLabel(16,"fMultiplicityIs");
+ fIntFlowFlags->GetXaxis()->SetBinLabel(17,"fExactNoRPs");
  fIntFlowList->Add(fIntFlowFlags);
 
  // b) Book event-by-event quantities:
@@ -2612,6 +2618,30 @@ void AliFlowAnalysisWithQCumulants::BookEverythingForControlHistograms()
  fCorrelationNoRPsVsNoPOIs->GetXaxis()->SetTitle("# RPs");
  fCorrelationNoRPsVsNoPOIs->GetYaxis()->SetTitle("# POIs");
  fControlHistogramsList->Add(fCorrelationNoRPsVsNoPOIs);
+ // b4) <2>, <4>, <6> and <8> vs multiplicity (#RPs, #POIs or external):
+ TString sCorrelation[4] = {"#LT2#GT","#LT4#GT","#LT6#GT","#LT8#GT"};
+ TString sMultiplicity = "";
+ if(fMultiplicityIs==AliFlowCommonConstants::kRP)
+ {
+  sMultiplicity = "# RPs"; 
+ } else if(fMultiplicityIs==AliFlowCommonConstants::kExternal)
+   {
+    sMultiplicity = "Reference multiplicity (from ESD)";
+   } else if(fMultiplicityIs==AliFlowCommonConstants::kPOI)
+     {
+      sMultiplicity = "# POIs";
+     }
+ for(Int_t ci=0;ci<4;ci++)
+ {
+  fCorrelation2468VsMult[ci] = new TH2D(Form("%s vs M",sCorrelation[ci].Data()),Form("%s vs M",sCorrelation[ci].Data()),fnBinsMult,fMinMult,fMaxMult,10000,fMinValueOfCorrelation[ci],fMaxValueOfCorrelation[ci]); // tbi -> 10000
+  fCorrelation2468VsMult[ci]->SetTickLength(-0.01,"Y");
+  fCorrelation2468VsMult[ci]->SetLabelSize(0.04);
+  fCorrelation2468VsMult[ci]->SetLabelOffset(0.02,"Y");
+  fCorrelation2468VsMult[ci]->SetStats(kTRUE);
+  fCorrelation2468VsMult[ci]->GetXaxis()->SetTitle(sMultiplicity.Data());
+  fCorrelation2468VsMult[ci]->GetYaxis()->SetTitle(sCorrelation[ci].Data());
+  fControlHistogramsList->Add(fCorrelation2468VsMult[ci]); 
+ } // end of for(Int_t ci=0;ci<4;ci++)
 
 } // end of void AliFlowAnalysisWithQCumulants::BookEverythingForControlHistograms()
 
@@ -3328,6 +3358,19 @@ void AliFlowAnalysisWithQCumulants::InitializeArraysForMixedHarmonics()
 
 //=======================================================================================================================
 
+void AliFlowAnalysisWithQCumulants::InitializeArraysForControlHistograms()
+{
+ // Initialize arrays of all objects relevant for control histograms.
+
+ for(Int_t ci=0;ci<4;ci++) // correlation index 
+ {
+  fCorrelation2468VsMult[ci] = NULL;    
+ }
+
+} // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForControlHistograms()
+
+//=======================================================================================================================
+
 void AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops()
 {
  // Book all objects relevant for calculations with nested loops.
@@ -3773,7 +3816,11 @@ void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations()
    fIntFlowCorrelationsAllVsMPro[1]->Fill(dMultiplicityBin,two2n2n,mWeight2p);
    fIntFlowCorrelationsAllVsMPro[2]->Fill(dMultiplicityBin,two3n3n,mWeight2p);
    fIntFlowCorrelationsAllVsMPro[3]->Fill(dMultiplicityBin,two4n4n,mWeight2p);
-  }  
+  } 
+  if(fStoreControlHistograms)
+  {
+   fCorrelation2468VsMult[0]->Fill(dMultiplicityBin,two1n1n);
+  } 
  } // end of if(dMult>1)
  
  // 3-particle:
@@ -3910,6 +3957,10 @@ void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations()
    fIntFlowCorrelationsVsMPro[1]->Fill(dMultiplicityBin,four1n1n1n1n,mWeight4p);
    fIntFlowSquaredCorrelationsVsMPro[1]->Fill(dMultiplicityBin,four1n1n1n1n*four1n1n1n1n,mWeight4p);
   }   
+  if(fStoreControlHistograms)
+  {
+   fCorrelation2468VsMult[1]->Fill(dMultiplicityBin,four1n1n1n1n);
+  } 
  } // end of if(dMult>3)
 
  // 5-particle:
@@ -4056,7 +4107,11 @@ void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations()
   {
    fIntFlowCorrelationsVsMPro[2]->Fill(dMultiplicityBin,six1n1n1n1n1n1n,mWeight6p);
    fIntFlowSquaredCorrelationsVsMPro[2]->Fill(dMultiplicityBin,six1n1n1n1n1n1n*six1n1n1n1n1n1n,mWeight6p);
-  }    
+  }
+  if(fStoreControlHistograms)
+  {
+   fCorrelation2468VsMult[2]->Fill(dMultiplicityBin,six1n1n1n1n1n1n);
+  }     
  } // end of if(dMult>5)
  
  // 7-particle:
@@ -4151,7 +4206,11 @@ void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations()
   {
    fIntFlowCorrelationsVsMPro[3]->Fill(dMultiplicityBin,eight1n1n1n1n1n1n1n1n,mWeight8p);
    fIntFlowSquaredCorrelationsVsMPro[3]->Fill(dMultiplicityBin,eight1n1n1n1n1n1n1n1n*eight1n1n1n1n1n1n1n1n,mWeight8p);
-  }    
+  }  
+  if(fStoreControlHistograms)
+  {
+   fCorrelation2468VsMult[3]->Fill(dMultiplicityBin,eight1n1n1n1n1n1n1n1n);
+  }   
  } // end of if(dMult>7) 
  
  // EXTRA correlations for v3{5} study:
@@ -17386,6 +17445,7 @@ void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags()
      {
       fIntFlowFlags->Fill(15.5,2); // 2 = # of Particles of Interest
      } 
+ fIntFlowFlags->Fill(16.5,(Int_t)fExactNoRPs); 
 
 } // end of void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags()
 
index d17c1d6..1786e39 100644 (file)
@@ -48,6 +48,7 @@ class AliFlowAnalysisWithQCumulants{
   virtual void InitializeArraysForVarious();
   virtual void InitializeArraysForNestedLoops();
   virtual void InitializeArraysForMixedHarmonics();
+  virtual void InitializeArraysForControlHistograms();
   // 1.) method Init() and methods called within Init():
   virtual void Init();
     virtual void CrossCheckSettings();
@@ -268,6 +269,8 @@ class AliFlowAnalysisWithQCumulants{
   Bool_t GetStorePhiDistributionForOneEvent() const {return this->fStorePhiDistributionForOneEvent;};
   void SetPhiDistributionForOneEventSettings(Double_t const pdfoes, Int_t const i) {this->fPhiDistributionForOneEventSettings[i] = pdfoes;};
   Double_t GetPhiDistributionForOneEventSettings(Int_t const i) const {return this->fPhiDistributionForOneEventSettings[i];};
+  void SetExactNoRPs(Int_t const enr) {this->fExactNoRPs = enr;};
+  Int_t GetExactNoRPs() const {return this->fExactNoRPs;};
 
   // Reference flow profiles:
   void SetAvMultiplicity(TProfile* const avMultiplicity) {this->fAvMultiplicity = avMultiplicity;};
@@ -490,6 +493,8 @@ class AliFlowAnalysisWithQCumulants{
   TH2D* GetCorrelationNoPOIsVsRefMult() const {return this->fCorrelationNoPOIsVsRefMult;};
   void SetCorrelationNoRPsVsNoPOIs(TH2D* const cnrvnp) {this->fCorrelationNoRPsVsNoPOIs = cnrvnp;};
   TH2D* GetCorrelationNoRPsVsNoPOIs() const {return this->fCorrelationNoRPsVsNoPOIs;};
+  void SetCorrelation2468VsMult(TH2D* const c2468vm, Int_t const ci) {this->fCorrelation2468VsMult[ci] = c2468vm;};
+  TH2D* GetCorrelation2468VsMult(Int_t ci) const {return this->fCorrelation2468VsMult[ci];};
 
  private:
   
@@ -563,6 +568,7 @@ class AliFlowAnalysisWithQCumulants{
   Bool_t fForgetAboutCovariances; // when propagating error forget about the covariances  
   Bool_t fStorePhiDistributionForOneEvent; // store phi distribution for one event to illustrate flow
   Double_t fPhiDistributionForOneEventSettings[4]; // [v_min,v_max,refMult_min,refMult_max]
+  Int_t fExactNoRPs; // when shuffled, select only this number of RPs for the analysis
   //  3c.) event-by-event quantities:
   TMatrixD *fReQ; // fReQ[m][k] = sum_{i=1}^{M} w_{i}^{k} cos(m*phi_{i})
   TMatrixD *fImQ; // fImQ[m][k] = sum_{i=1}^{M} w_{i}^{k} sin(m*phi_{i})
@@ -755,7 +761,8 @@ class AliFlowAnalysisWithQCumulants{
   TH2D *fCorrelationNoRPsVsRefMult; // correlation between # RPs and ref. mult. determined centrally
   TH2D *fCorrelationNoPOIsVsRefMult; // correlation between # POIs and ref. mult. determined centrally
   TH2D *fCorrelationNoRPsVsNoPOIs; // correlation between # RPs and # POIs
-   
+  TH2D *fCorrelation2468VsMult[4]; // <2>, <4>, <6> and <8> vs multiplicity (#RPs, #POIs or external)
   ClassDef(AliFlowAnalysisWithQCumulants, 3);
 };
 
index 5cfcd5e..9742c56 100644 (file)
@@ -61,6 +61,7 @@ AliAnalysisTaskFittingQDistribution::AliAnalysisTaskFittingQDistribution(const c
  fMaxMult(10000.),
  fnBinsMult(1000),
  fDoFit(kTRUE),
+ fExactNoRPs(0),
  fMultiplicityIs(AliFlowCommonConstants::kRP)  
  {
   //constructor
@@ -99,6 +100,7 @@ AliAnalysisTaskFittingQDistribution::AliAnalysisTaskFittingQDistribution():
  fMaxMult(0.),
  fnBinsMult(0),
  fDoFit(kTRUE),
+ fExactNoRPs(0),
  fMultiplicityIs(AliFlowCommonConstants::kRP)  
  {
   // Dummy constructor
@@ -140,6 +142,7 @@ void AliAnalysisTaskFittingQDistribution::UserCreateOutputObjects()
   fFQD->SetMaxMult(fMaxMult);
   fFQD->SetnBinsMult(fnBinsMult);
   fFQD->SetDoFit(fDoFit);
+  fFQD->SetExactNoRPs(fExactNoRPs);
   fFQD->SetMultiplicityIs(fMultiplicityIs);
 
   fFQD->Init();
index 693505b..37a0b6e 100644 (file)
@@ -65,6 +65,8 @@ class AliAnalysisTaskFittingQDistribution : public AliAnalysisTaskSE{
   Int_t GetnBinsMult() const {return this->fnBinsMult;};  
   void SetDoFit(Bool_t df) {this->fDoFit = df;};
   Bool_t GetDoFit() const {return this->fDoFit;}; 
+  void SetExactNoRPs(Int_t const enr) {this->fExactNoRPs = enr;};
+  Int_t GetExactNoRPs() const {return this->fExactNoRPs;};
   void SetMultiplicityIs(AliFlowCommonConstants::ERefMultSource mi) {this->fMultiplicityIs = mi;};
  
  private:
@@ -89,8 +91,9 @@ class AliAnalysisTaskFittingQDistribution : public AliAnalysisTaskSE{
   Double_t fMaxMult;                     // maximum multiplicity
   Int_t fnBinsMult;                      // number of multiplicity bins
   Bool_t fDoFit;                         // do the final fit
-  AliFlowCommonConstants::ERefMultSource fMultiplicityIs;              // by default kRP
-                                                           
+  Int_t fExactNoRPs;                     // when shuffled, select only this number of RPs for the analysis 
+  AliFlowCommonConstants::ERefMultSource fMultiplicityIs; // by default kRP
+                                                          
   ClassDef(AliAnalysisTaskFittingQDistribution, 1); 
 };
 
index 96906e6..548c145 100644 (file)
@@ -65,6 +65,7 @@ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name, Bool_t us
  fMinimumBiasReferenceFlow(kTRUE), 
  fForgetAboutCovariances(kFALSE),  
  fStorePhiDistributionForOneEvent(kFALSE),
+ fExactNoRPs(0),
  fnBinsMult(10000),
  fMinMult(0.),  
  fMaxMult(10000.), 
@@ -100,8 +101,22 @@ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name, Bool_t us
  {
   fPhiDistributionForOneEventSettings[p] = 0.;
  } 
+
+ // Initialize default min and max values of correlations:
+ //    (Remark: The default values bellow were chosen for v2=5% and M=500)
+ fMinValueOfCorrelation[0] = -0.01; // <2>_min 
+ fMaxValueOfCorrelation[0] = 0.04; // <2>_max 
+ fMinValueOfCorrelation[1] = -0.00002; // <4>_min 
+ fMaxValueOfCorrelation[1] = 0.00015; // <4>_max  
+ fMinValueOfCorrelation[2] = -0.0000003; // <6>_min 
+ fMaxValueOfCorrelation[2] = 0.0000006; // <6>_max  
+ fMinValueOfCorrelation[3] = -0.000000006; // <8>_min 
+ fMaxValueOfCorrelation[3] = 0.000000003; // <8>_max 
+
 }
 
+//================================================================================================================
+
 AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(): 
  AliAnalysisTaskSE(),
  fEvent(NULL),
@@ -125,6 +140,7 @@ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants():
  fMinimumBiasReferenceFlow(kFALSE), 
  fForgetAboutCovariances(kFALSE), 
  fStorePhiDistributionForOneEvent(kFALSE), 
+ fExactNoRPs(0),
  fnBinsMult(0),
  fMinMult(0.),  
  fMaxMult(0.), 
@@ -146,6 +162,17 @@ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants():
   fPhiDistributionForOneEventSettings[p] = 0.;
  } 
  
+ // Initialize default min and max values of correlations:
+ //    (Remark: The default values bellow were chosen for v2=5% and M=500)
+ fMinValueOfCorrelation[0] = -0.01; // <2>_min 
+ fMaxValueOfCorrelation[0] = 0.04; // <2>_max 
+ fMinValueOfCorrelation[1] = -0.00002; // <4>_min 
+ fMaxValueOfCorrelation[1] = 0.00015; // <4>_max  
+ fMinValueOfCorrelation[2] = -0.0000003; // <6>_min 
+ fMaxValueOfCorrelation[2] = 0.0000006; // <6>_max  
+ fMinValueOfCorrelation[3] = -0.000000006; // <8>_min 
+ fMaxValueOfCorrelation[3] = 0.000000003; // <8>_max 
+
 }
 
 //================================================================================================================
@@ -176,6 +203,7 @@ void AliAnalysisTaskQCumulants::UserCreateOutputObjects()
  fQC->SetStoreControlHistograms(fStoreControlHistograms);
  fQC->SetMinimumBiasReferenceFlow(fMinimumBiasReferenceFlow); 
  fQC->SetForgetAboutCovariances(fForgetAboutCovariances); 
+ fQC->SetExactNoRPs(fExactNoRPs);
  // Multiparticle correlations vs multiplicity:
  fQC->SetnBinsMult(fnBinsMult);
  fQC->SetMinMult(fMinMult);
@@ -210,7 +238,14 @@ void AliAnalysisTaskQCumulants::UserCreateOutputObjects()
  {
   fQC->SetPhiDistributionForOneEventSettings(fPhiDistributionForOneEventSettings[i],i);
  }
-  
+
+ // Initialize default min and max values of correlations: 
+ for(Int_t ci=0;ci<4;ci++)
+ {
+  fQC->SetMinValueOfCorrelation(ci,fMinValueOfCorrelation[ci]);
+  fQC->SetMaxValueOfCorrelation(ci,fMaxValueOfCorrelation[ci]);
+ }  
+
  fQC->Init();
  
  if(fQC->GetHistList()) 
index ccf2dbd..e797f33 100644 (file)
@@ -77,6 +77,8 @@ class AliAnalysisTaskQCumulants : public AliAnalysisTaskSE{
   Bool_t GetStorePhiDistributionForOneEvent() const {return this->fStorePhiDistributionForOneEvent;};
   void SetPhiDistributionForOneEventSettings(Double_t const pdfoes, Int_t const i) {this->fPhiDistributionForOneEventSettings[i] = pdfoes;};
   Double_t GetPhiDistributionForOneEventSettings(Int_t const i) const {return this->fPhiDistributionForOneEventSettings[i];};  
+  void SetExactNoRPs(Int_t const enr) {this->fExactNoRPs = enr;};
+  Int_t GetExactNoRPs() const {return this->fExactNoRPs;}; 
  
   // Multiparticle correlations vs multiplicity:
   void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;};
@@ -97,7 +99,12 @@ class AliAnalysisTaskQCumulants : public AliAnalysisTaskSE{
   // Event weights:
   void SetMultiplicityWeight(const char *multiplicityWeight) {*this->fMultiplicityWeight = multiplicityWeight;};
   void SetMultiplicityIs(AliFlowCommonConstants::ERefMultSource mi) {this->fMultiplicityIs = mi;};
+  // Boundaries for distributions of correlations:
+  void SetMinValueOfCorrelation(Int_t const ci, Double_t const minValue) {this->fMinValueOfCorrelation[ci] = minValue;};
+  Double_t GetMinValueOfCorrelation(Int_t ci) const {return this->fMinValueOfCorrelation[ci];};
+  void SetMaxValueOfCorrelation(Int_t const ci, Double_t const maxValue) {this->fMaxValueOfCorrelation[ci] = maxValue;};
+  Double_t GetMaxValueOfCorrelation(Int_t ci) const {return this->fMaxValueOfCorrelation[ci];};
+
  private:
   AliAnalysisTaskQCumulants(const AliAnalysisTaskQCumulants& aatqc);
   AliAnalysisTaskQCumulants& operator=(const AliAnalysisTaskQCumulants& aatqc);
@@ -124,7 +131,8 @@ class AliAnalysisTaskQCumulants : public AliAnalysisTaskSE{
   Bool_t fMinimumBiasReferenceFlow;      // store as reference flow in AliFlowCommonHistResults the minimum bias result (kFALSE by default)     
   Bool_t fForgetAboutCovariances;        // when propagating error forget about the covariances  
   Bool_t fStorePhiDistributionForOneEvent; // store phi distribution for one event to illustrate flow
-  Double_t fPhiDistributionForOneEventSettings[4]; // [v_min,v_max,refMult_min,refMult_max]        
+  Double_t fPhiDistributionForOneEventSettings[4]; // [v_min,v_max,refMult_min,refMult_max]
+  Int_t fExactNoRPs; // when shuffled, select only this number of RPs for the analysis        
   // Multiparticle correlations vs multiplicity:
   Int_t fnBinsMult;                   // number of multiplicity bins for flow analysis versus multiplicity  
   Double_t fMinMult;                  // minimal multiplicity for flow analysis versus multiplicity  
@@ -139,6 +147,9 @@ class AliAnalysisTaskQCumulants : public AliAnalysisTaskSE{
   // Event weights:
   TString *fMultiplicityWeight;       // event-by-event weights for multiparticle correlations ("combinations","unit" or "multiplicity")  
   AliFlowCommonConstants::ERefMultSource fMultiplicityIs;           // by default "#RPs", other supported options are "RefMultFromESD" = ref. mult. from ESD, and "#POIs"
+  // Boundaries for distributions of correlations:
+  Double_t fMinValueOfCorrelation[4]; // min values of <2>, <4>, <6> and <8>
+  Double_t fMaxValueOfCorrelation[4]; // max values of <2>, <4>, <6> and <8>
   
   ClassDef(AliAnalysisTaskQCumulants, 1); 
 };