only compile contrib code if FASTJET_CONTRIB exists
authormverweij <marta.verweij@cern.ch>
Sat, 28 Jun 2014 13:10:11 +0000 (15:10 +0200)
committermverweij <marta.verweij@cern.ch>
Sat, 28 Jun 2014 13:10:11 +0000 (15:10 +0200)
PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx
PWGJE/EMCALJetTasks/AliFJWrapper.h
PWGJE/EMCALJetTasks/FJ_includes.h

index 57ac10d..debe313 100644 (file)
@@ -425,7 +425,7 @@ void AliEmcalJetTask::FindJets()
 
     //do generic subtraction if requested
     if(fDoGenericSubtraction) {
-#ifdef FASTJET_VERSION
+#ifdef FASTJET_CONTRIB
       std::vector<fastjet::contrib::GenericSubtractorInfo> jetMassInfo = fjw.GetGenSubtractorInfoJetMass();
       UInt_t n = (UInt_t)jetMassInfo.size();
       if(n>ij && n>0) {
@@ -596,7 +596,7 @@ void AliEmcalJetTask::FindJets()
 
   //run constituent subtractor if requested
   if(fDoConstituentSubtraction) {
-#ifdef FASTJET_VERSION
+#ifdef FASTJET_CONTRIB
     if(!fJetsSub) AliWarning(Form("No jet branch to write to for subtracted jets. fJetsSubName: %s",fJetsSubName.Data()));
     else {
       std::vector<fastjet::PseudoJet> jets_sub;
index 6465bac..df9ecbe 100644 (file)
@@ -36,7 +36,7 @@ class AliFJWrapper
   Double_t                                GetJetSubtractedPt (UInt_t idx) const;
   virtual std::vector<double>             GetSubtractedJetsPts(Double_t median_pt = -1, Bool_t sorted = kFALSE);
   Bool_t                                  GetLegacyMode()            { return fLegacyMode; }
-#ifdef FASTJET_VERSION
+#ifdef FASTJET_CONTRIB
   const std::vector<fastjet::contrib::GenericSubtractorInfo> GetGenSubtractorInfoJetMass() const {return fGenSubtractorInfoJetMass;}
   const std::vector<fastjet::PseudoJet>   GetConstituentSubtrJets() const { return fConstituentSubtrJets;  }
 #endif
@@ -98,6 +98,8 @@ class AliFJWrapper
   Bool_t                                 fUseArea4Vector;     //!
 #ifdef FASTJET_VERSION
   fastjet::JetMedianBackgroundEstimator   *fBkrdEstimator;        //!
+#endif
+#ifdef FASTJET_CONTRIB
   fastjet::contrib::GenericSubtractor     *fGenSubtractor;        //!
   std::vector<fastjet::contrib::GenericSubtractorInfo> fGenSubtractorInfoJetMass;    //!
 #endif
@@ -157,6 +159,8 @@ AliFJWrapper::AliFJWrapper(const char *name, const char *title)
   , fUseArea4Vector    (kFALSE)
 #ifdef FASTJET_VERSION
   , fBkrdEstimator     (0)
+#endif
+#ifdef FASTJET_CONTRIB
   , fGenSubtractor     (0)
   , fGenSubtractorInfoJetMass ( )
 #endif
@@ -182,6 +186,8 @@ AliFJWrapper::~AliFJWrapper()
   delete fClustSeq;
 #ifdef FASTJET_VERSION
   if (fBkrdEstimator)     delete fBkrdEstimator;
+#endif
+#ifdef FASTJET_CONTRIB
   if (fGenSubtractor)     delete fGenSubtractor;
 #endif
 }
@@ -232,6 +238,8 @@ void AliFJWrapper::Clear(const Option_t */*opt*/)
   delete fClustSeq;        fClustSeq        = 0;
 #ifdef FASTJET_VERSION
   if (fBkrdEstimator)     delete fBkrdEstimator     ;  fBkrdEstimator     = 0;
+#endif
+#ifdef FASTJET_CONTRIB
   if (fGenSubtractor)     delete fGenSubtractor     ;  fGenSubtractor     = 0;
 #endif
 }
@@ -527,7 +535,7 @@ void AliFJWrapper::SubtractBackground(Double_t median_pt)
 //_________________________________________________________________________________________________
 Int_t AliFJWrapper::DoGenericSubtractionJetMass() {
   //Do generic subtraction for jet mass
-#ifdef FASTJET_VERSION
+#ifdef FASTJET_CONTRIB
   if(fUseExternalBkg)   fGenSubtractor     = new fj::contrib::GenericSubtractor(fRho,fRhom);
   else                  fGenSubtractor     = new fj::contrib::GenericSubtractor(fBkrdEstimator);
 
@@ -550,7 +558,7 @@ Int_t AliFJWrapper::DoGenericSubtractionJetMass() {
 //_________________________________________________________________________________________________
 Int_t AliFJWrapper::DoConstituentSubtraction() {
   //Do constituent subtraction
-#ifdef FASTJET_VERSION
+#ifdef FASTJET_CONTRIB
   fj::contrib::ConstituentSubtractor *subtractor;
   if(fUseExternalBkg)
     subtractor     = new fj::contrib::ConstituentSubtractor(fRho,fRhom,kFALSE,kTRUE);
index fb60b77..6dce439 100644 (file)
 #include <fastjet/SISConePlugin.hh>
 #include <fastjet/CDFMidPointPlugin.hh>
 #ifdef FASTJET_VERSION
-//if FJ_VERSION>2
 #include <fastjet/Selector.hh>
 #include <fastjet/FunctionOfPseudoJet.hh>
 #include <fastjet/tools/JetMedianBackgroundEstimator.hh>
 #include <fastjet/tools/BackgroundEstimatorBase.hh>
 #include <fastjet/tools/Subtractor.hh>
+#ifdef FASTJET_CONTRIB
 #include <fastjet/contrib/GenericSubtractor.hh>
 #include <fastjet/contrib/ShapeWithComponents.hh>
 #include <fastjet/contrib/ConstituentSubtractor.hh>
 #endif
 #endif
+#endif
 
 #endif