3 void SignalFormNEW(
const char *foldername =
"report",
const char *ext =
".gif")
5 gSystem->Load(
"../libData.so");
9 TFile *f =
new TFile(
"../data/dataTektronix/GSItests/1000V_trigg40mv/30_60_10_50_GSI.root");
11 TTree *tr = (TTree*)f->Get(
"atree");
13 const Int_t noBranches = 2;
14 Double_t ZeroTime[4],mh[4],RisTime[4],decayT[4];
15 Int_t iZero[4],PosZero[4],deltaT[4],Eh[4],Bh[4];
17 AEvent *aevent[noBranches];
18 for (Int_t j = 0; j<noBranches; j++) {
19 aevent[j] =
new AEvent(1000);
20 bName.Form(
"Ach%d.", j);
21 tr->SetBranchAddress(bName.Data(), &aevent[j]);
27 for (Int_t i = 0; i < 2; i++) {
28 hname.Form(
"hist%d",i);
29 Chname.Form(
"Integral form of the signal",i);
30 hist[i] =
new TH1F(hname.Data(), Chname.Data(), 1000, 0, 200);
33 TF1 *fit1 =
new TF1(
"fit1",
"-[0]*exp(-x*[1])");
35 fit1->SetParName(1,
"tD");
37 Long64_t nEntries = tr->GetEntries();
40 for (Int_t j = 0; j < nEntries; j++) {
43 for(Int_t k=0;k<2;k++) {
44 ZeroTime[k] = aevent[k]->GetfLED();
45 iZero[k] = ZeroTime[k]*10;
46 if(j==0) { PosZero[k] = iZero[k]; }
47 deltaT[k] = iZero[k] - PosZero[k];
50 for(Int_t i = 0; i<1000; i++){
51 if( ((i+deltaT[0])>-1) && ((i+deltaT[0])<1000)) hist[0]->AddBinContent(i,aevent[0]->GetOnefAmpPos(i+deltaT[0]));
52 if( ((i+deltaT[1])>-1) && ((i+deltaT[1])<1000)) hist[1]->AddBinContent(i,aevent[1]->GetOnefAmpPos(i+deltaT[1]));
82 TCanvas *c1 =
new TCanvas(
"c1",
"test",10,10,1000,600);
88 hist[i]->GetYaxis()->SetTitle(
"Signal [V]");
89 hist[i]->GetYaxis()->CenterTitle();
91 hist[i]->GetXaxis()->SetTitle(
"Time [ns]");
92 hist[i]->GetXaxis()->CenterTitle();
94 hist[i]->GetXaxis()->SetRangeUser(75, 135);