1 | // temporal solution:
|
---|
2 | #define MAXNUMEVENTS 500000
|
---|
3 | #define LOG3000 log(3000.)
|
---|
4 |
|
---|
5 | TString HILLASFILENAME;
|
---|
6 | TString DATPARAMIN;
|
---|
7 | TString DATPARAMOUT;
|
---|
8 | TString ROOTPLOTNAME;
|
---|
9 | Int_t imnum = 0;
|
---|
10 |
|
---|
11 | TVectorD lengthpar(MAXNUMEVENTS);
|
---|
12 | TVectorD widthpar(MAXNUMEVENTS);
|
---|
13 | TVectorD distpar(MAXNUMEVENTS);
|
---|
14 | TVectorD alphapar(MAXNUMEVENTS);
|
---|
15 | TVectorD sizepar(MAXNUMEVENTS);
|
---|
16 | TVectorD deltapar(MAXNUMEVENTS);
|
---|
17 | TVectorD xpar(MAXNUMEVENTS);
|
---|
18 | TVectorD ypar(MAXNUMEVENTS);
|
---|
19 | TVectorD conc1(MAXNUMEVENTS);
|
---|
20 | TVectorD leak1(MAXNUMEVENTS);
|
---|
21 | TVectorD cosgam(MAXNUMEVENTS);
|
---|
22 | TVectorD singam(MAXNUMEVENTS);
|
---|
23 |
|
---|
24 | // the alpha histogram
|
---|
25 | MBinning 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 |
|
---|
36 | bins.SetEdges(18, 0.0, 90.);
|
---|
37 | bins.Apply(histalphagrid);
|
---|
38 |
|
---|
39 |
|
---|
40 |
|
---|
41 | // possible histograms:
|
---|
42 | TH1F histlength;
|
---|
43 | TH1F histwidth;
|
---|
44 | TH1F histsize;
|
---|
45 | TH1F histalpha;
|
---|
46 | TH1F histdist;
|
---|
47 | TH1F histmeanx;
|
---|
48 | TH1F histmeany;
|
---|
49 | TH1F histalphafinal;
|
---|
50 |
|
---|
51 | TH2F hist2xy("CoG1","Center of Gravity", 100, -1.8, 1.8, 100, -1.8, 1.8);
|
---|
52 | TH1F histLoverS;
|
---|
53 | TH1F aftercuthistlength;
|
---|
54 | TH1F aftercuthistwidth;
|
---|
55 | TH1F aftercuthistsize;
|
---|
56 | TH1F aftercuthistalpha;
|
---|
57 | TH1F aftercuthistdist;
|
---|
58 | TH1F aftercuthistmeanx;
|
---|
59 | TH1F aftercuthistmeany;
|
---|
60 | TH2F aftercuthist2xy("CoG2","Center of Gravity", 100, -1.8, 1.8, 100, -1.8, 1.8);
|
---|
61 | TH2F hist2lw("Length-Width", "correlation Length-Width", 100, 0.0, 1.0, 100, 0.0, 0.5);
|
---|
62 | TH2F hist2lalpha("Length-Alpha", "correlation Length-Alpha", 100, 0.0, 1.0, 100, -100., 100.);
|
---|
63 | TH2F hist2ldist("Length-Dist","correlation Length-Dist", 100, 0.0, 1.0, 100, 0.0, 1.6);
|
---|
64 | TH2F hist2walpha("Width-Alpha","correlation Width-Alpha", 100, 0.0, 0.5, 100, -100., 100.);
|
---|
65 | TH2F hist2wdist("Width-Dist","correlation Width-Dist", 100, 0.0, 0.5, 100, 0.0, 1.6);
|
---|
66 | TH2F hist2alphadist("Alpha-Dist","correlation Alpha-Dist", 100, -100., 100, 100, 0.2, 1.4);
|
---|
67 |
|
---|
68 |
|
---|
69 | TH2F 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]");
|
---|
74 | histskyplot.SetDirectory(NULL);
|
---|
75 | histskyplot.SetFillStyle(4000);
|
---|
76 | histskyplot.UseCurrentStyle();
|
---|
77 |
|
---|
78 | TH2F 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]");
|
---|
83 | histNexOnOff.SetDirectory(NULL);
|
---|
84 | histNexOnOff.SetFillStyle(4000);
|
---|
85 | histNexOnOff.UseCurrentStyle();
|
---|
86 |
|
---|
87 | TH2F 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]");
|
---|
92 | histChi2Off.SetDirectory(NULL);
|
---|
93 | histChi2Off.SetFillStyle(4000);
|
---|
94 | histChi2Off.UseCurrentStyle();
|
---|
95 |
|
---|
96 | TH2F 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]");
|
---|
101 | histskyplotOnOff.SetDirectory(NULL);
|
---|
102 | histskyplotOnOff.SetFillStyle(4000);
|
---|
103 | histskyplotOnOff.UseCurrentStyle();
|
---|
104 |
|
---|
105 | TH2F 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]");
|
---|
110 | histNex.SetDirectory(NULL);
|
---|
111 | histNex.SetFillStyle(4000);
|
---|
112 | histNex.UseCurrentStyle();
|
---|
113 |
|
---|
114 | TH2F 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]");
|
---|
119 | histChi2.SetDirectory(NULL);
|
---|
120 | histChi2.SetFillStyle(4000);
|
---|
121 | histChi2.UseCurrentStyle();
|
---|
122 |
|
---|
123 | TH2F 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]");
|
---|
128 | histskyplot4.SetDirectory(NULL);
|
---|
129 | histskyplot4.SetFillStyle(4000);
|
---|
130 | histskyplot4.UseCurrentStyle();
|
---|
131 |
|
---|
132 | TH2F 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]");
|
---|
137 | histskyLiMa.SetDirectory(NULL);
|
---|
138 | histskyLiMa.SetFillStyle(4000);
|
---|
139 | histskyLiMa.UseCurrentStyle();
|
---|
140 |
|
---|
141 | TH2F 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]");
|
---|
146 | histBerlin.SetDirectory(NULL);
|
---|
147 | histBerlin.SetFillStyle(4000);
|
---|
148 | histBerlin.UseCurrentStyle();
|
---|
149 |
|
---|
150 | TH1F histsign;
|
---|
151 | histsign.SetName("Significance 1");
|
---|
152 | histsign.SetTitle("Significance (2nd order fit)");
|
---|
153 | histsign.SetXTitle("significance");
|
---|
154 | histsign.SetYTitle("Counts");
|
---|
155 | histsign.SetDirectory(NULL);
|
---|
156 | histsign.SetFillStyle(4000);
|
---|
157 | histsign.UseCurrentStyle();
|
---|
158 |
|
---|
159 | bins.SetEdges(20, -5., 8.);
|
---|
160 | bins.Apply(histsign);
|
---|
161 |
|
---|
162 | TH1F histsign4;
|
---|
163 | histsign4.SetName("Significance 2");
|
---|
164 | histsign4.SetTitle("Significance (4th order fit)");
|
---|
165 | histsign4.SetXTitle("significance");
|
---|
166 | histsign4.SetYTitle("Counts");
|
---|
167 | histsign4.SetDirectory(NULL);
|
---|
168 | histsign4.SetFillStyle(4000);
|
---|
169 | histsign4.UseCurrentStyle();
|
---|
170 |
|
---|
171 | bins.SetEdges(20, -5., 8.);
|
---|
172 | bins.Apply(histsign4);
|
---|
173 |
|
---|
174 |
|
---|
175 | TH1F histalphagrid;
|
---|
176 | histalphagrid.SetName("Alpha");
|
---|
177 | histalphagrid.SetTitle("Alpha");
|
---|
178 | //histalphagrid.SetXTitle("Alpha [deg]");
|
---|
179 | histalphagrid.SetYTitle("Counts");
|
---|
180 | histalphagrid.SetDirectory(NULL);
|
---|
181 | histalphagrid.SetFillStyle(4000);
|
---|
182 | histalphagrid.UseCurrentStyle();
|
---|
183 |
|
---|
184 | bins.SetEdges(18, 0.0, 90.);
|
---|
185 | bins.Apply(histalphagrid);
|
---|
186 |
|
---|
187 | /*
|
---|
188 | #define n 100
|
---|
189 | Double_t binsize[n];
|
---|
190 | Float_t nmin = 100.;
|
---|
191 | Float_t nmax = 1e7;
|
---|
192 |
|
---|
193 | for(Int_t i=0; i<n; i++)
|
---|
194 | {
|
---|
195 | binsize[i] = pow(10., log10(nmin) + i * (log10(nmax) - log10(nmin)) / (n-1.));
|
---|
196 | }
|
---|
197 |
|
---|
198 | TH2F hist2wsize("Width-Size", "correlation Width-Size", 100, 0.0, 0.5, n-1, binsize);
|
---|
199 | TH2F hist2alphasize("Alpha-Size","correlation Alpha-Size", 100, -100., 100., n-1, binsize);
|
---|
200 | TH2F hist2distsize("Dist-Size","correlation Dist-Size", 100, 0.0, 1.6, n-1, binsize);
|
---|
201 | */
|
---|