StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcPointMaker.cxx
1 
26 #include "StEEmcPointMaker.h"
27 #include "StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
28 #include "StEEmcPool/StEEmcClusterMaker/StEEmcClusterMaker.h"
29 
30 #include "StEEmcUtil/EEmcGeom/EEmcGeomDefs.h"
31 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
32 #include "StEEmcUtil/StEEmcSmd/EEmcSmdGeom.h"
33 
34 #include <iostream>
35 #include <algorithm>
36 #include <map>
37 
38 #include "eeTowerFunction.h"
39 
40 /* StEvent stuff */
41 #include "StEvent/StEvent.h"
42 #include "StEvent/StEmcCollection.h"
43 #include "StEvent/StEmcPoint.h"
44 
45 /* Root's linear algebra package */
46 #include "TMatrixF.h"
47 
48 //#define DEBUG_buildPoints
49 
50 ClassImp(StEEmcPointMaker);
51 
52 // ----------------------------------------------------------------------------
54 {
55  std::cout << "StEEmcPointMaker("<<name<<")" << std::endl;
56 
60  mEEtow=new EEmcGeomSimple();
61  mEEsmd=EEmcSmdGeom::instance();
62  mEEmap=EEmcSmdMap::instance();
63 
64  mTowerThreshold=0.;
65  mFillStEvent=false;
66  mEnergyMode=1;
67  mLimit=10;
68  mSmdMatch = 0.;
69 
70 }
71 
72 // ----------------------------------------------------------------------------
74 {
77  assert(mEEanalysis);
78  assert(mEEclusters);
79  return StMaker::Init();
80 }
81 
82 // ----------------------------------------------------------------------------
84 {
85 
92 
93  // Loop over all 12 EEMC sectors
94  for ( Int_t sector=0; sector<12; sector++ )
95  {
96 
98  StEEmcSmdClusterVec_t uclusters=mEEclusters->smdclusters(sector,0);
99  StEEmcSmdClusterVec_t vclusters=mEEclusters->smdclusters(sector,1);
100 
102  std::sort( uclusters.begin(), uclusters.end(), inner );
103  std::sort( vclusters.begin(), vclusters.end(), inner );
104 
105  findPoints( sector, uclusters, vclusters, mPoints );
106 
107  }
108 
109 
116  for ( UInt_t i=0;i<mPoints.size();i++ )
117  {
118  mPoints[i].energy( (Float_t)(mPoints[i].energy()/0.007/2.) );
119  }
120 
121 
122 
123 
124  StEEmcPointVec_t orgpoints=mPoints;
125 
127  // shareEnergy(); // <<<<<<< leads to negative point energies... rethink
128 
129  if ( mEnergyMode == 1 )
131  else
132  shareEnergySmd();
133 
134 
136  countRelatives();
137 
138 
139  if ( mFillStEvent )
140  {
141  fillStEvent();
142  verifyStEvent();
143  }
144 
145  /*
146  for ( UInt_t i=0;i<mPoints.size();i++ )
147  {
148  mPoints[i].print();
149  }
150  for ( Int_t i=0;i<10;i++ ) std::cout << std::endl;
151 */
152 
153  return kStOK;
154 }
155 
156 // ----------------------------------------------------------------------------
157 
158 StEEmcPointVec_t StEEmcPointMaker::buildSmdPoints( Int_t sector,
159  StEEmcSmdClusterVec_t &u,
160  StEEmcSmdClusterVec_t &v )
161 {
162 
163  StEEmcPointVec_t points;
164 
165  for ( UInt_t i=0; i<u.size(); i++ )
166  {
167 
168  StEEmcSmdCluster uc=u[i];
169  Float_t xu=uc.mean();
170 
171  for ( UInt_t j=0;j<v.size(); j++ )
172  {
173 
174 
175  StEEmcSmdCluster vc=v[j];
176  Float_t xv=vc.mean();
177 
179  TVector3 direct = mEEsmd->getIntersection( sector, xu, xv );
180 
181  Int_t sec,sub,eta;
182  if ( !mEEtow->getTower(direct,sec,sub,eta) )
183  {
184  continue;
185  }
186  else
187  {
189  }
190 
193  if ( sector != sec )
194  continue;
195 
196 
197 
201  Bool_t good = false;
202  if ( mEEanalysis->tower(sec,sub,eta).energy() > mTowerThreshold )
203  good=true;
204  else if ( mEEanalysis->tower(sec,sub,eta).fail() )
205  {
206  for ( Int_t layer=1;layer<=3;layer++ )
207  {
208  if ( mEEanalysis->tower(sec,sub,eta,layer).energy() > 0. )
209  good=true;
210  }
211  }
212 
215  /*
216  Float_t uvdiff = TMath::Abs( uc.energy() - vc.energy() );
217  Float_t uvavg = 0.5 * ( uc.energy() + vc.energy() );
218  if ( uvdiff > mSmdMatch * uvavg ) good = false;
219  */
220  Float_t Eu=uc.energy();
221  Float_t Ev=vc.energy();
222  if ( Eu < mSmdMatch * Ev || Ev < mSmdMatch * Eu ) good=false;
223 
224  if ( good ) {
225 
226  StEEmcPoint p;
227  p.cluster( uc, 0 );
228  p.cluster( vc, 1 );
229  p.energy( uc.energy() + vc.energy() );
230  p.tower( mEEanalysis->tower(sec,sub,eta) );
231  TVector3 position=mEEsmd->getIntersection(sector,uc.mean(),vc.mean());
232  p.position(position);
233  points.push_back(p);
234 
236  mSmdPoints.push_back(p);
237 
238  }
239 
240  }
241 
242  }
243 
244  return points;
245 
246 }
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 // ----------------------------------------------------------------------------
265 Bool_t StEEmcPointMaker::findPoints( Int_t sector,
266  StEEmcSmdClusterVec_t uclusters,
267  StEEmcSmdClusterVec_t vclusters,
268  StEEmcPointVec_t &points )
269 {
270 
271 
273  StEEmcPointVec_t mypoints;
274 
276  std::sort( uclusters.begin(), uclusters.end(), inner );
277  std::sort( vclusters.begin(), vclusters.end(), inner );
278 
280  StEEmcPointVec_t smdpoints = buildSmdPoints( sector, uclusters, vclusters );
281 
282 
284  if ( smdpoints.size() < 1 ) return false;
285 
287  std::sort( smdpoints.begin(), smdpoints.end(), chiSquare );
288 
289 
293  std::map< Int_t, std::vector<Int_t> > u2p, v2p;
294  for ( UInt_t i=0; i<smdpoints.size(); i++ )
295  {
296  u2p[ smdpoints[i].cluster(0).key() ].push_back( i );
297  v2p[ smdpoints[i].cluster(1).key() ].push_back( i );
298  }
299 
305  StEEmcSmdClusterVec_t::iterator uiter=uclusters.begin();
306  StEEmcSmdClusterVec_t::iterator viter=vclusters.begin();
307 
308 
309 
310  // ----------<<<<<<<<< stage one >>>>>>>>>-------------
311 
312 
313 
314  while ( uiter<uclusters.end() || viter<vclusters.end() )
315  {
316 
318  StEEmcSmdCluster ucl;ucl.key(-1);
319  StEEmcSmdCluster vcl;vcl.key(-1);
320  if ( uiter<uclusters.end() ) ucl=(*uiter);
321  if ( viter<vclusters.end() ) vcl=(*viter);
322  Int_t iUV=-1;
323  if ( ucl.key()<0 )
324  iUV=1;
325  else if ( vcl.key()<0 )
326  iUV=0;
327  else if ( (*uiter).mean() < (*viter).mean() )
328  iUV=0;
329  else
330  iUV=1;
331 
333  StEEmcSmdCluster &cluster=(iUV==0)?ucl:vcl;
334 
336  std::vector<Int_t> matched=(iUV==0)?
337  u2p[cluster.key()]:
338  v2p[cluster.key()];
339 
340 
343  if ( matched.size()==0 || matched.size() >1 )
344  {
345  if ( iUV==0 ) uiter++;
346  if ( iUV==1 ) viter++;
347  continue;
348  }
349 
355 
358  StEEmcPoint p=smdpoints[matched.back()];
359 
361  mypoints.push_back(p);
362 
363  if ( iUV==0 ) uiter++;
364  if ( iUV==1 ) viter++;
365 
366  }
367 
368 
371  Float_t chisq=9.0E9;
372  Int_t imin=-1;
373  for ( UInt_t i=0; i<mypoints.size(); i++ )
374  {
375  Float_t eu=mypoints[i].cluster(0).energy();
376  Float_t ev=mypoints[i].cluster(1).energy();
377  Float_t x2=(eu-ev)*(eu-ev);
378  if ( x2 < chisq ) {
379  imin=(Int_t)i;
380  chisq=x2;
381  }
382  }
383 
384 
391  if ( imin >= 0 ) {
392 
393  StEEmcPoint p=mypoints[imin];
394  removeCluster( uclusters, p.cluster(0).key() );
395  removeCluster( vclusters, p.cluster(1).key() );
396  points.push_back(p);
397  findPoints(sector, uclusters, vclusters, points );
398  return true;
399 
400  }
401 
402 
403 
404 
405 
407 
408 
415  uiter=uclusters.begin();
416  viter=vclusters.begin();
417  while ( uiter!=uclusters.end() || viter!=vclusters.end() )
418  {
419 
421  StEEmcSmdCluster ucl;ucl.key(-1);
422  StEEmcSmdCluster vcl;vcl.key(-1);
423  if ( uiter!=uclusters.end() ) ucl=(*uiter);
424  if ( viter!=vclusters.end() ) vcl=(*viter);
425  Int_t iUV=-1;
426  if ( ucl.key()<0 )
427  iUV=1;
428  else if ( vcl.key()<0 )
429  iUV=0;
430  else if ( (*uiter).mean() < (*viter).mean() )
431  iUV=0;
432  else
433  iUV=1;
434 
436  StEEmcSmdCluster &cluster=(iUV==0)?ucl:vcl;
437 
439  std::vector<Int_t> matched=(iUV==0)?
440  u2p[cluster.key()]:
441  v2p[cluster.key()];
442 
445  if ( matched.size()==0 || matched.size()==1 )
446  {
447  if ( iUV==0 ) uiter++;
448  if ( iUV==1 ) viter++;
449  continue;
450  }
451 
454  StEEmcPoint p=smdpoints[matched.front()];
455 
457  mypoints.push_back(p);
458 
459  if ( iUV==0 ) uiter++;
460  if ( iUV==1 ) viter++;
461 
462  }
463 
464 
467  chisq=9.0E9;
468  imin=-1;
469  for ( UInt_t i=0; i<mypoints.size(); i++ )
470  {
471  Float_t eu=mypoints[i].cluster(0).energy();
472  Float_t ev=mypoints[i].cluster(1).energy();
473  Float_t x2=(eu-ev)*(eu-ev);
474  if ( x2 < chisq ) {
475  imin=(Int_t)i;
476  chisq=x2;
477  }
478  }
479 
480 
481 
488  if ( imin >= 0 ) {
489 
490  StEEmcPoint p=mypoints[imin];
491  removeCluster( uclusters, p.cluster(0).key() );
492  removeCluster( vclusters, p.cluster(1).key() );
493  points.push_back(p);
494  findPoints(sector, uclusters, vclusters, points );
495  return true;
496 
497  }
498 
499 
500  return true;
501 
502 }
503 
504 
505 
506 // ----------------------------------------------------------------------------
507 void StEEmcPointMaker::Clear( Option_t *opts )
508 {
509 
510  mEseen=0.;
511  mPoints.clear();
512  mSmdPoints.clear();
513 
514 }
515 
516 // ----------------------------------------------------------------------------
517 void StEEmcPointMaker::removeCluster( StEEmcSmdClusterVec_t &clusters, Int_t k )
518 {
519  StEEmcSmdClusterVec_t::iterator iter=clusters.begin();
520  while ( iter != clusters.end() )
521  {
522  if ( (*iter).key() == k ) {
523  clusters.erase(iter);
524  return;
525  }
526  iter++;
527  }
528 }
529 
530 // ----------------------------------------------------------------------------
532 {
533 
539 
540 
541 
542  Int_t nrow=(Int_t)mPoints.size();
543  Int_t ncol=(Int_t)mPoints.size();
544  if ( nrow < 1 ) return;
545 
546  std::vector<Float_t> Ef(nrow,0.);
547 
548  TMatrixF fractions(nrow,ncol);
549 
551  for ( Int_t k=0; k<mEEanalysis->numberOfHitTowers(0); k++ )
552  {
553 
555  StEEmcTower tower=mEEanalysis->hittower(k,0);
556 
558  for ( UInt_t i=0; i< mPoints.size(); i++ )
559  {
560 
563  Float_t fi=fracp2t( mPoints[i], tower );
564  if ( fi<=0. ) continue;
565 
567  Ef[i] += fi * tower.energy();
568 
569  for ( UInt_t j=0; j<mPoints.size(); j++ )
570  {
571 
574  Float_t fj=fracp2t( mPoints[j], tower );
575  if (fi*fj<=0.) continue;
576 
577  fractions[i][j] += fi*fj;
578 
579  }
580 
581  }
582 
583  }
584 
585  fractions.Print();
586 
588  Double_t det = 0.;
589  TMatrixF invert= fractions;
590  invert.Invert(&det);
591 
592  invert.Print();
593 
594  TMatrixF test= fractions * invert;
595 
596  test.Print();
597 
598 
600 
601  std::vector<Float_t> epoints(nrow,0.);
602 
603  for ( Int_t i=0; i<nrow; i++ )
604  {
605  for ( Int_t j=0; j<ncol; j++ )
606  {
607  epoints[i] += invert[i][j] * Ef[j];
608  }
609 
610 
611  }
612 
613 
614 
615 
616 
617 
618 }
619 
620 
621 // ----------------------------------------------------------------------------
623 {
624 
626 
627 
630  if ( !t.isNeighbor( p.tower(0) ) ) return 0.;
631  //if ( !(t.index()==p.tower(0).index()) ) return 0.;
632 
633 
635  Float_t xeta=(Float_t)t.etabin();
636  Float_t xphi=(Float_t)t.phibin();
637  Double_t X[]={xphi,xeta};
638 
640  Float_t xeta0=(Float_t)p.tower(0).etabin();
641  Float_t xphi0=(Float_t)p.tower(0).phibin();
642 
645  Int_t sec,sub,eta;
646  Float_t dphi,deta;
647  if ( !mEEtow->getTower(p.position(), sec,sub,eta, dphi,deta ) ) return 0.;
648  dphi/=2.0;
649  deta/=2.0;
650 
652  Float_t xetap=xeta0+deta;
653  Float_t xphip=xphi0+dphi;
654  Double_t P[]={xphip,xetap,1.0};
655 
656  return eeTowerFunction( X, P );
657 
658 }
659 
660 
661 // ----------------------------------------------------------------------------
663 {
664 
665  Int_t limit=mLimit; // algo quickly converges on energy
666  Int_t count=0;
667 
668  while ( count++ < limit )
669  {
670 
673  Float_t sumw[720];
674  for (Int_t i=0;i<720;i++) sumw[i]=0.;
675 
678  for ( UInt_t i=0;i<mPoints.size();i++ )
679  {
680 
682  StEEmcTower tower=point.tower(0);
683 
684  sumw[ tower.index() ] += point.energy() * fracp2t( point, tower );
685 
687  for ( Int_t i=0; i<tower.numberOfNeighbors(); i++ )
688  {
689  StEEmcTower neighbor=tower.neighbor(i);
690  sumw[ neighbor.index() ] += point.energy() * fracp2t( point, neighbor );
691  }
692 
693  }
694 
695 
699 
700  for ( UInt_t i=0;i<mPoints.size();i++ )
701  {
702 
703  StEEmcPoint &point=mPoints[i]; // note the reference
704  StEEmcTower tower=point.tower(0);
705  Float_t epoint=0.;
706 
707  Float_t frac=0.;
708  if ( !tower.fail() && !tower.stat() && sumw[tower.index()]>0. )
709  frac = point.energy() * fracp2t(point,tower) / sumw[ tower.index() ];
710 
711  epoint += tower.energy() * frac;
712 
715  for ( Int_t i=0; i<tower.numberOfNeighbors(); i++ )
716  {
717  StEEmcTower neighbor=tower.neighbor(i);
718  if ( neighbor.stat() || neighbor.fail() || sumw[neighbor.index()]<=0. ) continue;
719  frac = point.energy() * fracp2t(point,neighbor) / sumw[ neighbor.index() ];
720  epoint += frac * neighbor.energy();
721  }
722 
723 
725  point.energy( epoint );
726 
727  }
728 
729  }
730 
731 
732 
733 
734  std::vector<Bool_t> seen(720,false);
735  for ( UInt_t i=0;i<mPoints.size();i++ )
736  {
737 
738  StEEmcTower tow=mPoints[i].tower(0);
739  if ( !seen[ tow.index() ] ) mEseen+=tow.energy();
740  seen[ tow.index() ] = true;
741 
742  for ( Int_t j=0;j<tow.numberOfNeighbors();j++ )
743  {
744  StEEmcTower nei=tow.neighbor(j);
745  if ( !seen[ nei.index() ] ) mEseen += nei.energy();
746  seen[ nei.index() ] = true;
747  }
748 
749  }
750 
751 
752 
753 
754 
755 
756 }
757 
758 
759 
760 
761 
762 // ----------------------------------------------------------------------------
764 {
765 
766 
767  StEvent *stevent=(StEvent*)GetInputDS("StEvent");
768  if ( !stevent ) {
769  Warning("fillStEvent","called, but no StEvent to be found");
770  return;
771  }
772 
773 
775  for ( UInt_t i=0; i<mPoints.size(); i++ )
776  {
777 
778  StEmcPoint *point=mPoints[i].stemc();
779  stevent->emcCollection()->addEndcapPoint( point );
780 
781  mEtoEE[ point ] = mPoints[i];
782 
783 
784  }
785 
786 }
787 
788 
789 
790 // ----------------------------------------------------------------------------
792 {
793 
794  Float_t emc_sum_points = 0.;
795  Float_t eemc_sum_points = 0.;
796 
797  StEvent *stevent=(StEvent*)GetInputDS("StEvent");
798  if ( !stevent ) {
799  Warning("verifyStEvent","called, but no StEvent to be found");
800  return;
801  }
802 
803  StSPtrVecEmcPoint& emcpts = stevent->emcCollection()->endcapPoints();
804  for ( UInt_t i=0;i<emcpts.size();i++ )
805  {
806 
807  StEmcPoint *p=emcpts[i];
808  assert(p);
809  emc_sum_points += p->energy();
810 
811  }
812 
813  for ( UInt_t i=0;i<mPoints.size();i++ )
814  {
815 
816  StEEmcPoint p=mPoints[i];
817  eemc_sum_points += p.energy();
818 
819  }
820 
821  std::cout << "StEEmcPointMaker point checksum: ";
822  if ( emc_sum_points == eemc_sum_points )
823  {
824  std::cout << "passed";
825  }
826  else
827  std::cout << "FAILED";
828  std::cout << std::endl;
829 
830 
831 }
832 
833 
834 // ----------------------------------------------------------------------------
836 {
837 
839  Int_t npoints[720];
840  for ( Int_t i=0;i<720;i++ ) npoints[i]=0;
841 
842  for ( UInt_t i=0;i<mPoints.size();i++ )
843  npoints[ mPoints[i].tower(0).index() ]++;
844 
846  for ( UInt_t i=0;i<mPoints.size();i++ )
847  {
848 
849  StEEmcTower tower=mPoints[i].tower(0);
850  Int_t nn=tower.numberOfNeighbors();
851 
852  Int_t nrel=npoints[ tower.index() ] - 1; // don't count self
853  assert(nrel>=0); // pbck
854 
855  for ( Int_t j=0;j<nn;j++ )
856  {
857  StEEmcTower t2=tower.neighbor(j);
858  nrel+=npoints[ t2.index() ];
859  }
860 
861  mPoints[i].numberOfRelatives(nrel);
862 
863  }
864 
865 
866 }
867 
868 
869 
870 
871 // ----------------------------------------------------------------------------
873 {
874 
877  Float_t sumw[720];for ( Int_t i=0;i<720;i++ )sumw[i]=0.;
878  Float_t sumw1[720];for ( Int_t i=0;i<720;i++ )sumw1[i]=0.;
879 
880  for ( UInt_t ipoint=0;ipoint<mPoints.size();ipoint++ )
881  {
882 
883 
884  StEEmcPoint point=mPoints[ipoint];
885  StEEmcTower tower=point.tower(0);
886  sumw[tower.index()]+=point.energy();
887  sumw1[tower.index()]+=point.energy();
888 
889  for ( Int_t itow=0;itow<tower.numberOfNeighbors();itow++ )
890  {
891  StEEmcTower t=tower.neighbor(itow);
892  Int_t index=t.index();
893  sumw[index]+=point.energy();
894  }
895 
896  }
897 
900 
901  for ( UInt_t ipoint=0;ipoint<mPoints.size();ipoint++ )
902  {
903 
904  StEEmcPoint point=mPoints[ipoint]; // note reference
905  StEEmcTower tower = point.tower(0);
906  StEEmcTower pre1 = mEEanalysis->tower(tower.index(),1);
907  StEEmcTower pre2 = mEEanalysis->tower(tower.index(),2);
908  StEEmcTower post = mEEanalysis->tower(tower.index(),3);
909 
910  Float_t epoint = 0.;
911  Float_t epre1 = 0.;
912  Float_t epre2 = 0.;
913  Float_t epost = 0.;
914 
915  Int_t index = tower.index();
916  epoint += tower.energy() * point.energy() / sumw[index];
917  epre1 += pre1.energy() * point.energy() / sumw1[index];
918  epre2 += pre2.energy() * point.energy() / sumw1[index];
919  epost += post.energy() * point.energy() / sumw[index];
920 
921  for ( Int_t itow=0;itow<tower.numberOfNeighbors();itow++ )
922  {
923  StEEmcTower t=tower.neighbor(itow);
924 // StEEmcTower p=pre1.neighbor(itow);
925 // StEEmcTower q=pre2.neighbor(itow);
926  StEEmcTower r=post.neighbor(itow);
927 
928  index = t.index();
929  epoint += t.energy() * point.energy() / sumw[index];
930 // epre1 += p.energy() * point.energy() / sumw[index];
931 // epre2 += q.energy() * point.energy() / sumw[index];
932  epost += r.energy() * point.energy() / sumw[index];
933  }
934 
935  // point.energy( epoint );
936  mPoints[ipoint].energy(epoint);
937  mPoints[ipoint].energy(epre1,1);
938  mPoints[ipoint].energy(epre2,2);
939  mPoints[ipoint].energy(epost,3);
940 
941  }
942 
943 
944 }
945 
946 
StEEmcA2EMaker * mEEanalysis
ADC2E.
void cluster(const StEEmcSmdCluster &c, Int_t plane)
Add an smd cluster to this point.
Definition: StEEmcPoint.h:40
void shareEnergySmd()
Divide energy of eemc towers between identified smd points in proportion to the smd energy...
Int_t numberOfNeighbors() const
get the number of neighboring towers
Definition: StEEmcTower.h:54
EEmc ADC –&gt; energy maker.
Base class for representing EEMC points.
Definition: StEEmcPoint.h:24
void stat(unsigned s)
Set a status bit for this element.
Definition: StEEmcElement.h:23
Bool_t isNeighbor(const StEEmcTower &t) const
Definition: StEEmcTower.cxx:98
Float_t mEseen
Energy seen by the algorithm.
StEEmcTower & hittower(Int_t hit, Int_t layer)
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
Definition: StEEmcPoint.h:34
StEEmcPointVec_t mPoints
All fully reconstructed points.
Bool_t mFillStEvent
Option to fill StEvent.
void shareEnergySimple()
Divide energy of eemc towers between identified smd points (doesn&#39;t work as well as smd algo) ...
void neighbor(StEEmcTower *n)
add a tower to list of neighbors
Definition: StEEmcTower.h:52
void verifyStEvent()
Checks that StEvent is properly saved.
StEEmcPoint point(Int_t ipoint)
Return a specified point.
EEmcSmdMap * mEEmap
Tower to smd map.
StEEmcPointVec_t points()
Return vector of all points found in endcap.
Int_t Init()
Initialize.
void shareEnergy()
Divide energy of eemc towers between identified smd points using fit (doesn&#39;t work) ...
Class for building points from smd clusters.
Int_t numberOfHitTowers(Int_t layer) const
Int_t etabin() const
Returns the etabin of this tower, pre- or postshower element.
Definition: StEEmcTower.h:45
void fail(unsigned f)
Set a fail bit for this element.
Definition: StEEmcElement.h:25
StEEmcPointMaker(const Char_t *name)
std::map< StEmcPoint *, StEEmcPoint > mEtoEE
Map connecting StEEmcPoint to StEmcPoint.
void index(Int_t i)
Definition: StEEmcTower.cxx:76
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
StEEmcPointVec_t buildSmdPoints(Int_t sector, StEEmcSmdClusterVec_t &u, StEEmcSmdClusterVec_t &v)
build smd points and associations between smd points and clusters
Bool_t findPoints(Int_t sector, StEEmcSmdClusterVec_t u, StEEmcSmdClusterVec_t v, StEEmcPointVec_t &p)
find points in the endcap
StEEmcPointVec_t mSmdPoints
SMD only points.
void countRelatives()
Determine the number of points which share tower energy with another point.
Int_t key()
Return a unique key assigned by the cluster maker.
EEMC simple geometry.
Definition: Stypes.h:40
A base class for representing clusters of EEMC smd strips.
void removeCluster(StEEmcSmdClusterVec_t &clusters, Int_t key)
Remove a cluster from the list of clusters.
void tower(const StEEmcTower &t, Float_t w=1.)
Add a tower with specified weight to the point.
Definition: StEEmcPoint.h:38
Int_t phibin() const
Returns the phibin of this tower.
Definition: StEEmcTower.h:47
TVector3 getIntersection(Int_t iSec, Int_t iUStrip, Int_t iVStrip, const TVector3 &vertex) const
void position(const TVector3 &p)
Set the position of this point at the SMD plane.
Definition: StEEmcPoint.h:32
EEmcGeomSimple * mEEtow
Tower geometry.
StEEmcTower & tower(Int_t index, Int_t layer=0)
bool getTower(const TVector3 &r, int &sec, int &sub, int &etabin, Float_t &dphi, Float_t &deta) const
void Clear(Option_t *opts="")
Clear old points.
EEmcSmdGeom * mEEsmd
Smd geometry.
Int_t mLimit
How many iterations for the tower energy sharing mode.
void energy(Float_t e)
Set the energy (adc-ped+0.5)/gain for this element.
Definition: StEEmcElement.h:21
Float_t fracp2t(StEEmcPoint &p, StEEmcTower &t)
void fillStEvent()
Fills the StEmcPoint collection.
StEEmcClusterMaker * mEEclusters
Clusters.
Int_t Make()
Build points for this event.
Int_t mEnergyMode
Option for dividing energy.
StEEmcSmdClusterVec_t & smdclusters(Int_t sec, Int_t plane)
Return a vector of smd clusters.
A cluster maker for the EEMC.