1 |
|
|
2 |
|
|
3 |
/** |
/** |
4 |
* TmtcTemperature |
* TmtcTemperature |
5 |
* author Marcelli |
* author Marcelli |
52 |
#include <sstream> |
#include <sstream> |
53 |
#include "TStyle.h" |
#include "TStyle.h" |
54 |
#include "TFile.h" |
#include "TFile.h" |
55 |
|
#include "TAxis.h" |
56 |
|
#include "TLegend.h" |
57 |
|
#include "TF1.h" |
58 |
#include "TList.h" |
#include "TList.h" |
59 |
#include "TTree.h" |
#include "TTree.h" |
60 |
#include "TObjString.h" |
#include "TObjString.h" |
61 |
#include "TCanvas.h" |
#include "TCanvas.h" |
62 |
#include "TGraph.h" |
#include "TGraph.h" |
63 |
|
#include "TMultiGraph.h" |
64 |
#include "TH1F.h" |
#include "TH1F.h" |
65 |
#include "TGaxis.h" |
#include "TGaxis.h" |
66 |
#include "TString.h" |
#include "TString.h" |
174 |
} |
} |
175 |
|
|
176 |
|
|
|
|
|
177 |
//////////////////////////////////////////////////////////////////////////////// |
//////////////////////////////////////////////////////////////////////////////// |
178 |
////////////////////////// TMTC TEMPERATURE ////////////////////////////////// |
////////////////////////// TMTC TEMPERATURE ////////////////////////////////// |
179 |
////////////////////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////////////////////// |
201 |
pamela::TmtcRecord *tmr=0; |
pamela::TmtcRecord *tmr=0; |
202 |
|
|
203 |
tr->SetBranchAddress("Tmtc", &tme); |
tr->SetBranchAddress("Tmtc", &tme); |
|
|
|
|
///-------to create canvas--------------------// |
|
|
TCanvas *Canvascchot = new TCanvas("Tmtc_1", base, 1280, 1024); |
|
|
Canvascchot->Divide(2,3); |
|
|
Canvascchot->SetFillColor(10); |
|
|
|
|
|
TCanvas *Canvascccold = new TCanvas("Tmtc_2", base, 1280,1024); |
|
|
Canvascccold->Divide(2,3); |
|
|
Canvascccold->SetFillColor(10); |
|
|
|
|
|
TCanvas *Canvasccvrl = new TCanvas("Tmtc_3", base, 1280, 1024); |
|
|
Canvasccvrl->Divide(1,3); |
|
|
Canvasccvrl->SetFillColor(10); |
|
|
|
|
|
|
|
|
TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024); |
|
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
|
|
Canvasthdea->SetFillColor(10); |
|
|
Canvasthdea->Divide(3,4); |
|
|
} |
|
|
else if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
|
|
Canvasthdea->SetFillColor(10); |
|
|
Canvasthdea->Divide(4,4); |
|
|
} |
|
|
|
|
|
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
|
|
Canvasvoltdea->SetFillColor(10); |
|
|
Canvasvoltdea->Divide(2,3); |
|
204 |
|
|
205 |
//////--------to analize data-----------------////// |
//////--------to analize data-----------------////// |
206 |
Long64_t nevents = tmtcBr->GetEntries(); |
Long64_t nevents = tmtcBr->GetEntries(); |
211 |
} |
} |
212 |
|
|
213 |
|
|
214 |
const Int_t size = nevents; |
string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","KHB_HOT","KHB_COLD","IDAQ_HOT","IDAQ_COLD","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB","TOFHV_HOT","TOFHV_COLD"}; |
215 |
|
|
216 |
|
string titoloth[] ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH","DCDC_TH","CPU_TH1","CPU_TH2", "IPM_CPU_TH", "VRL_TH1", "VRL_TH2", "VME_COOL_TH"}; |
217 |
|
|
218 |
|
|
219 |
|
const Int_t size = nevents; |
220 |
std::stringstream oss; |
std::stringstream oss; |
221 |
Int_t recordstot=0; |
Int_t recordstot=0; |
222 |
|
Int_t recordstotmax=0; |
223 |
|
Int_t records[size]; |
224 |
|
Int_t ev[size]; |
225 |
|
Double_t OBT[size]; |
226 |
|
Int_t tot=0; |
227 |
Int_t m=0; |
Int_t m=0; |
228 |
Int_t l=0; |
Int_t l=0; |
|
Int_t n=0; |
|
229 |
|
|
230 |
for (Int_t i = 0; i < size; i++){ |
|
231 |
|
for (Int_t i = 0; i < size; i++){ ///ciclo per decidere le pagine |
232 |
tmtcBr->GetEntry(i); |
tmtcBr->GetEntry(i); |
233 |
Long64_t tmpSize = tme->Records->GetEntries(); |
Long64_t tmpSize = tme->Records->GetEntries(); |
|
//Int_t size_b = tmpSize; |
|
234 |
recordstot=recordstot+tmpSize; |
recordstot=recordstot+tmpSize; |
235 |
} |
if (tmpSize>0){ |
236 |
|
tmr = (pamela::TmtcRecord*)tme->Records->At(0); |
237 |
const Int_t lungmax=16*recordstot; |
if(i==0){ |
238 |
const Int_t lungmin=6*recordstot; |
ev[0]=0; |
239 |
|
records[0]=0; |
240 |
Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], ythana[lungmax], xrecordobtth[lungmax], xrecordobtdea[lungmin], ydea[lungmin], xrecordobtcc_1[lungmax], yccdiagacq_1[lungmax], ythana_1[lungmax], xrecordobtth_1[lungmax], xrecordobtdea_1[lungmin], ydea_1[lungmin], limth[lungmax], limvolt1[lungmin], limvolt2[lungmin], limvolt3[lungmin]; |
OBT[0]=tmr->TM_RECORD_OBT; |
241 |
|
}else if (fmod(i, 50)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){ |
242 |
|
//}else if ((fmod(i, 20)==0) || (i==(size-1)) ){ |
243 |
string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","KHB_HOT_LATCHUP","KHB_COLD_LATCHUP","IDAQ_HOT_ALARM","IDAQ_COLD_ALARM","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB_ALARM","TOFHV_HOT_ALARM","TOFHV_COLD_ALARM"}; |
tot=tot+1; |
244 |
|
if (recordstotmax<recordstot) recordstotmax=recordstot; |
245 |
string titoloth[] ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH","DCDC_TH","CPU_TH1","CPU_TH2", "", "", "", ""}; |
records[tot]=recordstot; |
246 |
|
OBT[tot]=tmr->TM_RECORD_OBT; |
247 |
|
ev[tot]=i; |
248 |
recordstot=0; |
recordstot=0; |
|
for (Int_t i = 0; i < size; i++){ |
|
|
tmtcBr->GetEntry(i); |
|
|
Long64_t tmpSize = tme->Records->GetEntries(); |
|
|
Int_t size_b = tmpSize; |
|
|
for (Int_t j = 0; j < size_b; j++){ |
|
|
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
|
|
|
|
|
for (Int_t k =0; k <16; k++){ |
|
|
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
|
|
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
|
249 |
} |
} |
250 |
|
} |
251 |
|
} |
252 |
|
|
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
|
|
for (Int_t k =0; k <12; k++){ |
|
|
ythana[12*recordstot+12*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
|
|
xrecordobtth[12*recordstot+12*j+k] = tmr->TM_RECORD_OBT; |
|
|
} |
|
|
} |
|
|
else if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
|
|
for (Int_t k =0; k <16; k++){ |
|
|
ythana[16*recordstot+16*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
|
|
xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
|
|
} |
|
|
} |
|
253 |
|
|
|
for (Int_t k =0; k <6; k++){ |
|
|
ydea[6*recordstot+6*j+k] = convert_volt(tmr->TM_DEA_ANA[k]); |
|
|
xrecordobtdea[6*recordstot+6*j+k] = tmr->TM_RECORD_OBT; |
|
|
} |
|
|
} |
|
|
recordstot=recordstot+tmpSize; |
|
|
} |
|
|
|
|
|
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
|
|
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
|
254 |
|
|
255 |
//CC Graph |
const Int_t lungmax=16*recordstotmax; |
256 |
for (Int_t k =0; k<16; k++){ |
const Int_t lungmin=6*recordstotmax; |
257 |
for (Int_t i = 0; i < recordstot; i++){ |
|
258 |
yccdiagacq_1[i]= yccdiagacq[16*i+k]; |
|
259 |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], ythana[lungmax], xrecordobtth[lungmax], xrecordobtdea[lungmin], ydea[lungmin], xrecordobtcc_1[lungmax], xrecordobtcc_1d[lungmax], xrecordobtcc_1u[lungmax], yccdiagacq_1[lungmax], yccdiagacq_1d[lungmax], yccdiagacq_1u[lungmax], ythana_1[lungmax], xrecordobtth_1[lungmax], xrecordobtdea_1[lungmin], ydea_1[lungmin], limth[lungmax], limvolt1[lungmin], limvolt2[lungmin], limvolt3[lungmin]; |
260 |
} |
|
261 |
//CC IPM |
Double_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax], yccipmerror2[lungmax]; |
262 |
if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){ |
|
263 |
Canvascchot->cd(m+1); |
|
|
gPad->SetFillColor(10); |
|
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
|
|
|
|
|
pt = new TPaveText (.01,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
pt1 = new TPaveText (.01,.47,.09,.53); |
|
|
pt1->AddText("OFF"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
oss.str(""); |
|
|
oss<<filename.Data()<<": "<<titolocc[k]; |
|
|
ccrecord->SetTitle(oss.str().c_str()); |
|
|
ccrecord->SetMaximum(1.5); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->SetFillColor(8); |
|
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
|
|
ccrecord->GetXaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetTitle(""); |
|
|
ccrecord->GetYaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
|
|
ccrecord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecord->SetMaximum(2); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->Draw("AB"); |
|
|
pt->Draw(); |
|
|
pt1->Draw(); |
|
|
m=m+1; |
|
|
} |
|
|
//CC idaq-khb-tof |
|
|
if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){ |
|
|
Canvascccold->cd(l+1); |
|
|
gPad->SetFillColor(10); |
|
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
|
|
if (k==6 || k==7){ |
|
|
TPaveText *pt = new TPaveText (.01,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.01,.47,.15,.53); |
|
|
pt1->AddText("OFF/LATCHUP"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
if (k==8 || k==9 || k==14 || k==15){ |
|
|
TPaveText *pt = new TPaveText (.01,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.01,.47,.13,.53); |
|
|
pt1->AddText("OFF/ALARM"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
oss.str(""); |
|
|
oss<<filename.Data()<<": "<<titolocc[k]; |
|
|
ccrecord->SetTitle(oss.str().c_str()); |
|
|
ccrecord->SetMaximum(1.5); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->SetFillColor(8); |
|
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
|
|
ccrecord->GetXaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetTitle(""); |
|
|
ccrecord->GetYaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
|
|
ccrecord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecord->SetMaximum(2); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->Draw("AB"); |
|
|
l=l+1; |
|
|
} |
|
|
//CC vrl |
|
|
if (k==11 || k==12 || k==13 ){ |
|
|
Canvasccvrl->cd(n+1); |
|
|
gPad->SetFillColor(10); |
|
|
TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1); |
|
|
if (k==11 || k==12){ |
|
|
TPaveText *pt = new TPaveText (.05,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.05,.47,.09,.53); |
|
|
pt1->AddText("OFF"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
if (k==13){ |
|
|
TPaveText *pt = new TPaveText (.05,.07,.09,.13); |
|
|
pt->AddText("ON"); |
|
|
pt->SetBorderSize(1); |
|
|
pt->Draw(); |
|
|
TPaveText *pt1 = new TPaveText (.03,.47,.11,.53); |
|
|
pt1->AddText("OFF/ALARM"); |
|
|
pt1->SetBorderSize(1); |
|
|
pt1->Draw(); |
|
|
} |
|
|
oss.str(""); |
|
|
oss<<filename.Data()<<": "<<titolocc[k]; |
|
|
ccrecord->SetTitle(oss.str().c_str()); |
|
|
ccrecord->SetMaximum(1.5); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->SetFillColor(8); |
|
|
ccrecord->GetXaxis()->SetTitle("OBT"); |
|
|
ccrecord->GetXaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetTitle(""); |
|
|
ccrecord->GetYaxis()->CenterTitle(); |
|
|
ccrecord->GetYaxis()->SetNdivisions(3,-1); |
|
|
ccrecord->GetYaxis()->SetLabelSize(0); |
|
|
ccrecord->SetMaximum(2); |
|
|
ccrecord->SetMinimum(0); |
|
|
ccrecord->Draw("AB"); |
|
|
n=n+1; |
|
|
} |
|
|
} |
|
264 |
|
|
265 |
|
/////ciclo sulle pagine//////////////////// |
266 |
|
for (Int_t interval=0; interval<tot; interval++){ |
267 |
|
|
268 |
|
///-------to create canvas--------------------// |
269 |
|
TCanvas *Canvascc = new TCanvas("Tmtc_1", base, 2500, 2000); |
270 |
|
Canvascc->Divide(1,15); |
271 |
|
Canvascc->SetFillColor(10); |
272 |
|
|
273 |
|
TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024); |
274 |
|
Canvasthdea->SetFillColor(10); |
275 |
|
Canvasthdea->Divide(4,4); |
276 |
|
|
277 |
// TH Graph |
|
278 |
Canvasthdea->cd(); |
TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024); |
279 |
//thermistors number 12 |
Canvasvoltdea->SetFillColor(10); |
280 |
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
Canvasvoltdea->Divide(2,3); |
281 |
for (Int_t k =0; k<12; k++){ |
|
282 |
for (Int_t i = 0; i < recordstot; i++){ |
|
283 |
ythana_1[i]= ythana[12*i+k]; |
recordstot=0; |
284 |
xrecordobtth_1[i]= xrecordobtth[12*i+k]; |
|
285 |
limth[i] = 45; |
for (Int_t i = ev[interval]; i < ev[interval+1]; i++){ //ciclo su un sottogruppo |
286 |
} |
// cout<<"ciclo da "<<ev[interval]<<" a "<< ev[interval+1]<<"\n"; |
287 |
Canvasthdea->cd(k+1); |
tmtcBr->GetEntry(i); |
288 |
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
l=0; |
289 |
graph->SetMarkerColor(50); |
m=0; |
290 |
graph->SetLineColor(50); |
Long64_t tmpSize = tme->Records->GetEntries(); |
291 |
graph->SetMarkerStyle(21); |
Int_t size_b = tmpSize; |
292 |
graph->SetMarkerSize(0.3); |
for (Int_t j = 0; j < size_b; j++){ |
293 |
graph->SetMinimum(-10); |
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
294 |
graph->SetMaximum(60); |
|
295 |
graph->GetXaxis()->SetTitle("OBT"); |
for (Int_t k =0; k <16; k++){ |
296 |
graph->GetXaxis()->CenterTitle(); |
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
297 |
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
298 |
graph->GetYaxis()->CenterTitle(); |
} |
299 |
oss.str(""); |
|
300 |
oss << filename.Data() <<": " <<titoloth[k] ; |
for (Int_t k =0; k <16; k++){ |
301 |
graph->SetTitle(oss.str().c_str()); |
ythana[16*recordstot+16*j+k] = convert_th(tmr->TM_TH_ANA[k]); |
302 |
|
xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
303 |
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
} |
304 |
pt->AddText("OFF"); |
|
305 |
pt->SetBorderSize(1); |
for (Int_t k =0; k <6; k++){ |
306 |
pt->Draw(); |
ydea[6*recordstot+6*j+k] = convert_volt(tmr->TM_DEA_ANA[k]); |
307 |
graph->Draw("ACP"); |
xrecordobtdea[6*recordstot+6*j+k] = tmr->TM_RECORD_OBT; |
308 |
pt->Draw(); |
} |
309 |
|
} |
310 |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
recordstot=recordstot+tmpSize; |
311 |
threcord->SetLineColor(kBlue); |
} |
312 |
threcord->SetMarkerColor(kBlue); |
|
313 |
threcord->SetMarkerStyle(21); |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
314 |
threcord->Draw("C"); |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
315 |
} |
|
316 |
} |
TLegend *leg1 = new TLegend(0.87,0.80,0.98,0.94, ""); |
317 |
//thermistors number=16 |
leg1->SetFillColor(10); |
318 |
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
leg1->SetBorderSize(0); |
319 |
for (Int_t k =0; k<16; k++){ |
|
320 |
for (Int_t i = 0; i < recordstot; i++){ |
Canvascc->cd(); |
321 |
ythana_1[i]= ythana[16*i+k]; |
pt = new TPaveText (.87,.95,.98,.98); |
322 |
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
oss.str(""); |
323 |
limth[i] = 45; |
oss<<filename.Data(); |
324 |
} |
pt->AddText(oss.str().c_str()); |
325 |
Canvasthdea->cd(k+1); |
pt->SetTextColor(1); |
326 |
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
//pt->SetTextSize(1); |
327 |
graph->SetMarkerColor(50); |
pt->SetFillColor(10); |
328 |
graph->SetLineColor(50); |
pt->SetBorderSize(0); |
329 |
graph->SetMarkerStyle(21); |
pt->Draw(); |
330 |
graph->SetMarkerSize(0.3); |
|
331 |
graph->SetMinimum(-10); |
/* |
332 |
graph->SetMaximum(60); |
TLine *line = new TLine; |
333 |
graph->GetXaxis()->SetTitle("OBT"); |
line->SetLineColor(4); |
334 |
graph->GetXaxis()->CenterTitle(); |
line->SetLineWidth(2); |
335 |
graph->GetYaxis()->SetTitle("Temperature value (°C)"); |
line->DrawLine(0, 0.60, 1, 0.60); |
336 |
graph->GetYaxis()->CenterTitle(); |
line->Draw(); |
337 |
oss.str(""); |
line->DrawLine(0, 0.33, 1, 0.33); |
338 |
oss << filename.Data() <<": " <<titoloth[k] ; |
line->Draw(); |
339 |
graph->SetTitle(oss.str().c_str()); |
line->DrawLine(0, 0.20, 1, 0.20); |
340 |
|
line->Draw(); |
341 |
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
line->DrawLine(0, 0.13, 1, 0.13); |
342 |
pt->AddText("OFF"); |
line->Draw(); |
343 |
pt->SetBorderSize(1); |
*/ |
344 |
pt->Draw(); |
|
345 |
graph->Draw("ACP"); |
|
346 |
pt->Draw(); |
|
347 |
|
//CC Graph |
348 |
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
for (Int_t k =0; k<16; k++){ |
349 |
threcord->SetLineColor(kBlue); |
for (Int_t i = 0; i < recordstot; i++){ |
350 |
threcord->SetMarkerColor(kBlue); |
if (k>0) { |
351 |
threcord->SetMarkerStyle(21); |
yccdiagacq_11u[i]=yccdiagacq_1u[i]; |
352 |
threcord->Draw("C"); |
yccdiagacq_11d[i]=yccdiagacq_1d[i]; |
353 |
} |
} |
354 |
} |
yccdiagacq_1d[i]=0; |
355 |
|
yccdiagacq_1u[i]=0; |
356 |
// DEA Graph |
if (yccdiagacq[16*i+k]==0) { |
357 |
Canvasvoltdea->cd(); |
yccdiagacq_1d[i]=-1; |
358 |
for (Int_t k =0; k<6; k++){ |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
359 |
for (Int_t i = 0; i < recordstot; i++){ |
} |
360 |
ydea_1[i]= ydea[6*i + k]; |
else if (yccdiagacq[16*i+k]==1){ |
361 |
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
yccdiagacq_1u[i]=1; |
362 |
limvolt1[i]= 0.65; |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
363 |
limvolt2[i]= 3.15; |
} |
364 |
limvolt3[i]= 4.25; |
if (k==1) { |
365 |
} |
if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1) yccipm12u[i]=1; |
366 |
Canvasvoltdea->cd(k+1); |
else yccipm12u[i]=0; |
367 |
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipm12d[i]=-1; |
368 |
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
else yccipm12d[i]=0; |
369 |
pt->AddText("OFF"); |
} |
370 |
pt->SetBorderSize(1); |
if (k==1 || k==3 || k==5 || k==7 || k==9) { |
371 |
pt->Draw(); |
if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1) yccipmkk1u[i]=1; |
372 |
TPaveText *pt1 = new TPaveText (.84,.67,.92,.73); |
else yccipmkk1u[i]=0; |
373 |
pt1->AddText("ON"); |
if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipmkk1d[i]=-1; |
374 |
pt1->SetBorderSize(1); |
else yccipmkk1d[i]=0; |
375 |
pt1->Draw(); |
if (k==7 || k==9) { |
376 |
graph1->SetMarkerColor(50); |
if (yccipmkk1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
377 |
graph1->SetLineColor(50); |
else if (yccipmkk1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0 || (yccipmkk1d[i]==-1 && yccipm12u[i]==1)) yccipmerror[i]=-1; |
378 |
graph1->SetMarkerStyle(21); |
else yccipmerror[i]=0; |
379 |
graph1->SetMarkerSize(0.3); |
} |
380 |
graph1->SetMinimum(0.0); |
} |
381 |
graph1->SetMaximum(5.0); |
if (k==6 || k==7 || k==8 || k==9) { |
382 |
graph1->GetXaxis()->SetTitle("OBT"); |
if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1; |
383 |
graph1->GetXaxis()->CenterTitle(); |
else yccipmerror2[i]=0; |
384 |
graph1->GetYaxis()->SetTitle("Voltage value (V)"); |
} |
385 |
graph1->GetYaxis()->CenterTitle(); |
if (k==13) { |
386 |
oss.str(""); |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccdiagacq_1d[i]==-1; //psb on |
387 |
oss << filename.Data()<<": IPM "<<k+1<<" Voltage"; |
if (yccdiagacq_1u[i]==1 && yccipm12u[i]==1) yccdiagacq_1u[i]==1; //psb off |
388 |
graph1->SetTitle(oss.str().c_str()); |
if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1; |
389 |
graph1->Draw("ACP"); |
else if (yccdiagacq_1u[i]==1 && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1; |
390 |
pt1->Draw(); |
else yccipmerror[i]=0; //psb alarm |
391 |
pt->Draw(); |
} |
392 |
|
if (k==15) { |
393 |
TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2); |
yccdiagacq_11u[i]=0; |
394 |
graph2->SetMarkerColor(50); |
yccdiagacq_11d[i]=0; |
395 |
graph2->SetLineColor(50); |
} |
396 |
graph2->SetMarkerStyle(21); |
} |
397 |
graph2->SetMarkerSize(0.2); |
|
398 |
graph2->SetMinimum(0.0); |
//CC IPM |
399 |
graph2->SetMaximum(5.0); |
if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){ |
400 |
graph2->Draw("CP"); |
Canvascc->cd(m+1); |
401 |
|
Canvascc->cd(m+1)->SetGridx(); |
402 |
TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3); |
gPad->SetFillColor(10); |
403 |
graph3->SetMarkerColor(50); |
gPad->SetFrameBorderSize(0); |
404 |
graph3->SetLineColor(50); |
gPad->SetLineColor(1); |
405 |
graph3->SetMarkerStyle(21); |
gPad->SetFrameBorderMode(0); |
406 |
graph3->SetMarkerSize(0.2); |
|
407 |
graph3->SetMinimum(0.0); |
|
408 |
graph3->SetMaximum(5.0); |
pt = new TPaveText (.01,.30,.10,.70); |
409 |
graph3->Draw("CP"); |
oss.str(""); |
410 |
|
oss<<titolocc[k]; |
411 |
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
pt->AddText(oss.str().c_str()); |
412 |
dearecord->SetLineColor(kBlue); |
pt->SetFillColor(10); |
413 |
dearecord->SetLineWidth(1); |
pt->SetBorderSize(0); |
414 |
dearecord->SetMarkerStyle(21); |
pt->Draw(); |
415 |
dearecord->SetMarkerSize(0.5); |
|
416 |
dearecord->SetMarkerColor(kBlue); |
|
417 |
dearecord->Draw("CPL"); |
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
418 |
} |
ccrecordd->SetTitle(""); |
419 |
|
ccrecordd->SetFillColor(8); |
420 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
421 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
422 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
423 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
424 |
|
ccrecordd->SetMaximum(1.3); |
425 |
|
ccrecordd->SetMinimum(-1.3); |
426 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
427 |
|
ccrecordd->Draw("AB"); |
428 |
|
if (k==0) leg1->AddEntry(ccrecordd,"ON","f"); |
429 |
|
|
430 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
431 |
|
ccrecordu->SetTitle(""); |
432 |
|
ccrecordu->SetFillColor(17); |
433 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
434 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
435 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
436 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
437 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
438 |
|
ccrecordu->SetMaximum(1.3); |
439 |
|
ccrecordu->SetMinimum(-1.3); |
440 |
|
ccrecordu->Draw("Bsame"); |
441 |
|
if (k==0) leg1->AddEntry(ccrecordu,"OFF","f"); |
442 |
|
|
443 |
|
|
444 |
|
if (k==1 || k==3 || k==5){ |
445 |
|
Canvascc->cd(m); |
446 |
|
TGraph *ccrecorderrord = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1d); |
447 |
|
ccrecorderrord->SetTitle(""); |
448 |
|
ccrecorderrord->SetFillColor(2); |
449 |
|
ccrecorderrord->GetXaxis()->SetLabelSize(0); |
450 |
|
ccrecorderrord->GetXaxis()->SetTickLength(0); |
451 |
|
ccrecorderrord->GetYaxis()->SetLabelSize(0); |
452 |
|
ccrecorderrord->GetYaxis()->SetTickLength(0); |
453 |
|
ccrecorderrord->SetMaximum(1.3); |
454 |
|
ccrecorderrord->SetMinimum(-1.3); |
455 |
|
ccrecorderrord->GetXaxis()->SetAxisColor(0); |
456 |
|
ccrecorderrord->Draw("Bsame"); |
457 |
|
|
458 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1u); |
459 |
|
ccrecorderroru->SetTitle(""); |
460 |
|
ccrecorderroru->SetFillColor(2); |
461 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
462 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
463 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
464 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
465 |
|
ccrecorderroru->SetMaximum(1.3); |
466 |
|
ccrecorderroru->SetMinimum(-1.3); |
467 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
468 |
|
ccrecorderroru->Draw("Bsame"); |
469 |
|
|
470 |
|
Canvascc->cd(m+1); |
471 |
|
ccrecorderrord->Draw("Bsame"); |
472 |
|
ccrecorderroru->Draw("Bsame"); |
473 |
|
} |
474 |
|
|
475 |
|
|
476 |
|
Double_t xmin; |
477 |
|
Double_t xmax; |
478 |
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
479 |
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
480 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
481 |
|
axis->Draw("same"); |
482 |
|
/*TF1 *func1 = new TF1("func1", "0"); |
483 |
|
func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]); |
484 |
|
func1->SetLineColor(1); |
485 |
|
func1->SetLineStyle(1); |
486 |
|
func1->SetLineWidth(2); |
487 |
|
func1->Draw("same");*/ |
488 |
|
|
489 |
|
m=m+1; |
490 |
|
} |
491 |
|
|
492 |
|
//CC idaq-khb-tof |
493 |
|
if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){ |
494 |
|
Canvascc->cd(l+7); |
495 |
|
gPad->SetFillColor(10); |
496 |
|
gPad->SetFrameBorderSize(0); |
497 |
|
|
498 |
|
pt = new TPaveText (.00,.30,.09,.70); |
499 |
|
oss.str(""); |
500 |
|
oss<<titolocc[k]; |
501 |
|
pt->AddText(oss.str().c_str()); |
502 |
|
pt->SetFillColor(10); |
503 |
|
pt->SetBorderSize(0); |
504 |
|
pt->Draw(); |
505 |
|
|
506 |
|
|
507 |
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
508 |
|
ccrecordd->SetTitle(""); |
509 |
|
if (k==14 || k==15) ccrecordd->SetFillColor(2); |
510 |
|
else ccrecordd->SetFillColor(8); |
511 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
512 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
513 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
514 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
515 |
|
ccrecordd->SetMaximum(1.3); |
516 |
|
ccrecordd->SetMinimum(-1.3); |
517 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
518 |
|
ccrecordd->Draw("AB"); |
519 |
|
|
520 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
521 |
|
ccrecordu->SetTitle(""); |
522 |
|
if (k==14 || k==15) { |
523 |
|
ccrecordu->SetFillColor(7); |
524 |
|
if (k==14) leg1->AddEntry(ccrecordu,"ON-OFF-LATCHUP","f"); |
525 |
|
} |
526 |
|
else ccrecordu->SetFillColor(17); |
527 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
528 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
529 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
530 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
531 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
532 |
|
ccrecordu->SetMaximum(1.3); |
533 |
|
ccrecordu->SetMinimum(-1.3); |
534 |
|
ccrecordu->Draw("Bsame"); |
535 |
|
|
536 |
|
if (k==6 || k==7 || k==8 || k==9){ |
537 |
|
Canvascc->cd(l+7); |
538 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror2); |
539 |
|
ccrecorderroru->SetTitle(""); |
540 |
|
ccrecorderroru->SetFillColor(2); |
541 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
542 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
543 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
544 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
545 |
|
ccrecorderroru->SetMaximum(1.3); |
546 |
|
ccrecorderroru->SetMinimum(-1.3); |
547 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
548 |
|
ccrecorderroru->Draw("Bsame"); |
549 |
|
} |
550 |
|
|
551 |
|
|
552 |
|
if (k==7 || k==9){ |
553 |
|
Canvascc->cd(l+7-1); |
554 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror); |
555 |
|
ccrecorderroru->SetTitle(""); |
556 |
|
ccrecorderroru->SetFillColor(2); |
557 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
558 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
559 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
560 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
561 |
|
ccrecorderroru->SetMaximum(1.3); |
562 |
|
ccrecorderroru->SetMinimum(-1.3); |
563 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
564 |
|
if (k==7) leg1->AddEntry(ccrecorderroru,"ALARM","f"); |
565 |
|
ccrecorderroru->Draw("Bsame"); |
566 |
|
|
567 |
|
Canvascc->cd(l+7); |
568 |
|
ccrecorderroru->Draw("Bsame"); |
569 |
|
} |
570 |
|
|
571 |
|
|
572 |
|
Double_t xmin; |
573 |
|
Double_t xmax; |
574 |
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
575 |
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
576 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 1.5); |
577 |
|
axis->Draw("same"); |
578 |
|
/*TF1 *func1 = new TF1("func1", "0"); |
579 |
|
func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]); |
580 |
|
func1->SetLineColor(1); |
581 |
|
func1->SetLineStyle(1); |
582 |
|
func1->SetLineWidth(2); |
583 |
|
func1->Draw("same");*/ |
584 |
|
l=l+1; |
585 |
|
|
586 |
|
} |
587 |
|
|
588 |
|
//CC vrl |
589 |
|
if (k==11 || k==12 || k==13 ){ |
590 |
|
if (k==13) Canvascc->cd(13); |
591 |
|
if (k==11) Canvascc->cd(14); |
592 |
|
if (k==12) Canvascc->cd(15); |
593 |
|
gPad->SetFillColor(10); |
594 |
|
gPad->SetFrameBorderSize(0); |
595 |
|
|
596 |
|
pt = new TPaveText (.01,.30,.09,.70); |
597 |
|
oss.str(""); |
598 |
|
oss<<titolocc[k]; |
599 |
|
pt->AddText(oss.str().c_str()); |
600 |
|
pt->SetFillColor(10); |
601 |
|
pt->SetBorderSize(0); |
602 |
|
pt->Draw(); |
603 |
|
|
604 |
|
if (k==11 || k==12){ |
605 |
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
606 |
|
ccrecordd->SetTitle(""); |
607 |
|
ccrecordd->SetFillColor(8); |
608 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
609 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
610 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
611 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
612 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
613 |
|
ccrecordd->SetMaximum(1.3); |
614 |
|
ccrecordd->SetMinimum(-1.3); |
615 |
|
ccrecordd->Draw("AB"); |
616 |
|
|
617 |
|
|
618 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
619 |
|
ccrecordu->SetTitle(""); |
620 |
|
ccrecordu->SetFillColor(17); |
621 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
622 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
623 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
624 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
625 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
626 |
|
ccrecordu->SetMaximum(1.3); |
627 |
|
ccrecordu->SetMinimum(-1.3); |
628 |
|
ccrecordu->Draw("Bsame"); |
629 |
|
|
630 |
|
Double_t xmin; |
631 |
|
Double_t xmax; |
632 |
|
xmin=ccrecordu->GetXaxis()->GetXmin(); |
633 |
|
xmax=ccrecordu->GetXaxis()->GetXmax(); |
634 |
|
if (k==12){ |
635 |
|
TGaxis *axis = new TGaxis (xmin, -1, xmax, -1, xmin, xmax, 510, "", 0); |
636 |
|
axis->SetLabelSize(0.24); |
637 |
|
axis->SetLabelColor(1); |
638 |
|
axis->SetTitle("OBT (ms)"); |
639 |
|
//axis->CenterTitle(); |
640 |
|
axis->SetTitleOffset(0.4); |
641 |
|
axis->SetTitleSize(0.21); |
642 |
|
axis->Draw(); |
643 |
|
TF1 *func1 = new TF1("func1", "0"); |
644 |
|
func1->SetRange(xmin,xmax); |
645 |
|
func1->SetLineColor(1); |
646 |
|
func1->SetLineStyle(1); |
647 |
|
func1->SetLineWidth(1); |
648 |
|
func1->Draw("same"); |
649 |
|
} |
650 |
|
if (k==11){ |
651 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
652 |
|
axis->SetLineWidth(1); |
653 |
|
axis->SetTickSize(2); |
654 |
|
axis->Draw("same"); |
655 |
|
} |
656 |
|
} |
657 |
|
|
658 |
|
if (k==13){ |
659 |
|
Canvascc->cd(13); |
660 |
|
|
661 |
|
TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d); |
662 |
|
ccrecordd->SetTitle(""); |
663 |
|
ccrecordd->SetFillColor(8); |
664 |
|
ccrecordd->GetXaxis()->SetAxisColor(0); |
665 |
|
ccrecordd->GetXaxis()->SetLabelSize(0); |
666 |
|
ccrecordd->GetXaxis()->SetTickLength(0); |
667 |
|
ccrecordd->GetYaxis()->SetLabelSize(0); |
668 |
|
ccrecordd->GetYaxis()->SetTickLength(0); |
669 |
|
ccrecordd->SetMaximum(1.3); |
670 |
|
ccrecordd->SetMinimum(-1.3); |
671 |
|
ccrecordd->Draw("AB"); |
672 |
|
|
673 |
|
TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u); |
674 |
|
ccrecordu->SetTitle(""); |
675 |
|
ccrecordu->SetFillColor(17); |
676 |
|
ccrecordu->GetXaxis()->SetAxisColor(0); |
677 |
|
ccrecordu->GetXaxis()->SetLabelSize(0); |
678 |
|
ccrecordu->GetXaxis()->SetTickLength(0); |
679 |
|
ccrecordu->GetYaxis()->SetLabelSize(0); |
680 |
|
ccrecordu->GetYaxis()->SetTickLength(0); |
681 |
|
ccrecordu->SetMaximum(1.3); |
682 |
|
ccrecordu->SetMinimum(-1.3); |
683 |
|
ccrecordu->Draw("Bsame"); |
684 |
|
|
685 |
|
TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror); |
686 |
|
ccrecorderroru->SetTitle(""); |
687 |
|
ccrecorderroru->SetFillColor(2); |
688 |
|
ccrecorderroru->GetXaxis()->SetLabelSize(0); |
689 |
|
ccrecorderroru->GetXaxis()->SetTickLength(0); |
690 |
|
ccrecorderroru->GetYaxis()->SetLabelSize(0); |
691 |
|
ccrecorderroru->GetYaxis()->SetTickLength(0); |
692 |
|
ccrecorderroru->SetMaximum(1.3); |
693 |
|
ccrecorderroru->SetMinimum(-1.3); |
694 |
|
ccrecorderroru->GetXaxis()->SetAxisColor(0); |
695 |
|
ccrecorderroru->Draw("Bsame"); |
696 |
|
|
697 |
|
|
698 |
|
Double_t xmin=ccrecordu->GetXaxis()->GetXmin(); |
699 |
|
Double_t xmax=ccrecordu->GetXaxis()->GetXmax(); |
700 |
|
TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0); |
701 |
|
axis->SetLineWidth(1); |
702 |
|
axis->SetTickSize(2); |
703 |
|
axis->Draw("same"); |
704 |
|
} |
705 |
|
|
706 |
|
} |
707 |
|
|
708 |
|
} |
709 |
|
|
710 |
|
Canvascc->cd(); |
711 |
|
leg1->Draw(); |
712 |
|
Canvascc->Update(); |
713 |
|
|
714 |
|
// TH Graph |
715 |
|
Canvasthdea->cd(); |
716 |
|
//thermistors number 12 |
717 |
|
if (tr->GetBranch("Records.TM_TH_ANA[12]")){ |
718 |
|
for (Int_t k =0; k<12; k++){ |
719 |
|
for (Int_t i = 0; i < recordstot; i++){ |
720 |
|
ythana_1[i]= ythana[12*i+k]; |
721 |
|
xrecordobtth_1[i]= xrecordobtth[12*i+k]; |
722 |
|
limth[i] = 45; |
723 |
|
} |
724 |
|
Canvasthdea->cd(k+1); |
725 |
|
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
726 |
|
graph->SetMarkerColor(50); |
727 |
|
graph->SetLineColor(50); |
728 |
|
graph->SetMarkerStyle(21); |
729 |
|
graph->SetMarkerSize(0.3); |
730 |
|
graph->SetMinimum(-10); |
731 |
|
graph->SetMaximum(60); |
732 |
|
graph->GetXaxis()->SetTitle("OBT"); |
733 |
|
graph->GetXaxis()->CenterTitle(); |
734 |
|
graph->GetYaxis()->SetTitle("Temperature value (C)"); |
735 |
|
graph->GetYaxis()->CenterTitle(); |
736 |
|
oss.str(""); |
737 |
|
oss << filename.Data() <<": " <<titoloth[k] ; |
738 |
|
graph->SetTitle(oss.str().c_str()); |
739 |
|
|
740 |
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
741 |
|
pt->AddText("OFF"); |
742 |
|
pt->SetBorderSize(1); |
743 |
|
pt->Draw(); |
744 |
|
graph->Draw("ACP"); |
745 |
|
pt->Draw(); |
746 |
|
|
747 |
|
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
748 |
|
threcord->SetLineColor(kBlue); |
749 |
|
threcord->SetMarkerColor(kBlue); |
750 |
|
threcord->SetMarkerStyle(21); |
751 |
|
threcord->Draw("C"); |
752 |
|
} |
753 |
|
} |
754 |
|
//thermistors number=16 |
755 |
|
if (tr->GetBranch("Records.TM_TH_ANA[16]")){ |
756 |
|
for (Int_t k =0; k<16; k++){ |
757 |
|
for (Int_t i = 0; i < recordstot; i++){ |
758 |
|
ythana_1[i]= ythana[16*i+k]; |
759 |
|
xrecordobtth_1[i]= xrecordobtth[16*i+k]; |
760 |
|
limth[i] = 45; |
761 |
|
} |
762 |
|
Canvasthdea->cd(k+1); |
763 |
|
TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth); |
764 |
|
graph->SetMarkerColor(50); |
765 |
|
graph->SetLineColor(50); |
766 |
|
graph->SetMarkerStyle(21); |
767 |
|
graph->SetMarkerSize(0.3); |
768 |
|
graph->SetMinimum(-10); |
769 |
|
graph->SetMaximum(60); |
770 |
|
graph->GetXaxis()->SetTitle("OBT"); |
771 |
|
graph->GetXaxis()->CenterTitle(); |
772 |
|
graph->GetYaxis()->SetTitle("Temperature value (C)"); |
773 |
|
graph->GetYaxis()->CenterTitle(); |
774 |
|
oss.str(""); |
775 |
|
oss << filename.Data() <<": " <<titoloth[k] ; |
776 |
|
graph->SetTitle(oss.str().c_str()); |
777 |
|
|
778 |
|
TPaveText *pt = new TPaveText (.45,.7,.55,.77); |
779 |
|
pt->AddText("OFF"); |
780 |
|
pt->SetBorderSize(1); |
781 |
|
pt->Draw(); |
782 |
|
graph->Draw("ACP"); |
783 |
|
pt->Draw(); |
784 |
|
|
785 |
|
TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1); |
786 |
|
threcord->SetLineColor(kBlue); |
787 |
|
threcord->SetMarkerColor(kBlue); |
788 |
|
threcord->SetMarkerStyle(21); |
789 |
|
threcord->Draw("C"); |
790 |
|
} |
791 |
|
} |
792 |
|
|
793 |
|
// DEA Graph |
794 |
|
Canvasvoltdea->cd(); |
795 |
|
for (Int_t k =0; k<6; k++){ |
796 |
|
for (Int_t i = 0; i < recordstot; i++){ |
797 |
|
ydea_1[i]= ydea[6*i + k]; |
798 |
|
xrecordobtdea_1[i]= xrecordobtdea[6*i+k]; |
799 |
|
limvolt1[i]= 0.65; |
800 |
|
limvolt2[i]= 3.15; |
801 |
|
limvolt3[i]= 4.25; |
802 |
|
} |
803 |
|
Canvasvoltdea->cd(k+1); |
804 |
|
TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1); |
805 |
|
TPaveText *pt = new TPaveText (.84,.13,.92,.19); |
806 |
|
pt->AddText("OFF"); |
807 |
|
pt->SetBorderSize(1); |
808 |
|
pt->Draw(); |
809 |
|
TPaveText *pt1 = new TPaveText (.84,.67,.92,.73); |
810 |
|
pt1->AddText("ON"); |
811 |
|
pt1->SetBorderSize(1); |
812 |
|
pt1->Draw(); |
813 |
|
graph1->SetMarkerColor(50); |
814 |
|
graph1->SetLineColor(50); |
815 |
|
graph1->SetMarkerStyle(21); |
816 |
|
graph1->SetMarkerSize(0.3); |
817 |
|
graph1->SetMinimum(0.0); |
818 |
|
graph1->SetMaximum(5.0); |
819 |
|
graph1->GetXaxis()->SetTitle("OBT"); |
820 |
|
graph1->GetXaxis()->CenterTitle(); |
821 |
|
graph1->GetYaxis()->SetTitle("Voltage value (V)"); |
822 |
|
graph1->GetYaxis()->CenterTitle(); |
823 |
|
oss.str(""); |
824 |
|
oss << filename.Data()<<": IPM "<<k+1<<" Voltage"; |
825 |
|
graph1->SetTitle(oss.str().c_str()); |
826 |
|
graph1->Draw("ACP"); |
827 |
|
pt1->Draw(); |
828 |
|
pt->Draw(); |
829 |
|
|
830 |
|
TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2); |
831 |
|
graph2->SetMarkerColor(50); |
832 |
|
graph2->SetLineColor(50); |
833 |
|
graph2->SetMarkerStyle(21); |
834 |
|
graph2->SetMarkerSize(0.2); |
835 |
|
graph2->SetMinimum(0.0); |
836 |
|
graph2->SetMaximum(5.0); |
837 |
|
graph2->Draw("CP"); |
838 |
|
|
839 |
|
TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3); |
840 |
|
graph3->SetMarkerColor(50); |
841 |
|
graph3->SetLineColor(50); |
842 |
|
graph3->SetMarkerStyle(21); |
843 |
|
graph3->SetMarkerSize(0.2); |
844 |
|
graph3->SetMinimum(0.0); |
845 |
|
graph3->SetMaximum(5.0); |
846 |
|
graph3->Draw("CP"); |
847 |
|
|
848 |
|
TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1); |
849 |
|
dearecord->SetLineColor(kBlue); |
850 |
|
dearecord->SetLineWidth(1); |
851 |
|
dearecord->SetMarkerStyle(21); |
852 |
|
dearecord->SetMarkerSize(0.5); |
853 |
|
dearecord->SetMarkerColor(kBlue); |
854 |
|
dearecord->Draw("CPL"); |
855 |
|
} |
856 |
|
|
857 |
|
|
858 |
|
stringstream oss1, oss2, oss3, oss4; |
859 |
|
oss.str(""); |
860 |
|
oss1.str(""); |
861 |
|
oss2.str(""); |
862 |
|
oss << outDir.Data() << filename.Data() << "_Tmtc_cc_"<<interval+1<<"." << format; |
863 |
|
oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea_"<<interval+1<<"." << format; |
864 |
|
oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea_"<<interval+1<<"." << format; |
865 |
|
Canvascc->SaveAs(oss.str().c_str()); |
866 |
|
Canvasthdea->SaveAs(oss1.str().c_str()); |
867 |
|
Canvasvoltdea->SaveAs(oss2.str().c_str()); //// fine del lavoro sul sottogruppo |
868 |
|
|
869 |
|
Canvascc->Clear(); |
870 |
|
Canvasthdea->Clear(); |
871 |
|
Canvasvoltdea->Clear(); |
872 |
|
//gROOT->GetListOfCanvases()->Delete(); |
873 |
|
//gROOT->Reset(); |
874 |
|
|
875 |
|
} |
876 |
|
|
|
stringstream oss1, oss2, oss3, oss4; |
|
|
oss.str(""); |
|
|
oss1.str(""); |
|
|
oss2.str(""); |
|
|
oss3.str(""); |
|
|
oss4.str(""); |
|
|
oss << outDir.Data() << filename.Data() << "_Tmtc_cc_hot." << format; |
|
|
oss3 << outDir.Data() << filename.Data() << "_Tmtc_cc_cold." << format; |
|
|
oss4 << outDir.Data() << filename.Data() << "_Tmtc_cc_vrl." << format; |
|
|
oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea." << format; |
|
|
oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea." << format; |
|
|
Canvascchot->SaveAs(oss.str().c_str()); |
|
|
Canvascccold->SaveAs(oss3.str().c_str()); |
|
|
Canvasccvrl->SaveAs(oss4.str().c_str()); |
|
|
Canvasthdea->SaveAs(oss1.str().c_str()); |
|
|
Canvasvoltdea->SaveAs(oss2.str().c_str()); |
|
877 |
|
|
878 |
file->Close(); |
file->Close(); |
879 |
} |
} |
880 |
|
|
881 |
|
|