]>
Commit | Line | Data |
---|---|---|
3e0577a2 | 1 | /* $Id: $ */ |
2 | /* $Log$ */ | |
3 | ||
4 | //------------------------------------ | |
5 | // Configuration macro example: | |
6 | // | |
591cc579 | 7 | // Do photon identification analysis with AODs |
8 | // Gamma in EMCAL. For PHOS clusters change | |
9 | // EMCAL by PHOS where necessary | |
3e0577a2 | 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 Fidutial Cuts | |
25 | AliFidutialCut * fidCut = new AliFidutialCut(); | |
26 | fidCut->DoCTSFidutialCut(kFALSE) ; | |
27 | fidCut->DoEMCALFidutialCut(kFALSE) ; | |
28 | fidCut->DoPHOSFidutialCut(kFALSE) ; | |
29 | ||
30 | //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.); | |
31 | //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.); | |
32 | //fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.); | |
33 | ||
34 | fidCut->Print(""); | |
35 | ||
36 | //----------------------------------------------------------- | |
37 | // Reader | |
38 | //----------------------------------------------------------- | |
591cc579 | 39 | AliCaloTrackAODReader *reader = new AliCaloTrackAODReader(); |
3e0577a2 | 40 | reader->SetDebug(-1); |
41 | ||
42 | //Switch on or off the detectors information that you want | |
591cc579 | 43 | reader->SwitchOnEMCAL(); |
3e0577a2 | 44 | reader->SwitchOffCTS(); |
591cc579 | 45 | reader->SwitchOffPHOS(); |
3e0577a2 | 46 | |
591cc579 | 47 | //Kine |
48 | reader->SwitchOffStack(); // On by default, remember to SwitchOnMCData() in analysis classes | |
49 | reader->SwitchOnAODMCParticles(); // Off by default, remember to SwitchOnMCData() in analysis classes | |
50 | ||
3e0577a2 | 51 | //Min particle pT |
591cc579 | 52 | reader->SetEMCALPtMin(0.5); |
53 | //reader->SetPHOSPtMin(0.5); | |
3e0577a2 | 54 | //reader->SetCTSPtMin(0.2); |
55 | ||
591cc579 | 56 | //In case of generating jet events (with PYTHIA), if pt hard bin is small |
57 | //reject events with large difference between ptHard and triggered jet | |
58 | //reader->SetPtHardAndJetPtComparison(kTRUE); | |
59 | ||
3e0577a2 | 60 | reader->SetFidutialCut(fidCut); |
591cc579 | 61 | |
62 | //Embedding/mixing/merging analysis with other events in another AOD file | |
63 | reader->SetSecondInputFileName("./aod.root"); | |
64 | //Standard event loop can have less events, start mixing at event N | |
65 | reader->SetSecondInputFirstEvent(0); | |
66 | ||
67 | // Analysis with tracks, select only tracks with | |
68 | // following bits | |
69 | ||
70 | // //We want tracks fitted in the detectors: | |
71 | // ULong_t status=AliAODTrack::kTPCrefit; | |
72 | // status|=AliAODTrack::kITSrefit; | |
73 | ||
74 | // We want tracks whose PID bit is set: | |
75 | // ULong_t status =AliAODTrack::kITSpid; | |
76 | // status|=AliAODTrack::kTPCpid; | |
77 | ||
78 | // reader->SetTrackStatus(status); | |
79 | ||
3e0577a2 | 80 | reader->Print(""); |
81 | ||
82 | ||
83 | //--------------------------------------------------------------------- | |
84 | // Analysis algorithm | |
85 | //--------------------------------------------------------------------- | |
86 | ||
87 | //Detector Fidutial Cuts for analysis part | |
88 | AliFidutialCut * fidCut2 = new AliFidutialCut(); | |
89 | fidCut2->DoCTSFidutialCut(kFALSE) ; | |
90 | fidCut2->DoEMCALFidutialCut(kFALSE) ; | |
91 | fidCut2->DoPHOSFidutialCut(kFALSE) ; | |
92 | ||
93 | //fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.); | |
94 | //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.); | |
95 | //fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.); | |
96 | ||
97 | fidCut2->Print(""); | |
98 | ||
99 | AliCaloPID * pid = new AliCaloPID(); | |
100 | // use selection with simple weights | |
591cc579 | 101 | //pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7); |
3e0577a2 | 102 | // use more complicated selection, particle weight depending on cluster energy |
103 | // pid->UsePHOSPIDWeightFormula(kTRUE); | |
104 | // TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))"); | |
105 | // TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))"); | |
106 | // pid->SetPHOSPhotonWeightFormula(photonF); | |
107 | // pid->SetPHOSPi0WeightFormula(pi0F); | |
591cc579 | 108 | //Check these cuts for EMCAL |
3e0577a2 | 109 | pid->SetDispersionCut(1.5); |
110 | pid->SetTOFCut(5.e-9); | |
111 | pid->SetDebug(-1); | |
112 | pid->Print(""); | |
113 | ||
114 | AliAnaPhoton *ana = new AliAnaPhoton(); | |
115 | ana->SetDebug(-1); | |
116 | ana->SetMinPt(5.); | |
117 | ana->SetMinDistanceToBadChannel(2, 4, 5); | |
118 | ana->SetCaloPID(pid); | |
119 | ana->SetFidutialCut(fidCut2); | |
591cc579 | 120 | ana->SetCalorimeter("EMCAL"); |
3e0577a2 | 121 | ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
122 | ana->SwitchOffCaloPID(); | |
123 | ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
a3aebfff | 124 | ana->SwitchOnTrackMatchRejection(); //Only in use when OnCaloPID |
3e0577a2 | 125 | ana->SwitchOffFidutialCut(); |
126 | ana->SetOutputAODName("Photons"); | |
127 | ana->SetOutputAODClassName("AliAODPWG4Particle"); | |
128 | //Set Histrograms bins and ranges | |
129 | // ana->SetHistoPtRangeAndNBins(0, 50, 100) ; | |
130 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
131 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
132 | ana->Print(""); | |
133 | ||
134 | //--------------------------------------------------------------------- | |
135 | // Set analysis algorithm and reader | |
136 | //--------------------------------------------------------------------- | |
137 | maker = new AliAnaPartCorrMaker(); | |
138 | maker->SetReader(reader);//pointer to reader | |
139 | maker->AddAnalysis(ana,0); | |
140 | maker->SetAnaDebug(-1) ; | |
141 | maker->SwitchOnHistogramsMaker() ; | |
142 | maker->SwitchOnAODsMaker() ; | |
143 | ||
144 | maker->Print(""); | |
145 | // | |
146 | printf("======================== \n"); | |
147 | printf("END ConfigAnalysis() \n"); | |
148 | printf("======================== \n"); | |
149 | return maker ; | |
150 | } |