]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/macros/ConfigAnalysisPi0EbE.C
technical changes:
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisPi0EbE.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 // For PHOS, change EMCAL by PHOS where necessary
11 //
12 // Author : Gustavo Conesa Balbastre (INFN-LNF)
13 //------------------------------------
14
15 AliAnaPartCorrMaker*  ConfigAnalysis()
16 {
17         //
18         // Configuration goes here
19         // 
20         printf("======================== \n");
21         printf("ConfigAnalysis() \n");
22         printf("======================== \n");
23         
24         
25         //Detector Fidutial Cuts
26         AliFidutialCut * fidCut = new AliFidutialCut();
27         fidCut->DoCTSFidutialCut(kFALSE) ;
28         fidCut->DoEMCALFidutialCut(kFALSE) ;
29         fidCut->DoPHOSFidutialCut(kTRUE) ;
30         
31         //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
32         //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
33         fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
34         
35         fidCut->Print("");
36         
37         
38         //-----------------------------------------------------------  
39         // Reader
40         //-----------------------------------------------------------
41         AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
42         reader->SetDebug(-1);//10 for lots of messages
43         
44         //Switch on or off the detectors information that you want
45         reader->SwitchOnEMCAL();
46         reader->SwitchOnCTS();
47         reader->SwitchOffPHOS();
48         
49         //Min particle pT
50         //reader->SetEMCALPtMin(0.5); 
51         reader->SetPHOSPtMin(0.5);
52         //reader->SetCTSPtMin(0.2);
53         
54         reader->SetFidutialCut(fidCut);
55         reader->Print("");
56         
57         
58         //---------------------------------------------------------------------
59         // Analysis algorithm
60         //---------------------------------------------------------------------
61         
62         AliCaloPID * pid = new AliCaloPID();
63         // use selection with simple weights
64         pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
65         
66         pid->SetDispersionCut(1.5);
67         pid->SetTOFCut(5.e-9);
68         pid->SetDebug(-1);
69         pid->Print("");
70
71         AliAnaPhoton *anaphoton = new AliAnaPhoton();
72         anaphoton->SetDebug(-1); //10 for lots of messages
73         anaphoton->SetMinPt(1);
74         anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
75         anaphoton->SetCaloPID(pid);
76         //anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
77         anaphoton->SetCalorimeter("EMCAL");
78         anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
79         anaphoton->SwitchOffCaloPID();
80         anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
81         anaphoton->SwitchOffFidutialCut();
82         anaphoton->SetOutputAODName("Photons");
83         anaphoton->SetOutputAODClassName("AliAODPWG4Particle");
84         //Set Histrograms bins and ranges
85 //      anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
86 //      anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
87 //      anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;   anaphoton->Print("");
88
89         //Detector Fidutial Cuts
90         AliFidutialCut * fidCut2 = new AliFidutialCut();
91         fidCut2->DoPHOSFidutialCut(kTRUE) ;
92         fidCut2->SetSimplePHOSFidutialCut(0.12,220.,320.);
93         
94         fidCut->Print("");
95         
96         // >>> Second Analysis <<<
97         
98         AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
99         nms->SetInvMassCutRange(0.10, 0.17)     ;
100         nms->KeepNeutralMesonSelectionHistos(kTRUE);
101         //Set Histrograms bins and ranges
102 //      nms->SetHistoERangeAndNBins(0, 50, 100) ;
103 //      nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
104 //      nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
105 //      nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ;  
106
107         AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
108         anapi0->SetDebug(-1);//10 for lots of messages
109         anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
110         anapi0->SetInputAODName("Photons");
111         anapi0->SetOutputAODName("Pi0s");
112         anapi0->SetOutputAODClassName("AliAODPWG4Particle");
113         anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
114         anapi0->SetNeutralMesonSelection(nms);
115         //Set Histrograms bins and ranges
116 //      anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
117 //      anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
118 //      anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
119         anapi0->Print("");
120         
121         //---------------------------------------------------------------------
122         // Set  analysis algorithm and reader
123         //---------------------------------------------------------------------
124         maker = new AliAnaPartCorrMaker();
125         maker->SetReader(reader);//pointer to reader
126         maker->AddAnalysis(anaphoton,0);
127         maker->AddAnalysis(anapi0,1);
128         maker->SetAnaDebug(-1)  ;
129         maker->SwitchOnHistogramsMaker()  ;
130         maker->SwitchOnAODsMaker()  ;
131         
132         maker->Print("");
133         //
134         printf("======================== \n");
135         printf("END ConfigAnalysis() \n");
136         printf("======================== \n");
137         return maker ;
138 }