AnitaCanvasMaker.cxx
1 
9 #include <fstream>
10 #include <iostream>
11 #include "AnitaCanvasMaker.h"
12 #include "AnitaConventions.h"
13 #include "AnitaGeomTool.h"
14 #include "UsefulAnitaEvent.h"
15 #include "RawAnitaHeader.h"
16 #include "WaveformGraph.h"
17 #include "FFTGraph.h"
18 #include "AnalysisReco.h"
19 
20 #include "TH2D.h"
21 #include "TString.h"
22 #include "TObjArray.h"
23 #include "TObjString.h"
24 #include "TVector3.h"
25 #include "TROOT.h"
26 #include "TPaveText.h"
27 #include "TPad.h"
28 #include "TText.h"
29 #include "TLatex.h"
30 #include "TGraph.h"
31 #include "TStyle.h"
32 #include "TCanvas.h"
33 #include "TAxis.h"
34 #include "TH1.h"
35 #include "TList.h"
36 #include "TFile.h"
37 #include "TObject.h"
38 #include "TTimeStamp.h"
39 #include "TGeoManager.h"
40 #include "TGeoVolume.h"
41 #include "TView3D.h"
42 
43 #include "FFTtools.h"
44 #include "MagicDisplay.h"
45 
46 #include "FilteredAnitaEvent.h"
47 #include "AcclaimFilters.h"
48 
49 
51 Acclaim::AnalysisReco* AnitaCanvasMaker::reco = 0;
52 
53 // These classes are such a mess anyway, I might as well leave these here...
54 FilterStrategy* lastStrategy = NULL;
55 
56 
57 int phiMap[6][8]={{0,2,4,6,8,10,12,14},
58  {1,3,5,7,9,11,13,15},
59  {0,2,4,6,8,10,12,14},
60  {1,3,5,7,9,11,13,15},
61  {0,2,4,6,8,10,12,14},
62  {1,3,5,7,9,11,13,15}};
63 
64 
65 int rowMap[6]={0,0,1,1,2,2};
66 
73 
74 
75 WaveformGraph *grSurf[ACTIVE_SURFS][CHANNELS_PER_SURF]={{0}};
76 WaveformGraph *grSurfFiltered[ACTIVE_SURFS][CHANNELS_PER_SURF]={{0}};
77 WaveformGraph *grSurfHilbert[ACTIVE_SURFS][CHANNELS_PER_SURF]={{0}};
78 FFTGraph *grSurfFFT[ACTIVE_SURFS][CHANNELS_PER_SURF]={{0}};
79 FFTGraph *grSurfAveragedFFT[ACTIVE_SURFS][CHANNELS_PER_SURF]={{0}};
80 
81 
82 
84 {
85  //Default constructor
86  fPassBandFilter=0;
87  fNotchFilter=0;
88  fLowPassEdge=200;
89  fHighPassEdge=1200;
90  fLowNotchEdge=235;
91  fHighNotchEdge=500;
92  fMinVoltLimit=-60;
93  fMaxVoltLimit=60;
94  fPhiMax=0;
97  fMinClockVoltLimit=-200;
99  fAutoScale=1;
100  fAutoScaleNeg=1;
101  fMinTimeLimit=0;
102  fMaxTimeLimit=100;
103  fMinPowerLimit=-60;
104  fMaxPowerLimit=40;
105  fMinFreqLimit=0;
106  fMaxFreqLimit=1200;
110  //fRedoSurfCanvas=0;
113  fNewEvent=1;
114  fCalType=calType;
115  fgInstance=this;
116  memset(grSurf,0,sizeof(WaveformGraph*)*ACTIVE_SURFS*CHANNELS_PER_SURF);
117  memset(grSurfFiltered,0,sizeof(WaveformGraph*)*ACTIVE_SURFS*CHANNELS_PER_SURF);
118  memset(grSurfHilbert,0,sizeof(WaveformGraph*)*ACTIVE_SURFS*CHANNELS_PER_SURF);
119  memset(grSurfFFT,0,sizeof(FFTGraph*)*ACTIVE_SURFS*CHANNELS_PER_SURF);
120  memset(grSurfAveragedFFT,0,sizeof(FFTGraph*)*ACTIVE_SURFS*CHANNELS_PER_SURF);
121  fAnitaGeomFile=0;
122  fAnitaGeomManager=0;
123  switch(fCalType) {
126  fMinTimeLimit=0;
127  fMaxTimeLimit=260;
128  break;
130  fMinVoltLimit=0;
131  fMaxVoltLimit=2000;
132  fAutoScaleNeg=0;
133  break;
134  default:
135  break;
136  }
137 
138  //RJN chnge to try and speed up web plotter
139  reco = NULL;
140 }
141 
143 {
144  if(reco) {
145  delete reco;
146  }
147  //Default destructor
148 }
149 
150 
151 
152 //______________________________________________________________________________
154 {
155  //static function
157 }
158 
159 
160 TPad *AnitaCanvasMaker::getEventInfoCanvas(const UsefulAnitaEvent *evPtr, const RawAnitaHeader *hdPtr, const Adu5Pat *pat, TPad *useCan)
161 {
162  static UInt_t lastEventNumber=0;
163  static TPaveText *leftPave=0;
164  static TPaveText *midLeftPave=0;
165  static TPaveText *midRightPave=0;
166  static TPaveText *rightPave=0;
167  static TPaveText *farRightPave=0;
168 
169 
170  AnitaGeomTool * fACMGeomTool=AnitaGeomTool::Instance();
171  char textLabel[180];
172  TPad *topPad;
173  if(!useCan) {
174  topPad = new TPad("padEventInfo","padEventInfo",0.2,0.9,0.8,1);
175  topPad->Draw();
176  }
177  else {
178  topPad=useCan;
179  }
180  if(hdPtr->eventNumber != lastEventNumber) {
181  fNewEvent=1;
182  topPad->Clear();
183  topPad->SetTopMargin(0.05);
184  topPad->Divide(5,1);
185 
186  topPad->cd(1);
187  if(leftPave) delete leftPave;
188  leftPave = new TPaveText(0,0,1,0.9);
189  leftPave->SetName("leftPave");
190  leftPave->SetBorderSize(0);
191  leftPave->SetFillColor(0);
192  leftPave->SetTextAlign(13);
193  sprintf(textLabel,"ANITA %d",AnitaVersion::get());
194  TText *flightText = leftPave->AddText(textLabel);
195  flightText->SetTextColor(50);
196  sprintf(textLabel,"Run: %d",hdPtr->run);
197  TText *runText = leftPave->AddText(textLabel);
198  runText->SetTextColor(50);
199  sprintf(textLabel,"Event: %d",hdPtr->eventNumber);
200  TText *eventText = leftPave->AddText(textLabel);
201  eventText->SetTextColor(50);
202  leftPave->Draw();
203 
204 
205  topPad->cd(2);
206  gPad->SetRightMargin(0);
207  gPad->SetLeftMargin(0);
208  if(midLeftPave) delete midLeftPave;
209  midLeftPave = new TPaveText(0,0,0.99,0.9);
210  midLeftPave->SetName("midLeftPave");
211  midLeftPave->SetBorderSize(0);
212  midLeftPave->SetTextAlign(13);
213  TTimeStamp trigTime((time_t)hdPtr->triggerTime,(Int_t)hdPtr->triggerTimeNs);
214  sprintf(textLabel,"Time: %s",trigTime.AsString("s"));
215  TText *timeText = midLeftPave->AddText(textLabel);
216  timeText->SetTextColor(1);
217  sprintf(textLabel,"Trigger: %8.6f ms",1e-6*hdPtr->triggerTimeNs);
218  TText *timeText2 = midLeftPave->AddText(textLabel);
219  timeText2->SetTextColor(1);
220  sprintf(textLabel,"Priority: %d -- Queue: %d",(hdPtr->priority&0xf0)/16,hdPtr->priority&0xf);
221  midLeftPave->AddText(textLabel);
222  // sprintf(textLabel,"Lab Chip %d",labChip);
223  // midLeftPave->AddText(textLabel);
224  midLeftPave->Draw();
225  // midLeftPave->Modified();
226  gPad->Modified();
227  gPad->Update();
228 
229  topPad->cd(3);
230  if(midRightPave) delete midRightPave;
231  midRightPave = new TPaveText(0,0,1,0.95);
232  midRightPave->SetBorderSize(0);
233  midRightPave->SetTextAlign(13);
234  sprintf(textLabel,"Trig Num: %d -- Trig Type: %s",hdPtr->trigNum,hdPtr->trigTypeAsString());
235  midRightPave->AddText(textLabel);
236  if(hdPtr->errorFlag&0x1) {
237  TText *slipText = midRightPave->AddText("Possible Sync Slip");
238  slipText->SetTextColor(6);
239  }
240  sprintf(textLabel,"TURF: %d",hdPtr->turfEventId&0xfffff);
241  midRightPave->AddText(textLabel);
242  for(int surf=0;surf<ACTIVE_SURFS;surf++) {
243  sprintf(textLabel,"SURF %d: %d",surf+1,evPtr->surfEventId[surf]&0xfffff);
244 
245  if(evPtr->surfEventId[surf]!=hdPtr->turfEventId) {
246  TText *slipText = midRightPave->AddText(textLabel);
247  slipText->SetTextColor(6);
248  }
249  }
250  midRightPave->Draw();
251 
252 
253  topPad->cd(4);
254  if(rightPave) delete rightPave;
255  rightPave = new TPaveText(0,0,1,0.95);
256  rightPave->SetBorderSize(0);
257  rightPave->SetTextAlign(13);
258  // sprintf(textLabel,"TURF This Hold: %#x",hdPtr->reserved[0]&0xf);
259  // rightPave->AddText(textLabel);
260  // sprintf(textLabel,"TURF Active Holds: %#x",(hdPtr->reserved[0]&0xf0)>>4);
261  // rightPave->AddText(textLabel);
262  sprintf(textLabel,"Trig Mask: %#x",hdPtr->l3TrigPattern);
263  rightPave->AddText(textLabel);
264  // sprintf(textLabel,"H Trig Mask: %#x",hdPtr->l3TrigPatternH);
265  // rightPave->AddText(textLabel);
266 
267  char labLetter[4]={'A','B','C','D'};
268  sprintf(textLabel,"Labrador ");
269 
270  int good=1;
271  for(int surf=0;surf<ACTIVE_SURFS;surf++) {
272  sprintf(textLabel,"%s%c",textLabel,labLetter[evPtr->getLabChip(1+ 9*surf)]);
273  if(evPtr->getLabChip(10) != evPtr->getLabChip(9*surf + 1))
274  good=0;
275  }
276  TText *labText=rightPave->AddText(textLabel);
277  if(!good)
278  labText->SetTextColor(6);
279 
280  sprintf(textLabel,"Peak Phi: %3.1f",(hdPtr->getPeakPhiDeg()));
281  rightPave->AddText(textLabel);
282  sprintf(textLabel,"Peak Theta: %3.1f",(hdPtr->getPeakThetaDeg()));
283  rightPave->AddText(textLabel);
284  rightPave->Draw();
285 
286 
287  topPad->cd(5);
288  if(farRightPave) delete farRightPave;
289  farRightPave = new TPaveText(0,0,1,0.95);
290  farRightPave->SetBorderSize(0);
291  farRightPave->SetTextAlign(13);
292 
293  sprintf(textLabel,"Heading %3.1f",pat->heading);
294  farRightPave->AddText(textLabel);
295 
296  sprintf(textLabel,"Latitude %3.1f",pat->latitude);
297  farRightPave->AddText(textLabel);
298 
299  sprintf(textLabel,"Longitude %3.1f",pat->longitude);
300  farRightPave->AddText(textLabel);
301 
302  sprintf(textLabel,"Altitude %3.1f",pat->altitude);
303  farRightPave->AddText(textLabel);
304 
305  farRightPave->Draw();
306 
307  topPad->Update();
308  topPad->Modified();
309 
310 
311  lastEventNumber=hdPtr->eventNumber;
312  }
313 
314  return topPad;
315 }
316 
317 
319 {
320  TPad *retCan=0;
321 
322  // static Int_t lastEventView=0;
323 
324  if(fAutoScale) {
325  fMinVoltLimit=0;
326  fMaxVoltLimit=0;
331  }
332 
333 
334  for(int surf=0;surf<ACTIVE_SURFS;surf++){
335  for(int chan=0;chan<CHANNELS_PER_SURF;chan++){
336 
337  if(grSurf[surf][chan]){
338  delete grSurf[surf][chan];
339  //grSurf[surf][chan]=0;
340  }
341 
342 
343  TGraph *grTemp = evPtr->getGraphFromSurfAndChan(surf,chan);
344  grSurf[surf][chan] = new WaveformGraph(grTemp->GetN(),grTemp->GetX(),grTemp->GetY());
345  // std::cout << hdPtr->eventNumber << "\n";
346  // std::cout << surf << "\t" << chan << "\t"
347  // << grSurf[surf][chan]->GetRMS(2) << std::endl;
348 
349  if(fAutoScale) {
350  Int_t numPoints=grTemp->GetN();
351  Double_t *yVals=grTemp->GetY();
352 
353  if(chan<8) {
354  int ant=0;
356  AnitaGeomTool::getAntPolFromSurfChan(surf,chan,ant,pol);
357 
358  for(int i=0;i<numPoints;i++) {
359 
360  if(yVals[i]<fMinVoltLimit)
361  fMinVoltLimit=yVals[i];
362  if(yVals[i]>fMaxVoltLimit)
363  fMaxVoltLimit=yVals[i];
364 
365  if(pol==AnitaPol::kVertical) {
366  if(yVals[i]<fMinVertVoltLimit)
367  fMinVertVoltLimit=yVals[i];
368  if(yVals[i]>fMaxVertVoltLimit) {
369  fMaxVertVoltLimit=yVals[i];
370  }
371 
372  }
373  }
374  }
375  else {
376  for(int i=0;i<numPoints;i++) {
377  if(yVals[i]<fMinClockVoltLimit)
378  fMinClockVoltLimit=yVals[i];
379  if(yVals[i]>fMaxClockVoltLimit)
380  fMaxClockVoltLimit=yVals[i];
381  }
382  }
383 
384  }
385 
386  delete grTemp;
387 
388  }
389  }
390 
391  if(fAutoScale) {
394  }
395  else {
397  }
398 
401  }
402  else {
404  }
405 
408  }
409  else {
411  }
412  }
413 
414 
416 
417  // retCan=AnitaCanvasMaker::getVerticalCanvasForWebPlotter(hdPtr,useCan);
418  retCan=AnitaCanvasMaker::getCombinedCanvasForWebPlotter(hdPtr,useCan);
419 
420 
421 
422  return retCan;
423 
424 }
425 
426 
427 
428 
429 TPad *AnitaCanvasMaker::getEventViewerCanvas(FilteredAnitaEvent* fEv, TPad *useCan, bool forceRedo){
430  // std::cerr << __PRETTY_FUNCTION__ << std::endl;
431 
432  const UsefulAnitaEvent* evPtr = fEv->getUsefulAnitaEvent();
433  // const Adu5Pat* pat = fEv->getGPS();
434  const RawAnitaHeader* hdPtr = fEv->getHeader();
435 
436  TPad *retCan=0;
437  static UInt_t lastEventNumber=0;
438 
439  if(forceRedo || evPtr->eventNumber!=lastEventNumber || fWaveformOption!=fLastWaveformFormat || MagicDisplay::Instance()->getStrategy() != lastStrategy) {
440 
441  // if(fEv){
442  // delete fEv;
443  // fEv = NULL;
444  // }
445  // fEv = new FilteredAnitaEvent(evPtr, MagicDisplay::Instance()->getStrategy(), pat, hdPtr);
446 
447  lastEventNumber=evPtr->eventNumber;
448  lastStrategy = MagicDisplay::Instance()->getStrategy();
449 
450  if(fAutoScale) {
451  fMinVoltLimit=0;
452  fMaxVoltLimit=0;
457  }
458 
459  Double_t maxVal=0;
460 
461  for(int surf=0;surf<ACTIVE_SURFS;surf++){
462  for(int chan=0;chan<CHANNELS_PER_SURF;chan++){
463 
464  if(grSurf[surf][chan]){
465  delete grSurf[surf][chan];
466  grSurf[surf][chan]=0;
467  }
468  if(grSurfHilbert[surf][chan]) {
469  delete grSurfHilbert[surf][chan];
470  grSurfHilbert[surf][chan]=0;
471  }
472 
473  if(grSurfFFT[surf][chan]){
474  delete grSurfFFT[surf][chan];
475  grSurfFFT[surf][chan]=0;
476  }
477 
478  if(grSurfFiltered[surf][chan]) {
479  delete grSurfFiltered[surf][chan];
480  grSurfFiltered[surf][chan]=0;
481  }
482 
483  TGraph *grTemp = NULL;
484  int ant = -1;
486 
487  if(chan==CHANNELS_PER_SURF-1) // last channel is the clock
488  {
489  grTemp = evPtr->getGraphFromSurfAndChan(surf,chan);
490  }
491  else{ // regular channel
492  AnitaGeomTool::getAntPolFromSurfChan(surf,chan,ant,pol);
493  const AnalysisWaveform* wf = fEv->getFilteredGraph(ant, pol);
494  const TGraphAligned* gr = wf->even();
495  grTemp = new TGraph(gr->GetN(), gr->GetX(), gr->GetY());
496  }
497 
498  // std::cout << surf << "\t" << chan << "\t" << grTemp << "\t" << ant << "\t" << pol << "\t" << std::endl;
499 
500  if(grTemp==NULL || grTemp->GetN()==0){
501  //std::cout << "Skipping this. If you're using MC you're fine. If you're not using data, there's something wrong." << std::endl;
502  continue;
503  }
504 
505 
506  // This section just finds min/max voltages for setting the axes of the displayed graphs
508  Int_t numPoints=grTemp->GetN();
509  Double_t *yVals=grTemp->GetY();
510 
511 
512  if(chan<CHANNELS_PER_SURF-1) // ignore clock
513  {
514  Int_t phi=AnitaGeomTool::getPhiFromAnt(ant);
515 
516  for(int i=0;i<numPoints;i++) {
517 
518  // find the absolute max/min
519  if(yVals[i]<fMinVoltLimit){
520  fMinVoltLimit=yVals[i];
521  }
522  if(yVals[i]>fMaxVoltLimit){
523  fMaxVoltLimit=yVals[i];
524  }
525 
526  // find the maximum/minimum for VPol only
527  if(pol==AnitaPol::kVertical)
528  {
529  if(yVals[i] < fMinVertVoltLimit){
530  fMinVertVoltLimit = yVals[i];
531  }
532 
533  if(yVals[i] > fMaxVertVoltLimit){
534  fMaxVertVoltLimit = yVals[i];
535  }
536 
537  // find the maximum phi sector (VPol only)
538  if(yVals[i] > maxVal){
539  maxVal=yVals[i];
540  fPhiMax=phi;
541  }
542  }
543  }
544  }
545  else // now find the clock maxima/minima
546  {
547 
548  for(int i=0;i<numPoints;i++){
549  if(yVals[i]<fMinClockVoltLimit){
550  fMinClockVoltLimit=yVals[i];
551  }
552  if(yVals[i]>fMaxClockVoltLimit){
553  fMaxClockVoltLimit=yVals[i];
554  }
555  }
556  }
557  }
558 
559  if(fPassBandFilter) {
560  TGraph *grDoubleTemp= FFTtools::simplePassBandFilter(grTemp,fLowPassEdge,fHighPassEdge);
561  delete grTemp;
562  grTemp=grDoubleTemp;
563  }
564  if(fNotchFilter) {
565  TGraph *grDoubleTemp= FFTtools::simpleNotchFilter(grTemp,fLowNotchEdge,fHighNotchEdge);
566  delete grTemp;
567  grTemp=grDoubleTemp;
568  }
569 
570  grSurf[surf][chan] = new WaveformGraph(grTemp->GetN(),grTemp->GetX(),grTemp->GetY());
572  TGraph *grTempFFT = grSurf[surf][chan]->getFFT();
573  grSurfFFT[surf][chan] = new FFTGraph(grTempFFT->GetN(),grTempFFT->GetX(),grTempFFT->GetY());
574  delete grTempFFT;
575  }
577  TGraph *grTempHilbert = grSurf[surf][chan]->getHilbert();
578  grSurfHilbert[surf][chan] = new WaveformGraph(grTempHilbert->GetN(),grTempHilbert->GetX(),grTempHilbert->GetY());
579  delete grTempHilbert;
580  }
582  TGraph *grTempFFT = grSurf[surf][chan]->getFFT();
583  grSurfFFT[surf][chan] = new FFTGraph(grTempFFT->GetN(),grTempFFT->GetX(),grTempFFT->GetY());
584  if(!grSurfAveragedFFT[surf][chan]) {
585  grSurfAveragedFFT[surf][chan] = new FFTGraph(grTempFFT->GetN(),grTempFFT->GetX(),grTempFFT->GetY());
586  }
587  else {
588  grSurfAveragedFFT[surf][chan]->AddFFT(grSurfFFT[surf][chan]);
589  }
590  delete grTempFFT;
591  }
592  delete grTemp;
593  }
594  }
595  }
596 
597  if(fAutoScale) {
598  if(fAutoScaleNeg) {
601  }
602  else {
604  }
605  }
606 
609  }
610  else {
612  }
613 
616  }
617  else {
619  }
620 
621  }
622 
623  TruthAnitaEvent* truth = MagicDisplay::Instance()->fDataset->truth();
624  if(fCanvasView==MagicDisplayCanvasLayoutOption::kInterferometry){
625 
626  if(!reco){
627  reco = &getAnalysisReco();
628  }
629 
630  AnitaEventSummary sum;
631  // std::cerr << "before" << "\t" << fEv->eventNumber << "\t" << std::endl;
632  reco->process(fEv, &sum, NULL, truth);
633  // std::cerr << fEv << "\t" << pat << "\t" << &sum << "\t" << truth << std::endl;
634  // std::cerr << "after" << "\t" << fEv->eventNumber << "\t" << std::endl;
635  }
636 
637  if (fCanvasView==MagicDisplayCanvasLayoutOption::kUCorrelator)
638  {
639  AnitaEventSummary sum;
640  MagicDisplay::Instance()->getUCorr()->analyze(fEv,&sum, truth);
641  }
642 
643 
644  fNewEvent=0;
645 
649  // if(fLastInterferometryMapMode!=fInterferometryMapMode)fRedoEventCanvas=1;
650  // if(fLastInterferometryZoomMode!=fInterferometryZoomMode)fRedoEventCanvas=1;
651 
652 
653  if(fCanvasView==MagicDisplayCanvasLayoutOption::kPhiVerticalOnly) retCan=AnitaCanvasMaker::getVerticalCanvas(hdPtr,useCan);
654  else if(fCanvasView==MagicDisplayCanvasLayoutOption::kPhiHorizontalOnly) retCan=AnitaCanvasMaker::getHorizontalCanvas(hdPtr,useCan);
655  else if(fCanvasView==MagicDisplayCanvasLayoutOption::kPhiCombined) retCan=AnitaCanvasMaker::getCombinedCanvas(hdPtr,useCan);
656  else if(fCanvasView==MagicDisplayCanvasLayoutOption::kSurfOnly) retCan=AnitaCanvasMaker::getSurfChanCanvas(hdPtr,useCan);
657  else if(fCanvasView==MagicDisplayCanvasLayoutOption::kPayloadView) retCan=AnitaCanvasMaker::getPayloadCanvas(hdPtr,useCan);
658  else if(fCanvasView==MagicDisplayCanvasLayoutOption::kInterferometry) retCan=AnitaCanvasMaker::getInterferometryCanvas(hdPtr,useCan);
659  else if(fCanvasView==MagicDisplayCanvasLayoutOption::kUCorrelator) retCan=AnitaCanvasMaker::getUCorrelatorCanvas(hdPtr,useCan);
660 
663  // fLastInterferometryMapMode=fInterferometryMapMode;
664  // fLastInterferometryZoomMode=fInterferometryZoomMode;
665  return retCan;
666 
667 }
668 
669 
670 
671 TPad *AnitaCanvasMaker::getHorizontalCanvas(const RawAnitaHeader *hdPtr,
672  TPad *useCan)
673 
674 {
675  // gStyle->SetTitleH(0.1);
676  gStyle->SetOptTitle(0);
677 
678  AnitaGeomTool* fACMGeomTool=AnitaGeomTool::Instance();
679  char textLabel[180];
680  char padName[180];
681  TPad *canHoriz=0;
682  TPad *plotPad=0;
683  if(!useCan) {
684  canHoriz = (TPad*) gROOT->FindObject("canHoriz");
685  if(!canHoriz) {
686  canHoriz = new TCanvas("canHoriz","canHoriz",1000,600);
687  }
688  canHoriz->Clear();
689  canHoriz->SetTopMargin(0);
690  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
691  leftPave->SetBorderSize(0);
692  sprintf(textLabel,"Event %d",hdPtr->eventNumber);
693  TText *eventText = leftPave->AddText(textLabel);
694  eventText->SetTextColor(50);
695  leftPave->Draw();
696  plotPad = new TPad("canHorizMain","canHorizMain",0,0,1,0.9);
697  plotPad->Draw();
698  }
699  else {
700  plotPad=useCan;
701  }
702  plotPad->cd();
703  setupPhiPadWithFrames(plotPad);
704 
705 
706  // Top
707  // 1 3 5 7 9 11 13 15
708  // 2 4 6 8 10 12 14 16
709  // Middle
710  // 1 3 5 7 9 11 13 15
711  // 2 4 6 8 10 12 14 16
712 
713  int count=0;
714 
715 
716  for(int column=0;column<8;column++) {
717  for(int row=0;row<6;row++) {
718  plotPad->cd();
719  int phi=phiMap[row][column];
720  // int ring=rowMap[row];
721  int ant=0;//=antMap[ring][phi];
722  int surf=0;//=surfMap[ant];
723  int chan=0;//=chanMap[ant];
724 
725  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
727  surf,chan,ant);
728 
729  sprintf(padName,"phiChanPad%d",count);
730  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
731  paddy1->SetEditable(kTRUE);
732  if(chan>4)
733  deleteTGraphsFromPad(paddy1,surf,chan,chan-4);
734  else
735  deleteTGraphsFromPad(paddy1,surf,chan,chan+4);
736  paddy1->cd();
737 
738 
739  if(hdPtr->isInL3Pattern(phi,AnitaPol::kHorizontal)){
740  grSurf[surf][chan]->SetLineColor(kRed-3);
741  }
742  else{
743  grSurf[surf][chan]->SetLineColor(kBlack);
744  }
745 
746 
747  // if(hdPtr->isInPhiMask(phi,AnitaPol::kHorizontal) || hdPtr->isInL1Mask(phi,AnitaPol::kHorizontal)) {
748  // grSurf[surf][chan]->SetLineStyle(2);
749  // }
750  // else {
751  // grSurf[surf][chan]->SetLineStyle(1);
752  // }
753 
754 
755  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
757  ringMap[row]);
758 
759 
760 
762  grSurfFFT[surf][chan]->Draw("l");
763 
764  grSurfFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
766  ringMap[row]);
767  }
769  grSurfAveragedFFT[surf][chan]->Draw("l");
770 
771  grSurfAveragedFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
773  ringMap[row]);
774  }
776 
777  grSurfHilbert[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
779  ringMap[row]);
780  grSurfHilbert[surf][chan]->Draw("l");
781  }
783  grSurf[surf][chan]->Draw("l");
784 
785  if(fAutoScale) {
786  TList *listy = gPad->GetListOfPrimitives();
787  for(int i=0;i<listy->GetSize();i++) {
788  TObject *fred = listy->At(i);
789  TH1F *tempHist = (TH1F*) fred;
790  if(tempHist->InheritsFrom("TH1")) {
791  tempHist->GetYaxis()->SetRangeUser(fMinVoltLimit,fMaxVoltLimit);
792  }
793  }
794  }
795 
796  }
797 
798 
799  count++;
800  paddy1->SetEditable(kFALSE);
801  }
802  }
803 
804  if(!useCan)
805  return canHoriz;
806  else
807  return plotPad;
808 
809 }
810 
811 TPad *AnitaCanvasMaker::getVerticalCanvas(const RawAnitaHeader *hdPtr,
812  TPad *useCan)
813 {
814  // gStyle->SetTitleH(0.1);
815  gStyle->SetOptTitle(0);
816 
817  AnitaGeomTool* fACMGeomTool=AnitaGeomTool::Instance();
818  char textLabel[180];
819  char padName[180];
820  TPad *canVert=0;
821  TPad *plotPad=0;
822  if(!useCan) {
823  canVert = (TPad*) gROOT->FindObject("canVert");
824  if(!canVert) {
825  canVert = new TCanvas("canVert","canVert",1000,600);
826  }
827  canVert->Clear();
828  canVert->SetTopMargin(0);
829  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
830  leftPave->SetBorderSize(0);
831  sprintf(textLabel,"Run %d, Event %d",hdPtr->run,hdPtr->eventNumber);
832  TText *eventText = leftPave->AddText(textLabel);
833  eventText->SetTextColor(50);
834  leftPave->Draw();
835  plotPad = new TPad("canVertMain","canVertMain",0,0,1,0.9);
836  plotPad->Draw();
837  }
838  else {
839  plotPad=useCan;
840  }
841  plotPad->cd();
842  setupPhiPadWithFrames(plotPad);
843 
844 
845  // Top
846  // 1 3 5 7 9 11 13 15
847  // 2 4 6 8 10 12 14 16
848  // Middle
849  // 1 3 5 7 9 11 13 15
850  // 2 4 6 8 10 12 14 16
851 
852  int count=0;
853 
854 
855  for(int column=0;column<8;column++) {
856  for(int row=0;row<6;row++) {
857  plotPad->cd();
858  int phi=phiMap[row][column];
859  // int ring=rowMap[row];
860  int ant=0;//=antMap[ring][phi];
861  int surf=0;//=surfMap[ant];
862  int chan=0;//=chanMap[ant];
863 
864  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
866  surf,chan,ant);
867 
868  sprintf(padName,"phiChanPad%d",count);
869  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
870  paddy1->SetEditable(kTRUE);
871  if(chan>4)
872  deleteTGraphsFromPad(paddy1,surf,chan,chan-4);
873  else
874  deleteTGraphsFromPad(paddy1,surf,chan,chan+4);
875  paddy1->cd();
876 
877 
878  if(hdPtr->isInL3Pattern(phi,AnitaPol::kVertical))
879  grSurf[surf][chan]->SetLineColor(kRed-3);
880 
881 
882  // if(hdPtr->isInPhiMask(phi,AnitaPol::kVertical) || hdPtr->isInL1Mask(phi,AnitaPol::kVertical) ) {
883  // grSurf[surf][chan]->SetLineStyle(2);
884  // }
885  // else {
886  // grSurf[surf][chan]->SetLineStyle(1);
887  // }
888 
889 
890  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
892  ringMap[row]);
893 
894 
896  grSurfFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
898  ringMap[row]);
899  grSurfFFT[surf][chan]->Draw("l");
900  }
902  grSurfAveragedFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
904  ringMap[row]);
905  grSurfAveragedFFT[surf][chan]->Draw("l");
906  }
908 
909  grSurfHilbert[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
911  ringMap[row]);
912  grSurfHilbert[surf][chan]->Draw("l");
913  }
915  grSurf[surf][chan]->Draw("l");
916 
917  if(fAutoScale) {
918  TList *listy = gPad->GetListOfPrimitives();
919  for(int i=0;i<listy->GetSize();i++) {
920  TObject *fred = listy->At(i);
921  TH1F *tempHist = (TH1F*) fred;
922  if(tempHist->InheritsFrom("TH1")) {
923  if(chan<8) {
924  tempHist->GetYaxis()->SetRangeUser(fMinVertVoltLimit,fMaxVertVoltLimit);
925  }
926  else {
927  tempHist->GetYaxis()->SetRangeUser(fMinClockVoltLimit,fMaxClockVoltLimit);
928  }
929  }
930  }
931  }
932  }
933 
934 
935  count++;
936  paddy1->SetEditable(kFALSE);
937  }
938  }
939 
940  if(!useCan)
941  return canVert;
942  else
943  return plotPad;
944 
945 
946 }
947 
948 
949 TPad *AnitaCanvasMaker::getVerticalCanvasForWebPlotter(const RawAnitaHeader *hdPtr,
950  TPad *useCan)
951 {
952  // gStyle->SetTitleH(0.1);
953  gStyle->SetOptTitle(0);
954 
955  AnitaGeomTool * fACMGeomTool=AnitaGeomTool::Instance();
956  char textLabel[180];
957  char padName[180];
958  TPad *canVert=0;
959  TPad *plotPad=0;
960  if(!useCan) {
961  canVert = (TPad*) gROOT->FindObject("canVert");
962  if(!canVert) {
963  canVert = new TCanvas("canVert","canVert",1000,600);
964  }
965  canVert->Clear();
966  canVert->SetTopMargin(0);
967  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
968  leftPave->SetBorderSize(0);
969  sprintf(textLabel,"Run %d, Event %d",hdPtr->run,hdPtr->eventNumber);
970  TText *eventText = leftPave->AddText(textLabel);
971  eventText->SetTextColor(50);
972  leftPave->Draw();
973  plotPad = new TPad("canVertMain","canVertMain",0,0,1,0.9);
974  plotPad->Draw();
975  }
976  else {
977  plotPad=useCan;
978  }
979  plotPad->cd();
980  setupPhiPadWithFrames(plotPad);
981 
982 
983  // Top
984  // 1 3 5 7 9 11 13 15
985  // 2 4 6 8 10 12 14 16
986  // Middle
987  // 1 3 5 7 9 11 13 15
988  // 2 4 6 8 10 12 14 16
989 
990  int count=0;
991 
992 
993  // std::cout << hdPtr->eventNumber << "\t" << hdPtr->l3TrigPattern << std::endl;
994  for(int column=0;column<8;column++) {
995  for(int row=0;row<6;row++) {
996  plotPad->cd();
997  int phi=phiMap[row][column];
998  // int ring=rowMap[row];
999  int ant=0;//=antMap[ring][phi];
1000  int surf=0;//=surfMap[ant];
1001  int chan=0;//=chanMap[ant];
1002 
1003  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
1004  phi,AnitaPol::kVertical,
1005  surf,chan,ant);
1006 
1007  sprintf(padName,"phiChanPad%d",count);
1008  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
1009  paddy1->SetEditable(kTRUE);
1010  if(chan<4)
1011  deleteTGraphsFromPad(paddy1,surf,chan,chan+4);
1012  else
1013  deleteTGraphsFromPad(paddy1,surf,chan,chan-4);
1014  paddy1->cd();
1015 
1016  // std::cout << phi << "\t" << ring << "\t" << surf << "\t"
1017  // << chan << "\t" << grSurf[surf][chan]->GetRMS(2) << "\n";
1018 
1019 
1020 
1021  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1023  ringMap[row]);
1024 
1025  if(hdPtr->isInL3Pattern(phi,AnitaPol::kVertical))
1026  grSurf[surf][chan]->SetLineColor(kRed-3);
1027 
1028 
1029  // if(hdPtr->isInPhiMask(phi,AnitaPol::kVertical) || hdPtr->isInL1Mask(phi,AnitaPol::kVertical)) {
1030  // grSurf[surf][chan]->SetLineStyle(2);
1031  // }
1032  // else {
1033  // grSurf[surf][chan]->SetLineStyle(1);
1034  // }
1035 
1036  grSurf[surf][chan]->Draw("l");
1037 
1038  if(fAutoScale) {
1039  TList *listy = gPad->GetListOfPrimitives();
1040  for(int i=0;i<listy->GetSize();i++) {
1041  TObject *fred = listy->At(i);
1042  TH1F *tempHist = (TH1F*) fred;
1043  if(tempHist->InheritsFrom("TH1")) {
1044  if(chan<8) {
1045  tempHist->GetYaxis()->SetRangeUser(fMinVertVoltLimit,fMaxVertVoltLimit);
1046  }
1047  else {
1048  tempHist->GetYaxis()->SetRangeUser(fMinClockVoltLimit,fMaxClockVoltLimit);
1049  }
1050  }
1051  }
1052  }
1053 
1054 
1055  count++;
1056  paddy1->SetEditable(kFALSE);
1057  }
1058  }
1059 
1060  if(!useCan)
1061  return canVert;
1062  else
1063  return plotPad;
1064 
1065 
1066 }
1067 
1068 
1069 TPad *AnitaCanvasMaker::getCombinedCanvasForWebPlotter(const RawAnitaHeader *hdPtr,
1070  TPad *useCan)
1071 {
1072  // gStyle->SetTitleH(0.1);
1073  gStyle->SetOptTitle(0);
1074 
1075  AnitaGeomTool * fACMGeomTool=AnitaGeomTool::Instance();
1076  char textLabel[180];
1077  char padName[180];
1078  TPad *canBoth=0;
1079  TPad *plotPad=0;
1080  if(!useCan) {
1081  canBoth = (TPad*) gROOT->FindObject("canBoth");
1082  if(!canBoth) {
1083  canBoth = new TCanvas("canBoth","canBoth",1000,600);
1084  }
1085  canBoth->Clear();
1086  canBoth->SetTopMargin(0);
1087  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
1088  leftPave->SetBorderSize(0);
1089  sprintf(textLabel,"Run %d, Event %d",hdPtr->run,hdPtr->eventNumber);
1090  TText *eventText = leftPave->AddText(textLabel);
1091  eventText->SetTextColor(50);
1092  leftPave->Draw();
1093  plotPad = new TPad("canBothMain","canBothMain",0,0,1,0.9);
1094  plotPad->Draw();
1095  }
1096  else {
1097  plotPad=useCan;
1098  }
1099  plotPad->cd();
1100  setupPhiPadWithFrames(plotPad);
1101 
1102 
1103  // Top
1104  // 1 3 5 7 9 11 13 15
1105  // 2 4 6 8 10 12 14 16
1106  // Middle
1107  // 1 3 5 7 9 11 13 15
1108  // 2 4 6 8 10 12 14 16
1109 
1110  int count=0;
1111 
1112 
1113  // std::cout << hdPtr->eventNumber << "\t" << hdPtr->l3TrigPattern << std::endl;
1114  Bool_t moreVpol=true;
1115  int countH=0;
1116  int countV=0;
1117  for(int phi=0;phi<NUM_PHI;phi++) {
1118  if(hdPtr->isInL3Pattern(phi,AnitaPol::kVertical)) countV++;
1119  if(hdPtr->isInL3Pattern(phi,AnitaPol::kHorizontal)) countH++;
1120  }
1121  if(countH>countV) moreVpol=false;
1122 
1123 
1124  for(int column=0;column<8;column++) {
1125  for(int row=0;row<6;row++) {
1126  plotPad->cd();
1127  int phi=phiMap[row][column];
1128  // int ring=rowMap[row];
1129  int ant=0;//=antMap[ring][phi];
1130  int surf=0;//=surfMap[ant];
1131  int chan=0;//=chanMap[ant];
1132  int surfH=0;//=surfMap[ant];
1133  int chanH=0;//=chanMap[ant];
1134  int antH=0;//=antMap[ring][phi];
1135 
1136  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
1137  phi,AnitaPol::kVertical,
1138  surf,chan,ant);
1139  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
1141  surfH,chanH,antH);
1142 
1143  sprintf(padName,"phiChanPad%d",count);
1144  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
1145  paddy1->SetEditable(kTRUE);
1146  deleteTGraphsFromPad(paddy1,surf,chanH,chan);
1147  paddy1->cd();
1148 
1149  // std::cout << phi << "\t" << ring << "\t" << surf << "\t"
1150  // << chan << "\t" << grSurf[surf][chan]->GetRMS(2) << "\n";
1151 
1152  grSurf[surf][chan]->SetLineColor(kBlack);
1153  grSurf[surfH][chanH]->SetLineColor(kBlue);
1154 
1155  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1157  ringMap[row]);
1158  grSurf[surfH][chanH]->setSurfChanPhiAntPolRing(surfH,chanH,phi,antH,
1160  ringMap[row]);
1161 
1162  if(hdPtr->isInL3Pattern(phi,AnitaPol::kVertical))
1163  grSurf[surf][chan]->SetLineColor(kRed-3);
1164  if(hdPtr->isInL3Pattern(phi,AnitaPol::kHorizontal))
1165  grSurf[surfH][chanH]->SetLineColor(kGreen-3);
1166  // if(hdPtr->isInPhiMask(phi,AnitaPol::kVertical) || hdPtr->isInL1Mask(phi,AnitaPol::kVertical) ) {
1167  // grSurf[surf][chan]->SetLineStyle(2);
1168  // }
1169  // else {
1170  // grSurf[surf][chan]->SetLineStyle(1);
1171  // }
1172  // if(hdPtr->isInPhiMask(phi,AnitaPol::kHorizontal) || hdPtr->isInL1Mask(phi,AnitaPol::kHorizontal)) {
1173  // grSurf[surfH][chanH]->SetLineStyle(2);
1174  // }
1175  // else {
1176  // grSurf[surfH][chanH]->SetLineStyle(1);
1177  // }
1178  if(moreVpol) {
1179  grSurf[surfH][chanH]->Draw("l");
1180  grSurf[surf][chan]->Draw("l");
1181  }
1182  else {
1183  grSurf[surf][chan]->Draw("l");
1184  grSurf[surfH][chanH]->Draw("l");
1185  }
1186 
1187 
1188  if(fAutoScale) {
1189  TList *listy = gPad->GetListOfPrimitives();
1190  for(int i=0;i<listy->GetSize();i++) {
1191  TObject *fred = listy->At(i);
1192  TH1F *tempHist = (TH1F*) fred;
1193  if(tempHist->InheritsFrom("TH1")) {
1194  if(chan<8) {
1195  tempHist->GetYaxis()->SetRangeUser(fMinVoltLimit,fMaxVoltLimit);
1196  }
1197  else {
1198  tempHist->GetYaxis()->SetRangeUser(fMinClockVoltLimit,fMaxClockVoltLimit);
1199  }
1200  }
1201  }
1202  }
1203 
1204 
1205  count++;
1206  paddy1->SetEditable(kFALSE);
1207  }
1208  }
1209 
1210  if(!useCan)
1211  return canBoth;
1212  else
1213  return plotPad;
1214 
1215 
1216 }
1217 
1218 TPad *AnitaCanvasMaker::getSurfChanCanvas(const RawAnitaHeader *hdPtr,TPad *useCan)
1219 {
1220  // gStyle->SetTitleH(0.1);
1221  gStyle->SetOptTitle(0);
1222 
1223  char textLabel[180];
1224  char padName[180];
1225  TPad *canSurf=0;
1226  TPad *plotPad=0;
1227  if(!useCan) {
1228  canSurf = (TPad*) gROOT->FindObject("canSurf");
1229  if(!canSurf) {
1230  canSurf = new TCanvas("canSurf","canSurf",1000,600);
1231  }
1232  canSurf->Clear();
1233  canSurf->SetTopMargin(0);
1234  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
1235  leftPave->SetBorderSize(0);
1236  sprintf(textLabel,"Event %d",hdPtr->eventNumber);
1237  TText *eventText = leftPave->AddText(textLabel);
1238  eventText->SetTextColor(50);
1239  leftPave->Draw();
1240  plotPad = new TPad("canSurfMain","canSurfMain",0,0,1,0.9);
1241  plotPad->Draw();
1242  }
1243  else {
1244  plotPad=useCan;
1245  }
1246  plotPad->cd();
1247  setupSurfPadWithFrames(plotPad);
1248 
1249 
1250  for(int surf=0;surf<ACTIVE_SURFS;surf++) {
1251  for(int chan=0;chan<CHANNELS_PER_SURF;chan++) {
1252  plotPad->cd();
1253  sprintf(padName,"surfChanPad%d_%d",surf,chan);
1254  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
1255  paddy1->SetEditable(kTRUE);
1256  deleteTGraphsFromPad(paddy1,surf,chan);
1257  paddy1->cd();
1258 
1259 
1260  //grDraw[surf][chan]=grSurf[surf][chan];
1261  //grDrawFFT[surf][chan]=grSurfFFT[surf][chan];
1262 
1263 
1264 
1265  Int_t ant=0,phi=0;
1268 
1269  if(chan<8) {
1270  AnitaGeomTool::getRingAntPolPhiFromSurfChan(surf,chan,ring,ant,pol,phi);
1271  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1272  pol,ring);
1273 
1274 
1275  if(hdPtr->isInL3Pattern(phi,pol))
1276  grSurf[surf][chan]->SetLineColor(kRed-3);
1277 
1278  // if(hdPtr->isInPhiMask(phi,pol) || hdPtr->isInL1Mask(phi,pol)) {
1279  // grSurf[surf][chan]->SetLineStyle(2);
1280  // }
1281  // else {
1282  // grSurf[surf][chan]->SetLineStyle(1);
1283  // }
1284 
1285  }
1287  grSurfFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1288  pol,ring);
1289  grSurfFFT[surf][chan]->Draw("l");
1290  }
1292  grSurfAveragedFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1293  pol,ring);
1294  grSurfAveragedFFT[surf][chan]->Draw("l");
1295  }
1297  grSurfHilbert[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1298  pol,ring);
1299  grSurfHilbert[surf][chan]->Draw("l");
1300  }
1302  grSurf[surf][chan]->Draw("l");
1303 
1304  if(fAutoScale) {
1305  TList *listy = gPad->GetListOfPrimitives();
1306  for(int i=0;i<listy->GetSize();i++) {
1307  TObject *fred = listy->At(i);
1308  TH1F *tempHist = (TH1F*) fred;
1309  if(tempHist->InheritsFrom("TH1")) {
1310  if(chan<8) {
1311  tempHist->GetYaxis()->SetRangeUser(fMinVertVoltLimit,fMaxVertVoltLimit);
1312  }
1313  else {
1314 
1315  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,-1,-1,AnitaPol::kNotAPol,AnitaRing::kNotARing);
1316  tempHist->GetYaxis()->SetRangeUser(fMinClockVoltLimit,fMaxClockVoltLimit);
1317  }
1318  }
1319  }
1320  }
1321  }
1322 
1323  paddy1->SetEditable(kFALSE);
1324  }
1325  }
1326 
1327 
1328 
1329  if(!useCan)
1330  return canSurf;
1331  else
1332  return plotPad;
1333 
1334 }
1335 
1336 TPad * AnitaCanvasMaker::getUCorrelatorCanvas(const RawAnitaHeader *hdPtr, TPad *useCan)
1337 {
1338 
1339  gStyle->SetOptTitle(1);
1340  TPad *canSurf=0;
1341  TPad * plotPad = 0;
1342  char textLabel[180];
1343 
1344  if(!useCan) {
1345  canSurf = (TPad*) gROOT->FindObject("canUCorr");
1346  if(!canSurf) {
1347  canSurf = new TCanvas("canUCorr","canUCorr",1000,600);
1348  }
1349  canSurf->Clear();
1350  canSurf->SetTopMargin(0);
1351  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
1352  leftPave->SetBorderSize(0);
1353  sprintf(textLabel,"Event %d",hdPtr->eventNumber);
1354  TText *eventText = leftPave->AddText(textLabel);
1355  eventText->SetTextColor(50);
1356  leftPave->Draw();
1357  plotPad = new TPad("canUCorrMain","canUCorrMain",0,0,1,0.9);
1358  plotPad->Draw();
1359  }
1360  else {
1361  plotPad=useCan;
1362  }
1363  plotPad->cd();
1364  plotPad->Clear();
1365  plotPad->Divide(1,2);
1366  MagicDisplay::Instance()->getUCorr()->drawSummary((TPad*) plotPad->GetPad(1), (TPad*) plotPad->GetPad(2));
1367 
1368  if(!useCan)
1369  return canSurf;
1370  else
1371  return plotPad;
1372 
1373 }
1374 
1376 {
1377  // std::cerr << __PRETTY_FUNCTION__ << std::endl;
1378  // gStyle->SetTitleH(0.1);
1379  gStyle->SetOptTitle(1);
1380 
1381  char textLabel[180];
1382  TPad *canSurf=0;
1383  TPad *plotPad=0;
1384  if(!useCan) {
1385  canSurf = (TPad*) gROOT->FindObject("canInterf");
1386  if(!canSurf) {
1387  canSurf = new TCanvas("canInterf","canInterf",1000,600);
1388  }
1389  canSurf->Clear();
1390  canSurf->SetTopMargin(0);
1391  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
1392  leftPave->SetBorderSize(0);
1393  sprintf(textLabel,"Event %d",hdPtr->eventNumber);
1394  TText *eventText = leftPave->AddText(textLabel);
1395  eventText->SetTextColor(50);
1396  leftPave->Draw();
1397  plotPad = new TPad("canInterfMain","canInterfMain",0,0,1,0.9);
1398  plotPad->Draw();
1399  }
1400  else {
1401  plotPad=useCan;
1402  // std::cerr << "useCan = " << useCan << std::endl;
1403  }
1404 
1405  plotPad->cd();
1406  plotPad->Clear();
1407 
1408  // FilterStrategy* strat = MagicDisplay::Instance()->getStrategy();
1409  // Acclaim::FourierBuffer::SummaryOption_t opt = MagicDisplay::Instance()->getFourierBufferSummaryOption();
1410  // bool doRecoSummary = opt == Acclaim::FourierBuffer::None;
1411  // bool foundRayleigh = false;
1412  // if(!doRecoSummary){
1413  // for(size_t i=0; i < strat->nOperations(); i++){
1414  // const FilterOperation* fo = strat->getOperation(i);
1415  // const Acclaim::Filters::RayleighMonitor* rm = dynamic_cast<const Acclaim::Filters::RayleighMonitor*>(fo);
1416  // if(rm){
1417  // rm->getFourierBuffer()->drawSummary(plotPad, MagicDisplay::Instance()->getFourierBufferSummaryOption());
1418  // foundRayleigh = true;
1419  // break;
1420  // }
1421  // }
1422  // }
1423  // if(!foundRayleigh){
1424  // MagicDisplay::Instance()->setFourierBufferSummaryOption(Acclaim::FourierBuffer::None);
1425  plotPad->Divide(2);
1426  for(Int_t polInd=0; polInd<AnitaPol::kNotAPol; polInd++){
1427  TPad* subPad = (TPad*) plotPad->GetPad(polInd+1);
1428  reco->drawSummary(subPad, AnitaPol::AnitaPol_t(polInd));
1429  }
1430  // }
1431 
1432  // plotPad->Update();
1433 
1434  if(!useCan)
1435  return canSurf;
1436  else
1437  return plotPad;
1438 
1439 }
1440 
1441 
1442 
1443 
1444 
1445 
1446 
1447 TPad *AnitaCanvasMaker::getPayloadCanvas(const RawAnitaHeader *hdPtr,TPad *useCan)
1448 {
1449  // gStyle->SetTitleH(0.1);
1450  gStyle->SetOptTitle(0);
1451 
1452  AnitaGeomTool* fACMGeomTool=AnitaGeomTool::Instance();
1453  char textLabel[180];
1454  char padName[180];
1455  TPad *canPayload=0;
1456  TPad *plotPad=0;
1457  if(!useCan) {
1458  canPayload = (TPad*) gROOT->FindObject("canPayload");
1459  if(!canPayload) {
1460  canPayload = new TCanvas("canPayload","canPayload",1000,600);
1461  }
1462  canPayload->Clear();
1463  canPayload->SetTopMargin(0);
1464  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
1465  leftPave->SetBorderSize(0);
1466  sprintf(textLabel,"Event %d",hdPtr->eventNumber);
1467  TText *eventText = leftPave->AddText(textLabel);
1468  eventText->SetTextColor(50);
1469  leftPave->Draw();
1470  plotPad = new TPad("canPayloadMain","canPayloadMain",0,0,1,0.9);
1471  plotPad->Draw();
1472  }
1473  else {
1474  plotPad=useCan;
1475  }
1476  plotPad->cd();
1477  setupPayloadViewWithFrames(plotPad);
1478 
1479  loadPayloadViewSutff();
1480 
1481  Int_t leftPhi=(fPhiMax+1)-1;
1482  if(leftPhi<1) leftPhi+=16;
1483  Int_t maxPhi=(fPhiMax+1);
1484  Int_t rightPhi=(fPhiMax+1)+1;
1485  if(rightPhi>16) rightPhi-=16;
1486 
1487  Int_t phiArray[3]={fPhiMax-1,fPhiMax,fPhiMax+1};
1488  if(phiArray[0]<0) phiArray[0]+=16;
1489  if(phiArray[2]>15) phiArray[2]-=16;
1490 
1491  // std::cout << fPhiMax << "\n";
1492 
1493  if(fAnitaGeomManager) {
1494  TPad *payloadPadLeft = (TPad*) plotPad->FindObject("payloadPadLeft");
1495  payloadPadLeft->cd();
1496  payloadPadLeft->Clear();
1497 
1498  //Draw anita
1499  TGeoVolume *anita = fAnitaGeomManager->GetMasterVolume();
1500 
1501  int n_ant[4]={8,8,16,8};
1502  int i_node=0;
1503 
1504  Int_t phiNums[4][16]={{1,3,5,7,9,11,13,15,0,0,0,0,0,0,0,0},
1505  {0,2,4,6,8,10,12,14,16,0,0,0,0,0,0},
1506  {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
1507  {0,2,4,6,8,10,12,14,16,0,0,0,0,0,0}};
1508 
1509 
1510  for (int i_layer=0;i_layer<4;i_layer++){
1511  for (int i_ant=0;i_ant<n_ant[i_layer];i_ant++){
1512  // std::cout << anita->GetNode(i_node)->GetName() << "\t" << phiNums[i_layer][i_ant] << std::endl;
1513  anita->GetNode(i_node)->GetVolume()->GetNode(4)->GetVolume()->SetLineColor(kWhite); //change color of Horn
1514 
1515  anita->GetNode(i_node)->GetVolume()->GetNode(0)->GetVolume()->SetLineColor(kWhite); //change color of h-pol
1516 
1517  anita->GetNode(i_node)->GetVolume()->GetNode(1)->GetVolume()->SetLineColor(kWhite); // change color of v-pol
1518 
1519 
1520  if(hdPtr->isInL3Pattern(phiNums[i_layer][i_ant])) {
1521  anita->GetNode(i_node)->GetVolume()->GetNode(1)->GetVolume()->SetLineColor(kRed-3); // change color of v-pol
1522  anita->GetNode(i_node)->GetVolume()->GetNode(4)->GetVolume()->SetLineColor(kRed-3);
1523  }
1524 
1525  i_node++;
1526  }
1527  }
1528 
1529 
1530  Double_t rmin[3]={-400,-400,-400};
1531  Double_t rmax[3]={400,400,400};
1532 
1533  TView3D *my3dView = new TView3D(1,rmin,rmax);
1534  my3dView->Draw();
1535 
1536  anita->GetNode(40)->GetVolume()->SetLineColor(kGray); //change color EMI Box
1537  anita->GetNode(41)->GetVolume()->SetLineColor(kGray); //change color SIP Box
1538  anita->GetNode(42)->GetVolume()->SetLineColor(kGray); //change color Batt Box
1539  gGeoManager->GetTopVolume()->Draw(); //draw line only
1540  // gGeoManager->GetGeomPainter()->SetRaytracing(1); //ray tracing (but it's slow_
1541  my3dView->ZoomIn();
1542  my3dView->ZoomIn();
1543  Int_t iRep;
1544  Double_t phiDeg=(maxPhi-1)*22.5;
1545  my3dView->SetView(phiDeg,90,0,iRep);
1546 
1547  gPad->Modified();
1548  gPad->Update();
1549 
1550  }
1551 
1552 
1553  AnitaRing::AnitaRing_t payloadRingMap[3]={AnitaRing::kTopRing,
1556 
1557  static Int_t lastSurf[3][3]={{-1,-1,-1},{-1,-1,-1},{-1,-1,-1}};
1558  static Int_t lastChan[3][3]={{-1,-1,-1},{-1,-1,-1},{-1,-1,-1}};
1559 
1560  for(int row=0;row<3;row++) {
1561  for(int phiInd=0;phiInd<3;phiInd++) {
1562 
1563  plotPad->cd();
1564  sprintf(padName,"payloadPad%d_%d",row,phiInd);
1565  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
1566  paddy1->SetEditable(kTRUE);
1567  if(lastSurf[row][phiInd]>=0)
1568  deleteTGraphsFromPad(paddy1,lastSurf[row][phiInd],lastChan[row][phiInd]);
1569  paddy1->cd();
1570 
1571  Int_t surf,chan,ant;
1572  Int_t phi=phiArray[phiInd];
1574  AnitaRing::AnitaRing_t ring=payloadRingMap[row];
1575  if(ring==AnitaRing::kBottomRing &&
1576  phiArray[phiInd]%2==1) {
1577  lastSurf[row][phiInd]=-1;
1578  continue;
1579  }
1580  fACMGeomTool->getSurfChanAntFromRingPhiPol(payloadRingMap[row],
1581  phiArray[phiInd],
1583  surf,chan,ant);
1584  lastSurf[row][phiInd]=surf;
1585  lastChan[row][phiInd]=chan;
1586 
1587  // if(hdPtr->isInL1Pattern(phi,ring))
1588  // grSurf[surf][chan]->SetLineColor(kBlue-2);
1589  // if(hdPtr->isInL2Pattern(phi,ring))
1590  // grSurf[surf][chan]->SetLineColor(kGreen-2);
1591  if(hdPtr->isInL3Pattern(phi,pol))
1592  grSurf[surf][chan]->SetLineColor(kRed-3);
1593 
1595  grSurfFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1596  pol,ring);
1597  grSurfFFT[surf][chan]->Draw("l");
1598  }
1600  grSurfAveragedFFT[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1601  pol,ring);
1602  grSurfAveragedFFT[surf][chan]->Draw("l");
1603  }
1605  grSurfHilbert[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,phi,ant,
1606  pol,ring);
1607  grSurfHilbert[surf][chan]->Draw("l");
1608  }
1610  grSurf[surf][chan]->Draw("l");
1611 
1612  if(fAutoScale) {
1613  TList *listy = gPad->GetListOfPrimitives();
1614  for(int i=0;i<listy->GetSize();i++) {
1615  TObject *fred = listy->At(i);
1616  TH1F *tempHist = (TH1F*) fred;
1617  if(tempHist->InheritsFrom("TH1")) {
1618  if(chan<8) {
1619  tempHist->GetYaxis()->SetRangeUser(fMinVertVoltLimit,fMaxVertVoltLimit);
1620  }
1621  else {
1622 
1623  grSurf[surf][chan]->setSurfChanPhiAntPolRing(surf,chan,-1,-1,AnitaPol::kNotAPol,AnitaRing::kNotARing);
1624  tempHist->GetYaxis()->SetRangeUser(fMinClockVoltLimit,fMaxClockVoltLimit);
1625  }
1626  }
1627  }
1628  }
1629  }
1630 
1631  paddy1->SetEditable(kFALSE);
1632  }
1633  }
1634 
1635 
1636 
1637  if(!useCan)
1638  return canPayload;
1639  else
1640  return plotPad;
1641 
1642 }
1643 
1644 
1645 
1646 TPad *AnitaCanvasMaker::getCombinedCanvas(const RawAnitaHeader *hdPtr,
1647  TPad *useCan)
1648 {
1649  gStyle->SetOptTitle(0);
1650 
1651  AnitaGeomTool* fACMGeomTool=AnitaGeomTool::Instance();
1652  char textLabel[180];
1653  char padName[180];
1654  TPad *canBoth=0;
1655  TPad *plotPad=0;
1656  if(!useCan) {
1657  canBoth = (TPad*) gROOT->FindObject("canBoth");
1658  if(!canBoth) {
1659  canBoth = new TCanvas("canBoth","canBoth",1000,600);
1660  }
1661  canBoth->Clear();
1662  canBoth->SetTopMargin(0);
1663  TPaveText *leftPave = new TPaveText(0.05,0.92,0.95,0.98);
1664  leftPave->SetBorderSize(0); //Try 5 rows with, 8 ants
1665  sprintf(textLabel,"Run %d, Event %d",hdPtr->run,hdPtr->eventNumber);
1666  TText *eventText = leftPave->AddText(textLabel);
1667  eventText->SetTextColor(50);
1668  leftPave->Draw();
1669  plotPad = new TPad("canBothMain","canBothMain",0,0,1,0.9);
1670  plotPad->Draw();
1671  }
1672  else {
1673  plotPad=useCan;
1674  }
1675  plotPad->cd();
1676  setupPhiPadWithFrames(plotPad);
1677 
1678 
1679 
1680 
1681  // Top
1682  // 1 3 5 7 9 11 13 15
1683  // 2 4 6 8 10 12 14 16
1684  // Middle
1685  // 1 3 5 7 9 11 13 15
1686  // 2 4 6 8 10 12 14 16
1687 
1688  int count=0;
1689 
1690  Bool_t moreVpol=true;
1691  int countH=0;
1692  int countV=0;
1693  for(int phi=0;phi<NUM_PHI;phi++) {
1694  if(hdPtr->isInL3Pattern(phi,AnitaPol::kVertical)) countV++;
1695  if(hdPtr->isInL3Pattern(phi,AnitaPol::kHorizontal)) countH++;
1696  }
1697  if(countH>countV) moreVpol=false;
1698 
1699 
1700  for(int column=0;column<8;column++) {
1701  for(int row=0;row<6;row++) {
1702  plotPad->cd();
1703 
1704  int phi=phiMap[row][column];
1705  // int ring=rowMap[row];
1706  int ant=0;//=antMap[ring][phi];
1707  int surf=0;//=surfMap[ant];
1708  int chanV=0;//=chanMap[ant];
1709  int chanH=0;
1710 
1711  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
1712  phi,AnitaPol::kVertical,
1713  surf,chanV,ant);
1714  fACMGeomTool->getSurfChanAntFromRingPhiPol(ringMap[row],
1716  surf,chanH,ant);
1717 
1718  sprintf(padName,"phiChanPad%d",count);
1719  TPad *paddy1 = (TPad*) plotPad->FindObject(padName);
1720  paddy1->SetEditable(kTRUE);
1721  deleteTGraphsFromPad(paddy1,surf,chanH,chanV);
1722  paddy1->cd();
1723 
1724  grSurf[surf][chanV]->setSurfChanPhiAntPolRing(surf,chanV,phi,ant,
1726  ringMap[row]);
1727  grSurf[surf][chanH]->setSurfChanPhiAntPolRing(surf,chanH,phi,ant,
1729  ringMap[row]);
1730 
1731  grSurf[surf][chanV]->SetLineColor(kBlack);
1732  grSurf[surf][chanH]->SetLineColor(kBlue);
1733 
1734  if(hdPtr->isInL3Pattern(phi,AnitaPol::kVertical))
1735  grSurf[surf][chanV]->SetLineColor(kRed-3);
1736  if(hdPtr->isInL3Pattern(phi,AnitaPol::kHorizontal))
1737  grSurf[surf][chanH]->SetLineColor(kGreen-3);
1738 
1739  // if(hdPtr->isInPhiMask(phi,AnitaPol::kVertical) || hdPtr->isInL1Mask(phi,AnitaPol::kVertical) ) {
1740  // grSurf[surf][chanV]->SetLineStyle(2);
1741  // }
1742  // else {
1743  // grSurf[surf][chanV]->SetLineStyle(1);
1744  // }
1745  // if(hdPtr->isInPhiMask(phi,AnitaPol::kHorizontal) || hdPtr->isInL1Mask(phi,AnitaPol::kHorizontal)) {
1746  // grSurf[surf][chanH]->SetLineStyle(2);
1747  // }
1748  // else {
1749  // grSurf[surf][chanH]->SetLineStyle(1);
1750  // }
1751 
1752 
1754 
1755  grSurfFFT[surf][chanV]->setSurfChanPhiAntPolRing(surf,chanV,phi,ant,
1757  ringMap[row]);
1758  grSurfFFT[surf][chanH]->setSurfChanPhiAntPolRing(surf,chanH,phi,ant,
1760  ringMap[row]);
1761  grSurfFFT[surf][chanH]->SetLineColor(kBlue);
1762  grSurfFFT[surf][chanH]->Draw("l");
1763  grSurfFFT[surf][chanV]->Draw("l");
1764  }
1766 
1767  grSurfAveragedFFT[surf][chanV]->setSurfChanPhiAntPolRing(surf,chanV,phi,ant,
1769  ringMap[row]);
1770  grSurfAveragedFFT[surf][chanH]->setSurfChanPhiAntPolRing(surf,chanH,phi,ant,
1772  ringMap[row]);
1773  grSurfAveragedFFT[surf][chanH]->SetLineColor(kBlue);
1774  grSurfAveragedFFT[surf][chanH]->Draw("l");
1775  grSurfAveragedFFT[surf][chanV]->Draw("l");
1776  }
1778 
1779  grSurfHilbert[surf][chanV]->setSurfChanPhiAntPolRing(surf,chanV,phi,ant,
1781  ringMap[row]);
1782  grSurfHilbert[surf][chanH]->setSurfChanPhiAntPolRing(surf,chanH,phi,ant,
1784  ringMap[row]);
1785  grSurfHilbert[surf][chanH]->SetLineColor(kBlue);
1786  grSurfHilbert[surf][chanH]->Draw("l");
1787  grSurfHilbert[surf][chanV]->Draw("l");
1788  }
1790 
1791  if(moreVpol) {
1792  grSurf[surf][chanH]->Draw("l");
1793  grSurf[surf][chanV]->Draw("l");
1794  }
1795  else {
1796  grSurf[surf][chanV]->Draw("l");
1797  grSurf[surf][chanH]->Draw("l");
1798  }
1799 
1800 
1801  if(fAutoScale) {
1802  TList *listy = gPad->GetListOfPrimitives();
1803  for(int i=0;i<listy->GetSize();i++) {
1804  TObject *fred = listy->At(i);
1805  TH1F *tempHist = (TH1F*) fred;
1806  if(tempHist->InheritsFrom("TH1")) {
1807  // std::cout << tempHist->ClassName() << "\t" << tempHist << std::endl;
1808  // std::cout << tempHist->GetYaxis()->GetXmin() << "\n";
1809  tempHist->GetYaxis()->SetRangeUser(fMinVoltLimit,fMaxVoltLimit);
1810  // std::cout << fMinVoltLimit << "\t" << fMaxVoltLimit << "\n";
1811  }
1812  }
1813  }
1814 
1815  }
1816 
1817 
1818  count++;
1819  paddy1->SetEditable(kFALSE);
1820  }
1821  }
1822  if(!useCan)
1823  return canBoth;
1824  else
1825  return plotPad;
1826 
1827 }
1828 
1830 {
1831  char textLabel[180];
1832  char padName[180];
1833  plotPad->cd();
1835  plotPad->Clear();
1836  }
1837  if(fRedoEventCanvas){
1838  plotPad->Clear();
1839  }
1840 
1842 
1843  static int phiPadsDone=0;
1844  if(phiPadsDone && !fRedoEventCanvas) {
1845  int errors=0;
1846  for(int i=0;i<48;i++) {
1847  sprintf(padName,"phiChanPad%d",i);
1848  TPad *paddy = (TPad*) plotPad->FindObject(padName);
1849  if(!paddy)
1850  errors++;
1851  }
1852  if(!errors)
1853  return;
1854  }
1855 
1856  phiPadsDone=1;
1857 
1858 
1859  Double_t left[8]={0.04,0.165,0.28,0.395,0.51,0.625,0.74,0.855};
1860  Double_t right[8]={0.165,0.28,0.395,0.51,0.625,0.74,0.855,0.97};
1861  Double_t top[6]={0.95,0.8,0.65,0.50,0.35,0.20};
1862  Double_t bottom[6]={0.8,0.65,0.50,0.35,0.20,0.03};
1863 
1864  //Now add some labels around the plot
1865  TLatex texy;
1866  texy.SetTextSize(0.03);
1867  texy.SetTextAlign(12);
1868  for(int column=0;column<8;column++) {
1869  sprintf(textLabel,"Phi %d/%d",1+(2*column),2+(2*column));
1870  if(column==7)
1871  texy.DrawTextNDC(right[column]-0.1,0.97,textLabel);
1872  else
1873  texy.DrawTextNDC(right[column]-0.09,0.97,textLabel);
1874  }
1875  texy.SetTextAlign(21);
1876  texy.SetTextAngle(90);
1877  texy.DrawTextNDC(left[0]-0.01,bottom[0],"Top Ring");
1878  texy.DrawTextNDC(left[0]-0.01,bottom[2],"Middle Ring");
1879  texy.DrawTextNDC(left[0]-0.01,bottom[4],"Bottom Ring");
1880 
1881  // Top
1882  // 1 3 5 7 9 11 13 15
1883  // 2 4 6 8 10 12 14 16
1884  // Middle
1885  // 1 3 5 7 9 11 13 15
1886  // 2 4 6 8 10 12 14 16
1887 
1888  int count=0;
1889 
1890 
1891 
1892 
1893  for(int column=0;column<8;column++) {
1894  for(int row=0;row<6;row++) {
1895  plotPad->cd();
1896  // int phi=phiMap[row][column];
1897  sprintf(padName,"phiChanPad%d",count);
1898  TPad *paddy1 = new TPad(padName,padName,left[column],bottom[row],right[column],top[row]);
1899  paddy1->SetTopMargin(0);
1900  paddy1->SetBottomMargin(0);
1901  paddy1->SetLeftMargin(0);
1902  paddy1->SetRightMargin(0);
1903  if(column==7)
1904  paddy1->SetRightMargin(0.01);
1905  if(column==0)
1906  paddy1->SetLeftMargin(0.1);
1907  if(row==5)
1908  paddy1->SetBottomMargin(0.1);
1909  paddy1->Draw();
1910  paddy1->cd();
1911 
1912  TH1F *framey=0;
1913 
1915  framey = (TH1F*) paddy1->DrawFrame(fMinTimeLimit,fMinVoltLimit,fMaxTimeLimit,fMaxVoltLimit);
1917  framey = (TH1F*) paddy1->DrawFrame(fMinFreqLimit,fMinPowerLimit,fMaxFreqLimit,fMaxPowerLimit);
1918 
1919  framey->GetYaxis()->SetLabelSize(0.08);
1920  framey->GetYaxis()->SetTitleSize(0.1);
1921  framey->GetYaxis()->SetTitleOffset(0.5);
1922  if(row==5) {
1923  framey->GetXaxis()->SetLabelSize(0.09);
1924  framey->GetXaxis()->SetTitleSize(0.09);
1925  framey->GetYaxis()->SetLabelSize(0.09);
1926  framey->GetYaxis()->SetTitleSize(0.09);
1927  }
1928  count++;
1929  }
1930  }
1931 
1932 }
1933 
1934 
1935 
1937 {
1938 
1939  // really don't think this function is necesary, it's not called anywhere now...
1940 
1941  static int interfPadsDone=0;
1942  char padName[180];
1943  plotPad->cd();
1944  if(fLastCanvasView!=MagicDisplayCanvasLayoutOption::kInterferometry) {
1945  plotPad->Clear();
1946  }
1947 
1948  if(fRedoEventCanvas && interfPadsDone){
1949  plotPad->Clear();
1950  }
1951 
1952  fLastCanvasView=MagicDisplayCanvasLayoutOption::kInterferometry;
1953 
1954  if(interfPadsDone && !fRedoEventCanvas) {
1955  int errors=0;
1956  for(Int_t padInd=0; padInd<interfPadsDone; padInd++){
1957  sprintf(padName,"interfPad%d",padInd);
1958  TPad *paddy = (TPad*) plotPad->FindObject(padName);
1959  if(!paddy)
1960  errors++;
1961  }
1962  if(!errors){
1963  return;
1964  }
1965  }
1966 
1967  int count=0;
1968  Double_t left[AnitaPol::kNotAPol] = {0.03, 0.5};
1969  Double_t right[AnitaPol::kNotAPol] = {0.5, 0.97};
1970  Double_t top = 0.9;
1971  Double_t bottom = 0.03;
1972 
1973 
1974  // // std::cerr << "here" << std::endl;
1975  // const int desiredPads = 4;
1976  // int count=0;
1977  // // should go top-left, top-right, bottom-left, bottom-right
1978  // Double_t left[desiredPads] = {0.03, 0.5, 0.03, 0.5 };
1979  // Double_t right[desiredPads] = {0.5, 0.97, 0.5, 0.97};
1980 
1981  // Double_t top[desiredPads] = {0.9, 0.9 , 0.5 , 0.5 };
1982  // Double_t bottom[desiredPads] = {0.5, 0.5, 0.03, 0.03};
1983 
1984  // const int desiredPads = 2;
1985  // Double_t left[desiredPads] = {0.03, 0.5, 0.03, 0.5 };
1986  // Double_t right[desiredPads] = {0.5, 0.97, 0.5, 0.97};
1987 
1988  // Double_t top[desiredPads] = {0.9, 0.9 , 0.5 , 0.5 };
1989 
1990  // // Double_t bottom[desiredPads] = {0.5, 0.5, 0.03, 0.03};
1991 
1992 
1993  for(Int_t polInd=0; polInd<AnitaPol::kNotAPol; polInd++){
1994  plotPad->cd();
1995  sprintf(padName,"interfPad%d",polInd);
1996  // std::cout << padName << std::endl;
1997  TPad *paddy1 = new TPad(padName,padName,left[polInd],bottom,right[polInd],top);
1998 
1999 
2000  // sprintf(padName,"interfPad%d",padInd);
2001  // TPad *paddy1 = new TPad(padName,padName,left[padInd],bottom[padInd],right[padInd],top[padInd]);
2002  // TCanvas *paddy1 = new TCanvas(padName,padName,left[polInd],bottom,right[polInd],top);
2003  // paddy1->SetTopMargin(0);
2004  // paddy1->SetBottomMargin(0);
2005  // paddy1->SetLeftMargin(0);
2006  // paddy1->SetRightMargin(0);
2007  paddy1->Draw();
2008  paddy1->cd();
2009  count++;
2010 
2011  interfPadsDone++;
2012  }
2013 
2014 
2015 
2016 }
2017 
2018 
2020 {
2021  static int surfPadsDone=0;
2022  char textLabel[180];
2023  char padName[180];
2024  plotPad->cd();
2026  plotPad->Clear();
2027  }
2028 
2029  if(fRedoEventCanvas && surfPadsDone){
2030  plotPad->Clear();
2031  }
2032 
2034 
2035  if(surfPadsDone && !fRedoEventCanvas) {
2036  int errors=0;
2037  for(int surf=0;surf<ACTIVE_SURFS;surf++) {
2038  for(int chan=0;chan<CHANNELS_PER_SURF;chan++) {
2039  sprintf(padName,"surfChanPad%d_%d",surf,chan);
2040  TPad *paddy = (TPad*) plotPad->FindObject(padName);
2041  if(!paddy)
2042  errors++;
2043  }
2044  }
2045  if(!errors)
2046  return;
2047  }
2048 
2049 
2050  surfPadsDone=1;
2051 
2052  Double_t leftEdge=0.04;
2053  Double_t rightEdge=0.97;
2054  Double_t standardStep=(rightEdge-leftEdge)/(1.01*ACTIVE_SURFS);
2055  Double_t firstStep=(rightEdge-leftEdge)-(ACTIVE_SURFS-1)*standardStep;
2056 
2057  Double_t left[ACTIVE_SURFS]={0};
2058  Double_t right[ACTIVE_SURFS]={0};
2059  left[0]=leftEdge;
2060  right[0]=leftEdge+firstStep;
2061  for(int surf=1;surf<ACTIVE_SURFS;surf++) {
2062  left[surf]=right[surf-1];
2063  right[surf]=left[surf]+standardStep;
2064  }
2065 
2066  Double_t top[9]={0.95,0.85,0.75,0.65,0.55,0.45,0.35,0.25,0.15};
2067  Double_t bottom[9]={0.85,0.75,0.65,0.55,0.45,0.35,0.25,0.15,0.03};
2068 
2069  //Now add some labels around the plot
2070  TLatex texy;
2071  texy.SetTextSize(0.03);
2072  texy.SetTextAlign(12);
2073  for(int column=0;column<ACTIVE_SURFS;column++) {
2074  sprintf(textLabel,"Surf %d",1+column);
2075  if(column==9)
2076  texy.DrawTextNDC(right[column]-0.1,0.97,textLabel);
2077  else
2078  texy.DrawTextNDC(right[column]-0.09,0.97,textLabel);
2079  }
2080  texy.SetTextAlign(21);
2081  texy.SetTextAngle(90);
2082  // texy.DrawTextaNDC(left[0]-0.01,bottom[0],"Top Ring");
2083  // texy.DrawTextNDC(left[0]-0.01,bottom[2],"Middle Ring");
2084  // texy.DrawTextNDC(left[0]-0.01,bottom[4]+0.09,"Bottom Ring");
2085 
2086 
2087  int count=0;
2088 
2089 
2090 
2091 
2092  for(int column=0;column<ACTIVE_SURFS;column++) {
2093  for(int row=0;row<9;row++) {
2094  plotPad->cd();
2095  // int surf=surfMap[row][column];
2096  sprintf(padName,"surfChanPad%d_%d",column,row);
2097  TPad *paddy1 = new TPad(padName,padName,left[column],bottom[row],right[column],top[row]);
2098  paddy1->SetTopMargin(0);
2099  paddy1->SetBottomMargin(0);
2100  paddy1->SetLeftMargin(0);
2101  paddy1->SetRightMargin(0);
2102  if(column==9)
2103  paddy1->SetRightMargin(0.01);
2104  if(column==0)
2105  paddy1->SetLeftMargin(0.1);
2106  if(row==8)
2107  paddy1->SetBottomMargin(0.1);
2108  paddy1->Draw();
2109  paddy1->cd();
2110  TH1F *framey=0;
2112  framey = (TH1F*) paddy1->DrawFrame(fMinFreqLimit,fMinPowerLimit,fMaxFreqLimit,fMaxPowerLimit);
2113  }
2116  if(row<8) {
2117  framey = (TH1F*) paddy1->DrawFrame(fMinTimeLimit,fMinVoltLimit,fMaxTimeLimit,fMaxVoltLimit);
2118  }
2119  else{
2120  framey = (TH1F*) paddy1->DrawFrame(fMinTimeLimit,fMinClockVoltLimit,fMaxTimeLimit,fMaxClockVoltLimit);
2121  }
2122  }
2123 
2124  framey->GetYaxis()->SetLabelSize(0.1);
2125  framey->GetYaxis()->SetTitleSize(0.1);
2126  framey->GetYaxis()->SetTitleOffset(0.5);
2127  if(row==8) {
2128  framey->GetXaxis()->SetLabelSize(0.09);
2129  framey->GetXaxis()->SetTitleSize(0.09);
2130  framey->GetYaxis()->SetLabelSize(0.09);
2131  framey->GetYaxis()->SetTitleSize(0.09);
2132  }
2133  count++;
2134  }
2135  }
2136 }
2137 
2138 
2139 
2140 
2142 {
2143  static int payloadPadsDone=0;
2144  // char textLabel[180];
2145  char padName[180];
2146  plotPad->cd();
2148  plotPad->Clear();
2149  }
2150 
2151  if(fRedoEventCanvas && payloadPadsDone){
2152  plotPad->Clear();
2153  }
2154 
2156 
2157  if(payloadPadsDone && !fRedoEventCanvas) {
2158  int errors=0;
2159  sprintf(padName,"payloadPadLeft");
2160  TPad *paddy = (TPad*) plotPad->FindObject(padName);
2161  if(!paddy)
2162  errors++;
2163 
2164  for(int ring=0;ring<3;ring++) {
2165  for(int phi=0;phi<3;phi++) {
2166  sprintf(padName,"payloadPad%d_%d",ring,phi);
2167  TPad *paddy = (TPad*) plotPad->FindObject(padName);
2168  if(!paddy)
2169  errors++;
2170  }
2171  }
2172  if(!errors)
2173  return;
2174  }
2175 
2176 
2177  payloadPadsDone=1;
2178 
2179 
2180  Double_t left[3]={0.53,0.7,0.85};
2181  Double_t right[3]={0.7,0.85,0.99};
2182  Double_t top[3]={0.95,0.65,0.35};
2183  Double_t bottom[3]={0.65,0.35,0.03};
2184 
2185  //Now add some labels around the plot
2186  TLatex texy;
2187  texy.SetTextSize(0.03);
2188  texy.SetTextAlign(12);
2189 
2190  int count=0;
2191 
2192 
2193  sprintf(padName,"payloadPadLeft");
2194  TPad *padLeft =new TPad(padName,padName,0.05,0.05,0.5,0.95);
2195  padLeft->SetFillColor(kBlack);
2196  padLeft->Draw();
2197 
2198 
2199  for(int column=0;column<3;column++) {
2200  for(int row=0;row<3;row++) {
2201  plotPad->cd();
2202  // int surf=surfMap[row][column];
2203  sprintf(padName,"payloadPad%d_%d",row,column);
2204  TPad *paddy1 = new TPad(padName,padName,left[column],bottom[row],right[column],top[row]);
2205  paddy1->SetTopMargin(0);
2206  paddy1->SetBottomMargin(0);
2207  paddy1->SetLeftMargin(0);
2208  paddy1->SetRightMargin(0);
2209  if(column==2)
2210  paddy1->SetRightMargin(0.01);
2211  if(column==0)
2212  paddy1->SetLeftMargin(0.1);
2213  if(row==2)
2214  paddy1->SetBottomMargin(0.1);
2215  paddy1->Draw();
2216  paddy1->cd();
2217  TH1F *framey=0;
2219  framey = (TH1F*) paddy1->DrawFrame(fMinFreqLimit,fMinPowerLimit,fMaxFreqLimit,fMaxPowerLimit);
2220  }
2223  framey = (TH1F*) paddy1->DrawFrame(fMinTimeLimit,fMinVoltLimit,fMaxTimeLimit,fMaxVoltLimit);
2224  }
2225 
2226  framey->GetYaxis()->SetLabelSize(0.1);
2227  framey->GetYaxis()->SetTitleSize(0.1);
2228  framey->GetYaxis()->SetTitleOffset(0.5);
2229  if(row==8) {
2230  framey->GetXaxis()->SetLabelSize(0.09);
2231  framey->GetXaxis()->SetTitleSize(0.09);
2232  framey->GetYaxis()->SetLabelSize(0.09);
2233  framey->GetYaxis()->SetTitleSize(0.09);
2234  }
2235  count++;
2236  }
2237  }
2238 }
2239 
2240 
2241 
2242 
2243 void AnitaCanvasMaker::deleteTGraphsFromPad(TPad *paddy,int surf,int chan)
2244 {
2245  paddy->cd();
2246  if(fLastWaveformFormat==MagicDisplayFormatOption::kWaveform) paddy->GetListOfPrimitives()->Remove(grSurf[surf][chan]);
2247  else if(fLastWaveformFormat==MagicDisplayFormatOption::kFFT) paddy->GetListOfPrimitives()->Remove(grSurfFFT[surf][chan]);
2248  else if(fLastWaveformFormat==MagicDisplayFormatOption::kAveragedFFT) paddy->GetListOfPrimitives()->Remove(grSurfAveragedFFT[surf][chan]);
2249  else if(fLastWaveformFormat==MagicDisplayFormatOption::kHilbertEnvelope) paddy->GetListOfPrimitives()->Remove(grSurfHilbert[surf][chan]);
2250  // paddy->Update();
2251 }
2252 
2253 void AnitaCanvasMaker::deleteTGraphsFromPad(TPad *paddy,int surf,int chan,int chan2)
2254 {
2255  paddy->cd();
2257  paddy->GetListOfPrimitives()->Remove(grSurf[surf][chan]);
2258  paddy->GetListOfPrimitives()->Remove(grSurf[surf][chan2]);
2259  }
2261  paddy->GetListOfPrimitives()->Remove(grSurfFFT[surf][chan]);
2262  paddy->GetListOfPrimitives()->Remove(grSurfFFT[surf][chan2]);
2263  }
2265  paddy->GetListOfPrimitives()->Remove(grSurfAveragedFFT[surf][chan]);
2266  paddy->GetListOfPrimitives()->Remove(grSurfAveragedFFT[surf][chan2]);
2267  }
2269  paddy->GetListOfPrimitives()->Remove(grSurfHilbert[surf][chan]);
2270  paddy->GetListOfPrimitives()->Remove(grSurfHilbert[surf][chan2]);
2271  }
2272 
2273  // paddy->Update();
2274 }
2275 
2276 void AnitaCanvasMaker::resetAverage()
2277 {
2278  for(int surf=0;surf<ACTIVE_SURFS;surf++) {
2279  for(int chan=0;chan<CHANNELS_PER_SURF;chan++) {
2280  if(grSurfAveragedFFT[surf][chan]) {
2281  delete grSurfAveragedFFT[surf][chan];
2282  grSurfAveragedFFT[surf][chan]=0;
2283  }
2284  }
2285  }
2286 }
2287 
2288 
2289 
2290 
2291 void AnitaCanvasMaker::loadPayloadViewSutff()
2292 {
2293  if(fAnitaGeomManager) return;
2294  char fileName[FILENAME_MAX];
2295  char *dirName=getenv("ANITA_UTIL_INSTALL_DIR");
2296  if(dirName) {
2297  sprintf(fileName,"%s/share/anitaMap/anitageom.root",dirName);
2298  }
2299  else
2300  sprintf(fileName,"anitageom.root");
2301 
2302  fAnitaGeomFile = new TFile(fileName);
2303  if(!fAnitaGeomFile) {
2304  std::cerr << "Couldn't open: " << fileName << "\n";
2305  return;
2306  }
2307 
2308  fAnitaGeomManager= (TGeoManager*) fAnitaGeomFile->Get("anita");
2309  if(!fAnitaGeomManager) {
2310  std::cerr << "Couldn't find anita geometry\n";
2311  }
2312 
2313 }
2314 
2316  if(reco==NULL){
2317  reco = new Acclaim::AnalysisReco();
2318  TString magicDisplayConfigFile = TString::Format("%s/share/Acclaim/AcclaimMagicDisplay.conf", getenv("ANITA_UTIL_INSTALL_DIR"));
2319  Acclaim::AnalysisSettings s(magicDisplayConfigFile); // set the default the MagicDisplay config for ACCLAIM analysis software
2320  s.apply(reco);
2321  }
2322  return (*reco);
2323 }
UInt_t eventNumber
Event number from software.
Definition: RawAnitaEvent.h:33
static AnitaCanvasMaker * Instance()
The instance generator.
Double_t fMinTimeLimit
The minimum time in the waveform (typically 0).
MagicDisplayCanvasLayoutOption::MagicDisplayCanvasLayoutOption_t fLastCanvasView
What was the last view (phi or SURF)?
void process(const FilteredAnitaEvent *fEv, AnitaEventSummary *sum, NoiseMonitor *noiseMonitor=NULL, TruthAnitaEvent *truth=NULL)
Double_t fMinVoltLimit
The minimum voltage.
UChar_t errorFlag
Error Flag.
void analyze(const FilteredAnitaEvent *event, AnitaEventSummary *summary, const TruthAnitaEvent *truth=0)
Definition: Analyzer.cc:177
Double_t fMaxFreqLimit
The maximum frequency in the PSDs (typically 1200).
Double_t fMaxTimeLimit
The maximum time in the waveform (typically 100).
UInt_t triggerTimeNs
Trigger time in ns from TURF.
Int_t fRedoEventCanvas
Do we neeed to redraw the event canvas (eg. switching from phi to SURF)?
TGraph * getHilbert()
Returns a pointer to a TGraph containing the hilbert envelope of the waveform.
const UsefulAnitaEvent * getUsefulAnitaEvent() const
UShort_t l3TrigPattern
Bit mask for l3 global triggers. eg. if the bit 1 (the lowest bit) is active it means that phi sector...
Adu5Pat – The ADU5 Position and Attitude Data.
Definition: Adu5Pat.h:26
Double_t fMinVertVoltLimit
The minimum voltage in vertical channels.
WaveCalType::WaveCalType_t fCalType
The calibration type.
TGraph * getFFT()
Returns a pointer to a TGraph containing the PSD of the waveform.
UChar_t priority
Queue (lower 4-bits) and priority (upper 4-bits)
static void getRingAntPolPhiFromSurfChan(Int_t surf, Int_t chan, AnitaRing::AnitaRing_t &ring, Int_t &ant, AnitaPol::AnitaPol_t &pol, Int_t &phi)
Convert surf-chan to ring-ant-pol-phi.
Does the event reconstruction, and produces a summary of it.
Definition: AnalysisReco.h:30
View of both polarisations arranged by phi.
enum WaveCalType::EWaveCalType WaveCalType_t
The calibration enumeration type.
Double_t fMaxPowerLimit
The maximum power in the PSDs.
void deleteTGraphsFromPad(TPad *paddy, int surf, int chan)
Worker fucntion to delete a specific graph from a pad.
Float_t latitude
In degrees.
Definition: Adu5Pat.h:42
int isInL3Pattern(int phi, AnitaPol::AnitaPol_t pol=AnitaPol::kVertical) const
Returns 1 if given phi-ring had l3 trigger. pol does nothing for A4.
Double_t fMinFreqLimit
The minimum frequency in the PSDs (typically 0).
void setupPayloadViewWithFrames(TPad *plotPad)
Worker function to setup the payload view canvas.
Float_t longitude
In degrees.
Definition: Adu5Pat.h:43
static Int_t getAntPolFromSurfChan(Int_t surf, Int_t chan, Int_t &ant, AnitaPol::AnitaPol_t &pol)
Convert surf-chan to ant-pol.
TGraph * simpleNotchFilter(const TGraph *grWave, Double_t minFreq, Double_t maxFreq)
This returns a TGraph which has had a simple notch band filter applied.
Definition: FFTtools.cxx:1975
TruthAnitaEvent * truth(bool force_reload=true)
Double_t fMaxVoltLimit
The maximum voltage.
A filter strategy defines the sets of filters that are used and provides some introspection abilities...
Double_t fMinClockVoltLimit
The minimum voltage in the clock channels.
static void getSurfChanAntFromRingPhiPol(AnitaRing::AnitaRing_t ring, Int_t phi, AnitaPol::AnitaPol_t pol, Int_t &surf, Int_t &chan, Int_t &ant)
Convert ring-phi-pol to surf-chan-ant.
void setupInterfPadWithFrames(TPad *plotPad)
Worker function to setup the phi view canvas.
RawAnitaHeader – The Raw ANITA Event Header.
MagicDisplayFormatOption::MagicDisplayFormatOption_t fWaveformOption
Are we viewing PSDs, waveforms or other stuff?
~AnitaCanvasMaker()
Destructor.
USeful in for loops.
TGraph * getGraphFromSurfAndChan(int surf, int chan) const
Returns a voltage-time waveform for given SURF and channel.
Int_t run
Run number, assigned on ground.
enum AnitaRing::EAnitaRing AnitaRing_t
Ring enumeration.
TPad * getInterferometryCanvas(const RawAnitaHeader *hdPtr, TPad *useCan=NULL)
The interferometry canvas getter.
Double_t fMinPowerLimit
The minimum power in the PSDs.
UCorrelator::Analyzer * getUCorr()
< for command line interface
Definition: MagicDisplay.h:280
MagicDisplayCanvasLayoutOption::MagicDisplayCanvasLayoutOption_t fCanvasView
Which canvas layout do we want?
UInt_t turfEventId
TURF Event Id (12-bit run + 20-bit event)
The graph class that inherits from ROOT&#39;s TGraph.
Definition: WaveformGraph.h:14
UsefulAnitaEvent – The Calibrated Useful Anita Event object.
Float_t altitude
In metres.
Definition: Adu5Pat.h:44
static AnitaCanvasMaker * fgInstance
To protect against multiple instances.
AnitaCanvasMaker(WaveCalType::WaveCalType_t calType=WaveCalType::kVoltageTime)
The assignment constructor.
View of vertical polarisation arranged by phi.
Int_t fNewEvent
Is this a new event?
View of all channels arranged by SURF.
MagicDisplayFormatOption::MagicDisplayFormatOption_t fLastWaveformFormat
What did we plot last time??
The 260 samples straight from raw data.
Double_t fMaxClockVoltLimit
The maximum voltage in the clock channels.
Int_t getLabChip(Int_t chanIndex) const
Returns the LABRADOR number.
Definition: RawAnitaEvent.h:69
TruthAnitaEvent – The Truth ANITA Event.
TPad * quickGetEventViewerCanvasForWebPlottter(const UsefulAnitaEvent *evPtr, const RawAnitaHeader *hdPtr, TPad *useCan=0)
The main event view canvas getter used by QnDWBOM.
void setupSurfPadWithFrames(TPad *plotPad)
Worker function to setup the surf view canvas.
Acclaim::AnalysisReco & getAnalysisReco()
get command line access with a reference
const char * trigTypeAsString() const
Returns trigger type as string.
void setSurfChanPhiAntPolRing(Int_t surf, Int_t chan, Int_t phi, Int_t ant, AnitaPol::AnitaPol_t pol, AnitaRing::AnitaRing_t ring)
These are just used for labelling.
Definition: WaveformGraph.h:31
Double_t fMaxVertVoltLimit
The maximum voltage in vertical channels.
static Int_t getPhiFromAnt(Int_t ant)
get phi from ant
View of horizontal polarisation arranged by phi.
void setSurfChanPhiAntPolRing(Int_t surf, Int_t chan, Int_t phi, Int_t ant, AnitaPol::AnitaPol_t pol, AnitaRing::AnitaRing_t ring)
These are just used for labelling.
Definition: FFTGraph.h:26
The PSD display graph class that inherits from ROOT&#39;s TGraph.
Definition: FFTGraph.h:14
void drawSummary(TPad *wholePad, AnitaPol::AnitaPol_t pol)
Draw everything interesting onto a TPad.
TPad * getEventViewerCanvas(FilteredAnitaEvent *fEv, TPad *useCan=0, bool forceRedo=false)
The main event view canvas getter.
const AnalysisWaveform * getFilteredGraph(UInt_t i) const
Vertical Polarisation.
Useful in for loops.
static MagicDisplay * Instance()
Returns a pointer to the active MagicDisplay. This is very useful if you want to access the TTree&#39;s d...
The X good samples from raw data (260-hitbus)
Common analysis format between UCorrelator and Acclaim.
TPad * getEventInfoCanvas(const UsefulAnitaEvent *evPtr, const RawAnitaHeader *hdPtr, const Adu5Pat *pat, TPad *useCan=0)
The event info canvas getter.
TGraph * simplePassBandFilter(const TGraph *grWave, Double_t minFreq, Double_t maxFreq)
This returns a TGraph which has had a simple pass band filter applied.
Definition: FFTtools.cxx:1938
View of Jiwoo&#39;s pretty 3-d payload.
const TGraphAligned * even() const
void setupPhiPadWithFrames(TPad *plotPad)
Worker function to setup the phi view canvas.
Horizontal Polarisation.
Float_t heading
0 is facing north, 180 is facing south
Definition: Adu5Pat.h:45
UInt_t surfEventId[12]
SURF Event Id&#39;s.
Definition: RawAnitaEvent.h:36
Int_t fAutoScaleNeg
Fixed or auto-scaling y-axis?
int AddFFT(FFTGraph *otherGraph)
Adds an FFT to an average.
Definition: FFTGraph.cxx:109
Int_t fAutoScale
Fixed or auto-scaling y-axis?
This class is intended to store all the necessary data about an ANITA event for filtering and analysi...
UShort_t trigNum
Trigger number (since last clear all)
enum AnitaPol::EAnitaPol AnitaPol_t
Polarisation enumeration.
static AnitaGeomTool * Instance(int anita_version=0)
Instance generator. If version_number == 0, uses AnitaVersion::get();.
AnitaGeomTool – The ANITA Geometry Tool.
Definition: AnitaGeomTool.h:48
The event display canvas maker.
This class is intended to be the main storage vessel for ANITA waveforms. It is similar in principle ...
void drawSummary(TPad *chpol=0, TPad *cvpol=0, int draw_filtered=0) const
Definition: Analyzer.cc:944
const RawAnitaHeader * getHeader() const
UInt_t triggerTime
Trigger time from TURF converted to unixTime.