4 //------------------------------------
5 // Configuration macro example:
7 // Do prompt photon analysis with ESDs
9 // for EMCAL, PHOS by EMCAL where necessary
11 // Author : Gustavo Conesa Balbastre (INFN-LNF)
12 //------------------------------------
14 AliAnaMaker* ConfigAnalysis()
17 // Configuration goes here
19 printf("======================== \n");
20 printf("ConfigAnalysis() \n");
21 printf("======================== \n");
24 //Detector Fidutial Cuts
25 AliFidutialCut * fidCut = new AliFidutialCut();
26 fidCut->DoCTSFidutialCut(kTRUE) ;
27 //fidCut->DoEMCALFidutialCut(kFALSE) ;
28 fidCut->DoPHOSFidutialCut(kTRUE) ;
30 fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
31 f//idCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
32 fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
36 //-----------------------------------------------------------
38 //-----------------------------------------------------------
39 AliCaloTrackReader *reader = new AliCaloTrackESDReader();
42 //Switch on or off the detectors information that you want
43 reader->SwitchOffEMCAL();
44 reader->SwitchOnCTS();
45 reader->SwitchOnPHOS();
48 //reader->SetEMCALPtMin(0.5);
49 reader->SetPHOSPtMin(0.5);
50 reader->SetCTSPtMin(0.2);
52 reader->SetFidutialCut(fidCut);
56 //---------------------------------------------------------------------
58 //---------------------------------------------------------------------
60 //Detector Fidutial Cuts for analysis part
61 AliFidutialCut * fidCut2 = new AliFidutialCut();
62 fidCut2->DoCTSFidutialCut(kFALSE) ;
63 //fidCut2->DoEMCALFidutialCut(kTRUE) ;
64 fidCut2->DoPHOSFidutialCut(kFALSE) ;
66 fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
67 //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
68 fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
71 AliCaloPID * pid = new AliCaloPID();
72 // use selection with simple weights
73 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
74 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
75 // use more complicated selection, particle weight depending on cluster energy
76 // pid->UsePHOSPIDWeightFormula(kTRUE);
77 // 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))");
78 // 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))");
79 // pid->SetPHOSPhotonWeightFormula(photonF);
80 // pid->SetPHOSPi0WeightFormula(pi0F);
83 AliIsolationCut * ic = new AliIsolationCut();
85 ic->SetPtThreshold(1.);
86 ic->SetICMethod(AliIsolationCut::kPtThresIC);
89 AliAnaGammaDirect *ana = new AliAnaGammaDirect();
93 ana->SetFidutialCut(fidCut2);
94 ana->SetIsolationCut(ic) ;
95 ana->SetDetector("PHOS");
96 ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms
98 ana->SwitchOnCaloPID();
99 ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
100 ana->SwitchOnFidutialCut();
101 //Select clusters with no pair, if both clusters with pi0 mass
102 ana->SwitchOffInvariantMass();
104 ana->SwitchOnIsolation();
106 //Do or not do isolation with previously produced AODs.
107 //No effect if use of SwitchOnSeveralIsolation()
108 ana->SwitchOffReIsolation();
111 ana->SwitchOffSeveralIsolation() ;
112 // ana->SwitchOnSeveralIsolation() ;
113 // ana->SetNCones(2) ;
114 // ana->SetNPtThresFrac(2) ;
115 // ana->SetConeSizes(0, 0.3) ; ana->SetConeSizes(1, 0.4) ;
116 // ana->SetPtThresholds(0, 0.5) ; ana->SetPtThresholds(1, 1.) ;
117 // ana->SetPtFractions(0, 1.) ; ana->SetPtFractions(1, 1.5) ;
121 //---------------------------------------------------------------------
122 // Set analysis algorithm and reader
123 //---------------------------------------------------------------------
124 maker = new AliAnaMaker();
125 maker->SetReader(reader);//pointer to reader
126 maker->AddAnalysis(ana,0);
127 maker->SetAODBranchName("Photon");
128 maker->SetAnaDebug(1) ;
129 maker->SwitchOnHistogramsMaker() ;
130 //maker->SwitchOffHistogramsMaker() ;
131 maker->SwitchOnAODsMaker() ;
132 //maker->SwitchOffAODsMaker() ;
136 printf("======================== \n");
137 printf("END ConfigAnalysis() \n");
138 printf("======================== \n");