add pt hist for bookkeeping
authormverweij <marta.verweij@cern.ch>
Fri, 27 Jun 2014 09:39:01 +0000 (11:39 +0200)
committermverweij <marta.verweij@cern.ch>
Fri, 27 Jun 2014 09:39:01 +0000 (11:39 +0200)
PWGJE/EMCALJetTasks/AliJetEmbeddingFromGenTask.cxx
PWGJE/EMCALJetTasks/AliJetEmbeddingFromGenTask.h

index 2d7eb8e..bcf971d 100644 (file)
@@ -36,6 +36,7 @@ AliJetEmbeddingFromGenTask::AliJetEmbeddingFromGenTask() :
   AliJetModelBaseTask("AliJetEmbeddingFromGenTask"),
   fGen(0),
   fMassless(kFALSE),
+  fHistPt(0),
   fHistTrials(0),
   fHistXsection(0),
   fHistPtHard(0)
@@ -49,6 +50,7 @@ AliJetEmbeddingFromGenTask::AliJetEmbeddingFromGenTask(const char *name, Bool_t
   AliJetModelBaseTask(name,drawqa),
   fGen(0),
   fMassless(kFALSE),
+  fHistPt(0),
   fHistTrials(0),
   fHistXsection(0),
   fHistPtHard(0)
@@ -73,6 +75,9 @@ void AliJetEmbeddingFromGenTask::UserCreateOutputObjects()
 
   AliJetModelBaseTask::UserCreateOutputObjects();
 
+  fHistPt = new TH1F("fHistpt","fHistPt;#it{p}_{T};N",100,0.,100.);
+  fOutput->Add(fHistPt);
+
   fHistTrials = new TH1F("fHistTrials", "fHistTrials", 1, 0, 1);
   fHistTrials->GetYaxis()->SetTitle("trials");
   fOutput->Add(fHistTrials);
@@ -157,6 +162,7 @@ void AliJetEmbeddingFromGenTask::Run()
       continue;
     Double_t mass = part->GetMass();
     if(fMassless) mass = 0.;
+    fHistPt->Fill(pt);
     AddTrack(pt, eta, phi,0,0,0,0,0,0,c,mass);
   }
 
index 0cc2073..1511585 100644 (file)
@@ -29,6 +29,7 @@ class AliJetEmbeddingFromGenTask : public AliJetModelBaseTask {
   AliGenerator  *fGen;                    //generator
   Bool_t         fMassless;               //make particles massless
 
+  TH1F          *fHistPt;                 //!pT spectrum of embedded particles
   TH1F          *fHistTrials;             //!trials from generator
   TProfile      *fHistXsection;           //!x-section from generator
   TH1           *fHistPtHard;             //!pt hard distribution
@@ -37,6 +38,6 @@ class AliJetEmbeddingFromGenTask : public AliJetModelBaseTask {
   AliJetEmbeddingFromGenTask(const AliJetEmbeddingFromGenTask&);            // not implemented
   AliJetEmbeddingFromGenTask &operator=(const AliJetEmbeddingFromGenTask&); // not implemented
 
-  ClassDef(AliJetEmbeddingFromGenTask, 2) // Jet embedding task
+  ClassDef(AliJetEmbeddingFromGenTask, 3) // Jet embedding task
 };
 #endif