hjet mass ana update + bug fix
authormverweij <marta.verweij@cern.ch>
Wed, 19 Nov 2014 13:27:38 +0000 (14:27 +0100)
committermverweij <marta.verweij@cern.ch>
Wed, 19 Nov 2014 14:00:29 +0000 (15:00 +0100)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalHJetMass.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalHJetMass.h

index 571bf4f..eaaed67 100644 (file)
@@ -42,6 +42,7 @@ AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass() :
   fJetMassType(kRaw),
   fDPhiHJetMax(0.6),
   fh1PtHadron(0),
+  fh3PtHPtJDPhi(0),
   fh3PtJet1VsMassVsHPtAllSel(0),
   fh3PtJet1VsMassVsHPtTagged(0),
   fh3PtJet1VsMassVsHPtTaggedMatch(0),
@@ -51,7 +52,8 @@ AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass() :
 {
   // Default constructor.
 
-  fh1PtHadron                          = new TH1F*[fNcentBins];
+  fh1PtHadron                       = new TH1F*[fNcentBins];
+  fh3PtHPtJDPhi                     = new TH3F*[fNcentBins];
   fh3PtJet1VsMassVsHPtAllSel        = new TH3F*[fNcentBins];
   fh3PtJet1VsMassVsHPtTagged        = new TH3F*[fNcentBins];
   fh3PtJet1VsMassVsHPtTaggedMatch   = new TH3F*[fNcentBins];
@@ -60,7 +62,8 @@ AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass() :
   fh3PtJet1VsRatVsHPtTaggedMatch    = new TH3F*[fNcentBins];
 
   for (Int_t i = 0; i < fNcentBins; i++) {
-    fh1PtHadron[i]                          = 0;
+    fh1PtHadron[i]                       = 0;
+    fh3PtHPtJDPhi[i]                     = 0;
     fh3PtJet1VsMassVsHPtAllSel[i]        = 0;
     fh3PtJet1VsMassVsHPtTagged[i]        = 0;
     fh3PtJet1VsMassVsHPtTaggedMatch[i]   = 0;
@@ -82,6 +85,7 @@ AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass(const char *name) :
   fJetMassType(kRaw),
   fDPhiHJetMax(0.6),
   fh1PtHadron(0),
+  fh3PtHPtJDPhi(0),
   fh3PtJet1VsMassVsHPtAllSel(0),
   fh3PtJet1VsMassVsHPtTagged(0),
   fh3PtJet1VsMassVsHPtTaggedMatch(0),
@@ -91,7 +95,8 @@ AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass(const char *name) :
 {
   // Standard constructor.
 
-  fh1PtHadron                          = new TH1F*[fNcentBins];
+  fh1PtHadron                       = new TH1F*[fNcentBins];
+  fh3PtHPtJDPhi                     = new TH3F*[fNcentBins];
   fh3PtJet1VsMassVsHPtAllSel        = new TH3F*[fNcentBins];
   fh3PtJet1VsMassVsHPtTagged        = new TH3F*[fNcentBins];
   fh3PtJet1VsMassVsHPtTaggedMatch   = new TH3F*[fNcentBins];
@@ -100,7 +105,8 @@ AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass(const char *name) :
   fh3PtJet1VsRatVsHPtTaggedMatch    = new TH3F*[fNcentBins];
  
   for (Int_t i = 0; i < fNcentBins; i++) {
-    fh1PtHadron[i]                          = 0;
+    fh1PtHadron[i]                       = 0;
+    fh3PtHPtJDPhi[i]                     = 0;
     fh3PtJet1VsMassVsHPtAllSel[i]        = 0;
     fh3PtJet1VsMassVsHPtTagged[i]        = 0;
     fh3PtJet1VsMassVsHPtTaggedMatch[i]   = 0;
@@ -144,6 +150,10 @@ void AliAnalysisTaskEmcalHJetMass::UserCreateOutputObjects()
   const Double_t minPtH = 0.;
   const Double_t maxPtH = 100.;
 
+  const Int_t nBinsPhi  = 18*4;
+  const Double_t minPhi = -0.5*TMath::Pi();
+  const Double_t maxPhi = 1.5*TMath::Pi();
+
   TString histName = "";
   TString histTitle = "";
   for (Int_t i = 0; i < fNcentBins; i++) {
@@ -152,6 +162,11 @@ void AliAnalysisTaskEmcalHJetMass::UserCreateOutputObjects()
     fh1PtHadron[i] = new TH1F(histName.Data(),histTitle.Data(),200.,0.,200.);
     fOutput->Add(fh1PtHadron[i]);
 
+    histName = TString::Format("fh3PtHPtJDPhi_%d",i);
+    histTitle = TString::Format("%s;#it{p}_{T,h};#it{p}_{T,jet};#Delta#varphi_{h,jet}",histName.Data());
+    fh3PtHPtJDPhi[i] = new TH3F(histName.Data(),histTitle.Data(),nBinsPtH,minPtH,maxPtH,nBinsPt,minPt,maxPt,nBinsPhi,minPhi,maxPhi);
+    fOutput->Add(fh3PtHPtJDPhi[i]);
+
     histName = TString::Format("fh3PtJet1VsMassVsHPtAllSel_%d",i);
     histTitle = TString::Format("%s;#it{p}_{T,jet1};#it{M}_{jet1};#it{p}_{T,h}",histName.Data());
     fh3PtJet1VsMassVsHPtAllSel[i] = new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsM,minM,maxM,nBinsPtH,minPtH,maxPtH);
@@ -205,7 +220,8 @@ Bool_t AliAnalysisTaskEmcalHJetMass::Run()
       if(jCont) {
        jCont->ResetCurrentID();
        while((jet = jCont->GetNextAcceptJet())) {
-         Double_t dphi = GetDeltaPhi(vp,jet)+TMath::Pi();
+         Double_t dphi = GetDeltaPhi(vp,jet)-TMath::Pi();
+         fh3PtHPtJDPhi[fCentBin]->Fill(vp->Pt(),jet->Pt() - GetRhoVal(fContainerBase)*jet->Area(),dphi);
          if(dphi>fDPhiHJetMax) continue;
          FillHJetHistograms(vp->Pt(),jet);
        }
index 0821e68..1280e07 100644 (file)
@@ -52,6 +52,7 @@ class AliAnalysisTaskEmcalHJetMass : public AliAnalysisTaskEmcalJet {
   Double_t                            fDPhiHJetMax;                // maximum delta phi between hadron and jet
 
   TH1F            **fh1PtHadron;                        //!pt of hadrons
+  TH3F            **fh3PtHPtJDPhi;                      //!pt hadron vs pt jet vs delta phi
   TH3F            **fh3PtJet1VsMassVsHPtAllSel;         //!all jets after std selection pt vs mass vs track pt
   TH3F            **fh3PtJet1VsMassVsHPtTagged;         //!tagged jets pt vs mass vs track pt
   TH3F            **fh3PtJet1VsMassVsHPtTaggedMatch;    //!tagged jets pt vs mass vs track pt matched to MC
@@ -64,7 +65,7 @@ class AliAnalysisTaskEmcalHJetMass : public AliAnalysisTaskEmcalJet {
   AliAnalysisTaskEmcalHJetMass(const AliAnalysisTaskEmcalHJetMass&);            // not implemented
   AliAnalysisTaskEmcalHJetMass &operator=(const AliAnalysisTaskEmcalHJetMass&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcalHJetMass, 1)
+  ClassDef(AliAnalysisTaskEmcalHJetMass, 2)
 };
 #endif