363 |
Int_t val = 0; |
Int_t val = 0; |
364 |
Int_t del = 1100; |
Int_t del = 1100; |
365 |
if ( clevel2->trigty != 2. ){ |
if ( clevel2->trigty != 2. ){ |
366 |
|
Bool_t ck = false; |
367 |
for (Int_t sec = 0; sec < 4; sec++){ |
for (Int_t sec = 0; sec < 4; sec++){ |
368 |
val = (Int_t)de->calselftrig[sec][6]; |
val = (Int_t)de->calselftrig[sec][6]; |
369 |
del = delay(val); |
del = delay(val); |
370 |
if ( del < 1100 ){ |
if ( del < 1100 ){ |
371 |
|
clevel2->wartrig = 0.; |
372 |
clevel2->trigty = 3.; |
clevel2->trigty = 3.; |
373 |
|
ck = true; |
374 |
break; |
break; |
375 |
}; |
}; |
376 |
}; |
}; |
377 |
|
if ( !ck ) clevel2->wartrig = 100.; |
378 |
|
} else { |
379 |
|
Bool_t ck = false; |
380 |
|
for (Int_t sec = 0; sec < 4; sec++){ |
381 |
|
val = (Int_t)de->calselftrig[sec][6]; |
382 |
|
del = delay(val); |
383 |
|
if ( del < 1100 ){ |
384 |
|
clevel2->wartrig = 0.; |
385 |
|
ck = true; |
386 |
|
}; |
387 |
|
}; |
388 |
|
if ( !ck ) clevel2->wartrig = 100.; |
389 |
}; |
}; |
390 |
// |
// |
391 |
Int_t se = 5; |
Int_t se = 5; |
630 |
tim = 100000.; |
tim = 100000.; |
631 |
plo = m; |
plo = m; |
632 |
fbi = 0; |
fbi = 0; |
633 |
if ( clevel1->estrip[j4][m][l] > 1. ){ |
if ( clevel1->estrip[j4][m][l] > 0.99995 ){ |
634 |
tim = 10000.; |
tim = 10000.; |
635 |
plo = m; |
plo = m; |
636 |
fbi = 1; |
fbi = 1; |
637 |
}; |
}; |
638 |
if ( clevel1->estrip[j4][m][l] > 10. ){ |
if ( clevel1->estrip[j4][m][l] > 9.9995 ){ |
639 |
tim = 1000.; |
tim = 1000.; |
640 |
plo = 22 + m; |
plo = 22 + m; |
641 |
fbi = 1; |
fbi = 1; |
642 |
}; |
}; |
643 |
if ( clevel1->estrip[j4][m][l] > 100. ){ |
if ( clevel1->estrip[j4][m][l] > 99.995 ){ |
644 |
tim = 100.; |
tim = 100.; |
645 |
plo = 22 + m; |
plo = 22 + m; |
646 |
fbi = 0; |
fbi = 0; |
647 |
}; |
}; |
648 |
if ( clevel1->estrip[j4][m][l] > 1000. ){ |
if ( clevel1->estrip[j4][m][l] > 999.95 ){ |
649 |
tim = 10.; |
tim = 10.; |
650 |
plo = 44 + m; |
plo = 44 + m; |
651 |
fbi = 0; |
fbi = 0; |
652 |
}; |
}; |
653 |
if ( clevel1->estrip[j4][m][l] > 10000. ){ |
if ( clevel1->estrip[j4][m][l] > 9999.5 ){ |
654 |
tim = 1.; |
tim = 1.; |
655 |
plo = 66 + m; |
plo = 66 + m; |
656 |
fbi = 0; |
fbi = 0; |
666 |
} else { |
} else { |
667 |
svstrip[istrip] = -(fbi*1000000000 + plo*10000000 + j4*100000 + cle); |
svstrip[istrip] = -(fbi*1000000000 + plo*10000000 + j4*100000 + cle); |
668 |
}; |
}; |
669 |
// if ( ei == 770 ) printf(" j %i l %i m %i estrip %f \n",j4,l,m,clevel1->estrip[j4][m][l]); |
// |
670 |
// if ( ei == 770 ) printf(" num lim %i fbi %i tim %f plo %i cle %i \n",numeric_limits<Int_t>::max(),fbi,tim,plo,cle); |
// if ( ei >= -770 ) printf(" j %i l %i m %i estrip %f \n",j4,l,m,clevel1->estrip[j4][m][l]); |
671 |
// if ( ei == 770 ) printf(" svstrip %i \n",svstrip[istrip]); |
// if ( ei >= -770 ) printf(" num lim %i fbi %i tim %f plo %i cle %i \n",numeric_limits<Int_t>::max(),fbi,tim,plo,cle); |
672 |
|
// if ( ei >= -770 ) printf(" svstrip %i \n",svstrip[istrip]); |
673 |
// |
// |
674 |
istrip++; |
istrip++; |
675 |
}; |
}; |
741 |
memcpy(ca->npcfit,clevel2->npcfit,sizeof(clevel2->npcfit)); |
memcpy(ca->npcfit,clevel2->npcfit,sizeof(clevel2->npcfit)); |
742 |
}; |
}; |
743 |
// |
// |
744 |
|
if(!(ca->CaloTrk))ca->CaloTrk = new TClonesArray("CaloTrkVar",1); //ELENA |
745 |
TClonesArray &t = *ca->CaloTrk; |
TClonesArray &t = *ca->CaloTrk; |
746 |
new(t[nutrk]) CaloTrkVar(*t_ca); |
new(t[nutrk]) CaloTrkVar(*t_ca); |
747 |
// |
// |
754 |
calol2cm(); |
calol2cm(); |
755 |
} |
} |
756 |
|
|
757 |
void CaloProcessing::FillCommonVar(CaloLevel2 *ca){ |
void CaloProcessing::FillCommonVar(CaloLevel1 *c1, CaloLevel2 *ca){ |
758 |
// |
// |
759 |
ca->good = clevel2->good; |
ca->good = clevel2->good; |
760 |
if ( clevel2->trigty == 2. ){ |
if ( clevel2->trigty == 2. ){ |
762 |
} else { |
} else { |
763 |
ca->selftrigger = 0; |
ca->selftrigger = 0; |
764 |
}; |
}; |
765 |
|
// |
766 |
|
ca->selftrigger += (Int_t)clevel2->wartrig; |
767 |
|
// |
768 |
memcpy(ca->perr,clevel2->perr,sizeof(clevel2->perr)); |
memcpy(ca->perr,clevel2->perr,sizeof(clevel2->perr)); |
769 |
memcpy(ca->swerr,clevel2->swerr,sizeof(clevel2->swerr)); |
memcpy(ca->swerr,clevel2->swerr,sizeof(clevel2->swerr)); |
770 |
memcpy(ca->crc,clevel2->crc,sizeof(clevel2->crc)); |
memcpy(ca->crc,clevel2->crc,sizeof(clevel2->crc)); |
779 |
ca->qmax = clevel2->qmax; |
ca->qmax = clevel2->qmax; |
780 |
ca->elen = clevel2->elen; |
ca->elen = clevel2->elen; |
781 |
ca->selen = clevel2->selen; |
ca->selen = clevel2->selen; |
|
ca->estrip = TArrayI(ca->nstrip,svstrip); |
|
782 |
memcpy(ca->qq,clevel2->qq,sizeof(clevel2->qq)); |
memcpy(ca->qq,clevel2->qq,sizeof(clevel2->qq)); |
783 |
memcpy(ca->planemax,clevel2->planemax,sizeof(clevel2->planemax)); |
memcpy(ca->planemax,clevel2->planemax,sizeof(clevel2->planemax)); |
784 |
memcpy(ca->varcfit,clevel2->varcfit,sizeof(clevel2->varcfit)); |
memcpy(ca->varcfit,clevel2->varcfit,sizeof(clevel2->varcfit)); |
786 |
memcpy(ca->cibar,clevel2->cibar,sizeof(clevel2->cibar)); |
memcpy(ca->cibar,clevel2->cibar,sizeof(clevel2->cibar)); |
787 |
memcpy(ca->cbar,clevel2->cbar,sizeof(clevel2->cbar)); |
memcpy(ca->cbar,clevel2->cbar,sizeof(clevel2->cbar)); |
788 |
// |
// |
789 |
|
if ( c1 ){ |
790 |
|
c1->istrip = istrip; |
791 |
|
c1->estrip = TArrayI(istrip,svstrip); |
792 |
|
}; |
793 |
|
// |
794 |
} |
} |
795 |
|
|
796 |
void CaloProcessing::ClearStructs(){ |
void CaloProcessing::ClearStructs(){ |
847 |
void CaloProcessing::ClearCommonVar(){ |
void CaloProcessing::ClearCommonVar(){ |
848 |
istrip = 0; |
istrip = 0; |
849 |
clevel2->trigty = -1.; |
clevel2->trigty = -1.; |
850 |
|
clevel2->wartrig = 0.; |
851 |
clevel2->good = 0; |
clevel2->good = 0; |
852 |
clevel2->nstrip = 0.; |
clevel2->nstrip = 0.; |
853 |
clevel2->qtot = 0.; |
clevel2->qtot = 0.; |