extra histogram for sigma^2
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Dec 2008 18:46:31 +0000 (18:46 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Dec 2008 18:46:31 +0000 (18:46 +0000)
PWG2/FLOW/AliAnalysisTaskFittingQDistribution.cxx
PWG2/FLOW/AliFittingFunctionsForQDistribution.cxx
PWG2/FLOW/AliFittingFunctionsForQDistribution.h
PWG2/FLOW/AliFittingQDistribution.cxx
PWG2/FLOW/AliFittingQDistribution.h

index fe59cbb..fe3083a 100644 (file)
@@ -312,6 +312,9 @@ void AliAnalysisTaskFittingQDistribution::Terminate(Option_t *)
   //final results (integrated flow)
   TH1D *intFlowResults = dynamic_cast<TH1D*>(fListHistos->FindObject("fIntFlowResultsFQD")); 
   
+  //sigma^2
+  TH1D *sigma2 = dynamic_cast<TH1D*>(fListHistos->FindObject("fSigma2")); 
+  
   //common histograms to store the final results for the integrated flow
   AliFlowCommonHistResults *commonHistRes = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResultsFQD"));
  
@@ -325,7 +328,8 @@ void AliAnalysisTaskFittingQDistribution::Terminate(Option_t *)
   
   fFQDA = new AliFittingQDistribution();
   
-  fFQDA->SetIntFlowResults(intFlowResults); 
+  fFQDA->SetIntFlowResults(intFlowResults);
+  fFQDA->SetSigma2(sigma2); 
   fFQDA->SetCommonHistsResults(commonHistRes); 
   
   fFQDA->SetAverageMultiplicity(AvMult);
index 88f55c1..342a675 100644 (file)
@@ -54,6 +54,7 @@ AliFittingFunctionsForQDistribution::AliFittingFunctionsForQDistribution():
  fAvMultFQD(NULL),
  fQDistributionFQD(NULL), 
  fIntFlowResFQD(NULL),
+ fSigma2(NULL),
  fchrFQD(NULL)
 {
  //default constructor 
@@ -64,10 +65,11 @@ AliFittingFunctionsForQDistribution::~AliFittingFunctionsForQDistribution()
  //destructor
 }
 
-AliFittingFunctionsForQDistribution::AliFittingFunctionsForQDistribution(TProfile *AvMult, TH1D *QDistribution, TH1D *intFlowRes, AliFlowCommonHistResults *chr):
+AliFittingFunctionsForQDistribution::AliFittingFunctionsForQDistribution(TProfile *AvMult, TH1D *QDistribution, TH1D *intFlowRes, TH1D *sigma2, AliFlowCommonHistResults *chr):
  fAvMultFQD(AvMult),
  fQDistributionFQD(QDistribution),
  fIntFlowResFQD(intFlowRes),
+ fSigma2(sigma2),
  fchrFQD(chr)
 {
  //custom constructor 
@@ -127,6 +129,8 @@ void AliFittingFunctionsForQDistribution::Calculate()
  cout<<"************************************"<<endl;
  fIntFlowResFQD->SetBinContent(1,v);
  fIntFlowResFQD->SetBinError(1,errorv);
+ fSigma2->SetBinContent(1,sigma2);
+ fSigma2->SetBinError(1,errorsigma2);
  //common histograms:
  fchrFQD->FillIntegratedFlow(v,errorv);
  fchrFQD->FillChi(v*pow(AvM,0.5));
index 9c17a83..fbfae24 100644 (file)
@@ -33,7 +33,7 @@ class AliFittingFunctionsForQDistribution{
  public:
   AliFittingFunctionsForQDistribution();
   virtual ~AliFittingFunctionsForQDistribution();
-  AliFittingFunctionsForQDistribution(TProfile *AvMult, TH1D *QDistribution, TH1D *intFlowRes, AliFlowCommonHistResults *chr);
+  AliFittingFunctionsForQDistribution(TProfile *AvMult, TH1D *QDistribution, TH1D *intFlowRes, TH1D *sigma2, AliFlowCommonHistResults *chr);
  
   void Calculate();
 
@@ -44,6 +44,7 @@ class AliFittingFunctionsForQDistribution{
   TProfile                 *fAvMultFQD;           //avarage selected multiplicity for int. flow
   TH1D                     *fQDistributionFQD;    //q-distribution
   TH1D                     *fIntFlowResFQD;       //integrated flow final result
+  TH1D                     *fSigma2;              //sigma^2
   AliFlowCommonHistResults *fchrFQD;              //final results for integrated flow stored in the common histograms
 
   ClassDef(AliFittingFunctionsForQDistribution, 0);
index e15c1ee..07e953b 100644 (file)
@@ -59,6 +59,7 @@ AliFittingQDistribution::AliFittingQDistribution():
  fHistList(NULL),
  fAvMultIntFlowFQD(NULL),
  fIntFlowResultsFQD(NULL),
+ fSigma2(NULL),
  fCommonHists(NULL),
  fCommonHistsResults(NULL),
  fQDistributionFQD(NULL)
@@ -95,10 +96,20 @@ void AliFittingQDistribution::CreateOutputObjects()
  fIntFlowResultsFQD->SetYTitle("");
  fIntFlowResultsFQD->SetMarkerStyle(25);
  fIntFlowResultsFQD->SetLabelSize(0.06);
- fAvMultIntFlowFQD->SetLabelOffset(0.02);
+ fIntFlowResultsFQD->SetLabelOffset(0.02);
  (fIntFlowResultsFQD->GetXaxis())->SetBinLabel(1,"v_{n}{FQD}");
  fHistList->Add(fIntFlowResultsFQD);
  
+ //sigma^2
+ fSigma2 = new TH1D("fSigma2","#sigma^{2}",1,0,1);
+ fSigma2->SetXTitle("");
+ fSigma2->SetYTitle("");
+ fSigma2->SetMarkerStyle(25);
+ fSigma2->SetLabelSize(0.06);
+ fSigma2->SetLabelOffset(0.02);
+ (fSigma2->GetXaxis())->SetBinLabel(1,"#sigma^{2}");
+ fHistList->Add(fSigma2);
  //q-distribution 
  fQDistributionFQD = new TH1D("fQDistributionFQD","q-distribution",100,0,10);
  fQDistributionFQD->SetXTitle("q_{n}=Q_{n}/#sqrt{M}");
@@ -151,7 +162,7 @@ void AliFittingQDistribution::Make(AliFlowEventSimple* anEvent)
 void AliFittingQDistribution::Finish()
 {
  //calculate the final results
- AliFittingFunctionsForQDistribution finalFitting(fAvMultIntFlowFQD,fQDistributionFQD,fIntFlowResultsFQD,fCommonHistsResults);
+ AliFittingFunctionsForQDistribution finalFitting(fAvMultIntFlowFQD,fQDistributionFQD,fIntFlowResultsFQD,fSigma2,fCommonHistsResults);
          
  finalFitting.Calculate();            
 }
index de4172c..5c0ab5a 100644 (file)
@@ -53,11 +53,14 @@ class AliFittingQDistribution{
   void SetCommonHistsResults(AliFlowCommonHistResults* chr)  {this->fCommonHistsResults = chr;};
   AliFlowCommonHistResults* GetCommonHistsResults() const    {return this->fCommonHistsResults;};
   
-  void SetAverageMultiplicity(TProfile* am)      {this->fAvMultIntFlowFQD = am;};
-  TProfile* GetAverageMultiplicity() const       {return this->fAvMultIntFlowFQD;};
+  void SetAverageMultiplicity(TProfile* am)  {this->fAvMultIntFlowFQD = am;};
+  TProfile* GetAverageMultiplicity() const   {return this->fAvMultIntFlowFQD;};
   
   void SetQDistribution(TH1D* qd)  {this->fQDistributionFQD = qd;};
   TH1D* GetQDistribution() const   {return this->fQDistributionFQD;};
+  
+  void SetSigma2(TH1D* s2)  {this->fSigma2 = s2;};
+  TH1D* GetSigma2() const   {return this->fSigma2;};
 //----------------------------------------------------------------------------------------------------------------
  
  private:
@@ -69,10 +72,11 @@ class AliFittingQDistribution{
   TList*                     fHistList;                //list to hold all output histograms
   TProfile*                  fAvMultIntFlowFQD;        //avarage selected multiplicity
   TH1D*                      fIntFlowResultsFQD;       //integrated flow final results
+  TH1D*                      fSigma2;                  //sigma^2
   AliFlowCommonHist*         fCommonHists;             //common control histograms
   AliFlowCommonHistResults*  fCommonHistsResults;      //final results for integrated flow stored in the common histograms 
-  TH1D*                      fQDistributionFQD;        //q-distribution
-      
+  TH1D*                      fQDistributionFQD;        //q-distribution 
+         
   ClassDef(AliFittingQDistribution, 0);
 };