696 |
// gf Apr 07 |
// gf Apr 07 |
697 |
|
|
698 |
void ToFLevel2::GetPaddlePMT(Int_t paddle, Int_t &pmtleft, Int_t &pmtright){ |
void ToFLevel2::GetPaddlePMT(Int_t paddle, Int_t &pmtleft, Int_t &pmtright){ |
699 |
|
pmtleft=paddle*2; |
700 |
if(paddle==0){ |
pmtright= pmtleft+1; |
|
pmtleft=0; |
|
|
pmtright=1; |
|
|
} |
|
|
|
|
|
if(paddle==1){ |
|
|
pmtleft=2; |
|
|
pmtright=3; |
|
|
} |
|
|
|
|
|
if(paddle==2){ |
|
|
pmtleft=4; |
|
|
pmtright=5; |
|
|
} |
|
|
|
|
|
if(paddle==3){ |
|
|
pmtleft=6; |
|
|
pmtright=7; |
|
|
} |
|
|
|
|
|
if(paddle==4){ |
|
|
pmtleft=8; |
|
|
pmtright=9; |
|
|
} |
|
|
|
|
|
if(paddle==5){ |
|
|
pmtleft=10; |
|
|
pmtright=11; |
|
|
} |
|
|
|
|
|
if(paddle==6){ |
|
|
pmtleft=12; |
|
|
pmtright=13; |
|
|
} |
|
|
|
|
|
if(paddle==7){ |
|
|
pmtleft=14; |
|
|
pmtright=15; |
|
|
} |
|
|
|
|
|
if(paddle==8){ |
|
|
pmtleft=16; |
|
|
pmtright=17; |
|
|
} |
|
|
|
|
|
if(paddle==9){ |
|
|
pmtleft=18; |
|
|
pmtright=19; |
|
|
} |
|
|
|
|
|
if(paddle==10){ |
|
|
pmtleft=20; |
|
|
pmtright=21; |
|
|
} |
|
|
|
|
|
if(paddle==11){ |
|
|
pmtleft=22; |
|
|
pmtright=23; |
|
|
} |
|
|
|
|
|
if(paddle==12){ |
|
|
pmtleft=24; |
|
|
pmtright=25; |
|
|
} |
|
|
|
|
|
if(paddle==13){ |
|
|
pmtleft=26; |
|
|
pmtright=27; |
|
|
} |
|
|
|
|
|
if(paddle==14){ |
|
|
pmtleft=28; |
|
|
pmtright=29; |
|
|
} |
|
|
|
|
|
if(paddle==15){ |
|
|
pmtleft=30; |
|
|
pmtright=31; |
|
|
} |
|
|
|
|
|
if(paddle==16){ |
|
|
pmtleft=32; |
|
|
pmtright=33; |
|
|
} |
|
|
|
|
|
if(paddle==17){ |
|
|
pmtleft=34; |
|
|
pmtright=35; |
|
|
} |
|
|
|
|
|
if(paddle==18){ |
|
|
pmtleft=36; |
|
|
pmtright=37; |
|
|
} |
|
|
|
|
|
if(paddle==19){ |
|
|
pmtleft=38; |
|
|
pmtright=39; |
|
|
} |
|
|
|
|
|
if(paddle==20){ |
|
|
pmtleft=40; |
|
|
pmtright=41; |
|
|
} |
|
|
|
|
|
if(paddle==21){ |
|
|
pmtleft=42; |
|
|
pmtright=43; |
|
|
} |
|
|
|
|
|
if(paddle==22){ |
|
|
pmtleft=44; |
|
|
pmtright=45; |
|
|
} |
|
|
|
|
|
if(paddle==23){ |
|
|
pmtleft=46; |
|
|
pmtright=47; |
|
|
} |
|
|
|
|
701 |
return; |
return; |
702 |
} |
} |
703 |
|
|
811 |
*/ |
*/ |
812 |
Int_t ToFLevel2::GetPaddleid(Int_t plane, Int_t paddle) |
Int_t ToFLevel2::GetPaddleid(Int_t plane, Int_t paddle) |
813 |
{ |
{ |
|
|
|
814 |
Int_t padid=-1; |
Int_t padid=-1; |
815 |
Int_t pads11=8; |
Int_t pads[6]={8,6,2,2,3,3}; |
|
Int_t pads12=6; |
|
|
Int_t pads21=2; |
|
|
Int_t pads22=2; |
|
|
Int_t pads31=3; |
|
|
// Int_t pads32=3; |
|
|
|
|
816 |
|
|
817 |
if(plane == 0){ |
int somma=0; |
818 |
padid=paddle; |
int np=plane; |
819 |
|
for(Int_t j=0; j<np; j++){ |
820 |
|
somma+=pads[j]; |
821 |
} |
} |
822 |
|
padid=paddle+somma; |
|
if(plane == 1){ |
|
|
padid=pads11+paddle; |
|
|
} |
|
|
|
|
|
if(plane == 2){ |
|
|
padid=pads11+pads12+paddle; |
|
|
} |
|
|
|
|
|
if(plane == 3){ |
|
|
padid=pads11+pads12+pads21+paddle; |
|
|
} |
|
|
|
|
|
if(plane == 4){ |
|
|
padid=pads11+pads12+pads21+pads22+paddle; |
|
|
} |
|
|
|
|
|
if(plane == 5){ |
|
|
padid=pads11+pads12+pads21+pads22+pads31+paddle; |
|
|
} |
|
|
|
|
823 |
return padid; |
return padid; |
|
|
|
824 |
} |
} |
825 |
|
|
826 |
|
|
904 |
|
|
905 |
} |
} |
906 |
|
|
|
|
|
|
|
|
907 |
/// wm feb 08 |
/// wm feb 08 |
908 |
|
|
909 |
/** |
/** |
1050 |
//////////////////////////////////////////////////// |
//////////////////////////////////////////////////// |
1051 |
|
|
1052 |
|
|
1053 |
|
|
1054 |
/** |
/** |
1055 |
* Fills a struct cToFLevel2 with values from a ToFLevel2 object (to put data into a F77 common). |
* Fills a struct cToFLevel2 with values from a ToFLevel2 object (to put data into a F77 common). |
1056 |
*/ |
*/ |