1 #ifndef HMDCCELLGROUP_H
2 #define HMDCCELLGROUP_H
23 inline Int_t
getCell(Int_t layer,Int_t idx);
24 inline Int_t
getSignId(Int_t layer,Int_t idx);
25 inline void setSignId(Int_t layer,Int_t cell,Int_t t1,Int_t t2=0,Int_t t3=0,Int_t t4=0);
26 inline void setLayerGroup(Int_t layer,UShort_t cl) {pLayer[layer] = cl;}
37 { memset(iLayer,0,6*
sizeof(UShort_t)); }
39 void clear(
void) { memset(iLayer,0,6*
sizeof(UShort_t)); }
43 for(Int_t i=0;i<6;i++){sum+=
getNCells(i);}
49 for(Int_t i=0;i<6;i++){
if(
getNCells(i)>0)sum++;}
61 { memset(iLayer,0,12*
sizeof(UShort_t));}
63 void clear(
void) { memset(iLayer,0,12*
sizeof(UShort_t)); }
67 for(Int_t i=0;i<12;i++){sum+=
getNCells(i);}
73 if(mod==0)
for(Int_t i=0;i<6;i++) {sum+=
getNCells(i);}
74 if(mod==1)
for(Int_t i=6;i<12;i++){sum+=
getNCells(i);}
80 for(Int_t i=0;i<12;i++){
if(
getNCells(i)>0)sum++;}
86 if(mod==0)
for(Int_t i=0;i<6;i++){
if(
getNCells(i)>0)sum++;}
87 if(mod==1)
for(Int_t i=6;i<12;i++){
if(
getNCells(i)>0)sum++;}
97 for(Int_t layer=0; layer<12; layer++) {
99 if(nsc == 0)
continue;
103 Int_t l = layer < 6 ? layer : layer-6;
106 if((layor & layInd) == 0) {
116 for(Int_t layer=0; layer<12; layer++)
if(
pLayer[layer]!=0 && gr->
pLayer[layer]!=0) {
125 UShort_t
c1 = l1 >> 8;
126 UShort_t c2 = l2 >> 8;
127 UShort_t dc = c1>c2 ? c1-c2 : c2-
c1;
129 if (c1 > c2) l1 <<= dc<<1;
130 else if(c2 > c1) l2 <<= dc<<1;
152 return (pLayer[layer] >> shift) & 0x3;
158 Int_t t1,Int_t t2,Int_t t3,Int_t t4) {
168 pLayer[layer]=((cell & 0xFF) << 8) | ((t4 & 0x3)<<6) |
169 ((t3 & 0x3)<<4) | ((t2 & 0x3)<<2) | ((t1 & 0x3));
UChar_t getNSharedCells(UShort_t l1, UShort_t l2)
void printCells(Int_t nlays)
static Bool_t lookUpsInitialized
void printCellGroup(void)
Int_t getNLayers(UInt_t mod)
Int_t getLayerListCells(Int_t layer, Int_t *list)
Int_t getCell(Int_t layer, Int_t idx)
HMdcCellGroup(UShort_t *layerBuffer)
void setSignId(Int_t layer, Int_t cell, Int_t t1, Int_t t2=0, Int_t t3=0, Int_t t4=0)
UChar_t getNSharedCells(HMdcCellGroup12 *gr, Int_t &nLayers, Int_t &nLayOr)
Int_t getSumWires(UInt_t mod)
Int_t getNCells(Int_t layer)
void setLayerGroup(Int_t layer, UShort_t cl)
static UChar_t cellPosLookUp[4][256]
TCanvas c1("HAFT","HADES Acceptance Filter for Theorists", 100, 100, 700, 700)
void printCellGroup(void)
UChar_t getNSharedCells(HMdcCellGroup12 *gr)
static UChar_t nCellsLookUp[256]
Int_t getSignId(Int_t layer, Int_t idx)
void initLookups(void)
pointer to layer information.