]>
Commit | Line | Data |
---|---|---|
45a58699 | 1 | #ifndef ALIEMCALJETFINDER_H |
2 | #define ALIEMCALJETFINDER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | //*-- Author: | |
9 | //*-- Andreas Morsch (CERN) | |
10 | ||
d560b581 | 11 | #include <TFile.h> |
45a58699 | 12 | #include <TString.h> |
d560b581 | 13 | #include <TTask.h> |
45a58699 | 14 | |
15 | class TClonesArray; | |
16 | class TH2F; | |
17 | class TH1F; | |
18 | class TCanvas; | |
19 | class TList; | |
d560b581 | 20 | |
21 | #include "AliEMCALJet.h" | |
22 | ||
45a58699 | 23 | class AliEMCALHadronCorrection; |
24 | ||
25 | class AliEMCALJetFinder : public TTask { | |
26 | friend class AliEMCALJetMicroDst; //PH Temporary solution | |
27 | public: | |
28 | AliEMCALJetFinder(); | |
29 | AliEMCALJetFinder(const char* name, const char *title); | |
30 | virtual ~AliEMCALJetFinder(); | |
18a21c7c | 31 | |
32 | AliEMCALJetFinder (const AliEMCALJetFinder&); | |
33 | AliEMCALJetFinder & operator = (const AliEMCALJetFinder & ) { | |
34 | Fatal("operator =", "not implemented") ; | |
35 | return *this ; | |
36 | } | |
37 | ||
45a58699 | 38 | virtual void Init(); |
39 | virtual void Find(Int_t ncell, Int_t ncelltot, Float_t etc[30000], | |
40 | Float_t etac[30000], Float_t phic[30000], | |
41 | Float_t minmove, Float_t maxmove, Int_t mode, | |
42 | Float_t precbg, Int_t ierror); | |
43 | virtual void Find(); | |
44 | virtual void FindChargedJet(); | |
45 | virtual void FindTracksInJetCone(); | |
46 | virtual void Test(); | |
47 | virtual void BuildTrackFlagTable(); | |
48 | virtual Int_t SetTrackFlag(Float_t radius, Int_t pdgCode, Double_t charge); | |
49 | // Geometry | |
50 | virtual void SetCellSize(Float_t eta, Float_t phi); | |
51 | // Parameters | |
52 | virtual void SetDebug(Int_t flag = 0) {fDebug = flag;} | |
53 | virtual void SetConeRadius(Float_t par); | |
54 | virtual void SetEtSeed(Float_t par); | |
55 | virtual void SetMinJetEt(Float_t par); | |
56 | virtual void SetMinCellEt(Float_t par); | |
57 | virtual void SetPtCut(Float_t par = 1.); | |
58 | virtual void SetMomentumSmearing(Bool_t flag = kFALSE) {fSmear = flag;} | |
59 | virtual void SetEfficiencySim(Bool_t flag = kFALSE) {fEffic = flag;} | |
60 | virtual void SetSamplingFraction(Float_t par) {fSamplingF = par;} | |
61 | virtual void SetEnergyWeightingFlag(Bool_t flag) {fWeightingMethod = flag;} | |
62 | virtual void SetEMCALWeight(Float_t par) {fEMCALWeight = par;} | |
63 | virtual void SetTrackWeight(Float_t par) {fTrackWeight = par;} | |
64 | virtual void SetIncludeK0andN(Bool_t flag = kFALSE) {fK0N = flag;} | |
65 | // Correction of hadronic energy | |
66 | virtual void SetHadronCorrector(AliEMCALHadronCorrection* corr) | |
67 | {fHadronCorrector = corr;} | |
68 | virtual void SetHadronCorrection(Int_t flag = 1) {fHCorrection = flag;} | |
69 | // PAI | |
70 | void SetWriteKey(Bool_t flag = kFALSE) {fWrite = flag;} | |
71 | void SetMode(Int_t mode = 0) {fMode = mode;} | |
72 | void SetMinMove(Float_t minMove = 0.05) {fMinMove = minMove;} | |
73 | void SetMaxMove(Float_t maxMove = 0.15) {fMaxMove = maxMove;} | |
74 | void SetPrecBg (Float_t precBg = 0.035) {fPrecBg = precBg;} | |
75 | void SetParametersForBgSubtraction | |
76 | (Int_t mode=0, Float_t minMove=0.05, Float_t maxMove=0.15, Float_t precBg=0.035); | |
77 | // virtual void Print(Option_t* option="") const; // *MENU* | |
78 | void SetRandomBg(Bool_t flag) {fRandomBg = flag;} | |
79 | Bool_t GetWriteKey() const {return fWrite;} | |
80 | //AliEMCALJet* GetJetT() {return fJetT[0];} | |
81 | AliEMCALJet* GetJetT(Int_t n = 0) {return fJetT[n];} | |
82 | virtual void DrawHistsForTuning(Int_t mode=0); // *MENU* | |
83 | virtual void PrintParameters(Int_t mode=0); // *MENU* | |
84 | virtual const Char_t* GetFileNameForParameters(const char* dir="RES/"); | |
85 | ||
86 | // Access to Results | |
87 | virtual Int_t Njets() const; | |
88 | virtual Float_t JetEnergy (Int_t count) const; | |
89 | virtual Float_t JetPhiL (Int_t count) const; | |
90 | virtual Float_t JetPhiW (Int_t count) const ; | |
91 | virtual Float_t JetEtaL (Int_t count) const ; | |
92 | virtual Float_t JetEtaW (Int_t count) const; | |
93 | TH2F* GetLego() const {return fLego;} | |
94 | TH2F* GetLegoB() const {return fLegoB;} | |
95 | TH2F* GetLegoEMCAL() const {return fhLegoEMCAL;} | |
96 | TH2F* GetLegoTracks() const {return fhLegoTracks;} | |
97 | TH2F* GethEff() const {return fhEff;} | |
98 | TH1F* GetCellEt() const {return fhCellEt;} | |
99 | TH1F* GetCellEMCALEt() const {return fhCellEMCALEt;} | |
100 | TH1F* GetTrackPt() const {return fhTrackPt;} | |
101 | TH1F* GetTrackPtBcut() const {return fhTrackPtBcut;} | |
102 | TList* GetHistsList() const {return fHistsList;} | |
103 | Int_t GetNChTpc() const {return fNChTpc;} | |
104 | Bool_t GetEnergyWeightingFlag() const {return fWeightingMethod ;} | |
105 | Float_t GetEMCALWeight() const {return fEMCALWeight;} | |
106 | Float_t GetTrackWeight() const {return fTrackWeight;} | |
107 | void DrawLego(const char *opt="lego"); // *MENU* | |
108 | void DrawLegoEMCAL(const char *opt="lego"); // *MENU* | |
109 | void DrawLegos(); // *MENU* | |
110 | void DrawLegoBackground(const char *opt="lego"); // *MENU* | |
111 | Bool_t IsThisPartonsOrDiQuark(Int_t pdg); | |
112 | // I/O | |
113 | virtual void SetOutputFileName(const char* name) {fOutFileName = name;} | |
114 | virtual void FillFromHits(Int_t flag = 0); | |
115 | virtual void FillFromHitFlaggedTracks(Int_t flag = 0); | |
116 | virtual void FillFromDigits(Int_t flag = 0); | |
117 | virtual void FillFromTracks(Int_t flag = 0, Int_t ich = 0); | |
118 | virtual void FillFromParticles(); | |
119 | virtual void FillFromPartons(); | |
120 | ||
121 | virtual void SaveBackgroundEvent(const char *name=""); | |
122 | virtual void InitFromBackground(); | |
123 | virtual void AddJet(const AliEMCALJet& jet); | |
124 | virtual void WriteJets(); | |
125 | virtual void ResetJets(); | |
126 | virtual TClonesArray* Jets() const {return fJets;} | |
127 | const char* GetNameOfVariant(); | |
128 | ||
129 | virtual Bool_t IsFolder() const; | |
130 | virtual void Browse(TBrowser* b); | |
131 | ||
132 | ||
133 | ||
134 | ||
135 | protected: | |
136 | TString fBGFileName; // file name for background | |
137 | Float_t fEMCALWeight; // EMCal energy weighting | |
138 | Float_t fTrackWeight; // Track energy weighting | |
139 | Bool_t fRandomBg; // Flag for Random Background | |
140 | Bool_t fWrite; // Key for writing | |
141 | Bool_t fWeightingMethod; // Key for writing | |
142 | TClonesArray* fJets; //! List of Jets | |
143 | TH2F* fLego; //! Lego Histo | |
144 | TH2F* fLegoB; //! Lego Histo Backg | |
145 | TH2F* fhLegoTracks; //! Lego for Tracks | |
146 | TH2F* fhLegoEMCAL; //! Lego for EMCAL itself | |
147 | TH2F* fhLegoHadrCorr; //! Lego for hadron correction | |
148 | TH2F* fhEff; //! Hist. for controling eff. | |
149 | TH1F* fhCellEt; //! Et distr. for cells from fLego | |
150 | TH1F* fhCellEMCALEt; //! Et distr. for cells from fLegoEMCAL | |
151 | TH1F* fhTrackPt; //! Pt distr. for charge particles | |
152 | TH1F* fhTrackPtBcut; //! Pt distr. for charge particles + cut due to magnetic field | |
153 | TH1F* fhChPartMultInTpc;//! Ch. part. multiplicity in TPC acceptance | |
154 | TH1F* fhSinTheta; //! sin(theta) | |
155 | TCanvas* fC1; //! first canvas for drawing | |
156 | TList* fHistsList; //! List of hists - 4-mar-2002 | |
157 | AliEMCALJet* fJetT[10]; //! Jet temporary storage | |
158 | AliEMCALHadronCorrection* fHadronCorrector; //! Pointer to hadronic correction | |
159 | Int_t fHCorrection; // Hadron correction flag | |
160 | Int_t fDebug; //! Debug flag | |
161 | Int_t fBackground; //! Background flag | |
162 | Float_t fConeRadius; // Cone radius | |
163 | Float_t fPtCut; // Pt cut on charged tracks | |
164 | Float_t fEtSeed; // Min. Et for seed | |
165 | Float_t fMinJetEt; // Min Et of jet | |
166 | Float_t fMinCellEt; // Min Et in one cell | |
167 | Float_t fSamplingF; // Sampling Fraction | |
168 | Bool_t fSmear; // Flag for momentum smearing | |
169 | Bool_t fEffic; // Flag for efficiency simulation | |
170 | Bool_t fK0N; // Flag for efficiency simulation | |
171 | Int_t fNjets; //! Number of Jetsp | |
172 | Float_t fDeta; //! eta cell size | |
173 | Float_t fDphi; //! phi cell size | |
174 | Int_t fNcell; //! number of cells | |
175 | Int_t fNtot; //! total number of cells | |
176 | Int_t fNbinEta; //! number of cells in eta | |
177 | Int_t fNbinPhi; //! number of cells in phi | |
178 | Float_t fEtaMin; //! minimum eta | |
179 | Float_t fEtaMax; //! maximum eta | |
180 | Float_t fPhiMin; //! minimun phi | |
181 | Float_t fPhiMax; //! maximum phi | |
182 | Float_t fEtCell[30000]; //! Cell Energy | |
183 | Float_t fEtaCell[30000]; //! Cell eta | |
184 | Float_t fPhiCell[30000]; //! Cell phi | |
185 | Int_t fNt; //! number of tracks | |
186 | Int_t fNChTpc; //! number of ch.part in TPC | |
187 | ||
188 | Int_t fNtS; //! number of tracks selected | |
189 | Int_t* fTrackList; //! List of selected tracks | |
190 | Float_t* fPtT; //! Pt of tracks | |
191 | Float_t* fEtaT; //! Eta of tracks | |
192 | Float_t* fPhiT; //! Phi of tracks | |
193 | Int_t* fPdgT; //! PDG code of tracks | |
194 | ||
195 | Int_t fNtB; //! number of tracks in Bg | |
196 | Int_t* fTrackListB; //! List of selected tracks in Bg | |
197 | Float_t* fPtB; //! Pt of tracks in Bg | |
198 | Float_t* fEtaB; //! Eta of tracks in Bg | |
199 | Float_t* fPhiB; //! Phi of tracks in Bg | |
200 | Int_t* fPdgB; //! PDG of tracks in Bg | |
201 | ||
202 | // parameter for jet_finder_ua1 | |
203 | Int_t fMode; // key for BG subtraction | |
204 | Float_t fMinMove; // min cone move | |
205 | Float_t fMaxMove; // max cone move | |
206 | Float_t fPrecBg; // max value of change for BG (in %) | |
207 | Int_t fError; // error variables | |
208 | ||
209 | const char* fOutFileName; //! Output file name | |
210 | TFile* fOutFile; //! Output file | |
211 | TFile* fInFile; //! Output file | |
212 | Int_t fEvent; //! Processed event | |
213 | private: | |
214 | virtual void BookLego(); | |
215 | Float_t WeightedJetEnergy(Float_t eta, Float_t phi); | |
216 | Float_t EMCALConeEnergy(Float_t eta, Float_t phi); | |
217 | Float_t TrackConeEnergy(Float_t eta, Float_t phi); | |
218 | virtual void DumpLego(); | |
219 | virtual void ResetMap(); | |
220 | virtual void RearrangeParticlesMemory(Int_t npart); | |
221 | public: | |
222 | virtual Float_t PropagatePhi(Float_t pt, Float_t charge, Bool_t& curls); | |
223 | ||
224 | ClassDef(AliEMCALJetFinder,5) // JetFinder for EMCAL | |
225 | } | |
226 | ; | |
227 | #endif // ALIEMCALJetFinder_H |