Return to initial version of KS
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALJetFinder.h
CommitLineData
471f69dc 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
14class TClonesArray;
d594b22e 15class AliEMCALHadronCorrection;
16
471f69dc 17class TH2F;
18
19class AliEMCALJetFinder : public TTask {
20 public:
3bc109a9 21 AliEMCALJetFinder();
22 AliEMCALJetFinder(const char* name, const char *title);
23 virtual ~AliEMCALJetFinder();
08a3fb06 24 virtual void Init();
a942c029 25 virtual void Find(Int_t ncell, Int_t ncell_tot, Float_t etc[30000],
3bc109a9 26 Float_t etac[30000], Float_t phic[30000],
27 Float_t min_move, Float_t max_move, Int_t mode,
28 Float_t prec_bg, Int_t ierror);
a942c029 29 virtual void Find();
30 virtual void FindTracksInJetCone();
31 virtual void Test();
d594b22e 32 virtual void BuildTrackFlagTable();
33 virtual Int_t SetTrackFlag(Float_t radius, Int_t pdgCode, Double_t charge);
3bc109a9 34 // Geometry
35 virtual void SetCellSize(Float_t eta, Float_t phi);
36 // Parameters
d594b22e 37 virtual void SetDebug(Int_t flag = 0) {fDebug = flag;}
3bc109a9 38 virtual void SetConeRadius(Float_t par);
39 virtual void SetEtSeed(Float_t par);
40 virtual void SetMinJetEt(Float_t par);
41 virtual void SetMinCellEt(Float_t par);
d594b22e 42 virtual void SetPtCut(Float_t par = 1.);
43 virtual void SetMomentumSmearing(Bool_t flag = kFALSE) {fSmear = flag;}
44 virtual void SetEfficiencySim(Bool_t flag = kFALSE) {fEffic = flag;}
45 virtual void SetSamplingFraction(Float_t par = 12.9) {fSamplingF = par;}
d53b7b0b 46 virtual void SetIncludeK0andN(Bool_t flag = kFALSE) {fK0N = flag;}
d594b22e 47 // Correction of hadronic energy
48 virtual void SetHadronCorrector(AliEMCALHadronCorrection* corr)
49 {fHadronCorrector = corr;}
50 virtual void SetHadronCorrection(Int_t flag = 1) {fHCorrection = flag;}
b7a73953 51 // PAI
52 void SetWriteKey(Bool_t flag = kFALSE) {fWrite = flag;}
53 void SetMode(Int_t mode = 0) {fMode = mode;}
54 void SetMinMove(Float_t minMove = 0.05) {fMinMove = minMove;}
55 void SetMaxMove(Float_t maxMove = 0.15) {fMaxMove = maxMove;}
56 void SetPrecBg (Float_t precBg = 0.035) {fPrecBg = precBg;}
57 void SetParametersForBgSubtraction
58 (Int_t mode=0, Float_t minMove=0.05, Float_t maxMove=0.15, Float_t precBg=0.035);
59 // virtual void Print(Option_t* option="") const; // *MENU*
60
61 Bool_t GetWriteKey() {return fWrite;}
62 AliEMCALJet* GetJetT() {return fJetT[0];}
63
a942c029 64 // Access to Results
3bc109a9 65 virtual Int_t Njets();
66 virtual Float_t JetEnergy(Int_t);
67 virtual Float_t JetPhiL(Int_t);
68 virtual Float_t JetPhiW(Int_t);
69 virtual Float_t JetEtaL(Int_t);
70 virtual Float_t JetEtaW(Int_t);
71 virtual TH2F* GetLego() {return fLego;}
72 // I/O
08a3fb06 73 virtual void SetOutputFileName(char* name) {fOutFileName = name;}
3bc109a9 74 virtual void FillFromHits(Int_t flag = 0);
d594b22e 75 virtual void FillFromHitFlaggedTracks(Int_t flag = 0);
76 virtual void FillFromDigits(Int_t flag = 0);
3bc109a9 77 virtual void FillFromTracks(Int_t flag = 0, Int_t ich = 0);
b7a73953 78 virtual void FillFromPartons();
79
a942c029 80 virtual void SaveBackgroundEvent();
81 virtual void InitFromBackground();
3bc109a9 82 virtual void AddJet(const AliEMCALJet& jet);
83 virtual void WriteJets();
84 virtual void ResetJets();
85 virtual TClonesArray* Jets() {return fJets;}
471f69dc 86 private:
3bc109a9 87 virtual void BookLego();
88 virtual void DumpLego();
89 virtual void ResetMap();
26dadf3a 90 virtual Float_t PropagatePhi(Float_t pt, Float_t charge, Bool_t& curls);
471f69dc 91 protected:
b7a73953 92 Bool_t fWrite; // Key for writing
d594b22e 93 TClonesArray* fJets; //! List of Jets
94 TH2F* fLego; //! Lego Histo
a942c029 95 TH2F* fLegoB; //! Lego Histo Backg
d594b22e 96 AliEMCALJet* fJetT[10]; //! Jet temporary storage
97 AliEMCALHadronCorrection* fHadronCorrector; //! Pointer to hadronic correction
98 Int_t fHCorrection; // Hadron correction flag
99 Int_t fDebug; //! Debug flag
a942c029 100 Int_t fBackground; //! Background flag
d594b22e 101 Float_t fConeRadius; // Cone radius
102 Float_t fPtCut; // Pt cut on charged tracks
103 Float_t fEtSeed; // Min. Et for seed
104 Float_t fMinJetEt; // Min Et of jet
105 Float_t fMinCellEt; // Min Et in one cell
a942c029 106 Float_t fSamplingF; // Sampling Fraction
d594b22e 107 Bool_t fSmear; // Flag for momentum smearing
108 Bool_t fEffic; // Flag for efficiency simulation
d53b7b0b 109 Bool_t fK0N; // Flag for efficiency simulation
d594b22e 110 Int_t fNjets; //! Number of Jets
111 Float_t fDeta; //! eta cell size
112 Float_t fDphi; //! phi cell size
113 Int_t fNcell; //! number of cells
114 Int_t fNtot; //! total number of cells
115 Int_t fNbinEta; //! number of cells in eta
116 Int_t fNbinPhi; //! number of cells in phi
be9787fe 117 Float_t fEtaMin; //! minimum eta
118 Float_t fEtaMax; //! maximum eta
119 Float_t fPhiMin; //! minimun phi
120 Float_t fPhiMax; //! maximum phi
d594b22e 121 Float_t fEtCell[30000]; //! Cell Energy
122 Float_t fEtaCell[30000]; //! Cell eta
123 Float_t fPhiCell[30000]; //! Cell phi
124 Int_t* fTrackList; //! List of selected tracks
a942c029 125 Int_t* fTrackListB; //! List of selected tracks in Bg
d594b22e 126 Int_t fNt; //! number of tracks
a942c029 127 Int_t fNtS; //! number of tracks selected
128 Float_t* fPtT; //! Pt of tracks
129 Float_t* fEtaT; //! Eta of tracks
130 Float_t* fPhiT; //! Phi of tracks
131 Int_t fNtB; //! number of tracks in Bg
132 Float_t* fPtB; //! Pt of tracks in Bg
133 Float_t* fEtaB; //! Eta of tracks in Bg
134 Float_t* fPhiB; //! Phi of tracks in Bg
b7a73953 135
136 // parameter for jet_finder_ua1
137 Float_t fMinMove; // min cone move
138 Float_t fMaxMove; // max cone move
139 Int_t fMode; // key for BG subtraction
140 Float_t fPrecBg; // max value of change for BG (in %)
141 Int_t fError; // error variables
142
08a3fb06 143 char* fOutFileName; //! Output file name
144 TFile* fOutFile; //! Output file
145 TFile* fInFile; //! Output file
146 Int_t fEvent; //! Processed event
b7a73953 147
3bc109a9 148 ClassDef(AliEMCALJetFinder,2) // JetFinder for EMCAL
149}
150;
471f69dc 151#endif // ALIEMCALJetFinder_H
152
3bc109a9 153
a942c029 154
155
156
157