source: trunk/MagicSoft/Mars/mtemp/mmpi/macros/skyplot.h@ 5468

Last change on this file since 5468 was 4097, checked in by mazin, 21 years ago
*** empty log message ***
File size: 6.9 KB
Line 
1// temporal solution:
2#define MAXNUMEVENTS 500000
3#define LOG3000 log(3000.)
4
5TString HILLASFILENAME;
6TString DATPARAMIN;
7TString DATPARAMOUT;
8TString ROOTPLOTNAME;
9Int_t imnum = 0;
10
11TVectorD lengthpar(MAXNUMEVENTS);
12TVectorD widthpar(MAXNUMEVENTS);
13TVectorD distpar(MAXNUMEVENTS);
14TVectorD alphapar(MAXNUMEVENTS);
15TVectorD sizepar(MAXNUMEVENTS);
16TVectorD deltapar(MAXNUMEVENTS);
17TVectorD xpar(MAXNUMEVENTS);
18TVectorD ypar(MAXNUMEVENTS);
19TVectorD conc1(MAXNUMEVENTS);
20TVectorD leak1(MAXNUMEVENTS);
21TVectorD cosgam(MAXNUMEVENTS);
22TVectorD singam(MAXNUMEVENTS);
23
24// the alpha histogram
25MBinning bins;
26
27//TH1F histalphagrid;
28//histalphagrid.SetName("Alpha");
29//histalphagrid.SetTitle("Alpha");
30//histalphagrid.SetXTitle("Alpha [deg]");
31//histalphagrid.SetYTitle("Counts");
32//histalphagrid.SetDirectory(NULL);
33//histalphagrid.SetFillStyle(4000);
34//histalphagrid.UseCurrentStyle();
35
36bins.SetEdges(18, 0.0, 90.);
37bins.Apply(histalphagrid);
38
39
40
41// possible histograms:
42TH1F histlength;
43TH1F histwidth;
44TH1F histsize;
45TH1F histalpha;
46TH1F histdist;
47TH1F histmeanx;
48TH1F histmeany;
49TH1F histalphafinal;
50
51TH2F hist2xy("CoG1","Center of Gravity", 100, -1.8, 1.8, 100, -1.8, 1.8);
52TH1F histLoverS;
53TH1F aftercuthistlength;
54TH1F aftercuthistwidth;
55TH1F aftercuthistsize;
56TH1F aftercuthistalpha;
57TH1F aftercuthistdist;
58TH1F aftercuthistmeanx;
59TH1F aftercuthistmeany;
60TH2F aftercuthist2xy("CoG2","Center of Gravity", 100, -1.8, 1.8, 100, -1.8, 1.8);
61TH2F hist2lw("Length-Width", "correlation Length-Width", 100, 0.0, 1.0, 100, 0.0, 0.5);
62TH2F hist2lalpha("Length-Alpha", "correlation Length-Alpha", 100, 0.0, 1.0, 100, -100., 100.);
63TH2F hist2ldist("Length-Dist","correlation Length-Dist", 100, 0.0, 1.0, 100, 0.0, 1.6);
64TH2F hist2walpha("Width-Alpha","correlation Width-Alpha", 100, 0.0, 0.5, 100, -100., 100.);
65TH2F hist2wdist("Width-Dist","correlation Width-Dist", 100, 0.0, 0.5, 100, 0.0, 1.6);
66TH2F hist2alphadist("Alpha-Dist","correlation Alpha-Dist", 100, -100., 100, 100, 0.2, 1.4);
67
68
69TH2F histskyplot("SPSignif2ndOrder","Sky Plot of significance (2nd order fit)",
70 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
71 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
72//histskyplot.SetXTitle("-RA [deg]");
73//histskyplot.SetYTitle("DEC [deg]");
74histskyplot.SetDirectory(NULL);
75histskyplot.SetFillStyle(4000);
76histskyplot.UseCurrentStyle();
77
78TH2F histNexOnOff("SPNexOnOff","Sky Plot of Number of excess events (using ON and OFF data)",
79 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
80 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
81//histNexOnOff.SetXTitle("-RA [deg]");
82//histNexOnOff.SetYTitle("DEC [deg]");
83histNexOnOff.SetDirectory(NULL);
84histNexOnOff.SetFillStyle(4000);
85histNexOnOff.UseCurrentStyle();
86
87TH2F histChi2Off("SPChi2PerNdf2ndOrderOff","Sky Plot of Chi2/ndf (2nd order fit, OFF data)",
88 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
89 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
90//histChi2Off.SetXTitle("-RA [deg]");
91//histChi2Off.SetYTitle("DEC [deg]");
92histChi2Off.SetDirectory(NULL);
93histChi2Off.SetFillStyle(4000);
94histChi2Off.UseCurrentStyle();
95
96TH2F histskyplotOnOff("SPSignifOnOff","Sky Plot of significance (using ON and OFF data)",
97 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
98 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
99//histskyplotOnOff.SetXTitle("-RA [deg]");
100//histskyplotOnOff.SetYTitle("DEC [deg]");
101histskyplotOnOff.SetDirectory(NULL);
102histskyplotOnOff.SetFillStyle(4000);
103histskyplotOnOff.UseCurrentStyle();
104
105TH2F histNex("SPNex2ndOrder","Sky Plot of Number of excess events (2nd order fit)",
106 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
107 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
108//histNex.SetXTitle("-RA [deg]");
109//histNex.SetYTitle("DEC [deg]");
110histNex.SetDirectory(NULL);
111histNex.SetFillStyle(4000);
112histNex.UseCurrentStyle();
113
114TH2F histChi2("SPChi2PerNdf2ndOrderOn","Sky Plot of Chi2/ndf (2nd order fit)",
115 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
116 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
117//histChi2.SetXTitle("-RA [deg]");
118//histChi2.SetYTitle("DEC [deg]");
119histChi2.SetDirectory(NULL);
120histChi2.SetFillStyle(4000);
121histChi2.UseCurrentStyle();
122
123TH2F histskyplot4("SPSignif4thOrder","Sky Plot of significance (4th order fit)",
124 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
125 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
126//histskyplot4.SetXTitle("-RA [deg]");
127//histskyplot4.SetYTitle("DEC [deg]");
128histskyplot4.SetDirectory(NULL);
129histskyplot4.SetFillStyle(4000);
130histskyplot4.UseCurrentStyle();
131
132TH2F histskyLiMa("SPSignifLiMaOnOff","Sky Plot of significance (ON - OFF LiMa17)",
133 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
134 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
135//histskyLiMa.SetXTitle("-RA [deg]");
136//histskyLiMa.SetYTitle("DEC [deg]");
137histskyLiMa.SetDirectory(NULL);
138histskyLiMa.SetFillStyle(4000);
139histskyLiMa.UseCurrentStyle();
140
141TH2F histBerlin("SPBerlinMethod","Sky Plot of Events below alpha 8 degrees",
142 NUMSTEPS, MINXGRID - 0.5*STEPGRID, MAXXGRID + 0.5*STEPGRID,
143 NUMSTEPS, MINYGRID - 0.5*STEPGRID, MAXYGRID + 0.5*STEPGRID);
144//histskyLiMa.SetXTitle("-RA [deg]");
145//histskyLiMa.SetYTitle("DEC [deg]");
146histBerlin.SetDirectory(NULL);
147histBerlin.SetFillStyle(4000);
148histBerlin.UseCurrentStyle();
149
150TH1F histsign;
151histsign.SetName("Significance 1");
152histsign.SetTitle("Significance (2nd order fit)");
153histsign.SetXTitle("significance");
154histsign.SetYTitle("Counts");
155histsign.SetDirectory(NULL);
156histsign.SetFillStyle(4000);
157histsign.UseCurrentStyle();
158
159 bins.SetEdges(20, -5., 8.);
160 bins.Apply(histsign);
161
162TH1F histsign4;
163histsign4.SetName("Significance 2");
164histsign4.SetTitle("Significance (4th order fit)");
165histsign4.SetXTitle("significance");
166histsign4.SetYTitle("Counts");
167histsign4.SetDirectory(NULL);
168histsign4.SetFillStyle(4000);
169histsign4.UseCurrentStyle();
170
171 bins.SetEdges(20, -5., 8.);
172 bins.Apply(histsign4);
173
174
175TH1F histalphagrid;
176histalphagrid.SetName("Alpha");
177histalphagrid.SetTitle("Alpha");
178//histalphagrid.SetXTitle("Alpha [deg]");
179histalphagrid.SetYTitle("Counts");
180histalphagrid.SetDirectory(NULL);
181histalphagrid.SetFillStyle(4000);
182histalphagrid.UseCurrentStyle();
183
184 bins.SetEdges(18, 0.0, 90.);
185 bins.Apply(histalphagrid);
186
187/*
188#define n 100
189Double_t binsize[n];
190Float_t nmin = 100.;
191Float_t nmax = 1e7;
192
193for(Int_t i=0; i<n; i++)
194{
195binsize[i] = pow(10., log10(nmin) + i * (log10(nmax) - log10(nmin)) / (n-1.));
196}
197
198TH2F hist2wsize("Width-Size", "correlation Width-Size", 100, 0.0, 0.5, n-1, binsize);
199TH2F hist2alphasize("Alpha-Size","correlation Alpha-Size", 100, -100., 100., n-1, binsize);
200TH2F hist2distsize("Dist-Size","correlation Dist-Size", 100, 0.0, 1.6, n-1, binsize);
201*/
Note: See TracBrowser for help on using the repository browser.