StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
JanBarrelEvent.h
1 #ifndef JAN_BARREL_EVENT_HH
2 #define JAN_BARREL_EVENT_HH
3 
4 
5 //----------------------------
6 //------- reco event container
7 //----------------------------
8 
10  public:
11  JanBarrelEvent() { clear();}
12  void clear() {
13  printf("JanBarrelEve:clear()\n");
14  id=0;
15  memset(bprsCap,-1,sizeof(bprsCap));
16  memset(rawAdcTile,0,sizeof(rawAdcTile));
17  memset(adcTile,0,sizeof(adcTile));
18  memset(statTile,-1,sizeof(statTile)); // default all dead
19  memset(tileIn,0,sizeof(tileIn));
20  }
21 
22 
23  // vector < BsmdCluster1D> smdCl[mxBSmd];
24 
25  int id; // eventID
26  int tileIn[mxBTile]; // 0 if no data
27  int bprsCap[mxBprsCrate];
28  float rawAdcTile[mxBTile][mxBtow];
29  float adcTile[mxBTile][mxBtow];
30  int statTile[mxBTile][mxBtow];
31 
32  void print( int flag=0) {
33  printf("\njanBarelEve ID=%d printFlag=0x%0x",id,flag);
34  printf(" BPRSin=%d caps:%d:%d:%d:%d:",tileIn[kBPrs], bprsCap[0],bprsCap[1],bprsCap[2],bprsCap[3]);
35  printf("\n");
36  if(flag&1) {//..................
37  for(int i=0;i<120;i++) {
38  int id=7+i*40;
39  if(i%10==0) printf("\n softID=%4d adc format BTOW:BPRS= ",id);
40  printf("%.1f : %.1f, ", rawAdcTile[kBTow][id-1], rawAdcTile[kBPrs][id-1]);
41  }
42  printf("\n");
43  }// end of k&1
44 
45  if(flag&2) {//..................
46  for(int i=0;i<120;i++) {
47  int id=7+i*40;
48  if(i%5==0) printf("\n BPRS id=%4d {adcRaw,adc,stat}*N=",id);
49  printf("%.1f, %.1f, %d; ", rawAdcTile[kBPrs][id-1],adcTile[kBPrs][id-1],statTile[kBPrs][id-1]);
50  }
51  printf("\n");
52  }// end of k&1
53 
54  }// end of PRINT
55 
56 
57 };
58 
59 #endif
60 
61 
62 
63 #if 0
64  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
65 
66 class BsmdCluster1D {
67  public:
68  BsmdCluster1D(char x='?') {clear();plane=x;}
69  void clear() {memset(this,0,sizeof(BsmdCluster1D )); plane='?';xCell=yCell=-1;}
70  enum {mxTw=2};
71  char plane;
72  int strip0; // begin of integration window, unit: strip-in-band, from 0
73  float mean0; // cluster center, unit: strip-in-band, from 0
74  int meanId; // cluster center, unit: absolute strip ID, counting from 1
75  float ene; // cluster energy (deposit, no SF correction) in GeV
76  float rms; // cluster width, units # of strips
77  int inTowerId[mxTw];
78  float towerDist; //cm
79  int xCell,yCell; // centroid location in eta-phi 0.1x0.1 cells
80  void print(){
81  if(ene<=0) { printf("bsmd%c Cl empty\n",plane); return;}
82  printf("bsmd%c CL str0=%d mean0=%.1f meanId=%d rms=%.2f ene/keV=%.2f inTw %d.or.%d dist=%.1f cell(%d,%d)\n",plane,strip0,mean0,meanId,rms,ene*1e6,inTowerId[0],inTowerId[1],towerDist, xCell,yCell);
83  }
84 };
85 #endif