4{
5 float X0,Y0, DDX=500, DDY=500;
6 char line[256];
7 float Zmid;
8 int res;
11 X0=
s->X->Reference+125000/2.;
12 Y0=
s->Y->Reference+100000/2.;
13 Zmid=
s->Z->Reference+
s->EmBotLayer+
s->EmBase/2.;
14 s->Z->PosMove(Zmid,1e6,1e6);
15 s->Z->WaitForMoveComplete(1e4);
17
18
22
24
30 Zmid=
s->Z->Reference+
s->EmBotLayer+
s->EmBase/2.;
31 s->Z->PosMove(Zmid,1e6,1e6);
32 s->Z->WaitForMoveComplete(1e4);
37
42 printf("************************* Tuning complete. taking data **************************\n");
43 date=new TDatime();
44 int id0,id1,id2,id3;
45 if(!
PC->
GetLoadedId(&id0,&id1,&id2,&id3)) {printf(
"No plate is loaded! Load the plate and re-start the application.\n");
return 0;};
46
47 sprintf(line,"z:\\Qcheck\\dat%dem%d.%d.%d.%d",date->GetDate(),id0,id1,id2,id3);
48 gSystem->mkdir(line);
49
50 gSystem->cd(line);
51 Run(
false,
X0, Y0, DDX, DDY,
"dat.root",
false);
52 Run(
false,
X0-20000, Y0-20000, DDX, DDY,
"dat1.root",
false);
53 Run(
false,
X0-20000, Y0+20000, DDX, DDY,
"dat2.root",
false);
54 Run(
false,
X0+20000, Y0-20000, DDX, DDY,
"dat3.root",
false);
55Run(
false,
X0+20000, Y0+20000, DDX, DDY,
"dat4.root",
false);
56 printf("************************* Analysing data **************************\n");
57
58
59
60
61
62
63
64
65
66
67
68
69 file=
new TFile(
"dat.root",
"READ");
70 TTree* Views=(TTree*)
file->Get(
"Views");
72 c->Divide(2,1);
73 c->cd(1);
74 Views->Draw("clusters.eFrame>>ht","eSide==1");
75 ht->Scale(1./Views->GetEntries());
76 ht->Draw();
77 c->cd(2);
78 Views->Draw("clusters.eFrame>>ht1","eSide==0");
79 ht1->Scale(1./Views->GetEntries());
80 ht1->Draw();
81 c->SaveAs("clust.gif");
82
83 file=
new TFile(
"dat1.root",
"READ");
84 TTree* Views=(TTree*)
file->Get(
"Views");
86 c->Divide(2,1);
87 c->cd(1);
88 Views->Draw("clusters.eFrame>>ht","eSide==1");
89 ht->Scale(1./Views->GetEntries());
90 ht->Draw();
91 c->cd(2);
92 Views->Draw("clusters.eFrame>>ht1","eSide==0");
93 ht1->Scale(1./Views->GetEntries());
94 ht1->Draw();
95 c->SaveAs("clust1.gif");
96
97 file=
new TFile(
"dat2.root",
"READ");
98 TTree* Views=(TTree*)
file->Get(
"Views");
100 c->Divide(2,1);
101 c->cd(1);
102 Views->Draw("clusters.eFrame>>ht","eSide==1");
103 ht->Scale(1./Views->GetEntries());
104 ht->Draw();
105 c->cd(2);
106 Views->Draw("clusters.eFrame>>ht1","eSide==0");
107 ht1->Scale(1./Views->GetEntries());
108 ht1->Draw();
109 c->SaveAs("clust2.gif");
110
111 file=
new TFile(
"dat3.root",
"READ");
112 TTree* Views=(TTree*)
file->Get(
"Views");
114 c->Divide(2,1);
115 c->cd(1);
116 Views->Draw("clusters.eFrame>>ht","eSide==1");
117 ht->Scale(1./Views->GetEntries());
118 ht->Draw();
119 c->cd(2);
120 Views->Draw("clusters.eFrame>>ht1","eSide==0");
121 ht1->Scale(1./Views->GetEntries());
122 ht1->Draw();
123 c->SaveAs("clust3.gif");
124
125 file=
new TFile(
"dat4.root",
"READ");
126 TTree* Views=(TTree*)
file->Get(
"Views");
128 c->Divide(2,1);
129 c->cd(1);
130 Views->Draw("clusters.eFrame>>ht","eSide==1");
131 ht->Scale(1./Views->GetEntries());
132 ht->Draw();
133 c->cd(2);
134 Views->Draw("clusters.eFrame>>ht1","eSide==0");
135 ht1->Scale(1./Views->GetEntries());
136 ht1->Draw();
137 c->SaveAs("clust4.gif");
138
139 return 1;
140}
brick X0
Definition: RecDispMC.C:112
int Threshold
Definition: AcqOdyssey.h:174
bool ApplyFIRF
Definition: AcqOdyssey.h:172
bool SubtractBG
Definition: AcqOdyssey.h:171
bool ApplyGainCorr
Definition: AcqOdyssey.h:173
int GetLoadedId(int *id0=NULL, int *id1=NULL, int *id2=NULL, int *id3=NULL)
Definition: AcqSerialPlateChanger.cxx:576
int hwinit()
Definition: hwinit.C:72
AcqOdyssey * o
Definition: hwinit.C:2
int ThrTop
Definition: hwinit.C:11
AcqSerialPlateChanger * PC
Definition: hwinit.C:5
int finefocus(int clu_thre=300, float fineness=4.)
Definition: init.C:109
int tunelight()
Definition: init.C:244
xy(float X, float Y)
Definition: init.C:303
homeall()
Definition: init.C:324
takebggchere()
Definition: init.C:178
s
Definition: check_shower.C:55
TFile * file
Definition: write_pvr.C:3
void Run(bool AbsCoord=false, float X0, float Y0, float DDX, float DDY, const char *File, bool Images=false)
Definition: run.C:208