updates from salvatore
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jun 2012 19:44:19 +0000 (19:44 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Jun 2012 19:44:19 +0000 (19:44 +0000)
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.h

index 7fe8d73..3b9e60d 100644 (file)
@@ -252,7 +252,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     if (fAnaType != kEMCALOnly) { 
       histname = "fHistTracksPt_";
       histname += i;
-      fHistTracksPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+      fHistTracksPt[i] = new TH1F(histname.Data(), histname.Data(), (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
       fHistTracksPt[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistTracksPt[i]->GetYaxis()->SetTitle("counts");
       fOutput->Add(fHistTracksPt[i]);
@@ -261,7 +261,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     if (fAnaType == kEMCAL || fAnaType == kEMCALOnly) {    
       histname = "fHistClustersPt_";
       histname += i;
-      fHistClustersPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+      fHistClustersPt[i] = new TH1F(histname.Data(), histname.Data(),  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
       fHistClustersPt[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistClustersPt[i]->GetYaxis()->SetTitle("counts");
       fOutput->Add(fHistClustersPt[i]);
@@ -321,7 +321,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     if (fAnaType != kEMCALOnly) { 
       histname = "fHistMaxTrackPtvsJetPt_";
       histname += i;
-      fHistMaxTrackPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+      fHistMaxTrackPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
       fHistMaxTrackPtvsJetPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
       fHistMaxTrackPtvsJetPt[i]->GetYaxis()->SetTitle("p_{T}^{track} [GeV/c]");
       fOutput->Add(fHistMaxTrackPtvsJetPt[i]);
@@ -330,7 +330,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     if (fAnaType == kEMCAL || fAnaType == kEMCALOnly) {
       histname = "fHistMaxClusPtvsJetPt_";
       histname += i;
-      fHistMaxClusPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+      fHistMaxClusPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
       fHistMaxClusPtvsJetPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
       fHistMaxClusPtvsJetPt[i]->GetYaxis()->SetTitle("p_{T}^{clus} [GeV/c]");
       fOutput->Add(fHistMaxClusPtvsJetPt[i]);
@@ -338,7 +338,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
 
     histname = "fHistMaxPartPtvsJetPt_";
     histname += i;
-    fHistMaxPartPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+    fHistMaxPartPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
     fHistMaxPartPtvsJetPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
     fHistMaxPartPtvsJetPt[i]->GetYaxis()->SetTitle("p_{T}^{part} [GeV/c]");
     fOutput->Add(fHistMaxPartPtvsJetPt[i]);
@@ -346,7 +346,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     if (fAnaType != kEMCALOnly) { 
       histname = "fHistMaxTrackPtvsJetCorrPt_";
       histname += i;
-      fHistMaxTrackPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt, fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+      fHistMaxTrackPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
       fHistMaxTrackPtvsJetCorrPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
       fHistMaxTrackPtvsJetCorrPt[i]->GetYaxis()->SetTitle("p_{T}^{track} [GeV/c]");
       fOutput->Add(fHistMaxTrackPtvsJetCorrPt[i]);
@@ -355,7 +355,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     if (fAnaType == kEMCAL || fAnaType == kEMCALOnly) {
       histname = "fHistMaxClusPtvsJetCorrPt_";
       histname += i;
-      fHistMaxClusPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt, fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+      fHistMaxClusPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
       fHistMaxClusPtvsJetCorrPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
       fHistMaxClusPtvsJetCorrPt[i]->GetYaxis()->SetTitle("p_{T}^{clus} [GeV/c]");
       fOutput->Add(fHistMaxClusPtvsJetCorrPt[i]);
@@ -363,7 +363,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
 
     histname = "fHistMaxPartPtvsJetCorrPt_";
     histname += i;
-    fHistMaxPartPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt, fNbins / 2.5, fMinBinPt, fMaxBinPt / 2.5);
+    fHistMaxPartPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
     fHistMaxPartPtvsJetCorrPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
     fHistMaxPartPtvsJetCorrPt[i]->GetYaxis()->SetTitle("p_{T}^{part} [GeV/c]");
     fOutput->Add(fHistMaxPartPtvsJetCorrPt[i]);
index 9edf899..e6cb613 100644 (file)
@@ -33,9 +33,12 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA() :
   fTrgClusName("ClustersL1GAMMAFEE"),
   fTrgClusters(0),
   fHistCentrality(0),
+  fHistVertex(0),
   fHistTracksCent(0),
   fHistClusCent(0),
   fHistClusTracks(0),
+  fHistCellsCent(0),
+  fHistCellsTracks(0),
   fHistMaxL1FastORCent(0),
   fHistMaxL1ClusCent(0),
   fHistMaxL1ThrCent(0),
@@ -76,9 +79,12 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA(const char *name) :
   fTrgClusName("ClustersL1GAMMAFEE"),
   fTrgClusters(0),
   fHistCentrality(0),
+  fHistVertex(0),
   fHistTracksCent(0),
   fHistClusCent(0),
   fHistClusTracks(0),
+  fHistCellsCent(0),
+  fHistCellsTracks(0),
   fHistMaxL1FastORCent(0),
   fHistMaxL1ClusCent(0),
   fHistMaxL1ThrCent(0),
@@ -131,6 +137,12 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
   fHistCentrality->GetYaxis()->SetTitle("counts");
   fOutput->Add(fHistCentrality);
 
+  fHistVertex = new TH3F("fHistVertex","Vertex position", 6, -3, 3, 6, -3, 3, 60, -30, 30);
+  fHistVertex->GetXaxis()->SetTitle("x");
+  fHistVertex->GetYaxis()->SetTitle("y");
+  fHistVertex->GetZaxis()->SetTitle("z");
+  fOutput->Add(fHistVertex);
+
   fHistTracksCent = new TH2F("fHistTracksCent","Tracks vs. centrality", 100, 0, 100, fNbins, 0, 4000);
   fHistTracksCent->GetXaxis()->SetTitle("Centrality (%)");
   fHistTracksCent->GetYaxis()->SetTitle("No. of tracks");
@@ -147,6 +159,16 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
     fHistClusTracks->GetYaxis()->SetTitle("No. of clusters");
     fOutput->Add(fHistClusTracks);
 
+    fHistCellsCent = new TH2F("fHistCellsCent","Cells vs. centrality", 100, 0, 100, fNbins, 0, 6000);
+    fHistCellsCent->GetXaxis()->SetTitle("Centrality (%)");
+    fHistCellsCent->GetYaxis()->SetTitle("No. of EMCal cells");
+    fOutput->Add(fHistCellsCent);
+
+    fHistCellsTracks = new TH2F("fHistCellsTracks","Cells vs. tracks", fNbins, 0, 4000, fNbins, 0, 6000);
+    fHistCellsTracks->GetXaxis()->SetTitle("No. of tracks");
+    fHistCellsTracks->GetYaxis()->SetTitle("No. of EMCal cells");
+    fOutput->Add(fHistCellsTracks);
+
     fHistClusTimeEnergy = new TH2F("fHistClusTimeEnergy","Time vs. energy of clusters", fNbins, fMinBinPt, fMaxBinPt, fNbins,  0, 1e-6);
     fHistClusTimeEnergy->GetXaxis()->SetTitle("Energy (GeV)");
     fHistClusTimeEnergy->GetYaxis()->SetTitle("Time");
@@ -206,19 +228,19 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
     fOutput->Add(fHistCellsEnergy);
     
     fHistChVSneCells = new TH2F("fHistChVSneCells","Charged energy vs. neutral (cells) energy", 
-                               fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5, fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+                               (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5, (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
     fHistChVSneCells->GetXaxis()->SetTitle("E [GeV]");
     fHistChVSneCells->GetYaxis()->SetTitle("P [GeV/c]");
     fOutput->Add(fHistChVSneCells);
     
     fHistChVSneClus = new TH2F("fHistChVSneClus","Charged energy vs. neutral (clusters) energy", 
-                              fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5, fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+                              (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5, (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
     fHistChVSneClus->GetXaxis()->SetTitle("E [GeV]");
     fHistChVSneClus->GetYaxis()->SetTitle("P [GeV/c]");
     fOutput->Add(fHistChVSneClus);
     
     fHistChVSneCorrCells = new TH2F("fHistChVSneCorrCells","Charged energy vs. neutral (corrected cells) energy", 
-                                   fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5, fNbins * 2.5, fMinBinPt , fMaxBinPt * 2.5);
+                                   (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5, (Int_t)(fNbins * 2.5), fMinBinPt , fMaxBinPt * 2.5);
     fHistChVSneCorrCells->GetXaxis()->SetTitle("E [GeV]");
     fHistChVSneCorrCells->GetYaxis()->SetTitle("P [GeV/c]");
     fOutput->Add(fHistChVSneCorrCells);
@@ -256,7 +278,7 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
     for (Int_t i = 0; i < 4; i++) {
       histname = "fHistJetsPhiEtaPt_";
       histname += i;
-      fHistJetsPhiEtaPt[i] = new TH3F(histname.Data(), histname.Data(), 80, -2, 2, 128, 0, 6.4, fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+      fHistJetsPhiEtaPt[i] = new TH3F(histname.Data(), histname.Data(), 80, -2, 2, 128, 0, 6.4, (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
       fHistJetsPhiEtaPt[i]->GetXaxis()->SetTitle("#eta");
       fHistJetsPhiEtaPt[i]->GetYaxis()->SetTitle("#phi");
       fHistJetsPhiEtaPt[i]->GetZaxis()->SetTitle("p_{T} [GeV/c]");
@@ -264,14 +286,14 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
 
       histname = "fHistJetsPtNonBias_";
       histname += i;
-      fHistJetsPtNonBias[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+      fHistJetsPtNonBias[i] = new TH1F(histname.Data(), histname.Data(), (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
       fHistJetsPtNonBias[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistJetsPtNonBias[i]->GetYaxis()->SetTitle("counts");
       fOutput->Add(fHistJetsPtNonBias[i]);
 
       histname = "fHistJetsPtTrack_";
       histname += i;
-      fHistJetsPtTrack[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+      fHistJetsPtTrack[i] = new TH1F(histname.Data(), histname.Data(), (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
       fHistJetsPtTrack[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistJetsPtTrack[i]->GetYaxis()->SetTitle("counts");
       fOutput->Add(fHistJetsPtTrack[i]);
@@ -279,7 +301,7 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
       if (fAnaType == kEMCAL || fAnaType == kEMCALOnly) {
        histname = "fHistJetsPtClus_";
        histname += i;
-       fHistJetsPtClus[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+       fHistJetsPtClus[i] = new TH1F(histname.Data(), histname.Data(), (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
        fHistJetsPtClus[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
        fHistJetsPtClus[i]->GetYaxis()->SetTitle("counts");
        fOutput->Add(fHistJetsPtClus[i]);
@@ -287,21 +309,21 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
 
       histname = "fHistJetsPt_";
       histname += i;
-      fHistJetsPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5);
+      fHistJetsPt[i] = new TH1F(histname.Data(), histname.Data(), (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
       fHistJetsPt[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistJetsPt[i]->GetYaxis()->SetTitle("counts");
       fOutput->Add(fHistJetsPt[i]);
 
       histname = "fHistJetsPtAreaNonBias_";
       histname += i;
-      fHistJetsPtAreaNonBias[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5);
+      fHistJetsPtAreaNonBias[i] = new TH2F(histname.Data(), histname.Data(), (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5);
       fHistJetsPtAreaNonBias[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistJetsPtAreaNonBias[i]->GetYaxis()->SetTitle("area");
       fOutput->Add(fHistJetsPtAreaNonBias[i]);
 
       histname = "fHistJetsPtArea_";
       histname += i;
-      fHistJetsPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2.5, fMinBinPt, fMaxBinPt * 2.5, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5);
+      fHistJetsPtArea[i] = new TH2F(histname.Data(), histname.Data(), (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5);
       fHistJetsPtArea[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]");
       fHistJetsPtArea[i]->GetYaxis()->SetTitle("area");
       fOutput->Add(fHistJetsPtArea[i]);
@@ -349,19 +371,27 @@ Bool_t AliAnalysisTaskSAQA::FillHistograms()
   if (fCaloClusters)
     fHistClusCent->Fill(fCent, fCaloClusters->GetEntriesFast());
 
-  if (fTracks && fCaloClusters)
-    fHistClusTracks->Fill(fTracks->GetEntriesFast(), fCaloClusters->GetEntriesFast());
+  fHistVertex->Fill(fVertex[0], fVertex[1], fVertex[2]);
 
   Float_t trackSum = DoTrackLoop();
 
   DoJetLoop();
 
   if (fAnaType == kEMCAL || fAnaType == kEMCALOnly) {
+
+    if (fTracks && fCaloClusters)
+      fHistClusTracks->Fill(fTracks->GetEntriesFast(), fCaloClusters->GetEntriesFast());
+
     Float_t clusSum = DoClusterLoop();
 
     Float_t cellSum = 0, cellCutSum = 0;
     
-    DoCellLoop(cellSum, cellCutSum);
+    Int_t ncells = DoCellLoop(cellSum, cellCutSum);
+
+    if (fTracks)
+      fHistCellsTracks->Fill(fTracks->GetEntriesFast(), ncells);
+
+    fHistCellsCent->Fill(fCent, ncells);
     
     fHistChVSneCells->Fill(cellSum, trackSum);
     fHistChVSneClus->Fill(clusSum, trackSum);
@@ -388,14 +418,14 @@ Bool_t AliAnalysisTaskSAQA::FillHistograms()
 }
 
 //________________________________________________________________________
-void AliAnalysisTaskSAQA::DoCellLoop(Float_t &sum, Float_t &sum_cut)
+Int_t AliAnalysisTaskSAQA::DoCellLoop(Float_t &sum, Float_t &sum_cut)
 {
   // Do cell loop.
 
   AliVCaloCells *cells = InputEvent()->GetEMCALCells();
 
   if (!cells)
-    return;
+    return 0;
 
   const Int_t ncells = cells->GetNumberOfCells();
 
@@ -407,6 +437,8 @@ void AliAnalysisTaskSAQA::DoCellLoop(Float_t &sum, Float_t &sum_cut)
       continue;
     sum_cut += amp;
   } 
+
+  return ncells;
 }
 
 //________________________________________________________________________
index 4938d8a..8703e11 100644 (file)
@@ -28,7 +28,7 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
 
   Bool_t                      FillHistograms()                                          ;
   Bool_t                      RetrieveEventObjects()                                    ;
-  void                        DoCellLoop(Float_t &sum, Float_t &sum_cut)                ;
+  Int_t                       DoCellLoop(Float_t &sum, Float_t &sum_cut)                ;
   void                        DoTriggerPrimitives(Int_t &maxL1amp, Int_t &maxL1thr)     ;
   Float_t                     DoTriggerClusLoop()                                       ;
   Float_t                     DoTrackLoop()                                             ;
@@ -42,9 +42,12 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
   TClonesArray               *fTrgClusters;            //!Trg Clusters
 
   TH1F                       *fHistCentrality;         //!Event centrality distribution
+  TH3F                       *fHistVertex;             //!Vertex position
   TH2F                       *fHistTracksCent;         //!Number of tracks vs. centrality
   TH2F                       *fHistClusCent;           //!Number of clusters vs. centrality
   TH2F                       *fHistClusTracks;         //!Number of clusters vs. number of tracks
+  TH2F                       *fHistCellsCent;          //!Number of cells vs. centrality
+  TH2F                       *fHistCellsTracks;        //!Number of cells vs. number of tracks
 
   TH2F                       *fHistMaxL1FastORCent;    //!Maximum L1 trigger FastOR amplitude vs. centrality
   TH2F                       *fHistMaxL1ClusCent;      //!Maximum L1 trigger cluster amplitude vs. centrality