]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New histos to separate prompt and feeddown D mesons
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Jun 2012 15:57:18 +0000 (15:57 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Jun 2012 15:57:18 +0000 (15:57 +0000)
PWGHF/vertexingHF/AliAnalysisTaskCheckHFMCProd.cxx
PWGHF/vertexingHF/AliAnalysisTaskCheckHFMCProd.h

index db7e1ce453baa8f7a3fe6713158d859a99016e7a..d91f5646ed01ea32994a96325cd1f897fbaa4e98 100644 (file)
@@ -147,28 +147,47 @@ void AliAnalysisTaskCheckHFMCProd::UserCreateOutputObjects() {
   fHistoNbVsNc->Sumw2();
   fOutput->Add(fHistoNbVsNc);
 
-  fHistYPtPromptAllD[0] = new TH2F("hyptd0promptAllD","D0 - Prompt",20,0.,20.,40,-2.,2.);
-  fHistYPtPromptAllD[1] = new TH2F("hyptdpluspromptAllD","Dplus - Prompt",20,0.,20.,40,-2.,2.);
-  fHistYPtPromptAllD[2] = new TH2F("hyptdstarpromptAllD","Dstar - Prompt",20,0.,20.,40,-2.,2.);
-  fHistYPtPromptAllD[3] = new TH2F("hyptdspromptAllD","Ds - Prompt",20,0.,20.,40,-2.,2.);
-  fHistYPtPromptAllD[4] = new TH2F("hyptlcpromptAllD","Lc - Prompt",20,0.,20.,40,-2.,2.);
-
   fHistYPtPrompt[0] = new TH2F("hyptd0prompt","D0 - Prompt",20,0.,20.,20,-2.,2.);
   fHistYPtPrompt[1] = new TH2F("hyptdplusprompt","Dplus - Prompt",20,0.,20.,20,-2.,2.);
   fHistYPtPrompt[2] = new TH2F("hyptdstarprompt","Dstar - Prompt",20,0.,20.,20,-2.,2.);
   fHistYPtPrompt[3] = new TH2F("hyptdsprompt","Ds - Prompt",20,0.,20.,20,-2.,2.);
   fHistYPtPrompt[4] = new TH2F("hyptlcprompt","Lc - Prompt",20,0.,20.,20,-2.,2.);
 
-  fHistYPtFeeddown[0] = new TH2F("hyptd0feeddown","D0 - Feeddown",20,0.,20.,20,-2.,2.);
+  fHistYPtAllDecay[0] = new TH2F("hyptd0AllDecay","D0 - All",20,0.,20.,40,-2.,2.);
+  fHistYPtAllDecay[1] = new TH2F("hyptdplusAllDecay","Dplus - All",20,0.,20.,40,-2.,2.);
+  fHistYPtAllDecay[2] = new TH2F("hyptdstarAllDecay","Dstar - All",20,0.,20.,40,-2.,2.);
+  fHistYPtAllDecay[3] = new TH2F("hyptdsAllDecay","Ds - All",20,0.,20.,40,-2.,2.);
+  fHistYPtAllDecay[4] = new TH2F("hyptlcAllDecay","Lc - All",20,0.,20.,40,-2.,2.);
+
+  fHistYPtPromptAllDecay[0] = new TH2F("hyptd0promptAllDecay","D0 - Prompt",20,0.,20.,40,-2.,2.);
+  fHistYPtPromptAllDecay[1] = new TH2F("hyptdpluspromptAllDecay","Dplus - Prompt",20,0.,20.,40,-2.,2.);
+  fHistYPtPromptAllDecay[2] = new TH2F("hyptdstarpromptAllDecay","Dstar - Prompt",20,0.,20.,40,-2.,2.);
+  fHistYPtPromptAllDecay[3] = new TH2F("hyptdspromptAllDecay","Ds - Prompt",20,0.,20.,40,-2.,2.);
+  fHistYPtPromptAllDecay[4] = new TH2F("hyptlcpromptAllDecay","Lc - Prompt",20,0.,20.,40,-2.,2.);
+
+  fHistYPtFeeddownAllDecay[0] = new TH2F("hyptd0feeddownAllDecay","D0 - FromB",20,0.,20.,40,-2.,2.);
+  fHistYPtFeeddownAllDecay[1] = new TH2F("hyptdplusfeeddownAllDecay","Dplus - FromB",20,0.,20.,40,-2.,2.);
+  fHistYPtFeeddownAllDecay[2] = new TH2F("hyptdstarfeeddownAllDecay","Dstar - FromB",20,0.,20.,40,-2.,2.);
+  fHistYPtFeeddownAllDecay[3] = new TH2F("hyptdsfeeddownAllDecay","Ds - FromB",20,0.,20.,40,-2.,2.);
+  fHistYPtFeeddownAllDecay[4] = new TH2F("hyptlcfeeddownAllDecay","Lc - FromB",20,0.,20.,40,-2.,2.);
+
+
+ fHistYPtFeeddown[0] = new TH2F("hyptd0feeddown","D0 - Feeddown",20,0.,20.,20,-2.,2.);
   fHistYPtFeeddown[1] = new TH2F("hyptdplusfeeddown","Dplus - Feeddown",20,0.,20.,20,-2.,2.);
   fHistYPtFeeddown[2] = new TH2F("hyptdstarfeedown","Dstar - Feeddown",20,0.,20.,20,-2.,2.);
   fHistYPtFeeddown[3] = new TH2F("hyptdsfeedown","Ds - Feeddown",20,0.,20.,20,-2.,2.);
   fHistYPtFeeddown[4] = new TH2F("hyptlcfeedown","Lc - Feeddown",20,0.,20.,20,-2.,2.);
 
   for(Int_t ih=0; ih<5; ih++){
-    fHistYPtPromptAllD[ih]->Sumw2();
-    fHistYPtPromptAllD[ih]->SetMinimum(0);
-    fOutput->Add(fHistYPtPromptAllD[ih]);
+    fHistYPtAllDecay[ih]->Sumw2();
+    fHistYPtAllDecay[ih]->SetMinimum(0);
+    fOutput->Add(fHistYPtAllDecay[ih]);
+    fHistYPtPromptAllDecay[ih]->Sumw2();
+    fHistYPtPromptAllDecay[ih]->SetMinimum(0);
+    fOutput->Add(fHistYPtPromptAllDecay[ih]);
+    fHistYPtFeeddownAllDecay[ih]->Sumw2();
+    fHistYPtFeeddownAllDecay[ih]->SetMinimum(0);
+    fOutput->Add(fHistYPtFeeddownAllDecay[ih]);
     fHistYPtPrompt[ih]->Sumw2();
     fHistYPtPrompt[ih]->SetMinimum(0);
     fOutput->Add(fHistYPtPrompt[ih]);
@@ -287,67 +306,75 @@ void AliAnalysisTaskCheckHFMCProd::UserExec(Option_t *)
       if (part->Energy() != TMath::Abs(part->Pz())){
        rapid=0.5*TMath::Log((part->Energy()+part->Pz())/(part->Energy()-part->Pz()));
       }
-      
+
+       
       Int_t iPart=-1;
       Int_t iType=0;
-      if(absPdg==421){  
-       fHistYPtPromptAllD[0]->Fill(part->Pt(),rapid);
+      Int_t iSpecies=-1;
+      if(absPdg==421){
+       iSpecies=0;
        iType=CheckD0Decay(i,stack);
        if(iType>=0) iPart=0;   
       }
       else if(absPdg==411){
-       fHistYPtPromptAllD[1]->Fill(part->Pt(),rapid);
+       iSpecies=1;
        iType=CheckDplusDecay(i,stack);
        if(iType>=0) iPart=1;
       }
       else if(absPdg==413){
-       fHistYPtPromptAllD[2]->Fill(part->Pt(),rapid);
+       iSpecies=2;
        iType=CheckDstarDecay(i,stack);
        if(iType>=0) iPart=2;
       }
       else if(absPdg==431){
-       fHistYPtPromptAllD[3]->Fill(part->Pt(),rapid);
+       iSpecies=3;
        iType=CheckDsDecay(i,stack);
        if(iType==0 || iType==1) iPart=3;
       }
       else if(absPdg==4122){
-       fHistYPtPromptAllD[4]->Fill(part->Pt(),rapid);
+       iSpecies=4;
        iType=CheckLcDecay(i,stack);
        if(iType>=0) iPart=4;
       }
-      if(iPart<0) continue;
-      if(iType<0) continue;
-      nCharmed++;
-      if(iPart==0 && iType<=1){
-       fHistYPtD0byDecChannel[iType]->Fill(part->Pt(),rapid);
-      }else if(iPart==1 && iType<=1){
-       fHistYPtDplusbyDecChannel[iType]->Fill(part->Pt(),rapid);
-      }else if(iPart==3 && iType<=1){
-       fHistYPtDsbyDecChannel[iType]->Fill(part->Pt(),rapid);
-      }
-      
+      if(iSpecies<0) continue;
+      fHistYPtAllDecay[iSpecies]->Fill(part->Pt(),rapid);
+
       TParticle* runningpart=part;
       Int_t iFromB=-1;
+      Int_t pdgmoth=-1;
       while(1){
        Int_t labmoth=runningpart->GetFirstMother();
        if(labmoth==-1) break;
        TParticle *mot=(TParticle*)stack->Particle(labmoth);
-       Int_t pdgmoth=TMath::Abs(mot->GetPdgCode());
+       pdgmoth=TMath::Abs(mot->GetPdgCode());
        if(pdgmoth==5){ 
          iFromB=1;
          break;
        }else if(pdgmoth==4){
          iFromB=0;
-       break;
+         break;
        }
        runningpart=mot;
       }
       if(iFromB<0) continue;
+      else if(iFromB==0) fHistYPtPromptAllDecay[iSpecies]->Fill(part->Pt(),rapid);
+      else if(iFromB==1) fHistYPtFeeddownAllDecay[iSpecies]->Fill(part->Pt(),rapid);
+
+      if(iPart<0) continue;
+      if(iType<0) continue;
+      nCharmed++;
+      if(iPart==0 && iType<=1){
+       fHistYPtD0byDecChannel[iType]->Fill(part->Pt(),rapid);
+      }else if(iPart==1 && iType<=1){
+       fHistYPtDplusbyDecChannel[iType]->Fill(part->Pt(),rapid);
+      }else if(iPart==3 && iType<=1){
+       fHistYPtDsbyDecChannel[iType]->Fill(part->Pt(),rapid);
+      }
+      
       if(iFromB==0 && iPart>=0 && iPart<5) fHistYPtPrompt[iPart]->Fill(part->Pt(),rapid);
       else if(iFromB==1 && iPart>=0 && iPart<5) fHistYPtFeeddown[iPart]->Fill(part->Pt(),rapid);
       
     }
-    printf("  ---> %f %d %d %d\n",dNchdy,nCharmed,nc,nb);
     fHistoNcharmed->Fill(dNchdy,nCharmed);
     fHistoNbVsNc->Fill(nc,nb);
   }
index 0236e9a16bfb94728d6c948435a08ccb275bf3e4..d4f5ff53763e2478efd673a1b6af5a1714bb6a46 100644 (file)
@@ -75,7 +75,9 @@ class AliAnalysisTaskCheckHFMCProd : public AliAnalysisTaskSE {
   TH2F* fHistoNcharmed;   //! histo of D mesons vs. dN/dy
   TH2F* fHistoNbVsNc;     //! histo of n. b quarks vs. n c. quarks
 
-  TH2F*  fHistYPtPromptAllD[5];   //! histo of y vs. pt from prompt D0, D+, D*, Ds, Lc, no selection on decay channel
+  TH2F*  fHistYPtAllDecay[5];   //! histo of y vs. pt from prompt D0, D+, D*, Ds, Lc, no selection on decay channel  
+  TH2F*  fHistYPtPromptAllDecay[5];   //! histo of y vs. pt from prompt D0, D+, D*, Ds, Lc, no selection on decay channel  
+  TH2F*  fHistYPtFeeddownAllDecay[5];   //! histo of y vs. pt from prompt D0, D+, D*, Ds, Lc, no selection on decay channel
   TH2F*  fHistYPtPrompt[5];   //! histo of y vs. pt from prompt D0, D+, D*, Ds, Lc
   TH2F*  fHistYPtFeeddown[5]; //! histo of y vs. pt from feeddown D0, D+, D*, Ds, Lc
   TH2F* fHistYPtD0byDecChannel[2]; //! histo of y vs. pt for D0->Kpi and D0->Kpipipi
@@ -85,7 +87,7 @@ class AliAnalysisTaskCheckHFMCProd : public AliAnalysisTaskSE {
   Bool_t fPbPb;
   Bool_t fReadMC;
 
-  ClassDef(AliAnalysisTaskCheckHFMCProd,2);  
+  ClassDef(AliAnalysisTaskCheckHFMCProd,1);  
 };