[Solid_software] Fwd: [EXTERNAL] Re: Modeling of VMM3
Alexandre Camsonne
camsonne at jlab.org
Wed Apr 15 10:12:27 EDT 2020
---------- Forwarded message ---------
From: George Iakovidis <george.iakovidis at cern.ch>
Date: Wed, Apr 15, 2020 at 9:54 AM
Subject: [EXTERNAL] Re: Modeling of VMM3
To: Alexandre Camsonne <camsonne at jlab.org>
Cc: degeronimo at ieee.org <degeronimo at ieee.org>, kg6cq at virginia.edu <
kg6cq at virginia.edu>
Hi Alexandre
I have done several digitization models for ATLAS. I have solved the shaper
and written it attaching the code and a document.
there is a lot of it inside ATLAS but I cannot just extract it. Data output
simulation I don’t quite understand what you aim, it’s
quite simple, you get 38 bits in continuous mode and another specific data
format on L0 mode which is documented in the
docs I gave you
Cheers
George
double vmmResponse(vector<double> electronsTime, vector<double>
electronsGain, double &slope, double electronicsThreshold, double
&litudeFirstPeak){
TH1D *response = new TH1D("response","VMM response",5000,0,500);
response->Reset();
double PeakingTime = 25.;
double thresh = 0.05;
double a = (PeakingTime*(10^-9))/1.5;
double pole0 = 1.263/a; // real pole
double Re_pole1 = 1.149/a;
double Im_pole1 = -0.786/a; //complex pole
double K0 = 1.584;
double Re_K1 = -0.792;
double Im_K1 = -0.115;
double pole1_square = Re_pole1*Re_pole1 + Im_pole1*Im_pole1;
double K1_abs = TMath::Sqrt(Re_K1*Re_K1 + Im_K1*Im_K1);
double argK1 = TMath::ATan2(Im_K1, Re_K1);
if(debugElx)
cout<<"#################### Starting VMM responce with size of
electrons: "<<electronsTime.size()<<" ####################"<<endl;
double t,st,timeStep;
timeStep=0.1;
for (Int_t i=0; i<electronsTime.size(); i++) {
if(debugElx)
cout<<"# electrons with time: "<<electronsTime[i]<<",
and gain: "<<electronsGain[i]<<endl;
for(double ti=electronsTime[i];ti<=500;ti=ti+timeStep){
t = (ti-electronsTime[i])*(10^-9);
st = electronsGain[i]* TMath::Power(a,3
)*pole0*pole1_square*((K0*TMath::Exp(-t*pole0))+(2.
*K1_abs*TMath::Exp(-t*Re_pole1)*cos(-t*Im_pole1+argK1)));
response->Fill(ti,st);
}
}
double timeAboveThr =
response->GetXaxis()->GetBinCenter(response->FindFirstBinAbove(electronicsThreshold));
TF1 *polFit = new TF1("polFit","pol1",0,500);
polFit->SetLineColor(kRed);
response->Fit("polFit","QR","",timeAboveThr,timeAboveThr+2.);
slope = polFit->GetParameter(1);
if(debug)
cout<<" Threshold found: "<< timeAboveThr <<endl;
// peak finder
TSpectrum *s = new TSpectrum(10,1); //Spectrum for the peaks detection
double tFromFirstPeak = 50000;
Int_t nfound = s->Search(response,1,"nobackground,goff");
Float_t *xpeaks = s->GetPositionX();
for(int j = 0;j<nfound;j++){
if
(response->GetBinContent(response->FindBin(xpeaks[j]))<electronicsThreshold){
continue;
}
if(tFromFirstPeak>xpeaks[j])
tFromFirstPeak = xpeaks[j];
}
int binFromFirstPeak = response->FindBin(tFromFirstPeak);
amplitudeFirstPeak = response->GetBinContent(binFromFirstPeak);
if(debugElx){
TCanvas *responseCanvas = new TCanvas("responseCanvas","Response",
600,600);
responseCanvas->cd();
response->Draw("C");
cout<<"Plotting histogram with first peak:"<<tFromFirstPeak<<",
slope: "<<slope <<", amplitude at first peak: "<<amplitudeFirstPeak<<", Hit
enter"<<endl;
responseCanvas->Update();
getchar();
delete responseCanvas;
}
delete response,polFit;
return timeAboveThr;
}
On 14 Apr 2020, at 17:09, Alexandre Camsonne <camsonne at jlab.org> wrote:
Hi,
we would like to simulate the performance of the chip in our high
background environment.
Do you have any code to simulate the shape of the signals and simulate the
data extracted by the chip ? Most likely this was done for the ATLAS NSW
simulation/
Thank you,
Alexandre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/solid_software/attachments/20200415/38dba555/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmm_shaper.pdf
Type: application/pdf
Size: 173451 bytes
Desc: not available
URL: <https://mailman.jlab.org/pipermail/solid_software/attachments/20200415/38dba555/attachment-0001.pdf>
More information about the Solid_software
mailing list