Small fix in view of reconstruction without SDD (A.Dainese)
[u/mrichter/AliRoot.git] / JETAN / AliAnalysisTaskJetBackgroundSubtract.h
CommitLineData
fb10c4b8 1#ifndef ALIANALYSISTASKJETBACKGROUNDSUBTRACT_H
2#define ALIANALYSISTASKJETBACKGROUNDSUBTRACT_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7// **************************************
8// task used for background subtration of all jets found with clustering algos
9// *******************************************
10
11#include "AliAnalysisTaskSE.h"
12#include "TObjString.h"
13#include "TString.h"
14#include "TObjArray.h"
15
16
17////////////////
18class AliJetHeader;
19class AliESDEvent;
20class AliAODEvent;
21class AliAODExtension;
22class AliAODJet;
23class AliAODJetEventBackground;
24class AliJetFinder;
25class TList;
26class TChain;
27class TH2F;
28class TH1F;
29class TH3F;
30class TProfile;
31class TRandom3;
32class TRefArray;
33
34
35class AliAnalysisTaskJetBackgroundSubtract : public AliAnalysisTaskSE
36{
37 public:
38 AliAnalysisTaskJetBackgroundSubtract();
39 AliAnalysisTaskJetBackgroundSubtract(const char* name);
40 virtual ~AliAnalysisTaskJetBackgroundSubtract();
41 // Implementation of interface methods
42 virtual void UserCreateOutputObjects();
43 virtual void Init();
44 virtual void LocalInit() { Init(); }
45 virtual void UserExec(Option_t *option);
46 virtual void Terminate(Option_t *option);
47 virtual Bool_t Notify();
48
49 // Task specific methods...
50 virtual void AddJetBranch(const char* c){fJBArray->Add(new TObjString(c));}
51 virtual void SetSubtractionMethod(Int_t i){fSubtraction = i;}
52 virtual Int_t GetSubtractionMethod(){return fSubtraction;}
53 virtual void SetBackgroundBranch(char* c){fBackgroundBranch = c;}
5719a46e 54 virtual void SetNonStdOutputFile(char* c){fNonStdFile = c;}
fb10c4b8 55 virtual void SetToReplace(char* c){fReplaceString1 = c;}
56 const char* GetToReplace(){return fReplaceString1.Data();}
57 virtual void SetReplacementMask(char* c){fReplaceString2 = c;}
a18eedbb 58 const char* GetReplacementMask(){return fReplaceString2.Data();}
fb10c4b8 59
a18eedbb 60 enum {kNoSubtract = 0,kArea,k4Area,kRhoRecalc,kRhoRC};
fb10c4b8 61
62 private:
63
64
65
66 AliAnalysisTaskJetBackgroundSubtract(const AliAnalysisTaskJetBackgroundSubtract&);
67 AliAnalysisTaskJetBackgroundSubtract& operator=(const AliAnalysisTaskJetBackgroundSubtract&);
68 Bool_t RescaleJetMomentum(AliAODJet *jet,Float_t pT);
d73e1768 69 Bool_t RescaleJet4vector(AliAODJet *jet,TLorentzVector backgroundv);
70
a18eedbb 71 Double_t RecalcRho(TClonesArray* fbkgclusters,Double_t meanarea);
72 Double_t RhoRC(TClonesArray* fbkgclustersRC);
fb10c4b8 73 void ResetOutJets();
1c21a0e7 74 void PrintAODContents();
fb10c4b8 75
76 AliAODEvent *fAODOut; // ! where we take the jets from and they are modified
77 AliAODEvent *fAODIn; // ! where we may take the background from, only in case we do not find it in the output
78 AliAODExtension *fAODExtension; // ! where we take the jets from can be input or output AOD
79 TObjArray *fJBArray; // Array that stores the name of all jet branches to be subtracted
80 TString fBackgroundBranch; // name of the branch used for background subtraction
81 //
82 TString fNonStdFile; // The optional name of the output file the non-std brnach is written to
83 TString fReplaceString1; // To construct the new output name
84 TString fReplaceString2; // To construct the new output name
85 Int_t fSubtraction; // Parameter for subtraction mode
86 TList *fInJetArrayList; //! transient list to make ease the handling of input jets
87 TList *fOutJetArrayList; //! transient list to make ease the reset of output jets
d73e1768 88
89 TH2F* fh2CentvsRho; //! centrality vs background density
90 TH2F* fh2CentvsSigma; //! centrality vs background sigma
91 TH2F* fh2ShiftEta; //! extended correction Eta
92 TH2F* fh2ShiftPhi; //! extended correction Phi
93 TH2F* fh2ShiftEtaLeading; //! extended correction Eta leading jet
94 TH2F* fh2ShiftPhiLeading; //! extended correction Phi leading jet
95
96
fb10c4b8 97 TList *fHistList; //! the histograms output list
98
d73e1768 99 ClassDef(AliAnalysisTaskJetBackgroundSubtract, 4)
fb10c4b8 100};
101
102#endif