// $Id$
-#if !defined(__CINT__) && !defined(__MAKECINT__) &&defined(__HAVE_FJINTERFACE__)
+#if !defined(__CINT__)
#include <vector>
-#include <TNamed.h>
+#include <TString.h>
#include "AliLog.h"
#include "FJ_includes.h"
-class AliFJWrapper : public TNamed
+class AliFJWrapper
{
public:
AliFJWrapper(const char *name, const char *title);
virtual ~AliFJWrapper();
-
+
virtual void AddInputVector (Double_t px, Double_t py, Double_t pz, Double_t E, Int_t index = -99999);
virtual void AddInputVector (const fastjet::PseudoJet& vec, Int_t index = -99999);
virtual void AddInputVectors(const std::vector<fastjet::PseudoJet>& vecs, Int_t offsetIndex = -99999);
- virtual void Clear(const Option_t* opt = "");
+ virtual const char *ClassName() const { return "AliFJWrapper"; }
+ virtual void Clear(const Option_t* /*opt*/ = "");
virtual void CopySettingsFrom (const AliFJWrapper& wrapper);
virtual void GetMedianAndSigma(Double_t& median, Double_t& sigma, Int_t remove = 0) const;
fastjet::ClusterSequenceArea* GetClusterSequence() const { return fClustSeq; }
const std::vector<fastjet::PseudoJet> GetInclusiveJets() const { return fInclusiveJets; }
std::vector<fastjet::PseudoJet> GetJetConstituents(UInt_t idx) const;
Double_t GetMedianUsedForBgSubtraction() const { return fMedUsedForBgSub; }
+ const char* GetName() const { return fName; }
+ const char* GetTitle() const { return fTitle; }
Double_t GetJetArea (UInt_t idx) const;
+ fastjet::PseudoJet GetJetAreaVector (UInt_t idx) const;
Double_t GetJetSubtractedPt (UInt_t idx) const;
virtual std::vector<double> GetSubtractedJetsPts(Double_t median_pt = -1, Bool_t sorted = kFALSE);
void SetupStrategyfromOpt(const char *option);
protected:
+ TString fName; //!
+ TString fTitle; //!
std::vector<fastjet::PseudoJet> fInputVectors; //!
std::vector<fastjet::PseudoJet> fInclusiveJets; //!
std::vector<double> fSubtractedJetsPt; //!
//_________________________________________________________________________________________________
AliFJWrapper::AliFJWrapper(const char *name, const char *title)
- : TNamed(name, title)
+ :
+ fName (name)
+ , fTitle (title)
, fInputVectors ( )
, fInclusiveJets ( )
, fSubtractedJetsPt ( )
, fMaxRap (1.)
, fR (0.4)
, fGridScatter (1.0)
- , fKtScatter (1.0)
+ , fKtScatter (0.1)
, fMeanGhostKt (1e-100)
, fPluginAlgor (0)
, fMedUsedForBgSub (0)
}
//_________________________________________________________________________________________________
-void AliFJWrapper::Clear(const Option_t *opt)
+void AliFJWrapper::Clear(const Option_t */*opt*/)
{
// Simply clear the input vectors.
// Make sure done on every event if the instance is reused
delete fPlugin; fPlugin = 0;
delete fRange; fRange = 0;
delete fClustSeq; fClustSeq = 0;
-
- TNamed::Clear(opt);
}
//_________________________________________________________________________________________________
for (UInt_t i = 0; i < vecs.size(); ++i) {
fj::PseudoJet inVec = vecs[i];
-
if (offsetIndex > -99999)
inVec.set_user_index(fInputVectors.size() + offsetIndex);
// add to the fj container of input vectors
-
fInputVectors.push_back(inVec);
}
}
Double_t retval = -1; // really wrong area..
if ( idx < fInclusiveJets.size() ) {
- retval = fClustSeq->area(fInclusiveJets[idx]);
+ retval = fClustSeq->area(fInclusiveJets[idx]);
+ } else {
+ AliError(Form("[e] ::GetJetArea wrong index: %d",idx));
+ }
+ return retval;
+}
+
+//_________________________________________________________________________________________________
+fastjet::PseudoJet AliFJWrapper::GetJetAreaVector(UInt_t idx) const
+{
+ // Get the jet area as vector.
+ fastjet::PseudoJet retval;
+ if ( idx < fInclusiveJets.size() ) {
+ retval = fClustSeq->area_4vector(fInclusiveJets[idx]);
} else {
AliError(Form("[e] ::GetJetArea wrong index: %d",idx));
}
if (!fClustSeq) {
AliError("[e] Run the jfinder first.");
+ return;
}
Double_t mean_area = 0;
// inclusive jets:
fInclusiveJets.clear();
- fInclusiveJets = fClustSeq->inclusive_jets(0.0); //sorted_by_pt(fClustSeq->inclusive_jets(0.0));
+ fInclusiveJets = fClustSeq->inclusive_jets(0.0);
return 0;
}