8 #include "StEmcUtil/geometry/StEmcGeom.h"
9 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
10 #include "StEEmcUtil/StEEmcSmd/EEmcSmdGeom.h"
11 #include "WeventDisplay.h"
12 #include "StSpinPool/StJets/StJet.h"
13 #include "StSpinPool/StJets/TowerToJetIndex.h"
15 #include "St2011WMaker.h"
20 St2011WMaker::findEndcap_W_boson(){
22 if(!wEve->l2EbitET)
return;
25 int nNoNear=0,nSmdRatio=0,nNoAway=0,nGoldW=0,nGoldWp=0,nGoldWn=0;
27 if(wEve->zTag)
return;
30 for(
unsigned int iv=0;iv<wEve->vertex.size();iv++) {
32 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
34 if(T.pointTower.id>=0)
continue;
35 if(T.isMatch2Cl==
false)
continue;
36 assert(T.cluster.nTower>0);
37 assert(T.nearTotET>0);
40 if(T.cluster.ET/T.nearTotET_noEEMC>parE_nearTotEtFrac){
41 if(T.sPtBalance_noEEMC>parE_ptBalance ) {
42 hE[140]->Fill(T.cluster.ET);
43 if (T.prMuTrack->
charge() < 0) {
44 hE[184+3]->Fill(T.cluster.ET);
45 }
else if (T.prMuTrack->
charge() > 0) {
46 hE[184+4]->Fill(T.cluster.ET);
54 int sec = WtpcFilter::getTpcSec(ro.phi(),ro.pseudoRapidity());
55 if((sec < 5 || sec > 7) && sec!=21) {
56 hE[63]->Fill(T.glMuTrack->
nHitsFit());
58 hE[65]->Fill(ri.perp());
59 hE[65]->Fill(ro.perp());
62 if(T.cluster.ET /T.nearTotET< parE_nearTotEtFrac)
continue;
64 hE[20]->Fill(
"noNear",1.);
66 hE[112]->Fill( T.cluster.ET);
67 hE[50]->Fill(T.awayTpcPT);
68 hE[51]->Fill(T.awayBtowET);
69 hE[54]->Fill(T.awayTotET);
70 hE[52]->Fill(T.cluster.ET,T.awayTotET);
71 hE[53]->Fill(T.cluster.ET,T.awayEmcET);
72 hE[55]->Fill(T.awayEtowET);
73 hE[60]->Fill(T.cluster.ET,T.awayTpcPT);
75 hE[132]->Fill(T.cluster.ET,T.ptBalance.Perp());
76 hE[133]->Fill(T.awayTotET,T.ptBalance.Perp());
77 hE[134]->Fill(T.cluster.ET,T.sPtBalance);
78 hE[135]->Fill(T.awayTotET,T.sPtBalance);
79 if(T.cluster.ET > parE_highET) hE[239]->Fill(T.awayTotET,T.sPtBalance);
82 hE[141]->Fill(T.sPtBalance,T.sPtBalance-T.sPtBalance2);
85 if(T.sPtBalance>parE_ptBalance ) {
86 hE[136]->Fill(T.cluster.ET);
87 hE[62]->Fill(T.pointTower.iEta ,T.cluster.energy);
88 if (T.prMuTrack->
charge() < 0) {
89 hE[184+1]->Fill(T.cluster.ET);
90 }
else if (T.prMuTrack->
charge() > 0) {
91 hE[184+2]->Fill(T.cluster.ET);
94 hE[137]->Fill(T.cluster.ET);
95 if (T.prMuTrack->
charge() < 0) {
96 hE[184+5]->Fill(T.cluster.ET);
97 }
else if (T.prMuTrack->
charge() > 0) {
98 hE[184+6]->Fill(T.cluster.ET);
103 if(T.sPtBalance2>parE_ptBalance){
104 hE[214]->Fill(T.cluster.ET,T.esmdE[0]+T.esmdE[1]);
105 hE[215]->Fill(T.cluster.ET,T.esmdNhit[0]+T.esmdNhit[1]);
106 hE[220]->Fill(T.cluster.ET,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
107 hE[223]->Fill(T.cluster.ET,T.enePre1+T.enePre2);
108 hE[224]->Fill(T.cluster.ET,T.enePost);
109 hE[227]->Fill(T.cluster.ET,T.esmdPeakSumE[0]+T.esmdPeakSumE[1]);
110 hE[228]->Fill(T.cluster.ET,T.esmdMaxADC);
112 if(T.cluster.ET>parE_highET) {
113 hE[211]->Fill(T.esmdNhit[0],T.esmdNhit[1]);
114 hE[212]->Fill(T.esmdE[0],T.esmdE[1]);
115 hE[213]->Fill(T.esmdNhit[0]+T.esmdNhit[1],T.esmdE[0]+T.esmdE[1]);
116 hE[217]->Fill(T.pointTower.R.X()-T.esmdXPcentroid.X(),T.pointTower.R.Y()-T.esmdXPcentroid.Y());
117 hE[218]->Fill(T.pointTower.R.Eta()-T.esmdXPcentroid.Eta(),T.pointTower.R.Phi()-T.esmdXPcentroid.Phi());
118 hE[219]->Fill(T.esmdPeakSumE[0]/T.esmdE[0],T.esmdPeakSumE[1]/T.esmdE[1]);
120 hE[221]->Fill(T.enePre1,T.enePre2);
121 hE[222]->Fill(T.enePre1+T.enePre2,T.enePost);
122 hE[225]->Fill(T.enePre1+T.enePre2,T.esmdE[0]+T.esmdE[1]);
123 hE[226]->Fill(T.enePost,T.esmdE[0]+T.esmdE[1]);
124 hE[256]->Fill(T.pointTower.R.Phi(), T.esmdPeakOffset[0]);
125 hE[257]->Fill(T.pointTower.R.Phi(), T.esmdPeakOffset[1]);
129 if(T.cluster.ET>parE_highET) hE[235]->Fill(T.esmdPeakSumE[0]/T.esmdE[0],T.esmdPeakSumE[1]/T.esmdE[1]);
130 hE[236]->Fill(T.cluster.ET,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
134 float q2pt_g = T.glMuTrack->
charge()/T.glMuTrack->
pt();
135 float q2pt_p = T.prMuTrack->
charge()/T.prMuTrack->
pt();
136 float hypCorr_g = q2pt_g*(T.cluster.ET);
137 float hypCorr_p = q2pt_p*(T.cluster.ET);
140 if( fabs(hypCorr_p) > parE_QET2PTlow && fabs(hypCorr_p) < parE_QET2PThigh) {
141 if(T.cluster.ET > parE_highET && T.cluster.ET < 50.){
142 hE[237]->Fill(T.sPtBalance,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
143 hE[238]->Fill(T.sPtBalance2,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
144 if(T.prMuTrack->
charge()>0)
145 hE[250]->Fill(T.sPtBalance2,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
147 hE[251]->Fill(T.sPtBalance2,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
150 if(T.cluster.ET > 20.&& T.cluster.ET < 50.){
151 hE[252]->Fill(T.sPtBalance,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
152 hE[253]->Fill(T.sPtBalance2,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
153 if(T.prMuTrack->
charge()>0)
154 hE[254]->Fill(T.sPtBalance2,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
156 hE[255]->Fill(T.sPtBalance2,(T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]));
161 if((T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]) < 0.5){
162 hE[232]->Fill(T.cluster.ET,T.sPtBalance);
163 hE[233]->Fill(T.cluster.ET,T.sPtBalance2);
167 if(T.sPtBalance2>parE_ptBalance && (T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]) > parE_smdRatio){
168 printf(
"\n WWWWWWWWWWWWWWWWWWWWW Endcap \n");
169 wDisaply->exportEvent(
"WE", V, T, iv);
175 if((T.esmdPeakSumE[0]+T.esmdPeakSumE[1])/(T.esmdE[0]+T.esmdE[1]) < parE_smdRatio)
178 hE[20]->Fill(
"smdRatio",1.0);
181 hE[113]->Fill( T.cluster.ET);
182 hE[230]->Fill(T.cluster.ET,T.sPtBalance);
183 hE[231]->Fill(T.cluster.ET,T.sPtBalance2);
186 if(T.sPtBalance2<parE_ptBalance)
continue;
191 hE[20]->Fill(
"noAway",1.0);
193 hE[114]->Fill( T.cluster.ET);
195 hE[90]->Fill( T.cluster.ET);
196 hE[92]->Fill( T.cluster.ET,T.glMuTrack->
dEdx()*1e6);
198 int k=0;
if(T.prMuTrack->
charge()<0) k=1;
199 hE[94+k]->Fill( T.cluster.ET,T.glMuTrack->
dcaD());
203 float ET=T.cluster.ET;
204 const StMuTrack *glTr=T.glMuTrack; assert(glTr);
205 const StMuTrack *prTr=T.prMuTrack; assert(prTr);
206 float g_chrg=glTr->
charge();
207 float p_chrg=prTr->
charge();
208 hE[200]->Fill(ET,g_chrg/glTr->
pt());
209 hE[201]->Fill(ET,p_chrg/prTr->
pt());
210 hE[202]->Fill(T.cluster.ET,hypCorr_g);
211 hE[203]->Fill(T.cluster.ET,hypCorr_p);
214 int g_ipn=0, p_ipn=0;
215 if( g_chrg<0 ) g_ipn=1;
216 if( p_chrg<0 ) p_ipn=1;
217 hE[240+g_ipn]->Fill(ET);
218 hE[242+p_ipn]->Fill(ET);
219 if(g_chrg* p_chrg <-0.5) hE[244+p_ipn]->Fill(ET);
221 if(T.cluster.ET<parE_highET)
continue;
222 hE[91]->Fill(T.cluster.position.PseudoRapidity(),T.cluster.position.Phi());
224 hE[97]->Fill(V.funnyRank);
226 hE[99]->Fill( T.prMuTrack->
eta());
227 hE[100]->Fill(T.pointTower.R.X(),T.pointTower.R.Y());
228 hE[190+k]->Fill(T.prMuTrack->
eta(),T.cluster.ET);
229 hE[101]->Fill(T.cluster.ET/T.cl4x4.ET,T.sPtBalance);
230 hE[102]->Fill(T.cluster.ET/T.nearTotET,T.sPtBalance);
231 hE[103]->Fill(T.cluster.ET/T.nearEmcET,T.sPtBalance);
232 hE[104]->Fill(T.cluster.ET/T.nearEtowET,T.sPtBalance);
233 hE[105]->Fill(T.glMuTrack->
dEdx()*1e6,T.sPtBalance);
236 hE[106]->Fill(T.prMuTrack->
chi2(),hypCorr_p);
237 hE[107]->Fill(T.glMuTrack->
chi2(),hypCorr_p);
239 hE[109]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
241 hE[120]->Fill(T.prMuTrack->
chi2()-T.glMuTrack->
chi2(),hypCorr_p);
242 hE[121]->Fill(T.glMuTrack->
dcaD(),hypCorr_p);
243 hE[122]->Fill(T.esmdPeakOffset[0],hypCorr_p);
244 hE[123]->Fill(T.esmdPeakOffset[1],hypCorr_p);
245 hE[124]->Fill(T.esmdPeakOffset[1],T.esmdPeakOffset[0]);
246 hE[125]->Fill(ri.perp(),hypCorr_p);
247 hE[126]->Fill(ro.perp(),hypCorr_p);
248 hE[127]->Fill(T.glMuTrack->
dEdx()*1e6,hypCorr_p);
250 hE[129]->Fill(ro.perp()-ri.perp(),hypCorr_p);
251 float phiScale = 180./TMath::Pi();
252 float deltaPhiESMD = (T.pointTower.R.Phi()-T.esmdXPcentroid.Phi())*phiScale;
253 float deltaPhiTrack = (T.pointTower.R.Phi()-T.pointTower.Rglob.Phi())*phiScale;
254 float deltaR = ro.perp()-ri.perp();
255 float chi2 = T.prMuTrack->
chi2();
256 hE[130]->Fill(deltaPhiESMD,hypCorr_p);
257 hE[131]->Fill(deltaPhiTrack,hypCorr_p);
259 if(hypCorr_p > parE_QET2PTlow && hypCorr_p < parE_QET2PThigh) {
260 hE[150]->Fill(T.glMuTrack->
dcaD(),ro.perp());
261 hE[152]->Fill(deltaPhiESMD,ro.perp());
262 hE[154]->Fill(deltaPhiESMD,ro.perp()-ri.perp());
263 hE[156]->Fill(deltaPhiTrack,ro.perp()-ri.perp());
264 hE[158]->Fill(deltaPhiTrack,T.prMuTrack->
chi2());
265 hE[160]->Fill(deltaPhiESMD,T.prMuTrack->
chi2());
266 hE[162]->Fill(ro.perp()-ri.perp(),T.prMuTrack->
chi2());
268 else if(hypCorr_p < -1.*parE_QET2PTlow && hypCorr_p > -1.*parE_QET2PThigh) {
269 hE[151]->Fill(T.glMuTrack->
dcaD(),ro.perp());
270 hE[153]->Fill(deltaPhiESMD,ro.perp());
271 hE[155]->Fill(deltaPhiESMD,ro.perp()-ri.perp());
272 hE[157]->Fill(deltaPhiTrack,ro.perp()-ri.perp());
273 hE[159]->Fill(deltaPhiTrack,T.prMuTrack->
chi2());
274 hE[161]->Fill(deltaPhiESMD,T.prMuTrack->
chi2());
275 hE[163]->Fill(ro.perp()-ri.perp(),T.prMuTrack->
chi2());
280 float RoutCut = 110.;
281 float delPhiCut = 0.25;
283 if( (chi2 < chi2cut && fabs(deltaPhiTrack) < delPhiCut) || (chi2 < chi2cut && deltaR > delRcut) || (fabs(deltaPhiTrack) < delPhiCut && deltaR > delRcut) )
284 hE[170]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
285 if( (chi2 < chi2cut && fabs(deltaPhiTrack) < delPhiCut) || (chi2 < chi2cut && ro.perp() > RoutCut) || (fabs(deltaPhiTrack) < delPhiCut && ro.perp() > RoutCut) )
286 hE[171]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
289 if(chi2 < 4.0 && fabs(deltaPhiTrack) < 0.4 && ro.perp() > 90.)
290 hE[172]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
291 if(chi2 < 3.5 && fabs(deltaPhiTrack) < 0.4 && ro.perp() > 90.)
292 hE[173]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
293 if(chi2 < 4.0 && fabs(deltaPhiTrack) < 0.4)
294 hE[174]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
295 if(chi2 < 4.0 && fabs(deltaPhiTrack) < 0.35)
296 hE[175]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
297 if(chi2 < 3.5 && fabs(deltaPhiTrack) < 0.4)
298 hE[176]->Fill(T.glMuTrack->
nHitsFit(),hypCorr_p);
300 hE[20]->Fill(
"goldW",1.);
302 if(T.prMuTrack->
charge()>0) nGoldWp++;
303 else if(T.prMuTrack->
charge()<0) nGoldWn++;
307 if(nNoNear>0) hE[0]->Fill(
"noNear",1.);
308 if(nSmdRatio>0) hE[0]->Fill(
"smdRatio",1.);
309 if(nNoAway>0) hE[0]->Fill(
"noAway",1.);
310 if(nGoldW>0) hE[0]->Fill(
"goldW",1.);
311 if(nGoldWp>0) hE[0]->Fill(
"goldW+",1.);
312 if(nGoldWn>0) hE[0]->Fill(
"goldW-",1.);
319 St2011WMaker::analyzeESMD(){
320 if(!wEve->l2EbitET)
return;
323 for(
unsigned int iv=0;iv<wEve->vertex.size();iv++) {
325 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
327 if(T.pointTower.id>=0)
continue;
328 if(T.isMatch2Cl==
false)
continue;
329 assert(T.cluster.nTower>0);
332 int hitStrip[2]={-1,-1};
int hitStripGlob[2]={-1,-1};
334 int isec=T.pointTower.iPhi/mxEtowSub;
335 int layer[2]={((isec+2)%3) +1, (isec%3) +1};
337 for(
int iuv=0; iuv<2; iuv++){
344 printf(
" ESMD sec=%d iuv=%d layer=%d, smdZ=%.1f\n", isec+1, iuv,layer[iuv],diskPosition.z() );
346 double path = trkHlx.
pathLength(diskPosition,diskNormal);
348 TVector3 rCross(r.x(),r.y(),r.z());
352 if(!stripPtr) {cout<<
"No Strip found"<<endl;
continue;}
353 if(fabs(dca)>0.51 ) {cout<<
"Esmd DCA to big ="<<dca<<endl;
continue;}
357 double pathGlob = trkHlxGlob.
pathLength(diskPosition,diskNormal);
359 TVector3 rCrossGlob(rGlob.x(),rGlob.y(),rGlob.z());
362 int stripId=stripPtr->stripStructId.stripId;
363 int sectorId=stripPtr->stripStructId.sectorId;
364 T.hitSector=sectorId;
365 T.esmdGlobStrip[iuv]=stripPtrGlob->stripStructId.stripId-stripId;
366 T.esmdDca[iuv]=dca; T.esmdDcaGlob[iuv]=dcaGlob;
367 hitStrip[iuv]=stripId; hitStripGlob[iuv]=stripPtrGlob->stripStructId.stripId;
370 int str1=stripId - parE_nSmdStrip;
if(str1<1) str1=1;
371 int str2=stripId + parE_nSmdStrip;
if(str2>288) str2=288;
372 for(
int istrip=str1; istrip<=str2; istrip++){
373 float ene = wEve->esmd.ene[sectorId-1][iuv][istrip-1]*1e3;
374 int adc = wEve->esmd.adc[sectorId-1][iuv][istrip-1];
375 T.esmdShower[iuv][istrip-stripId+parE_nSmdStrip]=ene;
376 if(adc > T.esmdMaxADC){ T.esmdMaxADC=adc; }
380 if(abs(istrip-stripId)<4){
382 T.esmdEsum7[iuv]+=ene;
390 int delOff=parE_esmdWL -parE_esmdGL;
391 for(
int off1=-delOff; off1<=delOff; off1++) {
393 for(
int off2=-parE_esmdGL; off2<=parE_esmdGL; off2++)
394 sum+=T.esmdShower[iuv][parE_nSmdStrip+off1+off2];
396 if(bestSum>sum)
continue;
400 printf(
"do slide iuv=%d sum7=%.1f bestSum=%.1f bestOff=%d\n",iuv, T.esmdEsum7[iuv], bestSum,bestOff);
401 T.esmdPeakSumE[iuv]=bestSum;
402 T.esmdPeakOffset[iuv]=bestOff;
407 T.esmdXPcentroid = geoSmd->
getIntersection(T.hitSector-1,hitStrip[0]-1+T.esmdPeakOffset[0],hitStrip[1]-1+T.esmdPeakOffset[1]);
417 St2011WMaker::analyzeEPRS(){
418 if(!wEve->l2EbitET)
return;
421 for(
unsigned int iv=0;iv<wEve->vertex.size();iv++) {
423 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
425 if(T.pointTower.id>=0)
continue;
426 if(T.isMatch2Cl==
false)
continue;
427 assert(T.cluster.nTower>0);
430 T.enePre1 = wEve->eprs.ene[T.cluster.iPhi][T.cluster.iEta][0];
431 T.enePre2 = wEve->eprs.ene[T.cluster.iPhi][T.cluster.iEta][1];
432 T.enePost = wEve->eprs.ene[T.cluster.iPhi][T.cluster.iEta][2];
443 St2011WMaker::sumEtowCone(
float zVert, TVector3 refAxis,
int flag){
445 assert(flag==1 || flag==2);
449 for(
int iphi=0; iphi<mxEtowPhiBin; iphi++){
450 for(
int ieta=0; ieta<mxEtowEta; ieta++){
451 float ene=wEve->etow.ene[iphi][ieta];
453 TVector3 primP=positionEtow[iphi][ieta]-TVector3(0,0,zVert);
456 float deltaPhi=refAxis.DeltaPhi(primP);
457 if(fabs(deltaPhi)> par_awayDeltaPhi)
continue;
460 float deltaR=refAxis.DeltaR(primP);
461 if(deltaR> par_nearDeltaR)
continue;
477 St2011WMaker::extendTrack2Endcap(){
479 if(!wEve->l2EbitET)
return 0;
481 double parE_zSMD=geomE->
getZSMD();
483 for(
unsigned int iv=0;iv<wEve->vertex.size();iv++) {
485 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
487 if(T.prMuTrack->
eta()<parE_trackEtaMin)
491 if(T.primP.Eta() < parE_leptonEtaLow || T.primP.Eta() > parE_leptonEtaHigh)
continue;
499 double path = trkHlx.
pathLength(diskPosition,diskNormal);
502 float periodL=trkHlx.
period();
505 printf(
" Warn, long path fac=%.1f ",path/periodL);
506 printf(
" punchEEMC1 x,y,z=%.1f, %.1f, %.1f path=%.1f period=%.1f\n",r.x(),r.y(),r.z(),path,periodL);
510 hE[69]->Fill(r.x(), r.y());
512 int isec,isubSec,ietaBin;
513 Float_t epsPhi, epsEta;
514 TVector3 rCross(r.x(),r.y(),r.z());
515 bool inEtow=geomE->
getTower(rCross,isec,isubSec,ietaBin,epsPhi,epsEta);
516 if(!inEtow)
continue;
517 hE[20]->Fill(
"@E",1.);
521 T.pointTower.id=-999;
522 T.pointTower.R=rCross;
523 T.pointTower.iEta=ietaBin;
524 T.pointTower.iPhi=isec*mxEtowSub+isubSec;
528 double pathGlob = trkHlxGlob.
pathLength(diskPosition,diskNormal);
531 float periodLGlob=trkHlxGlob.
period();
533 if(periodLGlob<2*pathGlob) {
534 printf(
" Warn, long path Global fac=%.1f ",pathGlob/periodLGlob);
535 printf(
" punchEEMC1 x,y,z=%.1f, %.1f, %.1f path=%.1f period=%.1f\n",r.x(),r.y(),r.z(),pathGlob,periodLGlob);
537 TVector3 rCrossGlob(rGlob.x(),rGlob.y(),rGlob.z());
538 T.pointTower.Rglob=rCrossGlob;
543 if(nTrE<=0)
return -1;
544 hE[0]->Fill(
"TrE",1.0);
553 St2011WMaker::matchTrack2EtowCluster(){
556 if(!wEve->l2EbitET)
return 0;
559 for(
unsigned int iv=0;iv<wEve->vertex.size();iv++) {
562 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
564 if(T.pointTower.id>=0)
continue;
566 float trackPT=T.prMuTrack->
momentum().perp();
567 T.cluster=maxEtow2x2(T.pointTower.iEta,T.pointTower.iPhi,zVert);
568 hE[110]->Fill( T.cluster.ET);
569 hE[33]->Fill(T.cluster.ET);
570 hE[34]->Fill(T.cluster.adcSum,trackPT);
573 int iEta=T.cluster.iEta;
574 int iPhi=T.cluster.iPhi;
575 T.cl4x4=sumEtowPatch(iEta-1,iPhi-1,4,4,zVert);
577 if (T.cluster.ET<parE_clustET)
continue;
578 hE[20]->Fill(
"CL",1.);
579 hE[37]->Fill(T.cl4x4.ET);
580 hE[38]->Fill(T.cluster.energy, T.cl4x4.energy-T.cluster.energy);
582 float frac24=T.cluster.ET/(T.cl4x4.ET);
583 hE[39]->Fill(frac24);
584 if(frac24<parE_clustFrac24)
continue;
585 hE[20]->Fill(
"fr24",1.);
588 float newMag=geomE->
getZSMD()/TMath::Cos(T.cluster.position.Theta());
589 T.cluster.position.SetMag(newMag);
592 TVector3 D=T.pointTower.R-T.cluster.position;
593 hE[43]->Fill(T.cluster.energy,D.Perp());
594 float delPhi=T.pointTower.R.DeltaPhi(T.cluster.position);
595 float Rxy=T.cluster.position.Perp();
597 hE[44]->Fill( T.cluster.position.Phi(),Rxy*delPhi);
598 hE[45]->Fill( T.cluster.energy,Rxy*delPhi);
599 hE[46]->Fill( D.Perp());
601 if(D.Perp()>par_delR3D)
continue;
603 hE[20]->Fill(
"#Delta R",1.);
604 hE[111]->Fill( T.cluster.ET);
610 if(nTr<=0)
return -1;
611 hE[0]->Fill(
"Tr2Cl",1.0);
620 St2011WMaker::maxEtow2x1(
int iEta,
int iPhi,
float zVert){
628 for(
int I=I0;I<=I0+1;I++){
630 if(maxET>CL.ET)
continue;
636 for(
int J=J0;J<=J0+1;J++) {
638 if(maxET>CL.ET)
continue;
651 St2011WMaker::maxEtow2x2(
int iEta,
int iPhi,
float zVert){
660 for(
int I=I0;I<=I0+1;I++){
661 for(
int J=J0;J<=J0+1;J++) {
663 if(maxET>CL.ET)
continue;
678 St2011WMaker::sumEtowPatch(
int iEta,
int iPhi,
int Leta,
int Lphi,
float zVert){
686 for(
int i=iEta; i<iEta+Leta;i++){
688 if(i>=mxEtowEta)
continue;
689 for(
int j=iPhi;j<iPhi+Lphi;j++) {
690 int jj=(j+mxEtowPhiBin)%mxEtowPhiBin;
693 float ene= wEve->etow.ene[jj][i];
695 float adc= wEve->etow.adc[jj][i];
696 float delZ=positionEtow[jj][i].z()-zVert;
697 float Rxy=positionEtow[jj][i].Perp();
698 float e2et=Rxy/sqrt(Rxy*Rxy+delZ*delZ);
700 float logET=log10(ET+0.5);
706 R+=logET*positionEtow[jj][i];
712 CL.position=1./sumW*R;
714 CL.position=TVector3(0,0,999);
Double_t lengthMeasured() const
Returns length of track (cm) from first to last measured point.
Double_t pt() const
Returns pT at point of dca to primary vertex.
Double_t chi2() const
Returns chi2 of fit.
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
UShort_t nHitsFit() const
Return total number of hits used in fit.
Short_t charge() const
Returns charge.
Double_t eta() const
Returns pseudo rapidity at point of dca to primary vertex.
const StThreeVectorF & firstPoint() const
Returns positions of first measured point.
Float_t getZSMD() const
gets z-depth of the SMD layer in EEMC
UShort_t nHitsPoss() const
Return number of possible hits on track.
const StThreeVectorF & momentum() const
Returns 3-momentum at dca to primary vertex.
const StThreeVectorF & lastPoint() const
Returns positions of last measured point.
Double_t dEdx() const
Returns measured dE/dx value.
TVector3 getIntersection(Int_t iSec, Int_t iUStrip, Int_t iVStrip, const TVector3 &vertex) const
bool getTower(const TVector3 &r, int &sec, int &sub, int &etabin, Float_t &dphi, Float_t &deta) const
Float_t dcaD(Int_t vtx_id=-1) const
Signed radial component of global DCA (projected)
double period() const
returns period length of helix
StPhysicalHelixD outerHelix() const
Returns outer helix (last measured point)
const StructEEmcStrip * getDca2Strip(const Int_t iUV, const TVector3 &point, Float_t *dca) const