/[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.5 - (hide annotations) (download)
Sun Sep 27 19:06:23 2009 UTC (15 years, 6 months ago) by mocchiut
Branch: MAIN
CVS Tags: v1r03
Changes since 1.4: +4 -4 lines
Range of current figures extended

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

  ViewVC Help
Powered by ViewVC 1.1.23