author snelling Mon, 23 Feb 2009 22:15:09 +0000 (22:15 +0000) committer snelling Mon, 23 Feb 2009 22:15:09 +0000 (22:15 +0000)

@@ -366,7 +366,7 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() {
}
Double_t dRelErrcomb = TMath::Sqrt(dRelErr2comb);
Double_t dVErr = dV*dRelErrcomb ;
-    fCommonHistsRes->FillIntegratedFlowRP(dV, dVErr);
+    fCommonHistsRes->FillIntegratedFlow(dV, dVErr);

cout<<"*************************************"<<endl;
cout<<"*************************************"<<endl;
@@ -374,7 +374,7 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() {
cout<<"  Lee-Yang Zeroes Event Plane        "<<endl;
cout<<endl;
cout<<"dChi = "<<dChi<<endl;
-    cout<<"dV(RP) = "<<dV<<" +- "<<dVErr<<endl;
+    cout<<"dV = "<<dV<<" +- "<<dVErr<<endl;
cout<<endl;

}
@@ -443,6 +443,11 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() {
} //loop over bins b

//v as a function of Pt for RP selection
+  TH1F* fHistPtInt = fCommonHists->GetHistPtInt(); //for calculating integrated flow
+  Double_t dVRP = 0.;
+  Double_t dSum = 0.;
+  Double_t dErrV =0.;
+
for(Int_t b=0;b<iNbinsPt;b++) {
Double_t dv2pro  = fHistProVPtRP->GetBinContent(b);
Double_t dNprime = fCommonHists->GetEntriesInPtBinRP(b);
@@ -471,14 +476,33 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() {
else {dErrdifcomb = 0.;}

//fill TH1D
-    fCommonHistsRes->FillDifferentialFlowPtRP(b, dv2pro, dErrdifcomb);
+    fCommonHistsRes->FillDifferentialFlowPtRP(b, dv2pro, dErrdifcomb);
+    //calculate integrated flow for RP selection
+    if (fHistPtInt){
+      Double_t dYieldPt = fHistPtInt->GetBinContent(b);
+      dVRP += dv2pro*dYieldPt;
+      dSum +=dYieldPt;
+      dErrV += dYieldPt*dYieldPt*dErrdifcomb*dErrdifcomb;
+    } else { cout<<"fHistPtDiff is NULL"<<endl; }
} //loop over bins b
+
+  if (dSum != 0.) {
+    dVRP /= dSum; //the pt distribution should be normalised
+    dErrV /= (dSum*dSum);
+    dErrV = TMath::Sqrt(dErrV);
+  }
+  fCommonHistsRes->FillIntegratedFlowRP(dVRP,dErrV);
+
+  cout<<"dV(RP) = "<<dVRP<<" +- "<<dErrV<<endl;
+  //cout<<endl;
+

//v as a function of Pt for POI selection
TH1F* fHistPtDiff = fCommonHists->GetHistPtDiff(); //for calculating integrated flow
Double_t dVPOI = 0.;
-  Double_t dSum = 0.;
-  Double_t dErrV =0.;
+  dSum = 0.;
+  dErrV =0.;

for(Int_t b=0;b<iNbinsPt;b++) {
Double_t dv2pro = fHistProVPtPOI->GetBinContent(b);
index 7e8c0c9cb710e6d1c787c39b08ea038461db916b..fec555c64e2538acdbc7d0d12608cbbd2c650fe8 100644 (file)
@@ -241,12 +241,12 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Init()
for (Int_t theta=0;theta<iNtheta;theta++)  {
TString nameRP = "AliFlowLYZHist2RP_";
nameRP += theta;
-      fHist2RP[theta]=new AliFlowLYZHist2(theta,nameRP);
+      fHist2RP[theta]=new AliFlowLYZHist2(theta, "RP", nameRP);

TString namePOI = "AliFlowLYZHist2POI_";
namePOI += theta;
-      fHist2POI[theta]=new AliFlowLYZHist2(theta,namePOI);
+      fHist2POI[theta]=new AliFlowLYZHist2(theta, "POI", namePOI);
}

@@ -363,7 +363,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
cout<<"      Integrated flow from           "<<endl;
cout<<"        Lee-Yang Zeroes              "<<endl;
cout<<endl;
-      cout<<"dV(RP) = "<<dV<<" and chi = "<<dChi<<endl;
+      cout<<"Chi = "<<dChi<<endl;
cout<<endl;
}

@@ -390,11 +390,11 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
//copy content of profile into TH1D and add error
Double_t dv2pro = dV;   //in the case that fv is equal to fV
Double_t dv2Err = dv2pro*dRelErrcomb ;
-    cout<<"dV(RP) = "<<dv2pro<<" +- "<<dv2Err<<endl;
+    cout<<"dV = "<<dv2pro<<" +- "<<dv2Err<<endl;
cout<<endl;
cout<<"*************************************"<<endl;
cout<<"*************************************"<<endl;
-    fCommonHistsRes->FillIntegratedFlowRP(dv2pro, dv2Err);
+    fCommonHistsRes->FillIntegratedFlow(dv2pro, dv2Err);

if (fDebug) cout<<"****histograms filled****"<<endl;
@@ -570,14 +570,16 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
}
Double_t dRelErrcomb = TMath::Sqrt(dRelErr2comb);
Double_t dVErr = dV*dRelErrcomb ;
-      fCommonHistsRes->FillIntegratedFlowRP(dV,dVErr);
+      fCommonHistsRes->FillIntegratedFlow(dV,dVErr);

cout<<"*************************************"<<endl;
cout<<"*************************************"<<endl;
cout<<"      Integrated flow from           "<<endl;
cout<<"        Lee-Yang Zeroes              "<<endl;
cout<<endl;
-      cout<<"dV(RP) = "<<dV<<" +- "<<dVErr<<" and chi = "<<dChi<<endl;
+      cout<<"Chi = "<<dChi<<endl;
+      cout<<"dV = "<<dV<<" +- "<<dVErr<<endl;
+      cout<<endl;
}

//copy content of profile into TH1D and add error and fill the AliFlowCommonHistResults
@@ -646,6 +648,10 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)

//v as a function of Pt for RP selection
+    TH1F* fHistPtInt = fCommonHists->GetHistPtInt(); //for calculating integrated flow
+    Double_t dVRP = 0.;
+    Double_t dSum = 0.;
+    Double_t dErrV =0.;
for(Int_t b=0;b<iNbinsPt;b++) {
Double_t dv2pro  = fHistProVPtRP->GetBinContent(b);
Double_t dNprime = fCommonHists->GetEntriesInPtBinRP(b);
@@ -675,13 +681,30 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)

//fill TH1D
fCommonHistsRes->FillDifferentialFlowPtRP(b, dv2pro, dErrdifcomb);
+      //calculate integrated flow for RP selection
+      if (fHistPtInt){
+       Double_t dYieldPt = fHistPtInt->GetBinContent(b);
+       dVRP += dv2pro*dYieldPt;
+       dSum +=dYieldPt;
+       dErrV += dYieldPt*dYieldPt*dErrdifcomb*dErrdifcomb;
+      } else { cout<<"fHistPtInt is NULL"<<endl; }
} //loop over bins b
-
+
+    if (dSum != 0.) {
+      dVRP /= dSum; //the pt distribution should be normalised
+      dErrV /= (dSum*dSum);
+      dErrV = TMath::Sqrt(dErrV);
+    }
+    cout<<"dV(RP) = "<<dVRP<<" +- "<<dErrV<<endl;
+    //cout<<endl;
+    fCommonHistsRes->FillIntegratedFlowRP(dVRP,dErrV);
+
+
//v as a function of Pt for POI selection
TH1F* fHistPtDiff = fCommonHists->GetHistPtDiff(); //for calculating integrated flow
Double_t dVPOI = 0.;
-    Double_t dSum = 0.;
-    Double_t dErrV =0.;
+    dSum = 0.;
+    dErrV =0.;

for(Int_t b=0;b<iNbinsPt;b++) {
Double_t dv2pro = fHistProVPtPOI->GetBinContent(b);
@@ -726,7 +749,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
dErrV /= (dSum*dSum);
dErrV = TMath::Sqrt(dErrV);
}
-    cout<<"dV(POI) is "<<dVPOI<<" +- "<<dErrV<<endl;
+    cout<<"dV(POI) = "<<dVPOI<<" +- "<<dErrV<<endl;
cout<<endl;
cout<<"*************************************"<<endl;
cout<<"*************************************"<<endl;
index 0e32fba7a1613483bc8b33e67a9de22938ed1d7b..e6607dc7008dfc977b819d70d4e8c7e47a666e04 100644 (file)
@@ -54,7 +54,7 @@ ClassImp(AliFlowLYZHist2)

//-----------------------------------------------------------------------

-  AliFlowLYZHist2::AliFlowLYZHist2(Int_t theta, const char *anInput,const char *aTitle):
+  AliFlowLYZHist2::AliFlowLYZHist2(Int_t theta, const char* aSelection, const char *anInput,const char *aTitle):
TNamed(anInput,aTitle),
fHistProReNumer(0),
fHistProImNumer(0),
@@ -78,10 +78,9 @@ ClassImp(AliFlowLYZHist2)
//fHistProReNumer
name = "Second_FlowPro_ReNumer";
name +=theta;
+  name +=aSelection;
name +="_LYZ";
-  title = "Second_FlowPro_ReNumer";
-  title +=theta;
-  title +="_LYZ";
+  title = name;
fHistProReNumer = new TProfile(name.Data(),title.Data(),iNbinsEta,dEtaMin,dEtaMax);
fHistProReNumer->SetXTitle("eta");
fHistProReNumer->SetYTitle("v (%)");
@@ -89,10 +88,9 @@ ClassImp(AliFlowLYZHist2)
//fHistProImNumer
name = "Second_FlowPro_ImNumer";
name +=theta;
+  name +=aSelection;
name +="_LYZ";
-  title = "Second_FlowPro_ImNumer";
-  title +=theta;
-  title +="_LYZ";
+  title = name;
fHistProImNumer = new TProfile(name.Data(),title.Data(),iNbinsEta,dEtaMin,dEtaMax);
fHistProImNumer->SetXTitle("eta");
fHistProImNumer->SetYTitle("v (%)");
@@ -100,10 +98,9 @@ ClassImp(AliFlowLYZHist2)
//fHistProReNumerPt
name = "Second_FlowPro_ReNumerPt";
name +=theta;
+  name +=aSelection;
name +="_LYZ";
-  title = "Second_FlowPro_ReNumerPt";
-  title +=theta;
-  title +="_LYZ";
+  title = name;
fHistProReNumerPt = new TProfile(name.Data(),title.Data(),iNbinsPt,dPtMin,dPtMax);
fHistProReNumerPt->SetXTitle("Pt");
fHistProReNumerPt->SetYTitle("v (%)");
@@ -111,10 +108,9 @@ ClassImp(AliFlowLYZHist2)
//fHistProImNumerPt
name = "Second_FlowPro_ImNumerPt";
name +=theta;
+  name +=aSelection;
name +="_LYZ";
-  title = "Second_FlowPro_ImNumerPt";
-  title +=theta;
-  title +="_LYZ";
+  title = name;
fHistProImNumerPt = new TProfile(name.Data(),title.Data(),iNbinsPt,dPtMin,dPtMax);
fHistProImNumerPt->SetXTitle("Pt");
fHistProImNumerPt->SetYTitle("v (%)");
@@ -122,10 +118,9 @@ ClassImp(AliFlowLYZHist2)
//fHistProReNumer2D
name = "Second_FlowPro_ReNumer2D";
name +=theta;
+  name +=aSelection;
name +="_LYZ";
-  title = "Second_FlowPro_ReNumer2D";
-  title +=theta;
-  title +="_LYZ";
+  title = name;
fHistProReNumer2D = new TProfile2D(name.Data(),title.Data(),iNbinsEta,dEtaMin,dEtaMax,iNbinsPt,dPtMin,dPtMax);
fHistProReNumer2D->SetXTitle("eta");
fHistProReNumer2D->SetYTitle("Pt (GeV/c)");
@@ -133,10 +128,9 @@ ClassImp(AliFlowLYZHist2)
//fHistProImNumer2D
name = "Second_FlowPro_ImNumer2D";
name +=theta;
+  name +=aSelection;
name +="_LYZ";
-  title = "Second_FlowPro_ImNumer2D";
-  title +=theta;
-  title +="_LYZ";
+  title = name;
fHistProImNumer2D = new TProfile2D(name.Data(),title.Data(),iNbinsEta,dEtaMin,dEtaMax,iNbinsPt,dPtMin,dPtMax);
fHistProImNumer2D->SetXTitle("eta");
fHistProImNumer2D->SetYTitle("Pt (GeV/c)");
index c032c6f6a903ca43659acebb14a010008b67a393..12fb3ed477b83c2c6719b7619668b6d7e919db2f 100644 (file)
@@ -25,7 +25,7 @@ class AliFlowLYZHist2: public TNamed  {
public:

AliFlowLYZHist2();                                //default constructor
-  AliFlowLYZHist2(Int_t theta, const char *name = "AliFlowLYZHist2" ,const char *title = "AliFlowLYZHist2");                     //constructor
+  AliFlowLYZHist2(Int_t theta, const char *selection = "POI", const char *name = "AliFlowLYZHist2" ,const char *title = "AliFlowLYZHist2");                     //constructor
virtual  ~AliFlowLYZHist2();                      //destructor

Bool_t  IsFolder() const {return kTRUE;};
index 7fb3dae9019b4a97389bcc7fd795d2c4416d1ca6..4cd1223364412dae11499a7c08d192b494feb124 100644 (file)
@@ -345,10 +345,10 @@ void AliAnalysisTaskLYZEventPlane::Terminate(Option_t *)
cout<<"WARNING: Histograms needed to run Finish() are not accessable!"<<endl;
}

-    fListHistos->Print();
+    //fListHistos->Print();
} else { cout << "histogram list pointer is empty" << endl;}

-  cout<<".....finished LYZ EventPlane"<<endl;
+  //cout<<".....finished LYZ EventPlane"<<endl;
}