3 //------------------------------------
4 // Configuration macro example:
6 // Do prompt photon - jet (JETAN) correlation analysis with ESDs
7 // First find photons with AliAnaPhoton, then
8 // isolate them with AliAnaParticleIsolation and finally correlate
9 // them with AliAnaParticleJetFinderCorrelation
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(kTRUE) ;
27 fidCut->DoEMCALFiducialCut(kTRUE) ;
28 fidCut->DoPHOSFiducialCut(kTRUE) ;
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->SwitchOnEMCAL();
44 reader->SwitchOnCTS();
45 reader->SwitchOnPHOS();
48 reader->SetEMCALPtMin(0.5);
49 reader->SetPHOSPtMin(0.5);
50 reader->SetCTSPtMin(0.2);
52 reader->SetFiducialCut(fidCut);
54 // //We want tracks fitted in the detectors:
55 // ULong_t status=AliAODTrack::kTPCrefit;
56 // status|=AliAODTrack::kITSrefit; //(default settings)
58 // We want tracks whose PID bit is set:
59 // ULong_t status =AliAODTrack::kITSpid;
60 // status|=AliAODTrack::kTPCpid;
62 // reader->SetTrackStatus(status);
68 //---------------------------------------------------------------------
70 //---------------------------------------------------------------------
71 //<<<< first analysis >>> select the photons
72 //Detector Fiducial Cuts for analysis part
73 AliFiducialCut * fidCut2 = new AliFiducialCut();
74 fidCut2->DoCTSFiducialCut(kFALSE) ;
75 fidCut2->DoEMCALFiducialCut(kTRUE) ;
76 fidCut2->DoPHOSFiducialCut(kFALSE) ;
78 fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.);
79 fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.);
80 fidCut2->SetSimplePHOSFiducialCut(0.13,220.,320.);
83 AliCaloPID * pid = new AliCaloPID();
84 // use selection with simple weights
85 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
86 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
90 AliAnaPhoton *anaphoton = new AliAnaPhoton();
91 anaphoton->SetDebug(-1); //10 for lots of messages
92 anaphoton->SetMinPt(0.2);
93 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
94 anaphoton->SetCaloPID(pid);
95 anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level
96 anaphoton->SetCalorimeter("PHOS");
97 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
98 anaphoton->SwitchOnCaloPID();
99 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
100 anaphoton->SwitchOnFiducialCut();
101 anaphoton->SetOutputAODName("Photons");
102 anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
103 //Set Histrograms bins and ranges
104 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
105 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
106 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
107 anaphoton->Print("");
109 // >>>> Second Analysis <<<< Isolate the photons
110 AliIsolationCut * ic = new AliIsolationCut();
111 ic->SetConeSize(0.5);
112 ic->SetPtThreshold(1.);
113 ic->SetICMethod(AliIsolationCut::kPtThresIC);
116 AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
117 anaisol->SetDebug(-1);
118 anaisol->SetMinPt(5);
119 anaisol->SetInputAODName("Photons");
120 anaisol->SetCalorimeter("PHOS");
121 anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
122 //Select clusters with no pair, if both clusters with pi0 mass
123 anaisol->SwitchOffInvariantMass();
124 //anaisol->SetNeutralMesonSelection(nms);
126 anaisol->SetIsolationCut(ic);
127 //Do or not do isolation with previously produced AODs.
128 //No effect if use of SwitchOnSeveralIsolation()
129 anaisol->SwitchOffReIsolation();
131 anaisol->SwitchOffSeveralIsolation() ;
135 //<<<Third analysis>>> Isolated Photon- Jet An correlation
136 AliAnaParticleJetFinderCorrelation *anacorr = new AliAnaParticleJetFinderCorrelation();
137 anacorr->SetInputAODName("Photons");
138 anacorr->SetDebug(-1);
139 anacorr->SetConeSize(1);
140 anacorr->SetPtThresholdInCone(0.5);
141 anacorr->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts
142 anacorr->SetRatioCutRange(0.01,3); //Mostly Open Cuts
143 anacorr->UseJetRefTracks(kFALSE); //Not working now
146 //---------------------------------------------------------------------
147 // Set analysis algorithm and reader
148 //---------------------------------------------------------------------
149 maker = new AliAnaPartCorrMaker();
150 maker->SetReader(reader);//pointer to reader
151 maker->AddAnalysis(anaphoton,0);
152 maker->AddAnalysis(anaisol,1);
153 maker->AddAnalysis(anacorr,2);
154 maker->SetAnaDebug(-1) ;
155 maker->SwitchOnHistogramsMaker() ;
156 maker->SwitchOnAODsMaker() ;
160 printf("======================== \n");
161 printf("END ConfigAnalysis() \n");
162 printf("======================== \n");