Index: modules/FastJetFinder.cc
===================================================================
--- modules/FastJetFinder.cc	(revision 973b92a3bf3d2d9073e3b7917710e4fac19714c7)
+++ modules/FastJetFinder.cc	(revision 5e4c40d8e6c1ec070a770b8b3fed8913cded4d6e)
@@ -78,5 +78,6 @@
 
 FastJetFinder::FastJetFinder() :
-  fPlugin(0), fRecomb(0), fNjettinessPlugin(0), fDefinition(0), fAreaDefinition(0), fItInputArray(0)
+  fPlugin(0), fRecomb(0), fAxesDef(0), fMeasureDef(0), fNjettinessPlugin(0), 
+  fDefinition(0), fAreaDefinition(0), fItInputArray(0)
 {
 
@@ -124,4 +125,22 @@
   fRcutOff = GetDouble("RcutOff", 0.8); // used only if Njettiness is used as jet clustering algo (case 8)
   fN = GetInt("N", 2);                  // used only if Njettiness is used as jet clustering algo (case 8)
+     
+  fMeasureDef = new UnnormalizedMeasure(fBeta);
+   
+  switch(fAxisMode)
+  {
+    default:
+      case 1:
+        fAxesDef = new WTA_KT_Axes();
+        break;
+      case 2:
+        fAxesDef = new OnePass_WTA_KT_Axes();
+        break;
+      case 3:
+        fAxesDef = new KT_Axes();
+        break;
+      case 4:
+        fAxesDef = new OnePass_KT_Axes();
+   }
 
   //-- Trimming parameters --
@@ -219,4 +238,6 @@
   }
 
+   
+
   fPlugin = plugin;
   fRecomb = recomb;
@@ -271,4 +292,6 @@
   if(fRecomb) delete static_cast<JetDefinition::Recombiner*>(fRecomb);
   if(fNjettinessPlugin) delete static_cast<JetDefinition::Plugin*>(fNjettinessPlugin);
+  if(fAxesDef) delete fAxesDef;
+  if(fMeasureDef) delete fMeasureDef;
 }
 
@@ -399,5 +422,5 @@
     //------------------------------------
 
-     if(fComputeTrimming)
+    if(fComputeTrimming)
     {
 
@@ -416,7 +439,8 @@
       candidate->NSubJetsTrimmed = subjets.size();
 
-      for (size_t i = 0; i < subjets.size() and i < 4; i++){
-	if(subjets.at(i).pt() < 0) continue ; 
- 	candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
+      for (size_t i = 0; i < subjets.size() and i < 4; i++)
+      {
+	    if(subjets.at(i).pt() < 0) continue ; 
+ 	    candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
       }
     }
@@ -443,7 +467,8 @@
       candidate->NSubJetsPruned = subjets.size();
 
-      for (size_t i = 0; i < subjets.size() and i < 4; i++){
-	if(subjets.at(i).pt() < 0) continue ; 
-  	candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
+      for (size_t i = 0; i < subjets.size() and i < 4; i++)
+      {
+	    if(subjets.at(i).pt() < 0) continue ; 
+  	    candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
       }
 
@@ -457,5 +482,5 @@
     {
     
-      contrib::SoftDrop  softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
+      contrib::SoftDrop softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
       fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList);
       
@@ -469,7 +494,8 @@
       candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size();
 
-      for (size_t i = 0; i < subjets.size()  and i < 4; i++){
-	if(subjets.at(i).pt() < 0) continue ; 
-  	candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
+      for (size_t i = 0; i < subjets.size()  and i < 4; i++)
+      {
+	    if(subjets.at(i).pt() < 0) continue ; 
+  	    candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
       }
     }
@@ -479,31 +505,11 @@
     if(fComputeNsubjettiness)
     {
-      Njettiness::AxesMode axisMode;
-
-      switch(fAxisMode)
-      {
-        default:
-        case 1:
-          axisMode = Njettiness::wta_kt_axes;
-          break;
-        case 2:
-          axisMode = Njettiness::onepass_wta_kt_axes;
-          break;
-        case 3:
-          axisMode = Njettiness::kt_axes;
-          break;
-        case 4:
-          axisMode = Njettiness::onepass_kt_axes;
-          break;
-      }
-
-      Njettiness::MeasureMode measureMode = Njettiness::unnormalized_measure;
-
-      Nsubjettiness nSub1(1, axisMode, measureMode, fBeta);
-      Nsubjettiness nSub2(2, axisMode, measureMode, fBeta);
-      Nsubjettiness nSub3(3, axisMode, measureMode, fBeta);
-      Nsubjettiness nSub4(4, axisMode, measureMode, fBeta);
-      Nsubjettiness nSub5(5, axisMode, measureMode, fBeta);
-
+     
+      Nsubjettiness nSub1(1, *fAxesDef, *fMeasureDef);
+      Nsubjettiness nSub2(2, *fAxesDef, *fMeasureDef);
+      Nsubjettiness nSub3(3, *fAxesDef, *fMeasureDef);
+      Nsubjettiness nSub4(4, *fAxesDef, *fMeasureDef);
+      Nsubjettiness nSub5(5, *fAxesDef, *fMeasureDef);
+     
       candidate->Tau[0] = nSub1(*itOutputList);
       candidate->Tau[1] = nSub2(*itOutputList);
@@ -511,4 +517,5 @@
       candidate->Tau[3] = nSub4(*itOutputList);
       candidate->Tau[4] = nSub5(*itOutputList);
+         
     }
 
Index: modules/FastJetFinder.h
===================================================================
--- modules/FastJetFinder.h	(revision 973b92a3bf3d2d9073e3b7917710e4fac19714c7)
+++ modules/FastJetFinder.h	(revision 5e4c40d8e6c1ec070a770b8b3fed8913cded4d6e)
@@ -41,4 +41,6 @@
   namespace contrib {
     class NjettinessPlugin;
+    class AxesDefinition; 
+    class MeasureDefinition;    
   }
 }
@@ -78,4 +80,6 @@
 
   Bool_t fComputeNsubjettiness;
+  fastjet::contrib::AxesDefinition *fAxesDef; 
+  fastjet::contrib::MeasureDefinition *fMeasureDef;    
   Double_t fBeta;
   Int_t fAxisMode;
