EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTriggerQA.cxx
EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalTriggerInfoQA.cxx
EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetShapeDeriv.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetShapeConst.cxx
EMCALJetTasks/UserTasks/AliAnalysisTaskJetMatching.cxx
EMCALJetTasks/UserTasks/AliAnalysisTaskJetV2.cxx
EMCALJetTasks/UserTasks/AliAnalysisTaskRhoMass.cxx
fTagStatus(-1),
fPtSub(0),
fPtVectSub(0),
- fTriggers(0)
+ fTriggers(0),
+ fJetShapeMassFirstDer(0),
+ fJetShapeMassSecondDer(0),
+ fJetShapeMassFirstSub(0),
+ fJetShapeMassSecondSub(0),
+ fLabel(-1)
{
// Constructor.
fTagStatus(-1),
fPtSub(0),
fPtVectSub(0),
- fTriggers(0)
+ fTriggers(0),
+ fJetShapeMassFirstDer(0),
+ fJetShapeMassSecondDer(0),
+ fJetShapeMassFirstSub(0),
+ fJetShapeMassSecondSub(0),
+ fLabel(-1)
{
// Constructor.
fTagStatus(-1),
fPtSub(0),
fPtVectSub(0),
- fTriggers(0)
+ fTriggers(0),
+ fJetShapeMassFirstDer(0),
+ fJetShapeMassSecondDer(0),
+ fJetShapeMassFirstSub(0),
+ fJetShapeMassSecondSub(0),
+ fLabel(-1)
{
// Constructor.
fTagStatus(jet.fTagStatus),
fPtSub(jet.fPtSub),
fPtVectSub(jet.fPtVectSub),
- fTriggers(jet.fTriggers)
+ fTriggers(jet.fTriggers),
+ fJetShapeMassFirstDer(jet.fJetShapeMassFirstDer),
+ fJetShapeMassSecondDer(jet.fJetShapeMassSecondDer),
+ fJetShapeMassFirstSub(jet.fJetShapeMassFirstSub),
+ fJetShapeMassSecondSub(jet.fJetShapeMassSecondSub),
+ fLabel(jet.fLabel)
{
// Copy constructor.
fPtSub = jet.fPtSub;
fPtVectSub = jet.fPtVectSub;
fTriggers = jet.fTriggers;
+ fJetShapeMassFirstDer = jet.fJetShapeMassFirstDer;
+ fJetShapeMassSecondDer = jet.fJetShapeMassSecondDer;
+ fJetShapeMassFirstSub = jet.fJetShapeMassFirstSub;
+ fJetShapeMassSecondSub = jet.fJetShapeMassSecondSub;
+ fLabel = jet.fLabel;
}
return *this;
Double_t Eta() const { return fEta; }
Double_t Y() const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz())); }
Short_t Charge() const { return 0; }
- Int_t GetLabel() const { return -1; }
+ Int_t GetLabel() const { return fLabel; }
Int_t PdgCode() const { return 0; }
const Double_t *PID() const { return 0; }
void GetMom(TLorentzVector &vec) const;
void Clear(Option_t */*option*/="") { fClusterIDs.Set(0); fTrackIDs.Set(0); fClosestJets[0] = 0; fClosestJets[1] = 0;
fClosestJetsDist[0] = 0; fClosestJetsDist[1] = 0; fMatched = 0; fPtSub = 0; }
Double_t DeltaR(const AliVParticle* part) const;
+
+ void SetLabel(Int_t l) { fLabel = l; }
void SetArea(Double_t a) { fArea = a; }
void SetAreaEta(Double_t a) { fAreaEta = a; }
void SetAreaPhi(Double_t a) { fAreaPhi = a; }
AliEmcalJet* GetTaggedJet() const { return fTaggedJet ; }
Int_t GetTagStatus() const { return fTagStatus ; }
+ //jet shape derivatives
+ void SetFirstDerivative(Double_t d) { fJetShapeMassFirstDer = d ; }
+ void SetSecondDerivative(Double_t d) { fJetShapeMassSecondDer = d ; }
+ void SetFirstOrderSubtracted(Double_t d) { fJetShapeMassFirstSub = d ; }
+ void SetSecondOrderSubtracted(Double_t d) { fJetShapeMassSecondSub = d ; }
+ Double_t GetFirstDerivative() const { return fJetShapeMassFirstDer ; }
+ Double_t GetSecondDerivative() const { return fJetShapeMassSecondDer ; }
+ Double_t GetFirstOrderSubtracted() const { return fJetShapeMassFirstSub ; }
+ Double_t GetSecondOrderSubtracted() const { return fJetShapeMassSecondSub ; }
+
protected:
Double32_t fPt; //[0,0,12] pt
Double32_t fEta; //[-1,1,12] eta
Double_t fPtSub; //! background subtracted pt (not stored set from outside)
Double_t fPtVectSub; //! background vector subtracted pt (not stored set from outside)
UInt_t fTriggers; //! triggers that the jet might have fired (AliVEvent::EOfflineTriggerTypes)
+ Double_t fJetShapeMassFirstDer; //! result from shape derivatives for jet mass: 1st derivative
+ Double_t fJetShapeMassSecondDer; //! result from shape derivatives for jet mass: 2nd derivative
+ Double_t fJetShapeMassFirstSub; //! result from shape derivatives for jet mass: 1st order subtracted
+ Double_t fJetShapeMassSecondSub; //! result from shape derivatives for jet mass: 2nd order subtracted
+ Int_t fLabel; // label to inclusive jet for constituent subtracted jet
private:
struct sort_descend
bool operator () (const std::pair<Double_t, Int_t>& p1, const std::pair<Double_t, Int_t>& p2) { return p1.first > p2.first ; }
};
- ClassDef(AliEmcalJet,13) // Emcal jet class in cylindrical coordinates
+ ClassDef(AliEmcalJet,14) // Emcal jet class in cylindrical coordinates
};
#endif
//
// Emcal jet finder task.
//
-// Authors: C.Loizides, S.Aiola
+// Authors: C.Loizides, S.Aiola, M. Verweij
#include <vector>
#include "AliEmcalJetTask.h"
#include "AliVCluster.h"
#include "AliVEvent.h"
#include "AliVParticle.h"
+#include "AliRhoParameter.h"
using std::cout;
using std::endl;
using std::cerr;
fTracksName("Tracks"),
fCaloName("CaloClusters"),
fJetsName("Jets"),
+ fJetsSubName(""),
fJetType(kNone),
fConstSel(0),
fMCConstSel(0),
fIsEmcPart(0),
fLegacyMode(kFALSE),
fCodeDebug(kFALSE),
+ fDoGenericSubtraction(kFALSE),
+ fDoConstituentSubtraction(kFALSE),
+ fUseExternalBkg(kFALSE),
+ fRhoName(""),
+ fRhomName(""),
+ fRho(0),
+ fRhom(0),
fJets(0),
+ fJetsSub(0),
fEvent(0),
fTracks(0),
- fClus(0)
+ fClus(0),
+ fRhoParam(0),
+ fRhomParam(0)
{
// Default constructor.
}
fTracksName("Tracks"),
fCaloName("CaloClusters"),
fJetsName("Jets"),
+ fJetsSubName(""),
fJetType(kAKT|kFullJet|kRX1Jet),
fConstSel(0),
fMCConstSel(0),
fIsEmcPart(0),
fLegacyMode(kFALSE),
fCodeDebug(kFALSE),
+ fDoGenericSubtraction(kFALSE),
+ fDoConstituentSubtraction(kFALSE),
+ fUseExternalBkg(kFALSE),
+ fRhoName(""),
+ fRhomName(""),
+ fRho(0),
+ fRhom(0),
fJets(0),
+ fJetsSub(0),
fEvent(0),
fTracks(0),
- fClus(0)
+ fClus(0),
+ fRhoParam(0),
+ fRhomParam(0)
{
// Standard constructor.
fJets = new TClonesArray("AliEmcalJet");
fJets->SetName(fJetsName);
+
+ if(!fJetsSubName.IsNull()) {
+ fJetsSub = new TClonesArray("AliEmcalJet");
+ fJetsSub->SetName(fJetsSubName);
+ }
}
//________________________________________________________________________
// clear the jet array (normally a null operation)
fJets->Delete();
+ if(fJetsSub) fJetsSub->Delete();
FindJets();
}
return;
}
+ if (fRhoParam)
+ fRho = fRhoParam->GetVal();
+ if (fRhomParam)
+ fRhom = fRhomParam->GetVal();
+
TString name("kt");
fastjet::JetAlgorithm jalgo(fastjet::kt_algorithm);
if ((fJetType & kAKT) != 0) {
// run jet finder
fjw.Run();
+ //run generic subtractor
+ if(fDoGenericSubtraction) {
+ fjw.SetUseExternalBkg(fUseExternalBkg,fRho,fRhom);
+ fjw.DoGenericSubtractionJetMass();
+ }
+
+ //run constituent subtractor
+ if(fDoConstituentSubtraction) {
+ fjw.SetUseExternalBkg(fUseExternalBkg,fRho,fRhom);
+ fjw.DoConstituentSubtraction();
+ }
+
// get geometry
AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance();
if (!geom) {
AliEmcalJet *jet = new ((*fJets)[jetCount])
AliEmcalJet(jets_incl[ij].perp(), jets_incl[ij].eta(), jets_incl[ij].phi(), jets_incl[ij].m());
+ jet->SetLabel(ij);
+
+ //do generic subtraction if requested
+ if(fDoGenericSubtraction) {
+#ifdef FASTJET_VERSION
+ std::vector<fastjet::contrib::GenericSubtractorInfo> jetMassInfo = fjw.GetGenSubtractorInfoJetMass();
+ UInt_t n = (UInt_t)jetMassInfo.size();
+ if(n>ij && n>0) {
+ jet->SetFirstDerivative(jetMassInfo[ij].first_derivative());
+ jet->SetSecondDerivative(jetMassInfo[ij].second_derivative());
+ jet->SetFirstOrderSubtracted(jetMassInfo[ij].first_order_subtracted());
+ jet->SetSecondOrderSubtracted(jetMassInfo[ij].second_order_subtracted());
+ }
+#endif
+ }
// loop over constituents
std::vector<fastjet::PseudoJet> constituents(fjw.GetJetConstituents(ij));
jetCount++;
}
//fJets->Sort();
+
+ //run constituent subtractor if requested
+ if(fDoConstituentSubtraction) {
+#ifdef FASTJET_VERSION
+ if(!fJetsSub) AliWarning(Form("No jet branch to write to for subtracted jets. fJetsSubName: %s",fJetsSubName.Data()));
+ else {
+ std::vector<fastjet::PseudoJet> jets_sub;
+ jets_sub = fjw.GetConstituentSubtrJets();
+ AliDebug(1,Form("%d constituent subtracted jets found", (Int_t)jets_sub.size()));
+ for (UInt_t ijet=0, jetCount=0; ijet<jets_sub.size(); ++ijet) {
+ //Only storing 4-vector and jet area of unsubtracted jet
+ AliEmcalJet *jet_sub = new ((*fJetsSub)[jetCount])
+ AliEmcalJet(jets_sub[ijet].perp(), jets_sub[ijet].eta(), jets_sub[ijet].phi(), jets_sub[ijet].m());
+ jet_sub->SetLabel(ijet);
+ fastjet::PseudoJet area(fjw.GetJetAreaVector(ijet));
+ jet_sub->SetArea(area.perp());
+ jet_sub->SetAreaEta(area.eta());
+ jet_sub->SetAreaPhi(area.phi());
+ jet_sub->SetAreaEmc(area.perp());
+ jetCount++;
+ }
+ }
+#endif
+ } //constituent subtraction
}
//________________________________________________________________________
return 0;
}
+ if (!(fEvent->FindListObject(fJetsSubName)) && fJetsSub)
+ fEvent->AddObject(fJetsSub);
+
if (fTracksName == "Tracks")
am->LoadBranch("Tracks");
if (!fTracks && !fTracksName.IsNull()) {
fIsEmcPart = 1;
}
+ if (!fRhoName.IsNull() && !fRhoParam) { // get rho from the event
+ fRhoParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fRhoName));
+ if (!fRhoParam) {
+ AliError(Form("%s: Could not retrieve rho %s!", GetName(), fRhoName.Data()));
+ return 0;
+ }
+ }
+ if (!fRhomName.IsNull() && !fRhomParam) { // get rhom from the event
+ fRhomParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fRhomName));
+ if (!fRhomParam) {
+ AliError(Form("%s: Could not retrieve rho %s!", GetName(), fRhomName.Data()));
+ return 0;
+ }
+ }
+
return 1;
}
class TClonesArray;
class AliVEvent;
+class AliRhoParameter;
namespace fastjet {
class PseudoJet;
#include "AliLog.h"
#include "AliAnalysisTaskSE.h"
+#include "AliFJWrapper.h"
class AliEmcalJetTask : public AliAnalysisTaskSE {
public:
void SetAlgo(Int_t a) { if (a==0) fJetType |= kKT; else fJetType |= kAKT; } // for backward compatibility only
void SetClusName(const char *n) { fCaloName = n ; }
void SetJetsName(const char *n) { fJetsName = n ; }
+ void SetJetsSubName(const char *n) { fJetsSubName = n ; }
void SetJetType(UInt_t t) { fJetType = t ; }
void SetMarkConstituents(UInt_t m) { fMarkConst = m ; }
void SetMinJetArea(Double_t a) { fMinJetArea = a ; }
fOfflineTriggerMask = fOfflineTriggerMask | offlineTriggerMask;
}
}
- void SetLegacyMode(Bool_t mode) { fLegacyMode ^= mode; }
+ void SetLegacyMode(Bool_t mode) { fLegacyMode = mode; }
void SetCodeDebug(Bool_t val) { fCodeDebug = val; }
+ void SetRhoName(const char *n) { fRhoName = n ; }
+ void SetRhomName(const char *n) { fRhomName = n ; }
+ void SetGenericSubtraction(Bool_t b) { fDoGenericSubtraction = b; }
+ void SetConstituentSubtraction(Bool_t b) { fDoConstituentSubtraction = b; }
+ void SetUseExternalBkg(Bool_t b, Double_t rho, Double_t rhom) { fUseExternalBkg = b; fRho = rho; fRhom = rhom;}
+
UInt_t GetJetType() { return fJetType; }
Bool_t GetLegacyMode() { return fLegacyMode; }
+ TString GetJetsSubName() { return fJetsSubName; }
const char* GetJetsName() { return fJetsName.Data(); }
Double_t GetRadius() { return fRadius; }
TString fTracksName; // name of track collection
TString fCaloName; // name of calo cluster collection
TString fJetsName; // name of jet collection
+ TString fJetsSubName; // name of subtracted jet collection
UInt_t fJetType; // jet type (algorithm, radius, constituents)
UInt_t fConstSel; // select constituents from a previous jet finding
UInt_t fMCConstSel; // select MC constituents (label!=0) from a previous jet finding
Bool_t fIsEmcPart; //!=true if emcal particles are given as input (for clusters)
Bool_t fLegacyMode; //! if true, enable FJ 2.x behavior
Bool_t fCodeDebug; // use nontested code changes
+
+ Bool_t fDoGenericSubtraction; // calculate generic subtraction
+ Bool_t fDoConstituentSubtraction; // calculate constituent subtraction
+ Bool_t fUseExternalBkg; // use external background for generic subtractor
+ TString fRhoName; // name of rho
+ TString fRhomName; // name of rhom
+ Double_t fRho; // pT background density
+ Double_t fRhom; // mT background density
+
TClonesArray *fJets; //!jet collection
+ TClonesArray *fJetsSub; //!subtracted jet collection
AliVEvent *fEvent; //!current event
TClonesArray *fTracks; //!tracks collection
TClonesArray *fClus; //!cluster collection
+ AliRhoParameter *fRhoParam; //!event rho
+ AliRhoParameter *fRhomParam; //!event rhom
private:
AliEmcalJetTask(const AliEmcalJetTask&); // not implemented
AliEmcalJetTask &operator=(const AliEmcalJetTask&); // not implemented
- ClassDef(AliEmcalJetTask, 11) // Jet producing task
+ ClassDef(AliEmcalJetTask, 12) // Jet producing task
};
#endif
#include <TString.h>
#include "AliLog.h"
#include "FJ_includes.h"
+#include "AliJetShape.h"
class 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> GetInputVectors() const { return fInputVectors; }
- 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);
- Bool_t GetLegacyMode() { return fLegacyMode; }
+ fastjet::ClusterSequenceArea* GetClusterSequence() const { return fClustSeq; }
+ const std::vector<fastjet::PseudoJet> GetInputVectors() const { return fInputVectors; }
+ 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);
+ Bool_t GetLegacyMode() { return fLegacyMode; }
+#ifdef FASTJET_VERSION
+ const std::vector<fastjet::contrib::GenericSubtractorInfo> GetGenSubtractorInfoJetMass() const {return fGenSubtractorInfoJetMass;}
+ const std::vector<fastjet::PseudoJet> GetConstituentSubtrJets() const { return fConstituentSubtrJets; }
+#endif
virtual Int_t Run();
+ virtual Int_t DoGenericSubtractionJetMass();
+ virtual Int_t DoConstituentSubtraction();
void SetStrategy(const fastjet::Strategy &strat) { fStrategy = strat; }
void SetAlgorithm(const fastjet::JetAlgorithm &algor) { fAlgor = algor; }
void SetupStrategyfromOpt(const char *option);
void SetLegacyMode (Bool_t mode) { fLegacyMode ^= mode; }
void SetLegacyFJ();
+ void SetUseExternalBkg(Bool_t b, Double_t rho, Double_t rhom) { fUseExternalBkg = b; fRho = rho; fRhom = rhom;}
protected:
- TString fName; //!
- TString fTitle; //!
- std::vector<fastjet::PseudoJet> fInputVectors; //!
- std::vector<fastjet::PseudoJet> fInclusiveJets; //!
- std::vector<double> fSubtractedJetsPt; //!
- fastjet::AreaDefinition *fAreaDef; //!
- fastjet::VoronoiAreaSpec *fVorAreaSpec; //!
- fastjet::GhostedAreaSpec *fGhostedAreaSpec; //!
- fastjet::JetDefinition *fJetDef; //!
- fastjet::JetDefinition::Plugin *fPlugin; //!
- fastjet::RangeDefinition *fRange; //!
- fastjet::ClusterSequenceArea *fClustSeq; //!
- fastjet::Strategy fStrategy; //!
- fastjet::JetAlgorithm fAlgor; //!
- fastjet::RecombinationScheme fScheme; //!
- fastjet::AreaType fAreaType; //!
- Int_t fNGhostRepeats; //!
- Double_t fGhostArea; //!
- Double_t fMaxRap; //!
- Double_t fR; //!
+ TString fName; //!
+ TString fTitle; //!
+ std::vector<fastjet::PseudoJet> fInputVectors; //!
+ std::vector<fastjet::PseudoJet> fInclusiveJets; //!
+ std::vector<double> fSubtractedJetsPt; //!
+ std::vector<fastjet::PseudoJet> fConstituentSubtrJets; //!
+ fastjet::AreaDefinition *fAreaDef; //!
+ fastjet::VoronoiAreaSpec *fVorAreaSpec; //!
+ fastjet::GhostedAreaSpec *fGhostedAreaSpec; //!
+ fastjet::JetDefinition *fJetDef; //!
+ fastjet::JetDefinition::Plugin *fPlugin; //!
+ fastjet::RangeDefinition *fRange; //!
+ fastjet::ClusterSequenceArea *fClustSeq; //!
+ fastjet::Strategy fStrategy; //!
+ fastjet::JetAlgorithm fAlgor; //!
+ fastjet::RecombinationScheme fScheme; //!
+ fastjet::AreaType fAreaType; //!
+ Int_t fNGhostRepeats; //!
+ Double_t fGhostArea; //!
+ Double_t fMaxRap; //!
+ Double_t fR; //!
// no setters for the moment - used default values in the constructor
- Double_t fGridScatter; //!
- Double_t fKtScatter; //!
- Double_t fMeanGhostKt; //!
- Int_t fPluginAlgor; //!
+ Double_t fGridScatter; //!
+ Double_t fKtScatter; //!
+ Double_t fMeanGhostKt; //!
+ Int_t fPluginAlgor; //!
// extra parameters
- Double_t fMedUsedForBgSub; //!
- Bool_t fUseArea4Vector; //!
+ Double_t fMedUsedForBgSub; //!
+ Bool_t fUseArea4Vector; //!
#ifdef FASTJET_VERSION
- fastjet::JetMedianBackgroundEstimator *fBkrdEstimator; //!
+ fastjet::JetMedianBackgroundEstimator *fBkrdEstimator; //!
+ fastjet::contrib::GenericSubtractor *fGenSubtractor; //!
+ std::vector<fastjet::contrib::GenericSubtractorInfo> fGenSubtractorInfoJetMass; //!
#endif
- Bool_t fLegacyMode; //!
+ Bool_t fLegacyMode; //!
+ Bool_t fUseExternalBkg; //!
+ Double_t fRho; // pT background density
+ Double_t fRhom; // mT background density
virtual void SubtractBackground(const Double_t median_pt = -1);
, fInputVectors ( )
, fInclusiveJets ( )
, fSubtractedJetsPt ( )
+ , fConstituentSubtrJets ( )
, fAreaDef (0)
, fVorAreaSpec (0)
, fGhostedAreaSpec (0)
, fUseArea4Vector (kFALSE)
#ifdef FASTJET_VERSION
, fBkrdEstimator (0)
+ , fGenSubtractor (0)
+ , fGenSubtractorInfoJetMass ( )
#endif
, fLegacyMode (false)
+ , fUseExternalBkg (false)
+ , fRho (0)
+ , fRhom (0)
{
// Constructor.
}
delete fRange;
delete fClustSeq;
#ifdef FASTJET_VERSION
- if (fBkrdEstimator) delete fBkrdEstimator;
+ if (fBkrdEstimator) delete fBkrdEstimator;
+ if (fGenSubtractor) delete fGenSubtractor;
#endif
}
// You very often want to keep most of the settings
// but change only the algorithm or R - do it after call to this function
- fStrategy = wrapper.fStrategy;
- fAlgor = wrapper.fAlgor;
- fScheme = wrapper.fScheme;
- fAreaType = wrapper.fAreaType;
- fNGhostRepeats = wrapper.fNGhostRepeats;
- fGhostArea = wrapper.fGhostArea;
- fMaxRap = wrapper.fMaxRap;
- fR = wrapper.fR;
- fGridScatter = wrapper.fGridScatter;
- fKtScatter = wrapper.fKtScatter;
- fMeanGhostKt = wrapper.fMeanGhostKt;
- fPluginAlgor = wrapper.fPluginAlgor;
- fUseArea4Vector = wrapper.fUseArea4Vector;
- fLegacyMode = wrapper.fLegacyMode;
+ fStrategy = wrapper.fStrategy;
+ fAlgor = wrapper.fAlgor;
+ fScheme = wrapper.fScheme;
+ fAreaType = wrapper.fAreaType;
+ fNGhostRepeats = wrapper.fNGhostRepeats;
+ fGhostArea = wrapper.fGhostArea;
+ fMaxRap = wrapper.fMaxRap;
+ fR = wrapper.fR;
+ fGridScatter = wrapper.fGridScatter;
+ fKtScatter = wrapper.fKtScatter;
+ fMeanGhostKt = wrapper.fMeanGhostKt;
+ fPluginAlgor = wrapper.fPluginAlgor;
+ fUseArea4Vector = wrapper.fUseArea4Vector;
+ fLegacyMode = wrapper.fLegacyMode;
+ fUseExternalBkg = wrapper.fUseExternalBkg;
+ fRho = wrapper.fRho;
+ fRhom = wrapper.fRhom;
}
//_________________________________________________________________________________________________
delete fRange; fRange = 0;
delete fClustSeq; fClustSeq = 0;
#ifdef FASTJET_VERSION
- if (fBkrdEstimator) delete fBkrdEstimator; fBkrdEstimator = 0;
+ if (fBkrdEstimator) delete fBkrdEstimator ; fBkrdEstimator = 0;
+ if (fGenSubtractor) delete fGenSubtractor ; fGenSubtractor = 0;
#endif
}
// FJ3 :: Define an JetMedianBackgroundEstimator just in case it will be used
#ifdef FASTJET_VERSION
- //fBkrdEstimator = new fj::JetMedianBackgroundEstimator(*fRange, *fJetDef, *fAreaDef) ;
+ fBkrdEstimator = new fj::JetMedianBackgroundEstimator(fj::SelectorAbsRapMax(fMaxRap));
#endif
if (fLegacyMode) { SetLegacyFJ(); } // for FJ 2.x even if fLegacyMode is set, SetLegacyFJ is dummy
}
}
+//_________________________________________________________________________________________________
+Int_t AliFJWrapper::DoGenericSubtractionJetMass() {
+ //Do generic subtraction for jet mass
+#ifdef FASTJET_VERSION
+ if(fUseExternalBkg) fGenSubtractor = new fj::contrib::GenericSubtractor(fRho,fRhom);
+ else fGenSubtractor = new fj::contrib::GenericSubtractor(fBkrdEstimator);
+
+ // Define jet shape
+ AliJetShapeMass shapeMass;
+
+ // clear the generic subtractor info vector
+ fGenSubtractorInfoJetMass.clear();
+ for (unsigned i = 0; i < fInclusiveJets.size(); i++) {
+ fj::contrib::GenericSubtractorInfo info;
+ if(fInclusiveJets[i].perp()>0.)
+ double subtracted_shape = (*fGenSubtractor)(shapeMass, fInclusiveJets[i], info);
+ fGenSubtractorInfoJetMass.push_back(info);
+ }
+
+#endif
+ return 0;
+}
+
+//_________________________________________________________________________________________________
+Int_t AliFJWrapper::DoConstituentSubtraction() {
+ //Do constituent subtraction
+#ifdef FASTJET_VERSION
+ fj::contrib::ConstituentSubtractor *subtractor;
+ if(fUseExternalBkg) {
+ Printf("Using external background rho: %f rhom: %f",fRho,fRhom);
+ subtractor = new fj::contrib::ConstituentSubtractor(fRho,fRhom,kFALSE,kTRUE);
+ }
+ else subtractor = new fj::contrib::ConstituentSubtractor(fBkrdEstimator);
+
+ //clear constituent subtracted jets
+ fConstituentSubtrJets.clear();
+ for (unsigned i = 0; i < fInclusiveJets.size(); i++) {
+ fj::PseudoJet subtracted_jet(0.,0.,0.,0.);
+ if(fInclusiveJets[i].perp()>0.)
+ subtracted_jet = (*subtractor)(fInclusiveJets[i]);
+ fConstituentSubtrJets.push_back(subtracted_jet);
+ }
+ if(subtractor) delete subtractor;
+
+#endif
+ return 0;
+}
+
//_________________________________________________________________________________________________
void AliFJWrapper::SetupAlgorithmfromOpt(const char *option)
{
--- /dev/null
+// $Id$
+//
+// Author: M. Verweij
+
+#define AliJetShape_CXX
+#include "AliJetShape.h"
--- /dev/null
+#ifndef AliJetShape_H
+#define AliJetShape_H
+
+// $Id$
+
+#include <vector>
+#include <TString.h>
+#include "fastjet/PseudoJet.hh"
+#ifdef FASTJET_VERSION
+#include "fastjet/FunctionOfPseudoJet.hh"
+#endif
+
+#ifdef FASTJET_VERSION
+class AliJetShapeMass : public fastjet::FunctionOfPseudoJet<Double32_t>
+{
+ public:
+ virtual std::string description() const{return "jet mass";}
+ Double32_t result(const fastjet::PseudoJet &jet) const{ return jet.m();}
+};
+#endif
+#endif
#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>
+#include <fastjet/contrib/GenericSubtractor.hh>
+#include <fastjet/contrib/ShapeWithComponents.hh>
+#include <fastjet/contrib/ConstituentSubtractor.hh>
#endif
#endif
+
#endif
#pragma link C++ class AliAnalysisTaskEmcalJetTriggerQA+;
#pragma link C++ class AliAnalysisTaskEmcalTriggerInfoQA+;
#pragma link C++ class AliAnalysisTaskHJetEmbed+;
+#pragma link C++ class AliAnalysisTaskJetShapeDeriv+;
+#pragma link C++ class AliAnalysisTaskJetShapeConst+;
#pragma link C++ class AliAnalysisTaskJetMatching+;
#pragma link C++ class AliAnalysisTaskJetV2+;
#pragma link C++ class AliAnalysisTaskRhoMass+;