]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/macros/ConfigAnalysisPi0EbEIsolated.C
Fix Coverity
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisPi0EbEIsolated.C
1 /* $Id: $ */
2 /* $Log$ */
3
4 //------------------------------------
5 // Configuration macro example:
6 //
7 // Do photon identification analysis with ESDs
8 // in EMCAL, after pi0 identification event by event
9 // in photon paris invariant mass and aperture angle widow.
10 // After, study the isolation of the selected pi0.
11 // For PHOS, change EMCAL by PHOS where necessary
12 // Do photon identification analysis with ESDs
13 //
14 // Author : Gustavo Conesa Balbastre (INFN-LNF)
15 //------------------------------------
16
17 AliAnaPartCorrMaker*  ConfigAnalysis()
18 {
19         //
20         // Configuration goes here
21         // 
22         printf("======================== \n");
23         printf("ConfigAnalysis() \n");
24         printf("======================== \n");
25         
26         
27         //Detector Fiducial Cuts
28         AliFiducialCut * fidCut = new AliFiducialCut();
29         fidCut->DoCTSFiducialCut(kFALSE) ;
30         fidCut->DoEMCALFiducialCut(kFALSE) ;
31         fidCut->DoPHOSFiducialCut(kTRUE) ;
32         
33         //fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.);
34         //fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.);
35         //fidCut->SetSimplePHOSFiducialCut(0.12,220.,320.);
36         
37         fidCut->Print("");
38         
39         //-----------------------------------------------------------  
40         // Reader
41         //-----------------------------------------------------------
42         AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
43         reader->SetDebug(-1);//10 for lots of messages
44         
45         //Switch on or off the detectors information that you want
46         reader->SwitchOnEMCAL();
47         reader->SwitchOnCTS();
48         reader->SwitchOffPHOS();
49         
50         //Min particle pT
51         reader->SetEMCALPtMin(0.5); 
52         //reader->SetPHOSPtMin(0.5);
53         reader->SetCTSPtMin(0.2);
54         
55         reader->SetFiducialCut(fidCut);
56         
57         //     //We want tracks fitted in the detectors:
58         //     ULong_t status=AliAODTrack::kTPCrefit;
59         //     status|=AliAODTrack::kITSrefit; //(default settings)
60         
61         //     We want tracks whose PID bit is set:
62         //     ULong_t status =AliAODTrack::kITSpid;
63         //     status|=AliAODTrack::kTPCpid;    
64         
65         //      reader->SetTrackStatus(status);
66         
67         //Remove the temporal AODs we create.   
68         reader->SwitchOnCleanStdAOD();  
69         
70         reader->Print("");
71         
72         
73         //---------------------------------------------------------------------
74         // Analysis algorithm
75         //---------------------------------------------------------------------
76         
77         AliCaloPID * pid = new AliCaloPID();
78         // use selection with simple weights
79         pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
80         pid->SetDispersionCut(1.5);
81         pid->SetTOFCut(5.e-9);
82         pid->SetDebug(-1);
83         pid->Print("");
84
85         AliAnaPhoton *anaphoton = new AliAnaPhoton();
86         anaphoton->SetDebug(-1); //10 for lots of messages
87         anaphoton->SetMinPt(1);
88         anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
89         anaphoton->SetCaloPID(pid);
90         //anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level
91         anaphoton->SetCalorimeter("EMCAL");
92         anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
93         anaphoton->SwitchOffCaloPID();
94         anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
95         anaphoton->SwitchOffFiducialCut();
96         anaphoton->SetOutputAODName("Photons");
97         anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
98         //Set Histrograms bins and ranges
99 //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
100 //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
101 //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
102         anaphoton->Print("");
103
104         // >>> Second Analysis <<<
105         
106         AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
107         nms->SetInvMassCutRange(0.10, 0.17)     ;
108         nms->KeepNeutralMesonSelectionHistos(kTRUE);
109         //Set Histrograms bins and ranges
110 //      nms->SetHistoERangeAndNBins(0, 50, 100) ;
111 //      nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
112 //      nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
113 //      nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ;  
114         
115         AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
116         anapi0->SetDebug(-1);//10 for lots of messages
117         anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
118         anapi0->SetInputAODName("Photons");
119         anapi0->SetOutputAODName("Pi0s");
120         anapi0->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
121         anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
122         anapi0->SetNeutralMesonSelection(nms);
123         //Set Histrograms bins and ranges
124 //      anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
125 //      anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
126 //      anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
127         anapi0->Print("");
128         
129         // >>>> Third Analysis <<<<
130         AliIsolationCut * ic = new AliIsolationCut();
131         ic->SetConeSize(0.4);
132         ic->SetPtThreshold(1.);
133         ic->SetICMethod(AliIsolationCut::kPtThresIC);
134         ic->Print("");
135         
136         AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
137         anaisol->SetDebug(-1);
138         anaisol->SetInputAODName("Pi0s");
139         anaisol->SetMinPt(5);
140         anaisol->SetCalorimeter("EMCAL"); //Must be the same calorimeter where pi0/photon falls
141         anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
142         //Select clusters with no pair, if both clusters with pi0 mass
143         anaisol->SwitchOffInvariantMass(); //It is a pi0 not needed
144         //anaisol->SetNeutralMesonSelection(nms);
145         //Do isolation cut
146         anaisol->SetIsolationCut(ic);   
147         //Do or not do isolation with previously produced AODs.
148         //No effect if use of SwitchOnSeveralIsolation()
149         anaisol->SwitchOffReIsolation();
150         
151         //Multiple IC
152         anaisol->SwitchOffSeveralIsolation() ;
153         //Make sure that the initial isolation cut parameters set in AliIsolationCut 
154         //pointer are relativelly open.
155 //      anaisol->SetNCones(2) ;     
156 //      anaisol->SetNPtThresFrac(2) ;     
157 //      anaisol->SetConeSizes(0, 0.3) ;         anaisol->SetConeSizes(1, 0.4) ;    
158 //      anaisol->SetPtThresholds(0, 0.5) ;      anaisol->SetPtThresholds(1, 1.) ;   
159 //      anaisol->SetPtFractions(0, 1.) ;        anaisol->SetPtFractions(1, 1.5) ;  
160         //Set Histrograms bins and ranges
161 //      anaisol->SetHistoPtRangeAndNBins(0, 50, 100) ;
162 //      anaisol->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
163 //      anaisol->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;     
164         anaisol->SetHistoPtSumRangeAndNBins(0, 10, 100) ;
165         anaisol->SetHistoPtInConeRangeAndNBins(0, 50, 100) ;    
166         anaisol->Print("");
167         
168         
169         //---------------------------------------------------------------------
170         // Set  analysis algorithm and reader
171         //---------------------------------------------------------------------
172         maker = new AliAnaPartCorrMaker();
173         maker->SetReader(reader);//pointer to reader
174         maker->AddAnalysis(anaphoton,0);
175         maker->AddAnalysis(anapi0,1);
176         maker->AddAnalysis(anaisol,2);
177         maker->SetAnaDebug(-1)  ;
178         maker->SwitchOnHistogramsMaker()  ;
179         maker->SwitchOnAODsMaker()  ;
180         
181         maker->Print("");
182         //
183         printf("======================== \n");
184         printf("END ConfigAnalysis() \n");
185         printf("======================== \n");
186         return maker ;
187 }