/[PAMELA software]/calo/flight/CaloHK/src/qcalcore.cpp
ViewVC logotype

Annotation of /calo/flight/CaloHK/src/qcalcore.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Feb 11 16:17:45 2008 UTC (17 years, 2 months ago) by jerse
Branch: MAIN
Branch point for: CaloHK
Initial revision

1 jerse 1.1 //
2     // Graph calorimeter values vs time OBT - Giovanna Jerse
3    
4     // creation date : 02/01/2008
5     //
6     //
7     // The only input needed is the path to the directory created by YODA for the data file you want to analyze.
8     //
9     //
10    
11    
12    
13     #include <iostream>
14     #include <fstream>
15     //
16     #include <TTree.h>
17     #include <TObject.h>
18     #include <TString.h>
19     #include <TFile.h>
20     #include <TCanvas.h>
21     #include <TH1.h>
22     #include <TPolyLine.h>
23     #include <TH2F.h>
24     #include <TH2D.h>
25     #include <TLatex.h>
26     #include <TPad.h>
27     #include <TPaveLabel.h>
28     #include <TStyle.h>
29     #include <TSystem.h>
30     #include <TApplication.h>
31     #include <TLegend.h>
32     //
33     #include <CalibCalPedEvent.h>
34     #include <PamelaRun.h>
35     #include <PhysEndRunEvent.h>
36     #include <CaloEndRun.h>
37    
38     //
39    
40     UInt_t minimo (UInt_t vet[], Long64_t n );
41    
42    
43     UInt_t massimo (UInt_t vet[], Long64_t n);
44    
45    
46    
47     using namespace std;
48     //
49     void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){
50     if ( to == 0 ){
51     Int_t t2length = s2.Length();
52     s1 = "";
53     to = t2length;
54     };
55     for (Int_t i = from; i<to; i++){
56    
57    
58    
59     s1.Append(s2[i],1);
60     };
61     }
62     void stringappend(TString& s1, const TString& s2){
63     Int_t t2length = s2.Length();
64     for (Int_t i = 0; i<t2length; i++){
65     s1.Append(s2[i],1);
66     };
67     }
68    
69     TString getFilename(const TString filename){
70     //
71     const string fil = gSystem->BaseName(filename.Data());
72     Int_t posiz = fil.find(".root");
73     //
74     TString file2;
75     if ( posiz == -1 ){
76     file2 = gSystem->BaseName(filename.Data());
77     } else {
78     Int_t posiz2 = 0;
79     stringcopy(file2,gSystem->BaseName(filename.Data()),posiz2,posiz);
80     TString pdat(".dat");
81     stringappend(file2,pdat);
82     };
83     return file2;
84     }
85    
86    
87     UInt_t minimo (UInt_t vet[], Long64_t n ) {
88    
89     UInt_t min;
90    
91     min = vet[0];
92    
93     for(Int_t i = 0; i <n; i++)
94    
95     if(vet[i]<=min) min = vet[i];
96    
97     return (min);
98    
99     }
100    
101    
102    
103     UInt_t massimo (UInt_t vet[], Long64_t n ) {
104    
105     UInt_t max;
106    
107     max = vet[0];
108    
109     for(Int_t i = 0; i < n; i++)
110    
111     if(vet[i] >= max) max = vet[i];
112    
113     return (max);
114    
115     }
116    
117    
118    
119    
120    
121     void qlook_cal(TString filename, TString outDir="", TString saveas = "png", Bool_t iactive =false, Bool_t w4i=false) {
122    
123    
124     gStyle->SetPaperSize(19.,25.);
125     const char* startingdir = gSystem->WorkingDirectory();
126     if ( !strcmp(outDir.Data(),"") ) outDir = startingdir;
127    
128     //TApplication *app = 0; //crea un ambiente root (app)
129     // app = new TApplication("app",0,0);//verifica se deve essere interattivo
130    
131     //nome del file
132     TString fififile = getFilename(filename);
133     const char *file;
134     file = fififile;
135    
136     //verifica se esiste il file
137     ifstream myfile;
138     myfile.open(filename.Data());
139     if ( !myfile ){
140     printf(" %s :no such file, exiting...\n\n",filename.Data());
141     return;
142     };
143     myfile.close();
144     //
145    
146     //apre il file in 'File'
147     TFile *File = new TFile(filename.Data());
148    
149    
150    
151     //crea struttura tree (tr) con il tree "PhysEndRun" in File
152     TTree *tr = (TTree*)File->Get("PhysEndRun");
153    
154     //crea struttura tree (cppuhe) con il tree "Header" in File
155     // TTree *header = (TTree*)File->Get("Header");
156    
157     if ( !tr ) {
158     printf(" PhysEndRun : no such tree in %s \n",filename.Data());
159     printf(" Exiting, are you sure this is a LEVEL0 not corrupted file? \n\n");
160     return;
161     };
162    
163     pamela::PhysEndRunEvent *pher= new pamela::PhysEndRunEvent();
164    
165     tr->SetBranchAddress("PhysEndRun", &pher); //dichiaro in che ramo trovare quello che voglio puntare con ph
166    
167    
168     pamela::EventHeader *he = new pamela::EventHeader; //definisco variabili di tipo header
169    
170     tr->SetBranchAddress("Header", &he); //dichiaro dove trovare quello che voglio in eh
171    
172    
173    
174     Long64_t n_entries = tr->GetEntries(); //define number of entries (valori di tensione e corrente)
175    
176    
177     // UInt_t obt = (UInt_t)he->GetPscuHeader()->GetOrbitalTime(); // definisce l'orbital time
178    
179     UInt_t time_obt[n_entries];
180    
181    
182    
183     for(Int_t i = 0; i < n_entries; i++) {
184    
185     tr->GetEntry(i);
186    
187     time_obt[i] = (UInt_t)he->GetPscuHeader()->GetOrbitalTime();
188    
189     }
190    
191    
192    
193    
194    
195     UInt_t max_obt = massimo(time_obt, n_entries);
196    
197     UInt_t min_obt = minimo(time_obt, n_entries);
198    
199    
200    
201    
202     // create Histograms
203    
204     // grafici corrente xe
205    
206    
207     TH2F *hITS1_1 = new TH2F("hITS1_1","Current:Section xe ",1000,min_obt,max_obt*1.006,1000,-500., 500.);
208    
209     // hITS1_1->SetBit(TH2::kCanRebin);
210    
211     hITS1_1->SetStats(0);
212    
213     hITS1_1->SetFillColor(42);
214    
215     hITS1_1->GetXaxis()->SetTitle("time");
216    
217     hITS1_1->GetYaxis()->SetTitle("current [micronA]");
218    
219     hITS1_1->GetYaxis()->SetTitleOffset(1.2);
220    
221     hITS1_1->SetMarkerColor(1);
222    
223     hITS1_1->SetMarkerStyle(21);
224    
225     hITS1_1->SetMarkerSize(0.8);
226    
227    
228     TH2F *hITS1_2 = new TH2F("hITS1_2","Current:Section xe ",1000,min_obt,max_obt,1000,-500., 500.);
229    
230     // hITS1_2->SetBit(TH2::kCanRebin);
231    
232     hITS1_2->SetStats(0);
233    
234     hITS1_2->SetFillColor(42);
235    
236     hITS1_2->GetXaxis()->SetTitle("time");
237    
238     hITS1_2->GetYaxis()->SetTitle("current [micronA]");
239    
240     hITS1_2->SetMarkerColor(2);
241    
242     hITS1_2->SetMarkerStyle(21);
243    
244     hITS1_2->SetMarkerSize(0.8);
245    
246    
247     TH2F *hITS1_3 = new TH2F("hITS1_3","Current:Section xe plane 3",1000,min_obt,max_obt,1000,-500., 500.);
248    
249     //hITS1_3->SetBit(TH2::kCanRebin);
250    
251     hITS1_3->SetStats(0);
252    
253     hITS1_3->SetFillColor(42);
254    
255     hITS1_3->GetXaxis()->SetTitle("time");
256    
257     hITS1_3->GetYaxis()->SetTitle("current [micronA]");
258    
259     hITS1_3->SetMarkerColor(3);
260    
261     hITS1_3->SetMarkerStyle(21);
262    
263     hITS1_3->SetMarkerSize(0.8);
264    
265    
266     TH2F *hITS1_4 = new TH2F("hITS1_4","Current:Section xe plane 4",1000,min_obt,max_obt,1000,-500., 500.);
267    
268     //hITS1_4->SetBit(TH2::kCanRebin);
269    
270     hITS1_4->SetStats(0);
271    
272     hITS1_4->SetFillColor(42);
273    
274     hITS1_4->GetXaxis()->SetTitle("time");
275    
276     hITS1_4->GetYaxis()->SetTitle("current [micronA]");
277    
278     hITS1_4->SetMarkerColor(4);
279    
280     hITS1_4->SetMarkerStyle(21);
281    
282     hITS1_4->SetMarkerSize(0.8);
283    
284    
285     TH2F *hITS1_5 = new TH2F("hITS1_5","Current:Section xe plane 5",1000,min_obt,max_obt,1000,-500., 500.);
286    
287     //hITS1_5->SetBit(TH2::kCanRebin);
288    
289     hITS1_5->SetStats(0);
290    
291     hITS1_5->SetFillColor(42);
292    
293     hITS1_5->GetXaxis()->SetTitle("time");
294    
295     hITS1_5->GetYaxis()->SetTitle("current [micronA]");
296    
297     hITS1_5->SetMarkerColor(5);
298    
299     hITS1_5->SetMarkerStyle(21);
300    
301     hITS1_5->SetMarkerSize(0.8);
302    
303    
304     TH2F *hITS1_6 = new TH2F("hITS1_6","Current:Section xe plane 6",1000,min_obt,max_obt,1000,-500., 500.);
305    
306     //hITS1_6->SetBit(TH2::kCanRebin);
307    
308     hITS1_6->SetStats(0);
309    
310     hITS1_6->SetFillColor(42);
311    
312     hITS1_6->GetXaxis()->SetTitle("time");
313    
314     hITS1_6->GetYaxis()->SetTitle("current [micronA]");
315    
316     hITS1_6->SetMarkerColor(6);
317    
318     hITS1_6->SetMarkerStyle(21);
319    
320     hITS1_6->SetMarkerSize(0.8);
321    
322    
323     TH2F *hITS1_7 = new TH2F("hITS1_7","Current:Section xe plane 7",1000,min_obt,max_obt,1000,-500., 500.);
324    
325     //hITS1_7->SetBit(TH2::kCanRebin);
326    
327     hITS1_7->SetStats(0);
328    
329     hITS1_7->SetFillColor(42);
330    
331     hITS1_7->GetXaxis()->SetTitle("time");
332    
333     hITS1_7->GetYaxis()->SetTitle("current [micronA]");
334    
335     hITS1_7->SetMarkerColor(7);
336    
337     hITS1_7->SetMarkerStyle(21);
338    
339     hITS1_7->SetMarkerSize(0.8);
340    
341    
342     TH2F *hITS1_8 = new TH2F("hITS1_8","Current:Section xe plane 8",1000,min_obt,max_obt,1000,-500., 500.);
343    
344     //hITS1_8->SetBit(TH2::kCanRebin);
345    
346     hITS1_8->SetStats(0);
347    
348     hITS1_8->SetFillColor(42);
349    
350     hITS1_8->GetXaxis()->SetTitle("time");
351    
352     hITS1_8->GetYaxis()->SetTitle("current [micronA]");
353    
354     hITS1_8->SetMarkerColor(8);
355    
356     hITS1_8->SetMarkerStyle(21);
357    
358     hITS1_8->SetMarkerSize(0.8);
359    
360    
361     TH2F *hITS1_9 = new TH2F("hITS1_9","Current:Section xe plane 9",1000,min_obt,max_obt,1000,-1.0, 10.);
362    
363     hITS1_9->SetBit(TH2::kCanRebin);
364    
365     hITS1_9->SetStats(0);
366    
367     hITS1_9->SetFillColor(42);
368    
369     hITS1_9->GetXaxis()->SetTitle("time");
370    
371     hITS1_9->GetYaxis()->SetTitle("current [micronA]");
372    
373     hITS1_9->SetMarkerColor(9);
374    
375     hITS1_9->SetMarkerStyle(21);
376    
377     hITS1_9->SetMarkerSize(0.8);
378    
379    
380     TH2F *hITS1_10 = new TH2F("hITS1_10","Current:Section xe plane 10",1000,min_obt,max_obt,1000,-1.0, 10.);
381    
382     hITS1_10->SetBit(TH2::kCanRebin);
383    
384     hITS1_10->SetStats(0);
385    
386     hITS1_10->SetFillColor(42);
387    
388     hITS1_10->GetXaxis()->SetTitle("time");
389    
390     hITS1_10->GetYaxis()->SetTitle("current [micronA]");
391    
392     hITS1_10->SetMarkerColor(11);
393    
394     hITS1_10->SetMarkerStyle(21);
395    
396     hITS1_10->SetMarkerSize(0.8);
397    
398    
399     TH2F *hITS1_11 = new TH2F("hITS1_11","Current:Section xe plane 11",1000,min_obt,max_obt,1000,-1.0, 10.);
400    
401     hITS1_11->SetBit(TH2::kCanRebin);
402    
403     hITS1_11->SetStats(0);
404    
405     hITS1_11->SetFillColor(42);
406    
407     hITS1_11->GetXaxis()->SetTitle("time");
408    
409     hITS1_11->GetYaxis()->SetTitle("current [micronA]");
410    
411     hITS1_11->SetMarkerColor(12);
412    
413     hITS1_11->SetMarkerStyle(21);
414    
415     hITS1_11->SetMarkerSize(0.8);
416    
417    
418    
419    
420    
421    
422    
423     // grafici prima canvas seconda pad
424    
425    
426     // grafici corrente xo
427    
428    
429     TH2F *hITS2_1 = new TH2F("hITS2_1","Current:Section xo ",1000,min_obt,max_obt*1.006,1000,-500., 500.);
430    
431     // hITS2_1->SetBit(TH2::kCanRebin);
432    
433     hITS2_1->SetStats(0);
434    
435     hITS2_1->SetFillColor(42);
436    
437     hITS2_1->GetXaxis()->SetTitle("time");
438    
439     hITS2_1->GetYaxis()->SetTitle("current [micronA]");
440    
441     hITS2_1->GetYaxis()->SetTitleOffset(1.2);
442    
443     hITS2_1->SetMarkerColor(1);
444    
445     hITS2_1->SetMarkerStyle(3);
446    
447     hITS2_1->SetMarkerSize(0.8);
448    
449    
450     TH2F *hITS2_2 = new TH2F("hITS2_2","Current:Section xo plane 2",1000,min_obt,max_obt,1000,-1.0, 10.);
451    
452     hITS2_2->SetBit(TH2::kCanRebin);
453    
454     hITS2_2->SetStats(0);
455    
456     hITS2_2->SetFillColor(42);
457    
458     hITS2_2->GetXaxis()->SetTitle("time");
459    
460     hITS2_2->GetYaxis()->SetTitle("current [micronA]");
461    
462     hITS2_2->SetMarkerColor(2);
463    
464     hITS2_2->SetMarkerStyle(3);
465    
466     hITS2_2->SetMarkerSize(0.8);
467    
468    
469     TH2F *hITS2_3 = new TH2F("hITS2_3","Current:Section xo plane 3",1000,min_obt,max_obt,1000,-1.0, 10.);
470    
471     hITS2_3->SetBit(TH2::kCanRebin);
472    
473     hITS2_3->SetStats(0);
474    
475     hITS2_3->SetFillColor(42);
476    
477     hITS2_3->GetXaxis()->SetTitle("time");
478    
479     hITS2_3->GetYaxis()->SetTitle("current [micronA]");
480    
481     hITS2_3->SetMarkerColor(3);
482    
483     hITS2_3->SetMarkerStyle(3);
484    
485     hITS2_3->SetMarkerSize(0.8);
486    
487    
488     TH2F *hITS2_4 = new TH2F("hITS2_4","Current:Section xo plane 4",1000,min_obt,max_obt,1000,-1.0, 10.);
489    
490     hITS2_4->SetBit(TH2::kCanRebin);
491    
492     hITS2_4->SetStats(0);
493    
494     hITS2_4->SetFillColor(42);
495    
496     hITS2_4->GetXaxis()->SetTitle("time");
497    
498     hITS2_4->GetYaxis()->SetTitle("current [micronA]");
499    
500     hITS2_4->SetMarkerColor(4);
501    
502     hITS2_4->SetMarkerStyle(3);
503    
504     hITS2_4->SetMarkerSize(0.8);
505    
506    
507     TH2F *hITS2_5 = new TH2F("hITS_5","Current:Section xo plane 5",1000,min_obt,max_obt,1000,-1.0, 10.);
508    
509     hITS2_5->SetBit(TH2::kCanRebin);
510    
511     hITS2_5->SetStats(0);
512    
513     hITS2_5->SetFillColor(42);
514    
515     hITS2_5->GetXaxis()->SetTitle("time");
516    
517     hITS2_5->GetYaxis()->SetTitle("current [micronA]");
518    
519     hITS2_5->SetMarkerColor(5);
520    
521     hITS2_5->SetMarkerStyle(3);
522    
523     hITS2_5->SetMarkerSize(0.8);
524    
525    
526     TH2F *hITS2_6 = new TH2F("hITS2_6","Current:Section xo plane 6",1000,min_obt,max_obt,1000,-1.0, 10.);
527    
528     hITS2_6->SetBit(TH2::kCanRebin);
529    
530     hITS2_6->SetStats(0);
531    
532     hITS2_6->SetFillColor(42);
533    
534     hITS2_6->GetXaxis()->SetTitle("time");
535    
536     hITS2_6->GetYaxis()->SetTitle("current [micronA]");
537    
538     hITS2_6->SetMarkerColor(6);
539    
540     hITS2_6->SetMarkerStyle(3);
541    
542     hITS2_6->SetMarkerSize(0.8);
543    
544    
545     TH2F *hITS2_7 = new TH2F("hITS2_7","Current:Section xo plane 7",1000,min_obt,max_obt,1000,-1.0, 10.);
546    
547     hITS2_7->SetBit(TH2::kCanRebin);
548    
549     hITS2_7->SetStats(0);
550    
551     hITS2_7->SetFillColor(42);
552    
553     hITS2_7->GetXaxis()->SetTitle("time");
554    
555     hITS2_7->GetYaxis()->SetTitle("current [micronA]");
556    
557     hITS2_7->SetMarkerColor(7);
558    
559     hITS2_7->SetMarkerStyle(3);
560    
561     hITS2_7->SetMarkerSize(0.8);
562    
563    
564     TH2F *hITS2_8 = new TH2F("hITS2_8","Current:Section xo plane 8",1000,min_obt,max_obt,1000,-1.0, 10.);
565    
566     hITS2_8->SetBit(TH2::kCanRebin);
567    
568     hITS2_8->SetStats(0);
569    
570     hITS2_8->SetFillColor(42);
571    
572     hITS2_8->GetXaxis()->SetTitle("time");
573    
574     hITS2_8->GetYaxis()->SetTitle("current [micronA]");
575    
576     hITS2_8->SetMarkerColor(8);
577    
578     hITS2_8->SetMarkerStyle(3);
579    
580     hITS2_8->SetMarkerSize(0.8);
581    
582    
583     TH2F *hITS2_9 = new TH2F("hITS2_9","Current:Section xo plane 9",1000,min_obt,max_obt,1000,-1.0, 10.);
584    
585     hITS2_9->SetBit(TH2::kCanRebin);
586    
587     hITS2_9->SetStats(0);
588    
589     hITS2_9->SetFillColor(42);
590    
591     hITS2_9->GetXaxis()->SetTitle("time");
592    
593     hITS2_9->GetYaxis()->SetTitle("current [micronA]");
594    
595     hITS2_9->SetMarkerColor(9);
596    
597     hITS2_9->SetMarkerStyle(3);
598    
599     hITS2_9->SetMarkerSize(0.8);
600    
601    
602     TH2F *hITS2_10 = new TH2F("hITS2_10","Current:Section xo plane 10 ",1000,min_obt,max_obt,1000,-1.0, 10.);
603    
604     hITS2_10->SetBit(TH2::kCanRebin);
605    
606     hITS2_10->SetStats(0);
607    
608     hITS2_10->SetFillColor(42);
609    
610     hITS2_10->GetXaxis()->SetTitle("time");
611    
612     hITS2_10->GetYaxis()->SetTitle("current [micronA]");
613    
614     hITS2_10->SetMarkerColor(11);
615    
616     hITS2_10->SetMarkerStyle(3);
617    
618     hITS2_10->SetMarkerSize(0.8);
619    
620    
621     TH2F *hITS2_11 = new TH2F("hITS2_11","Current:Section xo plane 11",1000,min_obt,max_obt,1000,-1.0, 10.);
622    
623     hITS2_11->SetBit(TH2::kCanRebin);
624    
625     hITS2_11->SetStats(0);
626    
627     hITS2_11->SetFillColor(42);
628    
629     hITS2_11->GetXaxis()->SetTitle("time");
630    
631     hITS2_11->GetYaxis()->SetTitle("current [micronA]");
632    
633     hITS2_11->SetMarkerColor(12);
634    
635     hITS2_11->SetMarkerStyle(3);
636    
637     hITS2_11->SetMarkerSize(0.8);
638    
639    
640     // grafici prima canvas terza pad
641    
642    
643     // grafici corrente ye
644    
645    
646     TH2F *hITS3_1 = new TH2F("hITS3_1","Current:Section ye ",1000,min_obt,max_obt*1.006,1000,-500., 500.);
647    
648     // hITS3_1->SetBit(TH2::kCanRebin);
649    
650     hITS3_1->SetStats(0);
651    
652     hITS3_1->SetFillColor(42);
653    
654     hITS3_1->GetXaxis()->SetTitle("time");
655    
656     hITS3_1->GetYaxis()->SetTitle("current [micronA]");
657    
658     hITS3_1->GetYaxis()->SetTitleOffset(1.2);
659    
660     hITS3_1->SetMarkerColor(1);
661    
662     hITS3_1->SetMarkerStyle(22);
663    
664     hITS3_1->SetMarkerSize(0.8);
665    
666    
667     TH2F *hITS3_2 = new TH2F("hITS3_2","Current:Section ye plane 2",1000,min_obt,max_obt,1000,-1.0, 10.);
668    
669     hITS3_2->SetBit(TH2::kCanRebin);
670    
671     hITS3_2->SetStats(0);
672    
673     hITS3_2->SetFillColor(42);
674    
675     hITS3_2->GetXaxis()->SetTitle("time");
676    
677     hITS3_2->GetYaxis()->SetTitle("current [micronA]");
678    
679     hITS3_2->SetMarkerColor(2);
680    
681     hITS3_2->SetMarkerStyle(22);
682    
683     hITS3_2->SetMarkerSize(0.8);
684    
685    
686     TH2F *hITS3_3 = new TH2F("hITS3_3","Current:Section ye plane 3",1000,min_obt,max_obt,1000,-1.0, 10.);
687    
688     hITS3_3->SetBit(TH2::kCanRebin);
689    
690     hITS3_3->SetStats(0);
691    
692     hITS3_3->SetFillColor(42);
693    
694     hITS3_3->GetXaxis()->SetTitle("time");
695    
696     hITS3_3->GetYaxis()->SetTitle("current [micronA]");
697    
698     hITS3_3->SetMarkerColor(3);
699    
700     hITS3_3->SetMarkerStyle(22);
701    
702     hITS3_3->SetMarkerSize(0.8);
703    
704    
705     TH2F *hITS3_4 = new TH2F("hITS3_4","Current:Section ye plane 4",1000,min_obt,max_obt,1000,-1.0, 10.);
706    
707     hITS3_4->SetBit(TH2::kCanRebin);
708    
709     hITS3_4->SetStats(0);
710    
711     hITS3_4->SetFillColor(42);
712    
713     hITS3_4->GetXaxis()->SetTitle("time");
714    
715     hITS3_4->GetYaxis()->SetTitle("current [micronA]");
716    
717     hITS3_4->SetMarkerColor(4);
718    
719     hITS3_4->SetMarkerStyle(22);
720    
721     hITS3_4->SetMarkerSize(0.8);
722    
723    
724     TH2F *hITS3_5 = new TH2F("hITS3_5","Current:Section ye plane 5",1000,min_obt,max_obt,1000,-1.0, 10.);
725    
726     hITS3_5->SetBit(TH2::kCanRebin);
727    
728     hITS3_5->SetStats(0);
729    
730     hITS3_5->SetFillColor(42);
731    
732     hITS3_5->GetXaxis()->SetTitle("time");
733    
734     hITS3_5->GetYaxis()->SetTitle("current [micronA]");
735    
736     hITS3_5->SetMarkerColor(5);
737    
738     hITS3_5->SetMarkerStyle(22);
739    
740     hITS3_5->SetMarkerSize(0.8);
741    
742    
743     TH2F *hITS3_6 = new TH2F("hITS3_6","Current:Section ye plane 6",1000,min_obt,max_obt,1000,-1.0, 10.);
744    
745     hITS3_6->SetBit(TH2::kCanRebin);
746    
747     hITS3_6->SetStats(0);
748    
749     hITS3_6->SetFillColor(42);
750    
751     hITS3_6->GetXaxis()->SetTitle("time");
752    
753     hITS3_6->GetYaxis()->SetTitle("current [micronA]");
754    
755     hITS3_6->SetMarkerColor(6);
756    
757     hITS3_6->SetMarkerStyle(22);
758    
759     hITS3_6->SetMarkerSize(0.8);
760    
761    
762     TH2F *hITS3_7 = new TH2F("hITS3_7","Current:Section ye plane 7",1000,min_obt,max_obt,1000,-1.0, 10.);
763    
764     hITS3_7->SetBit(TH2::kCanRebin);
765    
766     hITS3_7->SetStats(0);
767    
768     hITS3_7->SetFillColor(42);
769    
770     hITS3_7->GetXaxis()->SetTitle("time");
771    
772     hITS3_7->GetYaxis()->SetTitle("current [micronA]");
773    
774     hITS3_7->SetMarkerColor(7);
775    
776     hITS3_7->SetMarkerStyle(22);
777    
778     hITS3_7->SetMarkerSize(0.8);
779    
780    
781     TH2F *hITS3_8 = new TH2F("hITS3_8","Current:Section ye plane 8",1000,min_obt,max_obt,1000,-1.0, 10.);
782    
783     hITS3_8->SetBit(TH2::kCanRebin);
784    
785     hITS3_8->SetStats(0);
786    
787     hITS3_8->SetFillColor(42);
788    
789     hITS3_8->GetXaxis()->SetTitle("time");
790    
791     hITS3_8->GetYaxis()->SetTitle("current [micronA]");
792    
793     hITS3_8->SetMarkerColor(8);
794    
795     hITS3_8->SetMarkerStyle(22);
796    
797     hITS3_8->SetMarkerSize(0.8);
798    
799    
800     TH2F *hITS3_9 = new TH2F("hITS3_9","Current:Section ye plane 9",1000,min_obt,max_obt,1000,-1.0, 10.);
801    
802     hITS3_9->SetBit(TH2::kCanRebin);
803    
804     hITS3_9->SetStats(0);
805    
806     hITS3_9->SetFillColor(42);
807    
808     hITS3_9->GetXaxis()->SetTitle("time");
809    
810     hITS3_9->GetYaxis()->SetTitle("current [micronA]");
811    
812     hITS3_9->SetMarkerColor(9);
813    
814     hITS3_9->SetMarkerStyle(22);
815    
816     hITS3_9->SetMarkerSize(0.8);
817    
818    
819     TH2F *hITS3_10 = new TH2F("hITS3_10","Current:Section ye plane 10",1000,min_obt,max_obt,1000,-1.0, 10.);
820    
821     hITS3_10->SetBit(TH2::kCanRebin);
822    
823     hITS3_10->SetStats(0);
824    
825     hITS3_10->SetFillColor(42);
826    
827     hITS3_10->GetXaxis()->SetTitle("time");
828    
829     hITS3_10->GetYaxis()->SetTitle("current [micronA]");
830    
831     hITS3_10->SetMarkerColor(11);
832    
833     hITS3_10->SetMarkerStyle(22);
834    
835     hITS3_10->SetMarkerSize(0.8);
836    
837    
838     TH2F *hITS3_11 = new TH2F("hITS3_11","Current:Section ye plane 11",1000,min_obt,max_obt,1000,-1.0, 10.);
839    
840     hITS3_11->SetBit(TH2::kCanRebin);
841    
842     hITS3_11->SetStats(0);
843    
844     hITS3_11->SetFillColor(42);
845    
846     hITS3_11->GetXaxis()->SetTitle("time");
847    
848     hITS3_11->GetYaxis()->SetTitle("current [micronA]");
849    
850     hITS3_11->SetMarkerColor(12);
851    
852     hITS3_11->SetMarkerStyle(22);
853    
854     hITS3_11->SetMarkerSize(0.8);
855    
856    
857    
858    
859    
860    
861     // grafici prima canvas quarta pad
862    
863    
864     // grafici corrente yo
865    
866    
867     TH2F *hITS4_1 = new TH2F("hITS4_1","Current:Section yo",1000,min_obt,max_obt*1.006,1000,-500., 500.);
868    
869     // hITS4_1->SetBit(TH2::kCanRebin);
870    
871     hITS4_1->SetStats(0);
872    
873     hITS4_1->SetFillColor(42);
874    
875     hITS4_1->GetXaxis()->SetTitle("time");
876    
877     hITS4_1->GetYaxis()->SetTitle("current [micronA]");
878    
879     hITS4_1->GetYaxis()->SetTitleOffset(1.2);
880    
881     hITS4_1->SetMarkerColor(1);
882    
883     hITS4_1->SetMarkerStyle(25);
884    
885     hITS4_1->SetMarkerSize(0.8);
886    
887    
888     TH2F *hITS4_2 = new TH2F("hITS4_2","Current:Section yo plane 2",1000,min_obt,max_obt,1000,-1.0, 10.);
889    
890     hITS4_2->SetBit(TH2::kCanRebin);
891    
892     hITS4_2->SetStats(0);
893    
894     hITS4_2->SetFillColor(42);
895    
896     hITS4_2->GetXaxis()->SetTitle("time");
897    
898     hITS4_2->GetYaxis()->SetTitle("current [micronA]");
899    
900     hITS4_2->SetMarkerColor(2);
901    
902     hITS4_2->SetMarkerStyle(25);
903    
904     hITS4_2->SetMarkerSize(0.8);
905    
906    
907     TH2F *hITS4_3 = new TH2F("hITS4_3","Current:Section yo plane 3",1000,min_obt,max_obt,1000,-1.0, 10.);
908    
909     hITS4_3->SetBit(TH2::kCanRebin);
910    
911     hITS4_3->SetStats(0);
912    
913     hITS4_3->SetFillColor(42);
914    
915     hITS4_3->GetXaxis()->SetTitle("time");
916    
917     hITS4_3->GetYaxis()->SetTitle("current [micronA]");
918    
919     hITS4_3->SetMarkerColor(3);
920    
921     hITS4_3->SetMarkerStyle(25);
922    
923     hITS4_3->SetMarkerSize(0.8);
924    
925    
926     TH2F *hITS4_4 = new TH2F("hITS4_4","Current:Section yo plane 4",1000,min_obt,max_obt,1000,-1.0, 10.);
927    
928     hITS4_4->SetBit(TH2::kCanRebin);
929    
930     hITS4_4->SetStats(0);
931    
932     hITS4_4->SetFillColor(42);
933    
934     hITS4_4->GetXaxis()->SetTitle("time");
935    
936     hITS4_4->GetYaxis()->SetTitle("current [micronA]");
937    
938     hITS4_4->SetMarkerColor(4);
939    
940     hITS4_4->SetMarkerStyle(25);
941    
942     hITS4_4->SetMarkerSize(0.8);
943    
944    
945     TH2F *hITS4_5 = new TH2F("hITS4_5","Current:Section yo plane 5",1000,min_obt,max_obt,1000,-1.0, 10.);
946    
947     hITS4_5->SetBit(TH2::kCanRebin);
948    
949     hITS4_5->SetStats(0);
950    
951     hITS4_5->SetFillColor(42);
952    
953     hITS4_5->GetXaxis()->SetTitle("time");
954    
955     hITS4_5->GetYaxis()->SetTitle("current [micronA]");
956    
957     hITS4_5->SetMarkerColor(5);
958    
959     hITS4_5->SetMarkerStyle(25);
960    
961     hITS4_5->SetMarkerSize(0.8);
962    
963    
964     TH2F *hITS4_6 = new TH2F("hITS4_6","Current:Section yo plane 6",1000,min_obt,max_obt,1000,-1.0, 10.);
965    
966     hITS4_6->SetBit(TH2::kCanRebin);
967    
968     hITS4_6->SetStats(0);
969    
970     hITS4_6->SetFillColor(42);
971    
972     hITS4_6->GetXaxis()->SetTitle("time");
973    
974     hITS4_6->GetYaxis()->SetTitle("current [micronA]");
975    
976     hITS4_6->SetMarkerColor(6);
977    
978     hITS4_6->SetMarkerStyle(25);
979    
980     hITS4_6->SetMarkerSize(0.8);
981    
982    
983     TH2F *hITS4_7 = new TH2F("hITS4_7","Current:Section yo plane 7",1000,min_obt,max_obt,1000,-1.0, 10.);
984    
985     hITS4_7->SetBit(TH2::kCanRebin);
986    
987     hITS4_7->SetStats(0);
988    
989     hITS4_7->SetFillColor(42);
990    
991     hITS4_7->GetXaxis()->SetTitle("time");
992    
993     hITS4_7->GetYaxis()->SetTitle("current [micronA]");
994    
995     hITS4_7->SetMarkerColor(7);
996    
997     hITS4_7->SetMarkerStyle(25);
998    
999     hITS4_7->SetMarkerSize(0.8);
1000    
1001    
1002     TH2F *hITS4_8 = new TH2F("hITS4_8","Current:Section y0 plane 8",1000,min_obt,max_obt,1000,-1.0, 10.);
1003    
1004     hITS4_8->SetBit(TH2::kCanRebin);
1005    
1006     hITS4_8->SetStats(0);
1007    
1008     hITS4_8->SetFillColor(42);
1009    
1010     hITS4_8->GetXaxis()->SetTitle("time");
1011    
1012     hITS4_8->GetYaxis()->SetTitle("current [micronA]");
1013    
1014     hITS4_8->SetMarkerColor(8);
1015    
1016     hITS4_8->SetMarkerStyle(25);
1017    
1018     hITS4_8->SetMarkerSize(0.8);
1019    
1020    
1021     TH2F *hITS4_9 = new TH2F("hITS4_9","Current:Section yo plane 9",1000,min_obt,max_obt,1000,-1.0, 10.);
1022    
1023     hITS4_9->SetBit(TH2::kCanRebin);
1024    
1025     hITS4_9->SetStats(0);
1026    
1027     hITS4_9->SetFillColor(42);
1028    
1029     hITS4_9->GetXaxis()->SetTitle("time");
1030    
1031     hITS4_9->GetYaxis()->SetTitle("current [micronA]");
1032    
1033     hITS4_9->SetMarkerColor(9);
1034    
1035     hITS4_9->SetMarkerStyle(25);
1036    
1037     hITS4_9->SetMarkerSize(0.8);
1038    
1039    
1040     TH2F *hITS4_10 = new TH2F("hITS4_10","Current:Section yo plane 10",1000,min_obt,max_obt,1000,-1.0, 10.);
1041    
1042     hITS4_10->SetBit(TH2::kCanRebin);
1043    
1044     hITS4_10->SetStats(0);
1045    
1046     hITS4_10->SetFillColor(42);
1047    
1048     hITS4_10->GetXaxis()->SetTitle("time");
1049    
1050     hITS4_10->GetYaxis()->SetTitle("current [micronA]");
1051    
1052     hITS4_10->SetMarkerColor(11);
1053    
1054     hITS4_10->SetMarkerStyle(25);
1055    
1056     hITS4_10->SetMarkerSize(0.8);
1057    
1058    
1059     TH2F *hITS4_11 = new TH2F("hITS4_11","Current:Section yo plane 11",1000,min_obt,max_obt,1000,-1.0, 10.);
1060    
1061     hITS4_11->SetBit(TH2::kCanRebin);
1062    
1063     hITS4_11->SetStats(0);
1064    
1065     hITS4_11->SetFillColor(42);
1066    
1067     hITS4_11->GetXaxis()->SetTitle("time");
1068    
1069     hITS4_11->GetYaxis()->SetTitle("current [micronA]");
1070    
1071     hITS4_11->SetMarkerColor(12);
1072    
1073     hITS4_11->SetMarkerStyle(25);
1074    
1075     hITS4_11->SetMarkerSize(0.8);
1076    
1077    
1078    
1079     // grafici temperatura
1080    
1081     TH2F *hITS5 = new TH2F("hITS5","Temperature ",1000,min_obt,max_obt*1.006,1000,30,40);
1082    
1083     hITS5->SetStats(0);
1084    
1085     hITS5->SetBit(TH2::kCanRebin);
1086    
1087     hITS5->SetFillColor(42);
1088    
1089     hITS5->GetXaxis()->SetTitle("time");
1090    
1091     hITS5->GetYaxis()->SetTitle("Temperature [C]");
1092    
1093     hITS5->SetMarkerColor(1);
1094    
1095     hITS5->SetMarkerStyle(21);
1096    
1097     hITS5->SetMarkerSize(0.8);
1098    
1099    
1100     TH2F *hITS6 = new TH2F("hITS6","Temperature section xo plane 2 ",1000,min_obt,max_obt,1000,30,40);
1101    
1102     hITS6->SetStats(0);
1103    
1104     hITS6->SetBit(TH2::kCanRebin);
1105    
1106     hITS6->SetFillColor(42);
1107    
1108     hITS6->GetXaxis()->SetTitle("time");
1109    
1110     hITS6->GetYaxis()->SetTitle("Temperature [C]");
1111    
1112     hITS6->SetMarkerColor(1);
1113    
1114     hITS6->SetMarkerStyle(3);
1115    
1116     hITS6->SetMarkerSize(0.8);
1117    
1118    
1119    
1120    
1121     TH2F *hITS7 = new TH2F("hITS7","Temperature section xo plane 3",1000,min_obt,max_obt,1000,30,40);
1122    
1123     hITS7->SetStats(0);
1124    
1125     hITS7->SetBit(TH2::kCanRebin);
1126    
1127     hITS7->SetFillColor(42);
1128    
1129     hITS7->GetXaxis()->SetTitle("time");
1130    
1131     hITS7->GetYaxis()->SetTitle("Temperature [C]");
1132    
1133     hITS7->SetMarkerColor(2);
1134    
1135     hITS7->SetMarkerStyle(3);
1136    
1137     hITS7->SetMarkerSize(0.8);
1138    
1139    
1140    
1141     TH2F *hITS8 = new TH2F("hITS8","Temperature section xo plane 5",1000,min_obt,max_obt,1000,30,40);
1142    
1143     hITS8->SetStats(0);
1144    
1145     hITS8->SetBit(TH2::kCanRebin);
1146    
1147     hITS8->SetFillColor(42);
1148    
1149     hITS8->GetXaxis()->SetTitle("time");
1150    
1151     hITS8->GetYaxis()->SetTitle("Temperature [C]");
1152    
1153     hITS8->SetMarkerColor(4);
1154    
1155     hITS8->SetMarkerStyle(3);
1156    
1157     hITS8->SetMarkerSize(0.8);
1158    
1159    
1160     TH2F *hITS9 = new TH2F("hITS9","Temperature section ye plane 4",1000,min_obt,max_obt,1000,30,40);
1161    
1162     hITS9->SetStats(0);
1163    
1164     hITS9->SetBit(TH2::kCanRebin);
1165    
1166     hITS9->SetFillColor(42);
1167    
1168     hITS9->GetXaxis()->SetTitle("time");
1169    
1170     hITS9->GetYaxis()->SetTitle("Temperature [C]");
1171    
1172     hITS9->SetMarkerColor(1);
1173    
1174     hITS9->SetMarkerStyle(22);
1175    
1176     hITS9->SetMarkerSize(0.8);
1177    
1178    
1179    
1180     TH2F *hITS10 = new TH2F("hITS10","Temperature section ye plane 5",1000,min_obt,max_obt,1000,30,40);
1181    
1182     hITS10->SetStats(0);
1183    
1184     hITS10->SetBit(TH2::kCanRebin);
1185    
1186     hITS10->SetFillColor(42);
1187    
1188     hITS10->GetXaxis()->SetTitle("time");
1189    
1190     hITS10->GetYaxis()->SetTitle("Temperature [C]");
1191    
1192     hITS10->SetMarkerColor(2);
1193    
1194     hITS10->SetMarkerStyle(22);
1195    
1196     hITS10->SetMarkerSize(0.8);
1197    
1198    
1199    
1200     TH2F *hITS11 = new TH2F("hITS11","Temperature section ye plane 8",1000,min_obt,max_obt,1000,30,40);
1201    
1202     hITS11->SetStats(0);
1203    
1204     hITS11->SetBit(TH2::kCanRebin);
1205    
1206     hITS11->SetFillColor(42);
1207    
1208     hITS11->GetXaxis()->SetTitle("time");
1209    
1210     hITS11->GetYaxis()->SetTitle("Temperature [C]");
1211    
1212     hITS11->SetMarkerColor(4);
1213    
1214     hITS11->SetMarkerStyle(22);
1215    
1216     hITS11->SetMarkerSize(0.8);
1217    
1218    
1219     TH2F *hITS12 = new TH2F("hITS12","Temperature section yo plane 6",1000,min_obt,max_obt,1000,30,40);
1220    
1221     hITS12->SetStats(0);
1222    
1223     hITS12->SetBit(TH2::kCanRebin);
1224    
1225     hITS12->SetFillColor(42);
1226    
1227     hITS12->GetXaxis()->SetTitle("time");
1228    
1229     hITS12->GetYaxis()->SetTitle("Temperature [C]");
1230    
1231     hITS12->SetMarkerColor(1);
1232    
1233     hITS12->SetMarkerStyle(25);
1234    
1235     hITS12->SetMarkerSize(0.8);
1236    
1237    
1238     TH2F *hITS13 = new TH2F("hITS13","Temperature section yo plane 10",1000,min_obt,max_obt,1000,30,40);
1239    
1240     hITS13->SetStats(0);
1241    
1242     hITS13->SetBit(TH2::kCanRebin);
1243    
1244     hITS13->SetFillColor(42);
1245    
1246     hITS13->GetXaxis()->SetTitle("time");
1247    
1248     hITS13->GetYaxis()->SetTitle("Temperature [C]");
1249    
1250     hITS13->SetMarkerColor(2);
1251    
1252     hITS13->SetMarkerStyle(25);
1253    
1254     hITS13->SetMarkerSize(0.8);
1255    
1256    
1257    
1258     TH2F *hITS14 = new TH2F("hITS14","Temperature section yo plane 11",1000,min_obt,max_obt,1000,30,40);
1259    
1260     hITS14->SetStats(0);
1261    
1262     hITS14->SetBit(TH2::kCanRebin);
1263    
1264     hITS14->SetFillColor(42);
1265    
1266     hITS14->GetXaxis()->SetTitle("time");
1267    
1268     hITS14->GetYaxis()->SetTitle("Temperature [C]");
1269    
1270     hITS14->SetMarkerColor(4);
1271    
1272     hITS14->SetMarkerStyle(25);
1273    
1274     hITS14->SetMarkerSize(0.8);
1275    
1276    
1277    
1278    
1279    
1280    
1281     // grafici Vcall
1282    
1283     TH2F *hITS15 = new TH2F("hITS15","V_call: calibration voltage",1000,min_obt,max_obt*1.006,1000,0.0, 100.);
1284    
1285     hITS15->SetStats(0);
1286    
1287     hITS15->SetBit(TH2::kCanRebin);
1288    
1289     hITS15->SetFillColor(42);
1290    
1291     hITS15->GetXaxis()->SetTitle("time");
1292    
1293     hITS15->GetYaxis()->SetTitle("V call [mV]");
1294    
1295     hITS15->SetMarkerColor(1);
1296    
1297     hITS15->SetMarkerStyle(21);
1298    
1299     hITS15->SetMarkerSize(0.8);
1300    
1301    
1302     TH2F *hITS16 = new TH2F("hITS16","V_call section xe plane 4 ",1000,min_obt,max_obt,1000,0.0, 100.);
1303    
1304     hITS16->SetStats(0);
1305    
1306     hITS16->SetBit(TH2::kCanRebin);
1307    
1308     hITS16->SetFillColor(42);
1309    
1310     hITS16->GetXaxis()->SetTitle("time");
1311    
1312     hITS16->GetYaxis()->SetTitle("V call [mV]");
1313    
1314     hITS16->SetMarkerColor(2);
1315    
1316     hITS16->SetMarkerStyle(21);
1317    
1318     hITS16->SetMarkerSize(0.8);
1319    
1320    
1321     TH2F *hITS17 = new TH2F("hITS17","V_call section xe plane 6",1000,min_obt,max_obt,1000,0.0, 100.);
1322    
1323     hITS17->SetStats(0);
1324    
1325     hITS17->SetBit(TH2::kCanRebin);
1326    
1327     hITS17->SetFillColor(42);
1328    
1329     hITS17->GetXaxis()->SetTitle("time");
1330    
1331     hITS17->GetYaxis()->SetTitle("V call [mV]");
1332    
1333     hITS17->SetMarkerColor(4);
1334    
1335     hITS17->SetMarkerStyle(21);
1336    
1337     hITS17->SetMarkerSize(0.8);
1338    
1339    
1340     TH2F *hITS18 = new TH2F("hITS18","V_call section ",1000,min_obt,max_obt,1000,0.0, 100.);
1341    
1342     hITS18->SetStats(0);
1343    
1344     hITS18->SetBit(TH2::kCanRebin);
1345    
1346     hITS18->SetFillColor(42);
1347    
1348     hITS18->GetXaxis()->SetTitle("time");
1349    
1350     hITS18->GetYaxis()->SetTitle("V call [mV]");
1351    
1352     hITS18->SetMarkerColor(8);
1353    
1354     hITS18->SetMarkerStyle(21);
1355    
1356     hITS18->SetMarkerSize(0.8);
1357    
1358    
1359     TH2F *hITS19 = new TH2F("hITS19","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1360    
1361     hITS19->SetStats(0);
1362    
1363     hITS19->SetBit(TH2::kCanRebin);
1364    
1365     hITS19->SetFillColor(42);
1366    
1367     hITS19->GetXaxis()->SetTitle("time");
1368    
1369     hITS19->GetYaxis()->SetTitle("V call [mV]");
1370    
1371     hITS19->SetMarkerColor(6);
1372    
1373     hITS19->SetMarkerStyle(21);
1374    
1375     hITS19->SetMarkerSize(0.8);
1376    
1377    
1378     TH2F *hITS20 = new TH2F("hITS20","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1379    
1380     hITS20->SetStats(0);
1381    
1382     hITS20->SetBit(TH2::kCanRebin);
1383    
1384     hITS20->SetFillColor(42);
1385    
1386     hITS20->GetXaxis()->SetTitle("time");
1387    
1388     hITS20->GetYaxis()->SetTitle("V call [mV]");
1389    
1390     hITS20->SetMarkerColor(7);
1391    
1392     hITS20->SetMarkerStyle(21);
1393    
1394     hITS20->SetMarkerSize(0.8);
1395    
1396    
1397     TH2F *hITS21 = new TH2F("hITS21","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1398    
1399     hITS21->SetStats(0);
1400    
1401     hITS21->SetBit(TH2::kCanRebin);
1402    
1403     hITS21->SetFillColor(42);
1404    
1405     hITS21->GetXaxis()->SetTitle("time");
1406    
1407     hITS21->GetYaxis()->SetTitle("V call [mV]");
1408    
1409     hITS21->SetMarkerColor(46);
1410    
1411     hITS21->SetMarkerStyle(21);
1412    
1413     hITS21->SetMarkerSize(0.8);
1414    
1415    
1416     TH2F *hITS22 = new TH2F("hITS22","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1417    
1418     hITS22->SetStats(0);
1419    
1420     hITS22->SetBit(TH2::kCanRebin);
1421    
1422     hITS22->SetFillColor(42);
1423    
1424     hITS22->GetXaxis()->SetTitle("time");
1425    
1426     hITS22->GetYaxis()->SetTitle("V call [mV]");
1427    
1428     hITS22->SetMarkerColor(1);
1429    
1430     hITS22->SetMarkerStyle(3);
1431    
1432     hITS22->SetMarkerSize(0.8);
1433    
1434    
1435     TH2F *hITS23 = new TH2F("hITS23","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1436    
1437     hITS23->SetStats(0);
1438    
1439     hITS23->SetBit(TH2::kCanRebin);
1440    
1441     hITS23->SetFillColor(42);
1442    
1443     hITS23->GetXaxis()->SetTitle("time");
1444    
1445     hITS23->GetYaxis()->SetTitle("V call [mV]");
1446    
1447     hITS23->SetMarkerColor(2);
1448    
1449     hITS23->SetMarkerStyle(3);
1450    
1451     hITS23->SetMarkerSize(0.8);
1452    
1453    
1454     TH2F *hITS24 = new TH2F("hITS24","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1455    
1456     hITS24->SetStats(0);
1457    
1458     hITS24->SetBit(TH2::kCanRebin);
1459    
1460     hITS24->SetFillColor(42);
1461    
1462     hITS24->GetXaxis()->SetTitle("time");
1463    
1464     hITS24->GetYaxis()->SetTitle("V call [mV]");
1465    
1466     hITS24->SetMarkerColor(4);
1467    
1468     hITS24->SetMarkerStyle(3);
1469    
1470     hITS24->SetMarkerSize(0.8);
1471    
1472    
1473     TH2F *hITS25 = new TH2F("hITS25","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1474    
1475     hITS25->SetStats(0);
1476    
1477     hITS25->SetBit(TH2::kCanRebin);
1478    
1479     hITS25->SetFillColor(42);
1480    
1481     hITS25->GetXaxis()->SetTitle("time");
1482    
1483     hITS25->GetYaxis()->SetTitle("V call [mV]");
1484    
1485     hITS25->SetMarkerColor(8);
1486    
1487     hITS25->SetMarkerStyle(3);
1488    
1489     hITS25->SetMarkerSize(0.8);
1490    
1491    
1492    
1493     TH2F *hITS26 = new TH2F("hITS26","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1494    
1495     hITS26->SetStats(0);
1496    
1497     hITS26->SetBit(TH2::kCanRebin);
1498    
1499     hITS26->SetFillColor(42);
1500    
1501     hITS26->GetXaxis()->SetTitle("time");
1502    
1503     hITS26->GetYaxis()->SetTitle("V call [mV]");
1504    
1505     hITS26->SetMarkerColor(6);
1506    
1507     hITS26->SetMarkerStyle(3);
1508    
1509     hITS26->SetMarkerSize(0.8);
1510    
1511    
1512    
1513    
1514    
1515     TH2F *hITS27 = new TH2F("hITS27","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1516    
1517     hITS27->SetStats(0);
1518    
1519     hITS27->SetBit(TH2::kCanRebin);
1520    
1521     hITS27->SetFillColor(42);
1522    
1523     hITS27->GetXaxis()->SetTitle("time");
1524    
1525     hITS27->GetYaxis()->SetTitle("V call [mV]");
1526    
1527     hITS27->SetMarkerColor(1);
1528    
1529     hITS27->SetMarkerStyle(22);
1530    
1531     hITS27->SetMarkerSize(0.8);
1532    
1533    
1534     TH2F *hITS28 = new TH2F("hITS28","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1535    
1536     hITS28->SetStats(0);
1537    
1538     hITS28->SetBit(TH2::kCanRebin);
1539    
1540     hITS28->SetFillColor(42);
1541    
1542     hITS28->GetXaxis()->SetTitle("time");
1543    
1544     hITS28->GetYaxis()->SetTitle("V call [mV]");
1545    
1546     hITS28->SetMarkerColor(2);
1547    
1548     hITS28->SetMarkerStyle(22);
1549    
1550     hITS28->SetMarkerSize(0.8);
1551    
1552    
1553     TH2F *hITS29 = new TH2F("hITS29","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1554    
1555     hITS29->SetStats(0);
1556    
1557     hITS29->SetBit(TH2::kCanRebin);
1558    
1559     hITS29->SetFillColor(42);
1560    
1561     hITS29->GetXaxis()->SetTitle("time");
1562    
1563     hITS29->GetYaxis()->SetTitle("V call [mV]");
1564    
1565     hITS29->SetMarkerColor(4);
1566    
1567     hITS29->SetMarkerStyle(22);
1568    
1569     hITS29->SetMarkerSize(0.8);
1570    
1571    
1572     TH2F *hITS30 = new TH2F("hITS30","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1573    
1574     hITS30->SetStats(0);
1575    
1576     hITS30->SetBit(TH2::kCanRebin);
1577    
1578     hITS30->SetFillColor(42);
1579    
1580     hITS30->GetXaxis()->SetTitle("time");
1581    
1582     hITS30->GetYaxis()->SetTitle("V call [mV]");
1583    
1584     hITS30->SetMarkerColor(8);
1585    
1586     hITS30->SetMarkerStyle(22);
1587    
1588     hITS30->SetMarkerSize(0.8);
1589    
1590    
1591     TH2F *hITS31 = new TH2F("hITS31","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1592    
1593     hITS31->SetStats(0);
1594    
1595     hITS31->SetBit(TH2::kCanRebin);
1596    
1597     hITS31->SetFillColor(42);
1598    
1599     hITS31->GetXaxis()->SetTitle("time");
1600    
1601     hITS31->GetYaxis()->SetTitle("V call [mV]");
1602    
1603     hITS31->SetMarkerColor(6);
1604    
1605     hITS31->SetMarkerStyle(22);
1606    
1607     hITS31->SetMarkerSize(0.8);
1608    
1609    
1610    
1611     TH2F *hITS32 = new TH2F("hITS32","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1612    
1613     hITS32->SetStats(0);
1614    
1615     hITS32->SetBit(TH2::kCanRebin);
1616    
1617     hITS32->SetFillColor(42);
1618    
1619     hITS32->GetXaxis()->SetTitle("time");
1620    
1621     hITS32->GetYaxis()->SetTitle("V call [mV]");
1622    
1623     hITS32->SetMarkerColor(1);
1624    
1625     hITS32->SetMarkerStyle(25);
1626    
1627     hITS32->SetMarkerSize(0.8);
1628    
1629    
1630     TH2F *hITS33 = new TH2F("hITS33","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1631    
1632     hITS33->SetStats(0);
1633    
1634     hITS33->SetBit(TH2::kCanRebin);
1635    
1636     hITS33->SetFillColor(42);
1637    
1638     hITS33->GetXaxis()->SetTitle("time");
1639    
1640     hITS33->GetYaxis()->SetTitle("V call [mV]");
1641    
1642     hITS33->SetMarkerColor(2);
1643    
1644     hITS33->SetMarkerStyle(22);
1645    
1646     hITS33->SetMarkerSize(0.8);
1647    
1648    
1649     TH2F *hITS34 = new TH2F("hITS34","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1650    
1651     hITS34->SetStats(0);
1652    
1653     hITS34->SetBit(TH2::kCanRebin);
1654    
1655     hITS34->SetFillColor(42);
1656    
1657     hITS34->GetXaxis()->SetTitle("time");
1658    
1659     hITS34->GetYaxis()->SetTitle("V call [mV]");
1660    
1661     hITS34->SetMarkerColor(4);
1662    
1663     hITS34->SetMarkerStyle(22);
1664    
1665     hITS34->SetMarkerSize(0.8);
1666    
1667    
1668    
1669     TH2F *hITS35 = new TH2F("hITS35","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1670    
1671     hITS35->SetStats(0);
1672    
1673     hITS35->SetBit(TH2::kCanRebin);
1674    
1675     hITS35->SetFillColor(42);
1676    
1677     hITS35->GetXaxis()->SetTitle("time");
1678    
1679     hITS35->GetYaxis()->SetTitle("V call [mV]");
1680    
1681     hITS35->SetMarkerColor(8);
1682    
1683     hITS35->SetMarkerStyle(22);
1684    
1685     hITS35->SetMarkerSize(0.8);
1686    
1687    
1688    
1689     TH2F *hITS36 = new TH2F("hITS36","V_call",1000,min_obt,max_obt,1000,0.0, 100.);
1690    
1691     hITS36->SetStats(0);
1692    
1693     hITS36->SetBit(TH2::kCanRebin);
1694    
1695     hITS36->SetFillColor(42);
1696    
1697     hITS36->GetXaxis()->SetTitle("time");
1698    
1699     hITS36->GetYaxis()->SetTitle("V call [mV]");
1700    
1701     hITS36->SetMarkerColor(6);
1702    
1703     hITS36->SetMarkerStyle(22);
1704    
1705     hITS36->SetMarkerSize(0.8);
1706    
1707    
1708     // grafici terza pad
1709    
1710     // V_SS
1711    
1712     TH2F *hITS37 = new TH2F("hITS37","V_SS: negative voltage CR-1.4P",1000,min_obt,max_obt*1.006,1000,-4950., -4800.);
1713    
1714     hITS37->SetStats(0);
1715    
1716     hITS37->SetBit(TH2::kCanRebin);
1717    
1718     hITS37->SetFillColor(42);
1719    
1720     hITS37->GetXaxis()->SetTitle("time");
1721    
1722     hITS37->GetYaxis()->SetTitle("V_SS [mV]");
1723    
1724     hITS37->GetYaxis()->SetTitleOffset(1.2);
1725    
1726     hITS37->SetMarkerColor(1);
1727    
1728     hITS37->SetMarkerStyle(21);
1729    
1730     hITS37->SetMarkerSize(0.8);
1731    
1732    
1733     TH2F *hITS38 = new TH2F("hITS38","V_SS",1000,min_obt,max_obt,1000,-4950.,-4800.);
1734    
1735     hITS38->SetStats(0);
1736    
1737     hITS38->SetBit(TH2::kCanRebin);
1738    
1739     hITS38->SetFillColor(42);
1740    
1741     hITS38->GetXaxis()->SetTitle("time");
1742    
1743     hITS38->GetYaxis()->SetTitle("V_SS [mV]");
1744    
1745     hITS38->SetMarkerColor(1);
1746    
1747     hITS38->SetMarkerStyle(3);
1748    
1749     hITS38->SetMarkerSize(0.8);
1750    
1751    
1752     TH2F *hITS39 = new TH2F("hITS39","V_SS",1000,min_obt,max_obt,1000,-4950.,-4800.);
1753    
1754     hITS39->SetStats(0);
1755    
1756     hITS39->SetBit(TH2::kCanRebin);
1757    
1758     hITS39->SetFillColor(42);
1759    
1760     hITS39->GetXaxis()->SetTitle("time");
1761    
1762     hITS39->GetYaxis()->SetTitle("V_SS [mV]");
1763    
1764     hITS39->SetMarkerColor(2);
1765    
1766     hITS39->SetMarkerStyle(3);
1767    
1768     hITS39->SetMarkerSize(0.8);
1769    
1770    
1771    
1772     TH2F *hITS40 = new TH2F("hITS40","V_SS",1000,min_obt,max_obt,1000,-4950., -4800);
1773    
1774     hITS40->SetStats(0);
1775    
1776     hITS40->SetBit(TH2::kCanRebin);
1777    
1778     hITS40->SetFillColor(42);
1779    
1780     hITS40->GetXaxis()->SetTitle("time");
1781    
1782     hITS40->GetYaxis()->SetTitle("V_SS [mV]");
1783    
1784     hITS40->SetMarkerColor(1);
1785    
1786     hITS40->SetMarkerStyle(22);
1787    
1788     hITS40->SetMarkerSize(0.8);
1789    
1790    
1791     TH2F *hITS41 = new TH2F("hITS41","V_SS",1000,min_obt,max_obt,1000,-4950., -4800.);
1792    
1793     hITS41->SetStats(0);
1794    
1795     hITS41->SetBit(TH2::kCanRebin);
1796    
1797     hITS41->SetFillColor(42);
1798    
1799     hITS41->GetXaxis()->SetTitle("time");
1800    
1801     hITS41->GetYaxis()->SetTitle("V_SS [mV]");
1802    
1803     hITS41->SetMarkerColor(2);
1804    
1805     hITS41->SetMarkerStyle(22);
1806    
1807     hITS41->SetMarkerSize(0.8);
1808    
1809    
1810    
1811     TH2F *hITS42 = new TH2F("hITS42","V_SS",1000,min_obt,max_obt,1000,-4950., -4800.);
1812    
1813     hITS42->SetStats(0);
1814    
1815     hITS42->SetBit(TH2::kCanRebin);
1816    
1817     hITS42->SetFillColor(42);
1818    
1819     hITS42->GetXaxis()->SetTitle("time");
1820    
1821     hITS42->GetYaxis()->SetTitle("V_SS [mV]");
1822    
1823     hITS42->SetMarkerColor(1);
1824    
1825     hITS42->SetMarkerStyle(25);
1826    
1827     hITS42->SetMarkerSize(0.8);
1828    
1829    
1830    
1831     // 4 pad
1832    
1833     TH2F *hITS43 = new TH2F("hITS43","V_DD: positive voltage CR-1.4P",1000,min_obt,max_obt*1.006,1000,4500.,5000.);
1834    
1835     hITS43->SetStats(0);
1836    
1837     hITS43->SetBit(TH2::kCanRebin);
1838    
1839     hITS43->SetFillColor(42);
1840    
1841     hITS43->GetXaxis()->SetTitle("time");
1842    
1843     hITS43->GetYaxis()->SetTitle("V_DD [mV]");
1844    
1845     hITS43->GetYaxis()->SetTitleOffset(1.2);
1846    
1847     hITS43->SetMarkerColor(1);
1848    
1849     hITS43->SetMarkerStyle(21);
1850    
1851     hITS43->SetMarkerSize(0.8);
1852    
1853    
1854     TH2F *hITS44 = new TH2F("hITS44","V_DD",1000,min_obt,max_obt,1000,4500.,5000.);
1855    
1856     hITS44->SetStats(0);
1857    
1858     hITS44->SetBit(TH2::kCanRebin);
1859    
1860     hITS44->SetFillColor(42);
1861    
1862     hITS44->GetXaxis()->SetTitle("time");
1863    
1864     hITS44->GetYaxis()->SetTitle("V_DD [mV]");
1865    
1866     hITS44->SetMarkerColor(2);
1867    
1868     hITS44->SetMarkerStyle(21);
1869    
1870     hITS44->SetMarkerSize(0.8);
1871    
1872    
1873     TH2F *hITS45 = new TH2F("hITS45","V_DD",1000,min_obt,max_obt,1000,4500.,5000.);
1874    
1875     hITS45->SetStats(0);
1876    
1877     hITS45->SetBit(TH2::kCanRebin);
1878    
1879     hITS45->SetFillColor(42);
1880    
1881     hITS45->GetXaxis()->SetTitle("time");
1882    
1883     hITS45->GetYaxis()->SetTitle("V_DD [mV]");
1884    
1885     hITS45->SetMarkerColor(1);
1886    
1887     hITS45->SetMarkerStyle(3);
1888    
1889     hITS45->SetMarkerSize(0.8);
1890    
1891    
1892     TH2F *hITS46 = new TH2F("hITS46","V_DD",1000,min_obt,max_obt,1000,4500., 5000.);
1893    
1894     hITS46->SetStats(0);
1895    
1896     hITS46->SetBit(TH2::kCanRebin);
1897    
1898     hITS46->SetFillColor(42);
1899    
1900     hITS46->GetXaxis()->SetTitle("time");
1901    
1902     hITS46->GetYaxis()->SetTitle("V_DD [mV]");
1903    
1904     hITS46->SetMarkerColor(1);
1905    
1906     hITS46->SetMarkerStyle(22);
1907    
1908     hITS46->SetMarkerSize(0.8);
1909    
1910    
1911    
1912    
1913     TH2F *hITS47 = new TH2F("hITS47","V_DD",1000,min_obt,max_obt,1000,4500.,5000.);
1914    
1915     hITS47->SetStats(0);
1916    
1917     hITS47->SetBit(TH2::kCanRebin);
1918    
1919     hITS47->SetFillColor(42);
1920    
1921     hITS47->GetXaxis()->SetTitle("time");
1922    
1923     hITS47->GetYaxis()->SetTitle("V_DD [mV]");
1924    
1925     hITS47->SetMarkerColor(1);
1926    
1927     hITS47->SetMarkerStyle(25);
1928    
1929     hITS47->SetMarkerSize(0.8);
1930    
1931    
1932     TH2F *hITS48 = new TH2F("hITS48","V_DD",1000,min_obt,max_obt,1000,4500.,5000.);
1933    
1934     hITS48->SetStats(0);
1935    
1936     hITS48->SetBit(TH2::kCanRebin);
1937    
1938     hITS48->SetFillColor(42);
1939    
1940     hITS48->GetXaxis()->SetTitle("time");
1941    
1942     hITS48->GetYaxis()->SetTitle("V_DD [mV]");
1943    
1944     hITS48->SetMarkerColor(2);
1945    
1946     hITS48->SetMarkerStyle(25);
1947    
1948     hITS48->SetMarkerSize(0.8);
1949    
1950    
1951    
1952     for(Int_t i = 0; i <= n_entries; i++) {
1953    
1954     tr->GetEntry(i);
1955    
1956     UInt_t obt = (UInt_t)he->GetPscuHeader()->GetOrbitalTime(); // definisce l'orbital time
1957    
1958    
1959    
1960    
1961     Double_t current_xe0_adc = pher->CALO_ENDRUN[0].CALO_HK0[0];
1962    
1963     Double_t current_xe0 = current_xe0_adc/1.7348 - 9444. ; // micron A
1964    
1965     Double_t current_xe1_adc = pher->CALO_ENDRUN[0].CALO_HK0[1];
1966    
1967     Double_t current_xe1 = current_xe1_adc/1.7348 - 9444. ; // micron A
1968    
1969     Double_t current_xe2_adc = pher->CALO_ENDRUN[0].CALO_HK0[2];
1970    
1971     Double_t current_xe2 = current_xe2_adc/1.7348 - 9444. ; // micron A
1972    
1973     Double_t current_xe3_adc = pher->CALO_ENDRUN[0].CALO_HK0[3];
1974    
1975     Double_t current_xe3 = current_xe3_adc/1.7348 - 9444. ; // micron A
1976    
1977     Double_t current_xe4_adc = pher->CALO_ENDRUN[0].CALO_HK0[4];
1978    
1979     Double_t current_xe4 = current_xe4_adc/1.7348 - 9444. ; // micron A
1980    
1981     Double_t current_xe5_adc = pher->CALO_ENDRUN[0].CALO_HK0[5];
1982    
1983     Double_t current_xe5 = current_xe5_adc/1.7348 - 9444. ; // micron A
1984    
1985     Double_t current_xe6_adc = pher->CALO_ENDRUN[0].CALO_HK0[6];
1986    
1987     Double_t current_xe6 = current_xe6_adc/1.7348 - 9444. ; // micron A
1988    
1989     Double_t current_xe7_adc = pher->CALO_ENDRUN[0].CALO_HK0[7];
1990    
1991     Double_t current_xe7 = current_xe7_adc/1.7348 - 9444. ; // micron A
1992    
1993     Double_t current_xe8_adc = pher->CALO_ENDRUN[0].CALO_HK0[8];
1994    
1995     Double_t current_xe8 = current_xe8_adc/1.7348 - 9444. ; // micron A
1996    
1997     Double_t current_xe9_adc = pher->CALO_ENDRUN[0].CALO_HK0[9];
1998    
1999     Double_t current_xe9 = current_xe9_adc/1.7348 - 9444. ; // micron A
2000    
2001     Double_t current_xe10_adc = pher->CALO_ENDRUN[0].CALO_HK0[10];
2002    
2003     Double_t current_xe10 = current_xe10_adc/1.7348 - 9444. ; // micron A
2004    
2005    
2006    
2007     hITS1_1->Fill(obt,current_xe0);
2008     hITS1_2->Fill(obt,current_xe1);
2009     hITS1_3->Fill(obt,current_xe2);
2010     hITS1_4->Fill(obt,current_xe3);
2011     hITS1_5->Fill(obt,current_xe4);
2012     hITS1_6->Fill(obt,current_xe5);
2013     hITS1_7->Fill(obt,current_xe6);
2014     hITS1_8->Fill(obt,current_xe7);
2015     hITS1_9->Fill(obt,current_xe8);
2016     hITS1_10->Fill(obt,current_xe9);
2017     hITS1_11->Fill(obt,current_xe10);
2018    
2019    
2020     Double_t current_xo0_adc = pher->CALO_ENDRUN[1].CALO_HK0[0];
2021    
2022     Double_t current_xo0 = current_xo0_adc/1.7348 - 9444. ; // micron A
2023    
2024     Double_t current_xo1_adc = pher->CALO_ENDRUN[1].CALO_HK0[1];
2025    
2026     Double_t current_xo1 = current_xo1_adc/1.7348 - 9444. ; // micron A
2027    
2028     Double_t current_xo2_adc = pher->CALO_ENDRUN[1].CALO_HK0[2];
2029    
2030     Double_t current_xo2 = current_xo2_adc/1.7348 - 9444. ; // micron A
2031    
2032     Double_t current_xo3_adc = pher->CALO_ENDRUN[1].CALO_HK0[3];
2033    
2034     Double_t current_xo3 = current_xo3_adc/1.7348 - 9444. ; // micron A
2035    
2036     Double_t current_xo4_adc = pher->CALO_ENDRUN[1].CALO_HK0[4];
2037    
2038     Double_t current_xo4 = current_xo4_adc/1.7348 - 9444. ; // micron A
2039    
2040     Double_t current_xo5_adc = pher->CALO_ENDRUN[1].CALO_HK0[5];
2041    
2042     Double_t current_xo5 = current_xo5_adc/1.7348 - 9444. ; // micron A
2043    
2044     Double_t current_xo6_adc = pher->CALO_ENDRUN[1].CALO_HK0[6];
2045    
2046     Double_t current_xo6 = current_xo6_adc/1.7348 - 9444. ; // micron A
2047    
2048     Double_t current_xo7_adc = pher->CALO_ENDRUN[1].CALO_HK0[7];
2049    
2050     Double_t current_xo7 = current_xo7_adc/1.7348 - 9444. ; // micron A
2051    
2052     Double_t current_xo8_adc = pher->CALO_ENDRUN[1].CALO_HK0[8];
2053    
2054     Double_t current_xo8 = current_xo8_adc/1.7348 - 9444. ; // micron A
2055    
2056     Double_t current_xo9_adc = pher->CALO_ENDRUN[1].CALO_HK0[9];
2057    
2058     Double_t current_xo9 = current_xo9_adc/1.7348 - 9444. ; // micron A
2059    
2060     Double_t current_xo10_adc = pher->CALO_ENDRUN[1].CALO_HK0[10];
2061    
2062     Double_t current_xo10 = current_xo10_adc/1.7348 - 9444. ; // micron A
2063    
2064    
2065    
2066     hITS2_1->Fill(obt,current_xo0);
2067     hITS2_2->Fill(obt,current_xo1);
2068     hITS2_3->Fill(obt,current_xo2);
2069     hITS2_4->Fill(obt,current_xo3);
2070     hITS2_5->Fill(obt,current_xo4);
2071     hITS2_6->Fill(obt,current_xo5);
2072     hITS2_7->Fill(obt,current_xo6);
2073     hITS2_8->Fill(obt,current_xo7);
2074     hITS2_9->Fill(obt,current_xo8);
2075     hITS2_10->Fill(obt,current_xo9);
2076     hITS2_11->Fill(obt,current_xo10);
2077    
2078    
2079     Double_t current_ye0_adc = pher->CALO_ENDRUN[2].CALO_HK0[0];
2080    
2081     Double_t current_ye0 = current_ye0_adc/1.7348 - 9444. ; // micron A
2082    
2083     Double_t current_ye1_adc = pher->CALO_ENDRUN[2].CALO_HK0[1];
2084    
2085     Double_t current_ye1 = current_ye1_adc/1.7348 - 9444. ; // micron A
2086    
2087     Double_t current_ye2_adc = pher->CALO_ENDRUN[2].CALO_HK0[2];
2088    
2089     Double_t current_ye2 = current_ye2_adc/1.7348 - 9444. ; // micron A
2090    
2091     Double_t current_ye3_adc = pher->CALO_ENDRUN[2].CALO_HK0[3];
2092    
2093     Double_t current_ye3 = current_ye3_adc/1.7348 - 9444. ; // micron A
2094    
2095     Double_t current_ye4_adc = pher->CALO_ENDRUN[2].CALO_HK0[4];
2096    
2097     Double_t current_ye4 = current_ye4_adc/1.7348 - 9444. ; // micron A
2098    
2099     Double_t current_ye5_adc = pher->CALO_ENDRUN[2].CALO_HK0[5];
2100    
2101     Double_t current_ye5 = current_ye5_adc/1.7348 - 9444. ; // micron A
2102    
2103     Double_t current_ye6_adc = pher->CALO_ENDRUN[2].CALO_HK0[6];
2104    
2105     Double_t current_ye6 = current_ye6_adc/1.7348 - 9444. ; // micron A
2106    
2107     Double_t current_ye7_adc = pher->CALO_ENDRUN[2].CALO_HK0[7];
2108    
2109     Double_t current_ye7 = current_ye7_adc/1.7348 - 9444. ; // micron A
2110    
2111     Double_t current_ye8_adc = pher->CALO_ENDRUN[2].CALO_HK0[8];
2112    
2113     Double_t current_ye8 = current_ye8_adc/1.7348 - 9444. ; // micron A
2114    
2115     Double_t current_ye9_adc = pher->CALO_ENDRUN[2].CALO_HK0[9];
2116    
2117     Double_t current_ye9 = current_ye9_adc/1.7348 - 9444. ; // micron A
2118    
2119     Double_t current_ye10_adc = pher->CALO_ENDRUN[2].CALO_HK0[10];
2120    
2121     Double_t current_ye10 = current_ye10_adc/1.7348 - 9444. ; // micron A
2122    
2123    
2124    
2125     hITS3_1->Fill(obt,current_ye0);
2126     hITS3_2->Fill(obt,current_ye1);
2127     hITS3_3->Fill(obt,current_ye2);
2128     hITS3_4->Fill(obt,current_ye3);
2129     hITS3_5->Fill(obt,current_ye4);
2130     hITS3_6->Fill(obt,current_ye5);
2131     hITS3_7->Fill(obt,current_ye6);
2132     hITS3_8->Fill(obt,current_ye7);
2133     hITS3_9->Fill(obt,current_ye8);
2134     hITS3_10->Fill(obt,current_ye9);
2135     hITS3_11->Fill(obt,current_ye10);
2136    
2137    
2138    
2139    
2140     Double_t current_yo0_adc = pher->CALO_ENDRUN[3].CALO_HK0[0];
2141    
2142     Double_t current_yo0 = current_yo0_adc/1.7348 - 9444. ; // micron A
2143    
2144     Double_t current_yo1_adc = pher->CALO_ENDRUN[3].CALO_HK0[1];
2145    
2146     Double_t current_yo1 = current_yo1_adc/1.7348 - 9444. ; // micron A
2147    
2148     Double_t current_yo2_adc = pher->CALO_ENDRUN[3].CALO_HK0[2];
2149    
2150     Double_t current_yo2 = current_yo2_adc/1.7348 - 9444. ; // micron A
2151    
2152     Double_t current_yo3_adc = pher->CALO_ENDRUN[3].CALO_HK0[3];
2153    
2154     Double_t current_yo3 = current_yo3_adc/1.7348 - 9444. ; // micron A
2155    
2156     Double_t current_yo4_adc = pher->CALO_ENDRUN[3].CALO_HK0[4];
2157    
2158     Double_t current_yo4 = current_yo4_adc/1.7348 - 9444. ; // micron A
2159    
2160     Double_t current_yo5_adc = pher->CALO_ENDRUN[3].CALO_HK0[5];
2161    
2162     Double_t current_yo5 = current_yo5_adc/1.7348 - 9444. ; // micron A
2163    
2164     Double_t current_yo6_adc = pher->CALO_ENDRUN[3].CALO_HK0[6];
2165    
2166     Double_t current_yo6 = current_yo6_adc/1.7348 - 9444. ; // micron A
2167    
2168     Double_t current_yo7_adc = pher->CALO_ENDRUN[3].CALO_HK0[7];
2169    
2170     Double_t current_yo7 = current_yo7_adc/1.7348 - 9444. ; // micron A
2171    
2172     Double_t current_yo8_adc = pher->CALO_ENDRUN[3].CALO_HK0[8];
2173    
2174     Double_t current_yo8 = current_yo8_adc/1.7348 - 9444. ; // micron A
2175    
2176     Double_t current_yo9_adc = pher->CALO_ENDRUN[3].CALO_HK0[9];
2177    
2178     Double_t current_yo9 = current_yo9_adc/1.7348 - 9444. ; // micron A
2179    
2180     Double_t current_yo10_adc = pher->CALO_ENDRUN[3].CALO_HK0[10];
2181    
2182     Double_t current_yo10 = current_yo10_adc/1.7348 - 9444. ; // micron A
2183    
2184    
2185    
2186     hITS4_1->Fill(obt,current_yo0);
2187     hITS4_2->Fill(obt,current_yo1);
2188     hITS4_3->Fill(obt,current_yo2);
2189     hITS4_4->Fill(obt,current_yo3);
2190     hITS4_5->Fill(obt,current_yo4);
2191     hITS4_6->Fill(obt,current_yo5);
2192     hITS4_7->Fill(obt,current_yo6);
2193     hITS4_8->Fill(obt,current_yo7);
2194     hITS4_9->Fill(obt,current_yo8);
2195     hITS4_10->Fill(obt,current_yo9);
2196     hITS4_11->Fill(obt,current_yo10);
2197    
2198    
2199    
2200    
2201    
2202    
2203    
2204    
2205     // calo_hk1 : temperature and tensions
2206    
2207     // temperature - section - plane
2208    
2209    
2210    
2211    
2212     // UInt_t obt = (UInt_t)he->GetPscuHeader()->GetOrbitalTime(); // definisce l'orbital time
2213    
2214     Double_t temp_adc_xe6 = pher->CALO_ENDRUN[0].CALO_HK1[6];
2215    
2216     Double_t temp_xe6 = temp_adc_xe6/331.124 - 29.35; // [°C]
2217    
2218     Double_t temp_adc_xo1 = pher->CALO_ENDRUN[1].CALO_HK1[1];
2219    
2220     Double_t temp_xo1 = temp_adc_xo1/331.124 - 29.35; // [°C]
2221    
2222     Double_t temp_adc_xo2 = pher->CALO_ENDRUN[1].CALO_HK1[2];
2223    
2224     Double_t temp_xo2 = temp_adc_xo2/331.124 - 29.35; // [°C]
2225    
2226     Double_t temp_adc_xo4 = pher->CALO_ENDRUN[1].CALO_HK1[4];
2227    
2228     Double_t temp_xo4 = temp_adc_xo4/331.124 - 29.35; // [°C]
2229    
2230     Double_t temp_adc_ye3 = pher->CALO_ENDRUN[2].CALO_HK1[3];
2231    
2232     Double_t temp_ye3 = temp_adc_ye3/331.124 - 29.35; // [°C]
2233    
2234     Double_t temp_adc_ye4 = pher->CALO_ENDRUN[2].CALO_HK1[4];
2235    
2236     Double_t temp_ye4 = temp_adc_ye4/331.124 - 29.35; // [°C]
2237    
2238     Double_t temp_adc_ye7 = pher->CALO_ENDRUN[2].CALO_HK1[7];
2239    
2240     Double_t temp_ye7 = temp_adc_ye7/331.124 - 29.35; // [°C]
2241    
2242     Double_t temp_adc_yo5 = pher->CALO_ENDRUN[3].CALO_HK1[5];
2243    
2244     Double_t temp_yo5 = temp_adc_yo5/331.124 - 29.35; // [°C]
2245    
2246     Double_t temp_adc_yo9 = pher->CALO_ENDRUN[3].CALO_HK1[9];
2247    
2248     Double_t temp_yo9 = temp_adc_yo9/331.124 - 29.35; // [°C]
2249    
2250     Double_t temp_adc_yo10 = pher->CALO_ENDRUN[3].CALO_HK1[10];
2251    
2252     Double_t temp_yo10 = temp_adc_yo10/331.124 - 29.35; // [°C]
2253    
2254    
2255     hITS5->Fill(obt,temp_xe6);
2256    
2257     hITS6->Fill(obt,temp_xo1);
2258    
2259     hITS7->Fill(obt,temp_xo2);
2260    
2261     hITS8->Fill(obt,temp_xo4);
2262    
2263     hITS9->Fill(obt,temp_ye3);
2264    
2265     hITS10->Fill(obt,temp_ye4);
2266    
2267     hITS11->Fill(obt,temp_ye7);
2268    
2269     hITS12->Fill(obt,temp_yo5);
2270    
2271     hITS13->Fill(obt,temp_yo9);
2272    
2273     hITS14->Fill(obt,temp_yo10);
2274    
2275    
2276    
2277    
2278    
2279    
2280    
2281     // V_call - section - plane
2282    
2283    
2284    
2285     // UInt_t obt = (UInt_t)he->GetPscuHeader()->GetOrbitalTime(); // definisce l'orbital time
2286    
2287     // section xe
2288    
2289     Double_t vcall_adc_xe0 = pher->CALO_ENDRUN[0].CALO_HK1[0];
2290    
2291     Double_t vcall_xe0 = vcall_adc_xe0/4.92 - 3330; // [mV]
2292    
2293     Double_t vcall_adc_xe3 = pher->CALO_ENDRUN[0].CALO_HK1[3];
2294    
2295     Double_t vcall_xe3 = vcall_adc_xe3/4.92 - 3330; // [mV]
2296    
2297     Double_t vcall_adc_xe5 = pher->CALO_ENDRUN[0].CALO_HK1[5];
2298    
2299     Double_t vcall_xe5 = vcall_adc_xe5/4.92 - 3330; // [mV]
2300    
2301     Double_t vcall_adc_xe7 = pher->CALO_ENDRUN[0].CALO_HK1[7];
2302    
2303     Double_t vcall_xe7 = vcall_adc_xe7/4.92 - 3330; // [mV]
2304    
2305     Double_t vcall_adc_xe8 = pher->CALO_ENDRUN[0].CALO_HK1[8];
2306    
2307     Double_t vcall_xe8 = vcall_adc_xe8/4.92 - 3330; // [mV]
2308    
2309     Double_t vcall_adc_xe9 = pher->CALO_ENDRUN[0].CALO_HK1[9];
2310    
2311     Double_t vcall_xe9 = vcall_adc_xe9/4.92 - 3330; // [mV]
2312    
2313     Double_t vcall_adc_xe10 = pher->CALO_ENDRUN[0].CALO_HK1[10];
2314    
2315     Double_t vcall_xe10 = vcall_adc_xe10/4.92 - 3330; // [mV]
2316    
2317    
2318     // section xo
2319    
2320    
2321     Double_t vcall_adc_xo3 = pher->CALO_ENDRUN[1].CALO_HK1[3];
2322    
2323     Double_t vcall_xo3 = vcall_adc_xo3/4.92 - 3330; // [mV]
2324    
2325     Double_t vcall_adc_xo5 = pher->CALO_ENDRUN[1].CALO_HK1[5];
2326    
2327     Double_t vcall_xo5 = vcall_adc_xo5/4.92 - 3330; // [mV]
2328    
2329     Double_t vcall_adc_xo7 = pher->CALO_ENDRUN[1].CALO_HK1[7];
2330    
2331     Double_t vcall_xo7 = vcall_adc_xo7/4.92 - 3330; // [mV]
2332    
2333     Double_t vcall_adc_xo9 = pher->CALO_ENDRUN[1].CALO_HK1[9];
2334    
2335     Double_t vcall_xo9 = vcall_adc_xo9/4.92 - 3330; // [mV]
2336    
2337     Double_t vcall_adc_xo10 = pher->CALO_ENDRUN[1].CALO_HK1[10];
2338    
2339     Double_t vcall_xo10 = vcall_adc_xo10/4.92 - 3330; // [mV]
2340    
2341     // section ye
2342    
2343     Double_t vcall_adc_ye0 = pher->CALO_ENDRUN[2].CALO_HK1[0];
2344    
2345     Double_t vcall_ye0 = vcall_adc_ye0/4.92 - 3330; // [mV]
2346    
2347     Double_t vcall_adc_ye1 = pher->CALO_ENDRUN[2].CALO_HK1[1];
2348    
2349     Double_t vcall_ye1 = vcall_adc_ye1/4.92 - 3330; // [mV]
2350    
2351     Double_t vcall_adc_ye2 = pher->CALO_ENDRUN[2].CALO_HK1[2];
2352    
2353     Double_t vcall_ye2 = vcall_adc_ye2/4.92 - 3330; // [mV]
2354    
2355     Double_t vcall_adc_ye6 = pher->CALO_ENDRUN[2].CALO_HK1[6];
2356    
2357     Double_t vcall_ye6 = vcall_adc_ye6/4.92 - 3330; // [mV]
2358    
2359     Double_t vcall_adc_ye8 = pher->CALO_ENDRUN[2].CALO_HK1[8];
2360    
2361     Double_t vcall_ye8 = vcall_adc_ye8/4.92 - 3330; // [mV]
2362    
2363     // section yo
2364    
2365     Double_t vcall_adc_yo1 = pher->CALO_ENDRUN[3].CALO_HK1[1];
2366    
2367     Double_t vcall_yo1 = vcall_adc_yo1/4.92 - 3330; // [mV]
2368    
2369     Double_t vcall_adc_yo2 = pher->CALO_ENDRUN[3].CALO_HK1[2];
2370    
2371     Double_t vcall_yo2 = vcall_adc_yo2/4.92 - 3330; // [mV]
2372    
2373     Double_t vcall_adc_yo4 = pher->CALO_ENDRUN[3].CALO_HK1[4];
2374    
2375     Double_t vcall_yo4 = vcall_adc_yo4/4.92 - 3330; // [mV]
2376    
2377     Double_t vcall_adc_yo6 = pher->CALO_ENDRUN[3].CALO_HK1[6];
2378    
2379     Double_t vcall_yo6 = vcall_adc_yo6/4.92 - 3330; // [mV]
2380    
2381     Double_t vcall_adc_yo8 = pher->CALO_ENDRUN[3].CALO_HK1[8];
2382    
2383     Double_t vcall_yo8 = vcall_adc_yo8/4.92 - 3330; // [mV]
2384    
2385    
2386    
2387    
2388     hITS15->Fill(obt,vcall_xe0);
2389    
2390     hITS16->Fill(obt,vcall_xe3);
2391    
2392     hITS17->Fill(obt,vcall_xe5);
2393    
2394     hITS18->Fill(obt,vcall_xe7);
2395    
2396     hITS19->Fill(obt,vcall_xe8);
2397    
2398     hITS20->Fill(obt,vcall_xe9);
2399    
2400     hITS21->Fill(obt,vcall_xe10);
2401    
2402    
2403     hITS22->Fill(obt,vcall_xo3);
2404    
2405     hITS23->Fill(obt,vcall_xo5);
2406    
2407     hITS24->Fill(obt,vcall_xo7);
2408    
2409     hITS25->Fill(obt,vcall_xo9);
2410    
2411     hITS26->Fill(obt,vcall_xo10);
2412    
2413    
2414     hITS27->Fill(obt,vcall_ye0);
2415    
2416     hITS28->Fill(obt,vcall_ye1);
2417    
2418     hITS29->Fill(obt,vcall_ye2);
2419    
2420     hITS30->Fill(obt,vcall_ye6);
2421    
2422     hITS31->Fill(obt,vcall_ye8);
2423    
2424    
2425     hITS32->Fill(obt,vcall_yo1);
2426    
2427     hITS33->Fill(obt,vcall_yo2);
2428    
2429     hITS34->Fill(obt,vcall_yo4);
2430    
2431     hITS35->Fill(obt,vcall_yo6);
2432    
2433     hITS36->Fill(obt,vcall_yo8);
2434    
2435    
2436    
2437    
2438    
2439    
2440     // V_SS - section - plane
2441    
2442    
2443    
2444     // UInt_t obt = (UInt_t)he->GetPscuHeader()->GetOrbitalTime(); // definisce l'orbital time
2445    
2446     // section xe
2447    
2448     Double_t vss_adc_xe4 = pher->CALO_ENDRUN[0].CALO_HK1[4];
2449    
2450     Double_t vss_xe4 = vss_adc_xe4/2.46 - 6660.; // [mV]
2451    
2452    
2453    
2454     // section xo
2455    
2456     Double_t vss_adc_xo0 = pher->CALO_ENDRUN[1].CALO_HK1[0];
2457    
2458     Double_t vss_xo0 = vss_adc_xo0/2.46 - 6660.; // [mV]
2459    
2460     Double_t vss_adc_xo6 = pher->CALO_ENDRUN[1].CALO_HK1[6];
2461    
2462     Double_t vss_xo6 = vss_adc_xo6/2.46 - 6660.; // [mV]
2463    
2464    
2465     // section ye
2466    
2467     Double_t vss_adc_ye9 = pher->CALO_ENDRUN[2].CALO_HK1[9];
2468    
2469     Double_t vss_ye9 = vss_adc_ye9/2.46 - 6660.; // [mV]
2470    
2471     Double_t vss_adc_ye10 = pher->CALO_ENDRUN[2].CALO_HK1[10];
2472    
2473     Double_t vss_ye10 = vss_adc_ye10/2.46 - 6660.; // [mV]
2474    
2475     // section yo
2476    
2477     Double_t vss_adc_yo7 = pher->CALO_ENDRUN[3].CALO_HK1[7];
2478    
2479     Double_t vss_yo7 = vss_adc_yo7/2.46 - 6660.; // [mV]
2480    
2481    
2482    
2483    
2484    
2485    
2486     hITS37->Fill(obt,vss_xe4);
2487    
2488     hITS38->Fill(obt,vss_xo0);
2489    
2490     hITS39->Fill(obt,vss_xo6);
2491    
2492     hITS40->Fill(obt,vss_ye9);
2493    
2494     hITS41->Fill(obt,vss_ye10);
2495    
2496     hITS42->Fill(obt,vss_yo7);
2497    
2498    
2499    
2500    
2501    
2502    
2503    
2504    
2505     // V_DD - section - plane
2506    
2507    
2508    
2509     // UInt_t obt = (UInt_t)he->GetPscuHeader()->GetOrbitalTime(); // definisce l'orbital time
2510    
2511     // section xe
2512    
2513     Double_t vdd_adc_xe1 = pher->CALO_ENDRUN[0].CALO_HK1[1];
2514    
2515     Double_t vdd_xe1 = vdd_adc_xe1/2.46 - 6660.; // [mV]
2516    
2517     Double_t vdd_adc_xe2 = pher->CALO_ENDRUN[0].CALO_HK1[2];
2518    
2519     Double_t vdd_xe2 = vdd_adc_xe2/2.46 - 6660.; // [mV]
2520    
2521    
2522    
2523     // section xo
2524    
2525     Double_t vdd_adc_xo8 = pher->CALO_ENDRUN[1].CALO_HK1[8];
2526    
2527     Double_t vdd_xo8 = vdd_adc_xo8/2.46 - 6660.; // [mV]
2528    
2529    
2530    
2531     // section ye
2532    
2533     Double_t vdd_adc_ye5 = pher->CALO_ENDRUN[2].CALO_HK1[5];
2534    
2535     Double_t vdd_ye5 = vdd_adc_ye5/2.46 - 6660.; // [mV]
2536    
2537    
2538    
2539     // section yo
2540    
2541     Double_t vdd_adc_yo0 = pher->CALO_ENDRUN[3].CALO_HK1[0];
2542    
2543     Double_t vdd_yo0 = vdd_adc_yo0/2.46 - 6660.; // [mV]
2544    
2545     Double_t vdd_adc_yo3 = pher->CALO_ENDRUN[3].CALO_HK1[3];
2546    
2547     Double_t vdd_yo3 = vdd_adc_yo3/2.46 - 6660.; // [mV]
2548    
2549    
2550    
2551    
2552    
2553    
2554     hITS43->Fill(obt,vdd_xe1);
2555    
2556     hITS44->Fill(obt,vdd_xe2);
2557    
2558     hITS45->Fill(obt,vdd_xo8);
2559    
2560     hITS46->Fill(obt,vdd_ye5);
2561    
2562     hITS47->Fill(obt,vdd_yo0);
2563    
2564     hITS48->Fill(obt,vdd_yo3);
2565    
2566    
2567    
2568     }
2569    
2570    
2571     // output figures, first sheet
2572    
2573     TCanvas *fig1 = new TCanvas("fig1","Calorimeter Quicklook Current",1100, 900) ; //finestra grafica che posso suddividere in piu' aree (pads)
2574    
2575    
2576     fig1->Range(0,0,100,100);
2577    
2578     TPad * pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.49,0.98);
2579     TPad * pd2 = new TPad("pd2","This is pad2",0.51,0.51,0.98,0.98);
2580     TPad * pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.49,0.49);
2581     TPad * pd4 = new TPad("pd4","This is pad4",0.51,0.02,0.98,0.49);
2582     fig1->cd();
2583     pd1->Range(0,0,100,100);
2584     pd2->Range(0,0,100,100);
2585     pd3->Range(0,0,100,100);
2586     pd4->Range(0,0,100,100);
2587     pd1->SetTicks();
2588     pd2->SetTicks();
2589     pd3->SetTicks();
2590     pd4->SetTicks();
2591     pd1->Draw();
2592     pd2->Draw();
2593     pd3->Draw();
2594     pd4->Draw();
2595    
2596     // first pad
2597    
2598     pd1->cd();
2599    
2600    
2601     hITS1_1->Draw();
2602     hITS1_2->Draw("same");
2603     hITS1_3->Draw("same");
2604     hITS1_4->Draw("same");
2605     hITS1_5->Draw("same");
2606     hITS1_6->Draw("same");
2607     hITS1_7->Draw("same");
2608     hITS1_8->Draw("same");
2609     hITS1_9->Draw("same");
2610     hITS1_10->Draw("same");
2611     hITS1_11->Draw("same");
2612    
2613    
2614     // legenda
2615    
2616     TLegend *leg1_1 = new TLegend(0.65,0.25,0.80,0.80);
2617     leg1_1->SetHeader("Sections and planes");
2618     leg1_1->SetBorderSize(0);
2619     leg1_1->SetTextAlign(12);
2620     leg1_1->AddEntry( hITS1_1,"xe 1 plane","p");
2621     leg1_1->AddEntry( hITS1_2,"xe 2 plane","p");
2622     leg1_1->AddEntry( hITS1_3,"xe 3 plane","p");
2623     leg1_1->AddEntry( hITS1_4,"xe 4 plane","p");
2624     leg1_1->AddEntry( hITS1_5,"xe 5 plane","p");
2625     leg1_1->AddEntry( hITS1_6,"xe 6 plane","p");
2626     leg1_1->AddEntry( hITS1_7,"xe 7 plane","p");
2627     leg1_1->AddEntry( hITS1_8,"xe 8 plane","p");
2628     leg1_1->AddEntry( hITS1_9,"xe 9 plane","p");
2629     leg1_1->AddEntry( hITS1_10,"xe 10 plane","p");
2630     leg1_1->AddEntry( hITS1_11,"xe 11 plane","p");
2631     leg1_1->SetTextSize(0.04);
2632     leg1_1->Draw();
2633    
2634     // second pad
2635    
2636     pd2->cd();
2637     hITS2_1->Draw();
2638     hITS2_2->Draw("same");
2639     hITS2_3->Draw("same");
2640     hITS2_4->Draw("same");
2641     hITS2_5->Draw("same");
2642     hITS2_6->Draw("same");
2643     hITS2_7->Draw("same");
2644     hITS2_8->Draw("same");
2645     hITS2_9->Draw("same");
2646     hITS2_10->Draw("same");
2647     hITS2_11->Draw("same");
2648    
2649    
2650     // legenda
2651    
2652     TLegend *leg1_2 = new TLegend(0.65,0.25,0.80,0.80);
2653     leg1_2->SetHeader("Sections and planes");
2654     leg1_2->SetBorderSize(0);
2655     leg1_2->SetTextAlign(12);
2656     leg1_2->AddEntry( hITS2_1,"xo 1 plane","p");
2657     leg1_2->AddEntry( hITS2_2,"xo 2 plane","p");
2658     leg1_2->AddEntry( hITS2_3,"xo 3 plane","p");
2659     leg1_2->AddEntry( hITS2_4,"xo 4 plane","p");
2660     leg1_2->AddEntry( hITS2_5,"xo 5 plane","p");
2661     leg1_2->AddEntry( hITS2_6,"xo 6 plane","p");
2662     leg1_2->AddEntry( hITS2_7,"xo 7 plane","p");
2663     leg1_2->AddEntry( hITS2_8,"xo 8 plane","p");
2664     leg1_2->AddEntry( hITS2_9,"xo 9 plane","p");
2665     leg1_2->AddEntry( hITS2_10,"xo 10 plane","p");
2666     leg1_2->AddEntry( hITS2_11,"xo 11 plane","p");
2667     leg1_2->SetTextSize(0.04);
2668     leg1_2->Draw();
2669    
2670     // third pad
2671    
2672     pd3->cd();
2673     hITS3_1->Draw();
2674     hITS3_2->Draw("same");
2675     hITS3_3->Draw("same");
2676     hITS3_4->Draw("same");
2677     hITS3_5->Draw("same");
2678     hITS3_6->Draw("same");
2679     hITS3_7->Draw("same");
2680     hITS3_8->Draw("same");
2681     hITS3_9->Draw("same");
2682     hITS3_10->Draw("same");
2683     hITS3_11->Draw("same");
2684    
2685    
2686     // legenda
2687    
2688     TLegend *leg1_3 = new TLegend(0.65,0.25,0.80,0.80);
2689     leg1_3->SetHeader("Sections and planes");
2690     leg1_3->SetBorderSize(0);
2691     leg1_3->SetTextAlign(12);
2692     leg1_3->AddEntry( hITS3_1,"ye 1 plane","p");
2693     leg1_3->AddEntry( hITS3_2,"ye 2 plane","p");
2694     leg1_3->AddEntry( hITS3_3,"ye 3 plane","p");
2695     leg1_3->AddEntry( hITS3_4,"ye 4 plane","p");
2696     leg1_3->AddEntry( hITS3_5,"ye 5 plane","p");
2697     leg1_3->AddEntry( hITS3_6,"ye 6 plane","p");
2698     leg1_3->AddEntry( hITS3_7,"ye 7 plane","p");
2699     leg1_3->AddEntry( hITS3_8,"ye 8 plane","p");
2700     leg1_3->AddEntry( hITS3_9,"ye 9 plane","p");
2701     leg1_3->AddEntry( hITS3_10,"ye 10 plane","p");
2702     leg1_3->AddEntry( hITS3_11,"ye 11 plane","p");
2703     leg1_3->SetTextSize(0.04);
2704     leg1_3->Draw();
2705    
2706     // fourth pad
2707    
2708     pd4->cd();
2709     hITS4_1->Draw();
2710     hITS4_2->Draw("same");
2711     hITS4_3->Draw("same");
2712     hITS4_4->Draw("same");
2713     hITS4_5->Draw("same");
2714     hITS4_6->Draw("same");
2715     hITS4_7->Draw("same");
2716     hITS4_8->Draw("same");
2717     hITS4_9->Draw("same");
2718     hITS4_10->Draw("same");
2719     hITS4_11->Draw("same");
2720    
2721    
2722     // legenda
2723    
2724     TLegend *leg1_4 = new TLegend(0.65,0.25,0.80,0.80);
2725     leg1_4->SetHeader("Sections and planes");
2726     leg1_4->SetBorderSize(0);
2727     leg1_4->SetTextAlign(12);
2728     leg1_4->AddEntry( hITS4_1,"yo 1 plane","p");
2729     leg1_4->AddEntry( hITS4_2,"yo 2 plane","p");
2730     leg1_4->AddEntry( hITS4_3,"yo 3 plane","p");
2731     leg1_4->AddEntry( hITS4_4,"yo 4 plane","p");
2732     leg1_4->AddEntry( hITS4_5,"yo 5 plane","p");
2733     leg1_4->AddEntry( hITS4_6,"yo 6 plane","p");
2734     leg1_4->AddEntry( hITS4_7,"yo 7 plane","p");
2735     leg1_4->AddEntry( hITS4_8,"yo 8 plane","p");
2736     leg1_4->AddEntry( hITS4_9,"yo 9 plane","p");
2737     leg1_4->AddEntry( hITS4_10,"yo 10 plane","p");
2738     leg1_4->AddEntry( hITS4_11,"yo 11 plane","p");
2739     leg1_4->SetTextSize(0.04);
2740     leg1_4->Draw();
2741    
2742    
2743     // output figures , second sheet
2744    
2745    
2746     TCanvas *fig2 = new TCanvas("fig2","Calorimeter Quicklook Temperature and Voltage",1100,900) ; //finestra grafica che posso suddividere in piu' aree (pads)
2747    
2748    
2749     fig2->Range(0,0,100,100);
2750    
2751     TPad *pad1 = new TPad("pad1","This is pad1",0.02,0.51,0.49,0.98);
2752     TPad * pad2 = new TPad("pad2","This is pad2",0.51,0.51,0.98,0.98);
2753     TPad * pad3 = new TPad("pad3","This is pad3",0.02,0.02,0.49,0.49);
2754     TPad * pad4 = new TPad("pad4","This is pad4",0.51,0.02,0.98,0.49);
2755     fig2->cd();
2756     pad1->Range(0,0,100,100);
2757     pad2->Range(0,0,100,100);
2758     pad3->Range(0,0,100,100);
2759     pad4->Range(0,0,100,100);
2760     pad1->SetTicks();
2761     pad2->SetTicks();
2762     pad3->SetTicks();
2763     pad4->SetTicks();
2764     pad1->Draw();
2765     pad2->Draw();
2766     pad3->Draw();
2767     pad4->Draw();
2768    
2769     pad1->cd();
2770    
2771     hITS5->Draw();
2772     hITS6->Draw("same");
2773     hITS7->Draw("same");
2774     hITS8->Draw("same");
2775     hITS9->Draw("same");
2776     hITS10->Draw("same");
2777     hITS11->Draw("same");
2778     hITS12->Draw("same");
2779     hITS13->Draw("same");
2780     hITS14->Draw("same");
2781    
2782    
2783     // legenda
2784    
2785     TLegend *leg = new TLegend(0.65,0.25,0.80,0.80);
2786     leg->SetHeader("Sections and planes");
2787     leg->SetBorderSize(0);
2788     leg->SetTextAlign(12);
2789     leg->AddEntry( hITS5,"xe 5 plane","p");
2790     leg->AddEntry(hITS6,"xo 2 plane","p");
2791     leg->AddEntry(hITS7,"xo 3 plane","p");
2792     leg->AddEntry(hITS8,"xo 5 plane","p");
2793     leg->AddEntry(hITS9,"ye 4 plane","p");
2794     leg->AddEntry(hITS10,"ye 5 plane","p");
2795     leg->AddEntry(hITS11,"ye 8 plane","p");
2796     leg->AddEntry(hITS12,"yo 6 plane","p");
2797     leg->AddEntry(hITS13,"yo 10 plane","p");
2798     leg->AddEntry(hITS14,"yo 11 plane","p");
2799     leg->SetTextSize(0.04);
2800     leg->Draw();
2801    
2802    
2803     // pad 2
2804    
2805     pad2->cd();
2806     hITS15->Draw();
2807     hITS16->Draw("same");
2808     hITS17->Draw("same");
2809     hITS18->Draw("same");
2810     hITS19->Draw("same");
2811     hITS20->Draw("same");
2812     hITS21->Draw("same");
2813     hITS22->Draw("same");
2814     hITS23->Draw("same");
2815     hITS24->Draw("same");
2816     hITS25->Draw("same");
2817     hITS26->Draw("same");
2818     hITS27->Draw("same");
2819     hITS28->Draw("same");
2820     hITS29->Draw("same");
2821     hITS30->Draw("same");
2822     hITS31->Draw("same");
2823     hITS32->Draw("same");
2824     hITS33->Draw("same");
2825     hITS34->Draw("same");
2826     hITS35->Draw("same");
2827     hITS36->Draw("same");
2828    
2829     // legenda
2830    
2831     TLegend *leg2 = new TLegend(0.65,0.25,0.80,0.80);
2832     leg2->SetHeader("Sections and planes");
2833     leg2->SetBorderSize(0);
2834     leg2->SetTextAlign(12);
2835     leg2->AddEntry(hITS15,"xe 1 plane","p");
2836     leg2->AddEntry(hITS16,"xe 4 plane","p");
2837     leg2->AddEntry(hITS17,"xe 6 plane","p");
2838     leg2->AddEntry(hITS18,"xe 8 plane","p");
2839     leg2->AddEntry(hITS19,"xe 9 plane","p");
2840     leg2->AddEntry(hITS20,"xe 10 plane","p");
2841     leg2->AddEntry(hITS21,"xe 11 plane","p");
2842     leg2->AddEntry(hITS22,"xo 4 plane","p");
2843     leg2->AddEntry(hITS23,"xo 6 plane","p");
2844     leg2->AddEntry(hITS24,"xo 8 plane","p");
2845     leg2->AddEntry(hITS25,"xo 10 plane","p");
2846     leg2->AddEntry(hITS26,"xo 11 plane","p");
2847     leg2->AddEntry(hITS27,"ye 1 plane","p");
2848     leg2->AddEntry(hITS28,"ye 2 plane","p");
2849     leg2->AddEntry(hITS29,"ye 3 plane","p");
2850     leg2->AddEntry(hITS30,"ye 7 plane","p");
2851     leg2->AddEntry(hITS31,"ye 9 plane","p");
2852     leg2->AddEntry(hITS32,"yo 2 plane","p");
2853     leg2->AddEntry(hITS33,"yo 3 plane","p");
2854     leg2->AddEntry(hITS34,"yo 5 plane","p");
2855     leg2->AddEntry(hITS35,"yo 7 plane","p");
2856     leg2->AddEntry(hITS36,"yo 9 plane","p");
2857     leg2->SetTextSize(0.02);
2858     leg2->Draw();
2859    
2860    
2861    
2862     // pad 3
2863    
2864     pad3->cd();
2865     hITS37->Draw();
2866     hITS38->Draw("same");
2867     hITS39->Draw("same");
2868     hITS40->Draw("same");
2869     hITS41->Draw("same");
2870     hITS42->Draw("same");
2871    
2872    
2873     TLegend *leg3 = new TLegend(0.65,0.25,0.80,0.80);
2874     leg3->SetHeader("Sections and planes");
2875     leg3->SetBorderSize(0);
2876     leg3->SetTextAlign(12);
2877     leg3->AddEntry( hITS37,"xe 5 plane","p");
2878     leg3->AddEntry(hITS38,"xo 1 plane","p");
2879     leg3->AddEntry(hITS39,"xo 7 plane","p");
2880     leg3->AddEntry(hITS40,"ye 10 plane","p");
2881     leg3->AddEntry(hITS41,"ye 11 plane","p");
2882     leg3->AddEntry(hITS42,"yo 8 plane","p");
2883     leg3->SetTextSize(0.04);
2884     leg3->Draw();
2885    
2886    
2887     // pad 4
2888    
2889     pad4->cd();
2890     hITS43->Draw();
2891     hITS44->Draw("same");
2892     hITS45->Draw("same");
2893     hITS46->Draw("same");
2894     hITS47->Draw("same");
2895     hITS48->Draw("same");
2896    
2897    
2898     TLegend *leg4 = new TLegend(0.65,0.25,0.80,0.80);
2899     leg4->SetHeader("Sections and planes");
2900     leg4->SetBorderSize(0);
2901     leg4->SetTextAlign(12);
2902     leg4->AddEntry( hITS43,"xe 2 plane","p");
2903     leg4->AddEntry(hITS44,"xe 3 plane","p");
2904     leg4->AddEntry(hITS45,"xo 9 plane","p");
2905     leg4->AddEntry(hITS46,"ye 6 plane","p");
2906     leg4->AddEntry(hITS47,"yo 1 plane","p");
2907     leg4->AddEntry(hITS48,"yo 4 plane","p");
2908     leg4->SetTextSize(0.04);
2909     leg4->Draw();
2910    
2911    
2912    
2913    
2914    
2915    
2916     const string fil = gSystem->BaseName(filename.Data());
2917     Int_t posiz = fil.find(".root");
2918     //
2919     TString file2;
2920     if ( posiz == -1 ){
2921     file2 = gSystem->BaseName(filename.Data());
2922     } else {
2923     Int_t posiz2 = 0;
2924     stringcopy(file2,gSystem->BaseName(filename.Data()),posiz2,posiz);
2925     };
2926     const char *figrec = file2;
2927     //
2928     const char *outdir = outDir;
2929     stringstream figsave1;
2930     stringstream figsave2;
2931     const char *format = saveas;
2932    
2933    
2934     figsave1 << outdir << "/" ;
2935     figsave1 << figrec << "_CaloHK1.";
2936     figsave1 << format;
2937     fig1->SaveAs(figsave1.str().c_str());
2938     figsave2.str("");
2939     figsave2 << outdir << "/" ;
2940     figsave2 << figrec << "_CaloHK2.";
2941     figsave2 << format;
2942     fig2->SaveAs(figsave2.str().c_str());
2943    
2944    
2945    
2946     if ( iactive && w4i ){
2947     while ( gROOT->GetListOfCanvases()->FindObject(fig1) || gROOT->GetListOfCanvases()->FindObject(fig2) ){
2948     gSystem->ProcessEvents();
2949     gSystem->Sleep(10);
2950     };
2951     };
2952    
2953    
2954     }
2955    
2956    
2957    
2958    
2959    
2960    
2961    
2962    
2963    
2964    
2965    
2966    
2967    
2968    
2969    
2970    
2971    
2972    
2973    
2974    
2975    
2976    
2977    
2978    
2979    
2980    
2981    
2982    
2983    
2984    
2985    
2986    
2987    
2988    
2989    
2990    
2991    

  ViewVC Help
Powered by ViewVC 1.1.23