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