From b2be3d7812ca8fe6de034c30201a9f0088b2ddd1 Mon Sep 17 00:00:00 2001 From: snelling Date: Thu, 11 Mar 2010 17:39:46 +0000 Subject: [PATCH] fix coding violations --- .../AliFlowAnalysisWithLYZEventPlane.cxx | 38 ++++---- .../AliFlowAnalysisWithLYZEventPlane.h | 94 +++++++++---------- .../AliFlowCommon/AliFlowCommonConstants.cxx | 15 ++- .../AliFlowCommon/AliFlowCommonConstants.h | 64 ++++++------- 4 files changed, 102 insertions(+), 109 deletions(-) diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx index 5937cf568ba..d5778392f54 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx @@ -13,6 +13,12 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +// AliFlowAnalysisWithLYZEventPlane: +// +// Class to do flow analysis with the event plane from the LYZ method +// +// author: N. van der Kolk (kolk@nikhef.nl) + /* $Log$ */ @@ -20,13 +26,12 @@ $Log$ //#define AliFlowAnalysisWithLYZEventPlane_cxx #include "Riostream.h" //needed as include -#include "TComplex.h" //needed as include +#include "TMath.h" //needed as include #include "TProfile.h" //needed as include - -class TH1F; -class TFile; -class TList; -class TVector2; +#include "TH1F.h" +#include "TFile.h" +#include "TList.h" +#include "TVector2.h" #include "AliFlowLYZConstants.h" //needed as include #include "AliFlowCommonConstants.h" //needed as include @@ -36,14 +41,7 @@ class TVector2; #include "AliFlowCommonHistResults.h" #include "AliFlowLYZEventPlane.h" #include "AliFlowAnalysisWithLYZEventPlane.h" - -class AliFlowVector; - -// AliFlowAnalysisWithLYZEventPlane: -// -// Class to do flow analysis with the event plane from the LYZ method -// -// author: N. van der Kolk (kolk@nikhef.nl) +#include "AliFlowVector.h" ClassImp(AliFlowAnalysisWithLYZEventPlane) @@ -244,11 +242,11 @@ void AliFlowAnalysisWithLYZEventPlane::Make(AliFlowEventSimple* anEvent, AliFlow //get the Q vector from the FlowEvent AliFlowVector vQ = anEvent->GetQ(); - if (vQ.X()== 0. && vQ.Y()== 0. ) { cout<<"Q vector is NULL!"<GetBinContent(theta+1); - if (dR0!=0.) { dVtheta = dJ01/dR0 ;} + if (TMath::AreEqualAbs(dR0,0.0,1e-10)) { dVtheta = dJ01/dR0 ;} dV += dVtheta; } dV /= iNtheta; @@ -455,7 +453,7 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() { Double_t dErrdifcomb = 0.; //set error to zero Double_t dErr2difcomb = 0.; //set error to zero //calculate error - if (dNprime!=0.) { + if (TMath::AreEqualAbs(dNprime,0.0,1e-10)) { for (Int_t theta=0;thetafQ2sum; } //output - TList* GetHistList() const {return this->fHistList; } + TList* GetHistList() const {return this->fHistList; } AliFlowCommonHist* GetCommonHists() const { return this->fCommonHists; } - void SetCommonHists(AliFlowCommonHist* const aCommonHist) - { this->fCommonHists = aCommonHist; } + void SetCommonHists(AliFlowCommonHist* const aCommonHist) + { this->fCommonHists = aCommonHist; } AliFlowCommonHistResults* GetCommonHistsRes() const - { return this->fCommonHistsRes; } - void SetCommonHistsRes(AliFlowCommonHistResults* const aCommonHistResult) - { this->fCommonHistsRes = aCommonHistResult; } + { return this->fCommonHistsRes; } + void SetCommonHistsRes(AliFlowCommonHistResults* const aCommonHistResult) + { this->fCommonHistsRes = aCommonHistResult; } // !!!!! make getters and setters for all histograms TProfile* GetSecondReDtheta() const {return this->fSecondReDtheta; } void SetSecondReDtheta(TProfile* const aSecondReDtheta) - {this->fSecondReDtheta = aSecondReDtheta; } + { this->fSecondReDtheta = aSecondReDtheta; } TProfile* GetSecondImDtheta() const {return this->fSecondImDtheta; } void SetSecondImDtheta(TProfile* const aSecondImDtheta) - {this->fSecondImDtheta = aSecondImDtheta; } + { this->fSecondImDtheta = aSecondImDtheta; } TProfile* GetFirstr0theta() const {return this->fFirstr0theta; } void SetFirstr0theta(TProfile* const aFirstr0theta) - {this->fFirstr0theta = aFirstr0theta; } + { this->fFirstr0theta = aFirstr0theta; } TProfile* GetHistProVetaRP() const {return this->fHistProVetaRP;} void SetHistProVetaRP(TProfile* const aHistProVetaRP) - {this->fHistProVetaRP =aHistProVetaRP; } + { this->fHistProVetaRP =aHistProVetaRP; } TProfile* GetHistProVetaPOI() const {return this->fHistProVetaPOI;} void SetHistProVetaPOI(TProfile* const aHistProVetaPOI) - {this->fHistProVetaPOI = aHistProVetaPOI; } + { this->fHistProVetaPOI = aHistProVetaPOI; } TProfile* GetHistProVPtRP() const {return this->fHistProVPtRP;} void SetHistProVPtRP(TProfile* const aHistProVPtRP) - {this->fHistProVPtRP =aHistProVPtRP; } + { this->fHistProVPtRP =aHistProVPtRP; } TProfile* GetHistProVPtPOI() const {return this->fHistProVPtPOI;} void SetHistProVPtPOI(TProfile* const aHistProVPtPOI) - {this->fHistProVPtPOI = aHistProVPtPOI; } + { this->fHistProVPtPOI = aHistProVPtPOI; } TProfile* GetHistProWr() const {return this->fHistProWr; } void SetHistProWr(TProfile* const aHistProWr) - {this->fHistProWr = aHistProWr; } + { this->fHistProWr = aHistProWr; } TProfile* GetHistProWrCorr() const {return this->fHistProWrCorr; } void SetHistProWrCorr(TProfile* const aHistProWrCorr) - {this->fHistProWrCorr = aHistProWrCorr; } + { this->fHistProWrCorr = aHistProWrCorr; } TH1F* GetHistQsumforChi() const {return this->fHistQsumforChi; } void SetHistQsumforChi(TH1F* const aHistQsumforChi) - {this->fHistQsumforChi = aHistQsumforChi; } + { this->fHistQsumforChi = aHistQsumforChi; } TH1F* GetHistDeltaPhi() const {return this->fHistDeltaPhi; } void SetHistDeltaPhi(TH1F* const aHistDeltaPhi) - {this->fHistDeltaPhi = aHistDeltaPhi; } + { this->fHistDeltaPhi = aHistDeltaPhi; } TH1F* GetHistDeltaPhi2() const {return this->fHistDeltaPhi2; } void SetHistDeltaPhi2(TH1F* const aHistDeltaPhi2) - {this->fHistDeltaPhi2 = aHistDeltaPhi2; } + { this->fHistDeltaPhi2 = aHistDeltaPhi2; } TH1F* GetHistDeltaPhihere() const {return this->fHistDeltaPhihere; } void SetHistDeltaPhihere(TH1F* const aHistDeltaPhihere) - {this->fHistDeltaPhihere = aHistDeltaPhihere; } + { this->fHistDeltaPhihere = aHistDeltaPhihere; } TH1F* GetHistPhiEP() const {return this->fHistPhiEP; } void SetHistPhiEP(TH1F* const aHistPhiEP) - {this->fHistPhiEP = aHistPhiEP; } + { this->fHistPhiEP = aHistPhiEP; } TH1F* GetHistPhiEPhere() const {return this->fHistPhiEPhere; } void SetHistPhiEPhere(TH1F* const aHistPhiEPhere) - {this->fHistPhiEPhere = aHistPhiEPhere; } + { this->fHistPhiEPhere = aHistPhiEPhere; } TH1F* GetHistPhiLYZ() const {return this->fHistPhiLYZ; } void SetHistPhiLYZ(TH1F* const aHistPhiLYZ) - {this->fHistPhiLYZ = aHistPhiLYZ; } + { this->fHistPhiLYZ = aHistPhiLYZ; } TH1F* GetHistPhiLYZ2() const {return this->fHistPhiLYZ2;} void SetHistPhiLYZ2(TH1F* const aHistPhiLYZ2) - {this->fHistPhiLYZ2 = aHistPhiLYZ2; } + { this->fHistPhiLYZ2 = aHistPhiLYZ2; } //input void SetSecondRunList(TList* const list) { this->fSecondRunList = list; } @@ -128,23 +124,23 @@ class AliFlowAnalysisWithLYZEventPlane { TProfile* fFirstr0theta; // input profile //output - TProfile* fHistProVetaRP; // - TProfile* fHistProVetaPOI; // - TProfile* fHistProVPtRP; // - TProfile* fHistProVPtPOI; // - TProfile* fHistProWr; // - TProfile* fHistProWrCorr; // - TH1F* fHistQsumforChi; // - TH1F* fHistDeltaPhi; // - TH1F* fHistDeltaPhi2; // - TH1F* fHistDeltaPhihere; // - TH1F* fHistPhiEP; // - TH1F* fHistPhiEPhere; // - TH1F* fHistPhiLYZ; // - TH1F* fHistPhiLYZ2; // + TProfile* fHistProVetaRP; // output + TProfile* fHistProVetaPOI; // output + TProfile* fHistProVPtRP; // output + TProfile* fHistProVPtPOI; // output + TProfile* fHistProWr; // output + TProfile* fHistProWrCorr; // output + TH1F* fHistQsumforChi; // output + TH1F* fHistDeltaPhi; // output + TH1F* fHistDeltaPhi2; // output + TH1F* fHistDeltaPhihere; // output + TH1F* fHistPhiEP; // output + TH1F* fHistPhiEPhere; // output + TH1F* fHistPhiLYZ; // output + TH1F* fHistPhiLYZ2; // output - AliFlowCommonHist* fCommonHists; // - AliFlowCommonHistResults* fCommonHistsRes; // + AliFlowCommonHist* fCommonHists; // output + AliFlowCommonHistResults* fCommonHistsRes; // output Int_t fEventNumber; // event counter diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.cxx index 9d2a3f6bc10..bd783c5b65a 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.cxx @@ -12,14 +12,6 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ - -/* -$Log$ -*/ - -#include -#include -#include "AliFlowCommonConstants.h" // AliFlowCommonConstants: // // Constants for the common histograms in the flow analysis @@ -30,6 +22,13 @@ $Log$ // Author: Naomi van der Kolk (kolk@nikhef.nl) // mod: Mikolaj Krzewicki, Nikhef (mikolaj.krzewicki@cern.ch) +/* +$Log$ +*/ + +#include +#include "AliFlowCommonConstants.h" + ClassImp(AliFlowCommonConstants) AliFlowCommonConstants* AliFlowCommonConstants::fgPMasterConfig = NULL; diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.h b/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.h index ea10660a7eb..91faf2085fa 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.h +++ b/PWG2/FLOW/AliFlowCommon/AliFlowCommonConstants.h @@ -22,22 +22,22 @@ class AliFlowCommonConstants: public TNamed { virtual ~AliFlowCommonConstants(); static AliFlowCommonConstants* GetMaster(); - Int_t GetNbinsMult() { return fNbinsMult; } - Int_t GetNbinsPt() { return fNbinsPt; } - Int_t GetNbinsPhi() { return fNbinsPhi; } - Int_t GetNbinsEta() { return fNbinsEta; } - Int_t GetNbinsQ() { return fNbinsQ; } + Int_t GetNbinsMult() const { return fNbinsMult; } + Int_t GetNbinsPt() const { return fNbinsPt; } + Int_t GetNbinsPhi() const { return fNbinsPhi; } + Int_t GetNbinsEta() const { return fNbinsEta; } + Int_t GetNbinsQ() const { return fNbinsQ; } - Double_t GetMultMin() { return fMultMin; } - Double_t GetMultMax() { return fMultMax; } - Double_t GetPtMin() { return fPtMin; } - Double_t GetPtMax() { return fPtMax; } - Double_t GetPhiMin() { return fPhiMin; } - Double_t GetPhiMax() { return fPhiMax; } - Double_t GetEtaMin() { return fEtaMin; } - Double_t GetEtaMax() { return fEtaMax; } - Double_t GetQMin() { return fQMin; } - Double_t GetQMax() { return fQMax; } + Double_t GetMultMin() const { return fMultMin; } + Double_t GetMultMax() const { return fMultMax; } + Double_t GetPtMin() const { return fPtMin; } + Double_t GetPtMax() const { return fPtMax; } + Double_t GetPhiMin() const { return fPhiMin; } + Double_t GetPhiMax() const { return fPhiMax; } + Double_t GetEtaMin() const { return fEtaMin; } + Double_t GetEtaMax() const { return fEtaMax; } + Double_t GetQMin() const { return fQMin; } + Double_t GetQMax() const { return fQMax; } void SetNbinsMult( Int_t i ) { fNbinsMult = i; } void SetNbinsPt( Int_t i ) { fNbinsPt = i; } @@ -61,27 +61,27 @@ class AliFlowCommonConstants: public TNamed { AliFlowCommonConstants(const AliFlowCommonConstants& a); //histogram sizes - Int_t fNbinsMult; // - Int_t fNbinsPt; // - Int_t fNbinsPhi; // - Int_t fNbinsEta; // - Int_t fNbinsQ; // + Int_t fNbinsMult; // histogram size + Int_t fNbinsPt; // histogram size + Int_t fNbinsPhi; // histogram size + Int_t fNbinsEta; // histogram size + Int_t fNbinsQ; // histogram size // Histograms limits - Double_t fMultMin; // - Double_t fMultMax; // - Double_t fPtMin; // - Double_t fPtMax; // - Double_t fPhiMin; // - Double_t fPhiMax; // - Double_t fEtaMin; // - Double_t fEtaMax; // - Double_t fQMin; // - Double_t fQMax; // + Double_t fMultMin; // histogram limit + Double_t fMultMax; // histogram limit + Double_t fPtMin; // histogram limit + Double_t fPtMax; // histogram limit + Double_t fPhiMin; // histogram limit + Double_t fPhiMax; // histogram limit + Double_t fEtaMin; // histogram limit + Double_t fEtaMax; // histogram limit + Double_t fQMin; // histogram limit + Double_t fQMax; // histogram limit - static AliFlowCommonConstants* fgPMasterConfig; + static AliFlowCommonConstants* fgPMasterConfig; //master object - ClassDef(AliFlowCommonConstants,1) // macro for rootcint + ClassDef(AliFlowCommonConstants,1) //ClassDef }; #endif -- 2.39.3