up from salvatore
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2013 14:24:41 +0000 (14:24 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2013 14:24:41 +0000 (14:24 +0000)
12 files changed:
PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx
PWGJE/EMCALJetTasks/AliEmcalJetTask.h
PWGJE/EMCALJetTasks/AliHadCorrTask.cxx
PWGJE/EMCALJetTasks/AliJetEmbeddingFromAODTask.cxx
PWGJE/EMCALJetTasks/AliJetEmbeddingFromPYTHIATask.cxx
PWGJE/EMCALJetTasks/AliJetModelBaseTask.cxx
PWGJE/EMCALJetTasks/AliJetResponseMaker.cxx
PWGJE/EMCALJetTasks/AliJetResponseMaker.h
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.h
PWGJE/EMCALJetTasks/macros/AddTaskJetPreparation.C
PWGJE/EMCALJetTasks/macros/runEMCalJetAnalysis.C

index 54d5089..283bea2 100644 (file)
@@ -5,6 +5,7 @@
 // Authors: C.Loizides, S.Aiola
 
 #include <vector>
+#include <algorithm> 
 #include "AliEmcalJetTask.h"
 
 #include <TChain.h>
 ClassImp(AliEmcalJetTask)
 
 //________________________________________________________________________
+inline bool AliEmcalJetTask::ComparePseudoJets(fastjet::PseudoJet a, fastjet::PseudoJet b)
+{
+  if (a.perp() > b.perp())
+    return true;
+  else
+    return false;
+}
+
+//________________________________________________________________________
 AliEmcalJetTask::AliEmcalJetTask() : 
   AliAnalysisTaskSE("AliEmcalJetTask"),
   fTracksName("Tracks"),
@@ -278,6 +288,8 @@ void AliEmcalJetTask::FindJets()
 
   // loop over fastjet jets
   std::vector<fastjet::PseudoJet> jets_incl = fjw.GetInclusiveJets();
+  if (fMarkConst > 0)
+    std::sort(jets_incl.begin(), jets_incl.end(), ComparePseudoJets);
   for (UInt_t ij=0, jetCount=0; ij<jets_incl.size(); ++ij) {
     if (jets_incl[ij].perp()<fMinJetPt) 
       continue;
@@ -323,7 +335,7 @@ void AliEmcalJetTask::FindJets()
         AliVParticle *t = static_cast<AliVParticle*>(fTracks->At(tid));
         if (!t)
           continue;
-       if (fMarkConst)
+       if (jetCount < fMarkConst)
          t->SetBit(fJetType);
         Double_t cEta = t->Eta();
         Double_t cPhi = t->Phi();
@@ -364,7 +376,7 @@ void AliEmcalJetTask::FindJets()
           c = ep->GetCluster();
           if (!c)
             continue;
-         if (fMarkConst)
+         if (jetCount < fMarkConst)
            ep->SetBit(fJetType);
           cEta = ep->Eta();
           cPhi = ep->Phi();
@@ -374,7 +386,7 @@ void AliEmcalJetTask::FindJets()
           c = static_cast<AliVCluster*>(fClus->At(cid));
           if (!c)
             continue;
-         if (fMarkConst)
+         if (jetCount < fMarkConst)
            c->SetBit(fJetType);
           TLorentzVector nP;
           c->GetMomentum(nP, vertex);
@@ -436,7 +448,7 @@ void AliEmcalJetTask::FindJets()
       jet->SetAxisInEmcal(kTRUE);
     jetCount++;
   }
-  fJets->Sort();
+  //fJets->Sort();
 }
 
 //________________________________________________________________________
index 5e2bbe6..3e62fe0 100644 (file)
@@ -6,6 +6,10 @@
 class TClonesArray;
 class AliVEvent;
 
+namespace fastjet {
+  class PseudoJet;
+}
+
 #include "AliLog.h"
 #include "AliAnalysisTaskSE.h"
 
@@ -42,7 +46,7 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   void                   SetClusName(const char *n)       { fCaloName      = n     ; }
   void                   SetJetsName(const char *n)       { fJetsName      = n     ; }
   void                   SetJetType(UInt_t t)             { fJetType       = t     ; }
-  void                   SetMarkConstituents(Bool_t m)    { fMarkConst     = m     ; }
+  void                   SetMarkConstituents(UInt_t m)    { fMarkConst     = m     ; }
   void                   SetMinJetArea(Double_t a)        { fMinJetArea    = a     ; }
   void                   SetMinJetClusPt(Double_t min)    { fMinJetClusPt  = min   ; }
   void                   SetMinJetPt(Double_t j)          { fMinJetPt      = j     ; }
@@ -71,6 +75,8 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
 
   UInt_t                 GetJetType()                     { return fJetType; }
 
+  static bool            ComparePseudoJets(fastjet::PseudoJet a, fastjet::PseudoJet b);
+
  protected:
   void                   FindJets();
   Bool_t                 DoInit();
@@ -81,7 +87,7 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   UInt_t                 fJetType;                // jet type (algorithm, radius, constituents)
   UInt_t                 fConstSel;               // select constituents from a previous jet finding
   UInt_t                 fMCConstSel;             // select MC constituents (label!=0) from a previous jet finding
-  Bool_t                 fMarkConst;              // =true constituents are marked (via TObject::SetBit) as belonging to the jet
+  UInt_t                 fMarkConst;              // constituents are marked (via TObject::SetBit) as belonging to the # leading jets
   Double_t               fRadius;                 // jet radius
   Double_t               fMinJetTrackPt;          // min jet track momentum   (applied before clustering)
   Double_t               fMinJetClusPt;           // min jet cluster momentum (applied before clustering)
@@ -105,6 +111,6 @@ class AliEmcalJetTask : public AliAnalysisTaskSE {
   AliEmcalJetTask(const AliEmcalJetTask&);            // not implemented
   AliEmcalJetTask &operator=(const AliEmcalJetTask&); // not implemented
 
-  ClassDef(AliEmcalJetTask, 6) // Jet producing task
+  ClassDef(AliEmcalJetTask, 7) // Jet producing task
 };
 #endif
index 12bece6..ba42842 100644 (file)
@@ -423,6 +423,11 @@ void AliHadCorrTask::ExecOnce()
 {
   // Init the analysis.
 
+  AliAnalysisTaskEmcal::ExecOnce();
+
+  if (!fInitialized)
+    return;
+
   if (dynamic_cast<AliAODEvent*>(InputEvent()))
     fEsdMode = kFALSE;
 
@@ -447,11 +452,10 @@ void AliHadCorrTask::ExecOnce()
     InputEvent()->AddObject(fOutClusters);
   }
   else {
+    fInitialized = kFALSE;
     AliFatal(Form("%s: Container with same name %s already present. Aborting", GetName(), fOutCaloName.Data()));
     return;
   }
-
-  AliAnalysisTaskEmcal::ExecOnce();
 }
 
 //________________________________________________________________________
index 3a8937e..7081ce8 100644 (file)
@@ -203,8 +203,8 @@ Bool_t AliJetEmbeddingFromAODTask::OpenNextFile()
 
   do {
     if (i>0) {
-      AliDebug(2,Form("Failed to open file %s...", fileName.Data()));
-      if (fQAhistos)
+      AliDebug(3,Form("Failed to open file %s...", fileName.Data()));
+      if (fHistAODFileError)
        fHistAODFileError->Fill(fCurrentAODFileID);
     }
 
@@ -218,9 +218,11 @@ Bool_t AliJetEmbeddingFromAODTask::OpenNextFile()
       TGrid::Connect("alien://");
     }
 
-    AliDebug(2,Form("Trying to open file %s...", fileName.Data()));
+    AliDebug(3,Form("Trying to open file %s...", fileName.Data()));
     fCurrentAODFile = TFile::Open(fileName);
 
+    i++;
+
   } while ((!fCurrentAODFile || fCurrentAODFile->IsZombie()) && i < fAttempts);
 
   if (!fCurrentAODFile || fCurrentAODFile->IsZombie())
@@ -261,8 +263,10 @@ Bool_t AliJetEmbeddingFromAODTask::OpenNextFile()
     fCurrentAODEntry = TMath::Nint(gRandom->Rndm()*fCurrentAODTree->GetEntries());
   else
     fCurrentAODEntry = 0;
+
+  AliDebug(2,Form("Will start embedding from entry %d", fCurrentAODEntry));
   
-  if (fQAhistos)
+  if (fHistFileMatching)
     fHistFileMatching->Fill(fCurrentFileID, fCurrentAODFileID-1);
   
   return kTRUE;
@@ -347,7 +351,8 @@ Bool_t AliJetEmbeddingFromAODTask::IsAODEventSelected()
 void AliJetEmbeddingFromAODTask::Run() 
 {
   if (!GetNextEntry()) {
-    fHistNotEmbedded->Fill(fCurrentFileID);
+    if (fHistNotEmbedded)
+      fHistNotEmbedded->Fill(fCurrentFileID);
     AliError("Unable to get the AOD event to embed. Nothing will be embedded.");
     return;
   }
@@ -425,8 +430,17 @@ void AliJetEmbeddingFromAODTask::Run()
          }
        }
        
+       Int_t label = 0;
+
+       if (fOutMCParticles) {
+         label = track->GetLabel();
+
+         if (label == 0)
+           label = 99999;
+       }
+
        AliDebug(3, Form("Embedding track with pT = %f, eta = %f, phi = %f", track->Pt(), track->Eta(), track->Phi()));
-       AddTrack(track->Pt(), track->Eta(), track->Phi(), type, track->GetTrackEtaOnEMCal(), track->GetTrackPhiOnEMCal(), isEmc, track->GetLabel());
+       AddTrack(track->Pt(), track->Eta(), track->Phi(), type, track->GetTrackEtaOnEMCal(), track->GetTrackPhiOnEMCal(), isEmc, label);
       }
     }
   }
index 087c5d6..3b050a9 100644 (file)
@@ -28,6 +28,7 @@ AliJetEmbeddingFromPYTHIATask::AliJetEmbeddingFromPYTHIATask() :
   // Default constructor.
   SetSuffix("PYTHIAEmbedding");
   fTotalFiles = 2000;
+  fRandomAccess = kTRUE;
 }
 
 //________________________________________________________________________
@@ -42,6 +43,7 @@ AliJetEmbeddingFromPYTHIATask::AliJetEmbeddingFromPYTHIATask(const char *name) :
   // Standard constructor.
   SetSuffix("PYTHIAEmbedding");
   fTotalFiles = 2000;
+  fRandomAccess = kTRUE;
 }
 
 //________________________________________________________________________
index fde3a44..a35cfc8 100644 (file)
@@ -433,7 +433,7 @@ void AliJetModelBaseTask::CopyCells()
 
   fAddedCells = fCaloCells->GetNumberOfCells();
 
-  AliDebug(2, Form("%d cells from the PYTHIA event", fAddedCells));
+  AliDebug(2, Form("%d cells from the current event", fAddedCells));
 }
 
 //________________________________________________________________________
index 10eeb4f..d17f26f 100644 (file)
@@ -65,9 +65,12 @@ AliJetResponseMaker::AliJetResponseMaker() :
   fHistDistancevsCommonEnergy1(0),
   fHistDistancevsCommonEnergy2(0),
   fHistJet2PtOverJet1PtvsJet2Pt(0),
+  fHistJet1PtOverJet2PtvsJet1Pt(0),
   fHistDeltaEtaPhivsJet2Pt(0),
+  fHistDeltaPtvsJet1Pt(0),
   fHistDeltaPtvsJet2Pt(0),
   fHistDeltaPtvsMatchingLevel(0),
+  fHistDeltaCorrPtvsJet1Pt(0),
   fHistDeltaCorrPtvsJet2Pt(0),
   fHistDeltaCorrPtvsMatchingLevel(0),
   fHistNonMatchedJets1PtArea(0),
@@ -126,9 +129,12 @@ AliJetResponseMaker::AliJetResponseMaker(const char *name) :
   fHistDistancevsCommonEnergy1(0),
   fHistDistancevsCommonEnergy2(0),
   fHistJet2PtOverJet1PtvsJet2Pt(0),
+  fHistJet1PtOverJet2PtvsJet1Pt(0),
   fHistDeltaEtaPhivsJet2Pt(0),
+  fHistDeltaPtvsJet1Pt(0),
   fHistDeltaPtvsJet2Pt(0),
   fHistDeltaPtvsMatchingLevel(0),
+  fHistDeltaCorrPtvsJet1Pt(0),
   fHistDeltaCorrPtvsJet2Pt(0),
   fHistDeltaCorrPtvsMatchingLevel(0),
   fHistNonMatchedJets1PtArea(0),
@@ -248,18 +254,30 @@ void AliJetResponseMaker::UserCreateOutputObjects()
   fHistDistancevsCommonEnergy2->GetZaxis()->SetTitle("counts");
   fOutput->Add(fHistDistancevsCommonEnergy2);
 
-  fHistJet2PtOverJet1PtvsJet2Pt = new TH2F("fHistJet2PtOverJet1PtvsJet2Pt", "fHistJet2PtOverJet1PtvsJet2Pt", fNbins, fMinBinPt, fMaxBinPt, 240, 0, 1.2);
+  fHistJet2PtOverJet1PtvsJet2Pt = new TH2F("fHistJet2PtOverJet1PtvsJet2Pt", "fHistJet2PtOverJet1PtvsJet2Pt", fNbins, fMinBinPt, fMaxBinPt, 300, 0, 1.5);
   fHistJet2PtOverJet1PtvsJet2Pt->GetXaxis()->SetTitle("p_{T,2}");  
   fHistJet2PtOverJet1PtvsJet2Pt->GetYaxis()->SetTitle("p_{T,2} / p_{T,1}");
   fHistJet2PtOverJet1PtvsJet2Pt->GetZaxis()->SetTitle("counts");
   fOutput->Add(fHistJet2PtOverJet1PtvsJet2Pt);
 
+  fHistJet1PtOverJet2PtvsJet1Pt = new TH2F("fHistJet1PtOverJet2PtvsJet1Pt", "fHistJet1PtOverJet2PtvsJet1Pt", fNbins, fMinBinPt, fMaxBinPt, 300, 0, 1.5);
+  fHistJet1PtOverJet2PtvsJet1Pt->GetXaxis()->SetTitle("p_{T,1}");  
+  fHistJet1PtOverJet2PtvsJet1Pt->GetYaxis()->SetTitle("p_{T,1} / p_{T,2}");
+  fHistJet1PtOverJet2PtvsJet1Pt->GetZaxis()->SetTitle("counts");
+  fOutput->Add(fHistJet1PtOverJet2PtvsJet1Pt);
+
   fHistDeltaEtaPhivsJet2Pt = new TH3F("fHistDeltaEtaPhivsJet2Pt", "fHistDeltaEtaPhivsJet2Pt", 40, -1, 1, 128, -1.6, 4.8, fNbins/2, fMinBinPt, fMaxBinPt);
   fHistDeltaEtaPhivsJet2Pt->GetXaxis()->SetTitle("#Delta#eta");
   fHistDeltaEtaPhivsJet2Pt->GetYaxis()->SetTitle("#Delta#phi");
   fHistDeltaEtaPhivsJet2Pt->GetZaxis()->SetTitle("p_{T,2}");
   fOutput->Add(fHistDeltaEtaPhivsJet2Pt);
 
+  fHistDeltaPtvsJet1Pt = new TH2F("fHistDeltaPtvsJet1Pt", "fHistDeltaPtvsJet1Pt", fNbins, fMinBinPt, fMaxBinPt, 2*fNbins, -fMaxBinPt, fMaxBinPt);
+  fHistDeltaPtvsJet1Pt->GetXaxis()->SetTitle("p_{T,1}");  
+  fHistDeltaPtvsJet1Pt->GetYaxis()->SetTitle("#deltap_{T} (GeV/c)");
+  fHistDeltaPtvsJet1Pt->GetZaxis()->SetTitle("counts");
+  fOutput->Add(fHistDeltaPtvsJet1Pt);
+
   fHistDeltaPtvsJet2Pt = new TH2F("fHistDeltaPtvsJet2Pt", "fHistDeltaPtvsJet2Pt", fNbins, fMinBinPt, fMaxBinPt, 2*fNbins, -fMaxBinPt, fMaxBinPt);
   fHistDeltaPtvsJet2Pt->GetXaxis()->SetTitle("p_{T,2}");  
   fHistDeltaPtvsJet2Pt->GetYaxis()->SetTitle("#deltap_{T} (GeV/c)");
@@ -273,6 +291,12 @@ void AliJetResponseMaker::UserCreateOutputObjects()
   fOutput->Add(fHistDeltaPtvsMatchingLevel);
 
   if (!fRhoName.IsNull() || !fRho2Name.IsNull()) {  
+    fHistDeltaCorrPtvsJet1Pt = new TH2F("fHistDeltaCorrPtvsJet1Pt", "fHistDeltaCorrPtvsJet1Pt", fNbins/2, fMinBinPt, fMaxBinPt, 2*fNbins, -fMaxBinPt, fMaxBinPt);
+    fHistDeltaCorrPtvsJet1Pt->GetXaxis()->SetTitle("p_{T,1}");  
+    fHistDeltaCorrPtvsJet1Pt->GetYaxis()->SetTitle("#Deltap_{T}^{corr} (GeV/c)");
+    fHistDeltaCorrPtvsJet1Pt->GetZaxis()->SetTitle("counts");
+    fOutput->Add(fHistDeltaCorrPtvsJet1Pt);
+
     fHistDeltaCorrPtvsJet2Pt = new TH2F("fHistDeltaCorrPtvsJet2Pt", "fHistDeltaCorrPtvsJet2Pt", fNbins/2, fMinBinPt, fMaxBinPt, 2*fNbins, -fMaxBinPt, fMaxBinPt);
     fHistDeltaCorrPtvsJet2Pt->GetXaxis()->SetTitle("p_{T,2}");  
     fHistDeltaCorrPtvsJet2Pt->GetYaxis()->SetTitle("#Deltap_{T}^{corr} (GeV/c)");
@@ -942,15 +966,18 @@ Bool_t AliJetResponseMaker::FillHistograms()
        fHistDeltaEtaPhivsJet2Pt->Fill(deta, dphi, jet2->Pt());
 
        Double_t dpt = jet2->MatchedJet()->Pt() - jet2->Pt();
+       fHistDeltaPtvsJet1Pt->Fill(jet2->MatchedJet()->Pt(), dpt);
        fHistDeltaPtvsJet2Pt->Fill(jet2->Pt(), dpt);
        fHistDeltaPtvsMatchingLevel->Fill(jet2->ClosestJetDistance(), dpt);
 
-       fHistJet2PtOverJet1PtvsJet2Pt->Fill(jet2->Pt(),jet2->Pt() / jet2->MatchedJet()->Pt());
+       fHistJet2PtOverJet1PtvsJet2Pt->Fill(jet2->Pt(), jet2->Pt() / jet2->MatchedJet()->Pt());
+       fHistJet1PtOverJet2PtvsJet1Pt->Fill(jet2->MatchedJet()->Pt(), jet2->MatchedJet()->Pt() / jet2->Pt());
 
        fHistJet1PtvsJet2Pt->Fill(jet2->MatchedJet()->Pt(), jet2->Pt());
        
        if (!fRhoName.IsNull() || !fRho2Name.IsNull()) {
          dpt -= fRhoVal * jet2->MatchedJet()->Area() - fRho2Val * jet2->Area();
+         fHistDeltaCorrPtvsJet1Pt->Fill(jet2->MatchedJet()->Pt(), dpt);
          fHistDeltaCorrPtvsJet2Pt->Fill(jet2->Pt(), dpt);
          fHistDeltaCorrPtvsMatchingLevel->Fill(jet2->ClosestJetDistance(), dpt);
          fHistJet1CorrPtvsJet2CorrPt->Fill(jet2->MatchedJet()->Pt() - fRhoVal * jet2->MatchedJet()->Area(), jet2->Pt() - fRho2Val * jet2->Area());
index 99aceaa..2e62f98 100644 (file)
@@ -99,9 +99,12 @@ class AliJetResponseMaker : public AliAnalysisTaskEmcalJet {
   TH2                        *fHistDistancevsCommonEnergy1;            //!distance vs common energy 1 (%)
   TH2                        *fHistDistancevsCommonEnergy2;            //!distance vs common energy 2 (%)
   TH2                        *fHistJet2PtOverJet1PtvsJet2Pt;           //!jet 2 pt over jet 1 pt vs jet 2 pt
+  TH2                        *fHistJet1PtOverJet2PtvsJet1Pt;           //!jet 1 pt over jet 2 pt vs jet 1 pt
   TH3                        *fHistDeltaEtaPhivsJet2Pt;                //!delta eta-phi between matched jets vs jet 2 pt
+  TH2                        *fHistDeltaPtvsJet1Pt;                    //!delta pt between matched jets vs jet 1 pt
   TH2                        *fHistDeltaPtvsJet2Pt;                    //!delta pt between matched jets vs jet 2 pt
   TH2                        *fHistDeltaPtvsMatchingLevel;             //!delta pt between matched jets vs matching level
+  TH2                        *fHistDeltaCorrPtvsJet1Pt;                //!delta pt corr between matched jets vs jet 1 pt
   TH2                        *fHistDeltaCorrPtvsJet2Pt;                //!delta pt corr between matched jets vs jet 2 pt
   TH2                        *fHistDeltaCorrPtvsMatchingLevel;         //!delta pt corr between matched jets vs matching level
   TH2                        *fHistNonMatchedJets1PtArea;              //!non-matched jet 1 pt distribution
index 26289b1..2357f3e 100644 (file)
@@ -44,6 +44,8 @@ AliAnalysisTaskSAJF::AliAnalysisTaskSAJF() :
     fHistConstituents[i] = 0;
     fHistTracksJetPt[i] = 0;
     fHistClustersJetPt[i] = 0;
+    fHistTracksPtDist[i] = 0;
+    fHistClustersPtDist[i] = 0;
     fHistJetNconstVsPt[i] = 0;
   }
 
@@ -71,6 +73,8 @@ AliAnalysisTaskSAJF::AliAnalysisTaskSAJF(const char *name) :
     fHistConstituents[i] = 0;
     fHistTracksJetPt[i] = 0;
     fHistClustersJetPt[i] = 0;
+    fHistTracksPtDist[i] = 0;
+    fHistClustersPtDist[i] = 0;
     fHistJetNconstVsPt[i] = 0;
   }
 
@@ -221,6 +225,14 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
     fHistTracksJetPt[i]->GetZaxis()->SetTitle("counts");
     fOutput->Add(fHistTracksJetPt[i]);
 
+    histname = "fHistTracksPtDist_";
+    histname += i;
+    fHistTracksPtDist[i] = new TH2F(histname.Data(), histname.Data(), fNbins / 2, fMinBinPt, fMaxBinPt / 2, 100, 0, 5);
+    fHistTracksPtDist[i]->GetXaxis()->SetTitle("p_{T,track} (GeV/c)");
+    fHistTracksPtDist[i]->GetYaxis()->SetTitle("d");
+    fHistTracksPtDist[i]->GetZaxis()->SetTitle("counts");
+    fOutput->Add(fHistTracksPtDist[i]);
+
     if (!fCaloName.IsNull()) {
       histname = "fHistClustersJetPt_";
       histname += i;
@@ -229,6 +241,14 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
       fHistClustersJetPt[i]->GetYaxis()->SetTitle("p_{T,jet} (GeV/c)");
       fHistClustersJetPt[i]->GetZaxis()->SetTitle("counts");
       fOutput->Add(fHistClustersJetPt[i]);
+
+      histname = "fHistClustersPtDist_";
+      histname += i;
+      fHistClustersPtDist[i] = new TH2F(histname.Data(), histname.Data(), fNbins / 2, fMinBinPt, fMaxBinPt / 2, 100, 0, 5);
+      fHistClustersPtDist[i]->GetXaxis()->SetTitle("p_{T,clus} (GeV/c)");
+      fHistClustersPtDist[i]->GetYaxis()->SetTitle("d");
+      fHistClustersPtDist[i]->GetZaxis()->SetTitle("counts");
+      fOutput->Add(fHistClustersPtDist[i]);
     }
 
     histname = "fHistJetNconstVsPt_";
@@ -356,6 +376,8 @@ Int_t AliAnalysisTaskSAJF::DoJetLoop()
          fHistJetsZvsPt[fCentBin]->Fill(track->Pt() / jet->Pt(), jet->Pt(), ptLeading);
          constituents.Fill(track->Pt());
          fHistTracksJetPt[fCentBin]->Fill(track->Pt(), jet->Pt());
+         Double_t dist = TMath::Sqrt((track->Eta() - jet->Eta()) * (track->Eta() - jet->Eta()) + (track->Phi() - jet->Phi()) * (track->Phi() - jet->Phi()));
+         fHistTracksPtDist[fCentBin]->Fill(track->Pt(), dist);
        }
       }
     }
@@ -370,6 +392,8 @@ Int_t AliAnalysisTaskSAJF::DoJetLoop()
          fHistJetsZvsPt[fCentBin]->Fill(nPart.Et() / jet->Pt(), jet->Pt(), ptLeading);
          constituents.Fill(nPart.Pt());
          fHistClustersJetPt[fCentBin]->Fill(nPart.Pt(), jet->Pt());
+         Double_t dist = TMath::Sqrt((nPart.Eta() - jet->Eta()) * (nPart.Eta() - jet->Eta()) + (nPart.Phi() - jet->Phi()) * (nPart.Phi() - jet->Phi()));
+         fHistClustersPtDist[fCentBin]->Fill(nPart.Pt(), dist);
        }
       }
     }
index 3044d4c..a691e2f 100644 (file)
@@ -43,6 +43,8 @@ class AliAnalysisTaskSAJF : public AliAnalysisTaskEmcalJet {
   TH2F                       *fHistConstituents[4];        //!x axis = constituents pt; y axis = no. of constituents
   TH2F                       *fHistTracksJetPt[4];         //!Track pt vs. jet pt
   TH2F                       *fHistClustersJetPt[4];       //!Cluster pt vs. jet pt
+  TH2F                       *fHistTracksPtDist[4];        //!Track pt vs. distance form jet axis
+  TH2F                       *fHistClustersPtDist[4];      //!Cluster pt vs. distance form jet axis
   TH3F                       *fHistJetNconstVsPt[4];       //!Jet no. of constituents vs. pt
 
  private:
index 807e84b..f5ef184 100644 (file)
@@ -40,14 +40,16 @@ AliAnalysisTaskSE* AddTaskJetPreparation(
     return 0;
   }    
 
-  if ((strcmp(dataType,"AOD") == 0) && (clusterColName == "CaloClusters"))
+  TString dType(dataType);
+
+  if (dType == "AOD")
     clusterColName = "caloClusters";
 
-  if (makePicoTracks && ((strcmp(dataType,"ESD") == 0) || (strcmp(dataType,"AOD") == 0)) )
+  if (makePicoTracks && (dType == "ESD" || dType == "AOD") )
   {
     TString inputTracks = "tracks";
 
-    if (strcmp(dataType,"ESD") == 0)
+    if (dType == "ESD")
     {
       inputTracks = "HybridTracks";
       TString trackCuts(Form("Hybrid_%s", period.Data()));
index 78cf1c0..7c2380b 100644 (file)
@@ -145,6 +145,7 @@ void runEMCalJetAnalysis(
   // Setup task
   gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/AddTaskEmcalSetup.C");
   AliEmcalSetupTask *setupTask = AddTaskEmcalSetup();
+  setupTask->SetGeoPath("$ALICE_ROOT/OADB/EMCAL");
   
   UInt_t tpc = AliAnalysisTaskEmcal::kTPC;
 
@@ -153,9 +154,10 @@ void runEMCalJetAnalysis(
   {
     gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/AddTaskEMCALTender.C");
     AliAnalysisTaskSE *tender = AddTaskEMCALTender(runPeriod, kFALSE, kTRUE, kTRUE, kTRUE, kTRUE, kTRUE, kFALSE, kTRUE, kTRUE, kTRUE,
-                                                   kTRUE, AliEMCALRecParam::kClusterizerNxN);
+                                                   kFALSE, AliEMCALRecParam::kClusterizerNxN);
     if (usedData != "AOD" && !useGrid) {
       AliTender *alitender = dynamic_cast<AliTender*>(tender);
+      alitender->SetDefaultCDBStorage("local://$ALICE_ROOT/OCDB"); 
     }
   }