]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/electrons/ConfigJetAnalysisFastJet.C
Reader: Add option to remove or not event with primary vertex not reconstructed
[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
d4df5eeb 24 //Alternatively, select input via anaInputData environment variable.\r
25 if (gSystem->Getenv("anaInputData")){\r
26 TString kInputData = gSystem->Getenv("anaInputData");\r
27 if( kInputData == "AOD" ){\r
28 kInputIsESD = kFALSE;\r
29 kFollowsFilter = kFALSE;\r
30 }\r
31 }\r
b21a4af6 32\r
33 // Define the grids\r
34 AliJetGrid *grid = new AliJetGrid(419,119,0.,2*TMath::Pi(),-0.9,0.9); \r
35 grid->SetGridType(1);\r
36 grid->InitParams(80.*TMath::Pi()/180,190.*TMath::Pi()/180,-0.7,0.7); \r
37 grid->SetMatrixIndexes();\r
38 grid->SetIndexIJ();\r
39 AliJetGrid *grid2 = new AliJetGrid(131,95,80.*TMath::Pi()/180.,190.*TMath::Pi()/180.,-0.7,0.7); \r
40 grid2->SetGridType(0);\r
41 grid2->SetMatrixIndexes();\r
42 grid2->SetIndexIJ();\r
43\r
44 // Define reader header\r
45 if(kInputIsESD && !kFollowsFilter) AliJetESDReaderHeader *jrh = new AliJetESDReaderHeader();\r
46 else AliJetAODReaderHeader *jrh = new AliJetAODReaderHeader();\r
47 jrh->SetComment("Testing");\r
48 if(kInputIsESD && !kFollowsFilter) jrh->SetReadSignalOnly(kFALSE);\r
49\r
50 // Detector options: 0 = Charged particles only (MomentumArray)\r
51 // 1 = Charged particles only (UnitArray)\r
52 // 2 = Neutral cells only (UnitArray)\r
53 // 3 = Charged particles + neutral cells (UnitArray)\r
54 jrh->SetDetector(3);\r
55 //jrh->SetDebug(-1);\r
56 //jrh->SetFiducialEta(-0.7,0.7);\r
57 //jrh->SetFiducialPhi(80.*TMath::Pi()/180,190.*TMath::Pi()/180);\r
58 jrh->SetPtCut(0.1);\r
59 jrh->SetFiducialEta(-0.9,0.9); //fiducial range used by AliJetFillUnitArrayTracks\r
60 jrh->SetFiducialPhi(0,2*TMath::Pi()); //fiducial range used by AliJetFillUnitArrayTracks\r
61 \r
62 // Define reader and set its header\r
63 if(kInputIsESD && !kFollowsFilter) AliJetESDReader *er = new AliJetESDReader();\r
64 else AliJetAODReader *er = new AliJetAODReader();\r
65 er->SetReaderHeader(jrh);\r
66 er->SetTPCGrid(grid);\r
67 er->SetEMCalGrid(grid2);\r
68 er->SetApplyMIPCorrection(kFALSE);\r
f0dd3c67 69 //hadronic correction\r
70 er->SetApplyFractionHadronicCorrection(kTRUE);\r
71 er->SetFractionHadronicCorrection(1.0);\r
b21a4af6 72\r
73 // Define jet header\r
74 AliFastJetHeaderV1 *jh=new AliFastJetHeaderV1();\r
75 Double_t R=0.4;\r
76 Double_t Rbkg=0.2;\r
77\r
78 // AliFastJetHeaderV1 *jh=new AliFastJetHeaderV1();\r
79 jh->SetComment("Fast jet code with default parameters");\r
80 //jh->SetDebug(-1);\r
81 //jh->SetBGMode(1); //Do BG Subtraction\r
82 jh->SetBGMode(0); //No BG Subtraction. Store AOD track refs.\r
83 jh->SetRparam(R); // setup parameters\r
84 jh->SetRparamBkg(Rbkg); // setup parameters\r
85 jh->SetPtMin(0.2);\r
86 //jh->SetGhostEtaMax(0.9);\r
87 jh->SetGhostArea(0.01);\r
88 jh->SetGhostEtaMax(0.7);//used to set the rap_min and rap_max, that are then used by FJ\r
89 jh->SetPhiRange(80.*TMath::Pi()/180+R,190.*TMath::Pi()/180-R);//used in AliFastJetFinder for the range\r
90\r
91 // Define jet finder. Set its header and reader\r
92 jetFinder = new AliFastJetFinder();\r
93 jetFinder->SetJetHeader(jh);\r
94 jetFinder->SetJetReader(er);\r
95 //jetFinder->SetPlotMode(kTRUE);\r
96\r
97 printf("============================== \n");\r
98 printf("END ConfigJetAnalysisFastJet() \n");\r
99 printf("============================== \n");\r
100 \r
101 return jetFinder;\r
102}\r