Exemplo n.º 1
0
//--------------------------
// DrawPoly
//--------------------------
void DrawPoly(int N, double *z, double *r, int color)
{
	TPolyLine *pl = new TPolyLine(N, z, r);
	pl->SetLineColor(color);
	if (fill_detectors) { pl->SetFillColor(color); pl->SetFillStyle(1001); }
	pl->SetLineWidth(2);
	pl->Draw();
	
	 if (full) {
		for(int i=0; i<N; i++)r[i] = -r[i];
		pl = new TPolyLine(N, z, r);
		pl->SetLineColor(color);
		if (fill_detectors) { pl->SetFillColor(color); pl->SetFillStyle(1001); }
		pl->SetLineWidth(2);
		pl->Draw();
	 }
}
Exemplo n.º 2
0
//--------------------------
// DrawStartCounterBoundaries
//--------------------------
void DrawStartCounterBoundaries(int color=start_counter_color)
{
  // Values from Richard's old spreadsheet "start_geom.xls"
  const int Npoints = 15;
  double r_hi[] = {8.675, 8.675, 8.675, 7.759, 7.354, 4.353, 3.134,
          2.290, 1.915, 5.593, 5.893, 6.907, 6.951, 6.951, 8.675};
  double r_lo[Npoints];
  for (Int_t i=0; i<Npoints; i++) r_lo[i] = -r_hi[i];
  
  double z[] = {   0.0, 51.383, 51.726, 53.938, 54.914, 57.915, 59.134,
          58.442, 58.290, 54.360, 54.238, 51.531, 51.488,    0.0, 0.0};
  
  // shift z to proper location in lab system
  for(int i=0; i<Npoints; i++)z[i] += 38.75;
  
  TPolyLine *pol = new TPolyLine(Npoints, z, r_hi);
  pol->SetLineWidth(2.0);
  if (fill_detectors) { pol->SetFillColor(color); pol->SetFillStyle(1001); }
  else pol->SetFillStyle(0);
  pol->SetLineColor(color);
  pol->Draw();

  TLatex *lab = new TLatex(z[6]+(z[6]-z[0])*0.1, 0, "start counter");
  if (full) lab->SetTextAlign(12); else lab->SetTextAlign(11);
  lab->SetTextSize(0.02);
  lab->SetTextColor(color);
  lab->Draw();

  if (full) {
    pol = new TPolyLine(Npoints, z, r_lo);
    pol->SetLineWidth(2.0);
    if (fill_detectors) { pol->SetFillColor(color); pol->SetFillStyle(1001); }
    else pol->SetFillStyle(0);
    pol->SetLineColor(color);
    pol->Draw();
  }
}