]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
changing TH1F to TH3F for mc truth kinematic variables
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Sep 2012 10:06:04 +0000 (10:06 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Sep 2012 10:06:04 +0000 (10:06 +0000)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h

index 5c07fd27656c755888d78f0e30032e1418b09535..c35f15f6fc0633b6bdafed181cf0ae086459624b 100644 (file)
@@ -7,6 +7,7 @@
 #include <TFile.h>
 #include <TH1F.h>
 #include <TH2F.h>
+#include <TH3F.h>
 #include <THnSparse.h>
 #include <TLorentzVector.h>
 #include <TList.h>
@@ -58,7 +59,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton() :
   fEvtSel(0),
   fNClusEt10(0),
   fPVtxZ(0),  
-  fDirPhotonPtMC(0),
+  fMCDirPhotonPtEtaPhi(0),
   fDecayPhotonPtMC(0),
   fCellAbsIdVsAmpl(0),       
   fNClusHighClusE(0),
@@ -94,7 +95,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton(const char *name) :
   fEvtSel(0),
   fNClusEt10(0),
   fPVtxZ(0),            
-  fDirPhotonPtMC(0),
+  fMCDirPhotonPtEtaPhi(0),
   fDecayPhotonPtMC(0),
   fCellAbsIdVsAmpl(0),       
   fNClusHighClusE(0),   
@@ -133,9 +134,9 @@ void AliAnalysisTaskEMCALIsoPhoton::UserCreateOutputObjects()
   fPVtxZ = new TH1F("hPVtxZ","primary vertex Z before cut;prim-vz(cm) ;",200,-100,100);
   fOutputList->Add(fPVtxZ);
 
-  fDirPhotonPtMC = new TH1F("hDirPhotonPtMC","photon (gq->#gammaq) p_{T};GeV/c;dN/dp_{T} (c GeV^{-1})",1000,0,100);
-  fDirPhotonPtMC->Sumw2();
-  fOutputList->Add(fDirPhotonPtMC);
+  fMCDirPhotonPtEtaPhi = new TH3F("hMCDirPhotonPtEtaPhi","photon (gq->#gammaq) p_{T}, #eta, #phi;GeV/c;#eta;#phi",1000,0,100,154,-0.77,0.77,130,1.38,3.20);
+  fMCDirPhotonPtEtaPhi->Sumw2();
+  fOutputList->Add(fMCDirPhotonPtEtaPhi);
 
   fDecayPhotonPtMC = new TH1F("hDecayPhotonPtMC","decay photon p_{T};GeV/c;dN/dp_{T} (c GeV^{-1})",1000,0,100);
   fDecayPhotonPtMC->Sumw2();
@@ -515,7 +516,7 @@ void AliAnalysisTaskEMCALIsoPhoton ::FillMcHists()
       continue;
     Int_t pdgMom = mcmom->GetPdgCode();
     if(imom==6 || imom==7 && pdgMom==22) {
-      fDirPhotonPtMC->Fill(mcp->Pt());
+      fMCDirPhotonPtEtaPhi->Fill(mcp->Pt(),mcp->Eta(),mcp->Phi());
       if(fDebug)
        printf("Found \"photonic\" parton at position %d, with pt=%1.1f, eta=%1.1f and phi=%1.1f, and status=%d,\n",imom,mcmom->Pt(), mcmom->Eta(), mcmom->Phi(), mcmom->GetStatusCode());
       printf("with a final photon at position %d, with pt=%1.1f, eta=%1.1f and phi=%1.1f, and status=%d\n",iTrack,mcp->Pt(), mcp->Eta(), mcp->Phi(),mcp->GetStatusCode());
index bdedcc449b9af7c78a843c2310513d04511bcb53..d30be8cb99723b4bcd359fd9963f2c30bab03c2b 100644 (file)
@@ -5,6 +5,7 @@
 
 class TH1F;
 class TH2F;
+class TH3F;
 class THnSparse;
 class TList;
 class TObjArray;
@@ -76,7 +77,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   TH1F        *fEvtSel;                  //!evt selection counter: 0=all trg, 1=pv cut 
   TH1F        *fNClusEt10;               //!number of clusters w/ Et>10 in the event
   TH1F        *fPVtxZ;                   //!primary vertex Z before cut
-  TH1F        *fDirPhotonPtMC;           //!direct produced photon pt
+  TH3F        *fMCDirPhotonPtEtaPhi;     //!direct produced photon pt
   TH1F        *fDecayPhotonPtMC;         //!decay photon pt
   TH2F        *fCellAbsIdVsAmpl;         //!cell abs id vs cell amplitude (energy)
   TH2F        *fNClusHighClusE;          //!total number of clusters vs. highest clus energy in the event