StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
show_photon.C
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 
3 #include <TString.h>
4 
5 #include <StEmcPool/StPhotonCommon/PhotonAnalysisSettings.h>
6 
7 #include <StEmcPool/StPhotonAnalysis/PhotonAnalysisUtil.h>
8 
9 #endif
10 
11 void getSettings(PhotonAnalysisSettings &settings, const Char_t *name = "") {
12 
13  TString inputDir = "./data_photon/";
14  TString outputDir = "./output_photon/";
15 
16  settings.name = name;
17 
18  inputDir += settings.name + "/";
19  outputDir += settings.name + "/";
20 
21  settings.input_datapoints_dir = "./data_photon/dataPoints/";
22 
23  settings.input_decaybackground_file = inputDir + "gammaDecaySum.root";
24  settings.input_binwidth_file = inputDir + "binCorrections.root";
25  settings.input_pion_file = inputDir + "pi0.root";
26  settings.input_pioneff_file = inputDir + "pion_eff.root";
27  settings.input_gammaeff_file = inputDir + "gamma_eff.root";
28  settings.input_nbareff_file = inputDir + "antineutron_eff.root";
29  settings.input_systematics_file = inputDir + "systematics.root";
30 
31  settings.output_invmassplots_file = outputDir + "invmassplots.ps";
32  settings.output_invmassplotseta_file = outputDir + "invmassplots2.ps";
33  settings.output_nbarcontam_file = outputDir + "nbar_contam.eps";
34  settings.output_pionhistograms_file = outputDir + "pion_histograms.root";
35  settings.output_pioncanvases_file = outputDir + "pion_canvases.eps";
36  settings.output_pionxsec_file = outputDir + "pion_xsec.eps";
37  settings.output_pionxsecoverfit_file = outputDir + "pion_xsecoverfit.eps";
38  settings.output_pionxsecratio_file = outputDir + "pion_xsecratio.eps";
39  settings.output_inclphotonyield_file = outputDir + "inclphotonyield.eps";
40  settings.output_gammaoverpion_file = outputDir + "gammaoverpion.eps";
41  settings.output_inclphotonyieldcorr_file = outputDir + "inclphotonyieldcorr.eps";
42  settings.output_nbarcont_file = outputDir + "nbarcont.eps";
43  settings.output_gammadoubleratio_file = outputDir + "gammadoubleratio.eps";
44  settings.output_gammadirphoton_file = outputDir + "gammadirphoton.eps";
45 }
46 
47 void show_photon() {
48 
49  Bool_t show_pp2005 = false;
50  Bool_t show_dAu2003 = true;
51 
52  if (show_pp2005) {
54  getSettings(s, "pp05");
55  getPhotonSpectrum(s);
56  }
57  if (show_dAu2003) {
59  getSettings(s, "dAu");
60  getPhotonSpectrum(s);
61  }
62 }