automatic histogram scaling for AODs now available
[u/mrichter/AliRoot.git] / PWG4 / macros / electrons / ConfigJetAnalysisFastJet.C
CommitLineData
b21a4af6 1//------------------------------------\r
2// Configuration macro:\r
3//\r
4// Configure JETAN FastJet analysis.\r
5//\r
6// Modified by: K. Read\r
7//\r
8//------------------------------------\r
9\r
10AliJetFinder* ConfigJetAnalysis()\r
11{\r
12 //\r
13 // Configuration goes here\r
14 // \r
15 printf("========================== \n");\r
16 printf("ConfigJetAnalysisFastJet() \n");\r
17 printf("========================== \n");\r
18\r
19 Bool_t kInputIsESD = kTRUE; //uncomment for input ESD\r
ef2c838f 20 //Bool_t kInputIsESD = kFALSE; //uncomment for input AODs\r
b21a4af6 21 Bool_t kFollowsFilter = kTRUE; //uncomment if follows ESD filter task\r
ef2c838f 22 //Bool_t kFollowsFilter = kFALSE; //uncomment if no ESD filter task\r
b21a4af6 23\r
24\r
25 // Define the grids\r
26 AliJetGrid *grid = new AliJetGrid(419,119,0.,2*TMath::Pi(),-0.9,0.9); \r
27 grid->SetGridType(1);\r
28 grid->InitParams(80.*TMath::Pi()/180,190.*TMath::Pi()/180,-0.7,0.7); \r
29 grid->SetMatrixIndexes();\r
30 grid->SetIndexIJ();\r
31 AliJetGrid *grid2 = new AliJetGrid(131,95,80.*TMath::Pi()/180.,190.*TMath::Pi()/180.,-0.7,0.7); \r
32 grid2->SetGridType(0);\r
33 grid2->SetMatrixIndexes();\r
34 grid2->SetIndexIJ();\r
35\r
36 // Define reader header\r
37 if(kInputIsESD && !kFollowsFilter) AliJetESDReaderHeader *jrh = new AliJetESDReaderHeader();\r
38 else AliJetAODReaderHeader *jrh = new AliJetAODReaderHeader();\r
39 jrh->SetComment("Testing");\r
40 if(kInputIsESD && !kFollowsFilter) jrh->SetReadSignalOnly(kFALSE);\r
41\r
42 // Detector options: 0 = Charged particles only (MomentumArray)\r
43 // 1 = Charged particles only (UnitArray)\r
44 // 2 = Neutral cells only (UnitArray)\r
45 // 3 = Charged particles + neutral cells (UnitArray)\r
46 jrh->SetDetector(3);\r
47 //jrh->SetDebug(-1);\r
48 //jrh->SetFiducialEta(-0.7,0.7);\r
49 //jrh->SetFiducialPhi(80.*TMath::Pi()/180,190.*TMath::Pi()/180);\r
50 jrh->SetPtCut(0.1);\r
51 jrh->SetFiducialEta(-0.9,0.9); //fiducial range used by AliJetFillUnitArrayTracks\r
52 jrh->SetFiducialPhi(0,2*TMath::Pi()); //fiducial range used by AliJetFillUnitArrayTracks\r
53 \r
54 // Define reader and set its header\r
55 if(kInputIsESD && !kFollowsFilter) AliJetESDReader *er = new AliJetESDReader();\r
56 else AliJetAODReader *er = new AliJetAODReader();\r
57 er->SetReaderHeader(jrh);\r
58 er->SetTPCGrid(grid);\r
59 er->SetEMCalGrid(grid2);\r
60 er->SetApplyMIPCorrection(kFALSE);\r
61\r
62 // Define jet header\r
63 AliFastJetHeaderV1 *jh=new AliFastJetHeaderV1();\r
64 Double_t R=0.4;\r
65 Double_t Rbkg=0.2;\r
66\r
67 // AliFastJetHeaderV1 *jh=new AliFastJetHeaderV1();\r
68 jh->SetComment("Fast jet code with default parameters");\r
69 //jh->SetDebug(-1);\r
70 //jh->SetBGMode(1); //Do BG Subtraction\r
71 jh->SetBGMode(0); //No BG Subtraction. Store AOD track refs.\r
72 jh->SetRparam(R); // setup parameters\r
73 jh->SetRparamBkg(Rbkg); // setup parameters\r
74 jh->SetPtMin(0.2);\r
75 //jh->SetGhostEtaMax(0.9);\r
76 jh->SetGhostArea(0.01);\r
77 jh->SetGhostEtaMax(0.7);//used to set the rap_min and rap_max, that are then used by FJ\r
78 jh->SetPhiRange(80.*TMath::Pi()/180+R,190.*TMath::Pi()/180-R);//used in AliFastJetFinder for the range\r
79\r
80 // Define jet finder. Set its header and reader\r
81 jetFinder = new AliFastJetFinder();\r
82 jetFinder->SetJetHeader(jh);\r
83 jetFinder->SetJetReader(er);\r
84 //jetFinder->SetPlotMode(kTRUE);\r
85\r
86 printf("============================== \n");\r
87 printf("END ConfigJetAnalysisFastJet() \n");\r
88 printf("============================== \n");\r
89 \r
90 return jetFinder;\r
91}\r