Updates
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2013 15:45:45 +0000 (15:45 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2013 15:45:45 +0000 (15:45 +0000)
PWGJE/EMCALJetTasks/AliJetResponseMaker.cxx
PWGJE/EMCALJetTasks/AliJetResponseMaker.h
PWGJE/UserTasks/AliAnalysisTaskJetShape.cxx
PWGJE/UserTasks/AliAnalysisTaskJetShape.h

index a8505fb..10eeb4f 100644 (file)
@@ -64,6 +64,7 @@ AliJetResponseMaker::AliJetResponseMaker() :
   fHistMatchingLevelvsJet2Pt(0),
   fHistDistancevsCommonEnergy1(0),
   fHistDistancevsCommonEnergy2(0),
+  fHistJet2PtOverJet1PtvsJet2Pt(0),
   fHistDeltaEtaPhivsJet2Pt(0),
   fHistDeltaPtvsJet2Pt(0),
   fHistDeltaPtvsMatchingLevel(0),
@@ -124,6 +125,7 @@ AliJetResponseMaker::AliJetResponseMaker(const char *name) :
   fHistMatchingLevelvsJet2Pt(0),
   fHistDistancevsCommonEnergy1(0),
   fHistDistancevsCommonEnergy2(0),
+  fHistJet2PtOverJet1PtvsJet2Pt(0),
   fHistDeltaEtaPhivsJet2Pt(0),
   fHistDeltaPtvsJet2Pt(0),
   fHistDeltaPtvsMatchingLevel(0),
@@ -246,13 +248,19 @@ void AliJetResponseMaker::UserCreateOutputObjects()
   fHistDistancevsCommonEnergy2->GetZaxis()->SetTitle("counts");
   fOutput->Add(fHistDistancevsCommonEnergy2);
 
+  fHistJet2PtOverJet1PtvsJet2Pt = new TH2F("fHistJet2PtOverJet1PtvsJet2Pt", "fHistJet2PtOverJet1PtvsJet2Pt", fNbins, fMinBinPt, fMaxBinPt, 240, 0, 1.2);
+  fHistJet2PtOverJet1PtvsJet2Pt->GetXaxis()->SetTitle("p_{T,2}");  
+  fHistJet2PtOverJet1PtvsJet2Pt->GetYaxis()->SetTitle("p_{T,2} / p_{T,1}");
+  fHistJet2PtOverJet1PtvsJet2Pt->GetZaxis()->SetTitle("counts");
+  fOutput->Add(fHistJet2PtOverJet1PtvsJet2Pt);
+
   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);
 
-  fHistDeltaPtvsJet2Pt = new TH2F("fHistDeltaPtvsJet2Pt", "fHistDeltaPtvsJet2Pt", fNbins/2, fMinBinPt, fMaxBinPt, 2*fNbins, -fMaxBinPt, fMaxBinPt);
+  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)");
   fHistDeltaPtvsJet2Pt->GetZaxis()->SetTitle("counts");
@@ -523,9 +531,6 @@ Bool_t AliJetResponseMaker::DoJetMatching()
     if (jet1->Eta() < fJetMinEta || jet1->Eta() > fJetMaxEta || jet1->Phi() < fJetMinPhi || jet1->Phi() > fJetMaxPhi)
       continue;
 
-    if (jet1->Pt() > fMaxBinPt)
-      continue;
-
     if (jet1->ClosestJet() && jet1->ClosestJet()->ClosestJet() == jet1 && 
         jet1->ClosestJetDistance() < fMatchingPar1 && jet1->ClosestJet()->ClosestJetDistance() < fMatchingPar2) {    // Matched jet found
       jet1->SetMatchedToClosest(fMatching);
@@ -880,9 +885,6 @@ Bool_t AliJetResponseMaker::FillHistograms()
       continue;
     }
 
-    if (jet2->Pt() > fMaxBinPt)
-      continue;
-
     if (!AcceptJet(jet2))
       continue;
 
@@ -943,6 +945,8 @@ Bool_t AliJetResponseMaker::FillHistograms()
        fHistDeltaPtvsJet2Pt->Fill(jet2->Pt(), dpt);
        fHistDeltaPtvsMatchingLevel->Fill(jet2->ClosestJetDistance(), dpt);
 
+       fHistJet2PtOverJet1PtvsJet2Pt->Fill(jet2->Pt(),jet2->Pt() / jet2->MatchedJet()->Pt());
+
        fHistJet1PtvsJet2Pt->Fill(jet2->MatchedJet()->Pt(), jet2->Pt());
        
        if (!fRhoName.IsNull() || !fRho2Name.IsNull()) {
index 8974e14..99aceaa 100644 (file)
@@ -98,6 +98,7 @@ class AliJetResponseMaker : public AliAnalysisTaskEmcalJet {
   TH2                        *fHistMatchingLevelvsJet2Pt;              //!matching level vs jet 2 pt
   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
   TH3                        *fHistDeltaEtaPhivsJet2Pt;                //!delta eta-phi between matched jets vs jet 2 pt
   TH2                        *fHistDeltaPtvsJet2Pt;                    //!delta pt between matched jets vs jet 2 pt
   TH2                        *fHistDeltaPtvsMatchingLevel;             //!delta pt between matched jets vs matching level
index 3cb0394..b2061ab 100644 (file)
@@ -1248,7 +1248,8 @@ void AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::InitHistos()
   }
 
   fhPtJ      = Hist1D("hPtJ"  , fPtJetNbin, fPtJetArray.GetArray(), "Pt_{J} GeV/c");
-  fhPsiVsR   = Hist1D("hPsiVsR", fPsiVsRNbin, 0., fRmax, "R", 1, "#Psi(R)");
+  //  fhPsiVsR   = Hist1D("hPsiVsR", fPsiVsRNbin, 0., fRmax, "R", 1, "#Psi(R)");
+  fhPsiVsR   = Hist3D("hPsiVsR", fPsiVsRNbin, 0., fRmax, 10, 0., 1., fPtJetNbin, fPtJetArray.GetArray(), "R", "P_{Jt, frac}", "P_{J} GeV/c");
   fhPsiVsRPtJ   = Hist2D("hPsiVsRPtJ", fPsiVsRNbin, 0., fRmax, fPtJetNbin, fPtJetArray.GetArray(), "R", "P_{tJ} GeV/c", 1, "#Psi(R)");
 
   fhPtJvsPtCorr  = Hist2D("fhPtJvsPtCorr", fPtJetNbin, fPtJetArray.GetArray(), 100, -100, 100, "P_{tJ} GeV/c", "P_{tJ} - P_{tJ,corr} GeV/c" , 1);
@@ -1273,7 +1274,7 @@ void AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::InitHistos()
   fhPsiVsR_MCtr      = Hist1D("hPsiVsR_MCtr", fPsiVsRNbin, 0., fRmax, "R", 1, "#Psi(R)");
   fhPsiVsRPtJ_MCtr   = Hist2D("hPsiVsRPtJ_MCtr", fPsiVsRNbin, 0., fRmax, fPtJetNbin, fPtJetArray.GetArray(), "R", "P_{tJ} GeV/c", 1, "#Psi(R)");
   fhJetTrPtVsPartPt  = Hist2D("fhJetTrPtVsPartPt", fPtJetNbin, fPtJetArray.GetArray(), 100, -1, 1, "P_{tJ,part} GeV/c", "1-P_{tJ,tr}/P_{tJ,part} GeV/c" , 1);
-      const char *ch[2]={"p","m"};
+  const char *ch[2]={"m","p"};
       for(Int_t i=0; i<3; i++)
        {
          for(Int_t j=0; j<2; j++)
@@ -1282,8 +1283,8 @@ void AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::InitHistos()
          fhPhiresVsPhi[i][j]  = Hist2D(Form("hPhiresVsPhi%d%s",i,ch[j]), 600, 0, TMath::TwoPi(), 128, -0.2, 0.2, "#phi^{gen} rad", "#phi^{rec} - #phi^{gen} rad" );
          fhEtaresVsEta[i][j]  = Hist2D(Form("hEtaresVsEta%d%s",i,ch[j]), 200, -1, 1, 40, -0.2, 0.2, "#eta^{gen}", "#eta^{rec} - #eta^{gen}" ); 
          fhRresVsPt[i][j]     = Hist2D(Form("hRresVsPt%d%s",i,ch[j])  , 100, 0, 100, 500, -fRmax, fRmax, "P_{t, track}^{gen} GeV/c", "R^{gen}-R^{rec}" );    
-         fhDCAxy[i][j]        = Hist2D(Form("hDCAxy%d%s",i,ch[j]), 100, 0, 100, 300, -3, 3, "DCAxy of prim [cm]");
-         fhDCAz[i][j]         = Hist2D(Form("hDCAz%d%s",i,ch[j]) , 100, 0, 100, 300, -3, 3, "DCAz of prim [cm]") ;
+         fhDCAxy[i][j]        = Hist2D(Form("hDCAxy%d%s",i,ch[j]), 100, 0, 100, 300, -3, 3, Form("p_{t} of part. type %d%s [GeV/c]",i,ch[j]), "DCAxy [cm]");
+         fhDCAz[i][j]         = Hist2D(Form("hDCAz%d%s",i,ch[j]) , 100, 0, 100, 300, -3, 3, Form("p_{t} of part. type %d%s [GeV/c]",i,ch[j]), "DCAz  [cm]") ;
          fhTrackPtEtaPhi[i][j]= Hist3D(Form("hTrackPtEtaPhi%d%s",i,ch[j]), 100, 0, 100, 100, -1, 1, 100, 0, TMath::TwoPi(),"P_{t} GeV/c ","#eta","#phi rad");
            }
        }
@@ -1383,11 +1384,13 @@ Bool_t AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::AddEvent(AliAODEvent*
 
   TVector3 vecJ(jet->Px(),jet->Py(),jet->Pz());
 
-  for(int it = 0;it < size;++it){
 
+
+
+  for(int it = 0;it < size;++it){
     TVector3 vec;
     Int_t ch = -999;
-    Int_t label = -999;
+    Int_t label = 0;
 
  
     if(fkMC)
@@ -1449,13 +1452,14 @@ Bool_t AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::AddEvent(AliAODEvent*
 
        Double_t phip = AliAnalysisTaskJetShapeTool::CalcdPhi0To2pi(part->Phi());
        Double_t dphi = AliAnalysisTaskJetShapeTool::CalcdPhiSigned(part->Phi(), vec.Phi());
+       Double_t phiT = AliAnalysisTaskJetShapeTool::CalcdPhi0To2pi(vec.Phi());
 
        fhPtresVsPt[type][ch]->Fill(part->Pt(), 1-vec.Pt()/part->Pt());
        fhPhiresVsPhi[type][ch]->Fill(phip, dphi);
        fhEtaresVsEta[type][ch]->Fill(part->Eta(), vec.Eta() - part->Eta());
        fhDCAxy[type][ch]->Fill(part->Pt(), dca[0]);
        fhDCAz[type][ch]->Fill( part->Pt(), dca[1]);
-       fhTrackPtEtaPhi[type][ch]->Fill(vec.Pt(), vec.Eta(), vec.Phi());
+       fhTrackPtEtaPhi[type][ch]->Fill(vec.Pt(), vec.Eta(), phiT);
 
        TVector3 vecP(part->Px(), part->Py(), part->Pz());
        Double_t Rgen = CalcR(vecJ, vecP);
@@ -1509,10 +1513,10 @@ Bool_t AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::AddEvent(AliAODEvent*
 
        Double_t R = CalcR(fJvec, vec);
        //      Double_t pt = (tr->Px()*pJ[0] + tr->Py()*pJ[1])/PtJ;
-       //      Double_t probL = fJvec.Dot(vec)/fJvec.Mag2();
+       Double_t probL = fJvec.Dot(vec)/fJvec.Mag2();
        //      fhPsiVsR->Fill(R, probL);
        //      fhPsiVsRPtJ->Fill(R, fPtJ, probL);
-       fhPsiVsR->Fill(R);
+       fhPsiVsR->Fill(R,probL, fJvec.Mag());
        fhPsiVsRPtJ->Fill(R, fPtJ);
  
        Double_t phi = AliAnalysisTaskJetShapeTool::CalcdPhi0To2pi(vec.Phi());
@@ -1524,14 +1528,14 @@ Bool_t AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::AddEvent(AliAODEvent*
   if(fkMCprod)
     {
       TVector3 fJvecMCtr(pJmc[0], pJmc[1], pJmc[2]);
-  Double_t fPtJMCtr=  fJvecMCtr.Perp();
+      Double_t fPtJMCtr=  fJvecMCtr.Perp();
 
-  fhJetTrPtVsPartPt->Fill(fPtJMCtr, 1-fPtJ/fPtJMCtr);
+      fhJetTrPtVsPartPt->Fill(fPtJMCtr, 1-fPtJ/fPtJMCtr);
       for(Int_t it = 0; it<counterMC; it++)
        {
          TVector3 vec;
 
-         AliAODMCParticle *part = dynamic_cast<AliAODMCParticle*>(arrP->At(IndexArrayMC[it]));
+         AliAODMCParticle *part = dynamic_cast<AliAODMCParticle*>(arrP->At(TMath::Abs(IndexArrayMC[it])));
          if(!part) continue;
          vec.SetXYZ(part->Px(), part->Py(), part->Pz());
 
@@ -1733,6 +1737,28 @@ TH3F *AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::Hist3D(const char* nam
   return res;
 }
 
+TH3F *AliAnalysisTaskJetShape::AliAnalysisTaskJetShapeHM::Hist3D(const char* name, Int_t nBinsx, Double_t xMin, Double_t xMax, 
+                                                  Int_t nBinsy, Double_t yMin, Double_t yMax, 
+                                                 Int_t nBinsz, Double_t *zArr, const char* xLabel, const char* yLabel, const char* zLabel, Int_t color)
+{
+// create a 3D histogram
+
+  Double_t xArr[nBinsx+1], yArr[nBinsy+1];
+
+  for(Int_t i=0; i<=nBinsx; i++) xArr[i]=xMin+i*(xMax-xMin)/nBinsx;
+  for(Int_t i=0; i<=nBinsy; i++) yArr[i]=yMin+i*(yMax-yMin)/nBinsy;
+
+  TH3F *res = new TH3F(Form("%s_%s",fComment.Data(), name), Form("%s_%s",fComment.Data(), name), nBinsx, xArr, nBinsy, yArr, nBinsz, zArr);
+  if (xLabel) res->GetXaxis()->SetTitle(xLabel);
+  if (yLabel) res->GetYaxis()->SetTitle(yLabel);
+  if (zLabel) res->GetZaxis()->SetTitle(zLabel);
+  //  res->SetMarkerStyle(kFullCircle);
+  //  res->SetOption("E");
+  res->SetLineColor(color);
+  //  fOutputList->Add(res);
+  return res;
+}
+
 
 //////////////////////////////////////
 
index 6d52ec9..76a4fe0 100644 (file)
@@ -253,7 +253,7 @@ private:
  TH1F *fhMult; //! 
  TH1F *fhPtJ;//! 
  TH2F *fhPtJvsPtCorr;//! 
- TH1F *fhPsiVsR;//! 
+ TH3F *fhPsiVsR;//! 
  TH2F *fhPsiVsRPtJ;//! 
  TH2F *fhPhiEtaTrack;//! 
 
@@ -275,7 +275,7 @@ private:
     TH2F *fhRresVsPt[3][2];//!
     TH2F *fhDCAxy[3][2]; //!
     TH2F *fhDCAz[3][2]; //!
-    TH3F *fhTrackPtEtaPhi[2][2];//!
+    TH3F *fhTrackPtEtaPhi[3][2];//!
 
  Int_t     fPtJetNbin;
  TArrayD   fPtJetArray;
@@ -303,6 +303,7 @@ private:
  TH2F *Hist2D(const char* name, Int_t nBinsx, Double_t xMin, Double_t xMax, Int_t nBinsy, Double_t *yArray, const char* xLabel = NULL, const char* yLabel = NULL, Int_t color=1, const char* zLabel = NULL);
  TH2F *Hist2D(const char* name, Int_t nBinsx, Double_t *yArrax, Int_t nBinsy, Double_t yMin, Double_t yMax, const char* xLabel = NULL, const char* yLabel = NULL, Int_t color=1, const char* zLabel = NULL);
   TH3F *Hist3D(const char* name, Int_t nBinsx, Double_t xMin, Double_t xMax, Int_t nBinsy, Double_t yMin, Double_t yMax, Int_t nBinsz, Double_t zMin, Double_t zMax, const char* xLabel = NULL, const char* yLabel = NULL, const char* zLabel = NULL, Int_t color=1);
+  TH3F *Hist3D(const char* name, Int_t nBinsx, Double_t xMin, Double_t xMax, Int_t nBinsy, Double_t yMin, Double_t yMax, Int_t nBinsz, Double_t *z, const char* xLabel = NULL, const char* yLabel = NULL, const char* zLabel = NULL, Int_t color=1);
 
 
   AliAnalysisTaskJetShapeHM(const AliAnalysisTaskJetShapeHM&);            // not implemented