| 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 |
|
L2 = 0; |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
void FEVdetector::Reset(){ |
| 103 |
|
L2 = NULL; |
| 104 |
} |
} |
| 105 |
|
|
| 106 |
void FEVdetector::checkctrlword(){ |
void FEVdetector::checkctrlword(){ |
| 109 |
var.AC = 0; |
var.AC = 0; |
| 110 |
var.RUN = 1; |
var.RUN = 1; |
| 111 |
var.TRK = 0; |
var.TRK = 0; |
| 112 |
|
var.ORB = 1; |
| 113 |
|
var.TRG = 1; |
| 114 |
var.CALO = 0; |
var.CALO = 0; |
| 115 |
|
var.CALOT = 0; |
| 116 |
var.S4 = 0; |
var.S4 = 0; |
| 117 |
var.ND = 0; |
var.ND = 0; |
| 118 |
var.INFOS = 0; |
var.INFOS = 0; |
| 119 |
var.VINFOS = 0; |
var.VINFOS = 0; |
| 120 |
var.PALETTE = 0; |
var.PALETTE = 0; |
| 121 |
|
var.PATTRIG = 1; |
| 122 |
if ( *ctrlword & (1<<0) ) { |
if ( *ctrlword & (1<<0) ) { |
| 123 |
var.PALETTE = 1; |
var.PALETTE = 1; |
| 124 |
}; |
}; |
| 146 |
if ( *ctrlword & (1<<8) ) { |
if ( *ctrlword & (1<<8) ) { |
| 147 |
var.TOF = 1; |
var.TOF = 1; |
| 148 |
}; |
}; |
| 149 |
|
if ( *ctrlword & (1<<9) ) { |
| 150 |
|
var.PATTRIG = 1; |
| 151 |
|
}; |
| 152 |
} |
} |
| 153 |
|
|
| 154 |
void FEVdetector::SetDDEC(TString de){ |
void FEVdetector::SetDDEC(TString de){ |
| 156 |
}; |
}; |
| 157 |
|
|
| 158 |
void FEVdetector::GetWindow(){ |
void FEVdetector::GetWindow(){ |
| 159 |
otr->GetEntry(maxevent); |
// |
| 160 |
|
if ( level.file == 2 ){ |
| 161 |
|
// printf("0qui\n"); |
| 162 |
|
L2->GetEntry(minevent); |
| 163 |
|
} else { |
| 164 |
|
otr->GetEntry(minevent); |
| 165 |
|
} |
| 166 |
if ( level.file < 2 ){ |
if ( level.file < 2 ){ |
| 167 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 168 |
lastevno = (int)ph->Counter; |
firstevno = (int)ph->Counter; |
| 169 |
} else { |
} else { |
| 170 |
lastevno = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! |
if ( var.ORB ){ |
| 171 |
|
firstevno = L2->GetOrbitalInfo()->pkt_num; |
| 172 |
|
} else { |
| 173 |
|
firstevno = 0; |
| 174 |
|
}; |
| 175 |
}; |
}; |
| 176 |
otr->GetEntry(minevent); |
// |
| 177 |
|
if ( level.file == 2 ){ |
| 178 |
|
// printf("1qui\n"); |
| 179 |
|
L2->GetEntry(maxevent); |
| 180 |
|
} else { |
| 181 |
|
otr->GetEntry(maxevent); |
| 182 |
|
} |
| 183 |
|
// |
| 184 |
if ( level.file < 2 ){ |
if ( level.file < 2 ){ |
| 185 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 186 |
firstevno = (int)ph->Counter; |
lastevno = (int)ph->Counter; |
| 187 |
} else { |
} else { |
| 188 |
firstevno = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have pkt_counter in the level2 file! |
if ( var.ORB ){ |
| 189 |
|
lastevno = L2->GetOrbitalInfo()->pkt_num; |
| 190 |
|
} else { |
| 191 |
|
lastevno = 0; |
| 192 |
|
}; |
| 193 |
}; |
}; |
| 194 |
|
// |
| 195 |
} |
} |
| 196 |
|
|
| 197 |
void FEVdetector::ClearVariables(){ |
void FEVdetector::ClearVariables(){ |
| 214 |
} |
} |
| 215 |
|
|
| 216 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
| 217 |
thisentry = i; |
thisentry = i; |
| 218 |
otr->GetEntry(i); |
if ( level.file == 2 ){ |
| 219 |
// PrintData(otr,-1LL,44); |
// L2->Clear(); |
| 220 |
|
// printf("qui\n"); |
| 221 |
|
L2->GetEntry(i); |
| 222 |
|
if ( var.showall ){ |
| 223 |
|
ShowInfo("RunInfo"); |
| 224 |
|
ShowInfo("SoftInfo"); |
| 225 |
|
ShowInfo("OrbitalInfo"); |
| 226 |
|
ShowInfo("TrigLevel2"); |
| 227 |
|
ShowInfo("ToFLevel2"); |
| 228 |
|
ShowInfo("TrkLevel2"); |
| 229 |
|
ShowInfo("AcLevel2"); |
| 230 |
|
ShowInfo("CaloLevel2"); |
| 231 |
|
ShowInfo("CaloLevel1"); |
| 232 |
|
ShowInfo("S4Level2"); |
| 233 |
|
ShowInfo("NDLevel2"); |
| 234 |
|
} else { |
| 235 |
|
if ( var.showrun ) ShowInfo("RunInfo"); |
| 236 |
|
if ( var.showsi ) ShowInfo("SoftInfo"); |
| 237 |
|
if ( var.showorb ) ShowInfo("OrbitalInfo"); |
| 238 |
|
if ( var.showtrg ) ShowInfo("TrigLevel2"); |
| 239 |
|
if ( var.showtof ) ShowInfo("ToFLevel2"); |
| 240 |
|
if ( var.showtrk ) ShowInfo("TrkLevel2"); |
| 241 |
|
if ( var.showac ) ShowInfo("AcLevel2"); |
| 242 |
|
if ( var.showcal ) ShowInfo("CaloLevel2"); |
| 243 |
|
if ( var.showcal ) ShowInfo("CaloLevel1"); |
| 244 |
|
if ( var.shows4 ) ShowInfo("S4Level2"); |
| 245 |
|
if ( var.shownd ) ShowInfo("NDLevel2"); |
| 246 |
|
}; |
| 247 |
|
} else { |
| 248 |
|
otr->GetEntry(i); |
| 249 |
|
if ( var.showall ){ |
| 250 |
|
ShowInfo("Pscu"); |
| 251 |
|
ShowInfo("Trigger"); |
| 252 |
|
ShowInfo("Tof"); |
| 253 |
|
ShowInfo("Tracker"); |
| 254 |
|
ShowInfo("Anticounter"); |
| 255 |
|
ShowInfo("Calorimeter"); |
| 256 |
|
ShowInfo("S4"); |
| 257 |
|
ShowInfo("Neutron"); |
| 258 |
|
} else { |
| 259 |
|
if ( var.showorb ) ShowInfo("Pscu"); |
| 260 |
|
if ( var.showtrg ) ShowInfo("Trigger"); |
| 261 |
|
if ( var.showtof ) ShowInfo("Tof"); |
| 262 |
|
if ( var.showtrk ) ShowInfo("Tracker"); |
| 263 |
|
if ( var.showac ) ShowInfo("Anticounter"); |
| 264 |
|
if ( var.showcal ) ShowInfo("Calorimeter"); |
| 265 |
|
if ( var.shows4 ) ShowInfo("S4"); |
| 266 |
|
if ( var.shownd ) ShowInfo("Neutron"); |
| 267 |
|
}; |
| 268 |
|
}; |
| 269 |
} |
} |
| 270 |
|
|
| 271 |
void FEVdetector::SetEntry(Int_t i){ |
void FEVdetector::SetEntry(Int_t i){ |
| 386 |
}; |
}; |
| 387 |
} |
} |
| 388 |
|
|
| 389 |
void FEVdetector::PrintLeaves(TTree *otr, Int_t i, TBranchElement *tb, Int_t lenmax){ |
void FEVdetector::ShowInfo(TString detector){ |
| 390 |
// -- Prints values of leaves. |
// |
| 391 |
|
TBranch *b1 = 0; |
| 392 |
// tb->ValidateAddress(); |
// TBranch *b3 = 0; |
| 393 |
printf("son qua \n"); |
TObjArray *branch_array = 0; |
| 394 |
|
// TObjArray *leaf_array = 0; |
| 395 |
|
// |
| 396 |
|
if ( !strcmp(detector.Data(),"RunInfo") || !strcmp(detector.Data(),"SoftInfo") ){ |
| 397 |
|
if ( L2->GetRunTree() ) b1 = L2->GetRunTree()->FindBranch(detector.Data()); |
| 398 |
|
} else { |
| 399 |
|
b1 = otr->FindBranch(detector.Data()); |
| 400 |
|
}; |
| 401 |
|
// |
| 402 |
|
if ( !b1 ) return; |
| 403 |
|
// |
| 404 |
|
Int_t dlen = 10; |
| 405 |
|
// |
| 406 |
|
char o[200000]; |
| 407 |
|
char zz[200000]; |
| 408 |
|
char col[13]; |
| 409 |
|
char col2[13]; |
| 410 |
|
// |
| 411 |
|
setcolor(col,RESET, GREEN, WHITE); |
| 412 |
|
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
| 413 |
|
sprintf(zz,"======> EVENT:%i\n", thisentry); |
| 414 |
|
// |
| 415 |
|
setcolor(col,RESET, RED, WHITE); |
| 416 |
|
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
| 417 |
|
sprintf(zz,"%sBranch %s\n",zz,b1->GetName()); |
| 418 |
|
setcolor(col,RESET, BLACK, WHITE); |
| 419 |
|
sprintf(o,"%s%s",o,col); |
| 420 |
|
// |
| 421 |
|
branch_array = b1->GetListOfBranches(); |
| 422 |
|
// |
| 423 |
|
Int_t j = 0; |
| 424 |
|
// |
| 425 |
|
for(Int_t l=0;l<(branch_array->GetLast()+1);l++){ |
| 426 |
|
// |
| 427 |
|
TBranchElement *tb = (TBranchElement*)branch_array->At(l); |
| 428 |
|
Int_t type = tb->GetType(); |
| 429 |
|
Int_t atype = tb->GetStreamerType() - 20; |
| 430 |
|
// Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
| 431 |
|
Int_t len = tb->GetInfo()->GetLength(tb->GetID()); |
| 432 |
|
Int_t length = min(len,dlen); |
| 433 |
|
// |
| 434 |
|
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
| 435 |
|
switch (type){ |
| 436 |
|
case 0: |
| 437 |
|
// |
| 438 |
|
// IS A VARIABLE |
| 439 |
|
// |
| 440 |
|
// |
| 441 |
|
// NAME |
| 442 |
|
// |
| 443 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 444 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 445 |
|
sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2); |
| 446 |
|
sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName()); |
| 447 |
|
// |
| 448 |
|
j = 0; |
| 449 |
|
// |
| 450 |
|
// VALUES |
| 451 |
|
// |
| 452 |
|
// |
| 453 |
|
// Integer |
| 454 |
|
// |
| 455 |
|
if ( atype == 3 || atype == -17 ){ |
| 456 |
|
while ( j < length ){ |
| 457 |
|
if ( j < length -1 ){ |
| 458 |
|
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
| 459 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0)); |
| 460 |
|
} else { |
| 461 |
|
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
| 462 |
|
sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0)); |
| 463 |
|
}; |
| 464 |
|
j++; |
| 465 |
|
}; |
| 466 |
|
}; |
| 467 |
|
// |
| 468 |
|
// Unsigned integer |
| 469 |
|
// |
| 470 |
|
if ( atype == -7 || atype == 13 || atype == -9 || atype == -8 || atype == 12 ){ |
| 471 |
|
while ( j < length ){ |
| 472 |
|
if ( j < length -1 ){ |
| 473 |
|
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
| 474 |
|
sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0)); |
| 475 |
|
} else { |
| 476 |
|
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
| 477 |
|
sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0)); |
| 478 |
|
}; |
| 479 |
|
j++; |
| 480 |
|
}; |
| 481 |
|
}; |
| 482 |
|
// |
| 483 |
|
// Float |
| 484 |
|
// |
| 485 |
|
if ( atype == -15 || atype == 5 ){ |
| 486 |
|
while ( j < length ){ |
| 487 |
|
if ( j < length -1 ){ |
| 488 |
|
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
| 489 |
|
sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0)); |
| 490 |
|
} else { |
| 491 |
|
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
| 492 |
|
sprintf(zz,"%s %f",zz,tb->GetValue(j,0)); |
| 493 |
|
}; |
| 494 |
|
j++; |
| 495 |
|
}; |
| 496 |
|
}; |
| 497 |
|
// |
| 498 |
|
// Strings |
| 499 |
|
// |
| 500 |
|
if ( atype == 45 ){ |
| 501 |
|
// TObjArray *cl = (TObjArray*)(tb->GetInfo()->GetOffsets())[tb->GetID()];//tb->GetValuePointer(); |
| 502 |
|
// TString *stringa = (TString*)(*cl)[0]; |
| 503 |
|
// TBranchElement *utb = (TBranchElement*)tb->GetBranchCount(); |
| 504 |
|
// TString** stringa = (TString*)(&tb->GetValuePointer()); |
| 505 |
|
//TStreamerElement *tste = (TStreamerElement*)tb->GetInfo()->GetCurrentElement(); |
| 506 |
|
|
| 507 |
|
// char *ladd; |
| 508 |
|
// ladd = tb->GetValuePointer() |
| 509 |
|
// TString *stringa = (TString*)((tste->GetOffset())); |
| 510 |
|
// TString& mstr = *stringa; |
| 511 |
|
// printf(" la mia stringa %s \n",mstr.Data()); |
| 512 |
|
// printf(" offset %i \n",(Int_t)utb->GetValue(0,0)); |
| 513 |
|
// int pointer = (tb->GetInfo()->GetOffsets())[tb->GetID()]; |
| 514 |
|
// TString *stringa = (TString*)(tb->GetInfo()->GetOffsets())[tb->GetID()]; |
| 515 |
|
// TString *stringa = (TString*)tb->GetAddress(); |
| 516 |
|
// printf(" address 0x%X \n",tb->GetAddress()); |
| 517 |
|
// printf(" pointer 0x%X \n",tb->GetValuePointer()); |
| 518 |
|
// printf(" object 0x%X \n",tb->GetObject()); |
| 519 |
|
// printf("stringa %s lung %i\n",stringa.Data(),stringa.Length()); |
| 520 |
|
// TLeaf *striglia = tb->FindLeaf(tb->GetName()); |
| 521 |
|
// if ( striglia ){ |
| 522 |
|
// char *pointer = (char *)striglia->GetValuePointer(); |
| 523 |
|
// TString *pr= (TString*)pointer; |
| 524 |
|
// printf("ciao %s \n",pr->Data()); |
| 525 |
|
// }; |
| 526 |
|
sprintf(o,"%s TString - not implemented yet -",o); |
| 527 |
|
sprintf(zz,"%s TString - not implemented yet -",zz); |
| 528 |
|
}; |
| 529 |
|
// |
| 530 |
|
// TArray |
| 531 |
|
// |
| 532 |
|
if ( atype == 42 ){ |
| 533 |
|
// |
| 534 |
|
// TObjArray *cl = (TObjArray*)tb->GetObject(); |
| 535 |
|
// // |
| 536 |
|
// TClass *myc = cl->IsA(); |
| 537 |
|
// // |
| 538 |
|
// printf("qui \n"); |
| 539 |
|
// // |
| 540 |
|
// // determine offset to fetch data |
| 541 |
|
// // |
| 542 |
|
// int thisoffset = 0; |
| 543 |
|
// TRealData *rd = myc->GetRealData(tb->GetName()); |
| 544 |
|
// if ( rd ){ |
| 545 |
|
// thisoffset = rd->GetThisOffset(); |
| 546 |
|
// }; |
| 547 |
|
// Int_t niente = 0; |
| 548 |
|
// TStreamerElement *tste = tb->GetInfo()->GetStreamerElement(rd->GetName(),niente); |
| 549 |
|
// printf(" typename %s \n",tste->GetTypeName()); |
| 550 |
|
// // |
| 551 |
|
// // TArrayI |
| 552 |
|
// // |
| 553 |
|
// if ( !strcmp(tste->GetTypeName(),"TArrayI") ){ |
| 554 |
|
// // |
| 555 |
|
// printf("qua \n"); |
| 556 |
|
// char *pointer = (char*)cl->At(0); |
| 557 |
|
// // char *pu = thisoffset + pointer; |
| 558 |
|
// int pu = (int)tste->GetTObjectOffset(); |
| 559 |
|
// TArrayI arr = (TArrayI)*pu; |
| 560 |
|
// // TArrayI arr = (TArrayI)(thisoffset); |
| 561 |
|
// //TArrayI *arr = (TArrayI*)pu; |
| 562 |
|
// //TArraI arr = (TArrayI) |
| 563 |
|
// Int_t jj=0; |
| 564 |
|
// j=0; |
| 565 |
|
// printf("quii \n"); |
| 566 |
|
// Int_t arlen = min(arr.GetSize(),dlen); |
| 567 |
|
// // |
| 568 |
|
// printf("que \n"); |
| 569 |
|
// setcolor(col,RESET, BLUE, WHITE); |
| 570 |
|
// setcolor(col2,RESET, BLACK, WHITE); |
| 571 |
|
// sprintf(o,"%s%s %s[%i]%s = ",o,col,tb->GetName(),arr.GetSize(),col2); |
| 572 |
|
// // |
| 573 |
|
// // while ( j < tb->GetNdata() ){ |
| 574 |
|
// // |
| 575 |
|
// printf("quo \n"); |
| 576 |
|
// // pointer = (char*)cl->UncheckedAt(j); |
| 577 |
|
// // pu = pointer + thisoffset; |
| 578 |
|
// // arr = (TArrayI*)(thisoffset); |
| 579 |
|
// // |
| 580 |
|
// while ( jj < arlen ){ |
| 581 |
|
// if ( jj < arlen-1 ){ |
| 582 |
|
// sprintf(o,"%s %i ,",o,arr.At(jj)); |
| 583 |
|
// } else { |
| 584 |
|
// sprintf(o,"%s %i",o,arr.At(jj)); |
| 585 |
|
// }; |
| 586 |
|
// jj++; |
| 587 |
|
// }; |
| 588 |
|
// // if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 589 |
|
// // j++; |
| 590 |
|
// // }; |
| 591 |
|
// }; |
| 592 |
|
// // |
| 593 |
|
// // TArrayF |
| 594 |
|
// // |
| 595 |
|
// if ( !strcmp(tste->GetTypeName(),"TArrayF") ){ |
| 596 |
|
// // |
| 597 |
|
// char *pointer = (char*)cl->UncheckedAt(0); |
| 598 |
|
// char *pu = pointer + thisoffset; |
| 599 |
|
// TArrayF *arr = (TArrayF*)(pu); |
| 600 |
|
// Int_t jj=0; |
| 601 |
|
// Int_t arlen = min(arr->GetSize(),dlen); |
| 602 |
|
// // |
| 603 |
|
// setcolor(col,RESET, BLUE, WHITE); |
| 604 |
|
// setcolor(col2,RESET, BLACK, WHITE); |
| 605 |
|
// sprintf(o,"%s%s %s[%i]%s = ",o,col,tb->GetName(),arr->GetSize(),col2); |
| 606 |
|
// // |
| 607 |
|
// while ( j < tb->GetNdata() ){ |
| 608 |
|
// // |
| 609 |
|
// pointer = (char*)cl->UncheckedAt(j); |
| 610 |
|
// pu = pointer + thisoffset; |
| 611 |
|
// arr = (TArrayF*)(pu); |
| 612 |
|
// // |
| 613 |
|
// while ( jj < arlen ){ |
| 614 |
|
// if ( jj < arlen-1 ){ |
| 615 |
|
// sprintf(o,"%s %f ,",o,arr->At(jj)); |
| 616 |
|
// } else { |
| 617 |
|
// sprintf(o,"%s %f",o,arr->At(jj)); |
| 618 |
|
// }; |
| 619 |
|
// jj++; |
| 620 |
|
// }; |
| 621 |
|
// if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 622 |
|
// j++; |
| 623 |
|
// }; |
| 624 |
|
// }; |
| 625 |
|
// sprintf(o,"%s\n",o); |
| 626 |
|
// |
| 627 |
|
sprintf(o,"%s TArray - not implemented yet -",o); |
| 628 |
|
sprintf(zz,"%s TArray - not implemented yet -",zz); |
| 629 |
|
// |
| 630 |
|
}; |
| 631 |
|
// |
| 632 |
|
sprintf(o,"%s\n",o); |
| 633 |
|
sprintf(zz,"%s\n",zz); |
| 634 |
|
break; |
| 635 |
|
case 3: |
| 636 |
|
// |
| 637 |
|
// IS A TCLONESARRAY |
| 638 |
|
// |
| 639 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 640 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 641 |
|
sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata()); |
| 642 |
|
sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata()); |
| 643 |
|
|
| 644 |
// if (otr->GetMakeClass()) { |
// |
| 645 |
if (!tb->GetAddress()) { |
if ( tb->GetNdata() ){ |
| 646 |
printf("esco \n"); |
// |
| 647 |
return; |
TClonesArray *cl = (TClonesArray*)tb->GetObject(); |
| 648 |
} |
// |
| 649 |
if (tb->GetType() == 3 || tb->GetType() == 4) { |
TClass *myc = cl->GetClass(); |
| 650 |
// TClonesArray or STL container top-level branch. |
// |
| 651 |
printf("3 o 4 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
TList *lme = myc->GetListOfDataMembers(); |
| 652 |
return; |
TIter next(lme); |
| 653 |
} else if (tb->GetType() == 31 || tb->GetType() == 41) { |
TBranchElement *tb2 = 0; |
| 654 |
printf(" 31 o 41 \n"); |
// |
| 655 |
// TClonesArray or STL container sub-branch. |
while ( (tb2 = (TBranchElement*)next()) ){ |
| 656 |
Int_t n = TMath::Min(10, tb->GetNdata()); |
// |
| 657 |
Int_t atype = tb->GetStreamerType() + 20; |
const char *name = tb2->GetName(); |
| 658 |
if (tb->GetStreamerType() == 1) { |
TBranch *foglia = tb->FindBranch(name); |
| 659 |
// TVirtualStreamerInfo::kOffsetL + TVirtualStreamerInfo::kChar is |
if ( foglia ){ |
| 660 |
// printed as a string and could print weird characters. |
// |
| 661 |
// So we print an unsigned char instead (not perfect, but better). |
TBranchElement *stb = (TBranchElement*)tb->FindBranch(name); |
| 662 |
atype = 20 + 11 ; |
Int_t stype = stb->GetType(); |
| 663 |
} |
Int_t satype = stb->GetStreamerType() - 20; |
| 664 |
if (atype > 54) { |
// Int_t slen = (stb->GetInfo()->GetLengths())[stb->GetID()]; |
| 665 |
// FIXME: More logic required here (like in ReadLeaves) |
Int_t slen = stb->GetInfo()->GetLength(stb->GetID()); |
| 666 |
printf(">54 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
Int_t slength = min(slen,dlen); |
| 667 |
return; |
// printf("SubBranches : atype is %i type is %i tb getname %s slen %i slength %i\n",satype,stype,stb->GetName(),slen,slength); |
| 668 |
} |
switch (stype){ |
| 669 |
if (tb->GetStreamerType() > 20) { |
case 31: |
| 670 |
atype -= 20; |
// |
| 671 |
TObjArray *prova= otr->GetListOfLeaves(); |
// IS A VARIABLE |
| 672 |
// TObjArray* leaf2 = (TObjArray*) prova->UncheckedAt(i); |
// |
| 673 |
//TLeaf* leaf = (TLeaf*)(otr->GetLeaf(tb->GetName())); |
// |
| 674 |
// TLeafElement* leaf = (TLeafElement*)((TLeaf*)(otr->GetListOfLeaves()->UncheckedAt(i))->GetBranch()->UncheckedAt(0)); |
// NAME |
| 675 |
TLeafElement* leaf = (TLeafElement*)(prova->UncheckedAt(0)); |
// |
| 676 |
n = n * leaf->GetLenStatic(); |
j = 0; |
| 677 |
} |
// |
| 678 |
if (tb->GetInfo()) { |
// VALUES |
| 679 |
// n = 16; |
// |
| 680 |
tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); |
if ( satype == 41 || satype == 44){ |
| 681 |
//tb->GetObject()->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), atype, n, lenmax); |
// |
| 682 |
} |
// skip TRef |
| 683 |
return; |
// |
| 684 |
} else if (tb->GetType() <= 2) { |
break; |
| 685 |
printf(" <=2 \n"); |
}; |
| 686 |
// Branch in split mode. |
// |
| 687 |
// FIXME: This should probably be < 60 instead. |
// Integer |
| 688 |
if ((tb->GetStreamerType() > 40) && (tb->GetStreamerType() < 55)) { |
// |
| 689 |
Int_t atype = tb->GetStreamerType() - 20; |
if ( satype == -17 || satype == -9 ){ |
| 690 |
TBranchElement* counterElement = (TBranchElement*) tb->GetBranchCount(); |
// |
| 691 |
Int_t n = (Int_t) counterElement->GetValue(0, 0); |
setcolor(col,RESET, BLUE, WHITE); |
| 692 |
if (tb->GetInfo()) { |
setcolor(col2,RESET, BLACK, WHITE); |
| 693 |
tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 694 |
} |
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
| 695 |
} else { |
while ( j < cl->GetEntriesFast() ){ |
| 696 |
// if (tb->GetInfo()) { |
if ( j < cl->GetEntriesFast() -1 ){ |
| 697 |
// tb->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), tb->GetID(), -1, lenmax); |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
| 698 |
// } |
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,slength)); |
| 699 |
// } |
} else { |
| 700 |
return; |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
| 701 |
} |
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength)); |
| 702 |
} else if (tb->GetType() == 3) { |
}; |
| 703 |
printf("3 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
j++; |
| 704 |
} else if (tb->GetType() == 31) { |
}; |
| 705 |
printf("31 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
}; |
| 706 |
// TClonesArray* clones = (TClonesArray*) tb->GetObject(); |
// |
| 707 |
// if (tb->GetInfo()) { |
// Float |
| 708 |
// tb->GetInfo()->PrintValueClones(tb->GetName(), clones, tb->GetID(), tb->GetOffset(), lenmax); |
// |
| 709 |
// } |
if ( satype == -15 ){ |
| 710 |
} else if (tb->GetType() == 41) { |
// |
| 711 |
printf("41 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
setcolor(col,RESET, BLUE, WHITE); |
| 712 |
// TVirtualCollectionProxy::TPushPop helper(((TBranchElement*) this)->GetCollectionProxy(), fObject); |
setcolor(col2,RESET, BLACK, WHITE); |
| 713 |
// if (GetInfo()) { |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 714 |
// GetInfo()->PrintValueSTL(GetName(), ((TBranchElement*) this)->GetCollectionProxy(), fID, fOffset, lenmax); |
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
| 715 |
// } |
while ( j < cl->GetEntriesFast() ){ |
| 716 |
} else { |
if ( j < cl->GetEntriesFast() -1 ){ |
| 717 |
printf("else %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
| 718 |
// if (GetInfo()) { |
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,slength)); |
| 719 |
// GetInfo()->PrintValue(GetName(), fObject, fID, -1, lenmax); |
} else { |
| 720 |
// } |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
| 721 |
} |
sprintf(zz,"%s %f",zz,stb->GetValue(j,slength)); |
| 722 |
|
}; |
| 723 |
|
j++; |
| 724 |
|
}; |
| 725 |
|
}; |
| 726 |
|
// |
| 727 |
|
// Array of float |
| 728 |
|
// |
| 729 |
|
if ( satype == 5 ){ |
| 730 |
|
// |
| 731 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 732 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 733 |
|
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 734 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
| 735 |
|
Bool_t bold = true; |
| 736 |
|
while ( j < tb->GetNdata() ){ |
| 737 |
|
if ( bold ){ |
| 738 |
|
setcolor(col,RESET, BLACK, WHITE); |
| 739 |
|
sprintf(o,"%s%s",o,col); |
| 740 |
|
} else { |
| 741 |
|
setcolor(col,BOLD, BLACK, WHITE); |
| 742 |
|
sprintf(o,"%s%s",o,col); |
| 743 |
|
}; |
| 744 |
|
Int_t jj = 0; |
| 745 |
|
while ( jj < slength ){ |
| 746 |
|
if ( jj < slength-1 ){ |
| 747 |
|
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
| 748 |
|
sprintf(zz,"%s %f ,",zz,stb->GetValue(j,jj,true)); |
| 749 |
|
} else { |
| 750 |
|
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
| 751 |
|
sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true)); |
| 752 |
|
}; |
| 753 |
|
jj++; |
| 754 |
|
}; |
| 755 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 756 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
| 757 |
|
if ( !bold ){ |
| 758 |
|
bold = true; |
| 759 |
|
} else { |
| 760 |
|
bold = false; |
| 761 |
|
}; |
| 762 |
|
j++; |
| 763 |
|
}; |
| 764 |
|
if ( bold ){ |
| 765 |
|
setcolor(col,RESET, BLACK, WHITE); |
| 766 |
|
sprintf(o,"%s%s",o,col); |
| 767 |
|
}; |
| 768 |
|
}; |
| 769 |
|
// |
| 770 |
|
// Array of integers |
| 771 |
|
// |
| 772 |
|
if ( satype == 3 ){ |
| 773 |
|
// |
| 774 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 775 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 776 |
|
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 777 |
|
sprintf(zz,"%s %-15s = ",zz,foglia->GetName()); |
| 778 |
|
while ( j < tb->GetNdata() ){ |
| 779 |
|
Int_t jj = 0; |
| 780 |
|
while ( jj < slength ){ |
| 781 |
|
if ( jj < slength-1 ){ |
| 782 |
|
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
| 783 |
|
sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,jj,true)); |
| 784 |
|
} else { |
| 785 |
|
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
| 786 |
|
sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true)); |
| 787 |
|
}; |
| 788 |
|
jj++; |
| 789 |
|
}; |
| 790 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 791 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
| 792 |
|
j++; |
| 793 |
|
}; |
| 794 |
|
}; |
| 795 |
|
|
| 796 |
// }; |
// |
| 797 |
printf("esco qui\n"); |
// TArray |
| 798 |
|
// |
| 799 |
|
if ( satype == 42 ){ |
| 800 |
|
// |
| 801 |
|
// determine offset to fetch data |
| 802 |
|
// |
| 803 |
|
int thisoffset = 0; |
| 804 |
|
TRealData *rd = myc->GetRealData(foglia->GetName()); |
| 805 |
|
if ( rd ){ |
| 806 |
|
thisoffset = rd->GetThisOffset(); |
| 807 |
|
}; |
| 808 |
|
Int_t niente = 0; |
| 809 |
|
TStreamerElement *tste = stb->GetInfo()->GetStreamerElement(rd->GetName(),niente); |
| 810 |
|
// |
| 811 |
|
// TArrayI |
| 812 |
|
// |
| 813 |
|
if ( !strcmp(tste->GetTypeName(),"TArrayI") ){ |
| 814 |
|
// |
| 815 |
|
char *pointer = (char*)cl->UncheckedAt(0); |
| 816 |
|
char *pu = pointer + thisoffset; |
| 817 |
|
TArrayI *arr = (TArrayI*)(pu); |
| 818 |
|
Int_t jj=0; |
| 819 |
|
Int_t arlen = min(arr->GetSize(),dlen); |
| 820 |
|
// |
| 821 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 822 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 823 |
|
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
| 824 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
| 825 |
|
// |
| 826 |
|
while ( j < tb->GetNdata() ){ |
| 827 |
|
// |
| 828 |
|
pointer = (char*)cl->UncheckedAt(j); |
| 829 |
|
pu = pointer + thisoffset; |
| 830 |
|
arr = (TArrayI*)(pu); |
| 831 |
|
// |
| 832 |
|
while ( jj < arlen ){ |
| 833 |
|
if ( jj < arlen-1 ){ |
| 834 |
|
sprintf(o,"%s %i ,",o,arr->At(jj)); |
| 835 |
|
sprintf(zz,"%s %i ,",zz,arr->At(jj)); |
| 836 |
|
} else { |
| 837 |
|
sprintf(o,"%s %i",o,arr->At(jj)); |
| 838 |
|
sprintf(zz,"%s %i",zz,arr->At(jj)); |
| 839 |
|
}; |
| 840 |
|
jj++; |
| 841 |
|
}; |
| 842 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 843 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
| 844 |
|
j++; |
| 845 |
|
}; |
| 846 |
|
}; |
| 847 |
|
// |
| 848 |
|
// TArrayF |
| 849 |
|
// |
| 850 |
|
if ( !strcmp(tste->GetTypeName(),"TArrayF") ){ |
| 851 |
|
// |
| 852 |
|
char *pointer = (char*)cl->UncheckedAt(0); |
| 853 |
|
char *pu = pointer + thisoffset; |
| 854 |
|
TArrayF *arr = (TArrayF*)(pu); |
| 855 |
|
Int_t jj=0; |
| 856 |
|
Int_t arlen = min(arr->GetSize(),dlen); |
| 857 |
|
// |
| 858 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 859 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 860 |
|
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
| 861 |
|
sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize()); |
| 862 |
|
// |
| 863 |
|
while ( j < tb->GetNdata() ){ |
| 864 |
|
// |
| 865 |
|
pointer = (char*)cl->UncheckedAt(j); |
| 866 |
|
pu = pointer + thisoffset; |
| 867 |
|
arr = (TArrayF*)(pu); |
| 868 |
|
// |
| 869 |
|
while ( jj < arlen ){ |
| 870 |
|
if ( jj < arlen-1 ){ |
| 871 |
|
sprintf(o,"%s %f ,",o,arr->At(jj)); |
| 872 |
|
sprintf(zz,"%s %f ,",zz,arr->At(jj)); |
| 873 |
|
} else { |
| 874 |
|
sprintf(o,"%s %f",o,arr->At(jj)); |
| 875 |
|
sprintf(zz,"%s %f",zz,arr->At(jj)); |
| 876 |
|
}; |
| 877 |
|
jj++; |
| 878 |
|
}; |
| 879 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 880 |
|
if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz); |
| 881 |
|
j++; |
| 882 |
|
}; |
| 883 |
|
}; |
| 884 |
|
}; |
| 885 |
|
sprintf(o,"%s\n",o); |
| 886 |
|
sprintf(zz,"%s\n",zz); |
| 887 |
|
break; |
| 888 |
|
}; |
| 889 |
|
}; |
| 890 |
|
}; |
| 891 |
|
}; |
| 892 |
|
break; |
| 893 |
|
}; |
| 894 |
|
}; |
| 895 |
|
printf("%s\n",o); |
| 896 |
|
pamgui->DIALOG(4,zz); |
| 897 |
}; |
}; |
| 898 |
|
|
|
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 "); |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
| 899 |
|
|
| 900 |
void FEVdetector::GetGeneralInfo(){ |
void FEVdetector::GetGeneralInfo(){ |
| 901 |
// |
// |
| 906 |
headcold = headc; |
headcold = headc; |
| 907 |
headc = ph->Counter; |
headc = ph->Counter; |
| 908 |
var.headc = (int)ph->Counter; |
var.headc = (int)ph->Counter; |
| 909 |
OBT = ph->OrbitalTime; |
OBT = (UInt_t)ph->OrbitalTime; |
| 910 |
DOBT = OBT - OOBT; |
DOBT = OBT - OOBT; |
| 911 |
OOBT = OBT; |
OOBT = OBT; |
| 912 |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
| 942 |
trcs = (TString)trc.str().c_str(); |
trcs = (TString)trc.str().c_str(); |
| 943 |
} else { |
} else { |
| 944 |
headcold = headc; |
headcold = headc; |
| 945 |
headc = L2->GetOrbitalInfo()->pkt_num; // to be changed as soon as we will have obt in the level2 file! |
if ( var.RUN ){ |
| 946 |
OBT = L2->GetOrbitalInfo()->OBT; // to be changed as soon as we will have obt in the level2 file! |
var.idrun = L2->GetRunInfo()->ID; |
| 947 |
DOBT = OBT - OOBT; |
var.idroot = L2->GetRunInfo()->ID_ROOT_L0; |
| 948 |
OOBT = OBT; |
var.EVF = L2->GetRunInfo()->EV_FROM; |
| 949 |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
}; |
| 950 |
var.etime = OBT; |
if ( var.ORB ){ |
| 951 |
|
headc = L2->GetOrbitalInfo()->pkt_num; |
| 952 |
|
OBT = L2->GetOrbitalInfo()->OBT; |
| 953 |
|
DOBT = OBT - OOBT; |
| 954 |
|
OOBT = OBT; |
| 955 |
|
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
| 956 |
|
var.etime = OBT; |
| 957 |
|
} else { |
| 958 |
|
var.etime = 0; |
| 959 |
|
}; |
| 960 |
// |
// |
| 961 |
// who gave the trigger? |
// who gave the trigger? |
| 962 |
// |
// |
| 963 |
calotrig = 0; |
Int_t trigconf = 0; |
| 964 |
if ( L2->GetTrigLevel2()->patterntrig[0] ) calotrig = 1; |
if ( var.TRG ){ |
| 965 |
toftrig = 0; |
calotrig = 0; |
| 966 |
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; |
| 967 |
s4pulser = 0; |
toftrig = 0; |
| 968 |
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; |
| 969 |
// |
s4pulser = 0; |
| 970 |
// 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; |
| 971 |
// S4 sometimes could not set the flag even if the trigger is given. This is a workaround to fix this "bug": |
// |
| 972 |
// |
// TOF and calorimeter when giving a trigger will always set this flag since the time window of the signal is greater than 100 ns. |
| 973 |
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": |
| 974 |
// |
// |
| 975 |
Int_t trigconf = L2->GetTrigLevel2()->trigconf; |
if ( !calotrig && !toftrig ) s4pulser = 1; |
| 976 |
|
// |
| 977 |
|
trigconf = L2->GetTrigLevel2()->trigconf; |
| 978 |
|
} else { |
| 979 |
|
trigconf = 0; |
| 980 |
|
} |
| 981 |
stringstream trc; |
stringstream trc; |
| 982 |
trc.str(""); |
trc.str(""); |
| 983 |
if ( trigconf & (1<<0) ) trc << "TOF1"; |
if ( trigconf & (1<<0) ) trc << "TOF1"; |
| 1065 |
// |
// |
| 1066 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
| 1067 |
cintcom.str(""); |
cintcom.str(""); |
| 1068 |
cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex; |
cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona |
| 1069 |
cintcom << L2; |
cintcom << L2; |
| 1070 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
| 1071 |
|
// printf(" comando: %s \n",cintcom.str().c_str()); |
| 1072 |
} else { |
} else { |
| 1073 |
cintcom.str(""); |
cintcom.str(""); |
| 1074 |
cintcom << "TTree *otr = (TTree*)0x" << hex; |
cintcom << "TTree *otr = (TTree*)" << hex; |
| 1075 |
cintcom << otr; |
cintcom << otr; |
| 1076 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
| 1077 |
// |
// |
| 1078 |
cintcom.str(""); |
cintcom.str(""); |
| 1079 |
cintcom << "struct Variables &var = (struct Variables &)0x" << hex; |
cintcom << "struct Variables &var = (struct Variables &)" << hex; |
| 1080 |
cintcom << &var; |
cintcom << &var; |
| 1081 |
gROOT->ProcessLine(cintcom.str().c_str()); |
gROOT->ProcessLine(cintcom.str().c_str()); |
| 1082 |
}; |
}; |
| 1087 |
// |
// |
| 1088 |
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);"); |
| 1089 |
// |
// |
| 1090 |
if ( level.file == 2 ) isOK = gApplication->ProcessLine("filter((PamLevel2 *)L2,2);"); |
// if ( level.file == 2 ) isOK = gApplication->ProcessLine("filter((PamLevel2 *)L2,2);"); |
| 1091 |
|
if ( level.file == 2 ) isOK = gApplication->ProcessLine("filter();"); |
| 1092 |
// |
// |
| 1093 |
// progress bar in text window |
// progress bar in text window |
| 1094 |
// |
// |
| 1101 |
// |
// |
| 1102 |
} |
} |
| 1103 |
|
|
| 1104 |
Int_t FEVdetector::Load(TTree &mainotr, TFile &mainfile){ |
TChain* FEVdetector::Load(TString file){ |
| 1105 |
file = &mainfile; |
// |
| 1106 |
otr = &mainotr; |
// file = &mainfile; |
|
L2 = new PamLevel2(); |
|
| 1107 |
// |
// |
| 1108 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
| 1109 |
// otr = L2->LoadPamTrees(file); |
// |
| 1110 |
// printf(" %s \n",ddec.Data()); |
// printf(" %s \n",ddec.Data()); |
| 1111 |
otr = L2->GetPamTree(file,ddec.Data()); |
if ( !L2 ){ |
| 1112 |
|
// printf(" l2 constructor\n"); |
| 1113 |
|
L2 = new PamLevel2("",file.Data(),ddec.Data()); |
| 1114 |
|
if ( NODB ) L2->NoDBconnections(); |
| 1115 |
|
otr = L2->GetPamTree(); |
| 1116 |
|
// printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot); |
| 1117 |
|
} else { |
| 1118 |
|
// |
| 1119 |
|
// printf(" l2 already exist \n"); |
| 1120 |
|
otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); |
| 1121 |
|
L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); |
| 1122 |
|
// |
| 1123 |
|
}; |
| 1124 |
|
// |
| 1125 |
// |
// |
| 1126 |
if ( !otr ) return(0); |
if ( !otr ) return(0); |
|
// ******************** |
|
|
// load magnetic field |
|
|
// ******************** |
|
|
const char *pam_calib = pathtocalibration(); |
|
| 1127 |
// |
// |
| 1128 |
stringstream magfie; |
// otr->CanDeleteRefs(true); |
| 1129 |
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/"; |
|
| 1130 |
// |
// |
|
L2->GetTrkLevel2()->LoadField(magfie.str().c_str()); |
|
| 1131 |
} else { |
} else { |
| 1132 |
// |
// |
| 1133 |
// load calorimeter ADC2MIP conversion file |
// load calorimeter ADC2MIP conversion file |
| 1168 |
}; |
}; |
| 1169 |
// |
// |
| 1170 |
// |
// |
| 1171 |
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(); |
|
| 1172 |
// |
// |
| 1173 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
| 1174 |
|
// |
| 1175 |
|
trigger = new pamela::trigger::TriggerEvent(); |
| 1176 |
|
eh = new pamela::EventHeader(); |
| 1177 |
|
ph = new pamela::PscuHeader(); |
| 1178 |
|
de = new pamela::calorimeter::CalorimeterEvent(); |
| 1179 |
|
trk = new pamela::tracker::TrackerEvent(); |
| 1180 |
|
ne = new pamela::neutron::NeutronEvent(); |
| 1181 |
|
ace = new pamela::anticounter::AnticounterEvent(); |
| 1182 |
|
s4 = new pamela::S4::S4Event(); |
| 1183 |
|
tof = new pamela::tof::TofEvent(); |
| 1184 |
|
// |
| 1185 |
|
otr = new TChain("Physics"); |
| 1186 |
|
otr->Add(file.Data(),-1); |
| 1187 |
otr->SetBranchAddress("Trigger", &trigger); |
otr->SetBranchAddress("Trigger", &trigger); |
| 1188 |
otr->SetBranchAddress("Header", &eh); |
otr->SetBranchAddress("Header", &eh); |
| 1189 |
}; |
}; |
|
if ( level.file == 2 && var.RUN){ |
|
|
// otr->AddFriend("OrbitalInfo", file); |
|
|
// otr->SetBranchAddress("OrbitalInfo", &oinfoL2); |
|
|
runinfo->Read(0ULL); |
|
|
}; |
|
| 1190 |
// |
// |
| 1191 |
if ( var.TRK ) { |
if ( var.TRK ) { |
| 1192 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
| 1259 |
}; |
}; |
| 1260 |
}; |
}; |
| 1261 |
// |
// |
| 1262 |
return(1); |
if ( !otr ){ |
| 1263 |
|
return(0); |
| 1264 |
|
}; |
| 1265 |
|
// |
| 1266 |
|
return otr; |
| 1267 |
// |
// |
| 1268 |
} |
} |
| 1269 |
|
|
| 1270 |
|
bool bit(int decimal, char pos) |
| 1271 |
|
{ |
| 1272 |
|
return( (decimal>>pos)%2 ); |
| 1273 |
|
} |
| 1274 |
|
// |
| 1275 |
|
// THE PATTERN TRIGGER |
| 1276 |
|
// |
| 1277 |
|
void FEVdetector::ShowTRG(){ |
| 1278 |
|
// |
| 1279 |
|
if ( level.file != 2 ) return; |
| 1280 |
|
// |
| 1281 |
|
if ( !var.TRG ) return; |
| 1282 |
|
// |
| 1283 |
|
int S11[8]; |
| 1284 |
|
S11[0] = 0; |
| 1285 |
|
S11[1] = 0; |
| 1286 |
|
S11[2] = 0; |
| 1287 |
|
S11[3] = 0; |
| 1288 |
|
S11[4] = 0; |
| 1289 |
|
S11[5] = 0; |
| 1290 |
|
S11[6] = 0; |
| 1291 |
|
S11[7] = 0; |
| 1292 |
|
|
| 1293 |
|
int S12[6]; |
| 1294 |
|
S12[0] = 0; |
| 1295 |
|
S12[1] = 0; |
| 1296 |
|
S12[2] = 0; |
| 1297 |
|
S12[3] = 0; |
| 1298 |
|
S12[4] = 0; |
| 1299 |
|
S12[5] = 0; |
| 1300 |
|
|
| 1301 |
|
int S21[2]; |
| 1302 |
|
S21[0] = 0; |
| 1303 |
|
S21[1] = 0; |
| 1304 |
|
|
| 1305 |
|
int S22[2]; |
| 1306 |
|
S22[0] = 0; |
| 1307 |
|
S22[1] = 0; |
| 1308 |
|
|
| 1309 |
|
int S31[3]; |
| 1310 |
|
S31[0] = 0; |
| 1311 |
|
S31[1] = 0; |
| 1312 |
|
S31[2] = 0; |
| 1313 |
|
|
| 1314 |
|
int S32[3]; |
| 1315 |
|
S32[0] = 0; |
| 1316 |
|
S32[1] = 0; |
| 1317 |
|
S32[2] = 0; |
| 1318 |
|
|
| 1319 |
|
//S3 |
| 1320 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],0) ) S31[0]++; |
| 1321 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],1) ) S31[1]++; |
| 1322 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],2) ) S31[2]++; |
| 1323 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],3) ) S31[0]++; |
| 1324 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],4) ) S31[1]++; |
| 1325 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],5) ) S31[2]++; |
| 1326 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],6) ) S32[0]++; |
| 1327 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],7) ) S32[1]++; |
| 1328 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],8) ) S32[2]++; |
| 1329 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],9) ) S32[0]++; |
| 1330 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],10) ) S32[1]++; |
| 1331 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[2],11) ) S32[2]++; |
| 1332 |
|
//S2 |
| 1333 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],0) ) S21[0]++; |
| 1334 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],1) ) S21[1]++; |
| 1335 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],2) ) S21[0]++; |
| 1336 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],3) ) S21[1]++; |
| 1337 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],4) ) S22[0]++; |
| 1338 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],5) ) S22[1]++; |
| 1339 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],6) ) S22[0]++; |
| 1340 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[3],7) ) S22[1]++; |
| 1341 |
|
//S12 |
| 1342 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],0) ) S12[0]++; |
| 1343 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],1) ) S12[1]++; |
| 1344 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],2) ) S12[2]++; |
| 1345 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],3) ) S12[3]++; |
| 1346 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],4) ) S12[4]++; |
| 1347 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],5) ) S12[5]++; |
| 1348 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],6) ) S12[0]++; |
| 1349 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],7) ) S12[1]++; |
| 1350 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],8) ) S12[2]++; |
| 1351 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],9) ) S12[3]++; |
| 1352 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],10) ) S12[4]++; |
| 1353 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[4],11) ) S12[5]++; |
| 1354 |
|
//S11 |
| 1355 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],0) ) S11[0]++; |
| 1356 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],1) ) S11[1]++; |
| 1357 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],2) ) S11[2]++; |
| 1358 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],3) ) S11[3]++; |
| 1359 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],4) ) S11[4]++; |
| 1360 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],5) ) S11[5]++; |
| 1361 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],6) ) S11[6]++; |
| 1362 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],7) ) S11[7]++; |
| 1363 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],8) ) S11[0]++; |
| 1364 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],9) ) S11[1]++; |
| 1365 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],10) ) S11[2]++; |
| 1366 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],11) ) S11[3]++; |
| 1367 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],12) ) S11[4]++; |
| 1368 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],13) ) S11[5]++; |
| 1369 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],14) ) S11[6]++; |
| 1370 |
|
if ( bit(L2->GetTrigLevel2()->patterntrig[5],15) ) S11[7]++; |
| 1371 |
|
|
| 1372 |
|
|
| 1373 |
|
// |
| 1374 |
|
Int_t rj = 0; |
| 1375 |
|
Float_t xs2x = var.xxvc; |
| 1376 |
|
Float_t ys2x = var.yxvc + 0.36*var.sfy; |
| 1377 |
|
Float_t xs2y = var.xyvc; |
| 1378 |
|
Float_t ys2y = var.yyvc + 0.36*var.sfy; |
| 1379 |
|
Float_t ws2 = 0.005; |
| 1380 |
|
Float_t ws13 = 0.007; |
| 1381 |
|
Int_t noadc; |
| 1382 |
|
if ( var.bw ){ |
| 1383 |
|
noadc=12; |
| 1384 |
|
} else { |
| 1385 |
|
noadc=kRed; |
| 1386 |
|
}; |
| 1387 |
|
// |
| 1388 |
|
// S11 X-view |
| 1389 |
|
// |
| 1390 |
|
Float_t s11p = 0.051; |
| 1391 |
|
TPolyLine *ftrg11x[8]; |
| 1392 |
|
for ( Int_t j=0; j<8; j++){ |
| 1393 |
|
Float_t nxc1[5]={ (s11p*j), (s11p*j), s11p*(j+1), s11p*(j+1), (s11p*j)}; |
| 1394 |
|
Float_t nyc1[5]={ 0., ws13, ws13, 0., 0.}; |
| 1395 |
|
Float_t nxc[5]; |
| 1396 |
|
Float_t nyc[5]; |
| 1397 |
|
for (Int_t i = 0; i<5 ; i++) { |
| 1398 |
|
nxc[i]= xs2x + (-0.204+nxc1[i])*var.sfx; |
| 1399 |
|
nyc[i] = ys2x + (0.295+nyc1[i])*var.sfy; |
| 1400 |
|
}; |
| 1401 |
|
ftrg11x[j] = new TPolyLine(5,nxc,nyc); |
| 1402 |
|
ftrg11x[j]->SetLineColor(noadc); |
| 1403 |
|
ftrg11x[j]->SetLineWidth(S11[j]); |
| 1404 |
|
if ( S11[j] ) ftrg11x[j]->Draw(); |
| 1405 |
|
}; |
| 1406 |
|
// |
| 1407 |
|
// S12 Y-view |
| 1408 |
|
// |
| 1409 |
|
Float_t s12p = 0.055; |
| 1410 |
|
TPolyLine *ftrg12y[6]; |
| 1411 |
|
rj = 6; |
| 1412 |
|
for ( Int_t j=0; j<6; j++){ |
| 1413 |
|
rj--; |
| 1414 |
|
Float_t nxc1[5]={ (s12p*j), (s12p*j), s12p*(j+1), s12p*(j+1), (s12p*j)}; |
| 1415 |
|
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
| 1416 |
|
Float_t nxc[5]; |
| 1417 |
|
Float_t nyc[5]; |
| 1418 |
|
for (Int_t i = 0; i<5 ; i++) { |
| 1419 |
|
nxc[i]= xs2y + (-0.165+nxc1[i])*var.sfx; |
| 1420 |
|
nyc[i] = ys2y + (0.295+nyc1[i])*var.sfy; |
| 1421 |
|
}; |
| 1422 |
|
ftrg12y[j] = new TPolyLine(5,nxc,nyc); |
| 1423 |
|
ftrg12y[j]->SetLineColor(noadc); |
| 1424 |
|
ftrg12y[j]->SetLineWidth(S12[rj]); |
| 1425 |
|
if ( S12[rj] ) ftrg12y[j]->Draw(); |
| 1426 |
|
}; |
| 1427 |
|
|
| 1428 |
|
|
| 1429 |
|
// |
| 1430 |
|
// S21 Y-view |
| 1431 |
|
// |
| 1432 |
|
Float_t s21p = 0.075; |
| 1433 |
|
TPolyLine *ftrg21y[2]; |
| 1434 |
|
rj=2; |
| 1435 |
|
for ( Int_t j=0; j<2; j++){ |
| 1436 |
|
rj--; |
| 1437 |
|
Float_t nxc1[5]={ s21p*(j-1), s21p*(j-1), s21p*j,s21p*j, s21p*(j-1)}; |
| 1438 |
|
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
| 1439 |
|
Float_t nxc[5]; |
| 1440 |
|
Float_t nyc[5]; |
| 1441 |
|
for (Int_t i = 0; i<5 ; i++) { |
| 1442 |
|
nxc[i]= xs2y + nxc1[i]*var.sfx; |
| 1443 |
|
nyc[i] = ys2y + nyc1[i]*var.sfy; |
| 1444 |
|
// printf(" TRG i %i x %f y %f \n",i,nxc[i],nyc[i]); |
| 1445 |
|
}; |
| 1446 |
|
ftrg21y[j] = new TPolyLine(5,nxc,nyc); |
| 1447 |
|
ftrg21y[j]->SetLineColor(noadc); |
| 1448 |
|
ftrg21y[j]->SetLineWidth(S21[j]); |
| 1449 |
|
if ( S21[j]) ftrg21y[j]->Draw(); |
| 1450 |
|
}; |
| 1451 |
|
|
| 1452 |
|
// |
| 1453 |
|
// S22 X-view |
| 1454 |
|
// |
| 1455 |
|
Float_t s22p = 0.090; |
| 1456 |
|
TPolyLine *ftrg22x[2]; |
| 1457 |
|
for ( Int_t j=0; j<2; j++){ |
| 1458 |
|
Float_t nxc1[5]={ s22p*(j-1), s22p*(j-1), s22p*j, s22p*j, s22p*(j-1)}; |
| 1459 |
|
Float_t nyc1[5]={ -ws2, 0., 0., -ws2, -ws2}; |
| 1460 |
|
Float_t nxc[5]; |
| 1461 |
|
Float_t nyc[5]; |
| 1462 |
|
for (Int_t i = 0; i<5 ; i++) { |
| 1463 |
|
nxc[i]= xs2x + nxc1[i]*var.sfx; |
| 1464 |
|
nyc[i] = ys2x + nyc1[i]*var.sfy; |
| 1465 |
|
}; |
| 1466 |
|
ftrg22x[j] = new TPolyLine(5,nxc,nyc); |
| 1467 |
|
ftrg22x[j]->SetLineColor(noadc); |
| 1468 |
|
ftrg22x[j]->SetLineWidth(S22[j]); |
| 1469 |
|
if ( S22[j] ) ftrg22x[j]->Draw(); |
| 1470 |
|
}; |
| 1471 |
|
// |
| 1472 |
|
// S31 X-view |
| 1473 |
|
// |
| 1474 |
|
Float_t s31p = 0.060; |
| 1475 |
|
TPolyLine *ftrg31x[3]; |
| 1476 |
|
for ( Int_t j=0; j<3; j++){ |
| 1477 |
|
Float_t nxc1[5]={ (s31p*j), (s31p*j), s31p*(j+1), s31p*(j+1), (s31p*j)}; |
| 1478 |
|
Float_t nyc1[5]={ 0., ws13, ws13, 0., 0.}; |
| 1479 |
|
Float_t nxc[5]; |
| 1480 |
|
Float_t nyc[5]; |
| 1481 |
|
for (Int_t i = 0; i<5 ; i++) { |
| 1482 |
|
nxc[i]= xs2x + (-0.090+nxc1[i])*var.sfx; |
| 1483 |
|
nyc[i] = ys2x + (-0.488+nyc1[i])*var.sfy; |
| 1484 |
|
}; |
| 1485 |
|
ftrg31x[j] = new TPolyLine(5,nxc,nyc); |
| 1486 |
|
ftrg31x[j]->SetLineColor(noadc); |
| 1487 |
|
ftrg31x[j]->SetLineWidth(S31[j]); |
| 1488 |
|
if ( S31[j] ) ftrg31x[j]->Draw(); |
| 1489 |
|
}; |
| 1490 |
|
|
| 1491 |
|
// |
| 1492 |
|
// S32 Y-view |
| 1493 |
|
// |
| 1494 |
|
Float_t s32p = 0.050; |
| 1495 |
|
TPolyLine *ftrg32y[3]; |
| 1496 |
|
rj = 3; |
| 1497 |
|
for ( Int_t j=0; j<3; j++){ |
| 1498 |
|
rj--; |
| 1499 |
|
Float_t nxc1[5]={ (s32p*j), (s32p*j), s32p*(j+1),s32p*(j+1), (s32p*j)}; |
| 1500 |
|
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
| 1501 |
|
Float_t nxc[5]; |
| 1502 |
|
Float_t nyc[5]; |
| 1503 |
|
for (Int_t i = 0; i<5 ; i++) { |
| 1504 |
|
nxc[i]= xs2y + (-0.075+nxc1[i])*var.sfx; |
| 1505 |
|
nyc[i] = ys2y + (-0.488+nyc1[i])*var.sfy; |
| 1506 |
|
}; |
| 1507 |
|
ftrg32y[j] = new TPolyLine(5,nxc,nyc); |
| 1508 |
|
ftrg32y[j]->SetLineColor(noadc); |
| 1509 |
|
ftrg32y[j]->SetLineWidth(S32[rj]); |
| 1510 |
|
if ( S32[rj] ) ftrg32y[j]->Draw(); |
| 1511 |
|
} |
| 1512 |
|
} |
| 1513 |
|
|
| 1514 |
void FEVdetector::DisplayEvent(){ |
void FEVdetector::DisplayEvent(){ |
| 1515 |
TLatex *text=new TLatex(); |
TLatex *text=new TLatex(); |
| 1516 |
stringstream testo; |
stringstream testo; |
| 1526 |
thefigure->cd(); |
thefigure->cd(); |
| 1527 |
ShowTOF(); |
ShowTOF(); |
| 1528 |
// |
// |
| 1529 |
|
// show pattern trigger if the case |
| 1530 |
|
// |
| 1531 |
|
thefigure->cd(); |
| 1532 |
|
if ( var.PATTRIG ){ |
| 1533 |
|
ShowTRG(); |
| 1534 |
|
thefigure->Modified(); |
| 1535 |
|
thefigure->Update(); |
| 1536 |
|
} |
| 1537 |
|
// |
| 1538 |
// show anticounters |
// show anticounters |
| 1539 |
// |
// |
| 1540 |
thefigure->cd(); |
thefigure->cd(); |
| 1592 |
text->DrawLatex(0.33,txthi,testo.str().c_str()); |
text->DrawLatex(0.33,txthi,testo.str().c_str()); |
| 1593 |
txthi -= 0.03; |
txthi -= 0.03; |
| 1594 |
testo2.str(""); |
testo2.str(""); |
| 1595 |
testo2 << "On Board Time: " << (int)OBT; |
testo2 << "On Board Time: " << (unsigned int)OBT; |
| 1596 |
if ( DOBT > 0 ) { |
if ( DOBT > 0 ) { |
| 1597 |
testo2 << " (delta: " << (int)DOBT; |
testo2 << " (delta: " << (unsigned int)DOBT; |
| 1598 |
testo2 << ")"; |
testo2 << ")"; |
| 1599 |
}; |
}; |
| 1600 |
testo2 << " [ms]"; |
testo2 << " [ms]"; |
| 1631 |
testo3 << "S4: ";// << setprecision(2); |
testo3 << "S4: ";// << setprecision(2); |
| 1632 |
testo3 << var.s4sig << " [MIP] TOF: #beta = "; |
testo3 << var.s4sig << " [MIP] TOF: #beta = "; |
| 1633 |
testo3 << setprecision(3) << var.beta[4]; |
testo3 << setprecision(3) << var.beta[4]; |
| 1634 |
|
if ( level.file == 2 ){ |
| 1635 |
|
testo3 << " SVL cutoff: "; |
| 1636 |
|
testo3 << setprecision(3) << L2->GetOrbitalInfo()->GetCutoffSVL();//quiquiqui |
| 1637 |
|
} |
| 1638 |
text->DrawLatex(0.33,txthi,testo3.str().c_str()); |
text->DrawLatex(0.33,txthi,testo3.str().c_str()); |
| 1639 |
txthi -= 0.03; |
txthi -= 0.03; |
| 1640 |
testo3.str(""); |
testo3.str(""); |
| 1756 |
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"); |
| 1757 |
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"); |
| 1758 |
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"); |
| 1759 |
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"); |
| 1760 |
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"); |
| 1761 |
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"); |
| 1762 |
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"); |
| 1763 |
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"); |
| 1764 |
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"); |
| 1765 |
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"); |
| 1887 |
// |
// |
| 1888 |
// print infos on terminal |
// print infos on terminal |
| 1889 |
// |
// |
| 1890 |
|
// if ( !var.selex ){ |
| 1891 |
printf(" File: %s \n",var.thefilename.Data()); |
printf(" File: %s \n",var.thefilename.Data()); |
| 1892 |
if ( !s4pulser && !calotrig ){ |
if ( !s4pulser && !calotrig ){ |
| 1893 |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
printf(" Pkt_num: %i - Progressive number: %i \n",(int)headc,thisentry+1); |
| 1898 |
if ( calotrig ){ |
if ( calotrig ){ |
| 1899 |
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); |
| 1900 |
}; |
}; |
| 1901 |
printf(" On Board Time: %i (delta %i) [ms]\n",OBT,DOBT); |
printf(" On Board Time: %u (delta %i) [ms]\n",OBT,DOBT); |
| 1902 |
const char *trc2 = trcs; |
const char *trc2 = trcs; |
| 1903 |
printf(" TRIGGER: %s \n",trc2); |
printf(" TRIGGER: %s \n",trc2); |
| 1904 |
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); |
| 1910 |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
printf(" CALO: NSTRIP = %i QTOT = %i [MIP]\n",var.nstrip,var.qtot); |
| 1911 |
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]); |
| 1912 |
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); |
| 1913 |
|
// }; |
| 1914 |
// |
// |
| 1915 |
} |
} |
| 1916 |
|
|
| 2218 |
void FEVdetector::ShowTOF(){ |
void FEVdetector::ShowTOF(){ |
| 2219 |
// |
// |
| 2220 |
// |
// |
|
// |
|
| 2221 |
if ( !var.TOF ) return; |
if ( !var.TOF ) return; |
| 2222 |
// |
// |
| 2223 |
Int_t tt = 0; |
Int_t tt = 0; |
| 2224 |
|
Int_t rj = 0; |
| 2225 |
// |
// |
| 2226 |
// force level0, i.e. show patterntrig variable! |
// force level0, i.e. show patterntrig variable! |
| 2227 |
// |
// |
| 2251 |
Float_t mt31[2][3]; |
Float_t mt31[2][3]; |
| 2252 |
Float_t mt32[2][3]; |
Float_t mt32[2][3]; |
| 2253 |
// |
// |
| 2254 |
|
memset(mt11,0,2*8*sizeof(Float_t)); |
| 2255 |
|
memset(mt12,0,2*6*sizeof(Float_t)); |
| 2256 |
|
memset(mt21,0,2*2*sizeof(Float_t)); |
| 2257 |
|
memset(mt22,0,2*2*sizeof(Float_t)); |
| 2258 |
|
memset(mt31,0,2*3*sizeof(Float_t)); |
| 2259 |
|
memset(mt32,0,2*3*sizeof(Float_t)); |
| 2260 |
|
// |
| 2261 |
Int_t S3 = 0; |
Int_t S3 = 0; |
| 2262 |
Int_t S2 = 0; |
Int_t S2 = 0; |
| 2263 |
Int_t S12 = 0; |
Int_t S12 = 0; |
| 2422 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
| 2423 |
ocolo = 10; |
ocolo = 10; |
| 2424 |
TPolyLine *ftof12ya[6]; |
TPolyLine *ftof12ya[6]; |
| 2425 |
|
rj=6; |
| 2426 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
| 2427 |
|
rj--; |
| 2428 |
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)}; |
| 2429 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
| 2430 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2440 |
} else { |
} else { |
| 2441 |
colo = 1; |
colo = 1; |
| 2442 |
}; |
}; |
| 2443 |
ColorMIP(ms12a[j],colo); |
ColorMIP(ms12a[rj],colo); |
| 2444 |
// |
// |
| 2445 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2446 |
if ( mt12[0][j] == 4095. ) colo = noadc; |
if ( mt12[0][rj] == 4095. ) colo = noadc; |
| 2447 |
// |
// |
| 2448 |
ftof12ya[j]->SetFillColor(colo); |
ftof12ya[j]->SetFillColor(colo); |
| 2449 |
ftof12ya[j]->SetLineWidth(1); |
ftof12ya[j]->SetLineWidth(1); |
| 2453 |
// B |
// B |
| 2454 |
s12p = 0.055; |
s12p = 0.055; |
| 2455 |
TPolyLine *ftof12yb[6]; |
TPolyLine *ftof12yb[6]; |
| 2456 |
|
rj=6; |
| 2457 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
| 2458 |
|
rj--; |
| 2459 |
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)}; |
| 2460 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
| 2461 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2471 |
} else { |
} else { |
| 2472 |
colo = 1; |
colo = 1; |
| 2473 |
}; |
}; |
| 2474 |
ColorMIP(ms12b[j],colo); |
ColorMIP(ms12b[rj],colo); |
| 2475 |
// |
// |
| 2476 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2477 |
if ( mt12[1][j] == 4095. ) colo = noadc; |
if ( mt12[1][rj] == 4095. ) colo = noadc; |
| 2478 |
// |
// |
| 2479 |
ftof12yb[j]->SetFillColor(colo); |
ftof12yb[j]->SetFillColor(colo); |
| 2480 |
ftof12yb[j]->SetLineWidth(1); |
ftof12yb[j]->SetLineWidth(1); |
| 2508 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
| 2509 |
ocolo = 10; |
ocolo = 10; |
| 2510 |
TPolyLine *ftof21ya[2]; |
TPolyLine *ftof21ya[2]; |
| 2511 |
|
rj=2; |
| 2512 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
| 2513 |
|
rj--; |
| 2514 |
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)}; |
| 2515 |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
Float_t yc1[4]={ 0., ws2, ws2, 0.}; |
| 2516 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2526 |
} else { |
} else { |
| 2527 |
colo = 1; |
colo = 1; |
| 2528 |
}; |
}; |
| 2529 |
ColorMIP(ms21a[j],colo); |
ColorMIP(ms21a[rj],colo); |
| 2530 |
// |
// |
| 2531 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2532 |
if ( mt21[0][j] == 4095. ) colo = noadc; |
if ( mt21[0][rj] == 4095. ) colo = noadc; |
| 2533 |
// |
// |
| 2534 |
ftof21ya[j]->SetFillColor(colo); |
ftof21ya[j]->SetFillColor(colo); |
| 2535 |
ftof21ya[j]->SetLineWidth(1); |
ftof21ya[j]->SetLineWidth(1); |
| 2539 |
// B |
// B |
| 2540 |
s21p = 0.075; |
s21p = 0.075; |
| 2541 |
TPolyLine *ftof21yb[2]; |
TPolyLine *ftof21yb[2]; |
| 2542 |
|
rj=2; |
| 2543 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
| 2544 |
|
rj--; |
| 2545 |
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)}; |
| 2546 |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
Float_t yc1[4]={ 0., 0., ws2, 0.}; |
| 2547 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2557 |
} else { |
} else { |
| 2558 |
colo = 1; |
colo = 1; |
| 2559 |
}; |
}; |
| 2560 |
ColorMIP(ms21b[j],colo); |
ColorMIP(ms21b[rj],colo); |
| 2561 |
// |
// |
| 2562 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2563 |
if ( mt21[1][j] == 4095. ) colo = noadc; |
if ( mt21[1][rj] == 4095. ) colo = noadc; |
| 2564 |
// |
// |
| 2565 |
ftof21yb[j]->SetFillColor(colo); |
ftof21yb[j]->SetFillColor(colo); |
| 2566 |
ftof21yb[j]->SetLineWidth(1); |
ftof21yb[j]->SetLineWidth(1); |
| 2675 |
Float_t s31p = 0.060; |
Float_t s31p = 0.060; |
| 2676 |
ocolo = 10; |
ocolo = 10; |
| 2677 |
TPolyLine *ftof31xa[3]; |
TPolyLine *ftof31xa[3]; |
| 2678 |
|
rj=3; |
| 2679 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
| 2680 |
|
rj--; |
| 2681 |
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)}; |
| 2682 |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
Float_t yc1[4]={ 0., ws13, ws13, 0.}; |
| 2683 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2693 |
} else { |
} else { |
| 2694 |
colo = 1; |
colo = 1; |
| 2695 |
}; |
}; |
| 2696 |
ColorMIP(ms31a[j],colo); |
ColorMIP(ms31a[rj],colo); |
| 2697 |
// |
// |
| 2698 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2699 |
if ( mt31[0][j] == 4095. ) colo = noadc; |
if ( mt31[0][rj] == 4095. ) colo = noadc; |
| 2700 |
// |
// |
| 2701 |
ftof31xa[j]->SetFillColor(colo); |
ftof31xa[j]->SetFillColor(colo); |
| 2702 |
ftof31xa[j]->SetLineWidth(1); |
ftof31xa[j]->SetLineWidth(1); |
| 2706 |
// B |
// B |
| 2707 |
s31p = 0.060; |
s31p = 0.060; |
| 2708 |
TPolyLine *ftof31xb[3]; |
TPolyLine *ftof31xb[3]; |
| 2709 |
|
rj=3; |
| 2710 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
| 2711 |
|
rj--; |
| 2712 |
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)}; |
| 2713 |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
Float_t yc1[4]={ 0., 0., ws13, 0.}; |
| 2714 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2724 |
} else { |
} else { |
| 2725 |
colo = 1; |
colo = 1; |
| 2726 |
}; |
}; |
| 2727 |
ColorMIP(ms31b[j],colo); |
ColorMIP(ms31b[rj],colo); |
| 2728 |
// |
// |
| 2729 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2730 |
if ( mt31[1][j] == 4095. ) colo = noadc; |
if ( mt31[1][rj] == 4095. ) colo = noadc; |
| 2731 |
// |
// |
| 2732 |
ftof31xb[j]->SetFillColor(colo); |
ftof31xb[j]->SetFillColor(colo); |
| 2733 |
ftof31xb[j]->SetLineWidth(1); |
ftof31xb[j]->SetLineWidth(1); |
| 2759 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
| 2760 |
ocolo = 10; |
ocolo = 10; |
| 2761 |
TPolyLine *ftof32ya[3]; |
TPolyLine *ftof32ya[3]; |
| 2762 |
|
rj=3; |
| 2763 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
| 2764 |
|
rj--; |
| 2765 |
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)}; |
| 2766 |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
Float_t yc1[4]={ -ws13, 0., 0., -ws13}; |
| 2767 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2777 |
} else { |
} else { |
| 2778 |
colo = 1; |
colo = 1; |
| 2779 |
}; |
}; |
| 2780 |
ColorMIP(ms32a[j],colo); |
ColorMIP(ms32a[rj],colo); |
| 2781 |
// |
// |
| 2782 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2783 |
if ( mt32[0][j] == 4095. ) colo = noadc; |
if ( mt32[0][rj] == 4095. ) colo = noadc; |
| 2784 |
// |
// |
| 2785 |
ftof32ya[j]->SetFillColor(colo); |
ftof32ya[j]->SetFillColor(colo); |
| 2786 |
ftof32ya[j]->SetLineWidth(1); |
ftof32ya[j]->SetLineWidth(1); |
| 2789 |
}; |
}; |
| 2790 |
s32p = 0.050; |
s32p = 0.050; |
| 2791 |
TPolyLine *ftof32yb[3]; |
TPolyLine *ftof32yb[3]; |
| 2792 |
|
rj=3; |
| 2793 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
| 2794 |
|
rj--; |
| 2795 |
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)}; |
| 2796 |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
Float_t yc1[4]={ -ws13, -ws13, 0., -ws13}; |
| 2797 |
Float_t xc[4]; |
Float_t xc[4]; |
| 2807 |
} else { |
} else { |
| 2808 |
colo = 1; |
colo = 1; |
| 2809 |
}; |
}; |
| 2810 |
ColorMIP(ms32b[j],colo); |
ColorMIP(ms32b[rj],colo); |
| 2811 |
// |
// |
| 2812 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 2813 |
if ( mt32[1][j] == 4095. ) colo = noadc; |
if ( mt32[1][rj] == 4095. ) colo = noadc; |
| 2814 |
// |
// |
| 2815 |
ftof32yb[j]->SetFillColor(colo); |
ftof32yb[j]->SetFillColor(colo); |
| 2816 |
ftof32yb[j]->SetLineWidth(1); |
ftof32yb[j]->SetLineWidth(1); |
| 3041 |
// |
// |
| 3042 |
// |
// |
| 3043 |
Bool_t repeat = true; |
Bool_t repeat = true; |
| 3044 |
Int_t numtr = 1; |
// Int_t numtr = 1; |
| 3045 |
|
Int_t numtr = 0; |
| 3046 |
Int_t repuntil = 0; |
Int_t repuntil = 0; |
| 3047 |
|
Int_t repuntiltr = 0; |
| 3048 |
// |
// |
| 3049 |
// |
// |
| 3050 |
var.tofraw = 0; |
var.tofraw = 0; |
| 3051 |
// |
// |
| 3052 |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
| 3053 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
| 3054 |
//repuntil = L2->GetNTracks(); |
if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks(); |
| 3055 |
|
// repuntiltr = L2->GetNTracks(); |
| 3056 |
// |
// |
| 3057 |
while ( repeat ){ |
while ( repeat ){ |
| 3058 |
// printf("B repuntil = %i \n",repuntil); |
// printf("B repuntil = %i \n",repuntil); |
| 3061 |
// |
// |
| 3062 |
// |
// |
| 3063 |
ToFTrkVar *ptt = 0; |
ToFTrkVar *ptt = 0; |
| 3064 |
|
PamTrack *ptrack = 0; |
| 3065 |
|
Float_t adc[4][12]; |
| 3066 |
|
Float_t tdc[4][12]; |
| 3067 |
|
memset(adc,0,4*12*sizeof(Float_t)); |
| 3068 |
|
memset(tdc,0,4*12*sizeof(Float_t)); |
| 3069 |
// |
// |
| 3070 |
// |
// |
| 3071 |
|
Int_t myseq = 0; |
| 3072 |
|
// if ( repuntil == 0 || var.tofraw ){ |
| 3073 |
if ( repuntil == 1 || var.tofraw ){ |
if ( repuntil == 1 || var.tofraw ){ |
| 3074 |
numtr = 0; |
numtr = 0; |
| 3075 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
| 3076 |
repeat = false; |
repeat = false; |
| 3077 |
} else { |
} else { |
| 3078 |
// |
// |
| 3079 |
|
// printf(" deH_ \n"); |
| 3080 |
// |
// |
| 3081 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr == 0 ){ |
| 3082 |
// |
// printf(" ques \n"); |
| 3083 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
| 3084 |
|
myseq = 0; |
| 3085 |
|
// printf(" que \n"); |
| 3086 |
|
|
| 3087 |
|
} else { |
| 3088 |
|
if ( numtr >= (repuntiltr-1) ) repeat = false; |
| 3089 |
|
// |
| 3090 |
|
printf(" numtr is %i \n",numtr); |
| 3091 |
|
// ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
| 3092 |
|
ptrack = L2->GetTrack(numtr-1); |
| 3093 |
|
ptt = ptrack->GetToFTrack(); |
| 3094 |
|
myseq = ptt->trkseqno + 1; |
| 3095 |
|
}; |
| 3096 |
}; |
}; |
| 3097 |
// |
// |
| 3098 |
xp11[0] = 0.; |
xp11[0] = 0.; |
| 3106 |
// |
// |
| 3107 |
ii = 2; |
ii = 2; |
| 3108 |
// |
// |
| 3109 |
Float_t adc[4][12]; |
// Int_t myseq = ptt->trkseqno + 1; |
|
Float_t tdc[4][12]; |
|
|
L2->GetToFLevel2()->GetMatrix(numtr,adc,tdc); |
|
|
|
|
| 3110 |
// |
// |
| 3111 |
for ( Int_t i = 0; i<8; i++ ) { |
// printf(" qui \n"); |
| 3112 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
| 3113 |
ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
// |
| 3114 |
}; |
// printf(" qua \n"); |
| 3115 |
if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
// |
| 3116 |
ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
// for ( Int_t i = 0; i<8; i++ ) { |
| 3117 |
}; |
// if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
| 3118 |
// xp11[i] = 0.; |
// ms11a[i] = adc[ch11a[i]][hb11a[i]]; |
| 3119 |
}; |
// }; |
| 3120 |
|
// if ( adc[ch11b[i]][hb11b[i]] < 1000. ){ |
| 3121 |
|
// ms11b[i] = adc[ch11b[i]][hb11b[i]]; |
| 3122 |
|
// }; |
| 3123 |
|
// xp11[i] = 0.; |
| 3124 |
|
// }; |
| 3125 |
|
|
| 3126 |
Int_t nmtof = 0; |
Int_t nmtof = 0; |
| 3127 |
Float_t mtof = 0.; |
Float_t mtof = 0.; |
| 3238 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3239 |
ColorMIP(ms11a[j]+ms11b[j],colo); |
ColorMIP(ms11a[j]+ms11b[j],colo); |
| 3240 |
} else { |
} else { |
| 3241 |
ColorTOFMIP(ms11a[j]+ms11b[j],colo); |
ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo); |
| 3242 |
}; |
}; |
| 3243 |
// |
// |
| 3244 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3268 |
ftof11y->Draw(); |
ftof11y->Draw(); |
| 3269 |
TPolyLine *sftof11[8]; |
TPolyLine *sftof11[8]; |
| 3270 |
tt = 1; |
tt = 1; |
| 3271 |
if ( level.file == -1 ) tt = 8; |
rj=1; |
| 3272 |
|
if ( level.file == -1 ){ |
| 3273 |
|
tt = 8; |
| 3274 |
|
rj = 8; |
| 3275 |
|
}; |
| 3276 |
for ( Int_t j=0; j<tt; j++){ |
for ( Int_t j=0; j<tt; j++){ |
| 3277 |
if ( (mt11[0][j]<4095. || mt11[1][j]<4095.)){ |
rj--; |
| 3278 |
|
if ( (mt11[0][rj]<4095. || mt11[1][rj]<4095.)){ |
| 3279 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
| 3280 |
Float_t lowp = (xp11[j]-E11[j])/100.; |
Float_t lowp = -(xp11[rj]+E11[rj])/100.; |
| 3281 |
Float_t higp = (xp11[j]+E11[j])/100.; |
Float_t higp = -(xp11[rj]-E11[rj])/100.; |
| 3282 |
if ( lowp < -0.164 ) lowp = -0.164; |
if ( lowp < -0.164 ) lowp = -0.164; |
| 3283 |
if ( higp > 0.164 ) higp = 0.164; |
if ( higp > 0.164 ) higp = 0.164; |
| 3284 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){ |
| 3285 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3286 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws13-0.0015), (float)(ws13-0.0015), 0.0015}; |
| 3287 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3288 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3289 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3306 |
Float_t s12p = 0.055; |
Float_t s12p = 0.055; |
| 3307 |
ocolo = 10; |
ocolo = 10; |
| 3308 |
TPolyLine *ftof12y[6]; |
TPolyLine *ftof12y[6]; |
| 3309 |
|
rj = 6; |
| 3310 |
for ( Int_t j=0; j<6; j++){ |
for ( Int_t j=0; j<6; j++){ |
| 3311 |
|
rj--; |
| 3312 |
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)}; |
| 3313 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
| 3314 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3325 |
colo = 1; |
colo = 1; |
| 3326 |
}; |
}; |
| 3327 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3328 |
ColorMIP(ms12a[j]+ms12b[j],colo); |
ColorMIP(ms12a[rj]+ms12b[rj],colo); |
| 3329 |
} else { |
} else { |
| 3330 |
ColorTOFMIP(ms12a[j]+ms12b[j],colo); |
ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo); |
| 3331 |
}; |
}; |
| 3332 |
// |
// |
| 3333 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3369 |
if ( higp > 0.203 ) higp = 0.203; |
if ( higp > 0.203 ) higp = 0.203; |
| 3370 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){ |
| 3371 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3372 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws13+0.0015, -ws13+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws13+0.0015), (float)(-ws13+0.0015), -0.0015}; |
| 3373 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3374 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3375 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3394 |
Float_t s21p = 0.075; |
Float_t s21p = 0.075; |
| 3395 |
ocolo = 10; |
ocolo = 10; |
| 3396 |
TPolyLine *ftof21y[2]; |
TPolyLine *ftof21y[2]; |
| 3397 |
|
rj=2; |
| 3398 |
for ( Int_t j=0; j<2; j++){ |
for ( Int_t j=0; j<2; j++){ |
| 3399 |
|
rj--; |
| 3400 |
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)}; |
| 3401 |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
Float_t nyc1[5]={ 0., ws2, ws2, 0., 0.}; |
| 3402 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3404 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3405 |
nxc[i]= xs2y + nxc1[i]*var.sfx; |
nxc[i]= xs2y + nxc1[i]*var.sfx; |
| 3406 |
nyc[i] = ys2y + nyc1[i]*var.sfy; |
nyc[i] = ys2y + nyc1[i]*var.sfy; |
| 3407 |
|
// printf(" TOF i %i x %f y %f \n",i,nxc[i],nyc[i]); |
| 3408 |
}; |
}; |
| 3409 |
ftof21y[j] = new TPolyLine(5,nxc,nyc); |
ftof21y[j] = new TPolyLine(5,nxc,nyc); |
| 3410 |
ftof21y[j]->SetLineColor(1); |
ftof21y[j]->SetLineColor(1); |
| 3414 |
colo = 1; |
colo = 1; |
| 3415 |
}; |
}; |
| 3416 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3417 |
ColorMIP(ms21a[j]+ms21b[j],colo); |
ColorMIP(ms21a[rj]+ms21b[rj],colo); |
| 3418 |
} else { |
} else { |
| 3419 |
ColorTOFMIP(ms21a[j]+ms21b[j],colo); |
ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo); |
| 3420 |
}; |
}; |
| 3421 |
// |
// |
| 3422 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3458 |
if ( higp > 0.089 ) higp = 0.089; |
if ( higp > 0.089 ) higp = 0.089; |
| 3459 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){ |
| 3460 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3461 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws2-0.0015, ws2-0.0015, 0.}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws2-0.0015), (float)(ws2-0.0015), 0.}; |
| 3462 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3463 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3464 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3502 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3503 |
ColorMIP(ms22a[j]+ms22b[j],colo); |
ColorMIP(ms22a[j]+ms22b[j],colo); |
| 3504 |
} else { |
} else { |
| 3505 |
ColorTOFMIP(ms22a[j]+ms22b[j],colo); |
ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo); |
| 3506 |
}; |
}; |
| 3507 |
// |
// |
| 3508 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3533 |
ftof22y->Draw(); |
ftof22y->Draw(); |
| 3534 |
TPolyLine *sftof22[2]; |
TPolyLine *sftof22[2]; |
| 3535 |
tt = 1; |
tt = 1; |
| 3536 |
if ( level.file == -1 ) tt = 2; |
rj = 1; |
| 3537 |
|
if ( level.file == -1 ){ |
| 3538 |
|
tt = 2; |
| 3539 |
|
rj = 2; |
| 3540 |
|
}; |
| 3541 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
| 3542 |
|
rj--; |
| 3543 |
// for ( Int_t j=0; j<2; j++){ |
// for ( Int_t j=0; j<2; j++){ |
| 3544 |
if ( (mt22[0][j]<4095. || mt22[1][j]<4095.) ){ |
if ( (mt22[0][rj]<4095. || mt22[1][rj]<4095.) ){ |
| 3545 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
| 3546 |
Float_t lowp = (xp22[j]-E22[j])/100.; |
Float_t lowp = -(xp22[rj]+E22[rj])/100.; |
| 3547 |
Float_t higp = (xp22[j]+E22[j])/100.; |
Float_t higp = -(xp22[rj]-E22[rj])/100.; |
| 3548 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
| 3549 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
| 3550 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){ |
| 3551 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3552 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws2+0.0015, -ws2+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws2+0.0015), (float)(-ws2+0.0015), -0.0015}; |
| 3553 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3554 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3555 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3567 |
}; |
}; |
| 3568 |
}; |
}; |
| 3569 |
// |
// |
| 3570 |
|
//daquiinbasso |
| 3571 |
// |
// |
| 3572 |
// S31 X-view |
// S31 X-view |
| 3573 |
// |
// |
| 3593 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3594 |
ColorMIP(ms31a[j]+ms31b[j],colo); |
ColorMIP(ms31a[j]+ms31b[j],colo); |
| 3595 |
} else { |
} else { |
| 3596 |
ColorTOFMIP(ms31a[j]+ms31b[j],colo); |
ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo); |
| 3597 |
}; |
}; |
| 3598 |
// |
// |
| 3599 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3624 |
ftof31y->Draw(); |
ftof31y->Draw(); |
| 3625 |
TPolyLine *sftof31[3]; |
TPolyLine *sftof31[3]; |
| 3626 |
tt = 1; |
tt = 1; |
| 3627 |
if ( level.file == -1 ) tt = 3; |
rj = 1; |
| 3628 |
|
if ( level.file == -1 ){ |
| 3629 |
|
tt = 3; |
| 3630 |
|
rj = 3; |
| 3631 |
|
}; |
| 3632 |
for (Int_t j=0; j<tt; j++){ |
for (Int_t j=0; j<tt; j++){ |
| 3633 |
|
rj--; |
| 3634 |
// for ( Int_t j=0; j<3; j++){ |
// for ( Int_t j=0; j<3; j++){ |
| 3635 |
if ( (mt31[0][j]<4095. || mt31[1][j]<4095.)){ |
if ( (mt31[0][rj]<4095. || mt31[1][rj]<4095.)){ |
| 3636 |
if ( ocolo == 10 ) ocolo = noadc; |
if ( ocolo == 10 ) ocolo = noadc; |
| 3637 |
Float_t lowp = (xp31[j]-E31[j])/100.; |
Float_t lowp = -(xp31[rj]+E31[rj])/100.; |
| 3638 |
Float_t higp = (xp31[j]+E31[j])/100.; |
Float_t higp = -(xp31[rj]-E31[rj])/100.; |
| 3639 |
if ( lowp < -0.074 ) lowp = -0.074; |
if ( lowp < -0.074 ) lowp = -0.074; |
| 3640 |
if ( higp > 0.074 ) higp = 0.074; |
if ( higp > 0.074 ) higp = 0.074; |
| 3641 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){ |
| 3642 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3643 |
Float_t nyc1[5]={ 0.0015, 0.0015, ws13-0.0015, ws13-0.0015, 0.0015}; |
Float_t nyc1[5]={ 0.0015, 0.0015, (float)(ws13-0.0015), (float)(ws13-0.0015), 0.0015}; |
| 3644 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3645 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3646 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 3665 |
Float_t s32p = 0.050; |
Float_t s32p = 0.050; |
| 3666 |
ocolo = 10; |
ocolo = 10; |
| 3667 |
TPolyLine *ftof32y[3]; |
TPolyLine *ftof32y[3]; |
| 3668 |
|
rj = 3; |
| 3669 |
for ( Int_t j=0; j<3; j++){ |
for ( Int_t j=0; j<3; j++){ |
| 3670 |
|
rj--; |
| 3671 |
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)}; |
| 3672 |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
Float_t nyc1[5]={ -ws13, 0., 0., -ws13, -ws13}; |
| 3673 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3684 |
colo = 1; |
colo = 1; |
| 3685 |
}; |
}; |
| 3686 |
if ( level.file == -1 ){ |
if ( level.file == -1 ){ |
| 3687 |
ColorMIP(ms32a[j]+ms32b[j],colo); |
ColorMIP(ms32a[rj]+ms32b[rj],colo); |
| 3688 |
} else { |
} else { |
| 3689 |
ColorTOFMIP(ms32a[j]+ms32b[j],colo); |
ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo); |
| 3690 |
}; |
}; |
| 3691 |
// |
// |
| 3692 |
if ( colo != 10 ) ocolo = colo; |
if ( colo != 10 ) ocolo = colo; |
| 3728 |
if ( higp > 0.089 ) higp = 0.089; |
if ( higp > 0.089 ) higp = 0.089; |
| 3729 |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){ |
if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){ |
| 3730 |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp}; |
| 3731 |
Float_t nyc1[5]={ -0.0015, -0.0015, -ws13+0.0015, -ws13+0.0015, -0.0015}; |
Float_t nyc1[5]={ -0.0015, -0.0015, (float)(-ws13+0.0015), (float)(-ws13+0.0015), -0.0015}; |
| 3732 |
Float_t nxc[5]; |
Float_t nxc[5]; |
| 3733 |
Float_t nyc[5]; |
Float_t nyc[5]; |
| 3734 |
for (Int_t i = 0; i<5 ; i++) { |
for (Int_t i = 0; i<5 ; i++) { |
| 4104 |
// |
// |
| 4105 |
if ( true ){ |
if ( true ){ |
| 4106 |
// PMTs |
// PMTs |
| 4107 |
Float_t xc1[5]={ 0., 0.014*var.sfx, 0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1), -var.sfx*var.sfx*pmt1*cos(apmt1), 0.}; |
Float_t xc1[5]={ 0., (float)(0.014*var.sfx), (float)(0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1)), (float)(-var.sfx*var.sfx*pmt1*cos(apmt1)), 0.}; |
| 4108 |
Float_t yc1[5]={ 0., 0.011*var.sfy, 0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1), var.sfy*var.sfy*pmt1*sin(apmt1), 0.}; |
Float_t yc1[5]={ 0., (float)(0.011*var.sfy), (float)(0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1)), (float)(var.sfy*var.sfy*pmt1*sin(apmt1)), 0.}; |
| 4109 |
Float_t xc2[5]={ 0., 0.011*var.sfx, 0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2), -pmt2*var.sfx*var.sfx*cos(apmt2), 0.}; |
Float_t xc2[5]={ 0., (float)(0.011*var.sfx), (float)(0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2)), (float)(-pmt2*var.sfx*var.sfx*cos(apmt2)), 0.}; |
| 4110 |
Float_t yc2[5]={ 0., 0.015*var.sfy, 0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2), var.sfy*pmt2*var.sfy*sin(apmt2), 0.}; |
Float_t yc2[5]={ 0., (float)(0.015*var.sfy), (float)(0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2)), (float)(var.sfy*pmt2*var.sfy*sin(apmt2)), 0.}; |
| 4111 |
// SCINTs |
// SCINTs |
| 4112 |
Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212, -0.257, -0.242, -0.149}; |
Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212, -0.257, -0.242, -0.149}; |
| 4113 |
Float_t ycc1[10]={ 0.169, 0.108165, -0.108165, -0.169, -0.169, -0.158, 0., 0.158, 0.169, 0.169}; |
Float_t ycc1[10]={ 0.169, 0.108165, -0.108165, -0.169, -0.169, -0.158, 0., 0.158, 0.169, 0.169}; |
| 4653 |
pcasp4b->Draw("f"); |
pcasp4b->Draw("f"); |
| 4654 |
pcasp4b->Draw(); |
pcasp4b->Draw(); |
| 4655 |
}; |
}; |
| 4656 |
Float_t alfa = 1.2020334; |
// Float_t alfax = 1.2020334; |
| 4657 |
|
Float_t alfax = 1.22157778; |
| 4658 |
|
Float_t alfay = 1.27393111; |
| 4659 |
Float_t lcrd = 0.1815/2.; |
Float_t lcrd = 0.1815/2.; |
| 4660 |
Float_t wcrd = 0.008; |
Float_t wcrd = 0.008; |
| 4661 |
if ( true ){ |
if ( true ){ |
| 4866 |
// |
// |
| 4867 |
// Float_t cardcx = 0.143168*var.sfx; |
// Float_t cardcx = 0.143168*var.sfx; |
| 4868 |
//Float_t cardcy = 0.1475*var.sfy; |
//Float_t cardcy = 0.1475*var.sfy; |
| 4869 |
Float_t cardcx = 0.153168*var.sfx; |
// |
| 4870 |
Float_t cardcy = 0.1575*var.sfy; |
// Float_t cardcx = 0.153168*var.sfx; |
| 4871 |
Float_t acrdx[4] = {-lcrd*cos(alfa), lcrd*cos(alfa), -lcrd*cos(alfa)+wcrd*sin(alfa), -lcrd*cos(alfa)}; |
// |
| 4872 |
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; |
| 4873 |
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; |
| 4874 |
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; |
| 4875 |
|
Float_t acrdx[4] = {-lcrd*cos(alfax), lcrd*cos(alfax), -lcrd*cos(alfax)+wcrd*sin(alfax), -lcrd*cos(alfax)}; |
| 4876 |
|
Float_t acrdy[4] = {-lcrd*sin(alfax), lcrd*sin(alfax), -lcrd*sin(alfax)-wcrd*cos(alfax), -lcrd*sin(alfax)}; |
| 4877 |
|
Float_t bcrdx[4] = { lcrd*cos(alfax), lcrd*cos(alfax)+wcrd*sin(alfax), -lcrd*cos(alfax)+wcrd*sin(alfax), lcrd*cos(alfax)}; |
| 4878 |
|
Float_t bcrdy[4] = { lcrd*sin(alfax), lcrd*sin(alfax)-wcrd*cos(alfax), -lcrd*sin(alfax)-wcrd*cos(alfax), lcrd*sin(alfax)}; |
| 4879 |
|
|
| 4880 |
// |
// |
| 4881 |
// CARD3 X/ Y |
// CARD3 X/ Y |
| 4935 |
}; |
}; |
| 4936 |
|
|
| 4937 |
if ( true ){ |
if ( true ){ |
| 4938 |
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)}; |
| 4939 |
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)}; |
| 4940 |
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)}; |
| 4941 |
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)}; |
| 4942 |
// |
// |
| 4943 |
// CARD - Y-view |
// CARD - Y-view |
| 4944 |
// |
// |
| 4945 |
Float_t cardcx = 0.12*var.sfx; |
// Float_t cardcx = 0.12*var.sfx; |
| 4946 |
Float_t cardcy = 0.1475*var.sfy; |
Float_t cardcx = (0.16014*(1.-lcrd*cos(alfay)))*var.sfx; |
| 4947 |
|
// Float_t cardcy = 0.178818*var.sfy; |
| 4948 |
|
Float_t cardcy = (0.178818*(1.-lcrd*sin(alfay)))*var.sfy; |
| 4949 |
|
// Float_t cardcy = 0.1475*var.sfy; |
| 4950 |
// |
// |
| 4951 |
// CARD4 X Y/ |
// CARD4 X Y/ |
| 4952 |
// |
// |
| 5400 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
| 5401 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
| 5402 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
| 5403 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
| 5404 |
|
} else { |
| 5405 |
|
x = 1024 - trk->addrcluster[l][m]; |
| 5406 |
}; |
}; |
| 5407 |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
linea = new TLine(14.+x,0.01,14.+x,0.3); |
| 5408 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
| 5472 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
| 5473 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
| 5474 |
for (Int_t img=0; img<2; img++){ |
for (Int_t img=0; img<2; img++){ |
| 5475 |
x = singlet->coord[img]; |
x = -singlet->coord[img]; |
| 5476 |
Float_t xsig = singlet->sgnl; |
Float_t xsig = singlet->sgnl; |
| 5477 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
| 5478 |
// |
// |
| 5528 |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
trkpad[planepad]->Range(-8.1,0.,8.1,8.); |
| 5529 |
// |
// |
| 5530 |
x = track->xm[plane]; |
x = track->xm[plane]; |
| 5531 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
| 5532 |
if ( track->xgood[plane] ){ |
if ( track->XGood(plane) ){ |
| 5533 |
//if ( x > -100 ){ |
//if ( x > -100 ){ |
| 5534 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
| 5535 |
if ( var.bw ){ |
if ( var.bw ){ |
| 5537 |
} else { |
} else { |
| 5538 |
sigcol2 = 1; |
sigcol2 = 1; |
| 5539 |
}; |
}; |
| 5540 |
ColorTRKMIP(track->dedx_x[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0); |
| 5541 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
| 5542 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
| 5543 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
| 5544 |
linea->Draw(); |
linea->Draw(); |
| 5545 |
Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3}; |
Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)}; |
| 5546 |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
| 5547 |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
| 5548 |
tlinea->SetLineWidth(1); |
tlinea->SetLineWidth(1); |
| 5557 |
planepad = plane * 2; |
planepad = plane * 2; |
| 5558 |
trkpad[planepad]->cd(); |
trkpad[planepad]->cd(); |
| 5559 |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
trkpad[planepad]->Range(-7.05,0.,7.05,8.); |
| 5560 |
x = track->ym[plane]; |
x = -track->ym[plane]; |
| 5561 |
xsig = track->dedx_y[plane]; |
xsig = fabs(track->dedx_y[plane]); |
| 5562 |
if ( track->ygood[plane] ){ |
if ( track->YGood(plane) ){ |
| 5563 |
// if ( x > -100 ){ |
// if ( x > -100 ){ |
| 5564 |
if ( xsig > 8. ) xsig = 8.; |
if ( xsig > 8. ) xsig = 8.; |
| 5565 |
if ( var.bw ){ |
if ( var.bw ){ |
| 5567 |
} else { |
} else { |
| 5568 |
sigcol2 = 1; |
sigcol2 = 1; |
| 5569 |
}; |
}; |
| 5570 |
ColorTRKMIP(track->dedx_y[plane],sigcol2,0); |
ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0); |
| 5571 |
linea = new TLine(x,0.01,x,xsig); |
linea = new TLine(x,0.01,x,xsig); |
| 5572 |
linea->SetLineWidth(2); |
linea->SetLineWidth(2); |
| 5573 |
linea->SetLineColor(sigcol2); |
linea->SetLineColor(sigcol2); |
| 5574 |
linea->Draw(); |
linea->Draw(); |
| 5575 |
Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3}; |
Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)}; |
| 5576 |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
Float_t tz[5] = {0., 0., 0.5, 0.5, 0.}; |
| 5577 |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
TPolyLine *tlinea = new TPolyLine(5,tx,tz); |
| 5578 |
tlinea->SetLineColor(dcol); |
tlinea->SetLineColor(dcol); |
| 5610 |
// first of all plot crosses relatives to tracks |
// first of all plot crosses relatives to tracks |
| 5611 |
// |
// |
| 5612 |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
| 5613 |
|
// for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
| 5614 |
|
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
| 5615 |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
| 5616 |
TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
PamTrack *ptrack= L2->GetTrack(nt); |
| 5617 |
|
TrkTrack *track = ptrack->GetTrkTrack(); |
| 5618 |
|
// |
| 5619 |
for (Int_t plane = 0; plane<6; plane++){ |
for (Int_t plane = 0; plane<6; plane++){ |
| 5620 |
// |
// |
| 5621 |
x = track->xm[plane]; |
x = track->xm[plane]; |
| 5622 |
Float_t y = track->ym[plane]; |
Float_t y = -track->ym[plane]; |
| 5623 |
Float_t xsig = track->dedx_x[plane]; |
Float_t xsig = fabs(track->dedx_x[plane]); |
| 5624 |
Float_t ysig = track->dedx_y[plane]; |
Float_t ysig = fabs(track->dedx_y[plane]); |
| 5625 |
// if ( x > -100 && y > -100. ){ |
// if ( x > -100 && y > -100. ){ |
| 5626 |
if ( track->xgood[plane] && track->ygood[plane] ){ |
if ( track->XGood(plane) && track->YGood(plane) ){ |
| 5627 |
if ( var.bw ){ |
if ( var.bw ){ |
| 5628 |
sigcol1 = -1; |
sigcol1 = -1; |
| 5629 |
sigcol2 = -1; |
sigcol2 = -1; |
| 5741 |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
for (Int_t sing = 0; sing < min(totsx,totsy); sing++){ |
| 5742 |
// |
// |
| 5743 |
x = arrax->At(orderx->At(sing)); |
x = arrax->At(orderx->At(sing)); |
| 5744 |
Float_t y1 = array1->At(ordery->At(sing)); |
Float_t y1 = -array1->At(ordery->At(sing)); |
| 5745 |
Float_t y2 = array2->At(ordery->At(sing)); |
Float_t y2 = -array2->At(ordery->At(sing)); |
| 5746 |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
Float_t xsig = sigarrax->At(orderx->At(sing)); |
| 5747 |
Float_t ysig = sigarray->At(ordery->At(sing)); |
Float_t ysig = sigarray->At(ordery->At(sing)); |
| 5748 |
if ( x > -100 && y1 > -100. ){ |
if ( x > -100 && y1 > -100. ){ |
| 5835 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
| 5836 |
if ( trk->signcluster[l][m] != 0. ){ |
if ( trk->signcluster[l][m] != 0. ){ |
| 5837 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[l][m]; |
|
|
} else { |
|
| 5838 |
x = trk->addrcluster[l][m]; |
x = trk->addrcluster[l][m]; |
| 5839 |
|
} else { |
| 5840 |
|
x = 1024 - trk->addrcluster[l][m]; |
| 5841 |
}; |
}; |
| 5842 |
x += 1024.; |
x += 1024.; |
| 5843 |
if ( trk->signcluster[l][m]> ysig ){ |
if ( trk->signcluster[l][m]> ysig ){ |
| 5844 |
ysig = trk->signcluster[l][m]; |
ysig = trk->signcluster[l][m]; |
| 5845 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
| 5846 |
yh2[ncro] = x; |
yh2[ncro] = x; |
| 5847 |
}; |
}; |
| 5848 |
}; |
}; |
| 5870 |
for (Int_t m = 0; m<3; m++){ |
for (Int_t m = 0; m<3; m++){ |
| 5871 |
if ( trk->signcluster[e][m] != 0. ){ |
if ( trk->signcluster[e][m] != 0. ){ |
| 5872 |
if ( planeno == 10 ) { |
if ( planeno == 10 ) { |
|
x = 1024 - trk->addrcluster[e][m]; |
|
|
} else { |
|
| 5873 |
x = trk->addrcluster[e][m]; |
x = trk->addrcluster[e][m]; |
| 5874 |
|
} else { |
| 5875 |
|
x = 1024 - trk->addrcluster[e][m]; |
| 5876 |
}; |
}; |
| 5877 |
x += 1024.; |
x += 1024.; |
| 5878 |
if ( trk->signcluster[e][m]> ysig ){ |
if ( trk->signcluster[e][m]> ysig ){ |
| 5879 |
ysig = trk->signcluster[e][m]; |
ysig = trk->signcluster[e][m]; |
| 5880 |
yh1[ncro] = x-1024.; |
yh1[ncro] = x - 1024.; |
| 5881 |
yh2[ncro] = x; |
yh2[ncro] = x; |
| 5882 |
}; |
}; |
| 5883 |
}; |
}; |
| 5929 |
|
|
| 5930 |
void FEVdetector::ShowTrack(){ |
void FEVdetector::ShowTrack(){ |
| 5931 |
// |
// |
| 5932 |
|
if ( level.file != 2 ) return; |
| 5933 |
|
// |
| 5934 |
// |
// |
| 5935 |
// |
// |
| 5936 |
if ( var.CALO && false ){ |
if ( var.CALO && var.CALOT ){ |
| 5937 |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
| 5938 |
Float_t calx[22]; |
Float_t calx[22]; |
| 5939 |
Float_t caly[22]; |
Float_t caly[22]; |
| 5950 |
}; |
}; |
| 5951 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
| 5952 |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
| 5953 |
caly[plane] = (L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
| 5954 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
| 5955 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
| 5956 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
| 5999 |
// |
// |
| 6000 |
for (Int_t plane = 0; plane < 22; plane++){ |
for (Int_t plane = 0; plane < 22; plane++){ |
| 6001 |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
| 6002 |
caly[plane] = (ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
caly[plane] = (-ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
| 6003 |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
| 6004 |
calzx[plane] = zpiano[plane] + var.yxvc; |
calzx[plane] = zpiano[plane] + var.yxvc; |
| 6005 |
calzy[plane] = zpiano[plane] + var.yyvc; |
calzy[plane] = zpiano[plane] + var.yyvc; |
| 6028 |
}; |
}; |
| 6029 |
}; |
}; |
| 6030 |
// |
// |
| 6031 |
if ( !var.TRK || level.file != 2 ) return; |
if ( !var.TRK ) return; |
| 6032 |
// |
// |
| 6033 |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
| 6034 |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
| 6035 |
|
|
| 6036 |
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
| 6037 |
|
// printf("qui \n"); |
| 6038 |
PamTrack *ptrack = L2->GetTrack(nt); |
PamTrack *ptrack = L2->GetTrack(nt); |
| 6039 |
TrkTrack *track = ptrack->GetTrkTrack(); |
TrkTrack *track = ptrack->GetTrkTrack(); |
| 6040 |
|
// printf("qua \n"); |
| 6041 |
Int_t npoint = 100; |
Int_t npoint = 100; |
| 6042 |
Float_t zin[100]; |
Float_t zin[100]; |
| 6043 |
Double_t xout[100]; |
// Double_t xout[100]; |
| 6044 |
Double_t yout[100]; |
// Double_t yout[100]; |
| 6045 |
Int_t ifail = 0; |
Int_t ifail = 0; |
| 6046 |
Int_t trcol = 10; |
Int_t trcol = 10; |
| 6047 |
// |
// |
| 6059 |
Float_t tzy1[15]; |
Float_t tzy1[15]; |
| 6060 |
// |
// |
| 6061 |
for ( Int_t e = 0; e < 100 ; e++) { |
for ( Int_t e = 0; e < 100 ; e++) { |
| 6062 |
xout[e] = 0.; |
// xout[e] = 0.; |
| 6063 |
yout[e] = 0.; |
// yout[e] = 0.; |
| 6064 |
// |
// |
| 6065 |
tx[e] = 0.; |
tx[e] = 0.; |
| 6066 |
ty[e] = 0.; |
ty[e] = 0.; |
| 6086 |
// |
// |
| 6087 |
Trajectory *tr = new Trajectory(npoint,zin); |
Trajectory *tr = new Trajectory(npoint,zin); |
| 6088 |
// |
// |
| 6089 |
ifail = track->DoTrack2(tr); |
// ifail = track->DoTrack2(tr); |
| 6090 |
|
ifail = track->DoTrack(tr); |
| 6091 |
// |
// |
| 6092 |
if ( !ifail ){ |
if ( !ifail ){ |
| 6093 |
for ( Int_t e = 0; e < npoint ; e++) { |
for ( Int_t e = 0; e < npoint ; e++) { |
| 6094 |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
tx[e] = ((float)tr->x[e]/100.)*var.sfx + var.xxvc; |
| 6095 |
ty[e] = ((float)tr->y[e]/100.)*var.sfx + var.xyvc; |
ty[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xyvc; |
| 6096 |
if ( e < 50 ) { |
if ( e < 50 ) { |
| 6097 |
ptx1[e] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx1[e] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
| 6098 |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty1[e] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
| 6099 |
} else { |
} else { |
| 6100 |
ptx2[e-50] = ((float)tr->y[e]/100.)*var.sfx + var.xcat; |
ptx2[e-50] = (-(float)tr->y[e]/100.)*var.sfx + var.xcat; |
| 6101 |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
pty2[e-50] = ((float)tr->x[e]/100.)*var.sfy + var.ycat; |
| 6102 |
}; |
}; |
| 6103 |
if ( e > 84 ) { |
if ( e > 84 ) { |
| 6104 |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
tx1[e-85] = ((float)tr->x[e]/100.)*var.nds4 + var.xxvc; |
| 6105 |
ty1[e-85] = ((float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
ty1[e-85] = (-(float)tr->y[e]/100.)*var.nds4 + var.xyvc; |
| 6106 |
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; |
| 6107 |
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; |
| 6108 |
}; |
}; |
| 6235 |
// |
// |
| 6236 |
stringstream xevent; |
stringstream xevent; |
| 6237 |
stringstream yevent; |
stringstream yevent; |
| 6238 |
Float_t sdexy[2][22][96]; |
// Float_t sdexy[2][22][96]; |
| 6239 |
Float_t sdexyc[2][22][96]; |
// Float_t sdexyc[2][22][96]; |
| 6240 |
// |
// |
| 6241 |
for (Int_t m = 0; m < 22; m++){ |
for (Int_t m = 0; m < 22; m++){ |
| 6242 |
for (Int_t l = 0; l < 2; l++){ |
for (Int_t l = 0; l < 2; l++){ |
| 6246 |
Int_t se = 5; |
Int_t se = 5; |
| 6247 |
if ( !l && m%2 == 0 ) se = 3; |
if ( !l && m%2 == 0 ) se = 3; |
| 6248 |
if ( !l && m%2 != 0 ) se = 2; |
if ( !l && m%2 != 0 ) se = 2; |
| 6249 |
if ( l && m%2 == 0 ) se = 1; |
if ( l && m%2 != 0 ) se = 1; |
| 6250 |
if ( l && m%2 != 0 ) se = 0; |
if ( l && m%2 == 0 ) se = 0; |
| 6251 |
// |
// |
| 6252 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
| 6253 |
// |
// |
| 6254 |
bool isCOMP = 0; |
// bool isCOMP = 0; |
| 6255 |
bool isFULL = 0; |
// bool isFULL = 0; |
| 6256 |
bool isRAW = 0; |
bool isRAW = 0; |
| 6257 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
| 6258 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
| 6259 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
| 6260 |
// |
// |
| 6261 |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
| 6265 |
for (Int_t nn = 0; nn < 96; nn++){ |
for (Int_t nn = 0; nn < 96; nn++){ |
| 6266 |
if ( nn%16 == 0 ) pre++; |
if ( nn%16 == 0 ) pre++; |
| 6267 |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
| 6268 |
sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
| 6269 |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
| 6270 |
sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
| 6271 |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
| 6272 |
}; |
}; |
| 6273 |
}; |
}; |
| 6342 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
| 6343 |
}; |
}; |
| 6344 |
if ( l == 1 ) { |
if ( l == 1 ) { |
| 6345 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(95-n,21-m,1.); |
| 6346 |
pd2->cd(); |
pd2->cd(); |
| 6347 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
| 6348 |
}; |
}; |
| 6362 |
// |
// |
| 6363 |
// Define variables |
// Define variables |
| 6364 |
// |
// |
| 6365 |
Int_t etime = var.etime; |
UInt_t etime = var.etime; |
| 6366 |
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]; |
| 6367 |
Int_t badstrip = 0; |
Int_t badstrip = 0; |
| 6368 |
qtot = 0.; |
qtot = 0.; |
| 6369 |
nstrip = 0; |
nstrip = 0; |
| 6434 |
if ( calib.ttime[s][b[s]+1] && calib.time[s][b[s]] ){ |
if ( calib.ttime[s][b[s]+1] && calib.time[s][b[s]] ){ |
| 6435 |
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 ){ |
| 6436 |
printf(" CALORIMETER: \n" ); |
printf(" CALORIMETER: \n" ); |
| 6437 |
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]); |
| 6438 |
printf(" END CALORIMETER. \n\n" ); |
printf(" END CALORIMETER. \n\n" ); |
| 6439 |
b[s]++; |
b[s]++; |
| 6440 |
CaloPede(s); |
CaloPede(s); |
| 6454 |
Int_t se = 5; |
Int_t se = 5; |
| 6455 |
if (l == 0 && m%2 == 0) se = 3; |
if (l == 0 && m%2 == 0) se = 3; |
| 6456 |
if (l == 0 && m%2 != 0) se = 2; |
if (l == 0 && m%2 != 0) se = 2; |
| 6457 |
if (l == 1 && m%2 == 0) se = 1; |
if (l == 1 && m%2 != 0) se = 1; |
| 6458 |
if (l == 1 && m%2 != 0) se = 0; |
if (l == 1 && m%2 == 0) se = 0; |
| 6459 |
// |
// |
| 6460 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
| 6461 |
// |
// |
| 6462 |
bool isCOMP = 0; |
// bool isCOMP = 0; |
| 6463 |
bool isFULL = 0; |
// bool isFULL = 0; |
| 6464 |
bool isRAW = 0; |
bool isRAW = 0; |
| 6465 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
| 6466 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
| 6467 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
| 6468 |
// |
// |
| 6469 |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
// save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc |
| 6473 |
for (Int_t nn = 0; nn < 96; nn++){ |
for (Int_t nn = 0; nn < 96; nn++){ |
| 6474 |
if ( nn%16 == 0 ) pre++; |
if ( nn%16 == 0 ) pre++; |
| 6475 |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
evento.base[l][m][pre] = calib.calbase[l][m][pre]; |
| 6476 |
sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexy[l][m][nn] = evento.dexy[l][m][nn]; |
| 6477 |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexy[l][m][nn] = de->dexy[l][m][nn] ; |
| 6478 |
sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
// sdexyc[l][m][nn] = evento.dexy[l][m][nn]; |
| 6479 |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ; |
| 6480 |
}; |
}; |
| 6481 |
}; |
}; |
| 6484 |
// |
// |
| 6485 |
Int_t done = 0; |
Int_t done = 0; |
| 6486 |
Int_t rdone = 0; |
Int_t rdone = 0; |
| 6487 |
Int_t fdone = 0; |
// Int_t fdone = 0; |
| 6488 |
pre = -1; |
pre = -1; |
| 6489 |
for (Int_t n =0 ; n < 96; n++){ |
for (Int_t n =0 ; n < 96; n++){ |
| 6490 |
if ( n%16 == 0 ) { |
if ( n%16 == 0 ) { |
| 6491 |
pre++; |
pre++; |
| 6492 |
done = 0; |
done = 0; |
| 6493 |
rdone = 0; |
rdone = 0; |
| 6494 |
fdone = 0; |
// fdone = 0; |
| 6495 |
}; |
}; |
| 6496 |
// |
// |
| 6497 |
// baseline check and calculation |
// baseline check and calculation |
| 6571 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
| 6572 |
}; |
}; |
| 6573 |
if ( l == 1 ) { |
if ( l == 1 ) { |
| 6574 |
Yview->Fill(n,21-m,1.); |
Yview->Fill(96-n,21-m,1.); |
| 6575 |
pd2->cd(); |
pd2->cd(); |
| 6576 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
| 6577 |
}; |
}; |
| 6658 |
// |
// |
| 6659 |
stringstream xvev; |
stringstream xvev; |
| 6660 |
stringstream yvev; |
stringstream yvev; |
| 6661 |
for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
// for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){ |
| 6662 |
|
for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){ |
| 6663 |
Int_t colo; |
Int_t colo; |
| 6664 |
Int_t l; |
Int_t l; |
| 6665 |
Int_t m; |
Int_t m; |
| 6666 |
Int_t n; |
Int_t n; |
| 6667 |
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n); |
Bool_t satura = false; |
| 6668 |
|
Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura); |
| 6669 |
if ( var.bw ){ |
if ( var.bw ){ |
| 6670 |
colo = -1; |
colo = -1; |
| 6671 |
} else { |
} else { |
| 6672 |
colo = 1; |
colo = 1; |
| 6673 |
}; |
}; |
| 6674 |
ColorMIP(mip,colo); |
ColorMIP(mip,colo); |
| 6675 |
if ( l == 0 ) { |
if ( l == 0 ) { |
| 6676 |
xvev.str(""); |
xvev.str(""); |
| 6679 |
xvev << " " << l; |
xvev << " " << l; |
| 6680 |
gDirectory->Delete(xvev.str().c_str()); |
gDirectory->Delete(xvev.str().c_str()); |
| 6681 |
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); |
| 6682 |
Xview->SetFillColor(colo); |
if ( satura ){ |
| 6683 |
|
Xview->SetFillColor(kBlack); |
| 6684 |
|
} else { |
| 6685 |
|
Xview->SetFillColor(colo); |
| 6686 |
|
}; |
| 6687 |
Xview->Fill(n,21-m,1.); |
Xview->Fill(n,21-m,1.); |
| 6688 |
pd1->cd(); |
pd1->cd(); |
| 6689 |
Xview->Draw("box same"); |
Xview->Draw("box same"); |
| 6695 |
yvev << " " << l; |
yvev << " " << l; |
| 6696 |
gDirectory->Delete(yvev.str().c_str()); |
gDirectory->Delete(yvev.str().c_str()); |
| 6697 |
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); |
| 6698 |
Yview->SetFillColor(colo); |
if ( satura ){ |
| 6699 |
Yview->Fill(n,21-m,1.); |
Yview->SetFillColor(kBlack); |
| 6700 |
|
} else { |
| 6701 |
|
Yview->SetFillColor(colo); |
| 6702 |
|
}; |
| 6703 |
|
Yview->Fill(96-n,21-m,1.); |
| 6704 |
pd2->cd(); |
pd2->cd(); |
| 6705 |
Yview->Draw("box same"); |
Yview->Draw("box same"); |
| 6706 |
}; |
}; |
| 6713 |
} |
} |
| 6714 |
|
|
| 6715 |
void FEVdetector::Calo1stcalib(){ |
void FEVdetector::Calo1stcalib(){ |
| 6716 |
Float_t estrip[2][22][96]; |
// Float_t estrip[2][22][96]; |
| 6717 |
// |
// |
| 6718 |
// this is the value of the mip for each strip. To be changed when we will have the real values |
// this is the value of the mip for each strip. To be changed when we will have the real values |
| 6719 |
// |
// |
| 6731 |
for (Int_t k = 0; k < 22; k++ ){ |
for (Int_t k = 0; k < 22; k++ ){ |
| 6732 |
for (Int_t l = 0; l < 96; l++ ){ |
for (Int_t l = 0; l < 96; l++ ){ |
| 6733 |
calib.calped[m][k][l] = 0. ; |
calib.calped[m][k][l] = 0. ; |
| 6734 |
estrip[m][k][l] = 0.; |
// estrip[m][k][l] = 0.; |
| 6735 |
}; |
}; |
| 6736 |
}; |
}; |
| 6737 |
} |
} |
| 6749 |
for (Int_t d = 0; d<48; d++){ |
for (Int_t d = 0; d<48; d++){ |
| 6750 |
if ( calib.ttime[s][d] != 0 ) calibex++; |
if ( calib.ttime[s][d] != 0 ) calibex++; |
| 6751 |
if ( calib.time[s][0] != 0 ){ |
if ( calib.time[s][0] != 0 ){ |
| 6752 |
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]); |
| 6753 |
if ( calib.time[s][d+1] != 0 ) { |
if ( calib.time[s][d+1] != 0 ) { |
| 6754 |
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]); |
| 6755 |
} else { |
} else { |
| 6756 |
if ( !stop ){ |
if ( !stop ){ |
| 6757 |
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]); |
| 6758 |
stop = 1; |
stop = 1; |
| 6759 |
}; |
}; |
| 6760 |
}; |
}; |
| 6761 |
} else { |
} else { |
| 6762 |
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]); |
| 6763 |
}; |
}; |
| 6764 |
}; |
}; |
| 6765 |
printf("\n"); |
printf("\n"); |
| 6824 |
calib.ttime[s][inter] = 0; |
calib.ttime[s][inter] = 0; |
| 6825 |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
| 6826 |
//calib.ttime[s][inter] = cph->GetOrbitalTime(); |
//calib.ttime[s][inter] = cph->GetOrbitalTime(); |
| 6827 |
calib.ttime[s][inter] = cph->OrbitalTime; |
calib.ttime[s][inter] = (UInt_t)cph->OrbitalTime; |
| 6828 |
inter++; |
inter++; |
| 6829 |
} else { |
} else { |
| 6830 |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] != 0 ) { |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] != 0 ) { |
| 6878 |
tr->GetEntry(ci); |
tr->GetEntry(ci); |
| 6879 |
cph = ceh->GetPscuHeader(); |
cph = ceh->GetPscuHeader(); |
| 6880 |
//if ( atime == cph->GetOrbitalTime()){ |
//if ( atime == cph->GetOrbitalTime()){ |
| 6881 |
if ( atime == cph->OrbitalTime){ |
if ( atime == (UInt_t)cph->OrbitalTime){ |
| 6882 |
// calib.iev = ce->iev; |
// calib.iev = ce->iev; |
| 6883 |
if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
| 6884 |
for ( Int_t d=0 ; d<11 ;d++ ){ |
for ( Int_t d=0 ; d<11 ;d++ ){ |