4 //------------------------------------
5 // Configuration macro example:
7 // Do photon identification analysis with ESDs
8 // in EMCAL, after pi0 identification event by event
9 // in photon paris invariant mass and aperture angle widow
10 // For PHOS, change EMCAL by PHOS where necessary
12 // Author : Gustavo Conesa Balbastre (INFN-LNF)
13 //------------------------------------
15 AliAnaPartCorrMaker* ConfigAnalysis()
18 // Configuration goes here
20 printf("======================== \n");
21 printf("ConfigAnalysis() \n");
22 printf("======================== \n");
25 //Detector Fiducial Cuts
26 AliFiducialCut * fidCut = new AliFiducialCut();
27 fidCut->DoCTSFiducialCut(kFALSE) ;
28 fidCut->DoEMCALFiducialCut(kFALSE) ;
29 fidCut->DoPHOSFiducialCut(kTRUE) ;
31 //fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.);
32 //fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.);
33 fidCut->SetSimplePHOSFiducialCut(0.12,220.,320.);
38 //-----------------------------------------------------------
40 //-----------------------------------------------------------
41 AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
42 reader->SetDebug(-1);//10 for lots of messages
44 //Switch on or off the detectors information that you want
45 reader->SwitchOnEMCAL();
46 reader->SwitchOnCTS();
47 reader->SwitchOffPHOS();
50 //reader->SetEMCALPtMin(0.5);
51 reader->SetPHOSPtMin(0.5);
52 //reader->SetCTSPtMin(0.2);
54 reader->SetFiducialCut(fidCut);
56 // //We want tracks fitted in the detectors:
57 // ULong_t status=AliAODTrack::kTPCrefit;
58 // status|=AliAODTrack::kITSrefit; //(default settings)
60 // We want tracks whose PID bit is set:
61 // ULong_t status =AliAODTrack::kITSpid;
62 // status|=AliAODTrack::kTPCpid;
64 // reader->SetTrackStatus(status);
66 //Remove the temporal AODs we create.
67 reader->SwitchOnCleanStdAOD();
72 //---------------------------------------------------------------------
74 //---------------------------------------------------------------------
76 AliCaloPID * pid = new AliCaloPID();
77 // use selection with simple weights
78 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
80 pid->SetDispersionCut(1.5);
81 pid->SetTOFCut(5.e-9);
85 AliAnaPhoton *anaphoton = new AliAnaPhoton();
86 anaphoton->SetDebug(-1); //10 for lots of messages
87 anaphoton->SetMinPt(1);
88 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
89 anaphoton->SetCaloPID(pid);
90 //anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level
91 anaphoton->SetCalorimeter("EMCAL");
92 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
93 anaphoton->SwitchOffCaloPID();
94 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
95 anaphoton->SwitchOffFiducialCut();
96 anaphoton->SetOutputAODName("Photons");
97 anaphoton->SetOutputAODClassName("AliAODPWG4Particle");
98 //Set Histrograms bins and ranges
99 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
100 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
101 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; anaphoton->Print("");
103 //Detector Fiducial Cuts
104 AliFiducialCut * fidCut2 = new AliFiducialCut();
105 fidCut2->DoPHOSFiducialCut(kTRUE) ;
106 fidCut2->SetSimplePHOSFiducialCut(0.12,220.,320.);
110 // >>> Second Analysis <<<
112 AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
113 nms->SetInvMassCutRange(0.10, 0.17) ;
114 nms->KeepNeutralMesonSelectionHistos(kTRUE);
115 //Set Histrograms bins and ranges
116 // nms->SetHistoERangeAndNBins(0, 50, 100) ;
117 // nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
118 // nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
119 // nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ;
121 AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
122 anapi0->SetDebug(-1);//10 for lots of messages
123 anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
124 anapi0->SetInputAODName("Photons");
125 anapi0->SetOutputAODName("Pi0s");
126 anapi0->SetOutputAODClassName("AliAODPWG4Particle");
127 anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
128 anapi0->SetNeutralMesonSelection(nms);
129 //Set Histrograms bins and ranges
130 // anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
131 // anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
132 // anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
135 //---------------------------------------------------------------------
136 // Set analysis algorithm and reader
137 //---------------------------------------------------------------------
138 maker = new AliAnaPartCorrMaker();
139 maker->SetReader(reader);//pointer to reader
140 maker->AddAnalysis(anaphoton,0);
141 maker->AddAnalysis(anapi0,1);
142 maker->SetAnaDebug(-1) ;
143 maker->SwitchOnHistogramsMaker() ;
144 maker->SwitchOnAODsMaker() ;
148 printf("======================== \n");
149 printf("END ConfigAnalysis() \n");
150 printf("======================== \n");