[BLAST_ANAWARE] a check of the T2D relationship

From: Chris Crawford (chris2@lns.mit.edu)
Date: Sun May 23 2004 - 02:35:00 EDT


hi,
  i did a thorough check of the implementation of Doug's T2D
realtionship in BlastLib2, and everything matched up just fine. i first
compared his raw data (file: PARALLEL) to his processed file (NTUPLE),
doing the calculation by hand for a handfull of random points, and
checking the signs of each different block of numbers. then i
histogrammed the difference between points in the NTUPLE file and the
same values obtained by interpolation via
t2d_GarField_6th_Order::WC_pos_vs_t, and, again, everything was fine up
to 100 microns. thus, any problems in the time-to-distance relationship
must be either in the calibration or else in the GarField simulation
itself. unfortunately, no quick fix.
  note: the co-ordinate system in NTUPLE is the same as BlastLib2 (x
increasing with theta), theta_impact gets larger for outbending
particles. however, the coordinates in PARALLEL have x -> -x. Also,
the nominal BLAST field is negative (along -\hat h). I added some
comments about units in TBLWc1Time2Distance.cc.
--chris

i put a copy of NTUPLE and PARALLEL on the scratch disk of blast05:

blast05:/home/chris2/scr/archive/*


#!/usr/local/root/bin/root -l
// $Id:$ -*-c++-*-
// by Chris Crawford <chris2@lns.mit.edu> 2004/05/22
// tests the data in NTUPLE against t2d_GarField_6th_Order::WC_pos_vs_t
{
  gSystem->Load("libBlast.so");
  Setup();
  t2d_GarField_6th_Order* t2d=(t2d_GarField_6th_Order*)gT2D;
  TH1* dx = new TH1F("dx","Difference between NTUPLE and "
                     "t2d_GarField_6th_Order::WC_pos_vs_t",
                     10000,-3,3);
  
  TString s;
  ifstream f("NTUPLE");
  while (f>>s && s!="BEGIN") {}
  
  int wire;
  float angle, bfield, x, t, sum;
  while (f>>wire>>angle>>bfield>>x>>t)
    dx->Fill(t2d->WC_pos_vs_t(wire,0,angle,bfield,x>0,t) - x);
  f.close();
  dx->Draw();
}



t2d_test.gif


#!/usr/local/root/bin/root -l
// $Id:$ -*-c++-*-
// by Chris Crawford <chris2@lns.mit.edu> 2004/05/22
// draws the drift lines in a cell, per data file from Doug Hasell
{
  gROOT->ProcessLine(".x util.C");
  TPad* p=InitCanvas(3,3,"drift","Garfield Drift Lines");
  gStyle->SetOptStat(0);

  TString s;
  ifstream f("PARALLEL");
  while (f>>s && s!="BEGIN") {}

  int wire, ndata;
  float angle, step, bfield, x[100], y[100], t, a;
  for (int ib=4;ib>=-4;--ib) {
    p->cd(5-ib);
    TString u=Form("B field=%d kG",ib);
    TH2* h=new TH2F(u,u,1000,-0.04,0.04,1000,-0.02,0.02);
    h->Draw();
    for (int it=0;it<54;++it) {
      f>>wire>>ndata>>angle>>step>>bfield;
      for (int ip=0;ip<ndata;++ip) f>>x[ip]>>y[ip]>>t>>a;
      TGraph* g=new TGraph(ndata,x,y);
      g->SetMarkerStyle(22);
      g->Draw("p");
    }
  }
  f.close();
  ViewSingle(p->GetPad(1));
}



drift_draw.gif



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:31 EST