[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/WCSim/WCSim/develop/sample-root-scripts/plot_pmts.C [Back]  [Original]

#include 
#include      
#include 
#include 

#include "TTree.h"
#include "TGraph.h"
#include "TEllipse.h"
#include "TH1F.h"
#include "THStack.h"
#include "TH1D.h"
#include "TStyle.h"
#include "TROOT.h"
#include "TSystem.h"
#include "TCanvas.h"
#include "TFile.h"

#include "WCSimRootOptions.hh"
#include "WCSimRootGeom.hh"
#include "WCSimRootEvent.hh"

/*
  Produces X-Y and R-Z displays for each PMT type
  - In the X-Y displays, the detector edge is shown as a circle
    - Note that both top & bottom cap PMTs are displayed on this plot
      By construction in WCSim, PMTs are placed in the same location on each end cap
  - In the R-Z displays, the detector edge is the edge of the image

Output
- display_geo.pdf has the 2D plots
  - There is one page per PMT type (20" / OD / mPMT)
- display_geo.root has
  - The TGraph's used to create the 2D plots
  - Additionally two THStack's (one for R, one for Z), that contain the 1D information

Running
From the command line, something like
root -b -q $WCSIM_SOURCE_DIR/sample-root-scripts/plot_pmts.C+g'(1,"wcsim.root")'
or however you prefer to run your root macros
*/

int display(int verbose, //how verbose should the printout be? 0 = lowest, higher number = more
	    const char *filename); //WCSim file. Should work for all geometries

TGraph * MakeGraph(vector v, int col, int style, const float size=1.5)
{
  cout GetPosition(2);
  r = TMath::Sqrt(x*x + y*y);
  t = GetAzimuth(x, y);
  cout 

Web Proxy Viewer  |  New URL  |  Original Page