]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Change the calculation of cross section scaling factor, do not scale with AliAnaScale...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Apr 2012 12:18:17 +0000 (12:18 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Apr 2012 12:18:17 +0000 (12:18 +0000)
PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C
PWGGA/CaloTrackCorrelations/macros/ana.C

index 1295967b8f94d86ad2d28f7379fb240efc21686b..4fdd37e85f043ecb98d723d12c7f11e486e05c76 100644 (file)
@@ -115,6 +115,8 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
     
   AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
   
+  maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
+  
   // General frame setting and configuration
   maker->SetReader   (ConfigureReader()   ); 
   maker->SetCaloUtils(ConfigureCaloUtils()); 
@@ -218,9 +220,9 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
                                                              AliAnalysisManager::kOutputContainer, 
                                                              Form("%s",outputfile.Data()));
        
-  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Cuts_%s",kName.Data()), TList::Class(), 
+  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kName.Data()), TList::Class(), 
                                                              AliAnalysisManager::kParamContainer, 
-                                                             Form("%s",outputfile.Data()));
+                                                             "AnalysisParameters.root");
   
   // Create ONLY the output containers for the data produced by the task.
   // Get and connect other common input/output containers via the manager as below
@@ -293,28 +295,6 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
     task->SelectCollisionCandidates(AliVEvent::kSemiCentral);
   }
   
-  //------------------------------------------------ 
-  // Scaling task, for MC in different pT hard bins
-  //-----------------------------------------------
-  if(scaleFactor > 0)
-  {
-    
-    AliAnaScale * scale = new AliAnaScale("scale") ;
-    scale->Set(scaleFactor) ;
-    scale->MakeSumw2(kTRUE);//If you want histograms with error bars set to kTRUE
-    scale->SetDebugLevel(2);
-    mgr->AddTask(scale);
-    
-    AliAnalysisDataContainer *cout_XS = mgr->CreateContainer(Form("scaled%s",kName.Data()), 
-                                                             TList::Class(), 
-                                                             AliAnalysisManager::kOutputContainer, 
-                                                             Form("scaled%s.root",kName.Data()));
-    mgr->ConnectInput  (scale,     0, cout_pc);
-    mgr->ConnectOutput (scale,     0, cout_XS);
-    
-  }
-  
-  
   return task;
 }
 
@@ -988,7 +968,7 @@ AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString particle="Photon",
   if(kCollisions=="pp") 
   {
     ic->SetPtThreshold(0.5);
-    ic->SetConeSize(0.4);
+    ic->SetConeSize(0.5);
   }
   if(kCollisions=="PbPb")
   {
index ac721254290d79e7957dc185d51e25abc170811d..1906e2359aba32160a5c7aebb6aa5a21ddf3836a 100644 (file)
@@ -106,9 +106,15 @@ void ana(Int_t mode=mGRID)
     
     GetAverageXsection(chainxs, xsection, ntrials);
     
-    scale = xsection/ntrials/chain->GetEntries();
+    Int_t    nEventsPerFile = chain->GetEntries() / nfiles;
+    
+    Double_t trials = ntrials / nEventsPerFile ;
+    
+    scale = xsection/trials;
+    
+    printf("Get Cross section : nfiles  %d, nevents %d, nevents per file %d \n",nfiles, chain->GetEntries(),nEventsPerFile);     
+    printf("                    ntrials %d, trials %2.2f, xs %2.2e, scale factor %2.2e\n", ntrials,trials,xsection,scale);
     
-    printf("Get Cross section , nfiles =  %d, nevents %d, ntrials %d, xs %2.3e, scale factor %e\n",nfiles,chain->GetEntries(),ntrials,xsection,scale);
   } 
   
   printf("*********************************************\n");
@@ -266,10 +272,10 @@ void ana(Int_t mode=mGRID)
   
   // Calibration, bad map ...
   
-  Bool_t calibEE = kTRUE; // It is set automatically, but here we force to use ir or not in any case
-  Bool_t calibTT = kTRUE; // It is set automatically, but here we force to use ir or not in any case
+  Bool_t calibEE = kTRUE; // It is set automatically, but here we force to use it or not in any case
+  Bool_t calibTT = kTRUE; // It is set automatically, but here we force to use it or not in any case
   if(kRun < 122195 || (kRun > 126437 && kRun < 136851) || kMC) calibTT=kFALSE ; // Recalibration parameters not available for LHC10a,b,c,e,f,g
-  Bool_t badMap  = kTRUE; // It is set automatically, but here we force to use ir or not in any case  
+  Bool_t badMap  = kTRUE; // It is set automatically, but here we force to use it or not in any case  
   
   if(kCollision=="pp")
   {