events based on the fly in memory and analysis for quick chekcs
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Apr 2009 12:17:05 +0000 (12:17 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Apr 2009 12:17:05 +0000 (12:17 +0000)
PWG2/CMake_libPWG2flowCommon.txt
PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx [new file with mode: 0644]
PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.h [new file with mode: 0644]
PWG2/FLOW/macros/runFlowAnalysisOnTheFly.C [new file with mode: 0644]
PWG2/PWG2flowCommonLinkDef.h
PWG2/libPWG2flowCommon.pkg

index 62c7329..3df193b 100644 (file)
@@ -7,6 +7,7 @@ set(SRCS
       FLOW/AliFlowCommon/AliFlowCommonConstants.cxx 
       FLOW/AliFlowCommon/AliFlowLYZConstants.cxx 
       FLOW/AliFlowCommon/AliFlowCumuConstants.cxx 
+      FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx 
       FLOW/AliFlowCommon/AliFlowCommonHist.cxx 
       FLOW/AliFlowCommon/AliFlowCommonHistResults.cxx 
       FLOW/AliFlowCommon/AliFlowLYZHist1.cxx 
diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx
new file mode 100644 (file)
index 0000000..a5c71fa
--- /dev/null
@@ -0,0 +1,129 @@
+/*************************************************************************
+* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
+*                                                                        *
+* Author: The ALICE Off-line Project.                                    *
+* Contributors are mentioned in the code where appropriate.              *
+*                                                                        *
+* Permission to use, copy, modify and distribute this software and its   *
+* documentation strictly for non-commercial purposes is hereby granted   *
+* without fee, provided that the above copyright notice appears in all   *
+* copies and that both the copyright notice and this permission notice   *
+* appear in the supporting documentation. The authors make no claims     *
+* about the suitability of this software for any purpose. It is          *
+* provided "as is" without express or implied warranty.                  * 
+**************************************************************************/
+
+/********************************** 
+ * create an event and perform    *
+ * flow analysis 'on the fly'     * 
+ *                                * 
+ * authors: Raimond Snellings     *
+ *           (snelling@nikhef.nl) * 
+ *          Ante Bilandzic        * 
+ *           (anteb@nikhef.nl)    *
+ *********************************/
+  
+#include "Riostream.h"
+#include "TMath.h"
+#include "TF1.h"
+#include "TRandom3.h"
+
+#include "AliFlowEventSimpleMakerOnTheFly.h"
+#include "AliFlowEventSimple.h"
+#include "AliFlowTrackSimple.h"
+
+ClassImp(AliFlowEventSimpleMakerOnTheFly)
+
+
+//========================================================================
+
+
+AliFlowEventSimpleMakerOnTheFly::AliFlowEventSimpleMakerOnTheFly():
+ fMultiplicityOfRP(0),
+ fMultiplicitySpreadOfRP(0.),
+ fPtFormula(NULL),
+ fPhiFormula(NULL) 
+ {
+  // constructor
+ }
+
+
+//========================================================================
+
+
+AliFlowEventSimpleMakerOnTheFly::~AliFlowEventSimpleMakerOnTheFly()
+{
+ // destructor
+  if (fPtFormula) delete fPtFormula;
+  if (fPhiFormula) delete fPhiFormula;
+}
+
+
+//========================================================================
+
+
+AliFlowEventSimple* AliFlowEventSimpleMakerOnTheFly::CreateEventOnTheFly()
+{
+  // method to create event on the fly
+  
+  AliFlowEventSimple* pEvent = new AliFlowEventSimple(fMultiplicityOfRP);
+  
+  
+  // pt:   
+  Double_t dPtMin = 0.; // to be improved 
+  Double_t dPtMax = 10.; // to be improved 
+  
+  fPtFormula = new TF1("PtFormula","[0]*x*TMath::Exp(-x*x)",dPtMin,dPtMax);
+  
+  fPtFormula->SetParName(0,"Multiplicity of RPs");
+  fPtFormula->SetParameter(0,fMultiplicityOfRP);
+  
+
+  // phi:
+  Double_t dPhiMin = 0.; // to be improved 
+  Double_t dPhiMax = TMath::TwoPi(); // to be improved 
+  
+  fPhiFormula = new TF1("phiDistribution","(1)*(1+2.*[0]*TMath::Cos(2*x))",dPhiMin,dPhiMax);
+  Double_t dV2 = 0.044; // to be improved
+  fPhiFormula->SetParName(0,"elliptic flow");
+  fPhiFormula->SetParameter(0,dV2);
+  
+  // eta:
+  Double_t dEtaMin = -1.; // to be improved 
+  Double_t dEtaMax = 1.; // to be improved 
+  TRandom3 myTRandom3;
+
+  //reaction plane
+  Double_t fMCReactionPlaneAngle = TMath::TwoPi()*myTRandom3.Rndm();
+
+  Int_t iGoodTracks = 0;
+  Int_t iSelParticlesRP = 0;
+  Int_t iSelParticlesPOI = 0;
+  for(Int_t i=0;i<fMultiplicityOfRP;i++) {
+    AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+    pTrack->SetPt(fPtFormula->GetRandom());
+    pTrack->SetEta(myTRandom3.Uniform(dEtaMin,dEtaMax));
+    pTrack->SetPhi(fPhiFormula->GetRandom()-fMCReactionPlaneAngle);
+    pTrack->SetForRPSelection(kTRUE);
+    iSelParticlesRP++;
+    pTrack->SetForPOISelection(kTRUE);
+    iSelParticlesPOI++;
+
+    pEvent->TrackCollection()->Add(pTrack);
+    iGoodTracks++;
+  }
+  pEvent->SetEventNSelTracksRP(iSelParticlesRP);  
+  pEvent->SetNumberOfTracks(iGoodTracks);//tracks used either for RP or for POI selection
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+
+
+ return pEvent;  
+} // end of CreateEventOnTheFly()
+
+
diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.h b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.h
new file mode 100644 (file)
index 0000000..3f274af
--- /dev/null
@@ -0,0 +1,76 @@
+/* 
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. 
+ * See cxx source for full Copyright notice 
+ * $Id$ 
+ */
+
+/********************************** 
+ * create an event and perform    *
+ * flow analysis 'on the fly'     * 
+ *                                * 
+ * authors: Raimond Snellings     *
+ *           (snelling@nikhef.nl) * 
+ *          Ante Bilandzic        * 
+ *           (anteb@nikhef.nl)    *
+ *********************************/ 
+
+#ifndef ALIFLOWEVENTSIMPLEMAKERONTHEFLY_H
+#define ALIFLOWEVENTSIMPLEMAKERONTHEFLY_H
+
+class TF1;
+
+#include "AliFlowEventSimple.h"  //needed as include
+    
+class AliFlowEventSimpleMakerOnTheFly {
+
+ public:
+
+  AliFlowEventSimpleMakerOnTheFly();          // constructor
+  virtual ~AliFlowEventSimpleMakerOnTheFly(); // destructor
+
+  AliFlowEventSimple* CreateEventOnTheFly();  // create an event on the fly
+    
+  //                        *****************************
+  //                        **** SETTERS AND GETTERS ****
+  //                        *****************************
+  //................................................................................................
+  // setters and getters for global parameters:
+  void SetMultiplicityOfRP(Int_t multRP) {this->fMultiplicityOfRP = multRP;}
+  Int_t GetMultiplicityOfRP() const {return this->fMultiplicityOfRP;} 
+  //................................................................................................
+  
+  //................................................................................................
+  // setters and getters for event-by-event parameters:
+  void SetMultiplicitySpreadOfRP(Double_t multSpreadRP) {this->fMultiplicitySpreadOfRP = multSpreadRP;}
+  Double_t GetMultiplicitySpreadOfRP() const {return this->fMultiplicitySpreadOfRP;} 
+  //................................................................................................
+   
+ private:
+  AliFlowEventSimpleMakerOnTheFly(const AliFlowEventSimpleMakerOnTheFly& anAnalysis);            // copy constructor
+  AliFlowEventSimpleMakerOnTheFly& operator=(const AliFlowEventSimpleMakerOnTheFly& anAnalysis); // assignment operator
+  
+  //................................................................................................
+  // global parameters:
+  Int_t fMultiplicityOfRP; // multiplicity of RPs
+  //................................................................................................
+  
+  //................................................................................................
+  // event-by-event parameters:
+  Double_t fMultiplicitySpreadOfRP; // multiplicity spread of RPs
+  //................................................................................................
+  
+  //................................................................................................
+  // equations for distributions: 
+  TF1 *fPtFormula;  // transverse momentum distribution
+  TF1 *fPhiFormula; // azimuthal distribution
+  //................................................................................................
+  
+  ClassDef(AliFlowEventSimpleMakerOnTheFly,0) // macro for rootcint
+};
+#endif
+
+
+
diff --git a/PWG2/FLOW/macros/runFlowAnalysisOnTheFly.C b/PWG2/FLOW/macros/runFlowAnalysisOnTheFly.C
new file mode 100644 (file)
index 0000000..a798c33
--- /dev/null
@@ -0,0 +1,373 @@
+#include "TStopwatch.h"
+#include "TObjArray"
+#include "Riostream.h"
+#include "TFile.h"
+
+//--------------------------------------------------------------------------------------
+// RUN SETTINGS
+// flow analysis method can be: (set to kTRUE or kFALSE)
+Bool_t SP    = kFALSE;
+Bool_t LYZ1  = kFALSE;
+Bool_t LYZ2  = kFALSE;  
+Bool_t LYZEP = kFALSE; 
+Bool_t GFC   = kFALSE;
+Bool_t QC    = kFALSE;
+Bool_t FQD   = kFALSE;
+Bool_t MCEP  = kTRUE; 
+//--------------------------------------------------------------------------------------
+
+//.................................................................................  
+
+// Set the event parameters:
+Int_t iMultiplicityOfRP = 4400; // multiplicity of RPs
+
+//.................................................................................
+
+
+enum anaModes {mLocal,mLocalSource,mLocalPAR,};
+// mLocal: Analyze data on your computer using aliroot
+// mLocalPAR: Analyze data on your computer using root + PAR files
+// mLocalSource: Analyze data on your computer using root + source files
+                                          
+int runFlowAnalysisOnTheFly(Int_t mode=mLocal, Int_t nEvts=1)
+{
+ TStopwatch timer;
+ timer.Start();
+ if (LYZ1 && LYZ2)  {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1.  "<<endl; exit(); }
+ if (LYZ2 && LYZEP) {cout<<"WARNING: you cannot run LYZ2 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
+ if (LYZ1 && LYZEP) {cout<<"WARNING: you cannot run LYZ1 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
+ cout<<endl;
+ cout<<endl;
+ cout<<"      ---- ARE YOU READY TO FLY ? ----      "<<endl;
+ cout<<endl;
+ cout<<endl;
+ cout<<" ---- BEGIN FLOW ANALYSIS 'ON THE FLY' ---- "<<endl;
+ cout<<endl;
+ cout<<endl;
+ LoadLibraries(mode);
+
+ //---------------------------------------------------------------------------------------
+ // Initialize the flowevent maker
+ AliFlowEventSimpleMakerOnTheFly* eventMakerOnTheFly = new AliFlowEventSimpleMakerOnTheFly();
+  
+
+ //---------------------------------------------------------------------------------------
+ // Initialize all the flow methods:  
+ AliFlowAnalysisWithQCumulants    *qc    = NULL;
+ AliFlowAnalysisWithCumulants     *gfc   = NULL;
+ AliFittingQDistribution          *fqd   = NULL;
+ AliFlowAnalysisWithLeeYangZeros  *lyz1  = NULL;
+ AliFlowAnalysisWithLeeYangZeros  *lyz2  = NULL;
+ AliFlowAnalysisWithLYZEventPlane *lyzep = NULL;
+ AliFlowAnalysisWithScalarProduct *sp    = NULL;
+ AliFlowAnalysisWithMCEventPlane  *mcep  = NULL;   
+
+ // MCEP = monte carlo event plane
+ if (MCEP) {
+   AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane();
+   mcep->Init();
+ }
+
+  // QC = Q-cumulants  
+ if(QC) { 
+   AliFlowAnalysisWithQCumulants* qc = new AliFlowAnalysisWithQCumulants();
+   qc->Init();
+ }
+  
+ // GFC = Generating Function Cumulants 
+ if(GFC) {
+   AliFlowAnalysisWithCumulants* gfc = new AliFlowAnalysisWithCumulants();
+   gfc->Init();
+ }
+ // FQD = Fitting q-distribution 
+ if(FQD) {
+   AliFittingQDistribution* fqd = new AliFittingQDistribution();
+   fqd->Init();
+ }
+ // SP = Scalar Product 
+ if(SP) {
+   AliFlowAnalysisWithScalarProduct* sp = new AliFlowAnalysisWithScalarProduct();
+   sp->Init();
+ }
+
+ // LYZ1 = Lee-Yang Zeroes first run
+ if(LYZ1) {
+   AliFlowAnalysisWithLeeYangZeros* lyz1 = new AliFlowAnalysisWithLeeYangZeros();
+   lyz1->SetFirstRun(kTRUE);
+   lyz1->SetUseSum(kTRUE);
+   lyz1->Init();
+ }
+
+ // LYZ2 = Lee-Yang Zeroes second run
+ if(LYZ2) {
+   AliFlowAnalysisWithLeeYangZeros* lyz2 = new AliFlowAnalysisWithLeeYangZeros();
+   // read the input file from the first run 
+   TString inputFileNameLYZ2 = "outputLYZ1analysis.root" ;
+   TFile* inputFileLYZ2 = new TFile(inputFileNameLYZ2.Data(),"READ");
+   if(!inputFileLYZ2 || inputFileLYZ2->IsZombie()) { 
+     cerr << " ERROR: NO First Run file... " << endl ;
+     break; 
+   }
+   else { 
+     TList* inputListLYZ2 = (TList*)inputFileLYZ2->Get("cobjLYZ1");  
+     if (!inputListLYZ2) {cout<<"Input list is NULL pointer!"<<endl; break;}
+     else {
+       cout<<"LYZ2 input file/list read..."<<endl;
+       lyz2->SetFirstRunList(inputListLYZ2);
+       lyz2->SetFirstRun(kFALSE);
+       lyz2->SetUseSum(kTRUE);
+       lyz2->Init();
+     }
+   }
+ }
+ // LYZEP = Lee-Yang Zeroes event plane
+ if(LYZEP) {
+   AliFlowLYZEventPlane* ep = new AliFlowLYZEventPlane() ;
+   AliFlowAnalysisWithLYZEventPlane* lyzep = new AliFlowAnalysisWithLYZEventPlane();
+   // read the input file from the second lyz run 
+   TString inputFileNameLYZEP = "outputLYZ2analysis.root" ;
+   TFile* inputFileLYZEP = new TFile(inputFileNameLYZEP.Data(),"READ");
+   if(!inputFileLYZEP || inputFileLYZEP->IsZombie()) { 
+     cerr << " ERROR: NO Second Run file... " << endl ; 
+     break;
+   }
+   else { 
+     TList* inputListLYZEP = (TList*)inputFileLYZEP->Get("cobjLYZ2");  
+     if (!inputListLYZEP) {cout<<"Input list is NULL pointer!"<<endl; break;}
+     else {
+       cout<<"LYZEP input file/list read..."<<endl;
+       ep   ->SetSecondRunList(inputListLYZEP);
+       lyzep->SetSecondRunList(inputListLYZEP);
+       ep   ->Init();
+       lyzep->Init();
+     }
+   }
+ }
+ //---------------------------------------------------------------------------------------
+  
+      
+ //---------------------------------------------------------------------------------------  
+ // create and analyze events 'on the fly':
+
+ // set the global event parameters: 
+ eventMakerOnTheFly->SetMultiplicityOfRP(iMultiplicityOfRP);
+
+ for(Int_t i=0;i<nEvts;i++) {   
+   // creating the event with above settings:
+   
+   cout<<endl;
+   cout<<" ---- CREATING EVENT No "<<i+1<<" ---- "<<endl;
+   cout<<endl;   
+   
+   AliFlowEventSimple *event = eventMakerOnTheFly->CreateEventOnTheFly(); 
+   cout<<" .... done .... "<<endl;
+   
+   // analyzing the created event 'on the fly':
+   cout<<endl;
+   cout<<" ---- ANALYZING EVENT No "<<i+1<<" ---- "<<endl;
+   cout<<endl; 
+   
+   // do flow analysis for various methods:
+   if(MCEP) mcep->Make(event);
+   if(QC) qc->Make(event);
+   if(GFC) gfc->Make(event);
+   if(FQD) fqd->Make(event);
+   if(LYZ1) lyz1->Make(event);
+   if(LYZ2) lyz2->Make(event);
+   if(LYZEP) lyzep->Make(event,ep);
+   if(SP) sp->Make(event);
+   
+   cout<<" .... done .... "<<endl;
+   cout<<endl;
+   
+   delete event;
+ } // end of for(Int_t i=0;i<nEvts;i++)
+ //---------------------------------------------------------------------------------------  
+
+
+
+ //---------------------------------------------------------------------------------------  
+ // calculating and storing the final results of flow analysis
+ if(MCEP) {mcep->Finish(); mcep->WriteHistograms("outputMCEPanalysis.root");}
+ if(SP) {sp->Finish(); sp->WriteHistograms("outputSPanalysis.root");}
+ if(QC) {qc->Finish(); qc->WriteHistograms("outputQCanalysis.root");}
+ if(GFC) {gfc->Finish(); gfc->WriteHistograms("outputGFCanalysis.root");}
+ if(FQD) {fqd->Finish(); fqd->WriteHistograms("outputFQDanalysis.root");}
+ if(LYZ1) {lyz1->Finish(); lyz1->WriteHistograms("outputLYZ1analysis.root");}
+ if(LYZ2) {lyz2->Finish(); lyz2->WriteHistograms("outputLYZ2analysis.root");}
+ if(LYZEP) {lyzep->Finish(); lyzep->WriteHistograms("outputLYZEPanalysis.root");}
+ //---------------------------------------------------------------------------------------  
+ cout<<endl;
+ cout<<endl;
+ cout<<" ---- LANDED SUCCESSFULLY ---- "<<endl;
+ cout<<endl; 
+ timer.Stop();
+ cout << endl;
+ timer.Print();
+}
+
+void SetupPar(char* pararchivename)
+{
+  //Load par files, create analysis libraries
+  //For testing, if par file already decompressed and modified
+  //classes then do not decompress.
+  TString cdir(Form("%s", gSystem->WorkingDirectory() )) ; 
+  TString parpar(Form("%s.par", pararchivename)) ; 
+  if ( gSystem->AccessPathName(parpar.Data()) ) {
+    gSystem->ChangeDirectory(gSystem->Getenv("ALICE_ROOT")) ;
+    TString processline(Form(".! make %s", parpar.Data())) ; 
+    gROOT->ProcessLine(processline.Data()) ;
+    gSystem->ChangeDirectory(cdir) ; 
+    processline = Form(".! mv /tmp/%s .", parpar.Data()) ;
+    gROOT->ProcessLine(processline.Data()) ;
+  } 
+  if ( gSystem->AccessPathName(pararchivename) ) {  
+    TString processline = Form(".! tar xvzf %s",parpar.Data()) ;
+    gROOT->ProcessLine(processline.Data());
+  }
+  
+  TString ocwd = gSystem->WorkingDirectory();
+  gSystem->ChangeDirectory(pararchivename);
+  
+  // check for BUILD.sh and execute
+  if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
+    printf("*******************************\n");
+    printf("*** Building PAR archive    ***\n");
+    cout<<pararchivename<<endl;
+    printf("*******************************\n");
+    
+    if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
+      Error("runProcess","Cannot Build the PAR Archive! - Abort!");
+      return -1;
+    }
+  }
+  // check for SETUP.C and execute
+  if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
+    printf("*******************************\n");
+    printf("*** Setup PAR archive       ***\n");
+    cout<<pararchivename<<endl;
+    printf("*******************************\n");
+    gROOT->Macro("PROOF-INF/SETUP.C");
+  }
+  
+  gSystem->ChangeDirectory(ocwd.Data());
+  printf("Current dir: %s\n", ocwd.Data());
+}
+
+void LoadLibraries(const anaModes mode) {
+  
+  //--------------------------------------
+  // Load the needed libraries most of them already loaded by aliroot
+  //--------------------------------------
+  gSystem->Load("libTree.so");
+  gSystem->Load("libGeom.so");
+  gSystem->Load("libVMC.so");
+  gSystem->Load("libXMLIO.so");
+  gSystem->Load("libPhysics.so");
+  
+  //----------------------------------------------------------
+  // >>>>>>>>>>> Local mode <<<<<<<<<<<<<< 
+  //----------------------------------------------------------
+  if (mode==mLocal) {
+    //--------------------------------------------------------
+    // If you want to use already compiled libraries 
+    // in the aliroot distribution
+    //--------------------------------------------------------
+    gSystem->Load("libSTEERBase");
+    gSystem->Load("libESD");
+    gSystem->Load("libAOD");
+    gSystem->Load("libANALYSIS");
+    gSystem->Load("libANALYSISalice");
+    gSystem->Load("libCORRFW.so");
+    cerr<<"libCORRFW.so loaded..."<<endl;
+    gSystem->Load("libPWG2flowCommon.so");
+    cerr<<"libPWG2flowCommon.so loaded..."<<endl;
+    gSystem->Load("libPWG2flowTasks.so");
+    cerr<<"libPWG2flowTasks.so loaded..."<<endl;
+  }
+  
+  else if (mode == mLocalPAR) {
+    //--------------------------------------------------------
+    //If you want to use root and par files from aliroot
+    //--------------------------------------------------------  
+     //If you want to use root and par files from aliroot
+    //--------------------------------------------------------  
+    SetupPar("STEERBase");
+    SetupPar("ESD");
+    SetupPar("AOD");
+    SetupPar("ANALYSIS");
+    SetupPar("ANALYSISalice");
+    SetupPar("PWG2AOD");
+    SetupPar("CORRFW");
+    SetupPar("PWG2flowCommon");
+    cerr<<"PWG2flowCommon.par loaded..."<<endl;
+    SetupPar("PWG2flowTasks");
+    cerr<<"PWG2flowTasks.par loaded..."<<endl;
+  }
+  
+  //---------------------------------------------------------
+  // <<<<<<<<<< Source mode >>>>>>>>>>>>
+  //---------------------------------------------------------
+  else if (mode==mLocalSource) {
+    // In root inline compile
+
+   
+    // Constants  
+    gROOT->LoadMacro("AliFlowCommon/AliFlowCommonConstants.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowLYZConstants.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowCumuConstants.cxx+");
+    
+    // Flow event
+    gROOT->LoadMacro("AliFlowCommon/AliFlowVector.cxx+"); 
+    gROOT->LoadMacro("AliFlowCommon/AliFlowTrackSimple.cxx+");    
+    gROOT->LoadMacro("AliFlowCommon/AliFlowEventSimple.cxx+");
+    
+    // Cuts
+    gROOT->LoadMacro("AliFlowCommon/AliFlowTrackSimpleCuts.cxx+");    
+    
+    // Output histosgrams
+    gROOT->LoadMacro("AliFlowCommon/AliFlowCommonHist.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowCommonHistResults.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowLYZHist1.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowLYZHist2.cxx+");
+    
+    // Functions needed for various methods
+    gROOT->LoadMacro("AliFlowCommon/AliCumulantsFunctions.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFittingFunctionsForQDistribution.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowLYZEventPlane.cxx+");
+    
+    // Flow Analysis code for various methods
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx+"); 
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithScalarProduct.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithLYZEventPlane.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithCumulants.cxx+");
+    gROOT->LoadMacro("AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx+"); 
+    gROOT->LoadMacro("AliFlowCommon/AliFittingQDistribution.cxx+");
+    
+    // Class to fill the FlowEvent without aliroot dependence
+    // can be found in the directory FlowEventMakers
+    gROOT->LoadMacro("FlowEventMakers/FlowEventSimpleMaker.cxx+");   
+    
+    cout << "finished loading macros!" << endl;  
+    
+  }  
+  
+}
+
+
index e503eb0..8074151 100644 (file)
@@ -14,6 +14,8 @@
 
 #pragma link C++ class AliFlowTrackSimpleCuts+;
 
+#pragma link C++ class AliFlowEventSimpleMakerOnTheFly+;
+
 #pragma link C++ class AliFlowCommonHist+;
 #pragma link C++ class AliFlowCommonHistResults+;
 #pragma link C++ class AliFlowLYZHist1+;
index 44310bf..5db6119 100644 (file)
@@ -7,6 +7,7 @@ SRCS= FLOW/AliFlowCommon/AliFlowEventSimple.cxx \
       FLOW/AliFlowCommon/AliFlowCommonConstants.cxx \
       FLOW/AliFlowCommon/AliFlowLYZConstants.cxx \
       FLOW/AliFlowCommon/AliFlowCumuConstants.cxx \
+      FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx \
       FLOW/AliFlowCommon/AliFlowCommonHist.cxx \
       FLOW/AliFlowCommon/AliFlowCommonHistResults.cxx \
       FLOW/AliFlowCommon/AliFlowLYZHist1.cxx \