From a93de0f096aaf09dc710f47d00e1d4f362d8a5e6 Mon Sep 17 00:00:00 2001 From: snelling Date: Mon, 26 Jul 2010 15:28:54 +0000 Subject: [PATCH] AliFlowCommonHist class: removed hist fHistMultOrig which was not useful, added hists of the angle of the Q vectors. AliFlowAnalysisWithLeeYangZeros.cxx and AliFlowAnalysisWithLYZEventPlane.cxx: reading the number of events from fHistQ in stead of fHistMultOrig. AliFlowAnalysisWithScalarProduct class: Extra cout in Finish() and some cosmetics. --- .../AliFlowAnalysisWithLYZEventPlane.cxx | 2 +- .../AliFlowAnalysisWithLeeYangZeros.cxx | 2 +- .../AliFlowAnalysisWithScalarProduct.cxx | 147 +++++++++--------- .../AliFlowAnalysisWithScalarProduct.h | 48 +++--- PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.cxx | 84 +++++----- PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.h | 10 +- 6 files changed, 156 insertions(+), 137 deletions(-) diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx index d5778392f54..5349b5d96e5 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx @@ -377,7 +377,7 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() { Int_t iNbinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); //set the event number if (fCommonHists) { - SetEventNumber((int)fCommonHists->GetHistMultOrig()->GetEntries()); + SetEventNumber((int)fCommonHists->GetHistQ()->GetEntries()); //cout<<"number of events processed is "<GetNtheta(); //set the event number - SetEventNumber((int)fCommonHists->GetHistMultOrig()->GetEntries()); + SetEventNumber((int)fCommonHists->GetHistQ()->GetEntries()); //cout<<"number of events processed is "< 0. && dMb > 0.) { - //request that the subevent multiplicities are not too different Double_t dRelDiff = TMath::Abs((dMa - dMb)/(dMa + dMb)); if (dRelDiff < fRelDiffMsub) { @@ -413,14 +412,16 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) { //get total Q vector = the sum of subevent a and subevent b AliFlowVector vQ = vQa + vQb; + //needed to correct for non-uniform acceptance: - if(dMa+dMb>0.) - { - fHistProNonIsotropicTermsQ->Fill(1.,vQ.Y()/(dMa+dMb),dMa+dMb); - fHistProNonIsotropicTermsQ->Fill(2.,vQ.X()/(dMa+dMb),dMa+dMb); + if(dMa+dMb > 0.) { + fHistProNonIsotropicTermsQ->Fill(1.,vQ.Y()/(dMa+dMb),dMa+dMb); + fHistProNonIsotropicTermsQ->Fill(2.,vQ.X()/(dMa+dMb),dMa+dMb); } + //weight the Q vectors for the subevents by the multiplicity - //Note: Weight Q only in the particle loop when it is clear if it should be (m-1) or M + //Note: Weight Q only in the particle loop when it is clear + //if it should be (m-1) or M Double_t dQXa = vQa.X()/dMa; Double_t dQYa = vQa.Y()/dMa; vQa.Set(dQXa,dQYa); @@ -435,12 +436,12 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) { //needed for the error calculation: fHistSumOfLinearWeights -> Fill(0.,dMa*dMb); fHistSumOfQuadraticWeights -> Fill(0.,pow(dMa*dMb,2.)); - //needed for correcting non-uniform acceptance: - fHistProQaQbReImNorm->Fill(1.,dQYa,dMa); // to get <> - fHistProQaQbReImNorm->Fill(2.,dQXa,dMa); // to get <> - fHistProQaQbReImNorm->Fill(3.,dQYb,dMb); // to get <> - fHistProQaQbReImNorm->Fill(4.,dQXb,dMb); // to get <> - + //needed for correcting non-uniform acceptance: + fHistProQaQbReImNorm->Fill(1.,dQYa,dMa); // to get <> + fHistProQaQbReImNorm->Fill(2.,dQXa,dMa); // to get <> + fHistProQaQbReImNorm->Fill(3.,dQYb,dMb); // to get <> + fHistProQaQbReImNorm->Fill(4.,dQXb,dMb); // to get <> + //fill some SP control histograms fHistQaQbNorm ->Fill(vQa*vQb); fHistQaNorm ->Fill(vQa.Mod()); @@ -452,7 +453,7 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) { AliFlowTrackSimple* pTrack = NULL; Int_t iNumberOfTracks = anEvent->NumberOfTracks(); Double_t dMq = vQ.GetMult(); - + for (Int_t i=0;iGetTrack(i) ; @@ -480,7 +481,7 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) { Double_t dUY = TMath::Sin(2*dPhi); vU.Set(dUX,dUY); Double_t dModulus = vU.Mod(); - if (dModulus!=0.) vU.Set(dUX/dModulus,dUY/dModulus); // make length 1 + if (dModulus > 0.) vU.Set(dUX/dModulus,dUY/dModulus); // make length 1 else cerr<<"dModulus is zero!"<Pt(); Double_t dEta = pTrack->Eta(); + //fill the profile histograms if (pTrack->InRPSelection()) { fHistProUQetaRP -> Fill(dEta,dUQ,(dMq-1)); //Fill (Qu/(Mq-1)) with weight (Mq-1) @@ -546,6 +548,7 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) { Double_t dUQ = (vU * vQm); Double_t dPt = pTrack->Pt(); Double_t dEta = pTrack->Eta(); + //fill the profile histograms if (pTrack->InRPSelection()) { fHistProUQetaRP -> Fill(dEta,dUQ,dMq); //Fill (Qu/Mq) with weight Mq @@ -633,27 +636,25 @@ void AliFlowAnalysisWithScalarProduct::GetOutputHistograms(TList *outputListHist TH1D* pHistSumOfWeightsPtRP[3] = {NULL}; TH1D* pHistSumOfWeightsEtaRP[3] = {NULL}; TH1D* pHistSumOfWeightsPtPOI[3] = {NULL}; - TH1D* pHistSumOfWeightsEtaPOI[3] = {NULL}; - for(Int_t i=0;i<3;i++) - { - pHistSumOfWeightsPtRP[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sPtRP_SP",weightFlag[i].Data()))); - pHistSumOfWeightsEtaRP[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sEtaRP_SP",weightFlag[i].Data()))); - pHistSumOfWeightsPtPOI[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sPtPOI_SP",weightFlag[i].Data()))); - pHistSumOfWeightsEtaPOI[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sEtaPOI_SP",weightFlag[i].Data()))); - } + TH1D* pHistSumOfWeightsEtaPOI[3] = {NULL}; + + for(Int_t i=0;i<3;i++) { + pHistSumOfWeightsPtRP[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sPtRP_SP",weightFlag[i].Data()))); + pHistSumOfWeightsEtaRP[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sEtaRP_SP",weightFlag[i].Data()))); + pHistSumOfWeightsPtPOI[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sPtPOI_SP",weightFlag[i].Data()))); + pHistSumOfWeightsEtaPOI[i] = dynamic_cast(outputListHistos->FindObject(Form("Flow_SumOfWeights%sEtaPOI_SP",weightFlag[i].Data()))); + } + TString rpPoi[2] = {"RP","POI"}; TString ptEta[2] = {"Pt","Eta"}; TString sinCos[2] = {"sin","cos"}; TProfile *pHistProNonIsotropicTermsU[2][2][2] = {{{NULL}}}; - for(Int_t rp=0;rp<2;rp++) - { - for(Int_t pe=0;pe<2;pe++) - { - for(Int_t sc=0;sc<2;sc++) - { - pHistProNonIsotropicTermsU[rp][pe][sc] = dynamic_cast(outputListHistos->FindObject(Form("Flow_NonIsotropicTerms_%s_%s_%s_SP",rpPoi[rp].Data(),ptEta[pe].Data(),sinCos[sc].Data()))); - } - } + for(Int_t rp=0;rp<2;rp++) { + for(Int_t pe=0;pe<2;pe++) { + for(Int_t sc=0;sc<2;sc++) { + pHistProNonIsotropicTermsU[rp][pe][sc] = dynamic_cast(outputListHistos->FindObject(Form("Flow_NonIsotropicTerms_%s_%s_%s_SP",rpPoi[rp].Data(),ptEta[pe].Data(),sinCos[sc].Data()))); + } + } } TH1D* pHistQaQb = dynamic_cast(outputListHistos->FindObject("Flow_QaQb_SP")); @@ -668,7 +669,7 @@ void AliFlowAnalysisWithScalarProduct::GetOutputHistograms(TList *outputListHist //pass the pointers to the task if (pCommonHist && pCommonHistResults && pHistProQaQb && pHistProQaQbNorm && - pHistProQaQbReImNorm && pHistProNonIsotropicTermsQ && + pHistProQaQbReImNorm && pHistProNonIsotropicTermsQ && pHistSumOfLinearWeights && pHistSumOfQuadraticWeights && pHistQaQb && pHistQaQbNorm && pHistQaQbCos && pHistResolution && pHistQaNorm && pHistQaNormvsMa && pHistQbNorm && pHistQbNormvsMb && @@ -710,15 +711,14 @@ void AliFlowAnalysisWithScalarProduct::GetOutputHistograms(TList *outputListHist if(pHistSumOfWeightsPtPOI[i]) this -> SetHistSumOfWeightsPtPOI(pHistSumOfWeightsPtPOI[i],i); if(pHistSumOfWeightsEtaPOI[i]) this -> SetHistSumOfWeightsEtaPOI(pHistSumOfWeightsEtaPOI[i],i); } - for(Int_t rp=0;rp<2;rp++) - { - for(Int_t pe=0;pe<2;pe++) - { - for(Int_t sc=0;sc<2;sc++) - { - if(pHistProNonIsotropicTermsU[rp][pe][sc]) this->SetHistProNonIsotropicTermsU(pHistProNonIsotropicTermsU[rp][pe][sc],rp,pe,sc); - } - } + for(Int_t rp=0;rp<2;rp++) { + for(Int_t pe=0;pe<2;pe++) { + for(Int_t sc=0;sc<2;sc++) { + if(pHistProNonIsotropicTermsU[rp][pe][sc]) { + this->SetHistProNonIsotropicTermsU(pHistProNonIsotropicTermsU[rp][pe][sc],rp,pe,sc); + } + } + } } } else { @@ -758,6 +758,9 @@ void AliFlowAnalysisWithScalarProduct::Finish() { //---------------------------------- //weighted average over (QaQb/MaMb) with weight (MaMb) Double_t dQaQb = fHistProQaQbNorm->GetBinContent(1); + Double_t dSpreadQaQb = fHistProQaQbNorm->GetBinError(1); + Double_t dEntriesQaQb = fHistProQaQbNorm->GetEntries(); + //non-isotropic terms: Double_t dImQa = fHistProQaQbReImNorm->GetBinContent(1); Double_t dReQa = fHistProQaQbReImNorm->GetBinContent(2); @@ -769,6 +772,11 @@ void AliFlowAnalysisWithScalarProduct::Finish() { dQaQb = dQaQb - dImQa*dImQb - dReQa*dReQb; } + if (dEntriesQaQb > 0.) { + cout<<"QaQb = "<=0.) { @@ -778,7 +786,6 @@ void AliFlowAnalysisWithScalarProduct::Finish() { // statistical error = term1 * spread * term2: // term1 = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) // term2 = 1/sqrt(1-term1^2) - Double_t dSpreadQaQb = fHistProQaQbNorm->GetBinError(1); Double_t dSumOfLinearWeights = fHistSumOfLinearWeights->GetBinContent(1); Double_t dSumOfQuadraticWeights = fHistSumOfQuadraticWeights->GetBinContent(1); Double_t dTerm1 = 0.; @@ -796,18 +803,17 @@ void AliFlowAnalysisWithScalarProduct::Finish() { dVerr = (1./(2.*pow(dQaQb,0.5)))*dStatErrorQaQb; } fCommonHistsRes->FillIntegratedFlow(dV,dVerr); - cout<<"dV = "<GetBinContent(b); - if(fApplyCorrectionForNUA) - { - duQpro = duQpro - - fHistProNonIsotropicTermsU[0][1][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) - - fHistProNonIsotropicTermsU[0][1][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); + if(fApplyCorrectionForNUA) { + duQpro = duQpro + - fHistProNonIsotropicTermsU[0][1][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) + - fHistProNonIsotropicTermsU[0][1][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); } Double_t dv2pro = -999.; if (dV!=0.) { dv2pro = duQpro/dV; } @@ -821,11 +827,10 @@ void AliFlowAnalysisWithScalarProduct::Finish() { //v as a function of eta for POI selection for(Int_t b=1;bGetBinContent(b); - if(fApplyCorrectionForNUA) - { - duQpro = duQpro - - fHistProNonIsotropicTermsU[1][1][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) - - fHistProNonIsotropicTermsU[1][1][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); + if(fApplyCorrectionForNUA) { + duQpro = duQpro + - fHistProNonIsotropicTermsU[1][1][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) + - fHistProNonIsotropicTermsU[1][1][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); } Double_t dv2pro = -999.; if (dV!=0.) { dv2pro = duQpro/dV; } @@ -845,11 +850,10 @@ void AliFlowAnalysisWithScalarProduct::Finish() { for(Int_t b=1;bGetBinContent(b); - if(fApplyCorrectionForNUA) - { - duQpro = duQpro - - fHistProNonIsotropicTermsU[0][0][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) - - fHistProNonIsotropicTermsU[0][0][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); + if(fApplyCorrectionForNUA) { + duQpro = duQpro + - fHistProNonIsotropicTermsU[0][0][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) + - fHistProNonIsotropicTermsU[0][0][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); } Double_t dv2pro = -999.; if (dV!=0.) { dv2pro = duQpro/dV; } @@ -874,7 +878,7 @@ void AliFlowAnalysisWithScalarProduct::Finish() { dErrVRP = TMath::Sqrt(dErrVRP); } fCommonHistsRes->FillIntegratedFlowRP(dVRP,dErrVRP); - cout<<"dV(RP) = "<GetBinContent(b); - if(fApplyCorrectionForNUA) - { - duQpro = duQpro - - fHistProNonIsotropicTermsU[1][0][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) - - fHistProNonIsotropicTermsU[1][0][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); + if(fApplyCorrectionForNUA) { + duQpro = duQpro + - fHistProNonIsotropicTermsU[1][0][1]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(2) + - fHistProNonIsotropicTermsU[1][0][0]->GetBinContent(b)*fHistProNonIsotropicTermsQ->GetBinContent(1); } Double_t dv2pro = -999.; if (dV!=0.) { dv2pro = duQpro/dV; } @@ -908,13 +911,13 @@ void AliFlowAnalysisWithScalarProduct::Finish() { } else { cout<<"fHistPtPOI is NULL"< 0.) { dVPOI /= dSumPOI; //the pt distribution should be normalised dErrVPOI /= (dSumPOI*dSumPOI); dErrVPOI = TMath::Sqrt(dErrVPOI); } fCommonHistsRes->FillIntegratedFlowPOI(dVPOI,dErrVPOI); - cout<<"dV(POI) = "<fDebug = kt ; } Bool_t GetDebug() const { return this->fDebug ; } + virtual void StoreFlags(); //store all booleans needed in Finish() + virtual void AccessFlags(); //access all booleans needed in Finish() void SetRelDiffMsub(Double_t diff) { this->fRelDiffMsub = diff; } Double_t GetRelDiffMsub() const { return this->fRelDiffMsub; } @@ -65,8 +65,8 @@ class AliFlowAnalysisWithScalarProduct { Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;} // correction for non-uniforma acceptance: - void SetApplyCorrectionForNUA(Bool_t const acfNUA) {this->fApplyCorrectionForNUA = acfNUA;} - Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;} + void SetApplyCorrectionForNUA(Bool_t const acfNUA) {this->fApplyCorrectionForNUA = acfNUA;} + Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;} // Output TList* GetHistList() const { return this->fHistList ; } // Gets output histogram list @@ -176,8 +176,9 @@ class AliFlowAnalysisWithScalarProduct { AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& anAnalysis); //copy constructor AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& anAnalysis); //assignment operator - Int_t fEventNumber; // event counter - Bool_t fDebug ; // flag for analysis: more print statements + Int_t fEventNumber; // event counter + Bool_t fDebug ; // flag for analysis: more print statements + Bool_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance Double_t fRelDiffMsub; // the relative difference the two subevent multiplicities can have @@ -186,21 +187,18 @@ class AliFlowAnalysisWithScalarProduct { TH1F* fPhiWeightsSub0; // histogram holding phi weights for subevent 0 TH1F* fPhiWeightsSub1; // histogram holding phi weights for subevent 1 - TList* fHistList; //list to hold all output histograms - - TProfile* fHistProFlags; //profile to hold all boolean flags needed in Finish() - TProfile* fHistProUQetaRP; //uQ(eta) for RP - TProfile* fHistProUQetaPOI; //uQ(eta) for POI - TProfile* fHistProUQPtRP; //uQ(pt) for RP - TProfile* fHistProUQPtPOI; //uQ(pt) for POI - TProfile* fHistProQaQb; //average of QaQb - TProfile* fHistProQaQbNorm; //average of QaQb/MaMb - Bool_t fApplyCorrectionForNUA; //apply correction for non-uniform acceptance - TProfile* fHistProQaQbReImNorm; //average of Im[Qa/Ma], Re[Qa/Ma], Im[Qb/Mb], Re[Qb/Mb] - TProfile* fHistProNonIsotropicTermsQ; //1st bin: sin, 2nd bin: cos - TProfile* fHistProNonIsotropicTermsU[2][2][2]; //[RP/POI][pt/eta][sin/cos] - TH1D* fHistSumOfLinearWeights; //holds sum of Ma*Mb - TH1D* fHistSumOfQuadraticWeights; //holds sum of (Ma*Mb)^2 + TProfile* fHistProFlags; // profile to hold all boolean flags needed in Finish() + TProfile* fHistProUQetaRP; // uQ(eta) for RP + TProfile* fHistProUQetaPOI; // uQ(eta) for POI + TProfile* fHistProUQPtRP; // uQ(pt) for RP + TProfile* fHistProUQPtPOI; // uQ(pt) for POI + TProfile* fHistProQaQb; // average of QaQb + TProfile* fHistProQaQbNorm; // average of QaQb/MaMb + TProfile* fHistProQaQbReImNorm; // average of Im[Qa/Ma], Re[Qa/Ma], Im[Qb/Mb], Re[Qb/Mb] + TProfile* fHistProNonIsotropicTermsQ; // 1st bin: sin, 2nd bin: cos + TProfile* fHistProNonIsotropicTermsU[2][2][2]; // [RP/POI][pt/eta][sin/cos] + TH1D* fHistSumOfLinearWeights; // holds sum of Ma*Mb + TH1D* fHistSumOfQuadraticWeights; // holds sum of (Ma*Mb)^2 TProfile* fHistProUQQaQbPtRP; //holds weighted average of TProfile* fHistProUQQaQbEtaRP; //holds weighted average of @@ -210,9 +208,9 @@ class AliFlowAnalysisWithScalarProduct { TH1D* fHistSumOfWeightsEtaRP[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin TH1D* fHistSumOfWeightsPtPOI[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin TH1D* fHistSumOfWeightsEtaPOI[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin - - AliFlowCommonHist* fCommonHists; //control histograms - AliFlowCommonHistResults* fCommonHistsRes; //results histograms + + AliFlowCommonHist* fCommonHists; // control histograms + AliFlowCommonHistResults* fCommonHistsRes; // results histograms TH1D* fHistQaQb; // distribution of QaQb TH1D* fHistQaQbNorm; // distribution of QaQb/MaMb @@ -224,6 +222,8 @@ class AliFlowAnalysisWithScalarProduct { TH2D* fHistQbNormvsMb; // distribution of Qb/Mb vs Mb TH2D* fHistMavsMb; // Ma vs Mb + TList* fHistList; // list to hold all output histograms + ClassDef(AliFlowAnalysisWithScalarProduct,0) // macro for rootcint }; diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.cxx index c24989af2e8..dca14e2cd37 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowCommonHist.cxx @@ -33,7 +33,7 @@ class TH1D; // AliFlowCommonHist: // // Description: Class to organise common histograms for Flow Analysis - +// // authors: N. van der Kolk (kolk@nikhef.nl), A. Bilandzic (anteb@nikhef.nl), RS @@ -43,7 +43,6 @@ ClassImp(AliFlowCommonHist) AliFlowCommonHist::AliFlowCommonHist(): TNamed(), - fHistMultOrig(NULL), fHistMultRP(NULL), fHistMultPOI(NULL), fHistPtRP(NULL), @@ -62,6 +61,9 @@ AliFlowCommonHist::AliFlowCommonHist(): fHistPhiEtaPOI(NULL), fHistProMeanPtperBin(NULL), fHistQ(NULL), + fHistAngleQ(NULL), + fHistAngleQSub0(NULL), + fHistAngleQSub1(NULL), fHarmonic(NULL), fRefMultVsNoOfRPs(NULL), fHistList(NULL) @@ -73,7 +75,6 @@ AliFlowCommonHist::AliFlowCommonHist(): AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): TNamed(), - fHistMultOrig(new TH1F(*a.fHistMultOrig)), fHistMultRP(new TH1F(*a.fHistMultRP)), fHistMultPOI(new TH1F(*a.fHistMultPOI)), fHistPtRP(new TH1F(*a.fHistPtRP)), @@ -92,6 +93,9 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): fHistPhiEtaPOI(new TH2F(*a.fHistPhiEtaPOI)), fHistProMeanPtperBin(new TProfile(*a.fHistProMeanPtperBin)), fHistQ(new TH1F(*a.fHistQ)), + fHistAngleQ(new TH1F(*a.fHistAngleQ)), + fHistAngleQSub0(new TH1F(*a.fHistAngleQSub0)), + fHistAngleQSub1(new TH1F(*a.fHistAngleQSub1)), fHarmonic(new TProfile(*a.fHarmonic)), fRefMultVsNoOfRPs(new TProfile(*a.fRefMultVsNoOfRPs)), fHistList(NULL) @@ -99,7 +103,6 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): // copy constructor fHistList = new TList(); - fHistList-> Add(fHistMultOrig); fHistList-> Add(fHistMultRP); fHistList-> Add(fHistMultPOI); fHistList-> Add(fHistPtRP); @@ -119,35 +122,19 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): fHistList-> Add(fHistProMeanPtperBin); fHistList-> Add(fHarmonic); fHistList-> Add(fRefMultVsNoOfRPs); - fHistList-> Add(fHistQ); + fHistList-> Add(fHistQ); + fHistList-> Add(fHistAngleQ); + fHistList-> Add(fHistAngleQSub0); + fHistList-> Add(fHistAngleQSub1); // TListIter next = TListIter(a.fHistList); } -// AliFlowCommonHist& AliFlowCommonHist::operator=(const AliFlowCommonHist& a) -// { -// *fHistMultOrig = *a.fHistMultOrig; -// *fHistMultInt = *a.fHistMultInt; -// *fHistMultDiff = *a.fHistMultDiff; -// *fHistPtInt = *a.fHistPtInt; -// *fHistPtDiff = *a.fHistPtDiff; -// *fHistPhiInt = *a.fHistPhiInt; -// *fHistPhiDiff = *a.fHistPhiDiff; -// *fHistEtaInt = *a.fHistEtaInt; -// *fHistEtaDiff = *a.fHistEtaDiff; -// *fHistProMeanPtperBin = *a.fHistProMeanPtperBin; -// *fHistQ = *a.fHistQ; -// // *fHistList = *a.fHistList; -// fHistList = NULL; - -// return *this; -// } //----------------------------------------------------------------------- AliFlowCommonHist::AliFlowCommonHist(const char *anInput,const char *title): TNamed(anInput,title), - fHistMultOrig(NULL), fHistMultRP(NULL), fHistMultPOI(NULL), fHistPtRP(NULL), @@ -166,6 +153,9 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): fHistPhiEtaPOI(NULL), fHistProMeanPtperBin(NULL), fHistQ(NULL), + fHistAngleQ(NULL), + fHistAngleQSub0(NULL), + fHistAngleQSub1(NULL), fHarmonic(NULL), fRefMultVsNoOfRPs(NULL), fHistList(NULL) @@ -198,12 +188,6 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): cout<<"Q: "<SetXTitle("Original Multiplicity"); - fHistMultOrig ->SetYTitle("Counts"); - sName = "Control_Flow_MultRP_"; sName +=anInput; fHistMultRP = new TH1F(sName.Data(), sName.Data(),iNbinsMult, dMultMin, dMultMax); @@ -319,6 +303,25 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): fHistQ ->SetXTitle("Q_{vector}/Mult"); fHistQ ->SetYTitle("Counts"); + //Angle of Q vector + sName = "Control_Flow_AngleQ_"; + sName +=anInput; + fHistAngleQ = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); + fHistAngleQ ->SetXTitle("Angle of Q_{vector}"); + fHistAngleQ ->SetYTitle("Counts"); + + sName = "Control_Flow_AngleQSub0_"; + sName +=anInput; + fHistAngleQSub0 = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); + fHistAngleQSub0 ->SetXTitle("Angle of Q_{vector} for Subevent 0"); + fHistAngleQSub0 ->SetYTitle("Counts"); + + sName = "Control_Flow_AngleQSub1_"; + sName +=anInput; + fHistAngleQSub1 = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); + fHistAngleQSub1 ->SetXTitle("Angle of Q_{vector} for Subevent 1"); + fHistAngleQSub1 ->SetYTitle("Counts"); + //harmonic sName = "Control_Flow_Harmonic_"; sName +=anInput; @@ -334,7 +337,6 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): //list of histograms if added here also add in copy constructor fHistList = new TList(); - fHistList-> Add(fHistMultOrig); fHistList-> Add(fHistMultRP); fHistList-> Add(fHistMultPOI); fHistList-> Add(fHistPtRP); @@ -355,6 +357,9 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): fHistList-> Add(fHarmonic); fHistList-> Add(fRefMultVsNoOfRPs); fHistList-> Add(fHistQ); + fHistList-> Add(fHistAngleQ); + fHistList-> Add(fHistAngleQSub0); + fHistList-> Add(fHistAngleQSub1); } @@ -364,7 +369,6 @@ AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): AliFlowCommonHist::~AliFlowCommonHist() { //deletes histograms - delete fHistMultOrig; delete fHistMultRP; delete fHistMultPOI; delete fHistPtRP; @@ -383,6 +387,9 @@ AliFlowCommonHist::~AliFlowCommonHist() delete fHistPhiEtaPOI; delete fHistProMeanPtperBin; delete fHistQ; + delete fHistAngleQ; + delete fHistAngleQSub0; + delete fHistAngleQSub1; delete fHarmonic; delete fRefMultVsNoOfRPs; delete fHistList; @@ -401,11 +408,7 @@ Bool_t AliFlowCommonHist::FillControlHistograms(AliFlowEventSimple* anEvent) Double_t dPt, dPhi, dEta, dWeight; - //fill the histograms - Int_t iNumberOfTracks = anEvent->NumberOfTracks(); - fHistMultOrig->Fill(iNumberOfTracks); - AliFlowVector vQ = anEvent->GetQ(); //weight by the Multiplicity Double_t dQX = 0.; @@ -416,10 +419,19 @@ Bool_t AliFlowCommonHist::FillControlHistograms(AliFlowEventSimple* anEvent) } vQ.Set(dQX,dQY); fHistQ->Fill(vQ.Mod()); + fHistAngleQ->Fill(vQ.Phi()/2); + + AliFlowVector* vQSub = new AliFlowVector[2]; + anEvent->Get2Qsub(vQSub); + AliFlowVector vQa = vQSub[0]; + AliFlowVector vQb = vQSub[1]; + fHistAngleQSub0->Fill(vQa.Phi()/2); + fHistAngleQSub1->Fill(vQb.Phi()/2); Double_t dMultRP = 0.; Double_t dMultPOI = 0.; + Int_t iNumberOfTracks = anEvent->NumberOfTracks(); AliFlowTrackSimple* pTrack = NULL; for (Int_t i=0;i versus # of RPs -- 2.43.5