1 - Rename AliAnaMaker and AliAnaBaseClass to AliAnaPartCorrMaker and AliAnaPartCorrB...
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisGammaJetLCCorrelation.C
CommitLineData
bc636d26 1/* $Id: $ */
2
3//------------------------------------
4// Configuration macro example:
5//
6// Do prompt photon - jet leading in cone correlation analysis
7//
8// Author : Gustavo Conesa Balbastre (INFN-LNF)
9//------------------------------------
10
c90ac396 11AliAnaPartCorrMaker* ConfigAnalysis()
bc636d26 12{
13 //
14 // Configuration goes here
15 //
16 printf("======================== \n");
17 printf("ConfigAnalysis() \n");
18 printf("======================== \n");
19
20
21 //Detector Fidutial Cuts
22 AliFidutialCut * fidCut = new AliFidutialCut();
23 fidCut->DoCTSFidutialCut(kTRUE) ;
24 fidCut->DoEMCALFidutialCut(kTRUE) ;
25 fidCut->DoPHOSFidutialCut(kTRUE) ;
26
27 fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
28 fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
29 fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
30
31 fidCut->Print("");
32
33 //-----------------------------------------------------------
34 // Reader
35 //-----------------------------------------------------------
36 AliCaloTrackReader *reader = new AliCaloTrackESDReader();
37 reader->SetDebug(-1);
38
39 //Switch on or off the detectors information that you want
40 reader->SwitchOnEMCAL();
41 reader->SwitchOnCTS();
42 reader->SwitchOnPHOS();
43 reader->SwitchOffEMCALCells();
44 reader->SwitchOffPHOSCells();
45
46
47 //Min particle pT
48 reader->SetEMCALPtMin(0.5);
49 reader->SetPHOSPtMin(0.5);
50 reader->SetCTSPtMin(0.2);
51
52 reader->SetFidutialCut(fidCut);
53 reader->Print("");
54
55
56 //---------------------------------------------------------------------
57 // Analysis algorithm
58 //---------------------------------------------------------------------
59
60 //Detector Fidutial Cuts for analysis part
61 AliFidutialCut * fidCut2 = new AliFidutialCut();
62 fidCut2->DoCTSFidutialCut(kFALSE) ;
63 fidCut2->DoEMCALFidutialCut(kTRUE) ;
64 fidCut2->DoPHOSFidutialCut(kFALSE) ;
65
66 fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
67 fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
68 fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
69 fidCut2->Print("");
70
71 AliCaloPID * pid = new AliCaloPID();
72 // use selection with simple weights
73 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
74 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
75
76 pid->Print("");
77
78 AliIsolationCut * ic = new AliIsolationCut();
79 ic->SetConeSize(0.4);
80 ic->SetPtThreshold(1.);
81 ic->SetICMethod(AliIsolationCut::kPtThresIC);
82 ic->Print("");
83
84 //Photon Analysis
85 AliAnaGammaDirect *ana = new AliAnaGammaDirect();
86 ana->SetDebug(-1);
87 ana->SetMinPt(5.);
88 ana->SetCaloPID(pid);
89 ana->SetFidutialCut(fidCut2);
90 ana->SetIsolationCut(ic) ;
91 ana->SetDetector("PHOS");
92 ana->SwitchOnIsolation();
93 ana->SwitchOnCaloPID();
94 ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
95 ana->SwitchOffFidutialCut();
96 ana->SwitchOffInvariantMass();
97 ana->SwitchOffDataMC() ;
98
99 ana->Print("");
100
101 //Photon hadron correlation
102 AliAnaParticleJetLeadingConeCorrelation *ana2 = new AliAnaParticleJetLeadingConeCorrelation();
103 ana2->SetDebug(-1);
104 ana2->SwitchOnCaloPID();
105 ana2->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
106 ana2->SwitchOffFidutialCut();
107 ana2->SwitchOffJetsOnlyInCTS();
108 ana2->SwitchOffJetsRecalculation();
109 //Analysis cuts for leading particle selection
110 ana2->SetDeltaPhiCutRange(1.5,4.5); //Back-Leading particle angular cut
111 ana2->SetLeadingRatioCutRange(0.,3);//Cut for the momentum of leading
112 //Analysis cuts for jet selection
113 ana2->SetppCollisions(); //Jet particles Pt threshold for different collisions
114 ana2->SetCone(0.7); //Jet cone size
115 ana2->SetJetPtThreshold(0.2); //Jet particle threshold
116 ana2->SetJetRatioCutRange(0.7, 1.3);//Only if SwitchOffJetsOnlyInCTS(); and SetJetSelectionMode(2)
117 ana2->SetJetCTSRatioCutRange(0.3,1.3); //Only if SwitchOnJetsOnlyInCTS(); and SetJetSelectionMode(2)
118
119 ana2->Print("");
120 //---------------------------------------------------------------------
121 // Set analysis algorithm and reader
122 //---------------------------------------------------------------------
c90ac396 123 maker = new AliAnaPartCorrMaker();
bc636d26 124 maker->SetReader(reader);//pointer to reader
125 maker->AddAnalysis(ana,0);
126 maker->AddAnalysis(ana2,1);
127 maker->SetAODBranchName("PhotonJetLCCorrelation");
128 maker->SetAnaDebug(-1) ;
129 maker->SwitchOnHistogramsMaker() ;
130 //maker->SwitchOffHistogramsMaker() ;
131 maker->SwitchOnAODsMaker() ;
132 //maker->SwitchOffAODsMaker() ;
133
134 maker->Print("");
135 //
136 printf("======================== \n");
137 printf("END ConfigAnalysis() \n");
138 printf("======================== \n");
139 return maker ;
140}
141