]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - CORRFW/test/AliCFTaskForUnfolding.C
Correct the way primary photons are in EMCAL acceptance, change some histograms title...
[u/mrichter/AliRoot.git] / CORRFW / test / AliCFTaskForUnfolding.C
index 446097b9b976c2cd916cabe9e07e9f0c9787ef4d..c7ed24d872424a1d5baac1451bb79b67e551b733 100644 (file)
@@ -7,6 +7,23 @@ const Int_t    PDG    =    211;
 const Int_t    minclustersTPC = 40 ;
 //----------------------------------------------------
 
+/*
+
+Macro to prepare the necessary objects to perform spectrum unfolding 
+(to be used by the class AliCFUnfolding)
+
+Note that the efficiency calculation (and therfore the container filling) 
+has to be done using MC values (and not reconstructed values)
+
+This macro creates the following objects :
+- (AliCFContainer) container    : used to calculate the efficiency (see AliCFEffGrid)
+- (THnSparseD)     correlation  : this is the response matrix
+
+Once you have run this macro, you may launch unfolding using 
+the example macro CORRFW/test/testUnfolding.C
+
+*/
+
 Bool_t AliCFTaskForUnfolding()
 {
   
@@ -21,7 +38,9 @@ Bool_t AliCFTaskForUnfolding()
   printf("\n\nRunning on local file, please check the path\n\n");
 
   analysisChain = new TChain("esdTree");
-  analysisChain->Add("AliESDs.root");
+  analysisChain->Add("your_data_path/001/AliESDs.root");
+  analysisChain->Add("your_data_path/002/AliESDs.root");
+
   
   Info("AliCFTaskForUnfolding",Form("CHAIN HAS %d ENTRIES",(Int_t)analysisChain->GetEntries()));
 
@@ -53,6 +72,8 @@ Bool_t AliCFTaskForUnfolding()
   //setting the bin limits
   container -> SetBinLimits(ipt,binLim0);
   container -> SetBinLimits(ieta ,binLim1);
+  container -> SetVarTitle(ipt,"pT");
+  container -> SetVarTitle(ieta,"#eta");
 
   // Gen-Level kinematic cuts
   AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts");
@@ -119,6 +140,7 @@ Bool_t AliCFTaskForUnfolding()
     correlation->SetBinEdges(k,binEdges[k]);
     correlation->SetBinEdges(k+nvar,binEdges[k]);
   }
+  correlation->Sumw2();
   task->SetCorrelationMatrix(correlation);
   //---