-
Notifications
You must be signed in to change notification settings - Fork 0
/
batch_macro.C
65 lines (43 loc) · 1.86 KB
/
batch_macro.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
gROOT->ProcessLine(".x /afs/cern.ch/user/v/venturia/PeakVsDecoAlignment/LoadLibraries.C");
Mobility mobholes;
Mobility mobelects(-1417e-4,1.07e5,1.109,1.15);
Pulse pp;
pp.decoPulse()->SetParameter(1,1);
TF1* gaus = new TF1("gaus","gaus",-200e-9,200e-9);
gaus->SetParameters(1./(sqrt(2*3.14159)*1e-9),0.,1e-9);
double vtobdepl=220.;
double vbias=300.;
double tobthick = 500e-6;
Sensor tobdeco("deco",tobthick,vtobdepl,&mobholes,pp.decoPulse());
tobdeco.setVbias(vbias);
tobdeco.SetLineColor(kRed);
//Sensor tobgaus("deco",tobthick,vtobdepl,&mobholes,gaus);
//tobgaus.setVbias(vbias);
//tobgaus.SetLineColor(kBlue);
EfieldTotal ef("field1",tobdeco.getThickness(),100e-6,10e-6,1.);
ef.Weight()->SetParameter(0,1e-6);
ef.setMode(Efield::Depth);
EfieldAlone ef2("field2",tobdeco.getThickness(),100e-6,10e-6,1.);
ef2.Weight()->SetParameter(0,1e-6);
ef2.setMode(Efield::Depth);
Drift hole("holes",&mobholes,&tobdeco.EfieldFunc(),0,tobdeco.getThickness());
Drift elect("elects",&mobelects,&tobdeco.EfieldFunc(),0,tobdeco.getThickness());
Signal sig("allsig",&tobdeco,&hole,&elect,&ef,pp.decoPulse());
Signal sig2("allsig2",&tobdeco,&hole,&elect,&ef2,pp.decoPulse());
Signal sigdelta("deltasig",&tobdeco,&hole,&elect,0,pp.decoPulse());
Signal sighole("holesig",&tobdeco,&hole,0,&ef,pp.decoPulse());
Signal siggaus("allsiggaus",&tobdeco,&hole,&elect,&ef,gaus);
Signal siggaus2("allsiggaus2",&tobdeco,&hole,&elect,&ef2,gaus);
sigdelta.SignalFractionVsTimeFunc()->SetNpx(1000);
sigdelta.SignalFractionVsTimeFunc()->SetNpy(1000);
sig.SignalFractionVsTimeFunc()->SetNpx(200);
sig.SignalFractionVsTimeFunc()->SetNpy(200);
sig2.SignalFractionVsTimeFunc()->SetNpx(200);
sig2.SignalFractionVsTimeFunc()->SetNpy(200);
TFile out("result_batch.root","new");
sigdelta.SignalFractionVsTimeFunc()->Write();
sig.SignalFractionVsTimeFunc()->Write();
sig2.SignalFractionVsTimeFunc()->Write();
out.Close();
}