]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG4/macros/ana.C
added documentation
[u/mrichter/AliRoot.git] / PWG4 / macros / ana.C
index 226e86fa97ff2e45f5df9acf1a9331d3149ce3b6..7a422c9bad0d599d2a2c9f4eb79873f4625451f4 100644 (file)
@@ -77,6 +77,7 @@ void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisPhoton")
       AliMCEventHandler* mcHandler = new AliMCEventHandler();
       mcHandler->SetReadTR(kFALSE);//Do not search TrackRef file
       mgr->SetMCtruthEventHandler(mcHandler);
+      if( kInputData == "MC") mgr->SetInputEventHandler(NULL);
     }
 
     // AOD output handler
@@ -130,7 +131,7 @@ void ana(Int_t mode=mLocal, TString configName = "ConfigAnalysisPhoton")
       GetAverageXsection(chainxs, xsection, ntrials);
       
       AliAnaScale * scale = new AliAnaScale("scale") ;
-      scale->Set(xsection/ntrials/kNumberOfEventsPerFile/nfiles) ;
+      scale->Set(xsection/ntrials/nfiles) ;
       scale->MakeSumw2(kFALSE);//If you want histograms with error bars set to kTRUE
       //scale->SetDebugLevel(2);
       mgr->AddTask(scale);
@@ -187,6 +188,7 @@ void  LoadLibraries(const anaModes mode) {
     //gSystem->Load("libANALYSIS");
     //gSystem->Load("libANALYSISalice");
     //gSystem->Load("libPHOSUtils");
+       //gSystem->Load("libEMCALUtils");
     //gSystem->Load("libPWG4PartCorrBase");
     //gSystem->Load("libPWG4PartCorrDep");
        
@@ -198,9 +200,9 @@ void  LoadLibraries(const anaModes mode) {
     SetupPar("AOD");
     SetupPar("ANALYSIS");
     SetupPar("ANALYSISalice");
-//If your analysis needs PHOS geometry uncomment following lines
-//     SetupPar("PHOSUtils");
-//     //Create Geometry
+       SetupPar("PHOSUtils");
+       SetupPar("EMCALUtils");
+         //    //Create Geometry
 //    TGeoManager::Import("geometry.root") ; //need file "geometry.root" in local dir!!!!
      SetupPar("PWG4PartCorrBase");
      SetupPar("PWG4PartCorrDep");
@@ -236,8 +238,11 @@ void  LoadLibraries(const anaModes mode) {
     gProof->UploadPackage("ANALYSIS.par");
     gProof->EnablePackage("ANALYSIS");
        // Enable the PHOS geometry Package
-    //gProof->UploadPackage("PHOSUtils.par");
-    //gProof->EnablePackage("PHOSUtils");
+    gProof->UploadPackage("PHOSUtils.par");
+    gProof->EnablePackage("PHOSUtils");
+       // Enable the PHOS geometry Package
+       gProof->UploadPackage("EMCALUtils.par");
+       gProof->EnablePackage("EMCALUtils");      
     // Enable PartCorr analysis
     gProof->UploadPackage("PWG4PartCorrBase.par");
     gProof->EnablePackage("PWG4PartCorrBase");
@@ -372,7 +377,7 @@ void CreateChain(const anaModes mode, TChain * chain, TChain * chainxs){
          skipped++ ;
        }
       }
-      printf("number of entries # %lld, skipped %d\n", chain->GetEntries(), skipped*100) ;     
+      printf("number of entries # %lld, skipped %d\n", chain->GetEntries(), skipped) ;         
     }
     else {
       TString input = "AliESDs.root" ;