]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/macros/ConfigAnalysisGammaPartonCorrelation.C
Macro to display the output of SDD task in QA-train
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisGammaPartonCorrelation.C
1 /* $Id: $ */
2
3 //------------------------------------
4 // Configuration macro example:
5 //
6 // Do prompt photon - parton correlation analysis with ESDs
7 // First find photons with AliAnaPhoton, then
8 // isolate them with AliAnaParticleIsolation and finally correlate           
9 // them with AliAnaParticlePartonCorrelation
10 //
11 // Author : Gustavo Conesa Balbastre (INFN-LNF)
12 //------------------------------------
13
14 AliAnaPartCorrMaker*  ConfigAnalysis()
15 {
16         //
17         // Configuration goes here
18         // 
19         printf("======================== \n");
20         printf("ConfigAnalysis() \n");
21         printf("======================== \n");
22         
23         
24         //Detector Fiducial Cuts
25         AliFiducialCut * fidCut = new AliFiducialCut();
26         fidCut->DoCTSFiducialCut(kTRUE) ;
27         fidCut->DoEMCALFiducialCut(kTRUE) ;
28         fidCut->DoPHOSFiducialCut(kTRUE) ;
29         
30         fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.);
31         fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.);
32         fidCut->SetSimplePHOSFiducialCut(0.13,220.,320.);
33         
34         fidCut->Print("");
35         
36         //-----------------------------------------------------------  
37         // Reader
38         //-----------------------------------------------------------
39         AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
40         reader->SetDebug(-1);
41         
42         //Switch on or off the detectors information that you want
43         reader->SwitchOnEMCAL();
44         reader->SwitchOnCTS();
45         reader->SwitchOnPHOS();
46         
47         //Min particle pT
48         reader->SetEMCALPtMin(0.5); 
49         reader->SetPHOSPtMin(0.5);
50         reader->SetCTSPtMin(0.2);
51         
52         reader->SetFiducialCut(fidCut);
53         reader->Print("");
54         
55         
56         //---------------------------------------------------------------------
57         // Analysis algorithm
58         //---------------------------------------------------------------------
59         //<<<< first analysis >>> select the photons
60         //Detector Fiducial Cuts for analysis part
61         AliFiducialCut * fidCut2 = new AliFiducialCut();
62         fidCut2->DoCTSFiducialCut(kFALSE) ;
63         fidCut2->DoEMCALFiducialCut(kTRUE) ;
64         fidCut2->DoPHOSFiducialCut(kFALSE) ;
65         
66         fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.);
67         fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.);
68         fidCut2->SetSimplePHOSFiducialCut(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         AliAnaPhoton *anaphoton = new AliAnaPhoton();
79         anaphoton->SetDebug(-1); //10 for lots of messages
80         anaphoton->SetMinPt(0.2);
81         anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
82         anaphoton->SetCaloPID(pid);
83         anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level
84         anaphoton->SetCalorimeter("PHOS");
85         anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
86         anaphoton->SwitchOnCaloPID();
87         anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
88         anaphoton->SwitchOnFiducialCut();
89         anaphoton->SetOutputAODName("Photons");
90         anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
91         //Set Histrograms bins and ranges
92         //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
93         //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
94         //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
95         anaphoton->Print("");
96         
97         // >>>> Second Analysis <<<< Isolate the photons
98         AliIsolationCut * ic = new AliIsolationCut();
99         ic->SetConeSize(0.5);
100         ic->SetPtThreshold(1.);
101         ic->SetICMethod(AliIsolationCut::kPtThresIC);
102         ic->Print("");
103         
104         AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
105         anaisol->SetDebug(-1);
106         anaisol->SetMinPt(5);
107         anaisol->SetInputAODName("Photons");
108         anaisol->SetCalorimeter("PHOS");
109         anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
110         //Select clusters with no pair, if both clusters with pi0 mass
111         anaisol->SwitchOffInvariantMass();
112         //anaisol->SetNeutralMesonSelection(nms);
113         //Do isolation cut
114         anaisol->SetIsolationCut(ic);   
115         //Do or not do isolation with previously produced AODs.
116         //No effect if use of SwitchOnSeveralIsolation()
117         anaisol->SwitchOffReIsolation();
118         //Multiple IC
119         anaisol->SwitchOffSeveralIsolation() ;
120         
121         anaisol->Print("");
122         
123         //<<<Third analysis>>> Isolated Photon- parton correlation 
124         AliAnaParticlePartonCorrelation *anacorr = new AliAnaParticlePartonCorrelation();
125         anacorr->SetInputAODName("Photons");
126         anacorr->SetDebug(-1);
127         
128         anacorr->Print("");
129         
130         //---------------------------------------------------------------------
131         // Set  analysis algorithm and reader
132         //---------------------------------------------------------------------
133         maker = new AliAnaPartCorrMaker();
134         maker->SetReader(reader);//pointer to reader
135         maker->AddAnalysis(anaphoton,0);
136         maker->AddAnalysis(anaisol,1);
137         maker->AddAnalysis(anacorr,2);
138         maker->SetAnaDebug(-1)  ;
139         maker->SwitchOnHistogramsMaker()  ;
140         //maker->SwitchOffHistogramsMaker() ;  
141         maker->SwitchOnAODsMaker()  ;
142         //maker->SwitchOffAODsMaker() ; 
143         
144         maker->Print("");
145         //
146         printf("======================== \n");
147         printf("END ConfigAnalysis() \n");
148         printf("======================== \n");
149         return maker ;
150 }
151