#include "AliVParticle.h"
#include "AliVCluster.h"
-#include "AliVParticle.h"
class AliEmcalJet : public AliVParticle
{
public:
- AliEmcalJet() : AliVParticle(), fPt(0), fEta(0), fPhi(0), fM(0), fNEF(0), fArea(0),
- fAreaEmc(-1), fAxisInEmcal(0), fMaxCPt(0), fMaxNPt(0), fClusterIDs(),
- fTrackIDs() {;}
+ AliEmcalJet();
AliEmcalJet(Double_t px, Double_t py, Double_t pz);
AliEmcalJet(Double_t pt, Double_t eta, Double_t phi, Double_t m);
AliEmcalJet(const AliEmcalJet &jet);
Double_t Area() const { return fArea; }
Double_t AreaEmc() const { return fAreaEmc; }
Bool_t AxisInEmcal() const { return fAxisInEmcal; }
+ UShort_t GetNumberOfClusters() const { return fClusterIDs.GetSize(); }
Short_t ClusterAt(Int_t idx) const { return fClusterIDs.At(idx); }
AliVCluster *ClusterAt(Int_t idx, TClonesArray *clusarray) const { return dynamic_cast<AliVCluster*>(clusarray->At(ClusterAt(idx))); }
+ UShort_t GetNumberOfTracks() const { return fTrackIDs.GetSize(); }
+ Short_t TrackAt(Int_t idx) const { return fTrackIDs.At(idx); }
+ AliVParticle *TrackAt(Int_t idx, TClonesArray *trackarray) const { return dynamic_cast<AliVParticle*>(trackarray->At(TrackAt(idx))); }
Double_t FracEmcalArea() const { return fAreaEmc/fArea; }
- UShort_t GetNumberOfClusters() const { return Nn(); }
- UShort_t GetNumberOfTracks() const { return Nch(); }
Bool_t IsInsideEmcal() const { return (fAreaEmc/fArea>0.999); }
Bool_t IsInEmcal() const { return (fAreaEmc>0); }
- Double_t MaxClusterPt() const { return fMaxNPt; }
- Double_t MaxTrackPt() const { return fMaxCPt; }
+ Double_t MaxNeutralPt() const { return fMaxNPt; }
+ Double_t MaxChargedPt() const { return fMaxCPt; }
Double_t NEF() const { return fNEF; }
- UShort_t Nn() const { return fClusterIDs.GetSize(); }
- UShort_t Nch() const { return fTrackIDs.GetSize(); }
+ UShort_t Nn() const { return fNn; }
+ UShort_t Nch() const { return fNch; }
UShort_t N() const { return Nch()+Nn(); }
- Short_t TrackAt(Int_t idx) const { return fTrackIDs.At(idx); }
- AliVParticle *TrackAt(Int_t idx, TClonesArray *trackarray) const { return dynamic_cast<AliVParticle*>(trackarray->At(TrackAt(idx))); }
+ Double_t MCPt() const { return fMCPt; }
+ Bool_t IsMC() const { return (Bool_t)(MCPt() > E() - MCPt()); }
+ AliEmcalJet* ClosestJet() const { return fClosestJets[0]; }
+ Double_t ClosestJetDistance() const { return fClosestJetsDist[0]; }
+ AliEmcalJet* SecondClosestJet() const { return fClosestJets[1]; }
+ Double_t SecondClosestJetDistance() const { return fClosestJetsDist[1]; }
+ AliEmcalJet* MatchedJet() const { return fMatched < 2 ? fClosestJets[fMatched] : 0; }
+ // Only for backward compatibility
+ Double_t MaxClusterPt() const { return MaxNeutralPt(); }
+ Double_t MaxTrackPt() const { return MaxChargedPt(); }
void AddClusterAt(Int_t clus, Int_t idx){ fClusterIDs.AddAt(clus, idx); }
void AddTrackAt(Int_t track, Int_t idx) { fTrackIDs.AddAt(track, idx); }
void SetArea(Double_t a) { fArea = a; }
void SetAreaEmc(Double_t a) { fAreaEmc = a; }
void SetAxisInEmcal(Bool_t b) { fAxisInEmcal = b; }
- void SetMaxClusterPt(Double32_t t) { fMaxNPt = t; }
- void SetMaxTrackPt(Double32_t t) { fMaxCPt = t; }
+ void SetMaxNeutralPt(Double32_t t) { fMaxNPt = t; }
+ void SetMaxChargedPt(Double32_t t) { fMaxCPt = t; }
void SetNEF(Double_t nef) { fNEF = nef; }
void SetNumberOfClusters(Int_t n) { fClusterIDs.Set(n); }
void SetNumberOfTracks(Int_t n) { fTrackIDs.Set(n); }
+ void SetNumberOfCharged(Int_t n) { fNch = n; }
+ void SetNumberOfNeutrals(Int_t n) { fNn = n; }
+ void SetMCPt(Double_t p) { fMCPt = p; }
void SortConstituents();
+ void SetClosestJet(AliEmcalJet *j, Double_t d) { fClosestJets[0] = j; fClosestJetsDist[0] = d; }
+ void SetSecondClosestJet(AliEmcalJet *j, Double_t d) { fClosestJets[1] = j; fClosestJetsDist[1] = d; }
+ void SetMatchedToClosest() { fMatched = 0; }
+ void SetMatchedToSecondClosest() { fMatched = 1; }
protected:
- Double32_t fPt; //[0,0,12] pt
- Double32_t fEta; //[-1,1,12] eta
- Double32_t fPhi; //[0,6.3,12] phi
- Double32_t fM; //[0,0,8] mass
- Double32_t fNEF; //[0,1,8] neutral energy fraction
- Double32_t fArea; //[0,0,12] area
- Double32_t fAreaEmc; //[0,0,12] area on EMCAL surface (determined from ghosts)
- Bool_t fAxisInEmcal; // =true if jet axis inside EMCAL acceptance
- Double32_t fMaxCPt; //[0,0,12] pt of maximum track
- Double32_t fMaxNPt; //[0,0,12] pt of maximum cluster
- TArrayS fClusterIDs; // array of cluster constituents
- TArrayS fTrackIDs; // array of track constituents
+ Double32_t fPt; //[0,0,12] pt
+ Double32_t fEta; //[-1,1,12] eta
+ Double32_t fPhi; //[0,6.3,12] phi
+ Double32_t fM; //[0,0,8] mass
+ Double32_t fNEF; //[0,1,8] neutral energy fraction
+ Double32_t fArea; //[0,0,12] area
+ Double32_t fAreaEmc; //[0,0,12] area on EMCAL surface (determined from ghosts)
+ Bool_t fAxisInEmcal; // =true if jet axis inside EMCAL acceptance
+ Double32_t fMaxCPt; //[0,0,12] pt of maximum charged constituent
+ Double32_t fMaxNPt; //[0,0,12] pt of maximum neutral constituent
+ Double32_t fMCPt; // pt from MC particles contributing to the jet
+ Int_t fNn; // number of neutral constituents
+ Int_t fNch; // number of charged constituents
+ TArrayS fClusterIDs; // array of cluster constituents
+ TArrayS fTrackIDs; // array of track constituents
+ AliEmcalJet *fClosestJets[2]; //! if this is MC it contains the two closest detector level jets in order of distance and viceversa
+ Double32_t fClosestJetsDist[2]; //! distance to closest jets (see above)
+ UShort_t fMatched; //! 0,1 if it is matched with one of the closest jets; 2 if it is not matched
- ClassDef(AliEmcalJet,4) // Emcal jet class in cylindrical coordinates
+ ClassDef(AliEmcalJet,6) // Emcal jet class in cylindrical coordinates
};
#endif