| MuTr Calibration ResponseThis page shows a summary of how the MuTr electronics response can be, and has been parametrized, how it is being stored in Objy and how it can be accessed/used in offline or elsewhere. For the plots, I'm using calibration runs taken in the end of April'02. I use the same channels for the comparison between different versions. 
 Linear version: used in Run-2ADC = pedestal + gain*DAC Throughout this page I use the 'convenient ADC notation' which is 1800 minus the real recorded ADC value. This has the property of giving a pedestal around 0 and a 'signal' which grows with input/DAC. As you can see in the image below to the left, the linear parametrization is a rather good approximation, but not quite perfect as seen in the image below to the right: 
    Linear response [Left] ADC vs DAC for a typical channel [Right] Residuals for ~128 channels (One Station 2 FEM). (profile histogram) 
 Non-linear version: for the future
    [Left] Neighboring bin difference (ADC counts) vs DAC for the same typical channel [Right] For all channels in the same fem (box plot). If we move on to higher DAC values, or look at Station 3, which has a higher gain, we will approach the region where the preamp saturates, giving rise to a linear trend in the difference between neighboring bins. The saturation appears to kick in at about 1600 ADC counts. (You see a hint of it in the plots above at the high DAC end also) The corresponding DAC value is stored as a parameter named Saturation. The slope of the difference between bins at these rather high DAC values is stored as LinSat, which is also a free parameter during the fitting. The relation between DAC and ADC values, and the difference between neighboring bins for a station 3 FEM is shown below (as before: the markers indicate the mean and error of the mean): 
     
     
 Objy/PdbCal: PdbMutCalibStrip
The different extra parameters I described in the previous section are named:
Center, SqrLow, SqrHigh and LinSat respectively. Offline/Mut: MutCalibStripExamples of usage
void test(const char *infile = "in.txt", 
	  const char *outfile = "out.txt")
{
  
  cout << "starting...." << endl;
  // load the shared libraries
  gSystem->Load("libvtx.so");
  gSystem->Load("libmut.so");
  cout << "libraries loaded..." << endl;
  MutCalibStrip *cobj = new MutCalibStrip();
  // ASCII I/O
  cobj->txtGetAll(infile); // infile must match what PdbMutCalibStrip expects to read
  cobj->txtPutAll(outfile);
  cout << "trying to get hold of a real strip" << endl;
  PdbMutCalibStrip *p2 = cobj->getPdbMutCalibStrip(0,0,0,0,0,0,1);
  cout << "did we get it?" << endl;
  if (p2) 
    {
      p2.print();
      cout << "changing pedestal value" << endl;
      p2.set_pedestal(999.999);
      p2.print();
    }
  //  cobj->putPdbMutCalibStrip(p2); // needed to change value in set
  cout << "Id and name: " << endl;
  int uniqid = p3.getUniqueId(); // bit packed, used for automatic sorting in set
  cout << hex << uniqid << dec << endl;
  char *name = "muTr_ArmX_StaY_OctZ_HOctW_GapI_PlaneJ_StripK";
  bool nameok = p3.getName(name);
  cout << name << endl;
  int nstrips = cobj->getNumberOfStrips();
  cout << "nstrips = " << nstrips << endl;
 
  delete cobj;
}
The following macros can be used for putting stuff into the database or retrieving it, respectively. You probably want to change the timestamps and the descriptive string for your use, though. 
 |