]>
Commit | Line | Data |
---|---|---|
3e0577a2 | 1 | /* $Id: $ */ |
2 | /* $Log$ */ | |
3 | ||
4 | //------------------------------------ | |
5 | // Configuration macro example: | |
6 | // | |
7 | // Do photon identification analysis with ESDs | |
8 | // in PHOS, after, pi0 identification with Invariant mass. | |
9 | // For EMCAL, change PHOS by EMCAL where necessary | |
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(kTRUE) ; | |
29 | ||
30 | //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.); | |
31 | //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.); | |
32 | fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.); | |
33 | ||
34 | fidCut->Print(""); | |
35 | ||
36 | ||
37 | //----------------------------------------------------------- | |
38 | // Reader | |
39 | //----------------------------------------------------------- | |
40 | AliCaloTrackESDReader *reader = new AliCaloTrackESDReader(); | |
41 | reader->SetDebug(-1);//10 for lots of messages | |
42 | ||
43 | //Switch on or off the detectors information that you want | |
44 | reader->SwitchOnEMCAL(); | |
45 | reader->SwitchOnCTS(); | |
46 | reader->SwitchOnPHOS(); | |
47 | ||
48 | //Min particle pT | |
49 | //reader->SetEMCALPtMin(0.5); | |
50 | reader->SetPHOSPtMin(0.5); | |
51 | //reader->SetCTSPtMin(0.2); | |
52 | ||
53 | reader->SetFidutialCut(fidCut); | |
54 | reader->Print(""); | |
55 | ||
56 | ||
57 | //--------------------------------------------------------------------- | |
58 | // Analysis algorithm | |
59 | //--------------------------------------------------------------------- | |
60 | ||
61 | AliCaloPID * pid = new AliCaloPID(); | |
62 | // use selection with simple weights | |
63 | pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7); | |
64 | // use more complicated selection, particle weight depending on cluster energy | |
65 | // pid->UsePHOSPIDWeightFormula(kTRUE); | |
66 | // 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))"); | |
67 | // 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))"); | |
68 | // pid->SetPHOSPhotonWeightFormula(photonF); | |
69 | // pid->SetPHOSPi0WeightFormula(pi0F); | |
70 | ||
71 | pid->SetDispersionCut(1.5); | |
72 | pid->SetTOFCut(5.e-9); | |
73 | pid->SetDebug(-1); | |
74 | pid->Print(""); | |
75 | ||
76 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
77 | anaphoton->SetDebug(-1); //10 for lots of messages | |
78 | anaphoton->SetMinPt(1); | |
79 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); | |
80 | anaphoton->SetCaloPID(pid); | |
81 | //anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level | |
82 | anaphoton->SetCalorimeter("PHOS"); | |
83 | anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
84 | anaphoton->SwitchOffCaloPID(); | |
85 | anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
86 | anaphoton->SwitchOffFidutialCut(); | |
87 | anaphoton->SetOutputAODName("Photons"); | |
88 | anaphoton->SetOutputAODClassName("AliAODPWG4Particle"); | |
89 | //Set Histrograms bins and ranges | |
90 | // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ; | |
91 | // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
92 | // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; anaphoton->Print(""); | |
93 | ||
94 | //Detector Fidutial Cuts | |
95 | AliFidutialCut * fidCut2 = new AliFidutialCut(); | |
96 | fidCut2->DoPHOSFidutialCut(kTRUE) ; | |
97 | fidCut2->SetSimplePHOSFidutialCut(0.12,220.,320.); | |
98 | ||
99 | fidCut->Print(""); | |
100 | ||
101 | AliAnaPi0 *anapi0 = new AliAnaPi0(); | |
102 | anapi0->SetDebug(-1);//10 for lots of messages | |
103 | anapi0->SetInputAODName("Photons"); | |
104 | anapi0->SetCaloPID(pid); | |
105 | // anapi0->SetNCentrBin(5); //number of bins in centrality | |
106 | // anapi0->SetNZvertBin(5); //number of bins for vertex position | |
107 | // anapi0->SetNRPBin(6); //number of bins in reaction plain | |
108 | // anapi0->SetNMaxEvMix(20);//Maximal number of events for mixing | |
109 | anapi0->SetCalorimeter("PHOS"); | |
110 | anapi0->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level. Not used if real geometry | |
111 | anapi0->SwitchOnFidutialCut(); | |
112 | anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
113 | anapi0->Print(""); | |
114 | ||
115 | //--------------------------------------------------------------------- | |
116 | // Set analysis algorithm and reader | |
117 | //--------------------------------------------------------------------- | |
118 | maker = new AliAnaPartCorrMaker(); | |
119 | maker->SetReader(reader);//pointer to reader | |
120 | maker->AddAnalysis(anaphoton,0); | |
121 | maker->AddAnalysis(anapi0,1); | |
122 | maker->SetAnaDebug(-1) ; | |
123 | maker->SwitchOnHistogramsMaker() ; | |
124 | maker->SwitchOnAODsMaker() ; | |
125 | ||
126 | maker->Print(""); | |
127 | // | |
128 | printf("======================== \n"); | |
129 | printf("END ConfigAnalysis() \n"); | |
130 | printf("======================== \n"); | |
131 | return maker ; | |
132 | } |