updates from Salvatore
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Jul 2012 20:16:42 +0000 (20:16 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Jul 2012 20:16:42 +0000 (20:16 +0000)
PWGGA/EMCALJetTasks/AliJetModelBaseTask.cxx
PWGGA/EMCALJetTasks/AliJetModelBaseTask.h
PWGGA/EMCALJetTasks/AliJetResponseMaker.cxx
PWGGA/EMCALJetTasks/AliJetResponseMaker.h

index bc84c85..97e4f51 100644 (file)
@@ -7,7 +7,7 @@
 #include "AliJetModelBaseTask.h"
 
 #include <TClonesArray.h>
-#include <TF1.h>
+#include <TH1.h>
 #include <TLorentzVector.h>
 #include <TRandom3.h>
 
index f55377c..c2316e1 100644 (file)
@@ -7,7 +7,9 @@ class TClonesArray;
 class AliEMCALGeometry;
 class AliVCluster;
 class AliPicoTrack;
-class TF1;
+
+#include <TH1F.h>
+#include <TF1.h>
 
 #include "AliAnalysisTaskSE.h"
 
@@ -28,7 +30,9 @@ class AliJetModelBaseTask : public AliAnalysisTaskSE {
   void                   SetNTracks(Int_t n)                   { fNTracks      = n;    }
   void                   SetPhiRange(Float_t min, Float_t max) { fPhiMin       = min;  fPhiMax = max; }
   void                   SetPtRange(Float_t min, Float_t max)  { fPtMin        = min;  fPtMax  = max;  }
-  void                   SetPtSpectrum(TF1 *f)                 { fPtSpectrum   = f;    }
+  void                   SetPtSpectrum(TH1 *f)                 { fPtSpectrum   = f;    }
+  void                   SetPtSpectrum(TF1 *f)                 { fPtSpectrum   = new TH1F("ptSpectrum","ptSpectrum",250,f->GetXmin(),f->GetXmax()); 
+                                                                 fPtSpectrum->Add(f); }
   void                   SetSuffix(const char *s)              { fSuffix       = s;    }
   void                   SetTracksName(const char *n)          { fTracksName   = n;    }
 
@@ -61,7 +65,7 @@ class AliJetModelBaseTask : public AliAnalysisTaskSE {
   Int_t                  fNClusters;              // how many clusters are being processed
   Int_t                  fNTracks;                // how many tracks are being processed
   Bool_t                 fMarkMC;                 // whether or not mark new tracks/cluster as MC
-  TF1                   *fPtSpectrum;             // pt spectrum parametrization to extract random pt values
+  TH1                   *fPtSpectrum;             // pt spectrum parametrization to extract random pt values
   Bool_t                 fIsInit;                 //=true if initialized
   AliEMCALGeometry      *fGeom;                   //!pointer to EMCal geometry
   TClonesArray          *fClusters;               //!cluster collection
@@ -73,6 +77,6 @@ class AliJetModelBaseTask : public AliAnalysisTaskSE {
   AliJetModelBaseTask(const AliJetModelBaseTask&);            // not implemented
   AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented
 
-  ClassDef(AliJetModelBaseTask, 3) // Jet modelling task
+  ClassDef(AliJetModelBaseTask, 4) // Jet modelling task
 };
 #endif
index 34625d8..9fb3d82 100644 (file)
@@ -48,6 +48,8 @@ AliJetResponseMaker::AliJetResponseMaker() :
   fHistEvents(0),
   fHistMCJetPhiEta(0),
   fHistMCJetsPt(0),
+  fHistMCJetPhiEtaFiducial(0),
+  fHistMCJetsPtFiducial(0),
   fHistMCJetsNEFvsPt(0),
   fHistMCJetsZvsPt(0),
   fHistJetPhiEta(0),
@@ -90,6 +92,8 @@ AliJetResponseMaker::AliJetResponseMaker(const char *name) :
   fHistEvents(0),
   fHistMCJetPhiEta(0),
   fHistMCJetsPt(0),
+  fHistMCJetPhiEtaFiducial(0),
+  fHistMCJetsPtFiducial(0),
   fHistMCJetsNEFvsPt(0),
   fHistMCJetsZvsPt(0),
   fHistJetPhiEta(0),
@@ -253,6 +257,8 @@ Bool_t AliJetResponseMaker::AcceptJet(AliEmcalJet *jet, Bool_t /*bias*/, Bool_t
     return kFALSE;
   if (jet->Area() <= fJetAreaCut)
     return kFALSE;
+
+  return kTRUE;
 }
 
 //________________________________________________________________________
index 6a3edc5..cd015fa 100644 (file)
@@ -80,6 +80,6 @@ class AliJetResponseMaker : public AliAnalysisTaskEmcalJet {
   AliJetResponseMaker(const AliJetResponseMaker&);            // not implemented
   AliJetResponseMaker &operator=(const AliJetResponseMaker&); // not implemented
 
-  ClassDef(AliJetResponseMaker, 4) // Jet response matrix producing task
+  ClassDef(AliJetResponseMaker, 5) // Jet response matrix producing task
 };
 #endif