* 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$
*/
//#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
#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)
//get the Q vector from the FlowEvent
AliFlowVector vQ = anEvent->GetQ();
- if (vQ.X()== 0. && vQ.Y()== 0. ) { cout<<"Q vector is NULL!"<<endl; }
+ //if (vQ.X()== 0. && vQ.Y()== 0. ) { cout<<"Q vector is NULL!"<<endl; } //coding violation
//Weight with the multiplicity
Double_t dQX = 0.;
Double_t dQY = 0.;
- if (vQ.GetMult()!=0.) {
+ if (TMath::AreEqualAbs(vQ.GetMult(),0.0,1e-10)) {
dQX = vQ.X()/vQ.GetMult();
dQY = vQ.Y()/vQ.GetMult();
} else {cerr<<"vQ.GetMult() is zero!"<<endl; }
Double_t dV = 0;
for (Int_t theta=0;theta<iNtheta;theta++) {
Double_t dR0 = fFirstr0theta->GetBinContent(theta+1);
- if (dR0!=0.) { dVtheta = dJ01/dR0 ;}
+ if (TMath::AreEqualAbs(dR0,0.0,1e-10)) { dVtheta = dJ01/dR0 ;}
dV += dVtheta;
}
dV /= iNtheta;
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;theta<iNtheta;theta++) {
Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
} //loop over theta
}
- if (dErr2difcomb!=0.) {
+ if (TMath::AreEqualAbs(dErr2difcomb, 0.0, 1e-10)) {
dErr2difcomb /= iNtheta;
dErrdifcomb = TMath::Sqrt(dErr2difcomb);
}
} //loop over bins b
- if (dSum != 0.) {
+ if (TMath::AreEqualAbs(dSum, 0.0, 1e-10)) {
dVRP /= dSum; //the pt distribution should be normalised
dErrV /= (dSum*dSum);
dErrV = TMath::Sqrt(dErrV);
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+
+// AliFlowAnalysisWithLYZEventPlane:
+// Class to do flow analysis with the event plane
+// from the LYZ method
+// author: N. van der Kolk (kolk@nikhef.nl)
+
/* $Id$ */
#ifndef ALIFLOWANALYSISWITHLYZEVENTPLANE_H
#define ALIFLOWANALYSISWITHLYZEVENTPLANE_H
-class AliFlowVector;
-class AliFlowTrackSimple;
class AliFlowEventSimple;
class AliFlowCommonHist;
class AliFlowCommonHistResults;
class AliFlowLYZEventPlane;
class TString;
-class TFile;
class TProfile;
class TH1F;
-class TH1D;
class TList;
-class Riostream;
-
-// AliFlowAnalysisWithLYZEventPlane:
-// Class to do flow analysis with the event plane from the LYZ method
-// author: N. van der Kolk (kolk@nikhef.nl)
-
class AliFlowAnalysisWithLYZEventPlane {
Double_t GetQ2sum() const { return this->fQ2sum; }
//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; }
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
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; }
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