* @author Alexander Hansen
* @date Wed Mar 23 12:11:33 2011
*
- * @brief
+ * @brief Analyse AODs for flow
*
* @ingroup pwg2_forward_scripts_makers
*
* The .txt file is expected to contain the path to the files
* from the current directory or the absolute path.
*
- * @par Inputs:
- *
- *
- * @par Outputs:
- * -
+ * @param data Input data (directory, list, or ROOT file)
+ * @param nevents Number of events to scan
+ * @param type Type of analysis (v<n>)
+ * @param etabins How may eta bins to make
+ * @param addFlow If true, add flow to MC particles
+ * @param addFType Which type of flow to add to MC particles
+ * @param addFOrder Order of flow to add to MC particles
+ * @param proof
*
* @ingroup pwg2_forward_flow
*/
gROOT->GetMacroPath()));
// --- Add to chain either AOD ------------------------------------
- if (data.IsNull()) {
- AliError("You didn't add a data file");
- return;
- }
- TChain* chain = new TChain("aodTree");
-
- if (data.Contains(".txt")) MakeChain(data, chain);
-
- if (data.Contains(".root")) {
- TFile* test = TFile::Open(data.Data());
- if (!test) {
- AliError(Form("AOD file %s not found", data.Data()));
- return;
- }
- test->Close(); // Remember to close!
- chain->Add(data.Data());
- }
+ gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/MakeChain.C");
+ TChain* chain = MakeChain("AOD", data.Data(), true);
+ // If 0 or less events is select, choose all
+ if (nEvents <= 0) nEvents = chain->GetEntries();
// --- Initiate the event handlers --------------------------------
- AliAnalysisManager *mgr = new AliAnalysisManager("Forward Flow",
- "Flow in the forward region");
+ AliAnalysisManager *mgr =
+ new AliAnalysisManager("Forward Flow",
+ "Flow in the forward region");
// --- AOD input handler -------------------------------------------
AliAODInputHandler *aodInputHandler = new AliAODInputHandler();