64 |
memset(mip, 0, 2*22*96*sizeof(Float_t)); |
memset(mip, 0, 2*22*96*sizeof(Float_t)); |
65 |
memset(base, 0, 2*22*6*sizeof(Float_t)); |
memset(base, 0, 2*22*6*sizeof(Float_t)); |
66 |
memset(sbase, 0, 2*22*6*sizeof(Float_t)); |
memset(sbase, 0, 2*22*6*sizeof(Float_t)); |
67 |
|
memset(obadmask, 0, 2*22*96*sizeof(Int_t)); |
68 |
|
memset(obadpulsemask, 0, 2*22*6*sizeof(Int_t)); |
69 |
|
memset(ctprecor, 0, 2*22*6*sizeof(Float_t)); |
70 |
|
memset(ctneigcor, 0, 2*22*6*sizeof(Float_t)); |
71 |
calopar1 = true; |
calopar1 = true; |
72 |
calopar2 = true; |
calopar2 = true; |
73 |
calopar3 = true; |
calopar3 = true; |
84 |
crosst = ct; |
crosst = ct; |
85 |
}; |
}; |
86 |
|
|
87 |
|
void CaloLevel0::SetCrossTalkType(Bool_t ct){ |
88 |
|
ctground = ct; |
89 |
|
}; |
90 |
|
|
91 |
void CaloLevel0::SetVerbose(Bool_t ct){ |
void CaloLevel0::SetVerbose(Bool_t ct){ |
92 |
verbose = ct; |
verbose = ct; |
93 |
}; |
}; |
372 |
return(0); |
return(0); |
373 |
} |
} |
374 |
|
|
375 |
|
Int_t CaloLevel0::CalcCrossTalkCorr(GL_TABLES *glt, UInt_t runheader){ |
376 |
|
// |
377 |
|
if ( ctground ) return(0); |
378 |
|
// |
379 |
|
const TString host = glt->CGetHost(); |
380 |
|
const TString user = glt->CGetUser(); |
381 |
|
const TString psw = glt->CGetPsw(); |
382 |
|
TSQLServer *dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data()); |
383 |
|
if ( !dbc->IsConnected() ) throw -116; |
384 |
|
stringstream myquery; |
385 |
|
myquery.str(""); |
386 |
|
myquery << "SET time_zone='+0:00'"; |
387 |
|
dbc->Query(myquery.str().c_str()); |
388 |
|
// |
389 |
|
stringstream bmfile; |
390 |
|
Int_t error = 0; |
391 |
|
ifstream badfile; |
392 |
|
GL_PARAM *glparam = new GL_PARAM(); |
393 |
|
// |
394 |
|
// determine where I can find file with offline bad pulser mask |
395 |
|
// |
396 |
|
error = 0; |
397 |
|
error = glparam->Query_GL_PARAM(runheader,105,dbc); |
398 |
|
if ( error < 0 ) return(error); |
399 |
|
// |
400 |
|
bmfile.str(""); |
401 |
|
bmfile << glparam->PATH.Data() << "/"; |
402 |
|
bmfile << glparam->NAME.Data(); |
403 |
|
// |
404 |
|
if ( verbose ) printf("\n Using bad pulser offline mask file: \n %s \n\n",bmfile.str().c_str()); |
405 |
|
badfile.open(bmfile.str().c_str()); |
406 |
|
if ( !badfile ){ |
407 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: no bad pulser offline mask file!\n"); |
408 |
|
return(-115); |
409 |
|
}; |
410 |
|
// |
411 |
|
Bool_t isdone = false; |
412 |
|
Int_t bad = 0; |
413 |
|
Int_t view = 1; |
414 |
|
Int_t pre = 0; |
415 |
|
Int_t plane = 21; |
416 |
|
while ( !isdone ) { |
417 |
|
badfile >> bad; |
418 |
|
obadpulsemask[view][plane][pre] = bad; |
419 |
|
if ( debug && bad ) printf(" SETTING view %i plane %i pre %i BAD = %i \n",view,plane,pre,bad); |
420 |
|
pre++; |
421 |
|
if ( pre > 5 ){ |
422 |
|
pre = 0; |
423 |
|
plane--; |
424 |
|
if ( plane < 0 ){ |
425 |
|
plane = 21; |
426 |
|
view--; |
427 |
|
}; |
428 |
|
if ( view < 0 ) isdone = true; |
429 |
|
}; |
430 |
|
}; |
431 |
|
// |
432 |
|
delete glparam; |
433 |
|
badfile.close(); |
434 |
|
// |
435 |
|
// Let's start with cross-talk correction calculation |
436 |
|
// |
437 |
|
GL_CALOPULSE_CALIB *glp = new GL_CALOPULSE_CALIB(); |
438 |
|
Float_t adcp[2][22][96]; |
439 |
|
Float_t adcpcal[2][22][96]; |
440 |
|
memset(adcp , 0, 2*22*96*sizeof(Float_t)); |
441 |
|
memset(adcpcal , 0, 2*22*96*sizeof(Float_t)); |
442 |
|
// |
443 |
|
UInt_t pampli = 0; |
444 |
|
for (Int_t s=0; s<4; s++){ |
445 |
|
// |
446 |
|
// Save into matrix adcp the values of the highest pulse calibration (pulse amplitude = 2) |
447 |
|
// |
448 |
|
pampli = 2; |
449 |
|
error = 0; |
450 |
|
error = glp->Query_GL_CALOPULSE_CALIB(runheader,s,pampli,dbc); |
451 |
|
if ( error < 0 ){ |
452 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n"); |
453 |
|
return(error); |
454 |
|
}; |
455 |
|
// |
456 |
|
UInt_t idcalib = glp->ID_ROOT_L0; |
457 |
|
UInt_t fromtime = glp->FROM_TIME; |
458 |
|
UInt_t calibno = glp->EV_ROOT; |
459 |
|
// |
460 |
|
// determine path and name and entry of the calibration file |
461 |
|
// |
462 |
|
GL_ROOT *glroot = new GL_ROOT(); |
463 |
|
if ( verbose ) printf("\n"); |
464 |
|
if ( verbose ) printf(" ** SECTION %i **\n",s); |
465 |
|
// |
466 |
|
error = 0; |
467 |
|
error = glroot->Query_GL_ROOT(idcalib,dbc); |
468 |
|
if ( error < 0 ){ |
469 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n"); |
470 |
|
return(error); |
471 |
|
}; |
472 |
|
// |
473 |
|
stringstream name; |
474 |
|
name.str(""); |
475 |
|
name << glroot->PATH.Data() << "/"; |
476 |
|
name << glroot->NAME.Data(); |
477 |
|
// |
478 |
|
TString fcalname = (TString)name.str().c_str(); |
479 |
|
ifstream myfile; |
480 |
|
myfile.open(fcalname.Data()); |
481 |
|
if ( !myfile ){ |
482 |
|
return(-107); |
483 |
|
}; |
484 |
|
myfile.close(); |
485 |
|
// |
486 |
|
TFile *File = new TFile(fcalname.Data()); |
487 |
|
if ( !File ) return(-108); |
488 |
|
TTree *tr = (TTree*)File->Get("CalibCalPulse2"); |
489 |
|
if ( !tr ) return(-119); |
490 |
|
// |
491 |
|
TBranch *calo = tr->GetBranch("CalibCalPulse2"); |
492 |
|
// |
493 |
|
pamela::CalibCalPulse2Event *ce = 0; |
494 |
|
tr->SetBranchAddress("CalibCalPulse2", &ce); |
495 |
|
// |
496 |
|
Long64_t ncalibs = calo->GetEntries(); |
497 |
|
// |
498 |
|
if ( !ncalibs ) return(-110); |
499 |
|
// |
500 |
|
calo->GetEntry(calibno); |
501 |
|
if ( verbose ) printf(" PULSE2 using entry %u from file %s",calibno,fcalname.Data()); |
502 |
|
// |
503 |
|
// retrieve calibration table |
504 |
|
// |
505 |
|
if ( ce->pstwerr[s] && ce->pperror[s] == 0 && ce->unpackError == 0 ){ |
506 |
|
for ( Int_t d=0 ; d<11 ;d++ ){ |
507 |
|
for ( Int_t j=0; j<96 ;j++){ |
508 |
|
if ( s == 2 ){ |
509 |
|
adcp[0][2*d+1][j] = ce->calpuls[3][d][j]; |
510 |
|
}; |
511 |
|
if ( s == 3 ){ |
512 |
|
adcp[0][2*d][j] = ce->calpuls[1][d][j]; |
513 |
|
}; |
514 |
|
if ( s == 0 ){ |
515 |
|
adcp[1][2*d][j] = ce->calpuls[0][d][j]; |
516 |
|
}; |
517 |
|
if ( s == 1 ){ |
518 |
|
adcp[1][2*d+1][j] = ce->calpuls[2][d][j]; |
519 |
|
}; |
520 |
|
}; |
521 |
|
}; |
522 |
|
} else { |
523 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: problems finding a good calibration in this file! \n\n "); |
524 |
|
return(-111); |
525 |
|
}; |
526 |
|
// |
527 |
|
File->Close(); |
528 |
|
delete glroot; |
529 |
|
// |
530 |
|
// Save into matrix adcpcal the calibrated values of the pulse calibration (subtraction of pulse amplitude = 0 relative to the pulse2 calibration used) |
531 |
|
// |
532 |
|
pampli = 0; |
533 |
|
error = 0; |
534 |
|
error = glp->Query_GL_CALOPULSE_CALIB(fromtime,s,pampli,dbc); |
535 |
|
if ( error < 0 ){ |
536 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n"); |
537 |
|
return(error); |
538 |
|
}; |
539 |
|
// |
540 |
|
idcalib = glp->ID_ROOT_L0; |
541 |
|
calibno = glp->EV_ROOT; |
542 |
|
// |
543 |
|
// determine path and name and entry of the calibration file |
544 |
|
// |
545 |
|
glroot = new GL_ROOT(); |
546 |
|
if ( verbose ) printf("\n"); |
547 |
|
if ( verbose ) printf(" ** SECTION %i **\n",s); |
548 |
|
// |
549 |
|
error = 0; |
550 |
|
error = glroot->Query_GL_ROOT(idcalib,dbc); |
551 |
|
if ( error < 0 ){ |
552 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n"); |
553 |
|
return(error); |
554 |
|
}; |
555 |
|
// |
556 |
|
name.str(""); |
557 |
|
name << glroot->PATH.Data() << "/"; |
558 |
|
name << glroot->NAME.Data(); |
559 |
|
// |
560 |
|
fcalname = (TString)name.str().c_str(); |
561 |
|
myfile.open(fcalname.Data()); |
562 |
|
if ( !myfile ){ |
563 |
|
return(-107); |
564 |
|
}; |
565 |
|
myfile.close(); |
566 |
|
// |
567 |
|
TFile *File1 = new TFile(fcalname.Data()); |
568 |
|
if ( !File1 ) return(-108); |
569 |
|
TTree *tr1 = (TTree*)File1->Get("CalibCalPulse1"); |
570 |
|
if ( !tr1 ) return(-120); |
571 |
|
// |
572 |
|
TBranch *calo1 = tr1->GetBranch("CalibCalPulse1"); |
573 |
|
// |
574 |
|
pamela::CalibCalPulse1Event *ce1 = 0; |
575 |
|
tr1->SetBranchAddress("CalibCalPulse1", &ce1); |
576 |
|
// |
577 |
|
ncalibs = calo1->GetEntries(); |
578 |
|
// |
579 |
|
if ( !ncalibs ) return(-110); |
580 |
|
// |
581 |
|
calo1->GetEntry(calibno); |
582 |
|
if ( verbose ) printf(" PULSE1 using entry %u from file %s",calibno,fcalname.Data()); |
583 |
|
// |
584 |
|
// retrieve calibration table |
585 |
|
// |
586 |
|
if ( ce1->pstwerr[s] && ce1->pperror[s] == 0 && ce1->unpackError == 0 ){ |
587 |
|
for ( Int_t d=0 ; d<11 ;d++ ){ |
588 |
|
for ( Int_t j=0; j<96 ;j++){ |
589 |
|
if ( s == 2 ){ |
590 |
|
adcpcal[0][2*d+1][j] = adcp[0][2*d+1][j] - ce1->calpuls[3][d][j]; |
591 |
|
}; |
592 |
|
if ( s == 3 ){ |
593 |
|
adcpcal[0][2*d][j] = adcp[0][2*d][j] - ce1->calpuls[1][d][j]; |
594 |
|
}; |
595 |
|
if ( s == 0 ){ |
596 |
|
adcpcal[1][2*d][j] = adcp[1][2*d][j] - ce1->calpuls[0][d][j]; |
597 |
|
}; |
598 |
|
if ( s == 1 ){ |
599 |
|
adcpcal[1][2*d+1][j] = adcp[1][2*d+1][j] - ce1->calpuls[2][d][j]; |
600 |
|
}; |
601 |
|
}; |
602 |
|
}; |
603 |
|
} else { |
604 |
|
if ( verbose ) printf(" CALORIMETER - ERROR: problems finding a good calibration in this file! \n\n "); |
605 |
|
return(-111); |
606 |
|
}; |
607 |
|
// |
608 |
|
File1->Close(); |
609 |
|
// |
610 |
|
delete glroot; |
611 |
|
// |
612 |
|
};// loop on the four sections |
613 |
|
// |
614 |
|
// |
615 |
|
delete glp; |
616 |
|
dbc->Close(); |
617 |
|
delete dbc; |
618 |
|
// |
619 |
|
// Ok, now we can try to calculate the cross-talk correction for each pre-amplifier |
620 |
|
// |
621 |
|
for ( Int_t v=0; v<2; v++){ |
622 |
|
if ( debug ) printf(" \n\n NEW VIEW \n"); |
623 |
|
for ( Int_t p=0; p<22; p++){ |
624 |
|
for ( Int_t npre=0; npre<6; npre++){ |
625 |
|
ctprecor[v][p][npre] = 1000.; |
626 |
|
ctneigcor[v][p][npre] = 1000.; |
627 |
|
Int_t str0=npre*16; |
628 |
|
Int_t str16= -1 + (1+npre)*16; |
629 |
|
// |
630 |
|
UInt_t neigc = 0; |
631 |
|
UInt_t farc = 0; |
632 |
|
UInt_t pulsc = 0; |
633 |
|
Float_t sigpulsed = 0.; |
634 |
|
Float_t neigbase = 0.; |
635 |
|
Float_t farbase = 0.; |
636 |
|
// |
637 |
|
// Loop over the strip of the pre and sum all signal far away from pulsed strip, signal in the neighbour(s) strip(s) and save the pulsed signal |
638 |
|
// moreover count the number of strips in each case |
639 |
|
// |
640 |
|
for (Int_t s=str0; s<=str16; s++){ |
641 |
|
if ( adcpcal[v][p][s] > 10000.){ |
642 |
|
sigpulsed = adcpcal[v][p][s]; |
643 |
|
pulsc++; |
644 |
|
if ( s > str0 ){ |
645 |
|
neigbase += adcpcal[v][p][s-1]; |
646 |
|
neigc++; |
647 |
|
farbase -= adcpcal[v][p][s-1]; |
648 |
|
farc--; |
649 |
|
}; |
650 |
|
if ( s < str16 ){ |
651 |
|
neigbase += adcpcal[v][p][s+1]; |
652 |
|
neigc++; |
653 |
|
farbase -= adcpcal[v][p][s+1]; |
654 |
|
farc--; |
655 |
|
}; |
656 |
|
} else { |
657 |
|
farc++; |
658 |
|
farbase += adcpcal[v][p][s]; |
659 |
|
}; |
660 |
|
}; |
661 |
|
// |
662 |
|
// Now calculate the corrections |
663 |
|
// |
664 |
|
Float_t avefarbase = 0.; |
665 |
|
if ( farc ) avefarbase = farbase/(Float_t)farc; |
666 |
|
Float_t aveneigbase = 0.; |
667 |
|
if ( neigc ) aveneigbase = neigbase/(Float_t)neigc; |
668 |
|
// |
669 |
|
if ( pulsc == 1 && farc && neigc ){ |
670 |
|
ctprecor[v][p][npre] = -avefarbase/(sigpulsed+fabs(avefarbase)); |
671 |
|
ctneigcor[v][p][npre] = fabs(aveneigbase-avefarbase)/(sigpulsed+fabs(avefarbase)); |
672 |
|
if ( debug ) printf(" Cross-talk correction View %i Plane %i Pre %i : pre-correction: %f neighbour strips correction %f \n",v,p,npre,ctprecor[v][p][npre],ctneigcor[v][p][npre]); |
673 |
|
} else { |
674 |
|
// |
675 |
|
// did not find the pulsed strip or more than one pulsed strip found! |
676 |
|
// |
677 |
|
if ( debug ) printf(" Problems finding the cross-talk corrections: \n View %i Plane %i Pre %i number of pulsed strip %i \n Average faraway baseline %f number of strips %i Average neighbour baseline %f number of neighbour strips %i \n",v,p,npre,pulsc,avefarbase,farc,aveneigbase,neigc); |
678 |
|
// |
679 |
|
}; |
680 |
|
}; |
681 |
|
if ( debug ) printf(" \n ==================== \n"); |
682 |
|
}; |
683 |
|
}; |
684 |
|
// |
685 |
|
// Check the calculated corrections |
686 |
|
// |
687 |
|
Int_t opre=0; |
688 |
|
Int_t ppre=0; |
689 |
|
Bool_t found = false; |
690 |
|
for ( Int_t v=0; v<2; v++){ |
691 |
|
for ( Int_t p=0; p<22; p++){ |
692 |
|
for ( Int_t npre=0; npre<6; npre++){ |
693 |
|
if ( ctprecor[v][p][npre] == 1000. || ctneigcor[v][p][npre] == 1000. || obadpulsemask[v][p][npre] != 0 ){ |
694 |
|
if ( debug ) printf(" Cross-talk correction CHANGED for view %i Plane %i Pre %i\n BEFORE: pre-correction: %f neighbour strips correction %f \n",v,p,npre,ctprecor[v][p][npre],ctneigcor[v][p][npre]); |
695 |
|
if ( npre%2 ){ |
696 |
|
opre = npre-1; |
697 |
|
} else { |
698 |
|
opre = npre+1; |
699 |
|
}; |
700 |
|
if ( ctprecor[v][p][opre] == 1000. || ctneigcor[v][p][opre] == 1000. || obadpulsemask[v][p][opre] != 0 ){ |
701 |
|
ppre=0; |
702 |
|
found = false; |
703 |
|
while ( ppre < 6 ){ |
704 |
|
if ( ctprecor[v][p][ppre] != 1000. && ctneigcor[v][p][ppre] != 1000. && !obadpulsemask[v][p][ppre] ){ |
705 |
|
found = true; |
706 |
|
ctprecor[v][p][npre] = ctprecor[v][p][ppre]; |
707 |
|
ctneigcor[v][p][npre] = ctneigcor[v][p][ppre]; |
708 |
|
break; |
709 |
|
}; |
710 |
|
ppre++; |
711 |
|
}; |
712 |
|
if ( !found ){ |
713 |
|
if ( verbose ) printf(" WARNING: cannot find a good cross-talk correction for view %i plane %i pre %i \n Setting to default values 0.002 0.002\n",v,p,npre); |
714 |
|
ctprecor[v][p][npre] = 0.002; |
715 |
|
ctneigcor[v][p][npre] = 0.002; |
716 |
|
}; |
717 |
|
} else { |
718 |
|
ctprecor[v][p][npre] = ctprecor[v][p][opre]; |
719 |
|
ctneigcor[v][p][npre] = ctneigcor[v][p][opre]; |
720 |
|
}; |
721 |
|
if ( debug ) printf(" AFTER: pre-correction: %f neighbour strips correction %f \n",ctprecor[v][p][npre],ctneigcor[v][p][npre]); |
722 |
|
}; |
723 |
|
}; |
724 |
|
}; |
725 |
|
}; |
726 |
|
// |
727 |
|
return(0); |
728 |
|
}; |
729 |
|
|
730 |
void CaloLevel0::FindBaseRaw(Int_t l, Int_t m, Int_t pre){ |
void CaloLevel0::FindBaseRaw(Int_t l, Int_t m, Int_t pre){ |
731 |
Float_t minstrip = 100000.; |
Float_t minstrip = 100000.; |
1022 |
ipre = ip[i] - 1; |
ipre = ip[i] - 1; |
1023 |
}; |
}; |
1024 |
for (Int_t j = ipre*16 ; j < (ipre+1)*16 ; j++){ |
for (Int_t j = ipre*16 ; j < (ipre+1)*16 ; j++){ |
1025 |
clevel1->estrip[j][m][l] += (qpre[ipre] - qpre[ip[i]]) * 0.00478; |
if ( !ctground ){ |
1026 |
|
clevel1->estrip[j][m][l] += (qpre[ipre] - qpre[ip[i]]) * ctprecor[l][m][ipre]; |
1027 |
|
} else { |
1028 |
|
clevel1->estrip[j][m][l] += (qpre[ipre] - qpre[ip[i]]) * 0.00478; |
1029 |
|
}; |
1030 |
}; |
}; |
1031 |
}; |
}; |
1032 |
if (ck == 2){ |
if (ck == 2){ |
1033 |
for (Int_t j = i*32 ; j < (i+1)*32 ; j++){ |
for (Int_t j = i*32 ; j < (i+1)*32 ; j++){ |
1034 |
ipre = j/16 + 1; |
ipre = j/16 + 1; |
1035 |
clevel1->estrip[j][m][l] += qpre[ipre] * 0.00478; |
if ( !ctground ){ |
1036 |
|
clevel1->estrip[j][m][l] += qpre[ipre] * ctprecor[l][m][ipre]; |
1037 |
|
} else { |
1038 |
|
clevel1->estrip[j][m][l] += qpre[ipre] * 0.00478; |
1039 |
|
}; |
1040 |
}; |
}; |
1041 |
}; |
}; |
1042 |
}; |
}; |
1051 |
Int_t j4 = -4; |
Int_t j4 = -4; |
1052 |
Int_t jjj = -3; |
Int_t jjj = -3; |
1053 |
Int_t jj = -2; |
Int_t jj = -2; |
1054 |
for (Int_t j = 0 ; j < 100 ; j++){ |
Int_t jjpre = -1; |
1055 |
|
Int_t jjjpre = -1; |
1056 |
|
for (Int_t j = 0 ; j < 100 ; j++){ |
1057 |
jj++; |
jj++; |
1058 |
jjj++; |
jjj++; |
1059 |
j4++; |
j4++; |
1060 |
if ( j < 96 ) ene[j] = clevel1->estrip[j][m][l]; |
if ( j < 96 ) ene[j] = clevel1->estrip[j][m][l]; |
1061 |
if ( crosst ){ |
if ( crosst ){ |
1062 |
if ( jj >= 0 && jj < 96 ){ |
if ( jj >= 0 && jj < 96 ){ |
1063 |
if ( jj != 0 && jj != 32 && jj != 64 ) ene[jj-1] += -clevel1->estrip[jj][m][l] * 0.01581; |
if ( !ctground ){ |
1064 |
if ( jj != 31 && jj != 63 && jj != 95 ) ene[jj+1] += -clevel1->estrip[jj][m][l] * 0.01581; |
if ( jj%16 == 0 ) jjpre++; |
1065 |
|
if ( jj != 0 && jj != 32 && jj != 64 ) ene[jj-1] += -clevel1->estrip[jj][m][l] * ctneigcor[l][m][jjpre]; |
1066 |
|
if ( jj != 31 && jj != 63 && jj != 95 ) ene[jj+1] += -clevel1->estrip[jj][m][l] * ctneigcor[l][m][jjpre]; |
1067 |
|
} else { |
1068 |
|
if ( jj != 0 && jj != 32 && jj != 64 ) ene[jj-1] += -clevel1->estrip[jj][m][l] * 0.01581; |
1069 |
|
if ( jj != 31 && jj != 63 && jj != 95 ) ene[jj+1] += -clevel1->estrip[jj][m][l] * 0.01581; |
1070 |
|
}; |
1071 |
}; |
}; |
1072 |
if ( jjj >= 0 && jjj < 96 ){ |
if ( jjj >= 0 && jjj < 96 ){ |
1073 |
if ( jjj != 0 && jjj != 32 && jjj != 64 ) clevel1->estrip[jjj-1][m][l] += -ene[jjj] * 0.01581; |
if ( !ctground ){ |
1074 |
if ( jjj != 31 && jjj != 63 && jjj != 95 ) clevel1->estrip[jjj+1][m][l] += -ene[jjj] * 0.01581; |
if ( jjj%16 == 0 ) jjjpre++; |
1075 |
|
if ( jjj != 0 && jjj != 32 && jjj != 64 ) clevel1->estrip[jjj-1][m][l] += -ene[jjj] * ctneigcor[l][m][jjjpre]; |
1076 |
|
if ( jjj != 31 && jjj != 63 && jjj != 95 ) clevel1->estrip[jjj+1][m][l] += -ene[jjj] * ctneigcor[l][m][jjjpre]; |
1077 |
|
} else { |
1078 |
|
if ( jjj != 0 && jjj != 32 && jjj != 64 ) clevel1->estrip[jjj-1][m][l] += -ene[jjj] * 0.01581; |
1079 |
|
if ( jjj != 31 && jjj != 63 && jjj != 95 ) clevel1->estrip[jjj+1][m][l] += -ene[jjj] * 0.01581; |
1080 |
|
}; |
1081 |
}; |
}; |
1082 |
}; |
}; |
1083 |
if ( j4 >= 0 && j4 < 96 ){ |
if ( j4 >= 0 && j4 < 96 ){ |
1286 |
memset(dexyc, 0, 2*22*96*sizeof(Float_t)); |
memset(dexyc, 0, 2*22*96*sizeof(Float_t)); |
1287 |
memset(base, 0, 2*22*6*sizeof(Float_t)); |
memset(base, 0, 2*22*6*sizeof(Float_t)); |
1288 |
memset(sbase, 0, 2*22*6*sizeof(Float_t)); |
memset(sbase, 0, 2*22*6*sizeof(Float_t)); |
1289 |
|
memset(ctprecor, 0, 2*22*6*sizeof(Float_t)); |
1290 |
|
memset(ctneigcor, 0, 2*22*6*sizeof(Float_t)); |
1291 |
// |
// |
1292 |
} |
} |
1293 |
|
|