]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
start of moving various methods into the flowevent
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Apr 2010 21:04:19 +0000 (21:04 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Apr 2010 21:04:19 +0000 (21:04 +0000)
19 files changed:
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithCumulants.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithCumulants.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithNestedLoops.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.h
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithScalarProduct.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithScalarProduct.h
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.h
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimple.h
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/Tools/glauberMC/AliGlauberMC.cxx
PWG2/FLOW/macros/runFlowAnalysis.C

index 316d5311a7a917ae5a757c4e28eea8dca2a32d46..5ec79ed751fe376e88ed1390fb119cf0c51ba634 100644 (file)
 #define AliFlowAnalysisWithCumulants_cxx
 
 #include "Riostream.h"
-#include "AliFlowCommonConstants.h"
-#include "AliFlowCommonHist.h"
-#include "AliFlowCommonHistResults.h"
-#include "TChain.h"
+#include "TMath.h"
 #include "TFile.h"
-#include "TList.h" //NEW
-#include "TParticle.h"
-#include "TRandom3.h"
+#include "TList.h"
 #include "TProfile.h"
 #include "TProfile2D.h" 
 #include "TProfile3D.h"
+#include "TH1.h"
+#include "TH1F.h"
+#include "TH1D.h"
+
+#include "AliFlowCommonConstants.h"
+#include "AliFlowCommonHist.h"
+#include "AliFlowCommonHistResults.h"
 #include "AliFlowEventSimple.h"
 #include "AliFlowTrackSimple.h"
 #include "AliFlowAnalysisWithCumulants.h"
 #include "AliFlowCumuConstants.h"
 #include "AliCumulantsFunctions.h"
+#include "AliFlowVector.h"
 
-class TH1;
-class TGraph;
-class TPave;
-class TLatex;
-class TMarker;
-class TRandom3;
-class TObjArray;
-class TList;
-class TCanvas;
-class TSystem;
-class TROOT;
-class AliFlowVector;
-class TVector;
 
 //================================================================================================================
 
index f797d275722df58e54290e75ce48773ce0fb563e..4e86c7af78d76d773a7b26a87a5d74f765575d86 100644 (file)
@@ -21,10 +21,11 @@ class TObjArray;
 class TList;
 class TFile;
 
-class TH1;
+class TH1D;
 class TProfile;
 class TProfile2D;
 class TProfile3D;
+class TDirectoryFile;
 
 class AliFlowEventSimple;
 class AliFlowTrackSimple;
index 09c4d1e51e97c0881efd3f7f88a6e0c8019b91f5..c15940815ef6ae426de9c7ecc927dd2b79eec43a 100644 (file)
 class TObjArray;
 class TList;
 class TFile;
+class TDirectoryFile;
 
-class TH1;
+class TH1F;
+class TH1D;
 class TLegend;
 class TProfile;
 
index bc31635aad7c165b7d9cac0d38895294e9428083..c6051afb38fe47f885488d3648b53bc109266aed 100644 (file)
@@ -27,6 +27,7 @@
 #include "TList.h"
 #include "TH1F.h"
 #include "TMath.h"
+#include "TVector2.h"
 
 #include "AliFlowCommonConstants.h"
 #include "AliFlowEventSimple.h"
@@ -34,6 +35,7 @@
 #include "AliFlowCommonHist.h"
 #include "AliFlowCommonHistResults.h"
 #include "AliFlowAnalysisWithMCEventPlane.h"
+#include "AliFlowVector.h"
 
 class AliFlowVector;
 
index 5e55809b31f0fcdc1448239f0be669c2f8ea862d..d40b9085efee6d6152aeee03c7ded25b60a71e09 100644 (file)
@@ -11,6 +11,7 @@
 
 class TVector2;
 class TString;
+class TDirectoryFile;
 
 class AliFlowTrackSimple;
 class AliFlowEventSimple;
index 32cc88057d2dd8aa97a3da5c027b392c29fd6bb7..5b652af0231d11c742be2254c4044b966fdda435 100644 (file)
 #include "AliFlowCommonConstants.h" // needed as include
 #include "TMatrixD.h"
 
+class TDirectoryFile;
 class TList;
 class TFile;
-class TH1;
+class TH1F;
+class TH1D;
 class TH2;
 class TH2D;
 class TProfile;
index ef51a1627769ab432eef18bc5b482fd203e62c35..36e897d2dd6379db06e1172bb0aa5e6cf19e8728 100644 (file)
@@ -19,8 +19,9 @@
 #include "AliFlowCommonConstants.h" // needed as include
 
 class TList;
-class TFile;
-class TH1;
+class TDirectoryFile;
+class TH1F;
+class TH1D;
 class TProfile;
 
 class AliFlowEventSimple;
index 99d8687a5f17a8187d45321663904666541ed556..1f4aa5a3a75820961cacd6180d617497bd6ded12 100644 (file)
@@ -27,6 +27,7 @@ class TGraph;
 class TH1;
 class TProfile;
 class TProfile2D;
+class TDirectoryFile;
 
 class AliFlowEventSimple;
 class AliFlowVector;
index 13bd288cda1031a842ca69771a99c02c328632a4..e823adf0f7cb312e2dcbaff48dfe994014562d92 100644 (file)
 
 #define AliFlowAnalysisWithScalarProduct_cxx
  
-#include "Riostream.h"  //needed as include
-#include "TFile.h"      //needed as include
+#include "Riostream.h"
+#include "TFile.h"      
 #include "TList.h"
 #include "TMath.h"
 #include "TProfile.h"
 #include "TVector2.h"
+#include "TH1F.h"
 
-class TH1F;
-
-#include "AliFlowCommonConstants.h"    //needed as include
+#include "AliFlowCommonConstants.h"
 #include "AliFlowEventSimple.h"
 #include "AliFlowTrackSimple.h"
 #include "AliFlowCommonHist.h"
 #include "AliFlowCommonHistResults.h"
 #include "AliFlowAnalysisWithScalarProduct.h"
-
-class AliFlowVector;
+#include "AliFlowVector.h"
 
 //////////////////////////////////////////////////////////////////////////////
 // AliFlowAnalysisWithScalarProduct:
index 1dcae1ad2fdca6c9d06e74bddcd5c6d56be0f445..810090eb2f0c40ecf3a29551125517038a906639 100644 (file)
@@ -18,6 +18,7 @@ class TProfile;
 class TList;
 class TFile;
 class Riostream;
+class TDirectoryFile;
 
 /////////////////////////////////////////////////////////////////////////////
 // Description: Maker to analyze Flow from the Scalar Product method.
index 7f2500dceac9199726ac03ec0624781a5fc6c33e..3ad1a66d59bdce3ec96648890020b4a3773aad9f 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/*****************************************************************
+  AliFlowEventSimple: A simple event 
+  for flow analysis                  
+                                     
+  origin: Naomi van der Kolk (kolk@nikhef.nl)           
+          Ante Bilandzic     (anteb@nikhef.nl)         
+          Raimond Snellings  (Raimond.Snellings@nikhef.nl)    
+  mods:   Mikolaj Krzewicki  (mikolaj.krzewicki@cern.ch)
+*****************************************************************/
+
 #include "Riostream.h"
 #include "TObjArray.h"
 #include "TFile.h"
 #include "TList.h"
+#include "TTree.h"
+#include "TParticle.h"
 #include "TMath.h"
 #include "TH1F.h"
 #include "TH1D.h"
 #include "TProfile.h"
+#include "TParameter.h"
 #include "TBrowser.h"
 #include "AliFlowVector.h"
 #include "AliFlowTrackSimple.h"
 #include "AliFlowEventSimple.h"
+#include "AliFlowTrackSimpleCuts.h"
 
-/**************************************
- * AliFlowEventSimple: A simple event *
- *  for flow analysis                 * 
- *                                    * 
- * authors: Naomi van der Kolk        *
- *           (kolk@nikhef.nl)         *  
- *          Ante Bilandzic            *
- *           (anteb@nikhef.nl)        * 
- * ***********************************/
 ClassImp(AliFlowEventSimple)
 
 //-----------------------------------------------------------------------
@@ -45,6 +49,7 @@ AliFlowEventSimple::AliFlowEventSimple():
   fNumberOfTracks(0),
   fEventNSelTracksRP(0),
   fMCReactionPlaneAngle(0.),
+  fMCReactionPlaneAngleIsSet(kFALSE),
   fNumberOfTracksWrap(NULL),
   fEventNSelTracksRPWrap(NULL),
   fMCReactionPlaneAngleWrap(NULL)
@@ -59,12 +64,13 @@ AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght):
   fNumberOfTracks(0),
   fEventNSelTracksRP(0),
   fMCReactionPlaneAngle(0.),
+  fMCReactionPlaneAngleIsSet(kFALSE),
   fNumberOfTracksWrap(NULL),
   fEventNSelTracksRPWrap(NULL),
   fMCReactionPlaneAngleWrap(NULL)
 {
-  //constructor 
-  fTrackCollection =  new TObjArray(aLenght) ;
+  //constructor
+  fTrackCollection =  new TObjArray(aLenght);
 }
 
 //-----------------------------------------------------------------------
@@ -75,11 +81,12 @@ AliFlowEventSimple::AliFlowEventSimple(const AliFlowEventSimple& anEvent):
   fNumberOfTracks(anEvent.fNumberOfTracks),
   fEventNSelTracksRP(anEvent.fEventNSelTracksRP),
   fMCReactionPlaneAngle(anEvent.fMCReactionPlaneAngle),
+  fMCReactionPlaneAngleIsSet(anEvent.fMCReactionPlaneAngleIsSet),
   fNumberOfTracksWrap(anEvent.fNumberOfTracksWrap),
   fEventNSelTracksRPWrap(anEvent.fEventNSelTracksRPWrap),
   fMCReactionPlaneAngleWrap(anEvent.fMCReactionPlaneAngleWrap)
 {
-  //copy constructor 
+  //copy constructor
 }
 
 //-----------------------------------------------------------------------
@@ -90,25 +97,27 @@ AliFlowEventSimple& AliFlowEventSimple::operator=(const AliFlowEventSimple& anEv
   fNumberOfTracks = anEvent.fNumberOfTracks;
   fEventNSelTracksRP = anEvent.fEventNSelTracksRP;
   fMCReactionPlaneAngle = anEvent.fMCReactionPlaneAngle;
-  fNumberOfTracksWrap = anEvent.fNumberOfTracksWrap; 
+  fMCReactionPlaneAngleIsSet = anEvent.fMCReactionPlaneAngleIsSet;
+  fNumberOfTracksWrap = anEvent.fNumberOfTracksWrap;
   fEventNSelTracksRPWrap = anEvent.fEventNSelTracksRPWrap;
   fMCReactionPlaneAngleWrap=anEvent.fMCReactionPlaneAngleWrap;
 
   return *this;
 }
 
-//----------------------------------------------------------------------- 
+//-----------------------------------------------------------------------
 
 AliFlowEventSimple::~AliFlowEventSimple()
 {
   //destructor
-  if (fTrackCollection) fTrackCollection->Delete(); delete fTrackCollection;
+  if (fTrackCollection) fTrackCollection->Delete();
+  delete fTrackCollection;
   if (fNumberOfTracksWrap) delete fNumberOfTracksWrap;
   if (fEventNSelTracksRPWrap) delete fEventNSelTracksRPWrap;
   if (fMCReactionPlaneAngleWrap) delete fMCReactionPlaneAngleWrap;
 }
 
-//----------------------------------------------------------------------- 
+//-----------------------------------------------------------------------
 
 AliFlowTrackSimple* AliFlowEventSimple::GetTrack(Int_t i)
 {
@@ -117,200 +126,221 @@ AliFlowTrackSimple* AliFlowEventSimple::GetTrack(Int_t i)
   return pTrack;
 }
 
-//-----------------------------------------------------------------------   
-AliFlowVector AliFlowEventSimple::GetQ(Int_t n, TList *weightsList, Bool_t usePhiWeights, Bool_t usePtWeights, Bool_t useEtaWeights) 
+//-----------------------------------------------------------------------
+AliFlowVector AliFlowEventSimple::GetQ(Int_t n, TList *weightsList, Bool_t usePhiWeights, Bool_t usePtWeights, Bool_t useEtaWeights)
 {
-  // calculate Q-vector in harmonic n without weights (default harmonic n=2)  
+  // calculate Q-vector in harmonic n without weights (default harmonic n=2)
   Double_t dQX = 0.;
   Double_t dQY = 0.;
   AliFlowVector vQ;
   vQ.Set(0.,0.);
-  
+
   Int_t iOrder = n;
   Double_t iUsedTracks = 0;
   Double_t dPhi=0.;
   Double_t dPt=0.;
   Double_t dEta=0.;
-  
+
   AliFlowTrackSimple* pTrack = NULL;
-  Int_t nBinsPhi=0; 
+
+  Int_t nBinsPhi=0;
   Double_t dBinWidthPt=0.;
   Double_t dPtMin=0.;
   Double_t dBinWidthEta=0.;
   Double_t dEtaMin=0.;
-  Double_t wPhi=1.; // weight Phi  
-  Double_t wPt=1.;  // weight Pt 
-  Double_t wEta=1.; // weight Eta 
-  
+
+  Double_t wPhi=1.; // weight Phi
+  Double_t wPt=1.;  // weight Pt
+  Double_t wEta=1.; // weight Eta
+
   TH1F *phiWeights = NULL;
   TH1D *ptWeights  = NULL;
   TH1D *etaWeights = NULL;
-  
+
   if(weightsList)
   {
-   if(usePhiWeights)
-   {
-    phiWeights = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights"));
-    if(phiWeights) nBinsPhi = phiWeights->GetNbinsX();
-   }          
-   if(usePtWeights)
-   {
-    ptWeights = dynamic_cast<TH1D *>(weightsList->FindObject("pt_weights"));
-    if(ptWeights)
+    if(usePhiWeights)
+    {
+      phiWeights = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights"));
+      if(phiWeights) nBinsPhi = phiWeights->GetNbinsX();
+    }
+    if(usePtWeights)
     {
-     dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
-     dPtMin = (ptWeights->GetXaxis())->GetXmin();
-    } 
-   }       
-   if(useEtaWeights)
-   {
-    etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights"));
-    if(etaWeights)
+      ptWeights = dynamic_cast<TH1D *>(weightsList->FindObject("pt_weights"));
+      if(ptWeights)
+      {
+        dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
+        dPtMin = (ptWeights->GetXaxis())->GetXmin();
+      }
+    }
+    if(useEtaWeights)
     {
-     dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
-     dEtaMin = (etaWeights->GetXaxis())->GetXmin();
-    } 
-   }          
+      etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights"));
+      if(etaWeights)
+      {
+        dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
+        dEtaMin = (etaWeights->GetXaxis())->GetXmin();
+      }
+    }
   } // end of if(weightsList)
-  
-  // loop over tracks    
-  for(Int_t i=0;i<fNumberOfTracks;i++)                               
+
+  // loop over tracks
+  for(Int_t i=0; i<fNumberOfTracks; i++)
   {
-   pTrack = (AliFlowTrackSimple*)TrackCollection()->At(i); 
-   if(pTrack)
-   {
-    if(pTrack->InRPSelection()) 
+    pTrack = (AliFlowTrackSimple*)TrackCollection()->At(i);
+    if(pTrack)
     {
-     dPhi = pTrack->Phi();
-     dPt  = pTrack->Pt();
-     dEta = pTrack->Eta();
-     
-     // determine Phi weight: (to be improved, I should here only access it + the treatment of gaps in the if statement)
-     if(phiWeights && nBinsPhi)
-     {
-      wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
-     }
-     // determine v'(pt) weight:    
-     if(ptWeights && dBinWidthPt)
-     {
-      wPt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt))); 
-     }            
-     // determine v'(eta) weight:    
-     if(etaWeights && dBinWidthEta)
-     {
-      wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta))); 
-     } 
-
-     // building up the weighted Q-vector:       
-     dQX += wPhi*wPt*wEta*TMath::Cos(iOrder*dPhi);
-     dQY += wPhi*wPt*wEta*TMath::Sin(iOrder*dPhi); 
-    
-     // weighted multiplicity:
-     iUsedTracks+=wPhi*wPt*wEta;
-         
-    } // end of if (pTrack->InRPSelection())
-   } // end of if (pTrack)
-   else {cerr << "no particle!!!"<<endl;}
+      if(pTrack->InRPSelection())
+      {
+        dPhi = pTrack->Phi();
+        dPt  = pTrack->Pt();
+        dEta = pTrack->Eta();
+
+        // determine Phi weight: (to be improved, I should here only access it + the treatment of gaps in the if statement)
+        if(phiWeights && nBinsPhi)
+        {
+          wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
+        }
+        // determine v'(pt) weight:
+        if(ptWeights && dBinWidthPt)
+        {
+          wPt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt)));
+        }
+        // determine v'(eta) weight:
+        if(etaWeights && dBinWidthEta)
+        {
+          wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta)));
+        }
+
+        // building up the weighted Q-vector:
+        dQX += wPhi*wPt*wEta*TMath::Cos(iOrder*dPhi);
+        dQY += wPhi*wPt*wEta*TMath::Sin(iOrder*dPhi);
+
+        // weighted multiplicity:
+        iUsedTracks+=wPhi*wPt*wEta;
+
+      } // end of if (pTrack->InRPSelection())
+    } // end of if (pTrack)
+    else
+    {
+      cerr << "no particle!!!"<<endl;
+    }
   } // loop over particles
-    
+
   vQ.Set(dQX,dQY);
   vQ.SetMult(iUsedTracks);
-  
+
   return vQ;
-  
+
 }
 
-//-----------------------------------------------------------------------   
-void AliFlowEventSimple::Get2Qsub(AliFlowVector* Qarray, Int_t n, TList *weightsList, Bool_t usePhiWeights, Bool_t usePtWeights, Bool_t useEtaWeights) 
+//-----------------------------------------------------------------------
+void AliFlowEventSimple::Get2Qsub(AliFlowVector* Qarray, Int_t n, TList *weightsList, Bool_t usePhiWeights, Bool_t usePtWeights, Bool_t useEtaWeights)
 {
-  
-  // calculate Q-vector in harmonic n without weights (default harmonic n=2)  
+
+  // calculate Q-vector in harmonic n without weights (default harmonic n=2)
   Double_t dQX = 0.;
   Double_t dQY = 0.;
-    
+
   Int_t iOrder = n;
   Double_t iUsedTracks = 0;
   Double_t dPhi = 0.;
   Double_t dPt  = 0.;
   Double_t dEta = 0.;
-  
+
   AliFlowTrackSimple* pTrack = NULL;
-  Int_t    iNbinsPhi   = 0; 
+
+  Int_t    iNbinsPhi   = 0;
   Double_t dBinWidthPt = 0.;
   Double_t dPtMin      = 0.;
   Double_t dBinWidthEta= 0.;
   Double_t dEtaMin     = 0.;
-  Double_t dWphi = 1.;  // weight Phi  
-  Double_t dWpt  = 1.;  // weight Pt 
-  Double_t dWeta = 1.;  // weight Eta 
-  
+
+  Double_t dWphi = 1.;  // weight Phi
+  Double_t dWpt  = 1.;  // weight Pt
+  Double_t dWeta = 1.;  // weight Eta
+
   TH1F* phiWeights = NULL;
   TH1D* ptWeights  = NULL;
   TH1D* etaWeights = NULL;
-  
-  if(weightsList) {
-    if(usePhiWeights) {
+
+  if(weightsList)
+  {
+    if(usePhiWeights)
+    {
       phiWeights = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights"));
-      if(phiWeights) { 
-       iNbinsPhi = phiWeights->GetNbinsX(); 
+      if(phiWeights)
+      {
+        iNbinsPhi = phiWeights->GetNbinsX();
       }
-    }          
-    if(usePtWeights) {
+    }
+    if(usePtWeights)
+    {
       ptWeights = dynamic_cast<TH1D *>(weightsList->FindObject("pt_weights"));
-      if(ptWeights) {
-       dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
-       dPtMin = (ptWeights->GetXaxis())->GetXmin();
-      } 
-    }       
-   if(useEtaWeights) {
-     etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights"));
-     if(etaWeights) {
-       dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
-       dEtaMin = (etaWeights->GetXaxis())->GetXmin();
-     } 
-   }          
+      if(ptWeights)
+      {
+        dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
+        dPtMin = (ptWeights->GetXaxis())->GetXmin();
+      }
+    }
+    if(useEtaWeights)
+    {
+      etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights"));
+      if(etaWeights)
+      {
+        dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
+        dEtaMin = (etaWeights->GetXaxis())->GetXmin();
+      }
+    }
   } // end of if(weightsList)
-  
+
   //loop over the two subevents
-  for (Int_t s=0;s<2;s++) {
-    // loop over tracks    
-    for(Int_t i=0;i<fNumberOfTracks;i++) {
-      pTrack = (AliFlowTrackSimple*)TrackCollection()->At(i); 
-      if(pTrack) {
-       if(pTrack->InRPSelection()) {
-         if (pTrack->InSubevent(s)) {
-           dPhi = pTrack->Phi();
-           dPt  = pTrack->Pt();
-           dEta = pTrack->Eta();
-                 
-           // determine Phi weight: (to be improved, I should here only access it + the treatment of gaps in the if statement)
-           if(phiWeights && iNbinsPhi)  {
-             dWphi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*iNbinsPhi/TMath::TwoPi())));
-           }
-           // determine v'(pt) weight:    
-           if(ptWeights && dBinWidthPt) {
-             dWpt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt))); 
-           }            
-           // determine v'(eta) weight:    
-           if(etaWeights && dBinWidthEta) {
-             dWeta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta))); 
-           } 
-                   
-           // building up the weighted Q-vector:       
-           dQX += dWphi*dWpt*dWeta*TMath::Cos(iOrder*dPhi);
-           dQY += dWphi*dWpt*dWeta*TMath::Sin(iOrder*dPhi); 
-                   
-           // weighted multiplicity:
-           iUsedTracks+=dWphi*dWpt*dWeta;
-                                   
-         } // end of subevent 
-       } // end of if (pTrack->InRPSelection())
+  for (Int_t s=0; s<2; s++)
+  {
+    // loop over tracks
+    for(Int_t i=0; i<fNumberOfTracks; i++)
+    {
+      pTrack = (AliFlowTrackSimple*)TrackCollection()->At(i);
+      if(pTrack)
+      {
+        if(pTrack->InRPSelection())
+        {
+          if (pTrack->InSubevent(s))
+          {
+            dPhi = pTrack->Phi();
+            dPt  = pTrack->Pt();
+            dEta = pTrack->Eta();
+
+            // determine Phi weight: (to be improved, I should here only access it + the treatment of gaps in the if statement)
+            if(phiWeights && iNbinsPhi)
+            {
+              dWphi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*iNbinsPhi/TMath::TwoPi())));
+            }
+            // determine v'(pt) weight:
+            if(ptWeights && dBinWidthPt)
+            {
+              dWpt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt)));
+            }
+            // determine v'(eta) weight:
+            if(etaWeights && dBinWidthEta)
+            {
+              dWeta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta)));
+            }
+
+            // building up the weighted Q-vector:
+            dQX += dWphi*dWpt*dWeta*TMath::Cos(iOrder*dPhi);
+            dQY += dWphi*dWpt*dWeta*TMath::Sin(iOrder*dPhi);
+
+            // weighted multiplicity:
+            iUsedTracks+=dWphi*dWpt*dWeta;
+
+          } // end of subevent
+        } // end of if (pTrack->InRPSelection())
       } // end of if (pTrack)
-      else {cerr << "no particle!!!"<<endl;}
+      else
+      {
+        cerr << "no particle!!!"<<endl;
+      }
     } // loop over particles
     Qarray[s].Set(dQX,dQY);
     Qarray[s].SetMult(iUsedTracks);
@@ -319,44 +349,122 @@ void AliFlowEventSimple::Get2Qsub(AliFlowVector* Qarray, Int_t n, TList *weights
     dQX = 0.;
     dQY = 0.;
   }
-     
+
 }
 
 
-//----------------------------------------------------------------------- 
+//-----------------------------------------------------------------------
 void AliFlowEventSimple::Print(Option_t *option) const
 {
   //   -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-*
   //             ===============================================
   //   printf( "TH1.Print Name  = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
   printf( "Class.Print Name = %s, Total number of tracks= %d, Number of selected tracks= %d, MC EventPlaneAngle= %f",
-         GetName(),fNumberOfTracks, fEventNSelTracksRP, fMCReactionPlaneAngle );
+          GetName(),fNumberOfTracks, fEventNSelTracksRP, fMCReactionPlaneAngle );
 
-  if (fTrackCollection) {  
+  if (fTrackCollection)
+  {
     fTrackCollection->Print(option);
   }
-  else {
+  else
+  {
     printf( "Empty track collection \n");
   }
 }
 
-//----------------------------------------------------------------------- 
- void AliFlowEventSimple::Browse(TBrowser *b)
+//-----------------------------------------------------------------------
+void AliFlowEventSimple::Browse(TBrowser *b)
 {
   if (!b) return;
-  if (!fNumberOfTracksWrap) {
+  if (!fNumberOfTracksWrap)
+  {
     fNumberOfTracksWrap = new TParameter<int>("fNumberOfTracks", fNumberOfTracks);
     b->Add(fNumberOfTracksWrap);
   }
-  if (!fEventNSelTracksRPWrap) {
+  if (!fEventNSelTracksRPWrap)
+  {
     fEventNSelTracksRPWrap = new TParameter<int>("fEventNSelTracksRP", fEventNSelTracksRP);
     b->Add(fEventNSelTracksRPWrap);
   }
-  if (!fMCReactionPlaneAngleWrap) {
+  if (!fMCReactionPlaneAngleWrap)
+  {
     fMCReactionPlaneAngleWrap = new TParameter<double>(" fMCReactionPlaneAngle",  fMCReactionPlaneAngle);
     b->Add( fMCReactionPlaneAngleWrap);
   }
   if (fTrackCollection) b->Add(fTrackCollection,"AliFlowTracksSimple");
 }
 
-  
+//-----------------------------------------------------------------------
+AliFlowEventSimple::AliFlowEventSimple( TTree* inputTree,
+                                        const AliFlowTrackSimpleCuts* rpCuts,
+                                        const AliFlowTrackSimpleCuts* poiCuts):
+  fTrackCollection(NULL),
+  fNumberOfTracks(0),
+  fEventNSelTracksRP(0),
+  fMCReactionPlaneAngle(0.),
+  fMCReactionPlaneAngleIsSet(kFALSE),
+  fNumberOfTracksWrap(NULL),
+  fEventNSelTracksRPWrap(NULL),
+  fMCReactionPlaneAngleWrap(NULL)
+{
+  //constructor, fills the event from a TTree of kinematic.root files
+  //applies RP and POI cuts, tags the tracks
+
+  Int_t numberOfInputTracks = inputTree->GetEntries() ;
+  fTrackCollection = new TObjArray(numberOfInputTracks/2);
+
+  TParticle* pParticle = new TParticle();
+  inputTree->SetBranchAddress("Particles",&pParticle);
+
+  Int_t iSelParticlesPOI = 0;
+
+  for (Int_t i=0; i<numberOfInputTracks; i++)
+  {
+    inputTree->GetEntry(i);   //get input particle
+    
+    if (!pParticle) continue; //no particle
+    if (!pParticle->IsPrimary()) continue;
+
+    Bool_t bPassedRPFlowCuts = rpCuts->PassesCuts(pParticle);
+    Bool_t bPassedPOIFlowCuts = poiCuts->PassesCuts(pParticle);
+    
+    if (bPassedRPFlowCuts || bPassedPOIFlowCuts)
+    {
+      AliFlowTrackSimple* pTrack = new AliFlowTrackSimple(pParticle);
+
+      //marking the particles used for int. flow:
+      if(bPassedRPFlowCuts)
+      {
+        pTrack->SetForRPSelection(kTRUE);
+        fEventNSelTracksRP++;
+      }
+      //marking the particles used for diff. flow:
+      if(bPassedPOIFlowCuts)
+      {
+        pTrack->SetForPOISelection(kTRUE);
+        iSelParticlesPOI++;
+      }
+      //adding a particles which were used either for int. or diff. flow to the list
+      fTrackCollection->Add(pTrack);
+      fNumberOfTracks++;
+    }
+  }//for i
+  delete pParticle;
+}
+
+//_____________________________________________________________________________
+void AliFlowEventSimple::CloneTracks(Int_t n)
+{
+  //clone every track n times to add non-flow
+  for (Int_t i=1; i<n; i++)
+  {
+    for (Int_t itrack=0; itrack<fNumberOfTracks; itrack++)
+    {
+      AliFlowTrackSimple* track = dynamic_cast<AliFlowTrackSimple*>(fTrackCollection->At(itrack));
+      if (!track) continue;
+      fTrackCollection->Add(new AliFlowTrackSimple(*track));
+      fNumberOfTracks++;
+
+    }
+  }
+}
index ee5ad14b06f5fcb05d8f32c2c3938616b108678c..8c8ce1d71837a67d73f89df1f472d796c8ee1af5 100644 (file)
@@ -2,33 +2,32 @@
 * See cxx source for full Copyright notice */
 /* $Id$ */
 
-#ifndef AliFlowEventSimple_H
-#define AliFlowEventSimple_H
+/*****************************************************************
+  AliFlowEventSimple: A simple event 
+  for flow analysis                  
+                                     
+  origin: Naomi van der Kolk (kolk@nikhef.nl)           
+          Ante Bilandzic     (anteb@nikhef.nl)         
+          Raimond Snellings  (Raimond.Snellings@nikhef.nl)    
+  mods:   Mikolaj Krzewicki  (mikolaj.krzewicki@cern.ch)
+*****************************************************************/
 
-#include "AliFlowVector.h" //needed as include
-#include "TH1F.h"
-#include "TH1D.h"
-#include "TFile.h"
+#ifndef ALIFLOWEVENTSIMPLE_H
+#define ALIFLOWEVENTSIMPLE_H
+
+#include "TObject.h"
 #include "TParameter.h"
+class TTree;
+class AliFlowVector;
 class AliFlowTrackSimple;
-
-/**************************************
- * AliFlowEventSimple: A simple event *
- *  for flow analysis                 * 
- *                                    * 
- * authors: Naomi van der Kolk        *
- *           (kolk@nikhef.nl)         *  
- *          Ante Bilandzic            *
- *           (anteb@nikhef.nl)        * 
- *          Raimond Snellings         *
- *    (Raimond.Snellings@nikhef.nl)   * 
- * ***********************************/
+class AliFlowTrackSimpleCuts;
 
 class AliFlowEventSimple: public TObject {
 
  public:
   AliFlowEventSimple();
   AliFlowEventSimple(Int_t aLenght);
+  AliFlowEventSimple(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts);
   AliFlowEventSimple(const AliFlowEventSimple& anEvent);
   AliFlowEventSimple& operator=(const AliFlowEventSimple& anEvent);
   virtual  ~AliFlowEventSimple();
@@ -37,26 +36,29 @@ class AliFlowEventSimple: public TObject {
   void    Browse(TBrowser *b); 
   void    Print(Option_t* option = "") const;      //method to print stats
   
-  Int_t    NumberOfTracks() const                   { return this->fNumberOfTracks; }
-  void     SetNumberOfTracks(Int_t nr)              { this->fNumberOfTracks = nr; }
-  Int_t    GetEventNSelTracksRP() const             { return this->fEventNSelTracksRP; } 
-  void     SetEventNSelTracksRP(Int_t nr)           { this->fEventNSelTracksRP = nr; }  
-  Double_t GetMCReactionPlaneAngle() const          { return this->fMCReactionPlaneAngle; }
-  void     SetMCReactionPlaneAngle(Double_t fPhiRP) { this->fMCReactionPlaneAngle = fPhiRP; }
+  Int_t    NumberOfTracks() const                   { return fNumberOfTracks; }
+  void     SetNumberOfTracks(Int_t nr)              { fNumberOfTracks = nr; }
+  Int_t    GetEventNSelTracksRP() const             { return fEventNSelTracksRP; } 
+  void     SetEventNSelTracksRP(Int_t nr)           { fEventNSelTracksRP = nr; }  
+  Double_t GetMCReactionPlaneAngle() const          { return fMCReactionPlaneAngle; }
+  void     SetMCReactionPlaneAngle(Double_t fPhiRP) { fMCReactionPlaneAngle=fPhiRP; fMCReactionPlaneAngleIsSet=kTRUE; }
+
+  void CloneTracks(Int_t n);
  
   AliFlowTrackSimple* GetTrack(Int_t i);
-  TObjArray* TrackCollection() const                { return this->fTrackCollection; }
+  TObjArray* TrackCollection() const                { return fTrackCollection; }
  
   AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
   void Get2Qsub(AliFlowVector* Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);  
 
  private:
-  TObjArray*              fTrackCollection;        // collection of tracks
-  Int_t                   fNumberOfTracks;         // number of tracks
-  Int_t                   fEventNSelTracksRP;      // number of tracks that have passed the RP selection
-  Double_t                fMCReactionPlaneAngle;   // the angle of the reaction plane from the MC truth
-  TParameter<Int_t>*      fNumberOfTracksWrap;     //! number of tracks in TBrowser
-  TParameter<Int_t>*      fEventNSelTracksRPWrap;  //! number of tracks that have passed the RP selection in TBrowser
+  TObjArray*              fTrackCollection;           // collection of tracks
+  Int_t                   fNumberOfTracks;            // number of tracks
+  Int_t                   fEventNSelTracksRP;         // number of tracks that have passed the RP selection
+  Double_t                fMCReactionPlaneAngle;      // the angle of the reaction plane from the MC truth
+  Bool_t                  fMCReactionPlaneAngleIsSet; // did we set it from MC?
+  TParameter<Int_t>*      fNumberOfTracksWrap;        //! number of tracks in TBrowser
+  TParameter<Int_t>*      fEventNSelTracksRPWrap;     //! number of tracks that have passed the RP selection in TBrowser
   TParameter<Double_t>*   fMCReactionPlaneAngleWrap;   //! the angle of the reaction plane from the MC truth in TBrowser
 
   ClassDef(AliFlowEventSimple,1)                       // simplified event used in flow analysis 
index a077f374255d155faa7c6ffc50626af8bd4a1864..528ff59814fa09b4c5fa6c8145abd94123a2246a 100644 (file)
 
 /* $Id$ */ 
 
-#include "AliFlowTrackSimple.h"
-
-
 // AliFlowTrackSimple:
 // A simple track class to the the AliFlowEventSimple for flow analysis
 //
 //
 // author: N. van der Kolk (kolk@nikhef.nl)
+// mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
 
+#include "TNamed.h"
+#include "TParticle.h"
+#include "AliFlowTrackSimple.h"
 
 ClassImp(AliFlowTrackSimple)
 
 //-----------------------------------------------------------------------
 
-AliFlowTrackSimple::AliFlowTrackSimple(): 
+AliFlowTrackSimple::AliFlowTrackSimple():
   fEta(0),
   fPt(0),
   fPhi(0),
@@ -37,7 +38,17 @@ AliFlowTrackSimple::AliFlowTrackSimple():
   fSubEventBits(0)
 {
   //constructor 
-  
+}
+
+//-----------------------------------------------------------------------
+AliFlowTrackSimple::AliFlowTrackSimple(const TParticle* p):
+  fEta(p->Eta()),
+  fPt(p->Pt()),
+  fPhi(p->Phi()),
+  fFlowBits(0),
+  fSubEventBits(0)
+{
+  //ctor
 }
 
 //-----------------------------------------------------------------------
index 3ab47f67d23f3f0a5250ac2f120cf1356ced5759..2883a6e07e2f71492afd552c85d8bc5cd61fff3a 100644 (file)
@@ -7,15 +7,18 @@
 
 #include "TNamed.h"
 #include "TBits.h"
+class TParticle;
 
 // AliFlowTrackSimple:
 // A simple track class to the the AliFlowEventSimple for flow analysis
 // author: N. van der Kolk (kolk@nikhef.nl)
+// mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
 
 class AliFlowTrackSimple: public TNamed {
 
  public:
   AliFlowTrackSimple();
+  AliFlowTrackSimple(const TParticle* p);
   AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
   AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
   virtual  ~AliFlowTrackSimple();
index 7daeb34606b30ed1146880e4cbe17d0bf11b1c18..2f274653076f851ab97b3240892a85cc125bf6ce 100644 (file)
  **************************************************************************/
 
 /* $Id$ */ 
-#include "TNamed.h"
-#include "AliFlowTrackSimpleCuts.h"
-#include "AliFlowTrackSimple.h" 
-
 
 // AliFlowTrackSimpleCuts:
 // A simple track cut class to the the AliFlowTrackSimple 
 // for basic kinematic cuts
 //
 // author: N. van der Kolk (kolk@nikhef.nl)
+// mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
 
+#include "TNamed.h"
+#include "TParticle.h"
+#include "AliFlowTrackSimpleCuts.h"
+#include "AliFlowTrackSimple.h"
 
 ClassImp(AliFlowTrackSimpleCuts)
 
 //-----------------------------------------------------------------------
-
 AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts():
   fPtMax(0.),
   fPtMin(0.),
@@ -44,7 +44,6 @@ AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts():
 }
 
 //-----------------------------------------------------------------------
-
 AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts):
   TNamed(),
   fPtMax(someCuts.fPtMax),
@@ -59,7 +58,6 @@ AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& som
 }
 
 //-----------------------------------------------------------------------
-
 AliFlowTrackSimpleCuts& AliFlowTrackSimpleCuts::operator=(const AliFlowTrackSimpleCuts& someCuts)
 {
   fPtMax  = someCuts.fPtMax;
@@ -74,19 +72,15 @@ AliFlowTrackSimpleCuts& AliFlowTrackSimpleCuts::operator=(const AliFlowTrackSimp
 
 }
 
-
 //----------------------------------------------------------------------- 
-
 AliFlowTrackSimpleCuts::~AliFlowTrackSimpleCuts()
 {
   //destructor
   
 }
 
-
 //----------------------------------------------------------------------- 
-
-Bool_t AliFlowTrackSimpleCuts::PassesCuts(AliFlowTrackSimple *track)
+Bool_t AliFlowTrackSimpleCuts::PassesCuts(const AliFlowTrackSimple *track) const
 {
   //simple method to check if the simple track passes the simple cuts
   if(track->Pt() >= fPtMin && track->Pt() < fPtMax &&
@@ -96,3 +90,15 @@ Bool_t AliFlowTrackSimpleCuts::PassesCuts(AliFlowTrackSimple *track)
   else
     { return kFALSE; }  
 }
+
+//----------------------------------------------------------------------- 
+Bool_t AliFlowTrackSimpleCuts::PassesCuts(const TParticle* track) const
+{
+  //simple method to check if the simple track passes the simple cuts
+  if(track->Pt() >= fPtMin && track->Pt() < fPtMax &&
+     track->Eta() >= fEtaMin && track->Eta() < fEtaMax &&
+     track->Phi() >= fPhiMin && track->Phi() < fPhiMax)
+    return kTRUE; 
+  else
+    return kFALSE; 
+}
index 9f9f759ea71de14904375fe0d0fb3d718d92efcb..894b8f6e7428af0faedfa6fe704d4361540c0bfe 100644 (file)
@@ -6,13 +6,15 @@
 // A simple track cut class to the the AliFlowTrackSimple for basic
 // kinematic cuts
 // author: N. van der Kolk (kolk@nikhef.nl)
+// mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
 
 #ifndef ALIFLOWTRACKSIMPLECUTS_H
 #define ALIFLOWTRACKSIMPLECUTS_H
 
+#include "TNamed.h"
 #include "AliFlowTrackSimple.h"  //needed as include
 
-class TNamed;
+class TParticle;
 
 class AliFlowTrackSimpleCuts : public TNamed {
 
@@ -41,7 +43,8 @@ class AliFlowTrackSimpleCuts : public TNamed {
   Int_t    GetPID() const       {return this->fPID; }
   
   //simple method to check if the simple track passes the simple cuts:
-  Bool_t PassesCuts(AliFlowTrackSimple *track);
+  Bool_t PassesCuts(const AliFlowTrackSimple *track) const;
+  Bool_t PassesCuts(const TParticle* p) const;
 
  private:
   Double_t fPtMax;
index d501982a5134af8636e2025c36021cba0fab5e29..9acdb8365ce9594820fc8110747d11bc56466951 100644 (file)
@@ -191,6 +191,7 @@ void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
          AliGenHijingEventHeader *hdh = dynamic_cast<AliGenHijingEventHeader *> (lhd->At(0)); 
          if (hdh) {
            fRP = hdh->ReactionPlaneAngle();
+      fEventMaker->SetMCReactionPlaneAngle(fRP);
            //cout<<"The reactionPlane from Hijing is: "<< fRP <<endl;
          }
        }
@@ -203,6 +204,7 @@ void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
       AliGenGeVSimEventHeader* headerG = (AliGenGeVSimEventHeader*)(mcEvent->GenEventHeader());
       if (headerG) {
        fRP = headerG->GetEventPlane();
+  fEventMaker->SetMCReactionPlaneAngle(fRP);
        //cout<<"The reactionPlane from GeVSim is: "<< fRP <<endl;
       }
       //else { cout<<"headerG is NULL"<<endl; }
@@ -213,6 +215,7 @@ void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
       AliGenHijingEventHeader* headerH = (AliGenHijingEventHeader*)(mcEvent->GenEventHeader());
       if (headerH) {
        fRP = headerH->ReactionPlaneAngle();
+  fEventMaker->SetMCReactionPlaneAngle(fRP);
        //cout<<"The reactionPlane from Hijing is: "<< fRP <<endl;
       }
       //else { cout<<"headerH is NULL"<<endl; }
@@ -223,20 +226,20 @@ void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
       AliGenEposEventHeader* headerE = (AliGenEposEventHeader*)(mcEvent->GenEventHeader());
       if (headerE) {
        fRP = headerE->ReactionPlaneAngle();
+  fEventMaker->SetMCReactionPlaneAngle(fRP);
        //cout<<"The reactionPlane from EPOS is: "<< fR <<endl;
       }
       //else { cout<<"headerE is NULL"<<endl; }
     }
   }
 
-  // set the reaction plane angle for the flow event
-  fEventMaker->SetMCReactionPlaneAngle(fRP);
   //setting event cuts
   fEventMaker->SetMinMult(fMinMult);
   fEventMaker->SetMaxMult(fMaxMult);
   //setting ranges for eta subevents
   fEventMaker->SetSubeventEtaRange(fMinA,fMaxA,fMinB,fMaxB);
 
+  //TODO
   if (fbAfterburnerOn && fMyTRandom3) {  
     // set the new value of the values using a after burner
     cout << "settings for afterburner in TaskFlowEvent.cxx:" << endl;
index de78f399f31f21903fe854c235e474ddd983ab00..ae8fd1e0a10d3036d5637fff3024bb78df396eb4 100644 (file)
@@ -256,7 +256,7 @@ Double_t AliGlauberMC::GetdNdEta( const Double_t npp, const Double_t x) const
 {
   //Get particle density per unit of rapidity
   //using the two component model
-  return (npp*((1.-x)*fNpart/2.)+x*fNcoll);
+  return (npp*((1.-x)*fNpart/2.+x*fNcoll));
 }
 
 //______________________________________________________________________________
index dab35f1addb9c897adafd5853dad8399c1c3e28d..4be845d82d31bd27d9aeb14b73839672713b88aa 100644 (file)
@@ -1,7 +1,34 @@
-#include "TStopwatch.h"
-#include "TObjArray"
-#include "Riostream.h"
-#include "TFile.h"
+#include <Riostream.h>
+#include <TStopwatch.h>
+#include <TObjArray.h>
+#include <TFile.h>
+#include <TRandom3.h>
+#include <TTimeStamp.h>
+
+#include <AliFlowCommon/AliFlowCommonConstants.h>
+#include <AliFlowCommon/AliFlowLYZConstants.h>
+#include <AliFlowCommon/AliFlowCumuConstants.h>
+#include <AliFlowCommon/AliFlowVector.h>
+#include <AliFlowCommon/AliFlowTrackSimple.h>
+#include <AliFlowCommon/AliFlowEventSimple.h>
+#include <AliFlowCommon/AliFlowTrackSimpleCuts.h>
+#include <AliFlowCommon/AliFlowCommonHist.h>
+#include <AliFlowCommon/AliFlowCommonHistResults.h>
+#include <AliFlowCommon/AliFlowLYZHist1.h>
+#include <AliFlowCommon/AliFlowLYZHist2.h>
+#include <AliFlowCommon/AliCumulantsFunctions.h>
+#include <AliFlowCommon/AliFlowLYZEventPlane.h>
+#include <AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h>
+#include <AliFlowCommon/AliFlowAnalysisWithScalarProduct.h>
+#include <AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.h>
+#include <AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.h>
+#include <AliFlowCommon/AliFlowAnalysisWithCumulants.h>
+#include <AliFlowCommon/AliFlowAnalysisWithQCumulants.h>
+#include <AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.h>
+#include <AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.h>
+#include <AliFlowCommon/AliFlowAnalysisWithNestedLoops.h>
+#include <AliFlowTasks/AliFlowEventSimpleMaker.h>
+#include <FlowEventMakers/FlowEventSimpleMaker.h>
 
 //--------------------------------------------------------------------------------------
 // Run flow analysis on local data with custom FlowEvent maker
@@ -62,9 +89,11 @@ enum anaModes {mLocal,mLocalSource,mLocalPAR,};
 //mLocalPAR: Analyze data on your computer using root + PAR files
 //mLocalSource: Analyze data on your computer using root + source files
 
+void LoadLibraries(const anaModes mode);
+
 Int_t offset = 0;
                                           
-int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char* 
+int runFlowAnalysis(const anaModes mode=mLocal, Int_t aRuns = 100, const char* 
                    dir="/data/alice1/kolk/KineOnly3/")
                    //              dir="/Users/snelling/alice_data/KineOnly3/")
                    //              dir="/Users/snelling/alice_data/stoomboot/5b/")
@@ -72,10 +101,10 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
   TStopwatch timer;
   timer.Start();
   
-  if (LYZ1SUM && LYZ2SUM) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(); }
-  if (LYZ1PROD && LYZ2PROD) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(); }
-  if (LYZ2SUM && LYZEP) {cout<<"WARNING: you cannot run LYZ2 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
-  if (LYZ1SUM && LYZEP) {cout<<"WARNING: you cannot run LYZ1 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
+  if (LYZ1SUM && LYZ2SUM) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(1); }
+  if (LYZ1PROD && LYZ2PROD) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(1); }
+  if (LYZ2SUM && LYZEP) {cout<<"WARNING: you cannot run LYZ2 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(1); }
+  if (LYZ1SUM && LYZEP) {cout<<"WARNING: you cannot run LYZ1 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(1); }
 
 
   cout<<endl;