Write output in folders of the common output file
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Nov 2009 00:22:40 +0000 (00:22 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Nov 2009 00:22:40 +0000 (00:22 +0000)
PWG3/vertexingHF/AddTaskBkgLikeSignD0.C
PWG3/vertexingHF/AddTaskBkgLikeSignJPSI.C
PWG3/vertexingHF/AddTaskCFMultiVarMultiStep.C
PWG3/vertexingHF/AddTaskCharmFraction.C
PWG3/vertexingHF/AddTaskD0Mass.C
PWG3/vertexingHF/AddTaskDplus.C

index 8d34c88..6df9bd0 100644 (file)
@@ -25,12 +25,14 @@ AliAnalysisTaskSEBkgLikeSignD0 *AddTaskBkgLikeSignD0()
   // Create containers for input/output
   AliAnalysisDataContainer *cinputLSD0 = mgr->CreateContainer("cinputLikeSignD0",TChain::Class(), 
                                                          AliAnalysisManager::kInputContainer);
+  TString outputfile = AliAnalysisManager::GetCommonFileName();
+  outputfile += ":PWG3_D2H_CmpLikeSignD0";
   AliAnalysisDataContainer *coutput1LSD0 = mgr->CreateContainer("coutput1LikeSignD0",TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                           "CmpLikeSignD0.root");
+                                                               outputfile.Data());
   AliAnalysisDataContainer *coutput2LSD0 = mgr->CreateContainer("coutput2LikeSignD0",TH1F::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                           "CmpLikeSignD0.root");
+                                                               outputfile.Data());
 
   mgr->ConnectInput(lsD0Task,0,mgr->GetCommonInputContainer());
   mgr->ConnectOutput(lsD0Task,1,coutput1LSD0);
index 667e1ac..4891eed 100644 (file)
@@ -26,9 +26,11 @@ AliAnalysisTaskSEBkgLikeSignJPSI *AddTaskBkgLikeSignJPSI()
   // Create containers for input/output
   AliAnalysisDataContainer *cinputLS = mgr->CreateContainer("cinputLikeSignJPSI",TChain::Class(), 
                                                          AliAnalysisManager::kInputContainer);
+  TString outputfile = AliAnalysisManager::GetCommonFileName();
+  outputfile += ":PWG3_D2H_CmpLikesignJPSI";
   AliAnalysisDataContainer *coutputLS = mgr->CreateContainer("coutputLikeSignJPSI",TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                           "CmpLikeSignJPSI.root");
+                                                            outputfile.Data());
 
   mgr->ConnectInput(lsTask,0,mgr->GetCommonInputContainer());
   mgr->ConnectOutput(lsTask,1,coutputLS);
index 8086635..a0f91f6 100644 (file)
@@ -316,17 +316,19 @@ AliCFHeavyFlavourTaskMultiVarMultiStep *AddTaskCFMultiVarMultiStep()
        
        // ----- output data -----
        
+       TString outputfile = AliAnalysisManager::GetCommonFileName();
+       outputfile += ":PWG3_D2H_CFtaskD0toKpi";
+
        //slot 0 : default output tree (by default handled by AliAnalysisTaskSE)
-       AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("ctree0", TTree::Class(),AliAnalysisManager::kOutputContainer,"CFtaskHFoutput.root");
+       AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("ctree0", TTree::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
        
        //now comes user's output objects :
-       
        // output TH1I for event counting
-       AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist0", TH1I::Class(),AliAnalysisManager::kOutputContainer,"CFtaskHFoutput.root");
+       AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist0", TH1I::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
        // output Correction Framework Container (for acceptance & efficiency calculations)
-       AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("ccontainer0", AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,"CFtaskHFoutput.root");
-// Unfolding - correlation matrix
-        AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("corr0", THnSparseD::Class(),AliAnalysisManager::kOutputContainer,"CFtaskHFoutput.root");
+       AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("ccontainer0", AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
+       // Unfolding - correlation matrix
+        AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("corr0", THnSparseD::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
 
        mgr->AddTask(task);
        
index 335d474..ca8cbf0 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.root",Int_t switchMC[5])
+AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(TString fileout="d0D0",Int_t switchMC[5])
 {  
   //
   // Configuration macro for the task to analyze the fraction of prompt charm
@@ -25,6 +25,10 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   str.ReplaceAll(".root","");
   str.Prepend("_");
 
+  TString outfile=AliAnalysisManager::GetCommonFileName();
+  outfile += ":PWG3_D2H";
+  outfile += str.Data();
+
   AliAnalysisTaskSECharmFraction *hfTask;
  
   hfTask = new AliAnalysisTaskSECharmFraction("AliAnalysisTaskSECharmFraction");
@@ -57,7 +61,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *coutputNentries = mgr->CreateContainer(containername.Data(),TH1F::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   
   mgr->ConnectOutput(hfTask,1,coutputNentries);
 
@@ -65,7 +69,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *coutputSignalType = mgr->CreateContainer(containername.Data(),TH1F::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   
   mgr->ConnectOutput(hfTask,2,coutputSignalType);
 
@@ -74,7 +78,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *coutputSignalType_LsCuts = mgr->CreateContainer(containername.Data(),TH1F::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   
   mgr->ConnectOutput(hfTask,3,coutputSignalType_LsCuts);
 
@@ -83,7 +87,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *coutputSignalType_TghCuts = mgr->CreateContainer(containername.Data(),TH1F::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   
   mgr->ConnectOutput(hfTask,4,coutputSignalType_TghCuts);
 
@@ -94,7 +98,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistNCsign = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistNCsign);
   last++;
 
@@ -103,7 +107,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistNCback = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistNCback);
   last++;
 
@@ -111,7 +115,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistNCfromB = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistNCfromB);
   last++;
 
@@ -120,7 +124,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistNCfromDstar = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistNCfromDstar);
   last++;
 
@@ -129,7 +133,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistNCother = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistNCother);
   last++;
 
@@ -139,7 +143,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistLSCsign = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistLSCsign);
   last++;
 
@@ -148,7 +152,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistLSCback = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistLSCback);
   last++;
 
@@ -156,7 +160,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistLSCfromB = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistLSCfromB);
   last++;
 
@@ -165,7 +169,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistLSCfromDstar = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistLSCfromDstar);
   last++;
 
@@ -174,7 +178,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistLSCother = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistLSCother);
   last++;
 
@@ -185,7 +189,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistTGHCsign = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistTGHCsign);
   last++;
 
@@ -194,7 +198,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistTGHCback = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistTGHCback);
   last++;
 
@@ -202,7 +206,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistTGHCfromB = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistTGHCfromB);
   last++;
 
@@ -211,7 +215,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistTGHCfromDstar = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistTGHCfromDstar);
   last++;
 
@@ -220,7 +224,7 @@ AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(const char* fileout="d0D0.r
   containername.Append(str.Data());
   AliAnalysisDataContainer *clistTGHCother = mgr->CreateContainer(containername.Data(),TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          fileout);
+                                                          outfile.Data());
   mgr->ConnectOutput(hfTask,last,clistTGHCother);
   
 
index 1e55269..daf1a81 100644 (file)
@@ -17,15 +17,17 @@ AliAnalysisTaskSED0Mass *AddTaskD0Mass(Int_t flag=0/*0 = D0,1 = LS*/,Bool_t read
   }   
 
   TString filename="",out1name="",out2name="",out3name="",out4name="",inname="";
+  filename = AliAnalysisManager::GetCommonFileName();
+  filename += ":PWG3_D2H_";
   if(flag==0){
-    filename="D0InvMass.root"; 
+    filename+="D0InvMass"; 
     out1name="coutputmassD01";
     out2name="coutputmassD02";
     out3name="nEntriesD0";
     out4name="coutputmassD0distr";
     inname="cinputmassD0_0";
   } else {
-    filename="D0InvMassLikeSign.root";
+    filename+="D0InvMassLikeSign";
     out1name="coutputmassLS1";
     out2name="coutputmassLS2";
     out3name="nEntriesLS";
index a389d7a..ee88e43 100644 (file)
@@ -26,9 +26,11 @@ AliAnalysisTaskSEDplus *AddTaskDplus(Bool_t storeNtuple=kFALSE)
   // Create containers for input/output                                                                                                 
   AliAnalysisDataContainer *cinputDplus = mgr->CreateContainer("cinputDplus",TChain::Class(),
                                                           AliAnalysisManager::kInputContainer);
+  TString outputfile = AliAnalysisManager::GetCommonFileName();
+  outputfile += ":PWG3_D2H_InvMassDplus";
   AliAnalysisDataContainer *coutputDplus = mgr->CreateContainer("coutputDplus",TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                           "InvMassDplus.root");
+                                                               outputfile.Data());
   if(storeNtuple){
     AliAnalysisDataContainer *coutputDplus2 = mgr->CreateContainer("coutputDplus2",TNtuple::Class(),
                                                            AliAnalysisManager::kOutputContainer,