]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
corrections and update of macros (Hege, Matthias)
authorarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Feb 2013 18:16:19 +0000 (18:16 +0000)
committerarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Feb 2013 18:16:19 +0000 (18:16 +0000)
PWGHF/correlationHF/macros/AddTaskDxHFECorrelation.C
PWGHF/correlationHF/macros/compile-DxHFE.C
PWGHF/correlationHF/macros/run-single-task.C
PWGHF/correlationHF/macros/setupDxHFE.C

index 70f8528f1c5a30c6a9c45669d1d3af82e3602c2f..390e8719ea66535c4a9152eeae736dc7633b7cfe 100644 (file)
@@ -149,11 +149,11 @@ void AddTaskDxHFECorrelation(Bool_t bUseMC=kFALSE, TString analysisName="PWGHFco
   } else {
     // load configuration from file, and abort if something goes wrong
     TFile* filePoolConfiguration=TFile::Open(poolConfigFile.Data());
-    if(!filePoolInfo){
+    if(!filePoolConfiguration){
       ::Error("AddTaskDxHFECorrelation", Form("Pool configuration object file %s not found, exiting", poolConfigFile.Data()));
       return;
     }
-    TObject* pObj=filePoolInfo->Get(poolInfoName);
+    TObject* pObj=filePoolConfiguration->Get(poolInfoName);
     if (!pObj) {
       ::Error("AddTaskDxHFECorrelation", Form("No Pool configuration object with name '%s' found in file %s, exiting", poolInfoName, poolConfigFile.Data()));
       return;
@@ -183,7 +183,7 @@ void AddTaskDxHFECorrelation(Bool_t bUseMC=kFALSE, TString analysisName="PWGHFco
     ::Error("AddTaskDxHFECorrelation", "failed to create task.");
     return;
   }
-  pTask->SetFillOnlyD0D0bar(1); //0=both, 1=D0 only, 2=D0bar only
+  pTask->SetFillOnlyD0D0bar(0); //0=both, 1=D0 only, 2=D0bar only
   pTask->SetCutsD0(RDHFD0toKpi);
   pTask->SetCutsHFE(hfecuts);
   pTask->SetCuts(poolConfiguration);
@@ -239,10 +239,12 @@ void AddTaskDxHFECorrelation(Bool_t bUseMC=kFALSE, TString analysisName="PWGHFco
 // Note: AliHFAssociatedTrackCuts keeps an instance of the external
 // pointer, the arrays thus need to be global
 // TODO: try a proper implementation of AliHFAssociatedTrackCuts later
-Double_t MBins[]={0,20,40,60,80,500};
-Double_t * MultiplicityBins = MBins;
-Double_t ZBins[]={-10,-5,-2.5,2.5,5,10};
-Double_t *ZVrtxBins = ZBins;
+const Int_t    nofMBins=5;
+const Double_t MBins[nofMBins+1]={0,20,40,60,80,500};
+const Double_t * MultiplicityBins = MBins;
+const Int_t    nofZBins=5;
+const Double_t ZBins[nofZBins+1]={-10,-5,-2.5,2.5,5,10};
+const Double_t *ZVrtxBins = ZBins;
 
 AliAnalysisCuts* createDefaultPoolConfig()
 {
@@ -254,7 +256,7 @@ AliAnalysisCuts* createDefaultPoolConfig()
   HFCorrelationCuts->SetMaxNEventsInPool(200);
   HFCorrelationCuts->SetMinNTracksInPool(100);
   HFCorrelationCuts->SetMinEventsToMix(8);
-  HFCorrelationCuts->SetNofPoolBins(5,5); // Note: the arrays have dimension x+1
+  HFCorrelationCuts->SetNofPoolBins(nofZBins,nofMBins); // Note: the arrays have dimension x+1
   HFCorrelationCuts->SetPoolBins(ZVrtxBins,MultiplicityBins);
 
   TString description = "Info on Pool for EventMixing";   
index bbc6cbe3c58484e8f2ad64443fbc40cf054e3703..b0f2751266754b44beed45343a4c9d5eaf318b5e 100644 (file)
@@ -28,6 +28,9 @@
   gSystem->AddIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/PWGHF/vertexingHF -I$ALICE_ROOT/PWGHF/base -I$ALICE_ROOT/PWGHF/hfe ");
 
   TString dir("$ALICE_ROOT/PWGHF/correlationHF/");
+  gROOT->LoadMacro(dir+"AliHFAssociatedTrackCuts.cxx+");
+  gROOT->LoadMacro(dir+"AliReducedParticle.cxx+");
+  gROOT->LoadMacro(dir+"AliHFCorrelator.cxx+");
   gROOT->LoadMacro(dir+"AliDxHFEParticleSelection.cxx+");
   gROOT->LoadMacro(dir+"AliDxHFEParticleSelectionD0.cxx+");
   gROOT->LoadMacro(dir+"AliDxHFEParticleSelectionEl.cxx+");
@@ -35,8 +38,8 @@
   gROOT->LoadMacro(dir+"AliDxHFEParticleSelectionMCD0.cxx+");
   gROOT->LoadMacro(dir+"AliDxHFEParticleSelectionMCEl.cxx+");
   gROOT->LoadMacro(dir+"AliDxHFECorrelation.cxx+");
+  gROOT->LoadMacro(dir+"AliDxHFECorrelationMC.cxx+");
   gROOT->LoadMacro(dir+"AliAnalysisTaskDxHFEParticleSelection.cxx+");
-  gROOT->LoadMacro(dir+"AliAnalysisTaskDxHFEParticleSelectionEl.cxx+");
   gROOT->LoadMacro(dir+"AliAnalysisTaskDxHFECorrelation.cxx+");
 
 }
index 369b77fbabe8e968872185c73ba4e209f4928162..862b4477d3da380cab44aacabc89fd6114f6dc44 100644 (file)
@@ -256,6 +256,8 @@ void run_single_task(const char* mode,
          if (libraries.Contains(pTokens->At(i)->GetName())==0) {
            libraries+=" ";
            libraries+=pTokens->At(i)->GetName();
+           TString library=pTokens->At(i)->GetName();
+           if (!library.EndsWith(".so")) libraries+=".so";
          }
        }
        delete pTokens;
@@ -265,6 +267,10 @@ void run_single_task(const char* mode,
   TObjArray* pTokens=libraries.Tokenize(" ");
   if (pTokens) {
     for (int i=0; i<pTokens->GetEntriesFast(); i++) {
+      TString library=pTokens->At(i)->GetName();
+      if (!library.EndsWith(".so")) {
+       cerr << "libraries need to have ending '.so' in order to be correctly processed by alien plugin, please correct library name '" << library << "'" << endl;
+      }
       if (gSystem->Load(pTokens->At(i)->GetName())==0) {
        cout << "loading " << pTokens->At(i)->GetName() << endl;
       }
index ca7f725cd29cbc2e5f1575c10efffc4f9eb0ad8d..d406b1f834b6d6d3a07489cc3a72336617a6f35a 100644 (file)
@@ -103,13 +103,15 @@ void setupDxHFE(const char* localAodDirectory, int nofDirectories, const char* l
     if (gSystem->AccessPathName(aodPathName)==0) {
       // Create a chain with one set of AliAOD.root and AliAOD.VertexingHF.root. The set needs 
       // to be located in the same folder as you run from (physically or linked)
-      ::Info("setupDxHFE.C", Form("make chain from single chunk %s", aodPathName));
+      ::Info("setupDxHFE.C", Form("make chain from single chunk %s", aodPathName.Data()));
       TChain* chain = MakeAODInputChain(localAodDirectory ,1, -1);
     } else {
       // Assume several folders containing different AODs. 
       // The AODs need to be in folders named 1, 2,...
-      ::Info("setupDxHFE.C", Form("make chain from directory %s", localAodDirectory));
-      chain=MakeAODInputChain(localAodDirectory, 1, nofDirectories);
+      aodPathName=localAodDirectory;
+      if (!aodPathName.EndsWith("/")) aodPathName+="/";
+      ::Info("setupDxHFE.C", Form("make chain from directory %s", aodPathName.Data()));
+      chain=MakeAODInputChain(aodPathName, 1, nofDirectories);
     }
     ::Info("setupDxHFE.C", Form("local AOD chain: %d entries", chain->GetEntries()));
   }