46 |
#include <TEllipse.h> |
#include <TEllipse.h> |
47 |
#include <TArrow.h> |
#include <TArrow.h> |
48 |
#include <TStyle.h> |
#include <TStyle.h> |
49 |
|
#include <TStreamerElement.h> |
50 |
|
#include <TRealData.h> |
51 |
// |
// |
52 |
#include <PamelaRun.h> |
#include <PamelaRun.h> |
53 |
#include <physics/calorimeter/CalorimeterEvent.h> |
#include <physics/calorimeter/CalorimeterEvent.h> |
69 |
#include <FEVdetector.h> |
#include <FEVdetector.h> |
70 |
#include <FEventViewer.h> |
#include <FEventViewer.h> |
71 |
#include <feventvstruct.h> |
#include <feventvstruct.h> |
72 |
|
#include <color.h> |
73 |
// |
// |
74 |
extern Bool_t existfile(TString); |
extern Bool_t existfile(TString); |
75 |
|
extern Bool_t NODB; |
76 |
// |
// |
77 |
|
|
78 |
using namespace std; |
using namespace std; |
84 |
thefigure = &figure; |
thefigure = &figure; |
85 |
checkctrlword(); |
checkctrlword(); |
86 |
var.selex = false; |
var.selex = false; |
87 |
|
var.showall = false; |
88 |
|
|
89 |
|
var.showsi = false; |
90 |
|
var.shownd = false; |
91 |
|
var.shows4 = false; |
92 |
|
var.showorb = false; |
93 |
|
var.showtof = false; |
94 |
|
var.showtrg = false; |
95 |
|
var.showtrk = false; |
96 |
|
var.showcal = false; |
97 |
|
var.showrun = false; |
98 |
|
var.showac = false; |
99 |
|
} |
100 |
|
|
101 |
|
void FEVdetector::Reset(){ |
102 |
|
L2 = NULL; |
103 |
} |
} |
104 |
|
|
105 |
void FEVdetector::checkctrlword(){ |
void FEVdetector::checkctrlword(){ |
108 |
var.AC = 0; |
var.AC = 0; |
109 |
var.RUN = 1; |
var.RUN = 1; |
110 |
var.TRK = 0; |
var.TRK = 0; |
111 |
|
var.ORB = 1; |
112 |
|
var.TRG = 1; |
113 |
var.CALO = 0; |
var.CALO = 0; |
114 |
|
var.CALOT = 0; |
115 |
var.S4 = 0; |
var.S4 = 0; |
116 |
var.ND = 0; |
var.ND = 0; |
117 |
var.INFOS = 0; |
var.INFOS = 0; |
151 |
}; |
}; |
152 |
|
|
153 |
void FEVdetector::GetWindow(){ |
void FEVdetector::GetWindow(){ |
154 |
otr->GetEntry(maxevent); |
// |
155 |
|
if ( level.file == 2 ){ |
156 |
|
// printf("0qui\n"); |
157 |
|
L2->GetEntry(minevent); |
158 |
|
} else { |
159 |
|
otr->GetEntry(minevent); |
160 |
|
} |
161 |
if ( level.file < 2 ){ |
if ( level.file < 2 ){ |
162 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
163 |
lastevno = (int)ph->Counter; |
firstevno = (int)ph->Counter; |
164 |
} else { |
} else { |
165 |
lastevno = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! |
if ( var.ORB ){ |
166 |
|
firstevno = L2->GetOrbitalInfo()->pkt_num; |
167 |
|
} else { |
168 |
|
firstevno = 0; |
169 |
|
}; |
170 |
}; |
}; |
171 |
otr->GetEntry(minevent); |
// |
172 |
|
if ( level.file == 2 ){ |
173 |
|
// printf("1qui\n"); |
174 |
|
L2->GetEntry(maxevent); |
175 |
|
} else { |
176 |
|
otr->GetEntry(maxevent); |
177 |
|
} |
178 |
|
// |
179 |
if ( level.file < 2 ){ |
if ( level.file < 2 ){ |
180 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
181 |
firstevno = (int)ph->Counter; |
lastevno = (int)ph->Counter; |
182 |
} else { |
} else { |
183 |
firstevno = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! |
if ( var.ORB ){ |
184 |
|
lastevno = L2->GetOrbitalInfo()->pkt_num; |
185 |
|
} else { |
186 |
|
lastevno = 0; |
187 |
|
}; |
188 |
}; |
}; |
189 |
|
// |
190 |
} |
} |
191 |
|
|
192 |
void FEVdetector::ClearVariables(){ |
void FEVdetector::ClearVariables(){ |
209 |
} |
} |
210 |
|
|
211 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
212 |
thisentry = i; |
thisentry = i; |
213 |
otr->GetEntry(i); |
if ( level.file == 2 ){ |
214 |
// PrintData(otr,-1LL,44); |
// L2->Clear(); |
215 |
|
// printf("qui\n"); |
216 |
|
L2->GetEntry(i); |
217 |
|
if ( var.showall ){ |
218 |
|
ShowInfo("RunInfo"); |
219 |
|
ShowInfo("SoftInfo"); |
220 |
|
ShowInfo("OrbitalInfo"); |
221 |
|
ShowInfo("TrigLevel2"); |
222 |
|
ShowInfo("ToFLevel2"); |
223 |
|
ShowInfo("TrkLevel2"); |
224 |
|
ShowInfo("AcLevel2"); |
225 |
|
ShowInfo("CaloLevel2"); |
226 |
|
ShowInfo("CaloLevel1"); |
227 |
|
ShowInfo("S4Level2"); |
228 |
|
ShowInfo("NDLevel2"); |
229 |
|
} else { |
230 |
|
if ( var.showrun ) ShowInfo("RunInfo"); |
231 |
|
if ( var.showsi ) ShowInfo("SoftInfo"); |
232 |
|
if ( var.showorb ) ShowInfo("OrbitalInfo"); |
233 |
|
if ( var.showtrg ) ShowInfo("TrigLevel2"); |
234 |
|
if ( var.showtof ) ShowInfo("ToFLevel2"); |
235 |
|
if ( var.showtrk ) ShowInfo("TrkLevel2"); |
236 |
|
if ( var.showac ) ShowInfo("AcLevel2"); |
237 |
|
if ( var.showcal ) ShowInfo("CaloLevel2"); |
238 |
|
if ( var.showcal ) ShowInfo("CaloLevel1"); |
239 |
|
if ( var.shows4 ) ShowInfo("S4Level2"); |
240 |
|
if ( var.shownd ) ShowInfo("NDLevel2"); |
241 |
|
}; |
242 |
|
} else { |
243 |
|
otr->GetEntry(i); |
244 |
|
if ( var.showall ){ |
245 |
|
ShowInfo("Pscu"); |
246 |
|
ShowInfo("Trigger"); |
247 |
|
ShowInfo("Tof"); |
248 |
|
ShowInfo("Tracker"); |
249 |
|
ShowInfo("Anticounter"); |
250 |
|
ShowInfo("Calorimeter"); |
251 |
|
ShowInfo("S4"); |
252 |
|
ShowInfo("Neutron"); |
253 |
|
} else { |
254 |
|
if ( var.showorb ) ShowInfo("Pscu"); |
255 |
|
if ( var.showtrg ) ShowInfo("Trigger"); |
256 |
|
if ( var.showtof ) ShowInfo("Tof"); |
257 |
|
if ( var.showtrk ) ShowInfo("Tracker"); |
258 |
|
if ( var.showac ) ShowInfo("Anticounter"); |
259 |
|
if ( var.showcal ) ShowInfo("Calorimeter"); |
260 |
|
if ( var.shows4 ) ShowInfo("S4"); |
261 |
|
if ( var.shownd ) ShowInfo("Neutron"); |
262 |
|
}; |
263 |
|
}; |
264 |
} |
} |
265 |
|
|
266 |
void FEVdetector::SetEntry(Int_t i){ |
void FEVdetector::SetEntry(Int_t i){ |
381 |
}; |
}; |
382 |
} |
} |
383 |
|
|
384 |
void FEVdetector::PrintLeaves(TTree *otr, Int_t i, TBranchElement *tb, Int_t lenmax){ |
void FEVdetector::ShowInfo(TString detector){ |
385 |
// -- Prints values of leaves. |
// |
386 |
|
TBranch *b1 = 0; |
387 |
// tb->ValidateAddress(); |
// TBranch *b3 = 0; |
388 |
printf("son qua \n"); |
TObjArray *branch_array = 0; |
389 |
|
// TObjArray *leaf_array = 0; |
390 |
|
// |
391 |
|
if ( !strcmp(detector.Data(),"RunInfo") || !strcmp(detector.Data(),"SoftInfo") ){ |
392 |
|
if ( L2->GetRunTree() ) b1 = L2->GetRunTree()->FindBranch(detector.Data()); |
393 |
|
} else { |
394 |
|
b1 = otr->FindBranch(detector.Data()); |
395 |
|
}; |
396 |
|
// |
397 |
|
if ( !b1 ) return; |
398 |
|
// |
399 |
|
Int_t dlen = 10; |
400 |
|
// |
401 |
|
char o[200000]; |
402 |
|
char zz[200000]; |
403 |
|
char col[13]; |
404 |
|
char col2[13]; |
405 |
|
// |
406 |
|
setcolor(col,RESET, GREEN, WHITE); |
407 |
|
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
408 |
|
sprintf(zz,"======> EVENT:%i\n", thisentry); |
409 |
|
// |
410 |
|
setcolor(col,RESET, RED, WHITE); |
411 |
|
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
412 |
|
sprintf(zz,"%sBranch %s\n",zz,b1->GetName()); |
413 |
|
setcolor(col,RESET, BLACK, WHITE); |
414 |
|
sprintf(o,"%s%s",o,col); |
415 |
|
// |
416 |
|
branch_array = b1->GetListOfBranches(); |
417 |
|
// |
418 |
|
Int_t j = 0; |
419 |
|
// |
420 |
|
for(Int_t l=0;l<(branch_array->GetLast()+1);l++){ |
421 |
|
// |
422 |
|
TBranchElement *tb = (TBranchElement*)branch_array->At(l); |
423 |
|
Int_t type = tb->GetType(); |
424 |
|
Int_t atype = tb->GetStreamerType() - 20; |
425 |
|
Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
426 |
|
Int_t length = min(len,dlen); |
427 |
|
// |
428 |
|
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
429 |
|
switch (type){ |
430 |
|
case 0: |
431 |
|
// |
432 |
|
// IS A VARIABLE |
433 |
|
// |
434 |
|
// |
435 |
|
// NAME |
436 |
|
// |
437 |
|
setcolor(col,RESET, BLUE, WHITE); |
438 |
|
setcolor(col2,RESET, BLACK, WHITE); |
439 |
|
sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2); |
440 |
|
sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName()); |
441 |
|
// |
442 |
|
j = 0; |
443 |
|
// |
444 |
|
// VALUES |
445 |
|
// |
446 |
|
// |
447 |
|
// Integer |
448 |
|
// |
449 |
|
if ( atype == 3 || atype == -17 ){ |
450 |
|
while ( j < length ){ |
451 |
|
if ( j < length -1 ){ |
452 |
|
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
453 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0)); |
454 |
|
} else { |
455 |
|
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
456 |
|
sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0)); |
457 |
|
}; |
458 |
|
j++; |
459 |
|
}; |
460 |
|
}; |
461 |
|
// |
462 |
|
// Unsigned integer |
463 |
|
// |
464 |
|
if ( atype == -7 || atype == 13 || atype == -9 || atype == -8 || atype == 12 ){ |
465 |
|
while ( j < length ){ |
466 |
|
if ( j < length -1 ){ |
467 |
|
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
468 |
|
sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0)); |
469 |
|
} else { |
470 |
|
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
471 |
|
sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0)); |
472 |
|
}; |
473 |
|
j++; |
474 |
|
}; |
475 |
|
}; |
476 |
|
// |
477 |
|
// Float |
478 |
|
// |
479 |
|
if ( atype == -15 || atype == 5 ){ |
480 |
|
while ( j < length ){ |
481 |
|
if ( j < length -1 ){ |
482 |
|
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
483 |
|
sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0)); |
484 |
|
} else { |
485 |
|
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
486 |
|
sprintf(zz,"%s %f",zz,tb->GetValue(j,0)); |
487 |
|
}; |
488 |
|
j++; |
489 |
|
}; |
490 |
|
}; |
491 |
|
// |
492 |
|
// Strings |
493 |
|
// |
494 |
|
if ( atype == 45 ){ |
495 |
|
// TObjArray *cl = (TObjArray*)(tb->GetInfo()->GetOffsets())[tb->GetID()];//tb->GetValuePointer(); |
496 |
|
// TString *stringa = (TString*)(*cl)[0]; |
497 |
|
// TBranchElement *utb = (TBranchElement*)tb->GetBranchCount(); |
498 |
|
// TString** stringa = (TString*)(&tb->GetValuePointer()); |
499 |
|
//TStreamerElement *tste = (TStreamerElement*)tb->GetInfo()->GetCurrentElement(); |
500 |
|
|
501 |
|
// char *ladd; |
502 |
|
// ladd = tb->GetValuePointer() |
503 |
|
// TString *stringa = (TString*)((tste->GetOffset())); |
504 |
|
// TString& mstr = *stringa; |
505 |
|
// printf(" la mia stringa %s \n",mstr.Data()); |
506 |
|
// printf(" offset %i \n",(Int_t)utb->GetValue(0,0)); |
507 |
|
// int pointer = (tb->GetInfo()->GetOffsets())[tb->GetID()]; |
508 |
|
// TString *stringa = (TString*)(tb->GetInfo()->GetOffsets())[tb->GetID()]; |
509 |
|
// TString *stringa = (TString*)tb->GetAddress(); |
510 |
|
// printf(" address 0x%X \n",tb->GetAddress()); |
511 |
|
// printf(" pointer 0x%X \n",tb->GetValuePointer()); |
512 |
|
// printf(" object 0x%X \n",tb->GetObject()); |
513 |
|
// printf("stringa %s lung %i\n",stringa.Data(),stringa.Length()); |
514 |
|
// TLeaf *striglia = tb->FindLeaf(tb->GetName()); |
515 |
|
// if ( striglia ){ |
516 |
|
// char *pointer = (char *)striglia->GetValuePointer(); |
517 |
|
// TString *pr= (TString*)pointer; |
518 |
|
// printf("ciao %s \n",pr->Data()); |
519 |
|
// }; |
520 |
|
sprintf(o,"%s TString - not implemented yet -",o); |
521 |
|
sprintf(zz,"%s TString - not implemented yet -",zz); |
522 |
|
}; |
523 |
|
// |
524 |
|
// TArray |
525 |
|
// |
526 |
|
if ( atype == 42 ){ |
527 |
|
// |
528 |
|
// TObjArray *cl = (TObjArray*)tb->GetObject(); |
529 |
|
// // |
530 |
|
// TClass *myc = cl->IsA(); |
531 |
|
// // |
532 |
|
// printf("qui \n"); |
533 |
|
// // |
534 |
|
// // determine offset to fetch data |
535 |
|
// // |
536 |
|
// int thisoffset = 0; |
537 |
|
// TRealData *rd = myc->GetRealData(tb->GetName()); |
538 |
|
// if ( rd ){ |
539 |
|
// thisoffset = rd->GetThisOffset(); |
540 |
|
// }; |
541 |
|
// Int_t niente = 0; |
542 |
|
// TStreamerElement *tste = tb->GetInfo()->GetStreamerElement(rd->GetName(),niente); |
543 |
|
// printf(" typename %s \n",tste->GetTypeName()); |
544 |
|
// // |
545 |
|
// // TArrayI |
546 |
|
// // |
547 |
|
// if ( !strcmp(tste->GetTypeName(),"TArrayI") ){ |
548 |
|
// // |
549 |
|
// printf("qua \n"); |
550 |
|
// char *pointer = (char*)cl->At(0); |
551 |
|
// // char *pu = thisoffset + pointer; |
552 |
|
// int pu = (int)tste->GetTObjectOffset(); |
553 |
|
// TArrayI arr = (TArrayI)*pu; |
554 |
|
// // TArrayI arr = (TArrayI)(thisoffset); |
555 |
|
// //TArrayI *arr = (TArrayI*)pu; |
556 |
|
// //TArraI arr = (TArrayI) |
557 |
|
// Int_t jj=0; |
558 |
|
// j=0; |
559 |
|
// printf("quii \n"); |
560 |
|
// Int_t arlen = min(arr.GetSize(),dlen); |
561 |
|
// // |
562 |
|
// printf("que \n"); |
563 |
|
// setcolor(col,RESET, BLUE, WHITE); |
564 |
|
// setcolor(col2,RESET, BLACK, WHITE); |
565 |
|
// sprintf(o,"%s%s %s[%i]%s = ",o,col,tb->GetName(),arr.GetSize(),col2); |
566 |
|
// // |
567 |
|
// // while ( j < tb->GetNdata() ){ |
568 |
|
// // |
569 |
|
// printf("quo \n"); |
570 |
|
// // pointer = (char*)cl->UncheckedAt(j); |
571 |
|
// // pu = pointer + thisoffset; |
572 |
|
// // arr = (TArrayI*)(thisoffset); |
573 |
|
// // |
574 |
|
// while ( jj < arlen ){ |
575 |
|
// if ( jj < arlen-1 ){ |
576 |
|
// sprintf(o,"%s %i ,",o,arr.At(jj)); |
577 |
|
// } else { |
578 |
|
// sprintf(o,"%s %i",o,arr.At(jj)); |
579 |
|
// }; |
580 |
|
// jj++; |
581 |
|
// }; |
582 |
|
// // if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
583 |
|
// // j++; |
584 |
|
// // }; |
585 |
|
// }; |
586 |
|
// // |
587 |
|
// // TArrayF |
588 |
|
// // |
589 |
|
// if ( !strcmp(tste->GetTypeName(),"TArrayF") ){ |
590 |
|
// // |
591 |
|
// char *pointer = (char*)cl->UncheckedAt(0); |
592 |
|
// char *pu = pointer + thisoffset; |
593 |
|
// TArrayF *arr = (TArrayF*)(pu); |
594 |
|
// Int_t jj=0; |
595 |
|
// Int_t arlen = min(arr->GetSize(),dlen); |
596 |
|
// // |
597 |
|
// setcolor(col,RESET, BLUE, WHITE); |
598 |
|
// setcolor(col2,RESET, BLACK, WHITE); |
599 |
|
// sprintf(o,"%s%s %s[%i]%s = ",o,col,tb->GetName(),arr->GetSize(),col2); |
600 |
|
// // |
601 |
|
// while ( j < tb->GetNdata() ){ |
602 |
|
// // |
603 |
|
// pointer = (char*)cl->UncheckedAt(j); |
604 |
|
// pu = pointer + thisoffset; |
605 |
|
// arr = (TArrayF*)(pu); |
606 |
|
// // |
607 |
|
// while ( jj < arlen ){ |
608 |
|
// if ( jj < arlen-1 ){ |
609 |
|
// sprintf(o,"%s %f ,",o,arr->At(jj)); |
610 |
|
// } else { |
611 |
|
// sprintf(o,"%s %f",o,arr->At(jj)); |
612 |
|
// }; |
613 |
|
// jj++; |
614 |
|
// }; |
615 |
|
// if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
616 |
|
// j++; |
617 |
|
// }; |
618 |
|
// }; |
619 |
|
// sprintf(o,"%s\n",o); |
620 |
|
// |
621 |
|
sprintf(o,"%s TArray - not implemented yet -",o); |
622 |
|
sprintf(zz,"%s TArray - not implemented yet -",zz); |
623 |
|
// |
624 |
|
}; |
625 |
|
// |
626 |
|
sprintf(o,"%s\n",o); |
627 |
|
sprintf(zz,"%s\n",zz); |
628 |
|
break; |
629 |
|
case 3: |
630 |
|
// |
631 |
|
// IS A TCLONESARRAY |
632 |
|
// |
633 |
|
setcolor(col,RESET, BLUE, WHITE); |
634 |
|
setcolor(col2,RESET, BLACK, WHITE); |
635 |
|
sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata()); |
636 |
|
sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata()); |
637 |
|
|
638 |
// if (otr->GetMakeClass()) { |
// |
639 |
if (!tb->GetAddress()) { |
if ( tb->GetNdata() ){ |
640 |
printf("esco \n"); |
// |
641 |
return; |
TClonesArray *cl = (TClonesArray*)tb->GetObject(); |
642 |
} |
// |
643 |
if (tb->GetType() == 3 || tb->GetType() == 4) { |
TClass *myc = cl->GetClass(); |
644 |
// TClonesArray or STL container top-level branch. |
// |
645 |
printf("3 o 4 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
TList *lme = myc->GetListOfDataMembers(); |
646 |
return; |
TIter next(lme); |
647 |
} else if (tb->GetType() == 31 || tb->GetType() == 41) { |
TBranchElement *tb2 = 0; |
648 |
printf(" 31 o 41 \n"); |
// |
649 |
// TClonesArray or STL container sub-branch. |
while ( (tb2 = (TBranchElement*)next()) ){ |
650 |
Int_t n = TMath::Min(10, tb->GetNdata()); |
// |
651 |
Int_t atype = tb->GetStreamerType() + 20; |
const char *name = tb2->GetName(); |
652 |
if (tb->GetStreamerType() == 1) { |
TBranch *foglia = tb->FindBranch(name); |
653 |
// TVirtualStreamerInfo::kOffsetL + TVirtualStreamerInfo::kChar is |
if ( foglia ){ |
654 |
// printed as a string and could print weird characters. |
// |
655 |
// So we print an unsigned char instead (not perfect, but better). |
TBranchElement *stb = (TBranchElement*)tb->FindBranch(name); |
656 |
atype = 20 + 11 ; |
Int_t stype = stb->GetType(); |
657 |
} |
Int_t satype = stb->GetStreamerType() - 20; |
658 |
if (atype > 54) { |
Int_t slen = (stb->GetInfo()->GetLengths())[stb->GetID()]; |
659 |
// FIXME: More logic required here (like in ReadLeaves) |
Int_t slength = min(slen,dlen); |
660 |
printf(">54 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
// printf("SubBranches : atype is %i type is %i tb getname %s slen %i slength %i\n",satype,stype,stb->GetName(),slen,slength); |
661 |
return; |
switch (stype){ |
662 |
} |
case 31: |
663 |
if (tb->GetStreamerType() > 20) { |
// |
664 |
atype -= 20; |
// IS A VARIABLE |
665 |
TObjArray *prova= otr->GetListOfLeaves(); |
// |
666 |
// TObjArray* leaf2 = (TObjArray*) prova->UncheckedAt(i); |
// |
667 |
//TLeaf* leaf = (TLeaf*)(otr->GetLeaf(tb->GetName())); |
// NAME |
668 |
// TLeafElement* leaf = (TLeafElement*)((TLeaf*)(otr->GetListOfLeaves()->UncheckedAt(i))->GetBranch()->UncheckedAt(0)); |
// |
669 |
TLeafElement* leaf = (TLeafElement*)(prova->UncheckedAt(0)); |
j = 0; |
670 |
n = n * leaf->GetLenStatic(); |
// |
671 |
} |
// VALUES |
672 |
if (tb->GetInfo()) { |
// |
673 |
// n = 16; |
if ( satype == 41 || satype == 44){ |
674 |
tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); |
// |
675 |
//tb->GetObject()->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), atype, n, lenmax); |
// skip TRef |
676 |
} |
// |
677 |
return; |
break; |
678 |
} else if (tb->GetType() <= 2) { |
}; |
679 |
printf(" <=2 \n"); |
// |
680 |
// Branch in split mode. |
// Integer |
681 |
// FIXME: This should probably be < 60 instead. |
// |
682 |
if ((tb->GetStreamerType() > 40) && (tb->GetStreamerType() < 55)) { |
if ( satype == -17 || satype == -9 ){ |
683 |
Int_t atype = tb->GetStreamerType() - 20; |
// |
684 |
TBranchElement* counterElement = (TBranchElement*) tb->GetBranchCount(); |
setcolor(col,RESET, BLUE, WHITE); |
685 |
Int_t n = (Int_t) counterElement->GetValue(0, 0); |
setcolor(col2,RESET, BLACK, WHITE); |
686 |
if (tb->GetInfo()) { |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
687 |
tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); |
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
688 |
} |
while ( j < cl->GetEntriesFast() ){ |
689 |
} else { |
if ( j < cl->GetEntriesFast() -1 ){ |
690 |
// if (tb->GetInfo()) { |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
691 |
// tb->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), tb->GetID(), -1, lenmax); |
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,slength)); |
692 |
// } |
} else { |
693 |
// } |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
694 |
return; |
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength)); |
695 |
} |
}; |
696 |
} else if (tb->GetType() == 3) { |
j++; |
697 |
printf("3 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
}; |
698 |
} else if (tb->GetType() == 31) { |
}; |
699 |
printf("31 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
// |
700 |
// TClonesArray* clones = (TClonesArray*) tb->GetObject(); |
// Float |
701 |
// if (tb->GetInfo()) { |
// |
702 |
// tb->GetInfo()->PrintValueClones(tb->GetName(), clones, tb->GetID(), tb->GetOffset(), lenmax); |
if ( satype == -15 ){ |
703 |
// } |
// |
704 |
} else if (tb->GetType() == 41) { |
setcolor(col,RESET, BLUE, WHITE); |
705 |
printf("41 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
setcolor(col2,RESET, BLACK, WHITE); |
706 |
// TVirtualCollectionProxy::TPushPop helper(((TBranchElement*) this)->GetCollectionProxy(), fObject); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
707 |
// if (GetInfo()) { |
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
708 |
// GetInfo()->PrintValueSTL(GetName(), ((TBranchElement*) this)->GetCollectionProxy(), fID, fOffset, lenmax); |
while ( j < cl->GetEntriesFast() ){ |
709 |
// } |
if ( j < cl->GetEntriesFast() -1 ){ |
710 |
} else { |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
711 |
printf("else %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,slength)); |
712 |
// if (GetInfo()) { |
} else { |
713 |
// GetInfo()->PrintValue(GetName(), fObject, fID, -1, lenmax); |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
714 |
// } |
sprintf(zz,"%s %f",zz,stb->GetValue(j,slength)); |
715 |
} |
}; |
716 |
|
j++; |
717 |
|
}; |
718 |
|
}; |
719 |
|
// |
720 |
|
// Array of float |
721 |
|
// |
722 |
|
if ( satype == 5 ){ |
723 |
|
// |
724 |
|
setcolor(col,RESET, BLUE, WHITE); |
725 |
|
setcolor(col2,RESET, BLACK, WHITE); |
726 |
|
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
727 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
728 |
|
Bool_t bold = true; |
729 |
|
while ( j < tb->GetNdata() ){ |
730 |
|
if ( bold ){ |
731 |
|
setcolor(col,RESET, BLACK, WHITE); |
732 |
|
sprintf(o,"%s%s",o,col); |
733 |
|
} else { |
734 |
|
setcolor(col,BOLD, BLACK, WHITE); |
735 |
|
sprintf(o,"%s%s",o,col); |
736 |
|
}; |
737 |
|
Int_t jj = 0; |
738 |
|
while ( jj < slength ){ |
739 |
|
if ( jj < slength-1 ){ |
740 |
|
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
741 |
|
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,jj,true)); |
742 |
|
} else { |
743 |
|
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
744 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true)); |
745 |
|
}; |
746 |
|
jj++; |
747 |
|
}; |
748 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
749 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
750 |
|
if ( !bold ){ |
751 |
|
bold = true; |
752 |
|
} else { |
753 |
|
bold = false; |
754 |
|
}; |
755 |
|
j++; |
756 |
|
}; |
757 |
|
if ( bold ){ |
758 |
|
setcolor(col,RESET, BLACK, WHITE); |
759 |
|
sprintf(o,"%s%s",o,col); |
760 |
|
}; |
761 |
|
}; |
762 |
|
// |
763 |
|
// Array of integers |
764 |
|
// |
765 |
|
if ( satype == 3 ){ |
766 |
|
// |
767 |
|
setcolor(col,RESET, BLUE, WHITE); |
768 |
|
setcolor(col2,RESET, BLACK, WHITE); |
769 |
|
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
770 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
771 |
|
while ( j < tb->GetNdata() ){ |
772 |
|
Int_t jj = 0; |
773 |
|
while ( jj < slength ){ |
774 |
|
if ( jj < slength-1 ){ |
775 |
|
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
776 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,jj,true)); |
777 |
|
} else { |
778 |
|
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
779 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true)); |
780 |
|
}; |
781 |
|
jj++; |
782 |
|
}; |
783 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
784 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
785 |
|
j++; |
786 |
|
}; |
787 |
|
}; |
788 |
|
|
789 |
// }; |
// |
790 |
printf("esco qui\n"); |
// TArray |
791 |
|
// |
792 |
|
if ( satype == 42 ){ |
793 |
|
// |
794 |
|
// determine offset to fetch data |
795 |
|
// |
796 |
|
int thisoffset = 0; |
797 |
|
TRealData *rd = myc->GetRealData(foglia->GetName()); |
798 |
|
if ( rd ){ |
799 |
|
thisoffset = rd->GetThisOffset(); |
800 |
|
}; |
801 |
|
Int_t niente = 0; |
802 |
|
TStreamerElement *tste = stb->GetInfo()->GetStreamerElement(rd->GetName(),niente); |
803 |
|
// |
804 |
|
// TArrayI |
805 |
|
// |
806 |
|
if ( !strcmp(tste->GetTypeName(),"TArrayI") ){ |
807 |
|
// |
808 |
|
char *pointer = (char*)cl->UncheckedAt(0); |
809 |
|
char *pu = pointer + thisoffset; |
810 |
|
TArrayI *arr = (TArrayI*)(pu); |
811 |
|
Int_t jj=0; |
812 |
|
Int_t arlen = min(arr->GetSize(),dlen); |
813 |
|
// |
814 |
|
setcolor(col,RESET, BLUE, WHITE); |
815 |
|
setcolor(col2,RESET, BLACK, WHITE); |
816 |
|
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
817 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
818 |
|
// |
819 |
|
while ( j < tb->GetNdata() ){ |
820 |
|
// |
821 |
|
pointer = (char*)cl->UncheckedAt(j); |
822 |
|
pu = pointer + thisoffset; |
823 |
|
arr = (TArrayI*)(pu); |
824 |
|
// |
825 |
|
while ( jj < arlen ){ |
826 |
|
if ( jj < arlen-1 ){ |
827 |
|
sprintf(o,"%s %i ,",o,arr->At(jj)); |
828 |
|
sprintf(zz,"%s %i ,",zz,arr->At(jj)); |
829 |
|
} else { |
830 |
|
sprintf(o,"%s %i",o,arr->At(jj)); |
831 |
|
sprintf(zz,"%s %i",zz,arr->At(jj)); |
832 |
|
}; |
833 |
|
jj++; |
834 |
|
}; |
835 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
836 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
837 |
|
j++; |
838 |
|
}; |
839 |
|
}; |
840 |
|
// |
841 |
|
// TArrayF |
842 |
|
// |
843 |
|
if ( !strcmp(tste->GetTypeName(),"TArrayF") ){ |
844 |
|
// |
845 |
|
char *pointer = (char*)cl->UncheckedAt(0); |
846 |
|
char *pu = pointer + thisoffset; |
847 |
|
TArrayF *arr = (TArrayF*)(pu); |
848 |
|
Int_t jj=0; |
849 |
|
Int_t arlen = min(arr->GetSize(),dlen); |
850 |
|
// |
851 |
|
setcolor(col,RESET, BLUE, WHITE); |
852 |
|
setcolor(col2,RESET, BLACK, WHITE); |
853 |
|
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
854 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
855 |
|
// |
856 |
|
while ( j < tb->GetNdata() ){ |
857 |
|
// |
858 |
|
pointer = (char*)cl->UncheckedAt(j); |
859 |
|
pu = pointer + thisoffset; |
860 |
|
arr = (TArrayF*)(pu); |
861 |
|
// |
862 |
|
while ( jj < arlen ){ |
863 |
|
if ( jj < arlen-1 ){ |
864 |
|
sprintf(o,"%s %f ,",o,arr->At(jj)); |
865 |
|
sprintf(zz,"%s %f ,",zz,arr->At(jj)); |
866 |
|
} else { |
867 |
|
sprintf(o,"%s %f",o,arr->At(jj)); |
868 |
|
sprintf(zz,"%s %f",zz,arr->At(jj)); |
869 |
|
}; |
870 |
|
jj++; |
871 |
|
}; |
872 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
873 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
874 |
|
j++; |
875 |
|
}; |
876 |
|
}; |
877 |
|
}; |
878 |
|
sprintf(o,"%s\n",o); |
879 |
|
sprintf(zz,"%s\n",zz); |
880 |
|
break; |
881 |
|
}; |
882 |
|
}; |
883 |
|
}; |
884 |
|
}; |
885 |
|
break; |
886 |
|
}; |
887 |
|
}; |
888 |
|
printf("%s\n",o); |
889 |
|
pamgui->DIALOG(4,zz); |
890 |
}; |
}; |
891 |
|
|
|
void FEVdetector::PrintData(TTree *tree, Long64_t entry=-1LL,Int_t lenmax=44){ |
|
|
// -- Print values of all active leaves for entry. |
|
|
// |
|
|
// if entry==-1, print current entry (default) |
|
|
// if a leaf is an array, a maximum of lenmax elements is printed. |
|
|
// |
|
|
if (entry != -1) { |
|
|
tree->GetEntry(entry); |
|
|
} |
|
|
// printf("======> EVENT:%lld\n", thisentry); |
|
|
printf("======> EVENT:%i\n", thisentry); |
|
|
TObjArray* leaves = tree->GetListOfLeaves(); // |
|
|
Int_t nleaves = leaves->GetEntriesFast(); |
|
|
Int_t ltype; |
|
|
for (Int_t i = 0; i < nleaves; i++) { |
|
|
TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(i); |
|
|
TBranch* branch = leaf->GetBranch(); |
|
|
// if (branch->TestBit(kDoNotProcess)) { |
|
|
// continue; |
|
|
// } |
|
|
Int_t len = leaf->GetLen(); |
|
|
if (len <= 0) { |
|
|
continue; |
|
|
} |
|
|
len = TMath::Min(len, lenmax); |
|
|
if (leaf->IsA() == TLeafElement::Class()) { |
|
|
// Double_t value = leaf->GetValue(lenmax); |
|
|
//printf(" ioqui %f \n",value); |
|
|
// ((TBranchElement*)leaf->GetBranch())->PrintValue(i); |
|
|
this->PrintLeaves(otr,i,((TBranchElement*)leaf->GetBranch()), lenmax); |
|
|
//leaf->PrintValue(lenmax); |
|
|
continue; |
|
|
} |
|
|
if (branch->GetListOfBranches()->GetEntriesFast() > 0) { |
|
|
continue; |
|
|
} |
|
|
ltype = 10; |
|
|
if (leaf->IsA() == TLeafF::Class()) { |
|
|
ltype = 5; |
|
|
} |
|
|
if (leaf->IsA() == TLeafD::Class()) { |
|
|
ltype = 5; |
|
|
} |
|
|
if (leaf->IsA() == TLeafC::Class()) { |
|
|
len = 1; |
|
|
ltype = 5; |
|
|
}; |
|
|
printf(" %-15s = ", leaf->GetName()); |
|
|
for (Int_t l = 0; l < len; l++) { |
|
|
Double_t value = leaf->GetValue(l); |
|
|
printf(" ioqui %f \n",value); |
|
|
// leaf->PrintValue(l); |
|
|
if (l == (len - 1)) { |
|
|
printf("\n"); |
|
|
continue; |
|
|
} |
|
|
printf(", "); |
|
|
if ((l % ltype) == 0) { |
|
|
printf("\n "); |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
892 |
|
|
893 |
void FEVdetector::GetGeneralInfo(){ |
void FEVdetector::GetGeneralInfo(){ |
894 |
// |
// |
899 |
headcold = headc; |
headcold = headc; |
900 |
headc = ph->Counter; |
headc = ph->Counter; |
901 |
var.headc = (int)ph->Counter; |
var.headc = (int)ph->Counter; |
902 |
OBT = ph->OrbitalTime; |
OBT = (UInt_t)ph->OrbitalTime; |
903 |
DOBT = OBT - OOBT; |
DOBT = OBT - OOBT; |
904 |
OOBT = OBT; |
OOBT = OBT; |
905 |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
935 |
trcs = (TString)trc.str().c_str(); |
trcs = (TString)trc.str().c_str(); |
936 |
} else { |
} else { |
937 |
headcold = headc; |
headcold = headc; |
938 |
headc = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have obt in the level2 file! |
if ( var.RUN ){ |
939 |
OBT = L2->GetOrbitalInfo()->OBT; // to be changed as soon as we will have obt in the level2 file! |
var.idrun = L2->GetRunInfo()->ID; |
940 |
DOBT = OBT - OOBT; |
var.idroot = L2->GetRunInfo()->ID_ROOT_L0; |
941 |
OOBT = OBT; |
var.EVF = L2->GetRunInfo()->EV_FROM; |
942 |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
}; |
943 |
var.etime = OBT; |
if ( var.ORB ){ |
944 |
|
headc = L2->GetOrbitalInfo()->pkt_num; |
945 |
|
OBT = L2->GetOrbitalInfo()->OBT; |
946 |
|
DOBT = OBT - OOBT; |
947 |
|
OOBT = OBT; |
948 |
|
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
949 |
|
var.etime = OBT; |
950 |
|
} else { |
951 |
|
var.etime = 0; |
952 |
|
}; |
953 |
// |
// |
954 |
// who gave the trigger? |
// who gave the trigger? |
955 |
// |
// |
956 |
calotrig = 0; |
Int_t trigconf = 0; |
957 |
if ( L2->GetTrigLevel2()->patterntrig[0] ) calotrig = 1; |
if ( var.TRG ){ |
958 |
toftrig = 0; |
calotrig = 0; |
959 |
if ( L2->GetTrigLevel2()->patterntrig[2] || L2->GetTrigLevel2()->patterntrig[3] || L2->GetTrigLevel2()->patterntrig[4] || L2->GetTrigLevel2()->patterntrig[5] ) toftrig = 1; |
if ( L2->GetTrigLevel2()->patterntrig[0] ) calotrig = 1; |
960 |
s4pulser = 0; |
toftrig = 0; |
961 |
if ( L2->GetTrigLevel2()->patterntrig[1] & (1<<0) ) s4pulser = 1; |
if ( L2->GetTrigLevel2()->patterntrig[2] || L2->GetTrigLevel2()->patterntrig[3] || L2->GetTrigLevel2()->patterntrig[4] || L2->GetTrigLevel2()->patterntrig[5] ) toftrig = 1; |
962 |
// |
s4pulser = 0; |
963 |
// TOF and calorimeter when giving a trigger will always set this flag since the time window of the signal is greater than 100 ns. |
if ( L2->GetTrigLevel2()->patterntrig[1] & (1<<0) ) s4pulser = 1; |
964 |
// S4 sometimes could not set the flag even if the trigger is given. This is a workaround to fix this "bug": |
// |
965 |
// |
// TOF and calorimeter when giving a trigger will always set this flag since the time window of the signal is greater than 100 ns. |
966 |
if ( !calotrig && !toftrig ) s4pulser = 1; |
// S4 sometimes could not set the flag even if the trigger is given. This is a workaround to fix this "bug": |
967 |
// |
// |
968 |
Int_t trigconf = L2->GetTrigLevel2()->trigconf; |
if ( !calotrig && !toftrig ) s4pulser = 1; |
969 |
|
// |
970 |
|
trigconf = L2->GetTrigLevel2()->trigconf; |
971 |
|
} else { |
972 |
|
trigconf = 0; |
973 |
|
} |
974 |
stringstream trc; |
stringstream trc; |
975 |
trc.str(""); |
trc.str(""); |
976 |
if ( trigconf & (1<<0) ) trc << "TOF1"; |
if ( trigconf & (1<<0) ) trc << "TOF1"; |
1058 |
// |
// |
1059 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1060 |
cintcom.str(""); |
cintcom.str(""); |
1061 |
cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex; |
cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona |
1062 |
cintcom << L2; |
cintcom << L2; |
1063 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1064 |
|
// printf(" comando: %s \n",cintcom.str().c_str()); |
1065 |
} else { |
} else { |
1066 |
cintcom.str(""); |
cintcom.str(""); |
1067 |
cintcom << "TTree *otr = (TTree*)0x" << hex; |
cintcom << "TTree *otr = (TTree*)" << hex; |
1068 |
cintcom << otr; |
cintcom << otr; |
1069 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1070 |
// |
// |
1071 |
cintcom.str(""); |
cintcom.str(""); |
1072 |
cintcom << "struct Variables &var = (struct Variables &)0x" << hex; |
cintcom << "struct Variables &var = (struct Variables &)" << hex; |
1073 |
cintcom << &var; |
cintcom << &var; |
1074 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
1075 |
}; |
}; |
1080 |
// |
// |
1081 |
if ( level.file == -1 ) isOK = gApplication->ProcessLine("filter((TTree *)otr,-1,(Variables &)var);"); |
if ( level.file == -1 ) isOK = gApplication->ProcessLine("filter((TTree *)otr,-1,(Variables &)var);"); |
1082 |
// |
// |
1083 |
if ( level.file == 2 ) isOK = gApplication->ProcessLine("filter((PamLevel2 *)L2,2);"); |
// if ( level.file == 2 ) isOK = gApplication->ProcessLine("filter((PamLevel2 *)L2,2);"); |
1084 |
|
if ( level.file == 2 ) isOK = gApplication->ProcessLine("filter();"); |
1085 |
// |
// |
1086 |
// progress bar in text window |
// progress bar in text window |
1087 |
// |
// |
1094 |
// |
// |
1095 |
} |
} |
1096 |
|
|
1097 |
Int_t FEVdetector::Load(TTree &mainotr, TFile &mainfile){ |
TChain* FEVdetector::Load(TString file){ |
1098 |
file = &mainfile; |
// |
1099 |
otr = &mainotr; |
// file = &mainfile; |
|
L2 = new PamLevel2(); |
|
1100 |
// |
// |
1101 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1102 |
// otr = L2->LoadPamTrees(file); |
// |
1103 |
// printf(" %s \n",ddec.Data()); |
// printf(" %s \n",ddec.Data()); |
1104 |
otr = L2->GetPamTree(file,ddec.Data()); |
if ( !L2 ){ |
1105 |
|
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
1106 |
|
if ( NODB ) L2->NoDBconnections(); |
1107 |
|
otr = L2->GetPamTree(); |
1108 |
|
// printf(" l2 constructor\n"); |
1109 |
|
// printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot); |
1110 |
|
} else { |
1111 |
|
// |
1112 |
|
// printf(" l2 already exist \n"); |
1113 |
|
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
1114 |
|
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
1115 |
|
// |
1116 |
|
}; |
1117 |
|
// |
1118 |
// |
// |
1119 |
if ( !otr ) return(0); |
if ( !otr ) return(0); |
|
// ******************** |
|
|
// load magnetic field |
|
|
// ******************** |
|
|
const char *pam_calib = pathtocalibration(); |
|
1120 |
// |
// |
1121 |
stringstream magfie; |
// otr->CanDeleteRefs(true); |
1122 |
magfie.str(""); |
// if ( runtree ) runtree->CanDeleteRefs(true); |
|
// magfie << "/localdisk/mocchiut/test/calib/trk-param/field_param-0/"; |
|
|
magfie << pam_calib; |
|
|
magfie << "/trk-param/field_param-0/"; |
|
1123 |
// |
// |
|
L2->GetTrkLevel2()->LoadField(magfie.str().c_str()); |
|
1124 |
} else { |
} else { |
1125 |
// |
// |
1126 |
// load calorimeter ADC2MIP conversion file |
// load calorimeter ADC2MIP conversion file |
1161 |
}; |
}; |
1162 |
// |
// |
1163 |
// |
// |
1164 |
trigger = new pamela::trigger::TriggerEvent(); |
// Load level0 file if the case |
|
eh = new pamela::EventHeader(); |
|
|
ph = new pamela::PscuHeader(); |
|
|
// oinfoL2 = new OrbitalInfo(); |
|
|
runinfo = new ItoRunInfo(file); |
|
|
// |
|
|
de = new pamela::calorimeter::CalorimeterEvent(); |
|
|
trk = new pamela::tracker::TrackerEvent(); |
|
|
ne = new pamela::neutron::NeutronEvent(); |
|
|
ace = new pamela::anticounter::AnticounterEvent(); |
|
|
s4 = new pamela::S4::S4Event(); |
|
|
tof = new pamela::tof::TofEvent(); |
|
1165 |
// |
// |
1166 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
1167 |
|
// |
1168 |
|
trigger = new pamela::trigger::TriggerEvent(); |
1169 |
|
eh = new pamela::EventHeader(); |
1170 |
|
ph = new pamela::PscuHeader(); |
1171 |
|
de = new pamela::calorimeter::CalorimeterEvent(); |
1172 |
|
trk = new pamela::tracker::TrackerEvent(); |
1173 |
|
ne = new pamela::neutron::NeutronEvent(); |
1174 |
|
ace = new pamela::anticounter::AnticounterEvent(); |
1175 |
|
s4 = new pamela::S4::S4Event(); |
1176 |
|
tof = new pamela::tof::TofEvent(); |
1177 |
|
// |
1178 |
|
otr = new TChain("Physics"); |
1179 |
|
otr->Add(file.Data(),-1); |
1180 |
otr->SetBranchAddress("Trigger", &trigger); |
otr->SetBranchAddress("Trigger", &trigger); |
1181 |
otr->SetBranchAddress("Header", &eh); |
otr->SetBranchAddress("Header", &eh); |
1182 |
}; |
}; |
|
if ( level.file == 2 && var.RUN){ |
|
|
// otr->AddFriend("OrbitalInfo", file); |
|
|
// otr->SetBranchAddress("OrbitalInfo", &oinfoL2); |
|
|
runinfo->Read(0ULL); |
|
|
}; |
|
1183 |
// |
// |
1184 |
if ( var.TRK ) { |
if ( var.TRK ) { |
1185 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
1252 |
}; |
}; |
1253 |
}; |
}; |
1254 |
// |
// |
1255 |
return(1); |
if ( !otr ){ |
1256 |
|
return(0); |
1257 |
|
}; |
1258 |
|
// |
1259 |
|
return otr; |
1260 |
// |
// |
1261 |
} |
} |
1262 |
|
|
1332 |
text->DrawLatex(0.33,txthi,testo.str().c_str()); |
text->DrawLatex(0.33,txthi,testo.str().c_str()); |
1333 |
txthi -= 0.03; |
txthi -= 0.03; |
1334 |
testo2.str(""); |
testo2.str(""); |
1335 |
testo2 << "On Board Time: " << (int)OBT; |
testo2 << "On Board Time: " << (unsigned int)OBT; |
1336 |
if ( DOBT > 0 ) { |
if ( DOBT > 0 ) { |
1337 |
testo2 << " (delta: " << (int)DOBT; |
testo2 << " (delta: " << (unsigned int)DOBT; |
1338 |
testo2 << ")"; |
testo2 << ")"; |
1339 |
}; |
}; |
1340 |
testo2 << " [ms]"; |
testo2 << " [ms]"; |
1492 |
text->DrawLatex(var.xxvc+0.17*var.sfx,var.yxvc-0.08*var.sfy,"CAS1"); |
text->DrawLatex(var.xxvc+0.17*var.sfx,var.yxvc-0.08*var.sfy,"CAS1"); |
1493 |
text->DrawLatex(var.xyvc-0.192*var.sfx,var.yyvc-0.08*var.sfy,"CAS4"); |
text->DrawLatex(var.xyvc-0.192*var.sfx,var.yyvc-0.08*var.sfy,"CAS4"); |
1494 |
text->DrawLatex(var.xyvc+0.17*var.sfx,var.yyvc-0.08*var.sfy,"CAS3"); |
text->DrawLatex(var.xyvc+0.17*var.sfx,var.yyvc-0.08*var.sfy,"CAS3"); |
1495 |
text->DrawLatex(var.xxvc-0.192*var.sfx,var.yxvc+0.48*var.sfy,"CARD2"); |
text->DrawLatex(var.xxvc-0.222*var.sfx,var.yxvc+0.48*var.sfy,"CARD2"); |
1496 |
text->DrawLatex(var.xxvc+0.155*var.sfx,var.yxvc+0.48*var.sfy,"CARD3"); |
text->DrawLatex(var.xxvc+0.185*var.sfx,var.yxvc+0.48*var.sfy,"CARD3"); |
1497 |
text->DrawLatex(var.xyvc-0.170*var.sfx,var.yyvc+0.48*var.sfy,"CARD1"); |
text->DrawLatex(var.xyvc-0.190*var.sfx,var.yyvc+0.48*var.sfy,"CARD1"); |
1498 |
text->DrawLatex(var.xyvc+0.13*var.sfx,var.yyvc+0.48*var.sfy,"CARD4"); |
text->DrawLatex(var.xyvc+0.16*var.sfx,var.yyvc+0.48*var.sfy,"CARD4"); |
1499 |
text->DrawLatex(var.xxvc-0.192*var.sfx,var.yxvc+0.39*var.sfy,"CAT3"); |
text->DrawLatex(var.xxvc-0.192*var.sfx,var.yxvc+0.39*var.sfy,"CAT3"); |
1500 |
text->DrawLatex(var.xxvc+0.155*var.sfx,var.yxvc+0.39*var.sfy,"CAT4"); |
text->DrawLatex(var.xxvc+0.155*var.sfx,var.yxvc+0.39*var.sfy,"CAT4"); |
1501 |
text->DrawLatex(var.xyvc-0.170*var.sfx,var.yyvc+0.39*var.sfy,"CAT2"); |
text->DrawLatex(var.xyvc-0.170*var.sfx,var.yyvc+0.39*var.sfy,"CAT2"); |
1623 |
// |
// |
1624 |
// print infos on terminal |
// print infos on terminal |
1625 |
// |
// |
1626 |
|
// if ( !var.selex ){ |
1627 |
printf(" File: %s \n",var.thefilename.Data()); |
printf(" File: %s \n",var.thefilename.Data()); |
1628 |
if ( !s4pulser && !calotrig ){ |
if ( !s4pulser && !calotrig ){ |
1629 |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
1634 |
if ( calotrig ){ |
if ( calotrig ){ |
1635 |
printf(" Pkt_num: %i - Progressive number: %i - CALO trigger -\n",(int)headc,thisentry+1); |
printf(" Pkt_num: %i - Progressive number: %i - CALO trigger -\n",(int)headc,thisentry+1); |
1636 |
}; |
}; |
1637 |
printf(" On Board Time: %i (delta %i) [ms]\n",OBT,DOBT); |
printf(" On Board Time: %u (delta %i) [ms]\n",OBT,DOBT); |
1638 |
const char *trc2 = trcs; |
const char *trc2 = trcs; |
1639 |
printf(" TRIGGER: %s \n",trc2); |
printf(" TRIGGER: %s \n",trc2); |
1640 |
printf(" AC: CARD hit = %i CAT hit = %i CAS hit = %i \n",var.hcard,var.hcat,var.hcas); |
printf(" AC: CARD hit = %i CAT hit = %i CAS hit = %i \n",var.hcard,var.hcat,var.hcas); |
1646 |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
1647 |
printf(" S4: %.2f [MIP] TOF: beta = %.2f \n",var.s4sig,var.beta[4]); |
printf(" S4: %.2f [MIP] TOF: beta = %.2f \n",var.s4sig,var.beta[4]); |
1648 |
printf(" ND: Trigger: neutrons = %i - Background: upper = %i lower = %i \n",var.trup,var.bkup,var.bkbo); |
printf(" ND: Trigger: neutrons = %i - Background: upper = %i lower = %i \n",var.trup,var.bkup,var.bkbo); |
1649 |
|
// }; |
1650 |
// |
// |
1651 |
} |
} |
1652 |
|
|
1954 |
void FEVdetector::ShowTOF(){ |
void FEVdetector::ShowTOF(){ |
1955 |
// |
// |
1956 |
// |
// |
|
// |
|
1957 |
if ( !var.TOF ) return; |
if ( !var.TOF ) return; |
1958 |
// |
// |
1959 |
Int_t tt = 0; |
Int_t tt = 0; |
1960 |
|
Int_t rj = 0; |
1961 |
// |
// |
1962 |
// force level0, i.e. show patterntrig variable! |
// force level0, i.e. show patterntrig variable! |
1963 |
// |
// |
1987 |
Float_t mt31[2][3]; |
Float_t mt31[2][3]; |
1988 |
Float_t mt32[2][3]; |
Float_t mt32[2][3]; |
1989 |
// |
// |
1990 |
|
memset(mt11,0,2*8*sizeof(Float_t)); |
1991 |
|
memset(mt12,0,2*6*sizeof(Float_t)); |
1992 |
|
memset(mt21,0,2*2*sizeof(Float_t)); |
1993 |
|
memset(mt22,0,2*2*sizeof(Float_t)); |
1994 |
|
memset(mt31,0,2*3*sizeof(Float_t)); |
1995 |
|
memset(mt32,0,2*3*sizeof(Float_t)); |
1996 |
|
// |
1997 |
Int_t S3 = 0; |
Int_t S3 = 0; |
1998 |
Int_t S2 = 0; |
Int_t S2 = 0; |
1999 |
Int_t S12 = 0; |
Int_t S12 = 0; |
2158 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
2159 |
ocolo = 10; |
ocolo = 10; |
2160 |
TPolyLine *ftof12ya[6]; |
TPolyLine *ftof12ya[6]; |
2161 |
|
rj=6; |
2162 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
2163 |
|
rj--; |
2164 |
Float_t xc1[4]={ (s12p*j), s12p*(j), s12p*(j+1), (s12p*j)}; |
Float_t xc1[4]={ (s12p*j), s12p*(j), s12p*(j+1), (s12p*j)}; |
2165 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
2166 |
Float_t xc[4]; |
Float_t xc[4]; |
2176 |
} else { |
} else { |
2177 |
colo = 1; |
colo = 1; |
2178 |
}; |
}; |
2179 |
ColorMIP(ms12a[j],colo); |
ColorMIP(ms12a[rj],colo); |
2180 |
// |
// |
2181 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2182 |
if ( mt12[0][j] == 4095. ) colo = noadc; |
if ( mt12[0][rj] == 4095. ) colo = noadc; |
2183 |
// |
// |
2184 |
ftof12ya[j]->SetFillColor(colo); |
ftof12ya[j]->SetFillColor(colo); |
2185 |
ftof12ya[j]->SetLineWidth(1); |
ftof12ya[j]->SetLineWidth(1); |
2189 |
// B |
// B |
2190 |
s12p = 0.055; |
s12p = 0.055; |
2191 |
TPolyLine *ftof12yb[6]; |
TPolyLine *ftof12yb[6]; |
2192 |
|
rj=6; |
2193 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
2194 |
|
rj--; |
2195 |
Float_t xc1[4]={ (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
Float_t xc1[4]={ (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
2196 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
2197 |
Float_t xc[4]; |
Float_t xc[4]; |
2207 |
} else { |
} else { |
2208 |
colo = 1; |
colo = 1; |
2209 |
}; |
}; |
2210 |
ColorMIP(ms12b[j],colo); |
ColorMIP(ms12b[rj],colo); |
2211 |
// |
// |
2212 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2213 |
if ( mt12[1][j] == 4095. ) colo = noadc; |
if ( mt12[1][rj] == 4095. ) colo = noadc; |
2214 |
// |
// |
2215 |
ftof12yb[j]->SetFillColor(colo); |
ftof12yb[j]->SetFillColor(colo); |
2216 |
ftof12yb[j]->SetLineWidth(1); |
ftof12yb[j]->SetLineWidth(1); |
2244 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
2245 |
ocolo = 10; |
ocolo = 10; |
2246 |
TPolyLine *ftof21ya[2]; |
TPolyLine *ftof21ya[2]; |
2247 |
|
rj=2; |
2248 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
2249 |
|
rj--; |
2250 |
Float_t xc1[4]={ s21p*(j-1), s21p*(j-1), s21p*j, s21p*(j-1)}; |
Float_t xc1[4]={ s21p*(j-1), s21p*(j-1), s21p*j, s21p*(j-1)}; |
2251 |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
2252 |
Float_t xc[4]; |
Float_t xc[4]; |
2262 |
} else { |
} else { |
2263 |
colo = 1; |
colo = 1; |
2264 |
}; |
}; |
2265 |
ColorMIP(ms21a[j],colo); |
ColorMIP(ms21a[rj],colo); |
2266 |
// |
// |
2267 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2268 |
if ( mt21[0][j] == 4095. ) colo = noadc; |
if ( mt21[0][rj] == 4095. ) colo = noadc; |
2269 |
// |
// |
2270 |
ftof21ya[j]->SetFillColor(colo); |
ftof21ya[j]->SetFillColor(colo); |
2271 |
ftof21ya[j]->SetLineWidth(1); |
ftof21ya[j]->SetLineWidth(1); |
2275 |
// B |
// B |
2276 |
s21p = 0.075; |
s21p = 0.075; |
2277 |
TPolyLine *ftof21yb[2]; |
TPolyLine *ftof21yb[2]; |
2278 |
|
rj=2; |
2279 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
2280 |
|
rj--; |
2281 |
Float_t xc1[4]={ s21p*(j-1), s21p*j, s21p*j, s21p*(j-1)}; |
Float_t xc1[4]={ s21p*(j-1), s21p*j, s21p*j, s21p*(j-1)}; |
2282 |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
2283 |
Float_t xc[4]; |
Float_t xc[4]; |
2293 |
} else { |
} else { |
2294 |
colo = 1; |
colo = 1; |
2295 |
}; |
}; |
2296 |
ColorMIP(ms21b[j],colo); |
ColorMIP(ms21b[rj],colo); |
2297 |
// |
// |
2298 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2299 |
if ( mt21[1][j] == 4095. ) colo = noadc; |
if ( mt21[1][rj] == 4095. ) colo = noadc; |
2300 |
// |
// |
2301 |
ftof21yb[j]->SetFillColor(colo); |
ftof21yb[j]->SetFillColor(colo); |
2302 |
ftof21yb[j]->SetLineWidth(1); |
ftof21yb[j]->SetLineWidth(1); |
2411 |
Float_t s31p = 0.060; |
Float_t s31p = 0.060; |
2412 |
ocolo = 10; |
ocolo = 10; |
2413 |
TPolyLine *ftof31xa[3]; |
TPolyLine *ftof31xa[3]; |
2414 |
|
rj=3; |
2415 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2416 |
|
rj--; |
2417 |
Float_t xc1[4]={ (s31p*j), (s31p*j), s31p*(j+1), (s31p*j)}; |
Float_t xc1[4]={ (s31p*j), (s31p*j), s31p*(j+1), (s31p*j)}; |
2418 |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
2419 |
Float_t xc[4]; |
Float_t xc[4]; |
2429 |
} else { |
} else { |
2430 |
colo = 1; |
colo = 1; |
2431 |
}; |
}; |
2432 |
ColorMIP(ms31a[j],colo); |
ColorMIP(ms31a[rj],colo); |
2433 |
// |
// |
2434 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2435 |
if ( mt31[0][j] == 4095. ) colo = noadc; |
if ( mt31[0][rj] == 4095. ) colo = noadc; |
2436 |
// |
// |
2437 |
ftof31xa[j]->SetFillColor(colo); |
ftof31xa[j]->SetFillColor(colo); |
2438 |
ftof31xa[j]->SetLineWidth(1); |
ftof31xa[j]->SetLineWidth(1); |
2442 |
// B |
// B |
2443 |
s31p = 0.060; |
s31p = 0.060; |
2444 |
TPolyLine *ftof31xb[3]; |
TPolyLine *ftof31xb[3]; |
2445 |
|
rj=3; |
2446 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2447 |
|
rj--; |
2448 |
Float_t xc1[4]={ (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
Float_t xc1[4]={ (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
2449 |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
2450 |
Float_t xc[4]; |
Float_t xc[4]; |
2460 |
} else { |
} else { |
2461 |
colo = 1; |
colo = 1; |
2462 |
}; |
}; |
2463 |
ColorMIP(ms31b[j],colo); |
ColorMIP(ms31b[rj],colo); |
2464 |
// |
// |
2465 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2466 |
if ( mt31[1][j] == 4095. ) colo = noadc; |
if ( mt31[1][rj] == 4095. ) colo = noadc; |
2467 |
// |
// |
2468 |
ftof31xb[j]->SetFillColor(colo); |
ftof31xb[j]->SetFillColor(colo); |
2469 |
ftof31xb[j]->SetLineWidth(1); |
ftof31xb[j]->SetLineWidth(1); |
2495 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
2496 |
ocolo = 10; |
ocolo = 10; |
2497 |
TPolyLine *ftof32ya[3]; |
TPolyLine *ftof32ya[3]; |
2498 |
|
rj=3; |
2499 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2500 |
|
rj--; |
2501 |
Float_t xc1[4]={ (s32p*j), (s32p*j), s32p*(j+1), (s32p*j)}; |
Float_t xc1[4]={ (s32p*j), (s32p*j), s32p*(j+1), (s32p*j)}; |
2502 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
2503 |
Float_t xc[4]; |
Float_t xc[4]; |
2513 |
} else { |
} else { |
2514 |
colo = 1; |
colo = 1; |
2515 |
}; |
}; |
2516 |
ColorMIP(ms32a[j],colo); |
ColorMIP(ms32a[rj],colo); |
2517 |
// |
// |
2518 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2519 |
if ( mt32[0][j] == 4095. ) colo = noadc; |
if ( mt32[0][rj] == 4095. ) colo = noadc; |
2520 |
// |
// |
2521 |
ftof32ya[j]->SetFillColor(colo); |
ftof32ya[j]->SetFillColor(colo); |
2522 |
ftof32ya[j]->SetLineWidth(1); |
ftof32ya[j]->SetLineWidth(1); |
2525 |
}; |
}; |
2526 |
s32p = 0.050; |
s32p = 0.050; |
2527 |
TPolyLine *ftof32yb[3]; |
TPolyLine *ftof32yb[3]; |
2528 |
|
rj=3; |
2529 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
2530 |
|
rj--; |
2531 |
Float_t xc1[4]={ (s32p*j), s32p*(j+1), s32p*(j+1), (s32p*j)}; |
Float_t xc1[4]={ (s32p*j), s32p*(j+1), s32p*(j+1), (s32p*j)}; |
2532 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
2533 |
Float_t xc[4]; |
Float_t xc[4]; |
2543 |
} else { |
} else { |
2544 |
colo = 1; |
colo = 1; |
2545 |
}; |
}; |
2546 |
ColorMIP(ms32b[j],colo); |
ColorMIP(ms32b[rj],colo); |
2547 |
// |
// |
2548 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
2549 |
if ( mt32[1][j] == 4095. ) colo = noadc; |
if ( mt32[1][rj] == 4095. ) colo = noadc; |
2550 |
// |
// |
2551 |
ftof32yb[j]->SetFillColor(colo); |
ftof32yb[j]->SetFillColor(colo); |
2552 |
ftof32yb[j]->SetLineWidth(1); |
ftof32yb[j]->SetLineWidth(1); |
2777 |
// |
// |
2778 |
// |
// |
2779 |
Bool_t repeat = true; |
Bool_t repeat = true; |
2780 |
Int_t numtr = 1; |
// Int_t numtr = 1; |
2781 |
|
Int_t numtr = 0; |
2782 |
Int_t repuntil = 0; |
Int_t repuntil = 0; |
2783 |
|
Int_t repuntiltr = 0; |
2784 |
// |
// |
2785 |
// |
// |
2786 |
var.tofraw = 0; |
var.tofraw = 0; |
2787 |
// |
// |
2788 |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
2789 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
2790 |
//repuntil = L2->GetNTracks(); |
if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks(); |
2791 |
|
// repuntiltr = L2->GetNTracks(); |
2792 |
// |
// |
2793 |
while ( repeat ){ |
while ( repeat ){ |
2794 |
// printf("B repuntil = %i \n",repuntil); |
// printf("B repuntil = %i \n",repuntil); |
2797 |
// |
// |
2798 |
// |
// |
2799 |
ToFTrkVar *ptt = 0; |
ToFTrkVar *ptt = 0; |
2800 |
|
PamTrack *ptrack = 0; |
2801 |
|
Float_t adc[4][12]; |
2802 |
|
Float_t tdc[4][12]; |
2803 |
|
memset(adc,0,4*12*sizeof(Float_t)); |
2804 |
|
memset(tdc,0,4*12*sizeof(Float_t)); |
2805 |
// |
// |
2806 |
// |
// |
2807 |
|
Int_t myseq = 0; |
2808 |
|
// if ( repuntil == 0 || var.tofraw ){ |
2809 |
if ( repuntil == 1 || var.tofraw ){ |
if ( repuntil == 1 || var.tofraw ){ |
2810 |
numtr = 0; |
numtr = 0; |
2811 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
2812 |
repeat = false; |
repeat = false; |
2813 |
} else { |
} else { |
2814 |
// |
// |
2815 |
|
// printf(" deH_ \n"); |
2816 |
// |
// |
2817 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr == 0 ){ |
2818 |
// |
// printf(" ques \n"); |
2819 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
2820 |
|
myseq = 0; |
2821 |
|
// printf(" que \n"); |
2822 |
|
|
2823 |
|
} else { |
2824 |
|
if ( numtr >= (repuntiltr-1) ) repeat = false; |
2825 |
|
// |
2826 |
|
printf(" numtr is %i \n",numtr); |
2827 |
|
// ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
2828 |
|
ptrack = L2->GetTrack(numtr-1); |
2829 |
|
ptt = ptrack->GetToFTrack(); |
2830 |
|
myseq = ptt->trkseqno + 1; |
2831 |
|
}; |
2832 |
}; |
}; |
2833 |
// |
// |
2834 |
xp11[0] = 0.; |
xp11[0] = 0.; |
2842 |
// |
// |
2843 |
ii = 2; |
ii = 2; |
2844 |
// |
// |
2845 |
Float_t adc[4][12]; |
// Int_t myseq = ptt->trkseqno + 1; |
|
Float_t tdc[4][12]; |
|
|
L2->GetToFLevel2()->GetMatrix(numtr,adc,tdc); |
|
|
|
|
2846 |
// |
// |
2847 |
for ( Int_t i = 0; i<8; i++ ) { |
// printf(" qui \n"); |
2848 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
2849 |
ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
// |
2850 |
}; |
// printf(" qua \n"); |
2851 |
if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
// |
2852 |
ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
// for ( Int_t i = 0; i<8; i++ ) { |
2853 |
}; |
// if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
2854 |
// xp11[i] = 0.; |
// ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
2855 |
}; |
// }; |
2856 |
|
// if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
2857 |
|
// ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
2858 |
|
// }; |
2859 |
|
// xp11[i] = 0.; |
2860 |
|
// }; |
2861 |
|
|
2862 |
Int_t nmtof = 0; |
Int_t nmtof = 0; |
2863 |
Float_t mtof = 0.; |
Float_t mtof = 0.; |
2974 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
2975 |
ColorMIP(ms11a[j]+ms11b[j],colo); |
ColorMIP(ms11a[j]+ms11b[j],colo); |
2976 |
} else { |
} else { |
2977 |
ColorTOFMIP(ms11a[j]+ms11b[j],colo); |
ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo); |
2978 |
}; |
}; |
2979 |
// |
// |
2980 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3004 |
ftof11y->Draw(); |
ftof11y->Draw(); |
3005 |
TPolyLine *sftof11[8]; |
TPolyLine *sftof11[8]; |
3006 |
tt = 1; |
tt = 1; |
3007 |
if ( level.file == -1 ) tt = 8; |
rj=1; |
3008 |
|
if ( level.file == -1 ){ |
3009 |
|
tt = 8; |
3010 |
|
rj = 8; |
3011 |
|
}; |
3012 |
for ( Int_t j=0; j<tt; j++){ |
for ( Int_t j=0; j<tt; j++){ |
3013 |
if ( (mt11[0][j]<4095. || mt11[1][j]<4095.)){ |
rj--; |
3014 |
|
if ( (mt11[0][rj]<4095. || mt11[1][rj]<4095.)){ |
3015 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3016 |
Float_t lowp = (xp11[j]-E11[j])/100.; |
Float_t lowp = -(xp11[rj]+E11[rj])/100.; |
3017 |
Float_t higp = (xp11[j]+E11[j])/100.; |
Float_t higp = -(xp11[rj]-E11[rj])/100.; |
3018 |
if ( lowp < -0.164 ) lowp = -0.164; |
if ( lowp < -0.164 ) lowp = -0.164; |
3019 |
if ( higp > 0.164 ) higp = 0.164; |
if ( higp > 0.164 ) higp = 0.164; |
3020 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){ |
3021 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3022 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
3023 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3042 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
3043 |
ocolo = 10; |
ocolo = 10; |
3044 |
TPolyLine *ftof12y[6]; |
TPolyLine *ftof12y[6]; |
3045 |
|
rj = 6; |
3046 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
3047 |
|
rj--; |
3048 |
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
3049 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
3050 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3061 |
colo = 1; |
colo = 1; |
3062 |
}; |
}; |
3063 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3064 |
ColorMIP(ms12a[j]+ms12b[j],colo); |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
3065 |
} else { |
} else { |
3066 |
ColorTOFMIP(ms12a[j]+ms12b[j],colo); |
ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo); |
3067 |
}; |
}; |
3068 |
// |
// |
3069 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3130 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
3131 |
ocolo = 10; |
ocolo = 10; |
3132 |
TPolyLine *ftof21y[2]; |
TPolyLine *ftof21y[2]; |
3133 |
|
rj=2; |
3134 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
3135 |
|
rj--; |
3136 |
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
3137 |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
3138 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3149 |
colo = 1; |
colo = 1; |
3150 |
}; |
}; |
3151 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3152 |
ColorMIP(ms21a[j]+ms21b[j],colo); |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
3153 |
} else { |
} else { |
3154 |
ColorTOFMIP(ms21a[j]+ms21b[j],colo); |
ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo); |
3155 |
}; |
}; |
3156 |
// |
// |
3157 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3237 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3238 |
ColorMIP(ms22a[j]+ms22b[j],colo); |
ColorMIP(ms22a[j]+ms22b[j],colo); |
3239 |
} else { |
} else { |
3240 |
ColorTOFMIP(ms22a[j]+ms22b[j],colo); |
ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo); |
3241 |
}; |
}; |
3242 |
// |
// |
3243 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3268 |
ftof22y->Draw(); |
ftof22y->Draw(); |
3269 |
TPolyLine *sftof22[2]; |
TPolyLine *sftof22[2]; |
3270 |
tt = 1; |
tt = 1; |
3271 |
if ( level.file == -1 ) tt = 2; |
rj = 1; |
3272 |
|
if ( level.file == -1 ){ |
3273 |
|
tt = 2; |
3274 |
|
rj = 2; |
3275 |
|
}; |
3276 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
3277 |
|
rj--; |
3278 |
// for ( Int_t j=0; j<2; j++){ |
// for ( Int_t j=0; j<2; j++){ |
3279 |
if ( (mt22[0][j]<4095. || mt22[1][j]<4095.) ){ |
if ( (mt22[0][rj]<4095. || mt22[1][rj]<4095.) ){ |
3280 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3281 |
Float_t lowp = (xp22[j]-E22[j])/100.; |
Float_t lowp = -(xp22[rj]+E22[rj])/100.; |
3282 |
Float_t higp = (xp22[j]+E22[j])/100.; |
Float_t higp = -(xp22[rj]-E22[rj])/100.; |
3283 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
3284 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
3285 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){ |
3286 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3287 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
3288 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3302 |
}; |
}; |
3303 |
}; |
}; |
3304 |
// |
// |
3305 |
|
//daquiinbasso |
3306 |
// |
// |
3307 |
// S31 X-view |
// S31 X-view |
3308 |
// |
// |
3328 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3329 |
ColorMIP(ms31a[j]+ms31b[j],colo); |
ColorMIP(ms31a[j]+ms31b[j],colo); |
3330 |
} else { |
} else { |
3331 |
ColorTOFMIP(ms31a[j]+ms31b[j],colo); |
ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo); |
3332 |
}; |
}; |
3333 |
// |
// |
3334 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
3359 |
ftof31y->Draw(); |
ftof31y->Draw(); |
3360 |
TPolyLine *sftof31[3]; |
TPolyLine *sftof31[3]; |
3361 |
tt = 1; |
tt = 1; |
3362 |
if ( level.file == -1 ) tt = 3; |
rj = 1; |
3363 |
|
if ( level.file == -1 ){ |
3364 |
|
tt = 3; |
3365 |
|
rj = 3; |
3366 |
|
}; |
3367 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
3368 |
|
rj--; |
3369 |
// for ( Int_t j=0; j<3; j++){ |
// for ( Int_t j=0; j<3; j++){ |
3370 |
if ( (mt31[0][j]<4095. || mt31[1][j]<4095.)){ |
if ( (mt31[0][rj]<4095. || mt31[1][rj]<4095.)){ |
3371 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
3372 |
Float_t lowp = (xp31[j]-E31[j])/100.; |
Float_t lowp = -(xp31[rj]+E31[rj])/100.; |
3373 |
Float_t higp = (xp31[j]+E31[j])/100.; |
Float_t higp = -(xp31[rj]-E31[rj])/100.; |
3374 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
3375 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
3376 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){ |
3377 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
3378 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
3379 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3400 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
3401 |
ocolo = 10; |
ocolo = 10; |
3402 |
TPolyLine *ftof32y[3]; |
TPolyLine *ftof32y[3]; |
3403 |
|
rj = 3; |
3404 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
3405 |
|
rj--; |
3406 |
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
3407 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
3408 |
Float_t nxc[5]; |
Float_t nxc[5]; |
3419 |
colo = 1; |
colo = 1; |
3420 |
}; |
}; |
3421 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
3422 |
ColorMIP(ms32a[j]+ms32b[j],colo); |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
3423 |
} else { |
} else { |
3424 |
ColorTOFMIP(ms32a[j]+ms32b[j],colo); |
ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo); |
3425 |
}; |
}; |
3426 |
// |
// |
3427 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
4388 |
pcasp4b->Draw("f"); |
pcasp4b->Draw("f"); |
4389 |
pcasp4b->Draw(); |
pcasp4b->Draw(); |
4390 |
}; |
}; |
4391 |
Float_t alfa = 1.2020334; |
// Float_t alfax = 1.2020334; |
4392 |
|
Float_t alfax = 1.22157778; |
4393 |
|
Float_t alfay = 1.27393111; |
4394 |
Float_t lcrd = 0.1815/2.; |
Float_t lcrd = 0.1815/2.; |
4395 |
Float_t wcrd = 0.008; |
Float_t wcrd = 0.008; |
4396 |
if ( true ){ |
if ( true ){ |
4601 |
// |
// |
4602 |
// Float_t cardcx = 0.143168*var.sfx; |
// Float_t cardcx = 0.143168*var.sfx; |
4603 |
//Float_t cardcy = 0.1475*var.sfy; |
//Float_t cardcy = 0.1475*var.sfy; |
4604 |
Float_t cardcx = 0.153168*var.sfx; |
// |
4605 |
Float_t cardcy = 0.1575*var.sfy; |
// Float_t cardcx = 0.153168*var.sfx; |
4606 |
Float_t acrdx[4] = {-lcrd*cos(alfa), lcrd*cos(alfa), -lcrd*cos(alfa)+wcrd*sin(alfa), -lcrd*cos(alfa)}; |
// |
4607 |
Float_t acrdy[4] = {-lcrd*sin(alfa), lcrd*sin(alfa), -lcrd*sin(alfa)-wcrd*cos(alfa), -lcrd*sin(alfa)}; |
Float_t cardcx = (0.19123*(1.-lcrd*cos(alfax)))*var.sfx; |
4608 |
Float_t bcrdx[4] = { lcrd*cos(alfa), lcrd*cos(alfa)+wcrd*sin(alfa), -lcrd*cos(alfa)+wcrd*sin(alfa), lcrd*cos(alfa)}; |
// Float_t cardcy = 0.1575*var.sfy; |
4609 |
Float_t bcrdy[4] = { lcrd*sin(alfa), lcrd*sin(alfa)-wcrd*cos(alfa), -lcrd*sin(alfa)-wcrd*cos(alfa), lcrd*sin(alfa)}; |
Float_t cardcy = (0.179212*(1.-lcrd*sin(alfax)))*var.sfy; |
4610 |
|
Float_t acrdx[4] = {-lcrd*cos(alfax), lcrd*cos(alfax), -lcrd*cos(alfax)+wcrd*sin(alfax), -lcrd*cos(alfax)}; |
4611 |
|
Float_t acrdy[4] = {-lcrd*sin(alfax), lcrd*sin(alfax), -lcrd*sin(alfax)-wcrd*cos(alfax), -lcrd*sin(alfax)}; |
4612 |
|
Float_t bcrdx[4] = { lcrd*cos(alfax), lcrd*cos(alfax)+wcrd*sin(alfax), -lcrd*cos(alfax)+wcrd*sin(alfax), lcrd*cos(alfax)}; |
4613 |
|
Float_t bcrdy[4] = { lcrd*sin(alfax), lcrd*sin(alfax)-wcrd*cos(alfax), -lcrd*sin(alfax)-wcrd*cos(alfax), lcrd*sin(alfax)}; |
4614 |
|
|
4615 |
// |
// |
4616 |
// CARD3 X/ Y |
// CARD3 X/ Y |
4670 |
}; |
}; |
4671 |
|
|
4672 |
if ( true ){ |
if ( true ){ |
4673 |
Float_t acrdx[4] = {-lcrd*cos(alfa), lcrd*cos(alfa), -lcrd*cos(alfa)+wcrd*sin(alfa), -lcrd*cos(alfa)}; |
Float_t acrdx[4] = {-lcrd*cos(alfay), lcrd*cos(alfay), -lcrd*cos(alfay)+wcrd*sin(alfay), -lcrd*cos(alfay)}; |
4674 |
Float_t acrdy[4] = {-lcrd*sin(alfa), lcrd*sin(alfa), -lcrd*sin(alfa)-wcrd*cos(alfa), -lcrd*sin(alfa)}; |
Float_t acrdy[4] = {-lcrd*sin(alfay), lcrd*sin(alfay), -lcrd*sin(alfay)-wcrd*cos(alfay), -lcrd*sin(alfay)}; |
4675 |
Float_t bcrdx[4] = { lcrd*cos(alfa), lcrd*cos(alfa)+wcrd*sin(alfa), -lcrd*cos(alfa)+wcrd*sin(alfa), lcrd*cos(alfa)}; |
Float_t bcrdx[4] = { lcrd*cos(alfay), lcrd*cos(alfay)+wcrd*sin(alfay), -lcrd*cos(alfay)+wcrd*sin(alfay), lcrd*cos(alfay)}; |
4676 |
Float_t bcrdy[4] = { lcrd*sin(alfa), lcrd*sin(alfa)-wcrd*cos(alfa), -lcrd*sin(alfa)-wcrd*cos(alfa), lcrd*sin(alfa)}; |
Float_t bcrdy[4] = { lcrd*sin(alfay), lcrd*sin(alfay)-wcrd*cos(alfay), -lcrd*sin(alfay)-wcrd*cos(alfay), lcrd*sin(alfay)}; |
4677 |
// |
// |
4678 |
// CARD - Y-view |
// CARD - Y-view |
4679 |
// |
// |
4680 |
Float_t cardcx = 0.12*var.sfx; |
// Float_t cardcx = 0.12*var.sfx; |
4681 |
Float_t cardcy = 0.1475*var.sfy; |
Float_t cardcx = (0.16014*(1.-lcrd*cos(alfay)))*var.sfx; |
4682 |
|
// Float_t cardcy = 0.178818*var.sfy; |
4683 |
|
Float_t cardcy = (0.178818*(1.-lcrd*sin(alfay)))*var.sfy; |
4684 |
|
// Float_t cardcy = 0.1475*var.sfy; |
4685 |
// |
// |
4686 |
// CARD4 X Y/ |
// CARD4 X Y/ |
4687 |
// |
// |
5135 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5136 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
5137 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
5138 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
5139 |
|
} else { |
5140 |
|
x = 1024 - trk->addrcluster[l][m]; |
5141 |
}; |
}; |
5142 |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
5143 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5207 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5208 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5209 |
for (Int_t img=0; img<2; img++){ |
for (Int_t img=0; img<2; img++){ |
5210 |
x = singlet->coord[img]; |
x = -singlet->coord[img]; |
5211 |
Float_t xsig = singlet->sgnl; |
Float_t xsig = singlet->sgnl; |
5212 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5213 |
// |
// |
5263 |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
5264 |
// |
// |
5265 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5266 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5267 |
if ( track->xgood[plane] ){ |
if ( track->XGood(plane) ){ |
5268 |
//if ( x > -100 ){ |
//if ( x > -100 ){ |
5269 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5270 |
if ( var.bw ){ |
if ( var.bw ){ |
5272 |
} else { |
} else { |
5273 |
sigcol2 = 1; |
sigcol2 = 1; |
5274 |
}; |
}; |
5275 |
ColorTRKMIP(track->dedx_x[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0); |
5276 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5277 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5278 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5292 |
planepad = plane * 2; |
planepad = plane * 2; |
5293 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
5294 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
5295 |
x = track->ym[plane]; |
x = -track->ym[plane]; |
5296 |
xsig = track->dedx_y[plane]; |
xsig = fabs(track->dedx_y[plane]); |
5297 |
if ( track->ygood[plane] ){ |
if ( track->YGood(plane) ){ |
5298 |
// if ( x > -100 ){ |
// if ( x > -100 ){ |
5299 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
5300 |
if ( var.bw ){ |
if ( var.bw ){ |
5302 |
} else { |
} else { |
5303 |
sigcol2 = 1; |
sigcol2 = 1; |
5304 |
}; |
}; |
5305 |
ColorTRKMIP(track->dedx_y[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0); |
5306 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
5307 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
5308 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
5345 |
// first of all plot crosses relatives to tracks |
// first of all plot crosses relatives to tracks |
5346 |
// |
// |
5347 |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
5348 |
|
// for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
5349 |
|
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
5350 |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
5351 |
TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
PamTrack *ptrack= L2->GetTrack(nt); |
5352 |
|
TrkTrack *track = ptrack->GetTrkTrack(); |
5353 |
|
// |
5354 |
for (Int_t plane = 0; plane<6; plane++){ |
for (Int_t plane = 0; plane<6; plane++){ |
5355 |
// |
// |
5356 |
x = track->xm[plane]; |
x = track->xm[plane]; |
5357 |
Float_t y = track->ym[plane]; |
Float_t y = -track->ym[plane]; |
5358 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
5359 |
Float_t ysig = track->dedx_y[plane]; |
Float_t ysig = fabs(track->dedx_y[plane]); |
5360 |
// if ( x > -100 && y > -100. ){ |
// if ( x > -100 && y > -100. ){ |
5361 |
if ( track->xgood[plane] && track->ygood[plane] ){ |
if ( track->XGood(plane) && track->YGood(plane) ){ |
5362 |
if ( var.bw ){ |
if ( var.bw ){ |
5363 |
sigcol1 = -1; |
sigcol1 = -1; |
5364 |
sigcol2 = -1; |
sigcol2 = -1; |
5476 |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
5477 |
// |
// |
5478 |
x = arrax->At(orderx->At(sing)); |
x = arrax->At(orderx->At(sing)); |
5479 |
Float_t y1 = array1->At(ordery->At(sing)); |
Float_t y1 = -array1->At(ordery->At(sing)); |
5480 |
Float_t y2 = array2->At(ordery->At(sing)); |
Float_t y2 = -array2->At(ordery->At(sing)); |
5481 |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
5482 |
Float_t ysig = sigarray->At(ordery->At(sing)); |
Float_t ysig = sigarray->At(ordery->At(sing)); |
5483 |
if ( x > -100 && y1 > -100. ){ |
if ( x > -100 && y1 > -100. ){ |
5570 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5571 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
5572 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
5573 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
5574 |
|
} else { |
5575 |
|
x = 1024 - trk->addrcluster[l][m]; |
5576 |
}; |
}; |
5577 |
x += 1024.; |
x += 1024.; |
5578 |
if ( trk->signcluster[l][m]> ysig ){ |
if ( trk->signcluster[l][m]> ysig ){ |
5579 |
ysig = trk->signcluster[l][m]; |
ysig = trk->signcluster[l][m]; |
5580 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
5581 |
yh2[ncro] = x; |
yh2[ncro] = x; |
5582 |
}; |
}; |
5583 |
}; |
}; |
5605 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
5606 |
if ( trk->signcluster[e][m] != 0. ){ |
if ( trk->signcluster[e][m] != 0. ){ |
5607 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[e][m]; |
|
|
} else { |
|
5608 |
x = trk->addrcluster[e][m]; |
x = trk->addrcluster[e][m]; |
5609 |
|
} else { |
5610 |
|
x = 1024 - trk->addrcluster[e][m]; |
5611 |
}; |
}; |
5612 |
x += 1024.; |
x += 1024.; |
5613 |
if ( trk->signcluster[e][m]> ysig ){ |
if ( trk->signcluster[e][m]> ysig ){ |
5614 |
ysig = trk->signcluster[e][m]; |
ysig = trk->signcluster[e][m]; |
5615 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
5616 |
yh2[ncro] = x; |
yh2[ncro] = x; |
5617 |
}; |
}; |
5618 |
}; |
}; |
5664 |
|
|
5665 |
void FEVdetector::ShowTrack(){ |
void FEVdetector::ShowTrack(){ |
5666 |
// |
// |
5667 |
|
if ( level.file != 2 ) return; |
5668 |
// |
// |
5669 |
// |
// |
5670 |
if ( var.CALO && false ){ |
// |
5671 |
|
if ( var.CALO && var.CALOT ){ |
5672 |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
5673 |
Float_t calx[22]; |
Float_t calx[22]; |
5674 |
Float_t caly[22]; |
Float_t caly[22]; |
5685 |
}; |
}; |
5686 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
5687 |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
5688 |
caly[plane] = (L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
5689 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
5690 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
5691 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
5734 |
// |
// |
5735 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
5736 |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
5737 |
caly[plane] = (ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
5738 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
5739 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
5740 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
5763 |
}; |
}; |
5764 |
}; |
}; |
5765 |
// |
// |
5766 |
if ( !var.TRK || level.file != 2 ) return; |
if ( !var.TRK ) return; |
5767 |
// |
// |
5768 |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
5769 |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
5770 |
|
|
5771 |
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
5772 |
|
// printf("qui \n"); |
5773 |
PamTrack *ptrack = L2->GetTrack(nt); |
PamTrack *ptrack = L2->GetTrack(nt); |
5774 |
TrkTrack *track = ptrack->GetTrkTrack(); |
TrkTrack *track = ptrack->GetTrkTrack(); |
5775 |
|
// printf("qua \n"); |
5776 |
Int_t npoint = 100; |
Int_t npoint = 100; |
5777 |
Float_t zin[100]; |
Float_t zin[100]; |
5778 |
Double_t xout[100]; |
Double_t xout[100]; |
5821 |
// |
// |
5822 |
Trajectory *tr = new Trajectory(npoint,zin); |
Trajectory *tr = new Trajectory(npoint,zin); |
5823 |
// |
// |
5824 |
ifail = track->DoTrack2(tr); |
// ifail = track->DoTrack2(tr); |
5825 |
|
ifail = track->DoTrack(tr); |
5826 |
// |
// |
5827 |
if ( !ifail ){ |
if ( !ifail ){ |
5828 |
for ( Int_t e = 0; e < npoint ; e++) { |
for ( Int_t e = 0; e < npoint ; e++) { |
5829 |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
5830 |
ty[e] = ((float)tr->y[e]/100.)*var.sfx + var.xyvc; |
ty[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xyvc; |
5831 |
if ( e < 50 ) { |
if ( e < 50 ) { |
5832 |
ptx1[e] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx1[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
5833 |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
5834 |
} else { |
} else { |
5835 |
ptx2[e-50] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx2[e-50] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
5836 |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
5837 |
}; |
}; |
5838 |
if ( e > 84 ) { |
if ( e > 84 ) { |
5839 |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
5840 |
ty1[e-85] = ((float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
ty1[e-85] = (-(float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
5841 |
tzx1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; |
tzx1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; |
5842 |
tzy1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; |
tzy1[e-85] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; |
5843 |
}; |
}; |
5981 |
Int_t se = 5; |
Int_t se = 5; |
5982 |
if ( !l && m%2 == 0 ) se = 3; |
if ( !l && m%2 == 0 ) se = 3; |
5983 |
if ( !l && m%2 != 0 ) se = 2; |
if ( !l && m%2 != 0 ) se = 2; |
5984 |
if ( l && m%2 == 0 ) se = 1; |
if ( l && m%2 != 0 ) se = 1; |
5985 |
if ( l && m%2 != 0 ) se = 0; |
if ( l && m%2 == 0 ) se = 0; |
5986 |
// |
// |
5987 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
5988 |
// |
// |
6077 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6078 |
}; |
}; |
6079 |
if ( l == 1 ) { |
if ( l == 1 ) { |
6080 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(95-n,21-m,1.); |
6081 |
pd2->cd(); |
pd2->cd(); |
6082 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6083 |
}; |
}; |
6097 |
// |
// |
6098 |
// Define variables |
// Define variables |
6099 |
// |
// |
6100 |
Int_t etime = var.etime; |
UInt_t etime = var.etime; |
6101 |
Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96]; |
Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96]; |
6102 |
Int_t badstrip = 0; |
Int_t badstrip = 0; |
6103 |
qtot = 0.; |
qtot = 0.; |
6169 |
if ( calib.ttime[s][b[s]+1] && calib.time[s][b[s]] ){ |
if ( calib.ttime[s][b[s]+1] && calib.time[s][b[s]] ){ |
6170 |
while ( etime > calib.time[s][b[s]] && calib.time[s][b[s]] != 0 ){ |
while ( etime > calib.time[s][b[s]] && calib.time[s][b[s]] != 0 ){ |
6171 |
printf(" CALORIMETER: \n" ); |
printf(" CALORIMETER: \n" ); |
6172 |
printf(" - Section %i, event at time %i while old calibration time limit at %i. Use new calibration at time %i -\n",s,etime,calib.time[s][b[s]],calib.ttime[s][b[s]+1]); |
printf(" - Section %i, event at time %u while old calibration time limit at %u. Use new calibration at time %u -\n",s,(UInt_t)etime,(UInt_t)calib.time[s][b[s]],(UInt_t)calib.ttime[s][b[s]+1]); |
6173 |
printf(" END CALORIMETER. \n\n" ); |
printf(" END CALORIMETER. \n\n" ); |
6174 |
b[s]++; |
b[s]++; |
6175 |
CaloPede(s); |
CaloPede(s); |
6189 |
Int_t se = 5; |
Int_t se = 5; |
6190 |
if (l == 0 && m%2 == 0) se = 3; |
if (l == 0 && m%2 == 0) se = 3; |
6191 |
if (l == 0 && m%2 != 0) se = 2; |
if (l == 0 && m%2 != 0) se = 2; |
6192 |
if (l == 1 && m%2 == 0) se = 1; |
if (l == 1 && m%2 != 0) se = 1; |
6193 |
if (l == 1 && m%2 != 0) se = 0; |
if (l == 1 && m%2 == 0) se = 0; |
6194 |
// |
// |
6195 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
6196 |
// |
// |
6306 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6307 |
}; |
}; |
6308 |
if ( l == 1 ) { |
if ( l == 1 ) { |
6309 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(96-n,21-m,1.); |
6310 |
pd2->cd(); |
pd2->cd(); |
6311 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6312 |
}; |
}; |
6393 |
// |
// |
6394 |
stringstream xvev; |
stringstream xvev; |
6395 |
stringstream yvev; |
stringstream yvev; |
6396 |
for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
// for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
6397 |
|
for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){ |
6398 |
Int_t colo; |
Int_t colo; |
6399 |
Int_t l; |
Int_t l; |
6400 |
Int_t m; |
Int_t m; |
6401 |
Int_t n; |
Int_t n; |
6402 |
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n); |
Bool_t satura = false; |
6403 |
|
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura); |
6404 |
if ( var.bw ){ |
if ( var.bw ){ |
6405 |
colo = -1; |
colo = -1; |
6406 |
} else { |
} else { |
6407 |
colo = 1; |
colo = 1; |
6408 |
}; |
}; |
6409 |
ColorMIP(mip,colo); |
ColorMIP(mip,colo); |
6410 |
if ( l == 0 ) { |
if ( l == 0 ) { |
6411 |
xvev.str(""); |
xvev.str(""); |
6414 |
xvev << " " << l; |
xvev << " " << l; |
6415 |
gDirectory->Delete(xvev.str().c_str()); |
gDirectory->Delete(xvev.str().c_str()); |
6416 |
TH2F *Xview = new TH2F(xvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
TH2F *Xview = new TH2F(xvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
6417 |
Xview->SetFillColor(colo); |
if ( satura ){ |
6418 |
|
Xview->SetFillColor(kBlack); |
6419 |
|
} else { |
6420 |
|
Xview->SetFillColor(colo); |
6421 |
|
}; |
6422 |
Xview->Fill(n,21-m,1.); |
Xview->Fill(n,21-m,1.); |
6423 |
pd1->cd(); |
pd1->cd(); |
6424 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
6430 |
yvev << " " << l; |
yvev << " " << l; |
6431 |
gDirectory->Delete(yvev.str().c_str()); |
gDirectory->Delete(yvev.str().c_str()); |
6432 |
TH2F *Yview = new TH2F(yvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
TH2F *Yview = new TH2F(yvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5); |
6433 |
Yview->SetFillColor(colo); |
if ( satura ){ |
6434 |
Yview->Fill(n,21-m,1.); |
Yview->SetFillColor(kBlack); |
6435 |
|
} else { |
6436 |
|
Yview->SetFillColor(colo); |
6437 |
|
}; |
6438 |
|
Yview->Fill(96-n,21-m,1.); |
6439 |
pd2->cd(); |
pd2->cd(); |
6440 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
6441 |
}; |
}; |
6484 |
for (Int_t d = 0; d<48; d++){ |
for (Int_t d = 0; d<48; d++){ |
6485 |
if ( calib.ttime[s][d] != 0 ) calibex++; |
if ( calib.ttime[s][d] != 0 ) calibex++; |
6486 |
if ( calib.time[s][0] != 0 ){ |
if ( calib.time[s][0] != 0 ){ |
6487 |
if ( d == 0 ) printf(" Section %i from time 0 to time %i use calibration at time %i \n",s,calib.time[s][d],calib.ttime[s][d]); |
if ( d == 0 ) printf(" Section %i from time 0 to time %u use calibration at time %u \n",s,calib.time[s][d],calib.ttime[s][d]); |
6488 |
if ( calib.time[s][d+1] != 0 ) { |
if ( calib.time[s][d+1] != 0 ) { |
6489 |
printf(" Section %i from time %i to time %i use calibration at time %i \n",s,calib.time[s][d],calib.time[s][d+1],calib.ttime[s][d+1]); |
printf(" Section %i from time %u to time %u use calibration at time %u \n",s,calib.time[s][d],calib.time[s][d+1],calib.ttime[s][d+1]); |
6490 |
} else { |
} else { |
6491 |
if ( !stop ){ |
if ( !stop ){ |
6492 |
printf(" Section %i from time %i use calibration at time %i \n",s,calib.time[s][d],calib.ttime[s][d+1]); |
printf(" Section %i from time %u use calibration at time %u \n",s,calib.time[s][d],calib.ttime[s][d+1]); |
6493 |
stop = 1; |
stop = 1; |
6494 |
}; |
}; |
6495 |
}; |
}; |
6496 |
} else { |
} else { |
6497 |
if ( calib.ttime[s][d] != 0 ) printf(" Section %i from time 0 use calibration at time %i \n",s,calib.ttime[s][d]); |
if ( calib.ttime[s][d] != 0 ) printf(" Section %i from time 0 use calibration at time %u \n",s,calib.ttime[s][d]); |
6498 |
}; |
}; |
6499 |
}; |
}; |
6500 |
printf("\n"); |
printf("\n"); |
6559 |
calib.ttime[s][inter] = 0; |
calib.ttime[s][inter] = 0; |
6560 |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
6561 |
//calib.ttime[s][inter] = cph->GetOrbitalTime(); |
//calib.ttime[s][inter] = cph->GetOrbitalTime(); |
6562 |
calib.ttime[s][inter] = cph->OrbitalTime; |
calib.ttime[s][inter] = (UInt_t)cph->OrbitalTime; |
6563 |
inter++; |
inter++; |
6564 |
} else { |
} else { |
6565 |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] != 0 ) { |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] != 0 ) { |
6613 |
tr->GetEntry(ci); |
tr->GetEntry(ci); |
6614 |
cph = ceh->GetPscuHeader(); |
cph = ceh->GetPscuHeader(); |
6615 |
//if ( atime == cph->GetOrbitalTime()){ |
//if ( atime == cph->GetOrbitalTime()){ |
6616 |
if ( atime == cph->OrbitalTime){ |
if ( atime == (UInt_t)cph->OrbitalTime){ |
6617 |
// calib.iev = ce->iev; |
// calib.iev = ce->iev; |
6618 |
if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
6619 |
for ( Int_t d=0 ; d<11 ;d++ ){ |
for ( Int_t d=0 ; d<11 ;d++ ){ |