]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/jetan2004/AliJFTower.h
Replaced by JETANLinkDef.h
[u/mrichter/AliRoot.git] / JETAN / jetan2004 / AliJFTower.h
CommitLineData
b9a6a391 1// $Id$
2
3#ifndef ALIJFTOWERH
4#define ALIJFTOWERH
5
6#include <TMath.h>
7
8class AliJFTower
9{
10 public:
11 AliJFTower(){};
12 virtual ~AliJFTower(){};
13
14 /*
15 AliJFTower(const tower& t);
16 AliJFTower(Float_t phimin, Float_t phimax, Float_t etamin, Float_t etamax);
17
18 AliJFTower& operator+=(const Float_t E);
19 */
20
21 protected:
22 Float_t fEtaMin;
23 Float_t fEtaMax;
24 Float_t fEtaCenter;
25 Float_t fPhiMin;
26 Float_t fPhiMax;
27 Float_t fPhiCenter;
28 Float_t fEt;
29
30 ClassDef(AliJFTower,1)
31};
32
33#endif /*JFTOWERH*/
34
35#if 0
36// includes
37#include "TROOT.h"
38#include "TClonesArray.h"
39#include "TParticle.h"
40#include "TH2.h"
41#include "TCanvas.h"
42#include "TFile.h"
43
44#include <vector>
45#include <list>
46#include <map>
47
48// classes
49class tower {
50 public:
51 tower();
52 tower(const tower& t);
53 tower(Float_t phimin, Float_t phimax, Float_t etamin, Float_t etamax);
54 Float_t eta_min;
55 Float_t eta_max;
56 Float_t eta_center;
57 Float_t phi_min;
58 Float_t phi_max;
59 Float_t phi_center;
60 Float_t Et;
61 tower& operator+=(const Float_t E);
62};
63
64ostream& operator<<(ostream& s,const tower& t);
65
66class seedpoint {
67 public:
68 Float_t eta;
69 Float_t phi;
70};
71
72ostream& operator<<(ostream& s,const seedpoint& t);
73
74class protojet {
75 public:
76 protojet() { eta = -999; phi = -999; Et = -999; }
77 protojet(const protojet& p) { eta=p.eta; phi=p.phi; Et=p.Et; }
78 protojet(const protojet * p) { eta=p->eta; phi=p->phi; Et=p->Et; }
79 Float_t eta;
80 Float_t phi;
81 Float_t Et;
82 bool operator<(const protojet &p1) const {return (Et < p1.Et);}
83 bool operator==(const protojet &p1);
84};
85
86ostream& operator<<(ostream& s,const protojet& p);
87
88class TkConeJetFinderV2 : public TObject {
89 public:
90 // some test stuff - I delete it later...
91 void test();
92 void testAddTowers();
93 void testAddProtojet();
94 void testAssocProtojetTower();
95
96 // constructor
97 TkConeJetFinderV2() : TObject() {}
98
99 // run control
100 void defaultSettings();
101 void init();
102 void initEvent(TClonesArray *particles,Int_t type = 1);
103 void run();
104 void finishEvent();
105 void finish();
106
107 // real physics functions...
108 void createTowers(Int_t nPhiTower,Float_t phiMin,Float_t phiMax,
109 Int_t nEtaTower,Float_t etaMin,Float_t etaMax);
110 void fillTowersFromTParticles(TClonesArray *particles);
111 void createSeedPoints(Float_t EtCut);
112 void findProtojets(Float_t radius);
113 void findJets();
114
115 // analysis functions...
116 void createHistos();
117 void createEventHistos();
118 void clearEventHistos();
119 void writeEventHistos();
120 void writeHistos();
121
122 protected:
123 private:
124 // containers to save info...
125 vector<tower> *towers;
126 Int_t mEtaBins;
127 Float_t mEtaMin;
128 Float_t mEtaMax;
129 Float_t mEtaWidth;
130 Int_t mPhiBins;
131 Float_t mPhiMin;
132 Float_t mPhiMax;
133 Float_t mPhiWidth;
134
135 //vector<tower>::iterator
136 Int_t findTower(Float_t phi, Float_t eta);
137 Bool_t isTParticleAccepted(TParticle *particle);
138
139 list<seedpoint> seedPoints;
140 Float_t mEtCut;
141
142 list<protojet> protojets;
143
144 multimap<protojet,tower> assocTowers;
145 list<protojet> jets;
146
147 TObjArray mHistos;
148 TObjArray mEventHistos;
149 TFile *histFile;
150 void fillTowerHist();
151
152 ClassDef(TkConeJetFinderV2,1)
153};
154#endif
155
156