applying a patch from user saiola
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Jun 2012 20:53:27 +0000 (20:53 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Jun 2012 20:53:27 +0000 (20:53 +0000)
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.h
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.h
PWGGA/EMCALJetTasks/macros/AddTaskSAJF.C
PWGGA/EMCALJetTasks/macros/AddTaskSAQA.C

index c0eabc9..b407c25 100644 (file)
@@ -112,6 +112,6 @@ class AliAnalysisTaskSAJF : public AliAnalysisTaskEmcalJet {
   AliAnalysisTaskSAJF(const AliAnalysisTaskSAJF&);            // not implemented
   AliAnalysisTaskSAJF &operator=(const AliAnalysisTaskSAJF&); // not implemented
 
-  ClassDef(AliAnalysisTaskSAJF, 7) // jet analysis task
+  ClassDef(AliAnalysisTaskSAJF, 8) // jet analysis task
 };
 #endif
index 90136d3..adc10f7 100644 (file)
@@ -41,8 +41,8 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA() :
   fHistTracksPt(0),
   fHistTrPhiEta(0),
   fHistTrEmcPhiEta(0),
-  fHistClustersEnergy(0),
-  fHistClusPhiEta(0),
+  fHistClusPhiEtaEnergy(0),
+  fHistNCellsEnergy(0),
   fHistCellsEnergy(0),
   fHistChVSneCells(0),
   fHistChVSneClus(0),
@@ -82,8 +82,8 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA(const char *name) :
   fHistTracksPt(0),
   fHistTrPhiEta(0),
   fHistTrEmcPhiEta(0),
-  fHistClustersEnergy(0),
-  fHistClusPhiEta(0),
+  fHistClusPhiEtaEnergy(0),
+  fHistNCellsEnergy(0),
   fHistCellsEnergy(0),
   fHistChVSneCells(0),
   fHistChVSneClus(0),
@@ -172,15 +172,16 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
   fOutput->Add(fHistTrEmcPhiEta);
 
   if (fAnaType == kEMCAL) {
-    fHistClustersEnergy = new TH1F("fHistClustersEnergy","Energy spectrum of clusters", fNbins, fMinBinPt, fMaxBinPt);
-    fHistClustersEnergy->GetXaxis()->SetTitle("E [GeV]");
-    fHistClustersEnergy->GetYaxis()->SetTitle("counts");
-    fOutput->Add(fHistClustersEnergy);
-
-    fHistClusPhiEta = new TH2F("fHistClusPhiEta","Phi-Eta distribution of clusters", 80, -2, 2, 128, 0, 6.4);
-    fHistClusPhiEta->GetXaxis()->SetTitle("#eta");
-    fHistClusPhiEta->GetYaxis()->SetTitle("#phi");
-    fOutput->Add(fHistClusPhiEta);
+    fHistClusPhiEtaEnergy = new TH3F("fHistClusPhiEtaEnergy","Phi-Eta-Energy distribution of clusters", fNbins, fMinBinPt, fMaxBinPt, 80, -2, 2, 128, 0, 6.4);
+    fHistClusPhiEtaEnergy->GetXaxis()->SetTitle("E [GeV]");
+    fHistClusPhiEtaEnergy->GetYaxis()->SetTitle("#eta");
+    fHistClusPhiEtaEnergy->GetZaxis()->SetTitle("#phi");
+    fOutput->Add(fHistClusPhiEtaEnergy);
+
+    fHistNCellsEnergy = new TH2F("fHistNCellsEnergy","Number of cells vs. energy of clusters", fNbins, fMinBinPt, fMaxBinPt, 30, 0, 30);
+    fHistNCellsEnergy->GetXaxis()->SetTitle("E [GeV]");
+    fHistNCellsEnergy->GetYaxis()->SetTitle("N_{cells}");
+    fOutput->Add(fHistNCellsEnergy);
   }
 
   if (fAnaType == kEMCAL) {
@@ -414,15 +415,13 @@ Float_t AliAnalysisTaskSAQA::DoClusterLoop()
     if (!AcceptCluster(cluster, kTRUE))
       continue;
 
-    fHistClustersEnergy->Fill(cluster->E());
-
     sum += cluster->E();
 
-    Float_t pos[3];
-    cluster->GetPosition(pos);
-    TVector3 clusVec(pos);
-    fHistClusPhiEta->Fill(clusVec.Eta(), clusVec.Phi());
+    TLorentzVector nPart;
+    cluster->GetMomentum(nPart, fVertex);
 
+    fHistClusPhiEtaEnergy->Fill(cluster->E(), nPart.Eta(), nPart.Phi());
+    fHistNCellsEnergy->Fill(cluster->E(), cluster->GetNCells());
   }
 
   return sum;
index 8f98eed..42afdef 100644 (file)
@@ -52,8 +52,10 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
   TH1F                       *fHistTracksPt;             //!Pt spectrum of tracks
   TH2F                       *fHistTrPhiEta;             //!Phi-Eta distribution of tracks
   TH2F                       *fHistTrEmcPhiEta;          //!Phi-Eta emcal distribution of tracks
-  TH1F                       *fHistClustersEnergy;       //!Energy spectrum of clusters
-  TH2F                       *fHistClusPhiEta;           //!Phi-Eta distribution of clusters
+
+  TH3F                       *fHistClusPhiEtaEnergy;     //!Phi-Eta-Energy distribution of clusters
+  TH2F                       *fHistNCellsEnergy;         //!Number of cells vs. energy of cluster
+
   TH3F                       *fHistJetsPhiEtaPt[4];      //!Phi-Eta-Pt distribution of jets
   TH1F                       *fHistJetsPtNonBias[4];     //!Non biased inclusive jet pt spectrum
   TH1F                       *fHistJetsPtClus[4];        //!Inclusive jet pt spectrum cluster biased
@@ -75,6 +77,6 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
   AliAnalysisTaskSAQA(const AliAnalysisTaskSAQA&);            // not implemented
   AliAnalysisTaskSAQA &operator=(const AliAnalysisTaskSAQA&); // not implemented
 
-  ClassDef(AliAnalysisTaskSAQA, 7) // Quality task for Emcal analysis
+  ClassDef(AliAnalysisTaskSAQA, 8) // Quality task for Emcal analysis
 };
 #endif
index d4d0399..9cca3c7 100644 (file)
@@ -1,7 +1,6 @@
 // $Id$
 
 AliAnalysisTaskSAJF* AddTaskSAJF(
-  const char *taskname           = "AliAnalysisTaskSAJF",
   const char *ntracks            = "Tracks",
   const char *nclusters          = "CaloClusters",
   const char *njets              = "Jets",
@@ -11,11 +10,12 @@ AliAnalysisTaskSAJF* AddTaskSAJF(
   const char *nrho               = "Rho",
   Double_t    jetradius          = 0.4,
   Double_t    jetptcut           = 1,
-  Double_t    jetareacut         = 0.2,
+  Double_t    jetareacut         = 0.4,
   Double_t    ptcut              = 0.15,
-  Double_t    jetBiasTrack       = 10,
-  Double_t    jetBiasClus        = 10,
-  UInt_t      type               = AliAnalysisTaskEmcal::kTPC
+  Double_t    jetBiasTrack       = 5,
+  Double_t    jetBiasClus        = 5,
+  UInt_t      type               = AliAnalysisTaskEmcal::kTPC,
+  const char *taskname           = "AliAnalysisTaskSAJF"
 )
 {  
   // Get the pointer to the existing analysis manager via the static access method.
@@ -39,7 +39,27 @@ AliAnalysisTaskSAJF* AddTaskSAJF(
   // Init the task and do settings
   //-------------------------------------------------------
 
-  AliAnalysisTaskSAJF* jetTask = new AliAnalysisTaskSAJF(taskname);
+  TString name(taskname);
+  name += "_";
+  name += njets;
+  name += "_";
+  name += nrho;
+  name += "_Track";
+  name += jetBiasTrack;
+  name += "_Clus";
+  name += jetBiasClus;
+  name += "_R0";
+  name += floor(jetradius*10+0.5);
+  name += "_PtCut";
+  name += floor(ptcut*1000+0.5);
+  name += "_";
+  if (type == AliAnalysisTaskEmcal::kTPC) 
+    name += "TPC";
+  else if (type == AliAnalysisTaskEmcal::kEMCAL) 
+    name += "EMCAL";
+  else if (type == AliAnalysisTaskEmcal::kTPCSmall) 
+    name += "TPCSmall";
+  AliAnalysisTaskSAJF* jetTask = new AliAnalysisTaskSAJF(name);
   jetTask->SetAnaType(type);
   jetTask->SetTracksName(ntracks);
   jetTask->SetClusName(nclusters);
@@ -63,7 +83,7 @@ AliAnalysisTaskSAJF* AddTaskSAJF(
   
   // Create containers for input/output
   AliAnalysisDataContainer *cinput1  = mgr->GetCommonInputContainer()  ;
-  TString contname(taskname);
+  TString contname(name);
   contname += "_histos";
   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(), 
                                                            TList::Class(),AliAnalysisManager::kOutputContainer,
index 06ca498..59d24ae 100644 (file)
@@ -1,18 +1,18 @@
 // $Id: AddTaskSAQA.C 56113 2012-05-01 21:39:27Z loizides $
 
 AliAnalysisTaskSAQA* AddTaskSAQA(
-  const char *taskname           = "AliAnalysisTaskSAQA",
   const char *ntracks            = "Tracks",
   const char *nclusters          = "CaloClusters",
   const char *njets              = "Jets",
-  const char *ntrgclusters       = "ClustersL1GAMMAFEE",
+  const char *ntrgclusters       = "",
   Double_t    jetradius          = 0.4,
   Double_t    jetptcut           = 1,
-  Double_t    jetareacut         = 0.1,
+  Double_t    jetareacut         = 0.4,
   Double_t    ptcut              = 0.15,
-  Double_t    jetBiasTrack       = 10,
-  Double_t    jetBiasClus        = 10,
-  UInt_t      type               = AliAnalysisTaskEmcal::kTPC
+  Double_t    jetBiasTrack       = 5,
+  Double_t    jetBiasClus        = 5,
+  UInt_t      type               = AliAnalysisTaskEmcal::kTPC,
+  const char *taskname           = "AliAnalysisTaskSAQA"
 )
 {  
   // Get the pointer to the existing analysis manager via the static access method.
@@ -35,6 +35,24 @@ AliAnalysisTaskSAQA* AddTaskSAQA(
   //-------------------------------------------------------
   // Init the task and do settings
   //-------------------------------------------------------
+  TString name(taskname);
+  name += "_";
+  name += njets;
+  name += "_Track";
+  name += jetBiasTrack;
+  name += "_Clus";
+  name += jetBiasClus;
+  name += "_R0";
+  name += floor(jetradius*10+0.5);
+  name += "_PtCut";
+  name += floor(ptcut*1000+0.5);
+  name += "_";
+  if (type == AliAnalysisTaskEmcal::kTPC) 
+    name += "TPC";
+  else if (type == AliAnalysisTaskEmcal::kEMCAL) 
+    name += "EMCAL";
+  else if (type == AliAnalysisTaskEmcal::kTPCSmall) 
+    name += "TPCSmall";
   AliAnalysisTaskSAQA* qaTask = new AliAnalysisTaskSAQA(taskname);
   qaTask->SetTracksName(ntracks);
   qaTask->SetClusName(nclusters);
@@ -57,7 +75,7 @@ AliAnalysisTaskSAQA* AddTaskSAQA(
   // Create containers for input/output
   AliAnalysisDataContainer *cinput1  = mgr->GetCommonInputContainer()  ;
 
-  TString contName(taskname);
+  TString contName(name);
   contName += "_histos";
   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contName.Data(), 
                                                            TList::Class(),AliAnalysisManager::kOutputContainer,