]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/jetan2004/AliTkChargedJetFinder.h
Replaced by JETANLinkDef.h
[u/mrichter/AliRoot.git] / JETAN / jetan2004 / AliTkChargedJetFinder.h
CommitLineData
b9a6a391 1// $Id$
2
3#ifndef ALITKCHARGEDJETFINDER_H
4#define ALITKCHARGEDJETFINDER_H
5
6//if defined use Torstens version
7//#define DOCHARGED
8
9//if defined produce some debugging histos
10#ifdef DOCHARGED
11//#define DOHISTOS
12#endif
13
14#include <Riostream.h>
15#include <list>
16#include <map>
17
18#include "AliTkEtaPhiVector.h"
19#ifdef DOCHARGED
20#include "TkChargedJet.h"
21#else
22#include "AliTkConeJetEvent.h"
23#endif
24
25#ifdef ALICEINTERFACE
26#include <AliJetEventParticles.h>
27#endif
28
29class TTree;
30class TFile;
31class TClonesArray;
32class TParticle;
33class TObjArray;
34
35//------------------------------------------------------------------------
36// Faster Helper Class (charged jets)
37//-------------------------------------------------------------------------
38class jet {
39
40 public:
41 jet();
42
43 Float_t Eta() const {return fEta;}
44 Float_t Phi() const {return fPhi;}
45 AliTkEtaPhiVector getCentroid() const;
46
47 Double_t getPt() const;
48 Int_t getNParticles() const;
49 TParticle *getParticle(Int_t i) const;
50 TClonesArray *getParticles() const;
51 Double_t getDiff(TParticle *particle) const;
52 Double_t getDiffSq(TParticle *particle) const;
53
54 void addParticle(TParticle *particle);
55 friend ostream& operator<<(ostream& s, jet& j);
56
57 private:
58 list<TParticle *> fParticles;
59 Double_t fPt;
60 Double_t fEta;
61 Double_t fPhi;
62 Int_t fNParticles;
63};
64
65//------------------------------------------------------------------------
66// Finder Class (charged jets)
67//-------------------------------------------------------------------------
68
69class AliTkChargedJetFinder : public TObject {
70
71 public:
72 AliTkChargedJetFinder();
73 virtual ~AliTkChargedJetFinder();
74
75 void defaultSettings();
76 void setSettings(Int_t /*phibins*/,Int_t /*etabins*/) {;}
77 void init();
78 void initEvent(TClonesArray *newParticles,Int_t type = 1);
79#ifdef ALICEINTERFACE
80 void initEvent(const AliJetEventParticles *p,TString desc);
81#endif
82 void run();
83 void finishEvent();
84 void finish();
85
86 void setEtMinJet(Float_t et) { fMinJetPt=et; } //minimum jet energy required
87 void setEtCut(Float_t et) { setPtSeed(et); } //min et for seedpoints
88 void setPtCut(Float_t pt) { fPtCut=pt; } //set pt cut
89 void setOutput(Bool_t out) { fOutput=out; }
90 void setRadius(Float_t r=0.7) { setFinderR(r); }
91
92 void setFinderR(Float_t r) { fR=r;fRSq = r*r; }
93 Float_t getFinderR() const { return fR; }
94 void setEtaMin(Float_t eta) { fEtaMin = eta; }
95 Float_t getEtaMin() const { return fEtaMin; }
96 void setEtaMax(Float_t eta) { fEtaMax = eta; }
97 Float_t getEtaMax() const { return fEtaMax; }
98 void setPtSeed(Float_t s) { fPtSeed=s;}
99 Float_t getPtSeed() const { return fPtSeed; }
100 void setMinJetPt(Float_t s) { fMinJetPt=s;}
101 Float_t getMinJetPt() const { return fMinJetPt; }
102
103 void setEvOutFilename(const Char_t *filename);
104 const Char_t *getEvOutFilename() { return fEvout_name; }
105#ifdef DOHISTOS
106 void setHistFilename(const Char_t *filename);
107 const Char_t *getHistFilename() { return fOutput_name; }
108#endif
109
110 Bool_t getOutput() const {return fOutput;}
111 Int_t getNTowers() const {return 0;}
112 Int_t getNEtaBins() const {return 0;}
113 Float_t getEtaWidth() const {return 0;}
114 Int_t getPhiBins() const {return 0;}
115 Float_t getPhiMin() const {return 0;}
116 Float_t getPhiMax() const {return 2 * TMath::Pi();}
117 Float_t getPhiWidth() const {return 0;}
118 Float_t getEtCut() const {return fPtSeed;};
119 Float_t getPtCut() const {return fPtCut;};
120 Float_t getEtMinJet() const {return fMinJetPt;}
121 Float_t getRadius() const {return fR;}
122
123 private:
124 Int_t fOutput;
125 list<TParticle *> fParticles; //!
126 list<jet> fJets; //!
127
128 // parameter for jetfinder
129 Float_t fR;
130 Float_t fRSq;
131 Float_t fEtaMin;
132 Float_t fEtaMax;
133 Float_t fPtCut;
134 Float_t fPtSeed;
135 Float_t fMinJetPt;
136
137#ifdef DOCHARGED
138 TkChargedJet *fMyTJet; //!
139#else
140 AliTkConeJetEvent *fEvoutevent; //!
141#endif
142
143#ifdef DOHISTOS
144 // histograms...
145 Char_t *fOutput_name; //!
146 TObjArray *fHistos; //!
147 TFile *fHistoutfile; //!
148#endif
149
150 Char_t *fEvout_name; //!
151 TFile *fEvoutfile; //!
152 TTree *fEvouttree; //!
153
154#ifdef ALICEINTERFACE
155 TClonesArray *fAliParticles; //!
156#endif
157
158 bool isTParticleAccepted(TParticle *particle);
159 void addParticle(TParticle *particle);
160 list<jet>::iterator findHighestJet();
161 void checkJets();
162
163 ClassDef(AliTkChargedJetFinder,2)
164};
165//-------------------------------------------------------------------------
166
167#endif