[Halld-cal] BCAL Reconstruction Meeting Minutes 2015-04-30

Elton Smith elton at jlab.org
Thu Apr 30 16:47:30 EDT 2015


Hi Tegan,

Sorry we missed the meeting this morning. I will try to provide 
answers/comments where I can. Others can also provide feedback.

= New code =
* Poisson statistics smearing still needs a value for the energy of one 
dark hit.

Attached is a script and plots of a single pixel firing, with the 
normalization of summed energy of 0.31 MeV/pixel. Note, however that his 
depends on several factors. This is an average value for energy 
deposited in the middle of a module. Of course the actual amount of 
energy deposited with that amplitude will depend on the position of the 
energy deposition. Also, I have used a gain factor of 0.046 MeV/integral 
count. But these vary quite a bit from cell to cell. See Will's log 
entry detailing the gain factors obtained for the fall run:
https://logbooks.jlab.org/files/2015/03/3328508/BCAL_Calib_Update_Mar20.pdf.
However, the question itself regarding what energy corresponds to a 
single pixel is a little misleading. If one is simulating dark hits 
(i.e. single pixels), these do not correspond to energy per se but 
rather an amount of charge into the FADC. This is better characterized 
by the number of FADC counts that correspond to one pixel firing (see 
figure). This is independent of attenuation length. It is does depend on 
the gain of the sensor and electronics. However, there are many 
contributions to the "gain" or conversion from counts to MeV. For 
example, the acceptance/transmission of the light guides contributes to 
the overall gain factor and this has nothing to do with the size of the 
single pixel. Therefore, it might make more physical sense to simulate 
the dark hits with minimal dependence on each channel. If we operate the 
SiPMs at the same over bias, this should correspond to the same gain for 
all sensors. Therefore, the large variation we are seeing in "gains" may 
not be primarily due to the actual sensor gains themselves.

Hope this gives you sufficient information to think about how to move 
forward.

* What should we use for an energy threshold to write out events?  A 4 
mV threshold was used before.  4 MeV?

The threshold should be given in counts, which corresponds to the DAQ 
threshold of 105. The pedestal is nominally at 100, so 5 counts above 
pedestal. We are using the 2 V scale on the FADCS, which are 12 bits, so 
one count = 0.0004884 V. Therefore 5 counts is 2.44 mV assuming the 
pedestal does not drift. Of course it does, so another question is 
whether we wish to include pedestal drifts in the simulation. Generally 
one tries to setup hardware, so the software can ignore such details, 
but this may not be possible in this case.

In any case, the thing to do is to convert the energy deposited into 
counts, use the pulse shape I have provided (or your own favorite) to 
convert this into fADC counts. The threshold would be applied to this 
pulse train.


* The change to the data structure will be just adding 
'incident_id="int"' to 'bcalTruthHit.'

Others with more expertise should comment on this one.

** If we don't change the data structure, we'll change bcal_index in the 
code and get rid of the incident particle filling.
** I'd prefer changing the data structure, since we'll eventually want 
to implement incident particle dependent smearing (I assume), and it 
seems relatively easy to do it now.

* Time smearing: the time resolution in the code for the fADC is stated 
as 4 ns / sqrt(12).  This was used before because we were using 0.1 ns 
bins rather than 4 ns bins.

This is probably an old guess based on assuming the time coming from the 
fADC comes from picking the first FADC sample above some some threshold. 
We are doing much better than this by essentially finding the time at 
half height. The resolution for this is about 0.2 - 0.3 ns, but Mark can 
probably provide a better number. I suggest you put in a value based on 
Marks latest studies and we can adjust it as more studies are done.

** Is this value what we'd want to use for smearing a single truth time?


= Old code =
* We need to decide whether or not we want to keep this method available 
for people to choose to use.
* If we do keep it:
** Need to find a value for the energy of one dark hit that causes 
waveforms to more closely resemble data and also that gives reasonable 
pedestal variation.

Using the attached scritps used for the pedestal studies, I think we a 
first stab at this.  See GlueX-doc-2695
http://argus.phys.uregina.ca/cgi-bin/private/DocDB/ShowDocument?docid=2695
You can find all the scripts in the tar.gz file. If there is anything 
missing, let me know and I can make it available.

** By fixing an electronic noise smearing, then altering the dark hit 
energy, it looks like we want something like the current energy divided 
by 10 or so.
** It should be easy to set the dark hit energy based on what amplitude 
in mV we want the dark pulses to have, if we have any feeling for that 
(1 mV amplitude ~ 1 MeV energy deposition).

See the notes and GlueX notes above, which should provide good answers 
to these questions.


Elton Smith
Jefferson Lab MS 12H3
12000 Jefferson Ave STE 4
Newport News, VA 23606
(757) 269-7625
(757) 269-6331 fax

On 4/30/15 1:12 PM, Zisis Papandreou wrote:
> Hi folks:
>
> the minutes from our short meeting this morning have been posted:
> https://halldweb.jlab.org/wiki/index.php/BCAL_Reconstruction_Meeting_2015-04-30
>
> Please note that since there was a controlled access in the hall at 
> the same time as the meeting, JLab was not able to join us. 
>  Therefore, we posted Tegan's questions on HDGEANT and mcsmear on the 
> Wiki (see above minutes). I've placed this discussion at the top of 
> the agenda of next week's Calorimetry meeting, as it is important to 
> progress on this and complete the tasks.  Will L. will also join us 
> for next week's meeting.
>
> We are hoping that after the commissioning ends on Monday, folks will 
> have a chance to read this list so that we can decide upon the items 
> and move forward.
>
> I also posted the minutes from the April 16 meeting: 
> https://halldweb.jlab.org/wiki/index.php/BCAL_Reconstruction_Meeting_2015-04-16
>
> Thanks and cheers, Zisis...
>
> Dr. Zisis Papandreou
> Professor of Physics, Ph.D., P.Phys.
> ---------------------------------------------------------
> Department of Physics
> University of Regina
> 3737 Wascana Parkway
> Regina, SK S4S 0A2 CANADA
>
> *Phone: (306) 585-5379*
> Fax: (306) 585-5659
> Email: zisis at uregina.ca <mailto:zisis at uregina.ca>
> Website: 
> http://www.uregina.ca/science/physics/people/faculty-research/zisis-papandreou/index.html
>
>
>
>
>
>
>
> _______________________________________________
> Halld-cal mailing list
> Halld-cal at jlab.org
> https://mailman.jlab.org/mailman/listinfo/halld-cal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/halld-cal/attachments/20150430/65040c98/attachment-0001.html 
-------------- next part --------------

#include <vector>

void pixel_size(void)
{

gROOT->Reset();
//TTree *Bfield = (TTree *) gROOT->FindObject("Bfield");
gStyle->SetPalette(1,0);
gStyle->SetOptStat(kTRUE);
gStyle->SetOptFit(kTRUE);
gStyle->SetOptFit(1111);
gStyle->SetPadRightMargin(0.15);
gStyle->SetPadLeftMargin(0.15);
gStyle->SetPadBottomMargin(0.15);
// gStyle->SetFillColor(0);
//
   char string[256];
   Int_t j,jj;

  Int_t nbins=100;

   // parameter definitions

   Double_t mu=0.0787;    // unis of 1/x
   Double_t sigma=0.865;     // units of x 
   Double_t t0=10;
   Double_t pedestal=100;
   Double_t ped_sigma=1.2; 
   Double_t Vover_nominal = 1.2; 
   Double_t Vover0 = 0.9;
   Double_t T0 = 18;
   Double_t T=10;
   Double_t gain =   0.75e6;                   // gain = 0.75x10^6 at 23 deg C and Vover=0.9 V.
   Double_t e = 1.6e-19;   // electric charge
   Double_t preamp_gain = 1.62*50;    // units of Ohms                // preamp gain 0.081mV/uA or x1.62 wrt to 50Ohm (Fernando 4/15/2015)
   Double_t fadc_scale = 2./4095.;      // 2 Volts for a 12 bit scale.  (V/count)
   Double_t time_sample = 4e-9;        // 4 ns time sample
   Double_t conversion = 0.046;         // Average MeV per integral count.
   Double_t norm_factor=1;               // relative normalization to play with gains

   Double_t pe_pulse = norm_factor*e * preamp_gain * gain / fadc_scale / time_sample; 
   Double_t norm = pe_pulse*Vover_nominal/Vover0;
   // Double_t norm=1;
 
   cout << " SiPM gain=" << gain << " , fadc gain=" << preamp_gain << " Ohms, fadc scale=" << fadc_scale << "V/count, time sample=" << time_sample << " ns, pe_pulse=" << pe_pulse << " counts" << " norm=" << norm << endl;

   Double_t xmin=0;
   Double_t xmax=100;

   Double_t xpmin=0;
   Double_t xpmax=100;

   Int_t npts=16;
          
   // define histogram to hold pulses

  TH1F *hpedestalw = new TH1F("hpedestalw","Pedestal window", nbins,xmin,xmax);
  TH1F *hpulsew = new TH1F("hpulsew","Pulse waveform", nbins,xmin,xmax);
  TH1F *hwindow= new TH1F("hwindow","Readout Window", nbins,xmin,xmax);
  TH1I *hwindowI = new TH1I("hwindowI","Readout Window Integer", nbins,xmin,xmax);
  
   // define pulse function: time units are FADC samples.

   TF1 *pulse = new TF1("pulse_func",pulse_func,xpmin,xpmax,5);
   pulse->SetParameters(mu,sigma,norm,t0,pedestal);
   pulse->SetParNames("mu","sigma","norm","t0","pedestal");
   TRandom1 *r = new TRandom1();      // randomize pedestals with FADC noise

        // define pulse function
 
         TF1 *pulse = new TF1(string,pulse_func,xpmin,xpmax,5);
         pulse->SetParameters(mu,sigma,norm,t0,pedestal);
         pulse->SetParNames("mu","sigma","norm","t0","pedestal");

   // create histogram windows with one pulse and electronic noise

  for (jj=0;jj<nbins;jj++) {
         Double_t t = xmin + (xmax-xmin)*(jj+0.5)/nbins;
         Double_t ran_ped = r->Gaus(0,ped_sigma);
          Double_t amp = pulse->Eval(t) - pedestal;
         Double_t fadc = amp + ran_ped;

             cout << " jj=" << jj << " t=" << t << " amp=" << amp << " ran_ped=" << ran_ped << " fadc=" << fadc << endl;
             hpedestalw->Fill(t,ran_ped);
             hpulsew->Fill(t,amp);
             hwindow->Fill(t,fadc);
             hwindowI->Fill(t,fadc+0.5);
         }
  
   TCanvas *c0 = new TCanvas("c0", "c0",200,10,700,700);
   c0->SetBorderMode(0);
   c0->SetFillColor(0);

   c0->SetGridx();
   c0->SetGridy();

   c0->Divide(1,2);
   c0->cd(1);
   c0_1->SetBorderMode(0);
   c0_1->SetFillColor(0);

   hpulsew->SetTitle("");  
   hpulsew->GetXaxis()->SetLabelSize(0.05);
   hpulsew->GetXaxis()->SetTitleSize(0.05);
   hpulsew->GetYaxis()->SetLabelSize(0.05);
   hpulsew->GetYaxis()->SetTitleSize(0.05);
   hpulsew->GetYaxis()->SetTitleOffset(1.5);
   hpulsew->GetYaxis()->SetTitle("One pixel (FADC counts/sample)");
   hpulsew->GetXaxis()->SetTitle("FADC samples");
   hpulsew->GetXaxis()->SetNdivisions(505);
   hpulsew->SetLineColor(2);
   hpulsew->Draw();  

   sprintf (string,"Parameter Settings\n");
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.86,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   sprintf (string,"SiPM Gain=%g at Vover=%.1f V\n",gain,Vover0);
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.80,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   sprintf (string,"Preamp Gain=%.1f Ohms\n",preamp_gain);
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.75,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   sprintf (string,"FADC scale=%.7f V/count\n",fadc_scale);
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.70,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   sprintf (string,"Conversion=%.4f MeV/integral count\n",conversion);
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.65,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   sprintf (string,"One pixel integral =%.2f counts\n",norm);
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.61,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   sprintf (string,"One pixel integral =%.2f MeV\n",norm*conversion);
   printf("string=%s",string);
   t1 = new TLatex(0.4,0.57,string);
   t1->SetNDC();
   t1->SetTextSize(0.04);
   t1->Draw();

   c0->cd(2);
   c0_2->SetBorderMode(0);
   c0_2->SetFillColor(0);

   hpedestalw->SetTitle("");
   hpedestalw->GetXaxis()->SetLabelSize(0.05);
   hpedestalw->GetXaxis()->SetTitleSize(0.05);
   hpedestalw->GetYaxis()->SetLabelSize(0.05);
   hpedestalw->GetYaxis()->SetTitleSize(0.05);
   hpedestalw->GetYaxis()->SetTitleOffset(1.5);
   hpedestalw->GetYaxis()->SetTitle("Random pedestal (counts/sample)");
   hpedestalw->GetXaxis()->SetTitle("FADC samples");
   hpedestalw->GetXaxis()->SetNdivisions(505);
   hpedestalw->SetLineColor(2);
   hpedestalw->Draw();      
  
   TCanvas *c1 = new TCanvas("c1", "c1",200,10,700,700);
   c1->SetBorderMode(0);
   c1->SetFillColor(0);

   c1->SetGridx();
   c1->SetGridy();

   c1->Divide(1,2);
   c1->cd(1);
   c1_1->SetBorderMode(0);
   c1_1->SetFillColor(0);

   hwindow->SetTitle("");
   hwindow->GetXaxis()->SetLabelSize(0.05);
   hwindow->GetXaxis()->SetTitleSize(0.05);
   hwindow->GetYaxis()->SetLabelSize(0.05);
   hwindow->GetYaxis()->SetTitleSize(0.05);
   hwindow->GetYaxis()->SetTitleOffset(1.5);
   hwindow->GetYaxis()->SetTitle("Float Counts");
   hwindow->GetXaxis()->SetTitle("FADC samples");
   hwindow->GetXaxis()->SetNdivisions(505);
   hwindow->SetLineColor(2);
   hwindow->Draw();   

   /*sprintf (string,"t0=%.1f cm, R=%.2f\n",xpos,Rup);
   printf("string=%s",string);
   t1 = new TLatex(0.2,0.92,string);
   t1->SetNDC();
   t1->SetTextSize(0.05);
   t1->Draw();*/

   c1->cd(2);
   c1_2->SetBorderMode(0);
   c1_2->SetFillColor(0);

   hwindowI->SetTitle("");
   hwindowI->GetXaxis()->SetLabelSize(0.05);
   hwindowI->GetXaxis()->SetTitleSize(0.05);
   hwindowI->GetYaxis()->SetLabelSize(0.05);
   hwindowI->GetYaxis()->SetTitleSize(0.05);
   hwindowI->GetYaxis()->SetTitleOffset(1.5);
   hwindowI->GetYaxis()->SetTitle("Integer Counts");
   hwindowI->GetXaxis()->SetTitle("FADC samples");
   hwindowI->GetXaxis()->SetNdivisions(505);
   hwindowI->SetLineColor(2);
   hwindowI->Draw();       
  




   sprintf (string,"pixel_size.pdf(");
   c0->SaveAs(string);
   sprintf (string,"pixel_size.pdf)");
   c1->SaveAs(string);

   // save width vs rate histogram.

   sprintf (string,"pixel_size_c0.C");
   c0->SaveAs(string);
   sprintf (string,"pixel_size_c1.C");
   c1->SaveAs(string);


}
Double_t pulse_func (Double_t *x, Double_t *par) {

   Double_t mu=par[0];
   Double_t sigma=par[1];
   Double_t gain=par[2];
   Double_t t0=par[3];
   Double_t pedestal=par[4];
   Double_t x1=x[0]-t0;

   char string[256];

   Double_t func;
   Double_t amplitude;

   if (x1 < -20) {
           func = pedestal;
           }
   else if {

         Double_t arg = (mu*sigma*sigma-x1)/(sqrt(2)*sigma);
         Double_t arg2 = -mu*x1 +(mu*sigma)*(mu*sigma)/2;
         amplitude = (mu/2)* exp(arg2) *  TMath::Erfc(arg);
         func = gain * amplitude + pedestal;
  }
   
   /*sprintf (string,"pulse_func: x1=%f amplitude=%f mu=%f sigma=%f t0=%f pedestal=%f, func=%f\n",x1,amplitude,mu,sigma,pedestal,func);
   printf ("string=%s",string);*/

   return func;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixel_size.pdf
Type: application/pdf
Size: 20171 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/halld-cal/attachments/20150430/65040c98/attachment-0001.pdf 


More information about the Halld-cal mailing list