4 //------------------------------------
5 // Configuration macro example:
7 // Do photon identification analysis with ESDs
8 // Gamma in PHOS. For EMCAL clusters change
9 // PHOS by EMCAL where necessary
11 // Author : Gustavo Conesa Balbastre (INFN-LNF)
12 //------------------------------------
14 AliAnaPartCorrMaker* ConfigAnalysis()
17 // Configuration goes here
19 printf("======================== \n");
20 printf("ConfigAnalysis() \n");
21 printf("======================== \n");
24 //Detector Fiducial Cuts
25 AliFiducialCut * fidCut = new AliFiducialCut();
26 fidCut->DoCTSFiducialCut(kFALSE) ;
27 fidCut->DoEMCALFiducialCut(kFALSE) ;
28 fidCut->DoPHOSFiducialCut(kFALSE) ;
30 //fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.);
31 //fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.);
32 //fidCut->SetSimplePHOSFiducialCut(0.13,220.,320.);
36 //-----------------------------------------------------------
38 //-----------------------------------------------------------
39 AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
42 //Switch on or off the detectors information that you want
43 reader->SwitchOffEMCAL();
44 reader->SwitchOffCTS();
45 reader->SwitchOnPHOS();
48 //reader->SetEMCALPtMin(0.5);
49 reader->SetPHOSPtMin(0.5);
50 //reader->SetCTSPtMin(0.2);
51 reader->SwitchOnStack(); //On by default, remember to SwitchOnMCData() in analysis classes
52 //In case of generating jet events (with PYTHIA), if pt hard bin is small
53 //reject events with large difference between ptHard and triggered jet
54 //reader->SetPtHardAndJetPtComparison(kTRUE);
56 reader->SetFiducialCut(fidCut);
58 // Analysis with tracks, select only tracks with
61 // //We want tracks fitted in the detectors:
62 // ULong_t status=AliAODTrack::kTPCrefit;
63 // status|=AliAODTrack::kITSrefit;
65 // We want tracks whose PID bit is set:
66 // ULong_t status =AliAODTrack::kITSpid;
67 // status|=AliAODTrack::kTPCpid;
69 // reader->SetTrackStatus(status);
71 reader->SwitchOnCleanStdAOD();
76 //---------------------------------------------------------------------
78 //---------------------------------------------------------------------
80 //Detector Fiducial Cuts for analysis part
81 AliFiducialCut * fidCut2 = new AliFiducialCut();
82 fidCut2->DoCTSFiducialCut(kFALSE) ;
83 fidCut2->DoEMCALFiducialCut(kFALSE) ;
84 fidCut2->DoPHOSFiducialCut(kFALSE) ;
86 //fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.);
87 //fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.);
88 //fidCut2->SetSimplePHOSFiducialCut(0.13,220.,320.);
92 AliCaloPID * pid = new AliCaloPID();
93 // use selection with simple weights
94 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
95 // use more complicated selection, particle weight depending on cluster energy
96 // pid->UsePHOSPIDWeightFormula(kTRUE);
97 // 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))");
98 // 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))");
99 // pid->SetPHOSPhotonWeightFormula(photonF);
100 // pid->SetPHOSPi0WeightFormula(pi0F);
102 pid->SetDispersionCut(1.5);
103 pid->SetTOFCut(5.e-9);
107 AliAnaPhoton *ana = new AliAnaPhoton();
110 ana->SetMinDistanceToBadChannel(2, 4, 5);
111 ana->SetCaloPID(pid);
112 ana->SetFiducialCut(fidCut2);
113 ana->SetCalorimeter("PHOS");
114 ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms
115 ana->SwitchOffCaloPID();
116 ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
117 ana->SwitchOnTrackMatchRejection(); //Only in use when OnCaloPID
118 ana->SwitchOffFiducialCut();
119 ana->SetOutputAODName("Photons");
120 ana->SetOutputAODClassName("AliAODPWG4Particle");
121 //Set Histrograms bins and ranges
122 // ana->SetHistoPtRangeAndNBins(0, 50, 100) ;
123 // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
124 // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
127 //---------------------------------------------------------------------
128 // Set analysis algorithm and reader
129 //---------------------------------------------------------------------
130 maker = new AliAnaPartCorrMaker();
131 maker->SetReader(reader);//pointer to reader
132 maker->AddAnalysis(ana,0);
133 maker->SetAnaDebug(-1) ;
134 maker->SwitchOnHistogramsMaker() ;
135 maker->SwitchOnAODsMaker() ;
139 printf("======================== \n");
140 printf("END ConfigAnalysis() \n");
141 printf("======================== \n");