4 //------------------------------------
5 // Configuration macro example:
7 // Do prompt photon - hadron correlation analysis with ESDs
8 // First find photons with AliAnaPhoton, then
9 // isolate them with AliAnaParticleIsolation and finally correlate
10 // them with AliAnaParticleHadronCorrelation
12 // Author : Gustavo Conesa Balbastre (INFN-LNF)
13 //------------------------------------
15 AliAnaPartCorrMaker* ConfigAnalysis()
18 // Configuration goes here
20 printf("======================== \n");
21 printf("ConfigAnalysis() \n");
22 printf("======================== \n");
25 //Detector Fidutial Cuts
26 AliFidutialCut * fidCut = new AliFidutialCut();
27 fidCut->DoCTSFidutialCut(kTRUE) ;
28 fidCut->DoEMCALFidutialCut(kTRUE) ;
29 fidCut->DoPHOSFidutialCut(kTRUE) ;
31 fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
32 fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
33 fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
37 //-----------------------------------------------------------
39 //-----------------------------------------------------------
40 AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
43 //Switch on or off the detectors information that you want
44 reader->SwitchOnEMCAL();
45 reader->SwitchOnCTS();
46 reader->SwitchOnPHOS();
47 reader->SwitchOffEMCALCells();
48 reader->SwitchOffPHOSCells();
52 reader->SetEMCALPtMin(0.5);
53 reader->SetPHOSPtMin(0.5);
54 reader->SetCTSPtMin(0.2);
56 reader->SetFidutialCut(fidCut);
60 //---------------------------------------------------------------------
62 //---------------------------------------------------------------------
63 //<<<< first analysis >>> select the photons
64 //Detector Fidutial Cuts for analysis part
65 AliFidutialCut * fidCut2 = new AliFidutialCut();
66 fidCut2->DoCTSFidutialCut(kFALSE) ;
67 fidCut2->DoEMCALFidutialCut(kTRUE) ;
68 fidCut2->DoPHOSFidutialCut(kFALSE) ;
70 fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
71 fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
72 fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
75 AliCaloPID * pid = new AliCaloPID();
76 // use selection with simple weights
77 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
78 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
83 AliAnaPhoton *anaphoton = new AliAnaPhoton();
84 anaphoton->SetDebug(-1); //10 for lots of messages
85 anaphoton->SetMinPt(0.2);
86 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
87 anaphoton->SetCaloPID(pid);
88 anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
89 anaphoton->SetCalorimeter("PHOS");
90 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
91 anaphoton->SwitchOnCaloPID();
92 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
93 anaphoton->SwitchOnFidutialCut();
94 anaphoton->SetOutputAODName("Photons");
95 anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
96 //Set Histrograms bins and ranges
97 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
98 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
99 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
100 anaphoton->Print("");
102 // >>>> Second Analysis <<<< Isolate the photons
103 AliIsolationCut * ic = new AliIsolationCut();
104 ic->SetConeSize(0.5);
105 ic->SetPtThreshold(1.);
106 ic->SetICMethod(AliIsolationCut::kPtThresIC);
109 AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
110 anaisol->SetDebug(-1);
111 anaisol->SetMinPt(5);
112 anaisol->SetInputAODName("Photons");
113 anaisol->SetCalorimeter("PHOS");
114 anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
115 //Select clusters with no pair, if both clusters with pi0 mass
116 anaisol->SwitchOffInvariantMass();
117 //anaisol->SetNeutralMesonSelection(nms);
119 anaisol->SetIsolationCut(ic);
120 //Do or not do isolation with previously produced AODs.
121 //No effect if use of SwitchOnSeveralIsolation()
122 anaisol->SwitchOffReIsolation();
124 anaisol->SwitchOffSeveralIsolation() ;
128 //<<<Third analysis>>> Isolated Photon- hadron correlation
129 AliAnaParticleHadronCorrelation *anacorr = new AliAnaParticleHadronCorrelation();
130 anacorr->SetInputAODName("Photons");
131 anacorr->SetDebug(-1);
132 anacorr->SetCaloPID(pid);
133 anacorr->SwitchOnCaloPID();
134 anacorr->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
135 anacorr->SwitchOffFidutialCut();
136 anacorr->SetPtCutRange(1,100);
137 anacorr->SetDeltaPhiCutRange(1.5,4.5);
138 //Set Histrograms bins and ranges
139 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
140 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
141 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
144 //---------------------------------------------------------------------
145 // Set analysis algorithm and reader
146 //---------------------------------------------------------------------
147 maker = new AliAnaPartCorrMaker();
148 maker->SetReader(reader);//pointer to reader
149 maker->AddAnalysis(anaphoton,0);
150 maker->AddAnalysis(anaisol,1);
151 maker->AddAnalysis(anacorr,2);
152 maker->SetAnaDebug(-1) ;
153 maker->SwitchOnHistogramsMaker() ;
154 maker->SwitchOnAODsMaker() ;
158 printf("======================== \n");
159 printf("END ConfigAnalysis() \n");
160 printf("======================== \n");