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