Fixes to FastJetFinder (added c'tors) and added possibility to run FJ on Kinematics...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Sep 2009 08:24:40 +0000 (08:24 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Sep 2009 08:24:40 +0000 (08:24 +0000)
JETAN/AliFastJetFinder.cxx
JETAN/AliFastJetFinder.h

index 16ee13e..6e05228 100644 (file)
@@ -66,8 +66,8 @@ ClassImp(AliFastJetFinder)
 
 AliFastJetFinder::AliFastJetFinder():
   AliJetFinder(),
-  fInputFJ(0),
-  fJetBkg(0)
+  fInputFJ(new AliFastJetInput()),
+  fJetBkg(new  AliJetBkg())
 {
   // Constructor
 }
@@ -77,6 +77,8 @@ AliFastJetFinder::AliFastJetFinder():
 AliFastJetFinder::~AliFastJetFinder()
 {
   // destructor
+  delete  fInputFJ; fInputFJ = 0;
+  delete  fJetBkg; fJetBkg = 0;
 }
 
 //______________________________________________________________________________
@@ -403,6 +405,41 @@ void AliFastJetFinder::InitTask(TChain *tree)
 
 }
 
+
+Bool_t AliFastJetFinder::ProcessEvent()
+{
+  //
+  // Process one event
+  // from meomntum array
+
+  Bool_t ok = fReader->FillMomentumArray();
+
+  if (!ok) return kFALSE;
+  fInputFJ->SetHeader(fHeader);
+  fInputFJ->SetReader(fReader);
+  fInputFJ->FillInput();
+  // Jets
+  FindJets(); 
+
+  fJetBkg->SetHeader(fHeader);
+  fJetBkg->SetReader(fReader);
+  /*
+  fJetBkg->SetFastJetInput(fInputFJ);
+  Double_t bkg1=fJetBkg->BkgFastJet();
+  Double_t bkg2=fJetBkg->BkgChargedFastJet();
+  Double_t bkg3=fJetBkg->BkgFastJetCone(fAODjets);
+  Double_t bkg4=fJetBkg->BkgRemoveJetLeading(fAODjets);
+  
+  fAODEvBkg->SetBackground(0,bkg1);
+  fAODEvBkg->SetBackground(1,bkg2);
+  fAODEvBkg->SetBackground(2,bkg3);
+  fAODEvBkg->SetBackground(3,bkg4);
+  */
+  Reset();  
+  return kTRUE;
+
+}
+
 Bool_t AliFastJetFinder::ProcessEvent2()
 {
   //
index b4ceff0..110f77a 100644 (file)
@@ -43,12 +43,13 @@ class AliFastJetFinder : public AliJetFinder
   AliFastJetFinder();
   ~AliFastJetFinder();
 
-  void    FindJets(); 
+  virtual void    FindJets(); 
   void    RunTest(const char* datafile); // a simple test
-  void    WriteJHeaderToFile();
+  virtual void    WriteJHeaderToFile();
   Float_t EtaToTheta(Float_t arg);
   void    InitTask(TChain* tree);
-  Bool_t  ProcessEvent2();
+  virtual Bool_t ProcessEvent();
+  virtual Bool_t  ProcessEvent2();
   
       
   protected: