From fa92c1a07c2fd3afbd05a62971dd3f8a29569a08 Mon Sep 17 00:00:00 2001 From: snelling Date: Mon, 26 May 2008 10:43:38 +0000 Subject: [PATCH] remove some warnings --- PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx | 8 +- PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx | 10 +- PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx | 8 +- PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx | 8 +- PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx | 116 ++++++--------------- PWG2/FLOW/AliFlowAnalysisWithCumulants.h | 17 ++- 6 files changed, 52 insertions(+), 115 deletions(-) diff --git a/PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx b/PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx index 0a1a52edd52..608728942ca 100644 --- a/PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx +++ b/PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx @@ -139,10 +139,10 @@ void AliAnalysisTaskLYZEventPlane::CreateOutputObjects() fLyz = new AliFlowAnalysisWithLYZEventPlane() ; //output file - TString fName = "outputFromLYZEventPlaneAnalysis" ; - fName += fAnalysisType.Data() ; - fName += ".root" ; - fLyz->SetOutFileName( fName.Data() ); + TString outputName = "outputFromLYZEventPlaneAnalysis" ; + outputName += fAnalysisType.Data() ; + outputName += ".root" ; + fLyz->SetOutFileName( outputName.Data() ); // Get data from input slot 1 and 2 fFirstRunFile = (TFile*)GetInputData(1); diff --git a/PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx b/PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx index 3f99f5fcfd7..62d1207b2e9 100644 --- a/PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx +++ b/PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx @@ -137,14 +137,14 @@ void AliAnalysisTaskLeeYangZeros::CreateOutputObjects() fLyz -> SetUseSum(GetUseSumLYZ()); //set use sum true or false //output file - TString fName = "outputFromLeeYangZerosAnalysis" ; - fName += fAnalysisType.Data() ; + TString outputName = "outputFromLeeYangZerosAnalysis" ; + outputName += fAnalysisType.Data() ; if (fFirstRunLYZ) { - fName += "_firstrun.root" ; + outputName += "_firstrun.root" ; } else { - fName += "_secondrun.root" ; + outputName += "_secondrun.root" ; } - fLyz->SetHistFileName( fName.Data() ); + fLyz->SetHistFileName( outputName.Data() ); // Get data from input slot 1 if (GetNinputs() == 2) { //if there are two input slots diff --git a/PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx b/PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx index 20f5c4bb485..72c2b6fb134 100644 --- a/PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx +++ b/PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx @@ -142,10 +142,10 @@ void AliAnalysisTaskMCEventPlane::CreateOutputObjects() fMc = new AliFlowAnalysisWithMCEventPlane() ; //output file - TString fName = "outputFromMCEventPlaneAnalysis" ; - fName += fAnalysisType.Data() ; - fName += ".root" ; - fMc->SetHistFileName( fName.Data() ); + TString outputName = "outputFromMCEventPlaneAnalysis" ; + outputName += fAnalysisType.Data() ; + outputName += ".root" ; + fMc->SetHistFileName( outputName.Data() ); fMc-> Init(); diff --git a/PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx b/PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx index 107cb4af31e..cb4e4e26bde 100644 --- a/PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx +++ b/PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx @@ -136,10 +136,10 @@ void AliAnalysisTaskScalarProduct::CreateOutputObjects() fSP = new AliFlowAnalysisWithScalarProduct() ; //output file - TString fName = "outputFromScalarProductAnalysis" ; - fName += fAnalysisType.Data() ; - fName += ".root" ; - fSP->SetHistFileName( fName.Data() ); + TString outputName = "outputFromScalarProductAnalysis" ; + outputName += fAnalysisType.Data() ; + outputName += ".root" ; + fSP->SetHistFileName( outputName.Data() ); fSP-> Init(); diff --git a/PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx b/PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx index a132e72559d..1536f362513 100644 --- a/PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx +++ b/PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx @@ -39,10 +39,7 @@ ClassImp(AliFlowAnalysisWithCumulants) //________________________________________________________________________ AliFlowAnalysisWithCumulants::AliFlowAnalysisWithCumulants(): - fEvent(0), - fTrack(0), - fnEvts(0), - fnPrim(0), + fTrack(NULL), fAvM(0), fR0(0), fPtMax(0), @@ -52,13 +49,11 @@ AliFlowAnalysisWithCumulants::AliFlowAnalysisWithCumulants(): fAvQy(0), fAvQ2x(0), fAvQ2y(0), - fHistFileName(0), - fHistFile(0), - fCommonHists(0), - fCommonHistsRes2(0), - fCommonHistsRes4(0), - fCommonHistsRes6(0), - fCommonHistsRes8(0) + fCommonHists(NULL), + fCommonHistsRes2(NULL), + fCommonHistsRes4(NULL), + fCommonHistsRes6(NULL), + fCommonHistsRes8(NULL) { //constructor fR0=AliFlowCumuConstants::fgR0; @@ -80,63 +75,12 @@ AliFlowAnalysisWithCumulants::AliFlowAnalysisWithCumulants(): } } -//________________________________________________________________________ - -AliFlowAnalysisWithCumulants::AliFlowAnalysisWithCumulants(const AliFlowAnalysisWithCumulants&): - fEvent(0), - fTrack(0), - fnEvts(0), - fnPrim(0), - fAvM(0), - fR0(0), - fPtMax(0), - fPtMin(0), - fBinWidth(0), - fAvQx(0), - fAvQy(0), - fAvQ2x(0), - fAvQ2y(0), - fHistFileName(0), - fHistFile(0), - fCommonHists(0), - fCommonHistsRes2(0), - fCommonHistsRes4(0), - fCommonHistsRes6(0), - fCommonHistsRes8(0) - { - //copy constructor - fR0=AliFlowCumuConstants::fgR0; - fPtMax=AliFlowCommonConstants::GetPtMax(); - fPtMin=AliFlowCommonConstants::GetPtMin(); - fBinWidth=(fPtMax-fPtMin)/fgknBins; - - for(Int_t n=0;nFillControlHistograms(fEvent); + fCommonHists->FillControlHistograms(anEvent); Double_t fG[fgkPmax][fgkQmax];//generating function for integrated flow for(Int_t p=0;pGetQ();//get the Q vector for this event + fQVector=anEvent->GetQ();//get the Q vector for this event fAvQx+=fQVector.X(); fAvQy+=fQVector.Y(); @@ -172,17 +116,17 @@ void AliFlowAnalysisWithCumulants::Exec(AliFlowEventSimple* fEvent) { fAvQ2y+=pow(fQVector.Y(),2.); //---------------------------------------------------------- - Int_t fnPrim = fEvent->NumberOfTracks(); - Int_t fEventNSelTracksIntFlow = fEvent->GetEventNSelTracksIntFlow(); + Int_t nPrim = anEvent->NumberOfTracks(); + Int_t fEventNSelTracksIntFlow = anEvent->GetEventNSelTracksIntFlow(); Int_t fSelTracksIntFlow = 0; - cout<<"Number of input tracks for cumulant analysis: "<GetTrack(i); + for(Int_t i=0;iGetTrack(i); if(fTrack&&fTrack->UseForIntegratedFlow()){ fSelTracksIntFlow++; for(Int_t p=0;pGetTrack(i); + for(Int_t i=0;iGetTrack(i); if (fTrack && fTrack->UseForDifferentialFlow()) { Int_t fBin=TMath::Nint(floor(fTrack->Pt()/fBinWidth)); if(fBin>=fgknBins)continue;//ignoring the particles with pt>ptMax @@ -256,32 +200,30 @@ void AliFlowAnalysisWithCumulants::Exec(AliFlowEventSimple* fEvent) { } //________________________________________________________________________ -void AliFlowAnalysisWithCumulants::Terminate(Int_t fCount){ +void AliFlowAnalysisWithCumulants::Terminate(Int_t nEvents){ //final results cout<<""<FillIntegratedFlow(100.*fV2,100.*fSdQ[0]); fCommonHistsRes2->FillChi(fChiQ[0]); @@ -371,7 +313,7 @@ void AliFlowAnalysisWithCumulants::Terminate(Int_t fCount){ if (fCumulant[1]<=0.){ fV4=pow(-fCumulant[1],(1./4.)); fChiQ[1]=fAvM*fV4/pow(fAvQ2x+fAvQ2y-pow(fAvQx,2.)-pow(fAvQy,2.)-pow(fV4*fAvM,2.),0.5); - fSdQ[1]=(1./(pow(2.*fAvM*fnEvts,.5)))*pow((1.+2.*pow(fChiQ[1],2)+(1./4.)*pow(fChiQ[1],4.)+(1./4.)*pow(fChiQ[1],6.))/((1./4.)*pow(fChiQ[1],6.)),.5); + fSdQ[1]=(1./(pow(2.*fAvM*nEvents,.5)))*pow((1.+2.*pow(fChiQ[1],2)+(1./4.)*pow(fChiQ[1],4.)+(1./4.)*pow(fChiQ[1],6.))/((1./4.)*pow(fChiQ[1],6.)),.5); cout<<" v_"<FillIntegratedFlow(100.*fV4,100.*fSdQ[1]); fCommonHistsRes4->FillChi(fChiQ[1]); @@ -381,7 +323,7 @@ void AliFlowAnalysisWithCumulants::Terminate(Int_t fCount){ if (fCumulant[2]>=0.){ fV6=pow((1./4.)*fCumulant[2],(1./6.)); fChiQ[2]=fAvM*fV6/pow(fAvQ2x+fAvQ2y-pow(fAvQx,2.)-pow(fAvQy,2.)-pow(fV6*fAvM,2.),0.5); - fSdQ[2]=(1./(pow(2.*fAvM*fnEvts,.5)))*pow((3.+18.*pow(fChiQ[2],2)+9.*pow(fChiQ[2],4.)+28.*pow(fChiQ[2],6.)+12.*pow(fChiQ[2],8.)+24.*pow(fChiQ[2],10.))/(24.*pow(fChiQ[2],10.)),.5); + fSdQ[2]=(1./(pow(2.*fAvM*nEvents,.5)))*pow((3.+18.*pow(fChiQ[2],2)+9.*pow(fChiQ[2],4.)+28.*pow(fChiQ[2],6.)+12.*pow(fChiQ[2],8.)+24.*pow(fChiQ[2],10.))/(24.*pow(fChiQ[2],10.)),.5); cout<<" v_"<FillIntegratedFlow(100.*fV6,100.*fSdQ[2]); fCommonHistsRes6->FillChi(fChiQ[2]); @@ -391,7 +333,7 @@ void AliFlowAnalysisWithCumulants::Terminate(Int_t fCount){ if (fCumulant[3]<=0.){ fV8=pow(-(1./33.)*fCumulant[3],(1./8.)); fChiQ[3]=fAvM*fV8/pow(fAvQ2x+fAvQ2y-pow(fAvQx,2.)-pow(fAvQy,2.)-pow(fV8*fAvM,2.),0.5); - fSdQ[3]=(1./(pow(2.*fAvM*fnEvts,.5)))*pow((12.+96.*pow(fChiQ[3],2)+72.*pow(fChiQ[3],4.)+304.*pow(fChiQ[3],6.)+257.*pow(fChiQ[3],8.)+804.*pow(fChiQ[3],10.)+363.*pow(fChiQ[3],12.)+726.*pow(fChiQ[3],14.))/(726.*pow(fChiQ[3],14.)),.5); + fSdQ[3]=(1./(pow(2.*fAvM*nEvents,.5)))*pow((12.+96.*pow(fChiQ[3],2)+72.*pow(fChiQ[3],4.)+304.*pow(fChiQ[3],6.)+257.*pow(fChiQ[3],8.)+804.*pow(fChiQ[3],10.)+363.*pow(fChiQ[3],12.)+726.*pow(fChiQ[3],14.))/(726.*pow(fChiQ[3],14.)),.5); cout<<" v_"<FillIntegratedFlow(100.*fV8,100.*fSdQ[3]); fCommonHistsRes8->FillChi(fChiQ[3]); diff --git a/PWG2/FLOW/AliFlowAnalysisWithCumulants.h b/PWG2/FLOW/AliFlowAnalysisWithCumulants.h index 6472386d537..7779a82afb0 100644 --- a/PWG2/FLOW/AliFlowAnalysisWithCumulants.h +++ b/PWG2/FLOW/AliFlowAnalysisWithCumulants.h @@ -24,17 +24,17 @@ class AliFlowVector; class AliFlowAnalysisWithCumulants { public: AliFlowAnalysisWithCumulants(); - AliFlowAnalysisWithCumulants(const AliFlowAnalysisWithCumulants&); virtual ~AliFlowAnalysisWithCumulants(); - AliFlowAnalysisWithCumulants& operator=(const AliFlowAnalysisWithCumulants&); - virtual void CreateOutputObjects(); - virtual void Exec(AliFlowEventSimple* fEvent); - virtual void Terminate(Int_t fCount); + virtual void Exec(AliFlowEventSimple* anEvent); + virtual void Terminate(Int_t nEvents); private: - AliFlowEventSimple* fEvent;//event + AliFlowAnalysisWithCumulants(const AliFlowAnalysisWithCumulants&); + AliFlowAnalysisWithCumulants& operator=(const AliFlowAnalysisWithCumulants&); + + AliFlowTrackSimple* fTrack;//track static const Int_t fgkQmax=AliFlowCumuConstants::kQmax;//needed for numerics static const Int_t fgkPmax=AliFlowCumuConstants::kPmax;//needed for numerics @@ -42,8 +42,6 @@ class AliFlowAnalysisWithCumulants { static const Int_t fgkMltpl=AliFlowCumuConstants::kMltpl;//the multiple in p=m*n (diff. flow) static const Int_t fgknBins=100;//number of pt bins - Int_t fnEvts;//number of events - Int_t fnPrim;//total multiplicity (no selection) Double_t fAvM;//avarage SELECTED multiplicity Double_t fR0;//needed for numerics @@ -56,9 +54,6 @@ class AliFlowAnalysisWithCumulants { Double_t fAvQ2x;//<(Q_x)^2> Double_t fAvQ2y;//<(Q_y)^2> - TString fHistFileName;//final output - TFile* fHistFile;//final output - AliFlowCommonHist* fCommonHists;//control histograms AliFlowCommonHistResults *fCommonHistsRes2, *fCommonHistsRes4, *fCommonHistsRes6, *fCommonHistsRes8;//histograms with various order final results -- 2.43.0