8 #ifndef W_EVENT_2009_HH
9 #define W_EVENT_2009_HH
13 #include <StTriggerUtilities/L2Emulator/L2wAlgo/L2wResult2009.h>
15 #include <StMuDSTMaker/COMMON/StMuTrack.h>
16 #include "WanaConst.h"
21 float energy,ET, adcSum;
27 void clear() { position=TVector3(0,0,0);
28 ET=energy=adcSum=0; nTower=0; iEta=iPhi=999;}
29 void print(
int flag=0){
30 printf(
" Cluster ET=%.1f E=%.1f GeV, sumAdc=%.0f nTw=%d iEta=%d, iPhi=%d XYZ(%.0f,%.0f,%.0f)cm\n",ET,energy,adcSum,nTower,iEta, iPhi,position.x(),position.y(),position.z());}
41 void clear() {
id=0; R=TVector3(0,0,0); iEta=iPhi=9999;}
42 void print(
int flag=0){
43 printf(
" pointed tower ID=%d; L2index: iEta=%d iPhi=%d; XYZ=(%.0f,%.0f,%.0f)cm\n",
44 id,iEta, iPhi, R.x(), R.y(), R.z());
56 float nearTpcPT, nearEmcET, nearBtowET, nearEtowET, smallNearTpcPT;
57 float awayTpcPT, awayEmcET, awayBtowET, awayEtowET;
58 float nearTotET, awayTotET, nearTotET_noEEMC, awayTotET_noEEMC;
59 int awayNTr,nearNTr,smallNearNTr;
60 int awayNTow,nearNTow;
62 TVector3 ptBalance,ptBalance_noEEMC;
63 float sPtBalance,sPtBalance_noEEMC;
65 TVector3 hadronicRecoil;
69 void clear() { pointTower.clear();
70 cluster.clear();cl4x4.clear(); isMatch2Cl=
false; primP=TVector3(0,0,0);
71 prMuTrack=glMuTrack=0;
72 awayTpcPT=nearTpcPT=nearTotET=awayTotET=nearEmcET=awayEmcET=nearBtowET=awayBtowET=nearEtowET=awayEtowET=smallNearTpcPT=nearTotET_noEEMC=awayTotET_noEEMC=0; awayNTr=awayNTow=nearNTr=nearNTow=smallNearNTr=0;
74 ptBalance=TVector3(0,0,0); ptBalance_noEEMC=TVector3(0,0,0);
75 sPtBalance=sPtBalance_noEEMC=0;
77 hadronicRecoil=TVector3(0,0,0); }
79 void print(
int flag=0){
80 if(prMuTrack==0) { printf(
" Track NULL pointer???\n");
return;}
81 printf(
" Track glPT=%.1f GeV/c isMatch2Cl=%d, nearTotET=%.1f, awayTotET=%.1f primPT=%.1f\n",
82 glMuTrack->
pt(),isMatch2Cl,nearTotET, awayTotET,primP.Pt());
83 pointTower.print(flag);
85 TVector3 D=pointTower.R-cluster.position;
86 printf(
" XYZ(track-cluster): |3D dist|=%.1fcm delZ=%.1fcm\n",D.Mag(),D.z());
87 printf(
" 4x4 :"); cl4x4.print(flag);
88 printf(
" nearET/GeV: TPC=%.1f Emc=%.1f (BTOW=%.1f ETOW=%.1f) sum=%.1f\n",nearTpcPT,nearEmcET,nearBtowET,nearEtowET,nearTotET);
89 printf(
" awayET/GeV: TPC=%.1f Emc=%.1f (BTOW=%.1f ETOW=%.1f) sum=%.1f\n",awayTpcPT,awayEmcET,awayBtowET,awayEtowET,awayTotET);
90 printf(
" nearTr=%d nearTow=%d awayTr=%d awayTow=%d \n",nearNTr,nearNTow,awayNTr,awayNTow);
100 vector <WeveEleTrack> eleTrack;
103 id=-999; z=-999; funnyRank=-9999;
107 void print(
int flag=0){
108 printf(
" Vertex ID=%d Z=%.1f cm nTrack=%d\n",
id,z, eleTrack.size());
109 for(
unsigned int i=0;i< eleTrack.size();i++)
120 float adcTile[mxBTile][mxBtow];
121 float eneTile[mxBTile][mxBtow];
122 int statTile[mxBTile][mxBtow];
125 float adcBsmd[mxBSmd][mxBStrips];
126 int statBsmd[mxBSmd][mxBStrips];
129 memset(adcTile,0,
sizeof(adcTile));
130 memset(eneTile,0,
sizeof(eneTile));
131 memset(statTile,-1,
sizeof(statTile));
132 memset(tileIn,0,
sizeof(tileIn));
133 memset(adcBsmd,0,
sizeof(adcBsmd));
134 memset(statBsmd,-1,
sizeof(statBsmd));
138 void print(
int flag=0){
139 printf(
" BTOW tower ADC>500 list: ");
140 for(
int i=0;i< mxBtow;i++) {
141 if(adcTile[kBTow][i]<500)
continue;
143 printf(
"id=%d adc=%.1f ene=%.1f; ",
id,adcTile[kBTow][i],eneTile[kBTow][i]);
146 printf(
" BSMDE tower ADC>200 list: ");
147 for(
int i=0;i< mxBStrips;i++) {
148 if(adcBsmd[ kBSE][i]<200)
continue;
151 printf(
"id=%d mod=%d adc=%.1f ; ",
id,module,adcBsmd[ kBSE][i]);
155 for(
int i=0;i<120;i++) {
157 if(i%10==0) printf(
"\n softID=%4d adc format BTOW:BPRS= ",
id);
158 printf(
"%.0f : %.0f, ", adcTile[kBTow][
id-1], adcTile[kBPrs][
id-1]);
172 float adc[mxEtowSec*mxEtowSub][mxEtowEta];
173 float ene[mxEtowSec*mxEtowSub][mxEtowEta];
174 int stat[mxEtowSec*mxEtowSub][mxEtowEta];
177 memset(adc,0,
sizeof(adc));
178 memset(ene,0,
sizeof(ene));
179 memset(stat,-1,
sizeof(stat));
189 int l2bitET,l2bitRnd;
196 vector < WeveVertex>
vertex;
215 void print(
int flag=0,
int isMC=0) {
216 printf(
"\nmy W2009event ID=%d L2Wbits: ET=%d rnd=%d; bx7=%d bx48=%d nVert=%d\n",
id,l2bitET,l2bitRnd,bx7,bx48,
vertex.size());
217 if(!isMC)L2wResult2009_print(l2algo);
218 for(
unsigned int i=0;i<
vertex.size();i++)
vertex[i].print(flag);
Double_t pt() const
Returns pT at point of dca to primary vertex.