fM(0),
fNEF(0),
fArea(0),
+ fAreaEta(0),
+ fAreaPhi(0),
fAreaEmc(-1),
fAxisInEmcal(0),
fMaxCPt(0),
fClusterIDs(),
fTrackIDs(),
fMatched(2),
- fPtSub(0)
+ fPtSub(0),
+ fPtVectSub(0)
{
// Constructor.
fM(0),
fNEF(0),
fArea(0),
+ fAreaEta(0),
+ fAreaPhi(0),
fAreaEmc(-1),
fAxisInEmcal(0),
fMaxCPt(0),
fClusterIDs(),
fTrackIDs(),
fMatched(2),
- fPtSub(0)
+ fPtSub(0),
+ fPtVectSub(0)
{
// Constructor.
fM(m),
fNEF(0),
fArea(0),
+ fAreaEta(0),
+ fAreaPhi(0),
fAreaEmc(-1),
fAxisInEmcal(0),
fMaxCPt(0),
fClusterIDs(),
fTrackIDs(),
fMatched(2),
- fPtSub(0)
+ fPtSub(0),
+ fPtVectSub(0)
{
// Constructor.
fM(jet.fM),
fNEF(jet.fNEF),
fArea(jet.fArea),
+ fAreaEta(jet.fAreaEta),
+ fAreaPhi(jet.fAreaPhi),
fAreaEmc(jet.fAreaEmc),
fAxisInEmcal(jet.fAxisInEmcal),
fMaxCPt(jet.fMaxCPt),
fClusterIDs(jet.fClusterIDs),
fTrackIDs(jet.fTrackIDs),
fMatched(jet.fMatched),
- fPtSub(jet.fPtSub)
+ fPtSub(jet.fPtSub),
+ fPtVectSub(jet.fPtVectSub)
{
// Copy constructor.
fM = jet.fM;
fNEF = jet.fNEF;
fArea = jet.fArea;
+ fAreaEta = jet.fAreaEta;
+ fAreaPhi = jet.fAreaPhi;
fAreaEmc = jet.fAreaEmc;
fAxisInEmcal = jet.fAxisInEmcal;
fMaxCPt = jet.fMaxCPt;
fClosestJetsDist[1] = jet.fClosestJetsDist[1];
fMatched = jet.fMatched;
fPtSub = jet.fPtSub;
+ fPtVectSub = jet.fPtVectSub;
}
return *this;
}
+Int_t AliEmcalJet::Compare(const TObject* obj) const
+{
+ //Return -1 if this is smaller than obj, 0 if objects are equal and 1 if this is larger than obj.
+
+ const AliEmcalJet *jet = static_cast<const AliEmcalJet *>(obj);
+ if (!obj)
+ return 0;
+ if (Pt()>jet->Pt())
+ return -1;
+ return 1;
+}
+
//__________________________________________________________________________________________________
void AliEmcalJet::GetMom(TLorentzVector &vec) const
{
printf("Jet pt=%.2f, eta=%.2f, phi=%.2f, area=%.2f, NEF=%.2f\n", fPt, fEta, fPhi, fArea, fNEF);
}
+//__________________________________________________________________________________________________
+Double_t AliEmcalJet::PtSubVect(Double_t rho) const
+{
+ // Return vectorial subtracted transverse momentum.
+
+ Double_t dx = Px() - rho * fArea * TMath::Cos(fAreaPhi);
+ Double_t dy = Py() - rho * fArea * TMath::Sin(fAreaPhi);
+ //Double_t dz = Pz() - rho * fArea * TMath::SinH(fAreaEta);
+ return TMath::Sqrt(dx*dx+dy*dy);
+}
+
//__________________________________________________________________________________________________
void AliEmcalJet::SortConstituents()
{
void Print(Option_t* option = "") const;
Double_t Area() const { return fArea; }
+ Double_t AreaPt() const { return fArea; }
+ Double_t AreaEta() const { return fAreaEta; }
+ Double_t AreaPhi() const { return fAreaPhi; }
Double_t AreaEmc() const { return fAreaEmc; }
Bool_t AxisInEmcal() const { return fAxisInEmcal; }
- UShort_t GetNumberOfClusters() const { return fClusterIDs.GetSize(); }
+ Int_t Compare(const TObject* obj) const;
+ AliEmcalJet* ClosestJet() const { return fClosestJets[0]; }
+ Double_t ClosestJetDistance() const { return fClosestJetsDist[0]; }
Short_t ClusterAt(Int_t idx) const { return fClusterIDs.At(idx); }
AliVCluster *ClusterAt(Int_t idx, TClonesArray *ca) const { if (!ca) return 0; return dynamic_cast<AliVCluster*>(ca->At(ClusterAt(idx))); }
+ UShort_t GetNumberOfClusters() const { return fClusterIDs.GetSize(); }
UShort_t GetNumberOfTracks() const { return fTrackIDs.GetSize(); }
- Short_t TrackAt(Int_t idx) const { return fTrackIDs.At(idx); }
- AliVParticle *TrackAt(Int_t idx, TClonesArray *ta) const { if (!ta) return 0; return dynamic_cast<AliVParticle*>(ta->At(TrackAt(idx))); }
Double_t FracEmcalArea() const { return fAreaEmc/fArea; }
Bool_t IsInsideEmcal() const { return (fAreaEmc/fArea>0.999); }
Bool_t IsInEmcal() const { return (fAreaEmc>0); }
+ Bool_t IsMC() const { return (Bool_t)(MCPt() > 0); }
+ Bool_t IsSortable() const { return kTRUE; }
Double_t MaxNeutralPt() const { return fMaxNPt; }
Double_t MaxChargedPt() const { return fMaxCPt; }
Double_t NEF() const { return fNEF; }
UShort_t N() const { return Nch()+Nn(); }
Int_t NEmc() const { return fNEmc; }
Double_t MCPt() const { return fMCPt; }
- Bool_t IsMC() const { return (Bool_t)(MCPt() > 0); }
- 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; }
Double_t MaxClusterPt() const { return MaxNeutralPt(); }
Double_t MaxTrackPt() const { return MaxChargedPt(); }
Double_t PtEmc() const { return fPtEmc; }
Double_t PtSub() const { return fPtSub; }
Double_t PtSub(Double_t rho) const { return fPt - fArea*rho; }
+ Double_t PtSubVect(Double_t rho) const;
+ AliEmcalJet* SecondClosestJet() const { return fClosestJets[1]; }
+ Double_t SecondClosestJetDistance() const { return fClosestJetsDist[1]; }
+ Short_t TrackAt(Int_t idx) const { return fTrackIDs.At(idx); }
+ AliVParticle *TrackAt(Int_t idx, TClonesArray *ta) const { if (!ta) return 0; return dynamic_cast<AliVParticle*>(ta->At(TrackAt(idx))); }
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 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; }
void SetArea(Double_t a) { fArea = a; }
+ void SetAreaEta(Double_t a) { fAreaEta = a; }
+ void SetAreaPhi(Double_t a) { fAreaPhi = a; }
void SetAreaEmc(Double_t a) { fAreaEmc = a; }
void SetAxisInEmcal(Bool_t b) { fAxisInEmcal = b; }
void SetMaxNeutralPt(Double32_t t) { fMaxNPt = t; }
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; }
- void SetNEmc(Int_t n) { fNEmc = n; }
- void SetPtEmc(Double_t pt) { fPtEmc = pt; }
- void SetPtSub(Double_t ps) { fPtSub = ps; }
+ void SetMatchedToClosest() { fMatched = 0; }
+ void SetMatchedToSecondClosest() { fMatched = 1; }
+ void SetNEmc(Int_t n) { fNEmc = n; }
+ void SetPtEmc(Double_t pt) { fPtEmc = pt; }
+ void SetPtSub(Double_t ps) { fPtSub = ps; }
+ void SetPtSubVect(Double_t ps) { fPtVectSub = ps; }
protected:
Double32_t fPt; //[0,0,12] pt
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 fAreaEta; //[0,0,12] area eta
+ Double32_t fAreaPhi; //[0,0,12] area phi
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 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
Double_t fPtSub; //! background subtracted pt (not stored set from outside)
+ Double_t fPtVectSub; //! background vector subtracted pt (not stored set from outside)
- ClassDef(AliEmcalJet,7) // Emcal jet class in cylindrical coordinates
+ ClassDef(AliEmcalJet,8) // Emcal jet class in cylindrical coordinates
};
#endif