* 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"
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)
//-----------------------------------------------------------------------
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);
}
}//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);
/* 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;
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 {
// 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:
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
#include "TTimeStamp.h"
// ALICE Analysis Framework
-class AliAnalysisTask;
#include "AliAnalysisManager.h"
+#include "AliAnalysisTaskSE.h"
// ESD interface
#include "AliESDEvent.h"
#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)
//________________________________________________________________________
#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:
#include "TTimeStamp.h"
// ALICE Analysis Framework
-class AliAnalysisTaskSE;
+#include "AliAnalysisTaskSE.h"
#include "AliAnalysisManager.h"
// ESD interface
#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"
* 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"
}
//-----------------------------------------------------------------------
-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
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;
//-----------------------------------------------------------------------
-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
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() ); }
}
//-----------------------------------------------------------------------
-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
}
//-----------------------------------------------------------------------
-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
//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
}
//-----------------------------------------------------------------------
-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
/* 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 {
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;}