remove analysis classes new implemention
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigESDGammaDirect.C
CommitLineData
34ce8d31 1/* $Id$ */
2/* $Log$ */
3
4//------------------------------------
5// Configuration macro example:
6//
7// Do prompt photon analysis with ESDs
8//
9// Author : Gustavo Conesa Balbastre (INFN-LNF)
10//------------------------------------
11
12AliAnaGamma* ConfigGammaAnalysis()
13{
14 //
15 // Configuration goes here
16 //
17 printf("ConfigGammaAnalysis() \n");
18
19 //-----------------------------------------------------------
20 // Reader
21 //-----------------------------------------------------------
22 AliGammaDataReader *reader = new AliGammaDataReader();
23 // Switch "on" or "off" detectors used in study
24 reader->SwitchOnEMCAL(kFALSE);
25 reader->SwitchOnPHOS(kTRUE) ;
26 reader->SwitchOnCTS(kTRUE) ;
27
28 // Set detectors acceptance (in real and montecarlo data)
29 // reader->SetCTSEtaCut(1); reader->SetEMCALEtaCut(1); reader->SetPHOSEtaCut(0.2);
30 //reader->SetPhiEMCALCut(60*TMath::DegToRad(), 180*TMath::DegToRad());
31 reader->SetPhiPHOSCut(260*TMath::DegToRad(), 320*TMath::DegToRad()); //Example, only modules in TRD/TOF holes
32
33 // Set minimum pt for particles in analysis (in real and montecarlo data)
34 reader->SetNeutralPtCut(0.5); reader->SetChargedPtCut(0.3);
35
36 //pid of measured particles
37 reader->SetEMCALPIDOn(kFALSE); reader->SetPHOSPIDOn(kTRUE); //No pid, accept all particles
38 //if previous kTrue
39 // use selection with simple weights
40 // reader->SetPHOSPhotonWeight(0.7); reader->SetPHOSPi0Weight(0.7);
41 // reader->SetEMCALPhotonWeight(0.7); reader->SetEMCALPi0Weight(0.7);
42 // use more complicated selectionm, particle weight depending on cluster energy
43 reader->UsePHOSPIDWeightFormula(kTRUE);
44 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))");
45 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))");
46 reader->SetPHOSPhotonWeightFormula(photonF);
47 reader->SetPHOSPi0WeightFormula(pi0F);
48
49 //============================
50 // Prompt photon algoritm
51 //==============================
52 AliAnaGammaDirect *gd = new AliAnaGammaDirect();
53 gd->SetMinGammaPt(5.);
54 gd->SetConeSize(0.5); gd->SetPtThreshold(1.); gd->SetPtSumThreshold(1.);
55 gd->SetICMethod(AliAnaGammaDirect::kPtIC) ;//Options:
56 //kNoIC: Accept all photons, no isolation used
57 //kPtIC: IC with cut on pT
58 //kSumPtIC: IC with cut on pT sum in cone
59
60 //---------------------------------------------------------------------
61 // Set analysis algorithm and reader
62 //---------------------------------------------------------------------
63 ana = new AliAnaGamma();
64 ana->SetReader(reader);//pointer to reader
65 ana->SetAnalysisType(AliAnaGamma::kPrompt); //set kPrompt, kCorrelation
66 ana->SetGammaDirect(gd);//pointer to direct photon algorithm
67 ana->SetCalorimeter("PHOS"); //Prompt photon calorimeter, PHOS or EMCAL
68
69 //
70 return ana ;
71}