errorRelated->SetName("error");
errorRelated->SetOwner();
- TList *QARelated = new TList();
- QARelated->SetName("QA");
- QARelated->SetOwner();
+ TList *tQARelated = new TList();
+ tQARelated->SetName("QA");
+ tQARelated->SetOwner();
fCommonHists = new AliFlowCommonHist("AliFlowCommonHist_SP");
(fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); // store harmonic
fHistProQNorm = new TProfile("FlowPro_QNorm_SP","FlowPro_QNorm_SP", 1,0.5,1.5,"s");
fHistProQNorm->SetYTitle("<|Qa+Qb|>");
- QARelated->Add(fHistProQNorm);
+ tQARelated->Add(fHistProQNorm);
fHistProQaQb = new TProfile("FlowPro_QaQb_SP","FlowPro_QaQb_SP", 1,0.5,1.5,"s");
fHistProQaQb->SetYTitle("<QaQb>");
- QARelated->Add(fHistProQaQb);
+ tQARelated->Add(fHistProQaQb);
fHistProQaQbM = new TProfile("FlowPro_QaQbvsM_SP","FlowPro_QaQbvsM_SP",1000,0.0,10000);
fHistProQaQbM->SetYTitle("<QaQb>");
fHistProQaQbM->SetXTitle("M");
fHistProQaQbM->Sumw2();
- QARelated->Add(fHistProQaQbM);
+ tQARelated->Add(fHistProQaQbM);
fHistMaMb = new TH2D("Flow_MavsMb_SP","Flow_MavsMb_SP",100,0.,100.,100,0.,100.);
fHistMaMb->SetYTitle("Ma");
fHistMaMb->SetXTitle("Mb");
- QARelated->Add(fHistMaMb);
+ tQARelated->Add(fHistMaMb);
fHistQNormQaQbNorm = new TH2D("Flow_QNormvsQaQbNorm_SP","Flow_QNormvsQaQbNorm_SP",88,-1.1,1.1,22,0.,1.1);
fHistQNormQaQbNorm->SetYTitle("|Q/Mq|");
fHistQNormQaQbNorm->SetXTitle("QaQb/MaMb");
- QARelated->Add(fHistQNormQaQbNorm);
+ tQARelated->Add(fHistQNormQaQbNorm);
fHistQaNormMa = new TH2D("Flow_QaNormvsMa_SP","Flow_QaNormvsMa_SP",100,0.,100.,22,0.,1.1);
fHistQaNormMa->SetYTitle("|Qa/Ma|");
fHistQaNormMa->SetXTitle("Ma");
- QARelated->Add(fHistQaNormMa);
+ tQARelated->Add(fHistQaNormMa);
fHistQbNormMb = new TH2D("Flow_QbNormvsMb_SP","Flow_QbNormvsMb_SP",100,0.,100.,22,0.,1.1);
fHistQbNormMb->SetYTitle("|Qb/Mb|");
fHistQbNormMb->SetXTitle("Mb");
- QARelated->Add(fHistQbNormMb);
+ tQARelated->Add(fHistQbNormMb);
fResolution = new TH1D("Flow_resolution_SP","Flow_resolution_SP",100,-1.0,1.0);
fResolution->SetYTitle("dN/d(Cos2(#phi_a - #phi_b))");
fResolution->SetXTitle("Cos2(#phi_a - #phi_b)");
- QARelated->Add(fResolution);
+ tQARelated->Add(fResolution);
fHistQaQb = new TH1D("Flow_QaQb_SP","Flow_QaQb_SP",200,-100.,100.);
fHistQaQb->SetYTitle("dN/dQaQb");
fHistQaQb->SetXTitle("dQaQb");
- QARelated->Add(fHistQaQb);
+ tQARelated->Add(fHistQaQb);
fHistQaQbCos = new TH1D("Flow_QaQbCos_SP","Flow_QaQbCos_SP",63,0.,TMath::Pi());
fHistQaQbCos->SetYTitle("dN/d#phi");
fHistQaQbCos->SetXTitle("#phi");
- QARelated->Add(fHistQaQbCos);
+ tQARelated->Add(fHistQaQbCos);
fHistList->Add(uQRelated);
fHistList->Add(nuaRelated);
fHistList->Add(errorRelated);
- fHistList->Add(QARelated);
+ fHistList->Add(tQARelated);
TH1::AddDirectory(oldHistAddStatus);
}
printf("AliFlowAnalysisWithScalarProduct::Finish()\n");
// access harmonic:
- if(fCommonHists->GetHarmonic())
- fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1);
+ fApplyCorrectionForNUA = fHistProConfig->GetBinContent(1);
+ fNormalizationType = fHistProConfig->GetBinContent(2);
+ fHarmonic = fHistProConfig->GetBinContent(4);
printf("*************************************\n");
printf("*************************************\n");
printf("fTotalQvector %d \n",fTotalQvector);
if(!fNormalizationType) {
if(fTotalQvector>2) {
- dV = computeResolution( TMath::Sqrt2()*findXi(dV,1e-6) );
+ dV = ComputeResolution( TMath::Sqrt2()*FindXi(dV,1e-6) );
printf("An estimate of the event plane resolution is: %f\n", dV );
}
}
}
//-----------------------------------------------------------------------
-void AliFlowAnalysisWithScalarProduct::WriteHistograms(TDirectoryFile *outputFileName)
-{
+void AliFlowAnalysisWithScalarProduct::WriteHistograms(TDirectoryFile *outputFileName) const {
//store the final results in output .root file
outputFileName->Add(fHistList);
outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
}
//--------------------------------------------------------------------
-Double_t AliFlowAnalysisWithScalarProduct::CalculateStatisticalError(Int_t iRFPorPOI, Int_t iPTorETA, Int_t b, Double_t aStatErrorQaQb) {
+Double_t AliFlowAnalysisWithScalarProduct::CalculateStatisticalError(Int_t iRFPorPOI, Int_t iPTorETA, Int_t b, Double_t aStatErrorQaQb) const {
//calculate the statistical error for differential flow for bin b
Double_t duQproSpread = fHistProUQ[iRFPorPOI][iPTorETA]->GetBinError(b);
Double_t sumOfMq = fHistSumOfWeightsu[iRFPorPOI][iPTorETA][0]->GetBinContent(b);
return dv2ProErr;
}
-Double_t AliFlowAnalysisWithScalarProduct::computeResolution( Double_t x ) {
+Double_t AliFlowAnalysisWithScalarProduct::ComputeResolution( Double_t x ) const {
+ // Computes resolution for Event Plane method
if(x > 51.3) {
printf("Warning: Estimation of total resolution might be WRONG. Please check!");
return 0.99981;
return TMath::Sqrt(TMath::PiOver2())/2*x*b;
}
-Double_t AliFlowAnalysisWithScalarProduct::findXi( Double_t res, Double_t prec ) {
+Double_t AliFlowAnalysisWithScalarProduct::FindXi( Double_t res, Double_t prec ) const {
+ // Computes x(res) for Event Plane method
if(res > 0.99981) {
printf("Warning: Resolution for subEvent is high. You reached the precision limit.");
return 51.3;
Double_t xtmp=0, xmin=0, xmax=51.3, rtmp=0, delta=2*prec;
while( delta > prec ) {
xtmp = 0.5*(xmin+xmax);
- rtmp = computeResolution(xtmp);
+ rtmp = ComputeResolution(xtmp);
delta = TMath::Abs( res-rtmp );
if(rtmp>res) xmax = xtmp;
if(rtmp<res) xmin = xtmp;
void Make(AliFlowEventSimple* anEvent); //Main routine
void GetOutputHistograms(TList *outputListHistos); //Copy output objects from TList
void Finish(); //Fill results
- void WriteHistograms(TDirectoryFile *outputFileName); //writes histograms locally (for OnTheFly)
+ void WriteHistograms(TDirectoryFile *outputFileName) const; //writes histograms locally (for OnTheFly)
void SetHarmonic(Int_t iHarmonic) { fHarmonic = iHarmonic; }
void SetUsePhiWeights(Bool_t bVal) { fUsePhiWeights = bVal; }
void SetWeightsList(TList* const aWeightsList) { fWeightsList = (TList*)aWeightsList->Clone(); }
- TList* GetHistList() { return fHistList; }
- TProfile* GetHistProConfig() { return fHistProConfig; }
- TProfile* GetHistProUQ(Int_t iRFPorPOI, Int_t iPTorETA) { return fHistProUQ[iRFPorPOI][iPTorETA]; }
- TProfile* GetHistProQaQbNorm() { return fHistProQaQbNorm; }
- TProfile* GetHistProNUAq() { return fHistProNUAq; }
- TProfile* GetHistProNUAu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iIMorRE) { return fHistProNUAu[iRFPorPOI][iPTorETA][iIMorRE]; }
- TH1D* GetHistSumOfWeights() { return fHistSumOfWeights; }
- TProfile* GetHistProUQQaQb( Int_t iRFPorPOI, Int_t iPTorETA ) { return fHistProUQQaQb[iRFPorPOI][iPTorETA]; }
- TH1D* GetHistSumOfWeightsu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iWeight) { return fHistSumOfWeightsu[iRFPorPOI][iPTorETA][iWeight]; }
- AliFlowCommonHist* GetCommonHists() { return fCommonHists; }
- AliFlowCommonHistResults* GetCommonHistsRes() { return fCommonHistsRes; }
+ TList* GetHistList() const { return fHistList; }
+ TProfile* GetHistProConfig() const { return fHistProConfig; }
+ TProfile* GetHistProUQ(Int_t iRFPorPOI, Int_t iPTorETA) const { return fHistProUQ[iRFPorPOI][iPTorETA]; }
+ TProfile* GetHistProQaQbNorm() const { return fHistProQaQbNorm; }
+ TProfile* GetHistProNUAq() const { return fHistProNUAq; }
+ TProfile* GetHistProNUAu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iIMorRE) const { return fHistProNUAu[iRFPorPOI][iPTorETA][iIMorRE]; }
+ TH1D* GetHistSumOfWeights() const { return fHistSumOfWeights; }
+ TProfile* GetHistProUQQaQb( Int_t iRFPorPOI, Int_t iPTorETA ) const { return fHistProUQQaQb[iRFPorPOI][iPTorETA]; }
+ TH1D* GetHistSumOfWeightsu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iWeight) const { return fHistSumOfWeightsu[iRFPorPOI][iPTorETA][iWeight]; }
+ AliFlowCommonHist* GetCommonHists() const { return fCommonHists; }
+ AliFlowCommonHistResults* GetCommonHistsRes() const { return fCommonHistsRes; }
private:
AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& anAnalysis); //copy constructor
AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& anAnalysis); //assignment operator
- Double_t CalculateStatisticalError( Int_t RFPorPOI, Int_t PTorETA, Int_t bin, Double_t errV );
- Double_t computeResolution( Double_t x );
- Double_t findXi( Double_t res, Double_t prec );
+ Double_t CalculateStatisticalError( Int_t RFPorPOI, Int_t PTorETA, Int_t bin, Double_t errV ) const;
+ Double_t ComputeResolution( Double_t x ) const;
+ Double_t FindXi( Double_t res, Double_t prec ) const;
Int_t fDebug ; // flag for analysis: more print statements
* See cxx source for full Copyright notice */
/* $Id: $ */
-#ifndef AliFlowCandidateTrack_H
-#define AliFlowCandidateTrack_H
+#ifndef ALIFLOWCANDIDATETRACK_H
+#define ALIFLOWCANDIDATETRACK_H
#include "AliFlowTrack.h"
////////////////////////////////////////////////////
class AliFlowCandidateTrack : public AliFlowTrack {
- protected:
- Double_t fMass; // mass
- Int_t fNDaughters; // number of daughters (5 max)
- Int_t fDaughter[5]; // fID of daughter, points back to ESD track
- AliFlowTrack *fTrack[5]; // pointer to daughter in FlowEvent
-
public:
AliFlowCandidateTrack();
AliFlowCandidateTrack(const AliFlowCandidateTrack& );
AliFlowCandidateTrack& operator=(const AliFlowCandidateTrack& );
~AliFlowCandidateTrack();
- Double_t Mass(void) { return fMass; }
+ Double_t Mass(void) const { return fMass; }
void SetMass(Double_t value) { fMass=value; }
- Int_t GetNDaughters(void) { return fNDaughters; }
- void AddDaughter(Int_t value) { if(fNDaughters<3) fDaughter[fNDaughters++]=value; }
- Int_t GetIDDaughter(Int_t value) { return fDaughter[value]; }
+ Int_t GetNDaughters(void) const { return fNDaughters; }
+ void AddDaughter(Int_t value) { if(fNDaughters<3) fDaughter[fNDaughters++]=value; }
+ Int_t GetIDDaughter(Int_t value) const { return fDaughter[value]; }
void SetDaughter(Int_t value, AliFlowTrack *track) { fTrack[value]=track; }
- AliFlowTrack *GetDaughter(Int_t value) { return fTrack[value]; }
+ AliFlowTrack *GetDaughter(Int_t value) const { return fTrack[value]; }
+ protected:
+ Double_t fMass; // mass
+ Int_t fNDaughters; // number of daughters (5 max)
+ Int_t fDaughter[5]; // fID of daughter, points back to ESD track
+ AliFlowTrack *fTrack[5]; // pointer to daughter in FlowEvent
+
ClassDef(AliFlowCandidateTrack, 1);
};