]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixes
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 May 2012 01:39:17 +0000 (01:39 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 May 2012 01:39:17 +0000 (01:39 +0000)
PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C
PWGGA/CaloTrackCorrelations/macros/ana.C

index 553a30f3a56f583927bd69f67a5bf37e0ee51095..52415b6d3e731ff8ef78ff6e0ec26fc4932f6cf2 100644 (file)
@@ -131,11 +131,18 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
   // Photon analysis
   
   maker->AddAnalysis(ConfigurePhotonAnalysis(), n++); // Photon cluster selection
+
+  // Invariant mass analysis Put here to tag selected photons as decay
+  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay    
+  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta", AliAnaPi0EbE::kIMCalo), n++); // Eta event by event selection, invariant mass and photon tagging from decay
+  
+  // Photon analysis
   maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType), n++); // Photon isolation   
   maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kFALSE), n++); // Gamma hadron correlation
   maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kTRUE) , n++); // Isolated gamma hadron correlation
   //maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,kTRUE), n++); // Photon multi isolation, leave it the last   
 
+  
   // Split cluster analysis
   if(kCalorimeter == "EMCAL")
   {
@@ -148,9 +155,7 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
   }
   
   // Invariant mass analysis
-  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay    
   maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0SideBand", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, and photon tagging from decay    
-  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta", AliAnaPi0EbE::kIMCalo), n++); // Eta event by event selection, invariant mass and photon tagging from decay
   maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType), n++);         // Pi0 isolation, invariant mass   
   maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SideBand", partInCone,thresType), n++); // Pi0 isolation, side band   
   maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0"   ,kFALSE), n++); // Pi0 hadron correlation
@@ -198,11 +203,7 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
   if(kPrint) maker->Print("");
   
   printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
-  // CAREFUL
-  //kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kFALSE);
-  kName = Form("%s_Trig%s_Cl%s",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data());
-  if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
-
   // Create task
   
   AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kName.Data()));
index 56134fc22676ed9b82c055207ed3a07d4c9766a0..16ae571430a6b8bcb427bbe6637cb52c88c01fd3 100644 (file)
@@ -208,8 +208,11 @@ void ana(Int_t mode=mGRID)
   //-------------------------------------------------------------------------
   
   // Physics selection
-  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C"); 
-  AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kMC); 
+  if(kInputData=="ESD")
+  {
+    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C"); 
+    AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kMC); 
+  }
   
   // Centrality
   if(kCollision=="PbPb")
@@ -288,6 +291,7 @@ void ana(Int_t mode=mGRID)
     Bool_t  reTM      = kFALSE; // Recalculate matches if not already done in clusterizer
     Bool_t  anTM      = kTRUE;  // Remove matched
     Bool_t  exo       = kTRUE;  // Remove exotic cells
+    Bool_t  clnonlin  = kTRUE;  // Apply non linearity (clusterization)
     Bool_t  annonlin  = kFALSE; // Apply non linearity (analysis)
     Int_t   minEcell  = 50;     // 50  MeV (10 MeV used in reconstruction)
     Int_t   minEseed  = 100;    // 100 MeV
@@ -318,7 +322,7 @@ void ana(Int_t mode=mGRID)
     
     AliAnalysisTaskEMCALClusterize * clv1 = AddTaskEMCALClusterize(arrayNameV1,outAOD,kMC,exo,"V1",clTrigger, clTM,
                                                                    minEcell,minEseed,dTime,wTime,unfMinE,unfFrac,
-                                                                   calibEE,badMap,calibTT,annonlin);    
+                                                                   calibEE,badMap,calibTT,clnonlin);    
     
     printf("Name of clusterizer1 array: %s\n",arrayNameV1.Data());
     
@@ -340,7 +344,7 @@ void ana(Int_t mode=mGRID)
     TString arrayNameV2 = "";
     AliAnalysisTaskEMCALClusterize * clv2 = AddTaskEMCALClusterize(arrayNameV2,outAOD,kMC,exo,"V2",clTrigger, clTM,
                                                                    minEcell,minEseed,dTime,wTime,
-                                                                   calibEE,badMap,calibTT,annonlin);    
+                                                                   calibEE,badMap,calibTT,clnonlin);    
     
     printf("Name of clusterizer2 array: %s\n",arrayNameV2.Data());
     
@@ -370,6 +374,7 @@ void ana(Int_t mode=mGRID)
     Bool_t  reTM      = kFALSE; // Recalculate matches if not already done in clusterizer
     Bool_t  anTM      = kTRUE;  // Remove matched
     Bool_t  exo       = kTRUE;  // Remove exotic cells
+    Bool_t  clnonlin  = kTRUE;  // Apply non linearity (clusterization)
     Bool_t  annonlin  = kFALSE; // Apply non linearity (analysis)
     Int_t   minEcell  = 150;    // 50  MeV (10 MeV used in reconstruction)
     Int_t   minEseed  = 300;    // 100 MeV
@@ -398,7 +403,7 @@ void ana(Int_t mode=mGRID)
     TString arrayNameV1 = "";
     AliAnalysisTaskEMCALClusterize * clv1 = AddTaskEMCALClusterize(arrayNameV1,outAOD,kMC,exo,"V1",clTrigger, clTM,
                                                                    minEcell,minEseed,dTime,wTime,unfMinE,unfFrac,
-                                                                   calibEE,badMap,calibTT,annonlin);    
+                                                                   calibEE,badMap,calibTT,clnonlin);    
     
     printf("Name of clusterizer1 array: %s\n",arrayNameV1.Data());
     
@@ -420,7 +425,7 @@ void ana(Int_t mode=mGRID)
     TString arrayNameV2 = "";
     AliAnalysisTaskEMCALClusterize * clv2 = AddTaskEMCALClusterize(arrayNameV2,outAOD,kMC,exo,"V2",clTrigger, clTM,
                                                                    minEcell,minEseed,dTime,wTime,unfMinE,unfFrac,
-                                                                   calibEE,badMap,calibTT,annonlin);        
+                                                                   calibEE,badMap,calibTT,clnonlin);        
     
     printf("Name of clusterizer2 array: %s\n",arrayNameV2.Data());
     
@@ -994,48 +999,6 @@ void CreateChain(const anaModes mode, TChain * chain, TChain * chainxs)
   
 }
 
-//_________________________________________________________________
-void GetAverageXsection(TTree * tree, Double_t & xs, Float_t & ntr)
-{
-  // Read the PYTHIA statistics from the file pyxsec.root created by
-  // the function WriteXsection():
-  // integrated cross section (xsection) and
-  // the  number of Pyevent() calls (ntrials)
-  // and calculate the weight per one event xsection/ntrials
-  // The spectrum calculated by a user should be
-  // multiplied by this weight, something like this:
-  // TH1F *userSpectrum ... // book and fill the spectrum
-  // userSpectrum->Scale(weight)
-  //
-  // Yuri Kharlov 19 June 2007
-  // Gustavo Conesa 15 April 2008
-  Double_t xsection = 0;
-  UInt_t    ntrials = 0;
-  xs = 0;
-  ntr = 0;
-  
-  Int_t nfiles =  tree->GetEntries()  ;
-  if (tree && nfiles > 0) 
-  {
-    tree->SetBranchAddress("xsection",&xsection);
-    tree->SetBranchAddress("ntrials",&ntrials);
-    for(Int_t i = 0; i < nfiles; i++){
-      tree->GetEntry(i);
-      xs += xsection ;
-      ntr += ntrials ;
-      cout << "xsection " <<xsection<<" ntrials "<<ntrials<<endl; 
-    }
-    
-    xs =   xs /  nfiles;
-    ntr =  ntr / nfiles;
-    cout << "-----------------------------------------------------------------"<<endl;
-    cout << "Average of "<< nfiles<<" files: xsection " <<xs<<" ntrials "<<ntr<<endl; 
-    cout << "-----------------------------------------------------------------"<<endl;
-  } 
-  else cout << " >>>> Empty tree !!!! <<<<< "<<endl;
-  
-}
-
 //______________________________
 void CheckEnvironmentVariables()
 {
@@ -1148,5 +1111,3 @@ void GetAverageXsection(TTree * tree, Double_t & xs, Float_t & ntr)
   
 }
 
-
-