3 /*************************************************************************
4 * AliTkConeJetFinder.h *
5 * Thorsten Kollegger <kollegge@ikf.physik.uni-frankfurt.de> *
6 * Jet finder based on a cone algorithm with seeds and addition of *
7 * midpoints, for a description of the algorithm see hep-ex/0005012 *
8 ************************************************************************/
10 /*************************************************************************
13 * This is a prototype finder - it's clearly not optimized for speed *
14 * e.g. one could win much by using TClonesArrays instead of TObjArrays *
16 * for MC studies, it keeps track of the particle/proto-jet/jet origin *
17 ************************************************************************/
19 // NEXT STEPS: 09/03/02 12:30am
20 // Implement list of found stable protojets
21 // Implement function isProtoJetAlreadyFound()
22 // -> Finishes findProtoJets
23 // Implement merge/split process
24 // Implement seed + midpoint addition
27 #include <Riostream.h>
32 #include "TClonesArray.h"
33 #include "TParticle.h"
36 //forward declarations
40 class AliTkConeJetFinder : public TObject {
43 ~AliTkConeJetFinder();
45 void setDefaultSettings();
50 void FillEtHistFromTParticles(TClonesArray *particles);
51 Bool_t isTParticleAccepted(TParticle * particle);
52 void AddEtHist(Float_t eta, Float_t phi, Double_t Et);
58 Int_t CreateSeedList();
59 Int_t CreateMidPoints();
61 Int_t FindProtoJets();
62 Int_t CalculateConeCentroid(Float_t *eta, Float_t *phi, Float_t *Et);
66 Bool_t isProtoJetConeShared();
67 Int_t FindNeighborCone(Int_t nProtoJet);
68 Int_t SplitProtoJetCone(Int_t nProtoJet1, Int_t nProtoJet2);
69 Int_t MergeProtoJetCone(Int_t nProtoJet1, Int_t nProtoJet2);
73 void setEtaNBins(Int_t nbins);
75 void setEtaRange(Float_t min, Float_t max);
76 Float_t getEtaRangeMin();
77 Float_t getEtaRangeMax();
78 void setEtaGrid(Int_t nbins, Float_t min, Float_t max);
81 void setPhiNBins(Int_t nbins);
83 void setPhiRange(Float_t min, Float_t max);
84 Float_t getPhiRangeMin();
85 Float_t getPhiRangeMax();
86 void setPhiGrid(Int_t nbins, Float_t min, Float_t max);
89 void setJetConeRadius(Float_t r);
90 Float_t getJetConeRadius();
92 // seed tower threshold
93 void setTowerSeedEt(Float_t minEt);
94 Float_t getTowerSeedEt();
98 TObjArray *getProtoJetList();
103 //----------------------------------------------------------------------
116 TH2D *hStableProtoJetHist;
118 // number of "towers" - calcualted in Init()
122 // seed list - array of ints with tower id's
124 // will not work this way - this requires more towers than tower due to the additon of midpoint
127 TObjArray *protojets;
130 Float_t calcPhiDiff(Float_t phi1, Float_t phi2);
131 Bool_t isProtoJetStable(Float_t etaDiff, Float_t phiDiff);
132 Bool_t isProtoJetInTower(Int_t etaBin,Int_t phiBin,
133 Float_t eta, Float_t phi);
134 Bool_t isProtoJetInTower(Int_t tower, Float_t eta, Float_t phi);
136 Int_t findTower(Float_t eta, Float_t phi);
138 ClassDef(AliTkConeJetFinder,1)
141 class AliTkTower : public TObject {
143 AliTkTower() : TObject() { etaMin = 0; etaMax = 0; phiMin = 0; phiMax = 0;}
153 ClassDef(AliTkTower,1)
156 class AliTkProtoJet : public TObject {
158 AliTkProtoJet() : TObject() { }
164 Bool_t IsEqual(AliTkProtoJet *other);
168 ClassDef(AliTkProtoJet,1)
176 bool operator==(const SProtoJet &s1);