Updates in task for MC production checks
authorfprino <fprino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Mar 2013 00:33:28 +0000 (00:33 +0000)
committerfprino <fprino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Mar 2013 00:33:28 +0000 (00:33 +0000)
PWGHF/vertexingHF/AliAnalysisTaskCheckHFMCProd.cxx
PWGHF/vertexingHF/AliAnalysisTaskCheckHFMCProd.h

index c876c0f..1e68a62 100644 (file)
@@ -65,6 +65,7 @@ AliAnalysisTaskCheckHFMCProd::AliAnalysisTaskCheckHFMCProd() : AliAnalysisTaskSE
   fHistoNbVsNc(0),
   fHistOriginPrompt(0),
   fHistOriginFeeddown(0),
+  fHistMotherID(0),
   fSearchUpToQuark(kFALSE),
   fSystem(0),
   fReadMC(kTRUE)
@@ -146,7 +147,7 @@ void AliAnalysisTaskCheckHFMCProd::UserCreateOutputObjects() {
   fOutput->Add(fHistoTRKVtxZ);
 
   Int_t nBinscb=11;
-  if(fSystem==1) nBinscb=200;
+  if(fSystem==1) nBinscb=400;
   if(fSystem==2) nBinscb=21;
   Double_t maxncn=nBinscb-0.5;
   fHistoNcharmed = new TH2F("hncharmed","",100,0.,maxMult,nBinscb,-0.5,maxncn);
@@ -242,6 +243,9 @@ void AliAnalysisTaskCheckHFMCProd::UserCreateOutputObjects() {
   fHistOriginFeeddown->Sumw2();
   fHistOriginFeeddown->SetMinimum(0);
   fOutput->Add(fHistOriginFeeddown);
+  fHistMotherID=new TH1F("hMotherID","",1000,-1.5,998.5);
+  fHistMotherID->SetMinimum(0);
+  fOutput->Add(fHistMotherID);
 
   PostData(1,fOutput);
 
@@ -386,7 +390,7 @@ void AliAnalysisTaskCheckHFMCProd::UserExec(Option_t *)
       Double_t disty=part->Vy()-mcVert->GetY();
       Double_t distz=part->Vz()-mcVert->GetZ();
       Double_t distToVert=TMath::Sqrt(distx*distx+disty*disty+distz*distz);
-      printf("Particle %d  dist from origin=%f\n",absPdg,distToVert);
+      fHistMotherID->Fill(part->GetFirstMother());
       TParticle* runningpart=part;
       Int_t iFromB=-1;
       Int_t pdgmoth=-1;
@@ -423,7 +427,6 @@ void AliAnalysisTaskCheckHFMCProd::UserExec(Option_t *)
          runningpart=mot;
        }
       }
-      printf("   From B %d\n",iFromB);
 
       if(iFromB==0){
        fHistYPtPromptAllDecay[iSpecies]->Fill(part->Pt(),rapid);
index 4d2051b..ecd3747 100644 (file)
@@ -90,12 +90,13 @@ class AliAnalysisTaskCheckHFMCProd : public AliAnalysisTaskSE {
   TH2F* fHistYPtDsbyDecChannel[2]; //! histo of y vs. pt for Ds->phipi and Ds->K0*K
   TH1F* fHistOriginPrompt;    //! histo of D production point (prompt)
   TH1F* fHistOriginFeeddown;  //! histo of D production point (feeddown)
+  TH1F* fHistMotherID;        //! histo of mother ID
 
   Bool_t fSearchUpToQuark; // c/b separation using quarks
   Int_t fSystem;         // 0=pp, 1=PbPb, 2=pPb
   Bool_t fReadMC;
 
-  ClassDef(AliAnalysisTaskCheckHFMCProd,3);
+  ClassDef(AliAnalysisTaskCheckHFMCProd,4);
 };