5 /// @author Matthias.Richter@cern.ch
7 /// @brief Setup the environment specifically for running DxHFE analysis
9 /// Helper macro to initialize the environment for DxHFE. The macro can just
10 /// prepend other macros like run-single-task in the command line.
12 /// aliroot -b -q -l setupDxHFE.C'("localAodDir")' run-single-task.C'(...)'
15 /// aliroot -b -q -l setupDxHFE.C run-single-task.C'(...)'
17 /// The macro has the following tasks:
18 /// - load the necessary libraries, in order to have those library names also
19 /// available for the alien handler initialization, a specific configuration
21 /// - setting a default analysis name via a configuration object
22 /// - the optional parameter 'localAodDir' allows to create an input chain from
25 ///////////////////////////////////////////////////////////////////////////////////////////////////
27 // environment specific for DxHFE
29 const char* includePath="-I$ALICE_ROOT/PWGHF/vertexingHF -I$ALICE_ROOT/PWGHF/hfe";
30 const char* libraryDependencies=
39 "libPWGHFvertexingHF.so "
43 void setupDxHFE(const char* aodDirectory=NULL)
45 gSystem->AddIncludePath(includePath);
46 TString libraries=libraryDependencies;
47 TObjArray* pTokens=libraries.Tokenize(" ");
49 for (int i=0; i<pTokens->GetEntriesFast(); i++) {
50 if (gSystem->Load(pTokens->At(i)->GetName())==0) {
51 cout << "loading " << pTokens->At(i)->GetName() << endl;
58 // allow run-single-task to fetch the analysis name and library names
59 if (gDirectory) gDirectory->Add(new TNamed("analysis_name", "DxHFECorrelation"));
60 if (gDirectory) gDirectory->Add(new TNamed("analysis_libraries", libraryDependencies));
63 // create AOD tree from local files
64 // the created object is added automatically to gDirectory and can be fetched
66 // TODO: decide depending on running mode and input to be used
67 gROOT->LoadMacro("$ALICE_ROOT/PWGHF/vertexingHF/MakeAODInputChain.C");
68 // Create a chain with one set of AliAOD.root and AliAOD.VertexingHF.root. The set needs
69 // to be located in the same folder as you run from (physically or linked)
70 TChain* chain = MakeAODInputChain(aodDirectory ,1, -1);
71 // If you have several folders containing different AODs, use below.
72 // From the MakeAODInputChain.C: The AODs need to be in folders named 1, 2,...
73 //if(useMC)chain =MakeAODInputChain("/scratch/Data/2010/MC/LHC10f7a/130375/AOD051/",1,2);//73
74 //chain =MakeAODInputChain("/scratch/Data/2010/MC/LHC10f6a/126437/AOD041/",1,10);//84
75 //else chain =MakeAODInputChain("/scratch/Data/2010/LHC10d/000126437/ESDs/pass2/AOD057/",1,10);//LHC10f7a/130375/AOD051/",1,20);
76 cout << "local AOD chain: " << chain->GetEntries() << " entries" << endl;