Changeset 15527 for trunk/Mars/fact
- Timestamp:
- 05/07/13 23:35:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/fact/analysis/lightcurve.C
r15396 r15527 147 147 { 148 148 counter2++; 149 cout << "-----" << (*row2)[0] << " " << (*row2)[3] << endl; 149 150 ontime=(*row2)[0]; 150 151 bgevts=(*row2)[1]; … … 171 172 significance=MMath::SignificanceLiMa(sigevtssum, bgevtssum, 0.2); 172 173 cout << " significance: " << significance << endl; 173 cout << " excess: " << excevtssum << endl;174 cout << " bg: " << bgevtssum << endl;175 cout << " ontime: " << ontimesum /3600<< endl;176 cout << " excessrate: " << excevtssum/ontimesum*3600 << endl;177 cout << " bgrate: " << bgevtssum/ontimesum*3600 << endl;178 signifrate=significance/ ontimesum*3600;174 cout << " excess: " << excevtssum << " evts" << endl; 175 cout << " bg: " << bgevtssum << " evts" << endl; 176 cout << " ontime: " << ontimesum << " s " << endl; 177 cout << " excessrate: " << excevtssum/ontimesum*3600 << " evts/h" << endl; 178 cout << " bgrate: " << bgevtssum/ontimesum*3600 << " evts/h" << endl; 179 signifrate=significance/sqrt(ontimesum*3600); 179 180 bgrate=bgevtssum/ontimesum*3600; 180 181 excrate=excevtssum/ontimesum*3600; … … 185 186 mjd=mjdstart+(mjdstop-mjdstart)/2; 186 187 cout << " mjd: " << mjd << " (" << mjdstart << " - " << mjdstop << ") " << endl; 187 if ( mjd<50000)188 if (excrate>300) 188 189 cout << "==>" << (*row2)[0] << " " << (*row2)[1] << " " << (*row2)[2] 189 190 << " " << (*row2)[3] << " " << (*row2)[4] << " " << (*row2)[5] … … 227 228 228 229 } 229 230 cout << "reached last run" << endl; 231 // if ontime is larger than 90% of the timebin width, the last point is filled 232 if (ontimesum>(minutes-0.1*minutes)) 233 { 234 cout << "ontime > " << minutes-0.1*minutes << endl; 235 significance=MMath::SignificanceLiMa(sigevtssum, bgevtssum, 0.2); 236 cout << " significance: " << significance << endl; 237 cout << " excess: " << excevtssum << " evts" << endl; 238 cout << " bg: " << bgevtssum << " evts" << endl; 239 cout << " ontime: " << ontimesum << " s " << endl; 240 cout << " excessrate: " << excevtssum/ontimesum*3600 << " evts/h" << endl; 241 cout << " bgrate: " << bgevtssum/ontimesum*3600 << " evts/h" << endl; 242 signifrate=significance/sqrt(ontimesum*3600); 243 bgrate=bgevtssum/ontimesum*3600; 244 excrate=excevtssum/ontimesum*3600; 245 excerr = MMath::ErrorExc(significance, bgevtssum, 0.2)/ontimesum*3600.; 246 zdmean=zdmin+(zdmax-zdmin)/2; 247 mjdstop=stop.GetMjd(); 248 mjd=mjdstart+(mjdstop-mjdstart)/2; 249 cout << " mjd: " << mjd << " (" << mjdstart << " - " << mjdstop << ") " << endl; 250 251 exc.Fill(excrate); 252 bg.Fill(bgrate); 253 excessrate.SetPoint(counter, mjd, excrate); 254 excessrate.SetPointError(counter, ontimesum/3600./24/2, excerr); 255 backgroundrate.SetPoint(counter, mjd, bgrate); 256 backgroundrate.SetPointError(counter, ontimesum/3600./24/2, sqrt(bgevtssum)/ontimesum*3600); 257 excvszd.SetPoint(counter, zdmean, excrate); 258 excvszd.SetPointError(counter, (zdmax-zdmin)/2, excerr); 259 excvsbg.SetPoint(counter, bgrate, excrate); 260 excvsbg.SetPointError(counter, sqrt(bgevtssum)/ontimesum*3600, excerr); 261 bgvszd.SetPoint(counter, zdmean, bgrate); 262 bgvszd.SetPointError(counter, (zdmax-zdmin)/2, sqrt(bgevtssum)/ontimesum*3600); 263 signif.SetPoint(counter, mjd, significance); 264 signif.SetPointError(counter, ontimesum/3600./24/2, 0); 265 significancerate.SetPoint(counter, mjd, signifrate); 266 significancerate.SetPointError(counter, ontimesum/3600./24/2, 0); 267 } 230 268 delete res2; 231 269 } … … 238 276 239 277 TCanvas &c1 = d->AddTab("Rates vs MJD", "Rates vs MJD"); 278 gPad->SetGridy(); 240 279 excessrate.SetTitle("Rates vs MJD"); 241 280 excessrate.SetMarkerStyle(7); … … 244 283 excessrate.GetXaxis()->SetTitle("MJD"); 245 284 excessrate.GetXaxis()->CenterTitle(); 246 excessrate.GetYaxis()->SetRangeUser(-50, 200);285 excessrate.GetYaxis()->SetRangeUser(-50,400); 247 286 excessrate.DrawClone("AP"); 248 287 … … 254 293 255 294 TCanvas &c2 = d->AddTab("Excess Rate vs MJD", "Excess Rate vs MJD"); 295 gPad->SetGridy(); 256 296 excessrate.SetTitle("Excess Rate vs MJD"); 257 297 excessrate.SetMarkerStyle(7); … … 290 330 291 331 TCanvas &c6 = d->AddTab("Signifrate vs MJD", "Signifrate vs MJD"); 332 gPad->SetGridy(); 292 333 significancerate.SetTitle("Significance Rate vs MJD"); 293 334 significancerate.SetMarkerStyle(7);
Note:
See TracChangeset
for help on using the changeset viewer.