]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
remove some warnings
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 May 2008 10:43:38 +0000 (10:43 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 May 2008 10:43:38 +0000 (10:43 +0000)
PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx
PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx
PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx
PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx
PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx
PWG2/FLOW/AliFlowAnalysisWithCumulants.h

index 0a1a52edd52d82fddf2571ace132f28364cc5d03..608728942ca5ca514ef5ecdcfff7288867fd7fb6 100644 (file)
@@ -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);
index 3f99f5fcfd7687eb2b91529ad2b80d7fe5f5b002..62d1207b2e94968a9b508108937affcb27fac4dc 100644 (file)
@@ -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
index 20f5c4bb485131dc8e213d8cf860b7308c171de9..72c2b6fb13460cc8025e5dbfd7745a799b0499b4 100644 (file)
@@ -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();
 
index 107cb4af31eabfc113b3122e679719cc9525d27a..cb4e4e26bde44cd6a938896fd4277a20b5aa7dbf 100644 (file)
@@ -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();
 
index a132e72559d3ecb164a50e9b03265f8e13d8069a..1536f362513980a54a56d8af535e04f1fec39a50 100644 (file)
@@ -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;n<fgknBins;n++){
-    fBinEventEntries[n]=0;
-    fBinNoOfParticles[n]=0;
-    fBinMeanPt[n]=0;
-    for(Int_t p=0;p<fgkPmax;p++){
-     for(Int_t q=0;q<fgkQmax;q++){
-      fAvG[p][q]=0;
-      fBinEventDRe[n][p][q]=0; 
-      fBinEventDIm[n][p][q]=0;
-     }
-    }
-   }
-  }
-
-AliFlowAnalysisWithCumulants::~AliFlowAnalysisWithCumulants(){
-//desctructor
-}  
-
-AliFlowAnalysisWithCumulants& AliFlowAnalysisWithCumulants::operator=(const AliFlowAnalysisWithCumulants&)
-{
- return *this;
-}
 
 //___________________________________________________________________________
 void AliFlowAnalysisWithCumulants::CreateOutputObjects(){
  //output histograms
  TString fHistFileName = "cumulants.root";
+ TFile* fHistFile;
  fHistFile = new TFile(fHistFileName.Data(),"RECREATE");
  fCommonHists = new AliFlowCommonHist("Cumulants");//control histograms
  fCommonHistsRes2 = new AliFlowCommonHistResults("Cumulants2");
@@ -146,10 +90,10 @@ void AliFlowAnalysisWithCumulants::CreateOutputObjects(){
 }
 
 //________________________________________________________________________
-void AliFlowAnalysisWithCumulants::Exec(AliFlowEventSimple* fEvent) {
+void AliFlowAnalysisWithCumulants::Exec(AliFlowEventSimple* anEvent) {
   //running over data
  
-  fCommonHists->FillControlHistograms(fEvent);   
+  fCommonHists->FillControlHistograms(anEvent);   
   
   Double_t fG[fgkPmax][fgkQmax];//generating function for integrated flow
   for(Int_t p=0;p<fgkPmax;p++){
@@ -164,7 +108,7 @@ void AliFlowAnalysisWithCumulants::Exec(AliFlowEventSimple* fEvent) {
   fQVector.Set(0.,0.);
   fQVector.SetMult(0);
   
-  fQVector=fEvent->GetQ();//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: "<<fnPrim<<endl;
+  cout<<"Number of input tracks for cumulant analysis: "<<nPrim<<endl;
   cout<<"Number of selected tracks for cumulant analysis: "<<fEventNSelTracksIntFlow<<endl;
   
     //------------------------------------------------------------------------------------
     //STARTING THE FIRST LOOP (CALCULATING THE GENERATING FUNCTION FOR INTEGRATED FLOW)
-    for(Int_t i=0;i<fnPrim;i++){
-    fTrack=fEvent->GetTrack(i);
+    for(Int_t i=0;i<nPrim;i++){
+    fTrack=anEvent->GetTrack(i);
      if(fTrack&&fTrack->UseForIntegratedFlow()){
       fSelTracksIntFlow++;
       for(Int_t p=0;p<fgkPmax;p++){
@@ -215,8 +159,8 @@ void AliFlowAnalysisWithCumulants::Exec(AliFlowEventSimple* fEvent) {
   
   //------------------------------------------------------------------------------------------------
   //STARTING THE SECOND LOOP OVER TRACKS (CALCULATING THE GENERATING FUNCTION FOR DIFFERENTIAL FLOW)
-  for(Int_t i=0;i<fnPrim;i++){
-    fTrack=fEvent->GetTrack(i);
+  for(Int_t i=0;i<nPrim;i++){
+    fTrack=anEvent->GetTrack(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<<""<<endl;
   cout<<"***************************************"<<endl;
   cout<<"**** results of cumulant analysis: ****"<<endl;
   cout<<"***************************************"<<endl;
   cout<<""<<endl;
-  cout<<"nEvts = "<<fCount<<endl;
-  
-  Int_t fnEvts=fCount;
+  cout<<"number of events = "<<nEvents<<endl;
   
   //final avarage multiplicity
-  fAvM/=fnEvts;
+  fAvM/=nEvents;
   
   //final avarage of generating function for the integrated flow
   for(Int_t p=0;p<fgkPmax;p++){
    for(Int_t q=0;q<fgkQmax;q++){
-    fAvG[p][q]/=fnEvts;
+    fAvG[p][q]/=nEvents;
    }
   }    
   
   //final avarage of the Q vector stuff
-  fAvQx/=fnEvts;
-  fAvQy/=fnEvts;
-  fAvQ2x/=fnEvts;
-  fAvQ2y/=fnEvts;
+  fAvQx/=nEvents;
+  fAvQy/=nEvents;
+  fAvQ2x/=nEvents;
+  fAvQ2y/=nEvents;
   
   /////////////////////////////////////////////////////////////////////////////      
   //////////////////gen. function for the cumulants////////////////////////////
@@ -361,7 +303,7 @@ void AliFlowAnalysisWithCumulants::Terminate(Int_t fCount){
    if (fCumulant[0]>=0.){ 
     fV2=sqrt(fCumulant[0]);    
     fChiQ[0]=fAvM*fV2/pow(fAvQ2x+fAvQ2y-pow(fAvQx,2.)-pow(fAvQy,2.)-pow(fV2*fAvM,2.),0.5);
-    fSdQ[0]=pow(((1./(2.*fAvM*fnEvts))*((1.+1.*pow(fChiQ[0],2))/(1.*pow(fChiQ[0],2)))),0.5);
+    fSdQ[0]=pow(((1./(2.*fAvM*nEvents))*((1.+1.*pow(fChiQ[0],2))/(1.*pow(fChiQ[0],2)))),0.5);
     cout<<" v_"<<fgkFlow<<"{2} = "<<100.*fV2<<"%, chi{2} = "<<fChiQ[0]<<", sd{2} = "<<100.*fSdQ[0]<<"%"<<endl;
     fCommonHistsRes2->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_"<<fgkFlow<<"{4} = "<<100.*fV4<<"%, chi{4} = "<<fChiQ[1]<<", sd{4} = "<<100.*fSdQ[1]<<"%"<<endl;
     fCommonHistsRes4->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_"<<fgkFlow<<"{6} = "<<100.*fV6<<"%, chi{6} = "<<fChiQ[2]<<", sd{6} = "<<100.*fSdQ[2]<<"%"<<endl;
     fCommonHistsRes6->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_"<<fgkFlow<<"{8} = "<<100.*fV8<<"%, chi{8} = "<<fChiQ[3]<<", sd{8} = "<<100.*fSdQ[3]<<"%"<<endl;
      fCommonHistsRes8->FillIntegratedFlow(100.*fV8,100.*fSdQ[3]);
      fCommonHistsRes8->FillChi(fChiQ[3]);
index 6472386d53733454c59dda75db65119b8b8e9429..7779a82afb03ab11f964b1a26fe307d92d7524f3 100644 (file)
@@ -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