Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OutputVisualsTPC.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file OutputVisualsTPC.C
1 
2 // Histogram output. //
3 // Cherenkov Detector Software //
4 // Marie Blatnik //
5 // Thomas Videbaek //
6 // Dr. Thomas Hemmick //
7 // //
8 // An AHex Readout. //
9 // Version 2.0 //
10 // Thursday, 2-28-2013 //
12 
13 #include <iostream>
14 #include <cmath>
15 #include <vector>
16 
17 #include "groot.h"
18 #include "AZigzag.h"
19 #include "ABlob.h"
20 #include "ATrack.h"
21 #include "TCanvas.h"
22 #include "TPad.h"
23 #include "Quiver.h"
24 
25 
26 using namespace std;
27 
28 void OutputVisualsTPC(double MAX=2000)
29 {
30  groot* Tree = groot::instance();
31 
32  /* get pixel resolution ratio for screen to make sure trackers are diplayed as squares */
33  double screenratio_y_x = 1280. / 1024.;
34 
35  /* create one canvas for each tracker */
36  static TCanvas* CanvasTPC = new TCanvas("CanvasTPC", "sPHENIX TPC", 0,0, 800, (int)800.*screenratio_y_x); //pixels
37  CanvasTPC->Range(-150,400,150,600); //x1,y1,x2,y2
38  CanvasTPC->SetWindowPosition(660,0);
39 
40  /* clear previous event from canvas */
41  CanvasTPC->Clear();
42  CanvasTPC->cd();
43 
44  /* draw zigzags */
46  {
47  for(int i=0; i< Tree->theZigzags.size(); i++)
48  {
49  Tree->theZigzags[i]->Draw(MAX);
50  }
51  }
52 
53  /* draw blobs */
55  {
56  for(int i=0; i<Nr; i++)
57  {
58  for(int j=0; j< Tree->theBlobs[i].size(); j++)
59  {
60  (Tree->theBlobs[i])[j]->Draw();
61  }
62  }
63  }
64 
65  CanvasTPC->Update();
66  CanvasTPC->cd();
67 }