]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixes coding violations
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Mar 2010 08:55:21 +0000 (08:55 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Mar 2010 08:55:21 +0000 (08:55 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEventforRP.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.h

index 78c803b9ee126c995f3fbef8a0fa306c7930cddf..04a3292e46710b52341fc2f634ccc2e6f8a3c95a 100644 (file)
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  * 
 **************************************************************************/
+// AliFlowAnalysisWithMCEventPlane:
+// Description: Maker to analyze Flow from the generated MC reaction plane.
+//              This class is used to get the real value of the flow 
+//              to compare the other methods to when analysing simulated events
+// author: N. van der Kolk (kolk@nikhef.nl)
 
 #define AliFlowAnalysisWithMCEventPlane_cxx
  
-#include "Riostream.h"  //needed as include
-#include "TFile.h"      //needed as include
-#include "TProfile.h"   //needed as include
-#include "TProfile2D.h"   
-#include "TComplex.h"   //needed as include
+#include "Riostream.h"
+#include "TFile.h"
+#include "TProfile.h"
+#include "TProfile2D.h"
 #include "TList.h"
+#include "TH1F.h"
+#include "TMath.h"
 
-class TH1F;
-
-#include "AliFlowCommonConstants.h"    //needed as include
+#include "AliFlowCommonConstants.h"
 #include "AliFlowEventSimple.h"
 #include "AliFlowTrackSimple.h"
 #include "AliFlowCommonHist.h"
@@ -33,12 +37,6 @@ class TH1F;
 
 class AliFlowVector;
 
-// AliFlowAnalysisWithMCEventPlane:
-// Description: Maker to analyze Flow from the generated MC reaction plane.
-//              This class is used to get the real value of the flow 
-//              to compare the other methods to when analysing simulated events
-// author: N. van der Kolk (kolk@nikhef.nl)
-
 ClassImp(AliFlowAnalysisWithMCEventPlane)
 
   //-----------------------------------------------------------------------
@@ -374,7 +372,7 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
        dErrVRP += dYieldPtRP*dYieldPtRP*dErrvPtRP*dErrvPtRP;
       }
   }
-  if (dSumRP != 0. ) {
+  if (TMath::AreEqualAbs(dSumRP, 0.0, 1e-10) ) {
     dVRP /= dSumRP;  //because pt distribution should be normalised
     dErrVRP /= (dSumRP*dSumRP);
     dErrVRP = TMath::Sqrt(dErrVRP); 
@@ -420,7 +418,7 @@ void AliFlowAnalysisWithMCEventPlane::Finish() {
       }
     }//end of for(Int_t b=0;b<iNbinsPt;b++)  
   } else { cout<<"fHistProFlow is NULL"<<endl; }
-  if (dSumPOI != 0. ) {
+  if ( TMath::AreEqualAbs(dSumPOI, 0.0, 1e-10) ) {
     dVPOI /= dSumPOI;  //because pt distribution should be normalised
     dErrVPOI /= (dSumPOI*dSumPOI);
     dErrVPOI = TMath::Sqrt(dErrVPOI); 
index e29ff8ad998ec44b20c4b7bb12a9f2f15fc61c6e..5e55809b31f0fcdc1448239f0be669c2f8ea862d 100644 (file)
@@ -1,15 +1,16 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+// Description: Maker to analyze Flow from the generated MC reaction plane.
+//              This class is used to get the real value of the flow 
+//              to compare the other methods to when analysing simulated events.
 
 /* $Id$ */
 
-
 #ifndef ALIFLOWANALYSISWITHMCEVENTPLANE_H
 #define ALIFLOWANALYSISWITHMCEVENTPLANE_H
 
-#include "TVector2.h"          //called explicitly
-#include "AliFlowVector.h"
-#include "TString.h"
+class TVector2;
+class TString;
 
 class AliFlowTrackSimple;
 class AliFlowEventSimple;
@@ -27,10 +28,6 @@ class TComplex;
 class Riostream;
 
 
-// Description: Maker to analyze Flow from the generated MC reaction plane.
-//              This class is used to get the real value of the flow 
-//              to compare the other methods to when analysing simulated events.
-
  
 class AliFlowAnalysisWithMCEventPlane {
 
@@ -56,46 +53,46 @@ class AliFlowAnalysisWithMCEventPlane {
    // Output 
    TList*    GetHistList() const          { return this->fHistList ; }  
    AliFlowCommonHist* GetCommonHists() const  { return this->fCommonHists; }
-   void      SetCommonHists(AliFlowCommonHist* aCommonHist)  
+   void      SetCommonHists(AliFlowCommonHist* const aCommonHist)  
      { this->fCommonHists = aCommonHist; }
    AliFlowCommonHistResults*  GetCommonHistsRes() const { return this->fCommonHistsRes; }
-   void      SetCommonHistsRes(AliFlowCommonHistResults* aCommonHistResult
+   void      SetCommonHistsRes( AliFlowCommonHistResults* const aCommonHistResult 
      { this->fCommonHistsRes = aCommonHistResult; }
    
    //histograms
-   TH1F*     GetHistRP()                  {return this->fHistRP; } 
-   void      SetHistRP(TH1F* aHistRP)     {this->fHistRP = aHistRP; }
+   TH1F*     GetHistRP() const            {return this->fHistRP; } 
+   void      SetHistRP(TH1F* const  aHistRP)     {this->fHistRP = aHistRP; }
    
-   TProfile* GetHistProIntFlow()          {return this->fHistProIntFlow; } 
-   void      SetHistProIntFlow(TProfile* aHistProIntFlow) 
+   TProfile* GetHistProIntFlow() const    {return this->fHistProIntFlow; } 
+   void      SetHistProIntFlow(TProfile* const aHistProIntFlow) 
      {this->fHistProIntFlow = aHistProIntFlow; }
      
-   TProfile2D* GetHistProDiffFlowPtEtaRP()     {return this->fHistProDiffFlowPtEtaRP; } 
-   void      SetHistProDiffFlowPtEtaRP(TProfile2D* aHistProDiffFlowPtEtaRP) 
+   TProfile2D* GetHistProDiffFlowPtEtaRP() const    {return this->fHistProDiffFlowPtEtaRP; } 
+   void      SetHistProDiffFlowPtEtaRP(TProfile2D* const aHistProDiffFlowPtEtaRP) 
      {this->fHistProDiffFlowPtEtaRP = aHistProDiffFlowPtEtaRP; }   
    
-   TProfile* GetHistProDiffFlowPtRP()     {return this->fHistProDiffFlowPtRP; } 
-   void      SetHistProDiffFlowPtRP(TProfile* aHistProDiffFlowPtRP) 
+   TProfile* GetHistProDiffFlowPtRP() const    {return this->fHistProDiffFlowPtRP; } 
+   void      SetHistProDiffFlowPtRP(TProfile* const aHistProDiffFlowPtRP) 
      {this->fHistProDiffFlowPtRP = aHistProDiffFlowPtRP; } 
    
-   TProfile* GetHistProDiffFlowEtaRP()    {return this->fHistProDiffFlowEtaRP; } 
-   void      SetHistProDiffFlowEtaRP(TProfile* aHistProDiffFlowEtaRP) 
+   TProfile* GetHistProDiffFlowEtaRP() const   {return this->fHistProDiffFlowEtaRP; } 
+   void      SetHistProDiffFlowEtaRP(TProfile* const aHistProDiffFlowEtaRP) 
      {this->fHistProDiffFlowEtaRP = aHistProDiffFlowEtaRP; } 
      
-   TProfile2D* GetHistProDiffFlowPtEtaPOI()     {return this->fHistProDiffFlowPtEtaPOI; } 
-   void      SetHistProDiffFlowPtEtaPOI(TProfile2D* aHistProDiffFlowPtEtaPOI) 
+   TProfile2D* GetHistProDiffFlowPtEtaPOI()const     {return this->fHistProDiffFlowPtEtaPOI; } 
+   void      SetHistProDiffFlowPtEtaPOI(TProfile2D* const aHistProDiffFlowPtEtaPOI) 
      {this->fHistProDiffFlowPtEtaPOI = aHistProDiffFlowPtEtaPOI; }   
    
-   TProfile* GetHistProDiffFlowPtPOI()    {return this->fHistProDiffFlowPtPOI; } 
-   void      SetHistProDiffFlowPtPOI(TProfile* aHistProDiffFlowPtPOI) 
+   TProfile* GetHistProDiffFlowPtPOI()const    {return this->fHistProDiffFlowPtPOI; } 
+   void      SetHistProDiffFlowPtPOI(TProfile* const aHistProDiffFlowPtPOI) 
      {this->fHistProDiffFlowPtPOI = aHistProDiffFlowPtPOI; } 
    
-   TProfile* GetHistProDiffFlowEtaPOI()   {return this->fHistProDiffFlowEtaPOI; } 
-   void      SetHistProDiffFlowEtaPOI(TProfile* aHistProDiffFlowEtaPOI) 
+   TProfile* GetHistProDiffFlowEtaPOI()const   {return this->fHistProDiffFlowEtaPOI; } 
+   void      SetHistProDiffFlowEtaPOI(TProfile* const aHistProDiffFlowEtaPOI) 
      {this->fHistProDiffFlowEtaPOI = aHistProDiffFlowEtaPOI; } 
      
-   TH1D* GetHistSpreadOfFlow()   {return this->fHistSpreadOfFlow; } 
-   void      SetHistSpreadOfFlow(TH1D* aHistSpreadOfFlow) 
+   TH1D* GetHistSpreadOfFlow()const   {return this->fHistSpreadOfFlow; } 
+   void      SetHistSpreadOfFlow(TH1D* const aHistSpreadOfFlow) 
      {this->fHistSpreadOfFlow = aHistSpreadOfFlow; }    
    
    // harmonic:
@@ -118,8 +115,8 @@ class AliFlowAnalysisWithMCEventPlane {
 
    TList*       fHistList;          //list to hold all output histograms  
     
-   AliFlowCommonHist* fCommonHists;              //
-   AliFlowCommonHistResults* fCommonHistsRes;    //
+   AliFlowCommonHist* fCommonHists;              // hist
+   AliFlowCommonHistResults* fCommonHistsRes;    // hist
    
    TH1F*        fHistRP;                  // reaction plane
    TProfile*    fHistProIntFlow;          // profile used to calculate the integrated flow of RP particles
index 4dd6d3dcf527b950890f0c987a2f68d3e75ba48a..d501982a5134af8636e2025c36021cba0fab5e29 100644 (file)
@@ -34,8 +34,8 @@
 #include "TTimeStamp.h"
 
 // ALICE Analysis Framework
-class AliAnalysisTask;
 #include "AliAnalysisManager.h"
+#include "AliAnalysisTaskSE.h"
 
 // ESD interface
 #include "AliESDEvent.h"
@@ -59,11 +59,11 @@ class AliAnalysisTask;
 #include "AliGenEposEventHeader.h"
 
 // Interface to make the Flow Event Simple used in the flow analysis methods
+#include "AliFlowEventSimple.h"
 #include "AliFlowEventSimpleMaker.h"
 
 #include "AliAnalysisTaskFlowEvent.h"
 
-
 ClassImp(AliAnalysisTaskFlowEvent)
   
 //________________________________________________________________________
index e37311f3fac129f116a9f6ac56eb424fbd683734..14bdb57ea2205b925ab238c7507e082cc61d9eed 100644 (file)
 #ifndef AliAnalysisTaskFlowEvent_H
 #define AliAnalysisTaskFlowEvent_H
 
-//class AliESDEvent;
-//class AliAODEvent;
 class AliCFManager;
 class AliFlowEventSimpleMaker;
 class TList;
 class TRandom3;
-
-#include "TString.h"
-#include "AliAnalysisTaskSE.h"
+class AliAnalysisTaskSE;
+class TString;
 
 class AliAnalysisTaskFlowEvent : public AliAnalysisTaskSE {
  public:
index 490b2ba79e57ced279f1107982de3a52a3fab51b..1fc42eba73ae7ca8bc616c4f9dd8cc9070dbb167 100644 (file)
@@ -35,7 +35,7 @@
 #include "TTimeStamp.h"
 
 // ALICE Analysis Framework
-class AliAnalysisTaskSE;
+#include "AliAnalysisTaskSE.h"
 #include "AliAnalysisManager.h"
 
 // ESD interface
@@ -60,6 +60,7 @@ class AliAnalysisTaskSE;
 #include "AliGenGeVSimEventHeader.h"
 
 // Interface to make the Flow Event Simple used in the flow analysis methods
+#include "AliFlowEventSimple.h"
 #include "AliFlowEventSimpleMaker.h"
 #include "AliFlowVector.h"
 #include "AliAnalysisTaskFlowEventforRP.h"
index 15b950ab5315d21e40d218ce544c2838fb2c5af9..ecebad85f8173beb35af8836cd345969f324603f 100644 (file)
@@ -12,8 +12,6 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/* $Id */
-
 /////////////////////////////////////////////////////////////////////////
 // AliFlowEventSimpleMaker:
 //
 // author: N. van der Kolk (kolk@nikhef.nl)
 /////////////////////////////////////////////////////////////////////////
 
-
 #include "Riostream.h"
+#include "TTree.h"
+#include "TParticle.h"
 #include "AliFlowEventSimpleMaker.h"
 #include "AliFlowEventSimple.h"
 #include "AliFlowTrackSimple.h"
-#include "TTree.h"
-#include "TParticle.h"
 #include "AliMCEvent.h"
 #include "AliMCParticle.h"
 #include "AliESDEvent.h"
 #include "AliESDtrack.h"
 #include "AliAODEvent.h"
 #include "AliAODTrack.h"
-#include "AliLog.h"
 #include "AliCFManager.h"
 #include "AliFlowTrackSimpleCuts.h"
 
@@ -66,7 +62,7 @@ AliFlowEventSimpleMaker::~AliFlowEventSimpleMaker()
 }
 
 //-----------------------------------------------------------------------   
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks( AliMCEvent* anInput, const AliCFManager* intCFManager, const AliCFManager* diffCFManager)
 {
   //Fills the event from the MC kinematic information
   
@@ -132,8 +128,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
         
     if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult) { 
       if ( (++fCount % 100) == 0) {
-       if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
-       else cout<<" MC Reaction Plane Angle = unknown "<< endl;
+       cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+       //
        cout<<" iGoodTracks = "<<iGoodTracks<<endl;
        cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
        cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;  
@@ -155,7 +151,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
 
 //-----------------------------------------------------------------------   
 
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, const AliCFManager* intCFManager, const AliCFManager* diffCFManager)
 {
   //Fills the event from the ESD
   
@@ -195,7 +191,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
        AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
        pTrack->SetPt(pParticle->Pt() );
        pTrack->SetEta(pParticle->Eta() );
-       if (fEllipticFlowValue!=0.) 
+       if (fEllipticFlowValue>0.) 
          { pTrack->SetPhi(pParticle->Phi()-fEllipticFlowValue*TMath::Sin(2*(pParticle->Phi()-fMCReactionPlaneAngle))); cout<<"Added flow to particle"<<endl; }
        else { pTrack->SetPhi(pParticle->Phi() ); }     
 
@@ -255,7 +251,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
 }
 
 //-----------------------------------------------------------------------   
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  AliCFManager* intCFManager, AliCFManager* diffCFManager)
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  const AliCFManager* intCFManager, const AliCFManager* diffCFManager)
 {
   //Fills the event from the AOD
   
@@ -337,7 +333,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  A
 }
 
 //-----------------------------------------------------------------------   
-AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, AliCFManager* intCFManager, AliCFManager* diffCFManager, Int_t anOption)
+AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, const AliMCEvent* anInputMc, const AliCFManager* intCFManager, const AliCFManager* diffCFManager, Int_t anOption)
 {
   //fills the event with tracks from the ESD and kinematics from the MC info via the track label
 
@@ -459,7 +455,7 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
 
 //local methods
 //-----------------------------------------------------------------------   
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* rpCuts, AliFlowTrackSimpleCuts* poiCuts)
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts)
 {
   //fills the event from a TTree of kinematic.root files
   
@@ -767,7 +763,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
 }
 
 //-----------------------------------------------------------------------   
-AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption)
+AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, const AliMCEvent* anInputMc, Int_t anOption)
 {
   //fills the event with tracks from the ESD and kinematics from the MC info via the track label
 
index bc78cabefaad54769e727fc6def903a49e582fa5..74a28d7b3a6c5a6627ffce415549531a380c4475 100644 (file)
@@ -1,8 +1,5 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
 //////////////////////////////////////////////////////////////////////////
 // AliFlowEventSimpleMaker:
 // Class to fill the AliFlowEventSimple with AliFlowTrackSimple objects
 //////////////////////////////////////////////////////////////////////////
 
 
-#ifndef AliFlowEventSimpleMaker_H
-#define AliFlowEventSimpleMaker_H
-
-#include "AliFlowEventSimple.h"  //needed as include
-#include "AliFlowTrackSimpleCuts.h"
+#ifndef ALIFLOWEVENTSIMPLEMAKER_H
+#define ALIFLOWEVENTSIMPLEMAKER_H
 
+class AliFlowEventSimple;
+class AliFlowTrackSimpleCuts;
 class TTree;
 class AliCFManager;
 class AliMCEvent;
 class AliESDEvent;
 class AliAODEvent;
-
           
 class AliFlowEventSimpleMaker {
 
@@ -33,21 +28,21 @@ class AliFlowEventSimpleMaker {
 
   void SetMCReactionPlaneAngle(Double_t fPhiRP)  { this->fMCReactionPlaneAngle = fPhiRP; } 
   //TTree
-  AliFlowEventSimple* FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* rpCuts, AliFlowTrackSimpleCuts* poiCuts);   //use own cut class
+  AliFlowEventSimple* FillTracks(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts);   //use own cut class
   //AliMCEvent
   AliFlowEventSimple* FillTracks(AliMCEvent* anInput);   //use own cuts
-  AliFlowEventSimple* FillTracks(AliMCEvent* anInput, AliCFManager* rpCFManager, AliCFManager* poiCFManager ); //use CF(2x)
+  AliFlowEventSimple* FillTracks(AliMCEvent* anInput, const AliCFManager* rpCFManager, const AliCFManager* poiCFManager ); //use CF(2x)
   //AliESDEvent
   AliFlowEventSimple* FillTracks(AliESDEvent* anInput);   //use own cuts
-  AliFlowEventSimple* FillTracks(AliESDEvent* anInput,  AliCFManager* rpCFManager, AliCFManager* poiCFManager); //use CF(2x)
+  AliFlowEventSimple* FillTracks(AliESDEvent* anInput,  const AliCFManager* rpCFManager, const AliCFManager* poiCFManager); //use CF(2x)
   //AliESDEvent & AliMCEvent
-  AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption);  //use own cuts
-  AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, AliCFManager* rpCFManager, AliCFManager* poiCFManager, Int_t anOption);  //use CF(2x)
+  AliFlowEventSimple* FillTracks(AliESDEvent* anInput, const AliMCEvent* anInputMc, Int_t anOption);  //use own cuts
+  AliFlowEventSimple* FillTracks(AliESDEvent* anInput, const AliMCEvent* anInputMc, const AliCFManager* rpCFManager, const AliCFManager* poiCFManager, Int_t anOption);  //use CF(2x)
   // anOption = 0 : kine from ESD
   // anOption = 1 : kine from MC
   //AliAODEvent
   AliFlowEventSimple* FillTracks(AliAODEvent* anInput); //use own cuts
-  AliFlowEventSimple* FillTracks(AliAODEvent* anInput, AliCFManager* rpCFManager, AliCFManager* poiCFManager);  //use CF(2x)
+  AliFlowEventSimple* FillTracks(AliAODEvent* anInput, const AliCFManager* rpCFManager, const AliCFManager* poiCFManager);  //use CF(2x)
   
   void  SetNoOfLoops(Int_t noofl) {this->fNoOfLoops = noofl;}
   Int_t GetNoOfLoops() const      {return this->fNoOfLoops;}