changes from saiola
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jul 2012 12:53:58 +0000 (12:53 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jul 2012 12:53:58 +0000 (12:53 +0000)
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.h
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.h
PWGGA/EMCALTasks/AliEmcalPicoTrackMaker.cxx
PWGGA/EMCALTasks/AliEmcalPicoTrackMaker.h

index 3fd4b1b..6bac8c3 100644 (file)
@@ -282,7 +282,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
 
     histname = "fHistJetsPtArea_";
     histname += i;
-    fHistJetsPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5);
+    fHistJetsPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, 100, 0, fJetRadius * fJetRadius * TMath::Pi() * 3);
     fHistJetsPtArea[i]->GetXaxis()->SetTitle("p_{T}^{raw} [GeV/c]");
     fHistJetsPtArea[i]->GetYaxis()->SetTitle("area");
     fOutput->Add(fHistJetsPtArea[i]);
@@ -383,7 +383,7 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
 
     histname = "fHistJetsCorrPtArea_";
     histname += i;
-    fHistJetsCorrPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5);
+    fHistJetsCorrPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt, 100, 0, fJetRadius * fJetRadius * TMath::Pi() * 3);
     fHistJetsCorrPtArea[i]->GetXaxis()->SetTitle("p_{T}^{corr} [GeV/c]");
     fHistJetsCorrPtArea[i]->GetYaxis()->SetTitle("area");
     fOutput->Add(fHistJetsCorrPtArea[i]);
@@ -465,7 +465,14 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
       fHistEmbJetsCorrPt[i]->GetXaxis()->SetTitle("embedded jet p_{T}^{corr} [GeV/c]");
       fHistEmbJetsCorrPt[i]->GetYaxis()->SetTitle("counts");
       fOutput->Add(fHistEmbJetsCorrPt[i]);
-      
+
+      histname = "fHistEmbJetsArea_";
+      histname += i;
+      fHistEmbJetsArea[i] = new TH1F(histname.Data(), histname.Data(), 100, 0, fJetRadius * fJetRadius * TMath::Pi() * 3);
+      fHistEmbJetsArea[i]->GetXaxis()->SetTitle("area");
+      fHistEmbJetsArea[i]->GetYaxis()->SetTitle("counts");
+      fOutput->Add(fHistEmbJetsArea[i]);
+
       histname = "fHistEmbPartPt_";
       histname += i;
       fHistEmbPartPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt);
@@ -668,6 +675,7 @@ Bool_t AliAnalysisTaskSAJF::FillHistograms()
 
     fHistEmbJetsPt[fCentBin]->Fill(embJet->Pt());
     fHistEmbJetsCorrPt[fCentBin]->Fill(embJet->Pt() - fRhoVal * embJet->Area());
+    fHistEmbJetsArea[fCentBin]->Fill(embJet->Area());
     fHistEmbJetPhiEta->Fill(embJet->Eta(), embJet->Phi());
 
     fHistDeltaPtEmb[fCentBin]->Fill(embJet->Pt() - embJet->Area() * fRhoVal - probePt);
index 25aa965..9d41750 100644 (file)
@@ -107,6 +107,7 @@ class AliAnalysisTaskSAJF : public AliAnalysisTaskEmcalJet {
   TH2F                       *fHistEmbNotFoundPhiEta[4];   //!Phi-Eta of "not found" embedded particles
   TH1F                       *fHistEmbJetsPt[4];           //!Pt distribution of embedded jets
   TH1F                       *fHistEmbJetsCorrPt[4];       //!Pt distribution of embedded jets
+  TH1F                       *fHistEmbJetsArea[4];         //!Area distribution of embedded jets
   TH1F                       *fHistEmbPartPt[4];           //!Pt distribution of embedded particle
   TH2F                       *fHistEmbJetPhiEta;           //!Phi-Eta distribution of embedded jets
   TH2F                       *fHistEmbPartPhiEta;          //!Phi-Eta distribution of embedded particles
index 33692a0..3f61ca2 100644 (file)
@@ -33,6 +33,7 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA() :
   AliAnalysisTaskEmcalJet("AliAnalysisTaskSAQA", kTRUE),
   fCellEnergyCut(0.1),
   fDoTrigger(kFALSE),
+  fRepropagateTracks(kFALSE),
   fTrgClusName("ClustersL1GAMMAFEE"),
   fTrgClusters(0),
   fHistCentrality(0),
@@ -84,6 +85,7 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA(const char *name) :
   AliAnalysisTaskEmcalJet(name, kTRUE),
   fCellEnergyCut(0.1),
   fDoTrigger(kFALSE),
+  fRepropagateTracks(kFALSE),
   fTrgClusName("ClustersL1GAMMAFEE"),
   fTrgClusters(0),
   fHistCentrality(0),
@@ -234,15 +236,17 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
   fHistDeltaPhiPt->GetYaxis()->SetTitle("#delta#phi");
   fOutput->Add(fHistDeltaPhiPt);
 
-  fHistDeltaEtaNewProp = new TH1F("fHistDeltaEtaNewProp","fHistDeltaEtaNewProp", 800, -0.4, 0.4);
-  fHistDeltaEtaNewProp->GetXaxis()->SetTitle("#delta#eta");
-  fHistDeltaEtaNewProp->GetYaxis()->SetTitle("counts");
-  fOutput->Add(fHistDeltaEtaNewProp);
-
-  fHistDeltaPhiNewProp = new TH1F("fHistDeltaPhiNewProp","fHistDeltaPhiNewProp", 2560, -1.6, 3.2);
-  fHistDeltaPhiNewProp->GetXaxis()->SetTitle("#delta#phi");
-  fHistDeltaPhiNewProp->GetYaxis()->SetTitle("counts");
-  fOutput->Add(fHistDeltaPhiNewProp);
+  if (fRepropagateTracks) {
+    fHistDeltaEtaNewProp = new TH1F("fHistDeltaEtaNewProp","fHistDeltaEtaNewProp", 800, -0.4, 0.4);
+    fHistDeltaEtaNewProp->GetXaxis()->SetTitle("#delta#eta");
+    fHistDeltaEtaNewProp->GetYaxis()->SetTitle("counts");
+    fOutput->Add(fHistDeltaEtaNewProp);
+    
+    fHistDeltaPhiNewProp = new TH1F("fHistDeltaPhiNewProp","fHistDeltaPhiNewProp", 2560, -1.6, 3.2);
+    fHistDeltaPhiNewProp->GetXaxis()->SetTitle("#delta#phi");
+    fHistDeltaPhiNewProp->GetYaxis()->SetTitle("counts");
+    fOutput->Add(fHistDeltaPhiNewProp);
+  }
 
   if (fAnaType == kEMCAL || fAnaType == kEMCALOnly) {
     fHistClusPhiEtaEnergy = new TH3F("fHistClusPhiEtaEnergy","Phi-Eta-Energy distribution of clusters", fNbins, fMinBinPt, fMaxBinPt, 80, -2, 2, 128, 0, 6.4);
@@ -570,7 +574,7 @@ Float_t AliAnalysisTaskSAQA::DoTrackLoop()
     fHistDeltaEtaPt->Fill(vtrack->Pt(), vtrack->Eta() - vtrack->GetTrackEtaOnEMCal());
     fHistDeltaPhiPt->Fill(vtrack->Pt(), vtrack->Phi() - vtrack->GetTrackPhiOnEMCal());
 
-    if (vtrack->GetTrackEtaOnEMCal() > -2) {    
+    if (fRepropagateTracks && vtrack->GetTrackEtaOnEMCal() > -2) {    
       Float_t propeta = -999, propphi = -999;
       PropagateTrack(vtrack, propeta, propphi);
       fHistDeltaEtaNewProp->Fill(propeta - vtrack->GetTrackEtaOnEMCal());
index 65ed760..4bdb5d3 100644 (file)
@@ -20,9 +20,10 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
   void                        UserCreateOutputObjects();
   void                        Terminate(Option_t *option);
 
-  void                        SetTrgClusName(const char *n)                        { fTrgClusName   = n          ; }
-  void                        SetCellEnergyCut(Float_t cut)                        { fCellEnergyCut = cut        ; }
-  void                        SetDoTrigger(Bool_t trg = kTRUE)                     { fDoTrigger     = trg        ; }
+  void                        SetTrgClusName(const char *n)                        { fTrgClusName        = n          ; }
+  void                        SetCellEnergyCut(Float_t cut)                        { fCellEnergyCut      = cut        ; }
+  void                        SetDoTrigger(Bool_t trg = kTRUE)                     { fDoTrigger          = trg        ; }
+  void                        SetDoRepropagateTracks(Bool_t p = kTRUE)             { fRepropagateTracks  = p          ; }
 
  protected:
 
@@ -38,6 +39,7 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
 
   Float_t                     fCellEnergyCut;            // Energy cell cut
   Bool_t                      fDoTrigger;                // Make trigger qa plots
+  Bool_t                      fRepropagateTracks;        // Repropagate tracks to the EMCal surface
   TString                     fTrgClusName;              // Name of trg clus name
   TClonesArray               *fTrgClusters;              //!Trg Clusters
 
@@ -88,6 +90,6 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
   AliAnalysisTaskSAQA(const AliAnalysisTaskSAQA&);            // not implemented
   AliAnalysisTaskSAQA &operator=(const AliAnalysisTaskSAQA&); // not implemented
 
-  ClassDef(AliAnalysisTaskSAQA, 10) // Quality task for Emcal analysis
+  ClassDef(AliAnalysisTaskSAQA, 11) // Quality task for Emcal analysis
 };
 #endif
index b712ff3..7177d53 100644 (file)
@@ -5,6 +5,8 @@
 // Author: S.Aiola, C.Loizides
 
 #include <TClonesArray.h>
+#include <TRandom3.h>
+
 #include "AliAODEvent.h"
 #include "AliAODTrack.h"
 #include "AliAnalysisManager.h"
@@ -23,7 +25,8 @@ AliEmcalPicoTrackMaker::AliEmcalPicoTrackMaker() :
   fESDtrackCuts(0),
   fTracksOutName("PicoTracks"),
   fTracksInName("tracks"),
-  fMaxTrackPt(100),
+  fMaxTrackPt(1000),
+  fTrackEfficiency(1),
   fTracksIn(0),
   fTracksOut(0)
 {
@@ -39,7 +42,8 @@ AliEmcalPicoTrackMaker::AliEmcalPicoTrackMaker(const char *name) :
   fESDtrackCuts(0),
   fTracksOutName("PicoTracks"),
   fTracksInName("tracks"),
-  fMaxTrackPt(100),
+  fMaxTrackPt(1000),
+  fTrackEfficiency(1),
   fTracksIn(0),
   fTracksOut(0)
 {
@@ -113,6 +117,7 @@ void AliEmcalPicoTrackMaker::UserExec(Option_t *)
 
     if (track->Pt() > fMaxTrackPt)
       continue;
+
     Bool_t isEmc = kFALSE;
     Int_t label = -1;
     if (esdMode) {
@@ -138,7 +143,12 @@ void AliEmcalPicoTrackMaker::UserExec(Option_t *)
        isEmc = kTRUE;
     }
 
-    
+    if (fTrackEfficiency < 1) {
+      Double_t r = gRandom->Rndm();
+      if (fTrackEfficiency < r) 
+       continue;
+    }
+
     /*AliPicoTrack *picotrack =*/ new ((*fTracksOut)[nacc]) AliPicoTrack(track->Pt(), 
                                                                      track->Eta(), 
                                                                      track->Phi(), 
index 71ee22c..3a61206 100644 (file)
@@ -24,6 +24,7 @@ class AliEmcalPicoTrackMaker : public AliAnalysisTaskSE {
   void SetTracksInName(const char *name)             { fTracksInName     = name; }
   void SetTracksOutName(const char *name)            { fTracksOutName    = name; }
   void SetMaxTrackPt(Float_t pt)                     { fMaxTrackPt       = pt  ; }
+  void SetTrackEfficiency(Double_t eff = 0.95)       { fTrackEfficiency = eff  ; }
 
  protected:
   Int_t              fAODfilterBits[2];     // AOD track filter bit map
@@ -31,6 +32,7 @@ class AliEmcalPicoTrackMaker : public AliAnalysisTaskSE {
   TString            fTracksOutName;        // name of output track array
   TString            fTracksInName;         // name of input track array
   Float_t            fMaxTrackPt;           // max pt of tracks
+  Double_t           fTrackEfficiency;      // track efficiency
   TClonesArray      *fTracksIn;             //!track array in
   TClonesArray      *fTracksOut;            //!track array out
 
@@ -38,6 +40,6 @@ class AliEmcalPicoTrackMaker : public AliAnalysisTaskSE {
   AliEmcalPicoTrackMaker(const AliEmcalPicoTrackMaker&);            // not implemented
   AliEmcalPicoTrackMaker &operator=(const AliEmcalPicoTrackMaker&); // not implemented
 
-  ClassDef(AliEmcalPicoTrackMaker, 1); // Task to make PicoTracks in AOD/ESD events
+  ClassDef(AliEmcalPicoTrackMaker, 2); // Task to make PicoTracks in AOD/ESD events
 };
 #endif