]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGJE/EMCALJetTasks/AliEmcalJetFinder.cxx
Add components for event counting and trigger patch analysis
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliEmcalJetFinder.cxx
index e3f7c2e4b3564e4c6517994bb61c0cc4382a51c4..aa1159f64c3520fc14b146fa95165f59210fd956 100644 (file)
@@ -1,6 +1,8 @@
 // $Id$
 //
 // Standalone jet finder
+//   CINT-compatible wrapper for AliFJWrapper, can be used in macros and from the ROOT command line.
+//   Compiled code can use AliFJWrapper directly
 //
 // Authors: R.Haake
 
@@ -39,6 +41,10 @@ AliEmcalJetFinder::~AliEmcalJetFinder()
 Bool_t AliEmcalJetFinder::FindJets()
 {
   // Tidy up and check input
+  for (UInt_t i=0; i<fJetArray.size(); i++) {
+    delete fJetArray[i];
+    fJetArray[i] = 0;
+  }
   fJetArray.clear();
   fJetCount = 0;
   if(!fInputVectorIndex)
@@ -81,6 +87,7 @@ Bool_t AliEmcalJetFinder::FindJets()
 
     // Set the most important properties of the jet
     Int_t nConstituents(fFastjetWrapper->GetJetConstituents(i).size());
+    jet->SetArea(fFastjetWrapper->GetJetArea(i));
     jet->SetNumberOfTracks(nConstituents);
     jet->SetNumberOfClusters(nConstituents);
     fJetArray[fJetCount] = jet;
@@ -89,7 +96,7 @@ Bool_t AliEmcalJetFinder::FindJets()
 
   fJetArray.resize(fJetCount);
 
-  fastjets.clear();
+  //fastjets.clear(); // will be done by the destructor at the end of the function
   fFastjetWrapper->Clear();
   fInputVectorIndex = 0;
   return kTRUE;