]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/macros/ConfigAnalysisChargedParticles.C
Added the include to cstdlib in several places to avoid compilation problems with...
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisChargedParticles.C
1 /* $Id: $ */
2 /* $Log$ */
3
4 //------------------------------------
5 // Configuration macro example:
6 //
7 // Do some track selection, for input of correlation analysis.
8 //
9 // Author : Gustavo Conesa Balbastre (INFN-LNF)
10 //------------------------------------
11
12 AliAnaPartCorrMaker*  ConfigAnalysis()
13 {
14         //
15         // Configuration goes here
16         // 
17         printf("======================== \n");
18         printf("ConfigAnalysis() \n");
19         printf("======================== \n");
20         
21         
22         //Detector Fidutial Cuts
23         AliFidutialCut * fidCut = new AliFidutialCut();
24         fidCut->DoCTSFidutialCut(kTRUE) ;
25         fidCut->DoEMCALFidutialCut(kFALSE) ;
26         fidCut->DoPHOSFidutialCut(kFALSE) ;
27         
28         fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
29         fidCut->Print("");
30         
31         
32         //-----------------------------------------------------------  
33         // Reader
34         //-----------------------------------------------------------
35         AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
36         reader->SetDebug(-1);//10 for lots of messages
37         
38         //Switch on or off the detectors information that you want
39         reader->SwitchOffEMCAL();
40         reader->SwitchOffPHOS();
41         reader->SwitchOnCTS(); //We want only tracks
42         
43         //Min particle pT
44         reader->SetCTSPtMin(0.2);
45         
46         //Uncomment only with MCReader
47 //      TArrayI statusArray(1) ;
48 //      statusArray.SetAt(1,0); 
49 //      reader->AddStatusArray(statusArray)  ;
50 //      reader->SwitchOnStatusSelection() ;
51         
52         reader->SetFidutialCut(fidCut);
53
54         reader->Print("");
55         
56         
57         //---------------------------------------------------------------------
58         // Analysis algorithm
59         //---------------------------------------------------------------------
60
61         AliAnaChargedParticles *anatrack = new AliAnaChargedParticles();
62         anatrack->SetDebug(-1);//10 for lots of messages
63         anatrack->SetMinPt(5.);
64         anatrack->SetOutputAODName("Charged");
65         anatrack->SwitchOffFidutialCut();
66         anatrack->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
67         anatrack->SwitchOnDataMC() ;//Access MC stack and fill more histograms
68         //Set Histrograms bins and ranges
69 //      anatrack->SetHistoPtRangeAndNBins(0, 50, 100) ;
70 //      anatrack->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
71 //      anatrack->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
72         anatrack->Print("");
73         
74         //---------------------------------------------------------------------
75         // Set  analysis algorithm and reader
76         //---------------------------------------------------------------------
77         maker = new AliAnaPartCorrMaker();
78         maker->SetReader(reader);//pointer to reader
79         maker->AddAnalysis(anatrack,0);
80         maker->SetAnaDebug(-1)  ;
81         maker->SwitchOnHistogramsMaker()  ;
82         maker->SwitchOnAODsMaker()  ;
83         
84         maker->Print("");
85         //
86         printf("======================== \n");
87         printf("END ConfigAnalysis() \n");
88         printf("======================== \n");
89         return maker ;
90 }