remove analysis classes new implemention
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigESDKineGammaDirect.C
CommitLineData
34ce8d31 1/* $Id$ */
2/* $Log$ */
3
4//------------------------------------
5// Configuration macro example:
6//
7// Do prompt photon analysis with ESDs, check with kinematics
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 //-----------------------------------------------------------
21 // Define Reader
22 //-----------------------------------------------------------
23 //----------------------------------------------------------
24
25 AliGammaMCDataReader *reader = new AliGammaMCDataReader();
26 // Switch "on" or "off" detectors used in study
27 reader->SwitchOnEMCAL(kTRUE);
28 reader->SwitchOnPHOS(kFALSE) ;
29 reader->SwitchOnCTS(kTRUE) ;
30 // Set detectors acceptance (in real and montecarlo data)
31// reader->SetCTSEtaCut(1); reader->SetEMCALEtaCut(1); reader->SetPHOSEtaCut(0.2);
32 reader->SetPhiEMCALCut(60*TMath::DegToRad(), 180*TMath::DegToRad());
33 // reader->SetPhiPHOSCut(260*TMath::DegToRad(), 320*TMath::DegToRad()); //Example, only modules in TRD/TOF holes
34 // Set minimum pt for particles in analysis (in real and montecarlo data)
35 // reader->SetNeutralPtCut(0.5); reader->SetChargedPtCut(0.2);
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 //parameters to study if decay is overlapped or there was a conversion before the calo:
50 reader->SetEMCALIPDistance(450.); reader->SetPHOSIPDistance(460.);
51 reader->SetEMCALMinAngle(2.5 * TMath::DegToRad() );
52 reader->SetPHOSMinAngle(0.45 * TMath::DegToRad() ); //Minimum overlapp distance
53
54 //============================
55 // Initialize prompt photon algoritm
56 //==============================
57 AliAnaGammaDirect *gd = new AliAnaGammaDirect();
58 gd->SetMinGammaPt(5.);
59 gd->SetConeSize(0.5); gd->SetPtThreshold(1.); gd->SetPtSumThreshold(1.);
60 gd->SetICMethod(AliAnaGammaDirect::kPtIC) ;//Options:
61 //kNoIC: Accept all photons, no isolation used
62 //kPtIC: IC with cut on pT
63 //kSumPtIC: IC with cut on pT sum in cone
64
65 //---------------------------------------------------------------------
66 // Finally: Set analysis algorithm and reader
67 //---------------------------------------------------------------------
68 ana = new AliAnaGamma();
69 ana->SetReader(reader);//pointer to reader
70 ana->SetAnalysisType(AliAnaGamma::kPrompt); //set kPrompt, kCorrelation
71 ana->SetGammaDirect(gd);//pointer to direct photon algorithm
72 ana->SetCalorimeter("EMCAL"); //Prompt photon calorimeter, PHOS or EMCAL
73
74 //
75 return ana ;
76}