/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/analyse/TB2010/Testbeam_june_10/Gassiplex/Beam_profile/gplexMapping/Y.C

Go to the documentation of this file.
00001 Short_t Y(Int_t chanNum)
00002 {//valid for chanNum from 0 to 672 compatible with TB2008 setup (3 beta2 , 1 beta2.4)
00003   if (chanNum>=672||chanNum<0){cout<<"error in Y.C : unrecognized channel number :"<<chanNum<<"\n";return -1;}
00004   Short_t y;
00005   Short_t i = chanNum%96+1;
00006   Short_t mapp;
00007   if((i>0&&i<17)||(i>32&&i<49)||(i>64&&i<81)){mapp=2*i-((i/32)*32)-1;}
00008   if((i>16&&i<33)||(i>48&&i<65)||(i>80&&i<97)){mapp=66+(((3*i-1)/96)*96)-2*i;}
00009   if(chanNum/96<3)
00010     {//gassiplex 0, 1, 2
00011       y=(mapp-1)/6;
00012     }
00013   else
00014     {//gassiplex 3,4,5,6
00015       if((chanNum/96)-3==0)y=(mapp-1)/6;
00016       if((chanNum/96)-3==1)y=(mapp-1)/6 +16;
00017       if((chanNum/96)-3==2)y=15-(mapp-1)/6;
00018       if((chanNum/96)-3==3)y=31-(mapp-1)/6;
00019               //    ------------|
00020               //  __|     |     |__
00021               // [__|  2  |  0  |__] gassiplex 
00022               //    |     |     |
00023               //    |------------
00024               //  __|     |     |__
00025               // [__|  3  |  1  |__] gassiplex 
00026               //    |     |     |
00027               //    |------------
00028     }
00029   if(y<0||y>32){cout<<"error calculating y coordinate for channel "<<chanNum<<endl; return -1;}
00030   return y;
00031 }

Generated on Mon Jan 7 13:15:22 2013 for MicromegasFramework by  doxygen 1.4.7