StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcDisplay.cxx
1 #include "StEEmcDisplay.h"
2 
3 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
4 
5 #include "TH1F.h"
6 #include "TH2F.h"
7 #include "TMarker.h"
8 #include "TLine.h"
9 #include "TCanvas.h"
10 #include "TPaveText.h"
11 #include "TLatex.h"
12 
13 #include "StMessMgr.h"
14 
15 ClassImp(StEEmcDisplay);
16 
17 StEEmcDisplay::StEEmcDisplay( const Char_t *name, const Char_t *title ) : TNamed(name,title)
18 {
19  memset( mTowerEnergy, 0, sizeof(mTowerEnergy) );
20  memset( mTowerStat, 0, sizeof(mTowerStat) );
21  memset( mTowerFail, 0, sizeof(mTowerFail) );
22  memset( mStripEnergy, 0, sizeof(mStripEnergy) );
23  memset( mStripStat, 0, sizeof(mStripStat) );
24  memset( mStripFail, 0, sizeof(mStripFail) );
25  eemc=0;
26  smdu=0;
27  smdv=0;
28  pre1=0;
29  pre2=0;
30  post=0;
31  hTowers=0;
32  hPre1=0;
33  hPre2=0;
34  hPost=0;
35  geom = new EEmcGeomSimple();
36  mEnergy2Mip=1000.0/1.3;
37  nClustersU=0;
38  nClustersV=0;
39  nPoints=0;
40  nPi0=0;
41  nEta=0;
45 }
46 
48 {
49  //LOG_INFO<<GetName()<<"::clear() called"<<endm;
50  memset( mTowerEnergy, 0, sizeof(mTowerEnergy) );
51  memset( mTowerStat, 0, sizeof(mTowerStat) );
52  memset( mTowerFail, 0, sizeof(mTowerFail) );
53  memset( mStripEnergy, 0, sizeof(mStripEnergy) );
54  memset( mStripStat, 0, sizeof(mStripStat) );
55  memset( mStripFail, 0, sizeof(mStripFail) );
56 
60 
61  mClusterKey.clear();
62  mClusterEnergy.clear();
63  mClusterMean.clear();
64  mClusterSigma.clear();
65  mClusterSector.clear();
66  mClusterPlane.clear();
67  for ( UInt_t ii=0;ii<mClusterStrips.size();ii++) mClusterStrips[ii].clear();
68  mClusterStrips.clear();
69  mClusterHisto.clear();
70  mClusterStats.clear();
71  mClusterColor.clear();
72  mClusterFill.clear();
73  mClusterSplit.clear();
74 
75  mPointKey.clear();
76  mPointEnergy.clear();
77  mPointX.clear();
78  mPointY.clear();
79  mPointMarker.clear();
80  mPointColor.clear();
81  mPointStyle.clear();
82  mPointUkey.clear();
83  mPointVkey.clear();
84 
85  if (hTowers ) delete hTowers;
86  hTowers=0;
87 
88  if ( hPre1 ) delete hPre1;
89  hPre1=0;
90 
91  if ( hPre2 ) delete hPre2;
92  hPre2 = 0;
93 
94  if ( hPost) delete hPost;
95  hPost = 0;
96 
97  for ( Int_t sec=0;sec<12;sec++ )
98  for ( Int_t plane=0;plane<2;plane++ ){
99  if ( hSmds[sec][plane] ) delete hSmds[sec][plane];
100  hSmds[sec][plane]=0;
101  }
102  if (eemc) delete eemc; eemc=0;
103  if (smdu) delete smdu; smdu=0;
104  if (smdv) delete smdv; smdv=0;
105 
106  if (pre1) delete pre1; pre1=0;
107  if (pre2) delete pre2; pre2=0;
108  if (post) delete post; post=0;
109 
110  nClustersU=0;
111  nClustersV=0;
112  nPoints=0;
113  nPi0=0;
114  nEta=0;
115 
116 }
117 
119 {
120  Int_t sec = tower.sector();
121  Int_t sub = tower.subsector();
122  Int_t eta = tower.etabin();
123  Int_t layer=tower.layer();
124  if ( layer == 0 ){
125  mTowerEnergy[sec][sub][eta]=tower.energy();
126  mTowerStat[sec][sub][eta]=tower.stat();
127  mTowerFail[sec][sub][eta]=tower.fail();
128  }
129  else{
130  mPrepostEnergy[sec][sub][eta][layer-1]=tower.energy();
131  mPrepostStat[sec][sub][eta][layer-1]=tower.stat();
132  mPrepostFail[sec][sub][eta][layer-1]=tower.fail();
133  return;
134  }
135 
136  if ( tower.energy() > mHighTowerEnergy )
137  {
138  mHighTowerEtabin=eta;
139  mHighTowerPhibin=tower.phibin();
140  mHighTowerEnergy=tower.energy();
141  }
142 
143 }
144 
146 {
147  Int_t sec = strip.sector();
148  Int_t plane = strip.plane();
149  Int_t index=strip.index();
150  mStripEnergy[sec][plane][index]=strip.energy();
151  mStripStat[sec][plane][index]=strip.stat();
152  mStripFail[sec][plane][index]=strip.fail();
153 }
154 
155 void StEEmcDisplay::add( StEEmcSmdCluster cluster, Int_t color, Int_t fill )
156 {
157  mClusterKey.push_back( cluster.key() );
158  mClusterSector.push_back( cluster.sector() );
159  mClusterEnergy.push_back( cluster.energy() );
160  mClusterPlane.push_back( cluster.plane() );
161  std::vector< Int_t > strips;
162  for ( Int_t ii=0;ii<cluster.size();ii++ )
163  strips.push_back( cluster.strip(ii).index() );
164  mClusterStrips.push_back( strips );
165  mClusterColor.push_back( color );
166  mClusterFill.push_back( fill );
167  mClusterMean.push_back( cluster.mean() );
168  mClusterSigma.push_back( cluster.sigma() );
169  mClusterSplit.push_back( cluster.split() );
170  if ( cluster.plane()==0 ) nClustersU++;
171  if ( cluster.plane()==1 ) nClustersV++;
172 }
173 
174 void StEEmcDisplay::add( StEEmcPoint point, Int_t color, Int_t style )
175 {
176  mPointKey.push_back( point.key() );
177  mPointEnergy.push_back( point.energy() );
178  TVector3 position=point.position();
179  mPointX.push_back( position.X() );
180  mPointY.push_back( position.Y() );
181  mPointColor.push_back( color );
182  mPointStyle.push_back( style );
183  mPointUkey.push_back( point.cluster(0).key() );
184  mPointVkey.push_back( point.cluster(1).key() );
185  nPoints++;
186 }
187 
188 // ----------------------------------------------------------------------------
189 
190 TH2F *StEEmcDisplay::DrawTowers(Option_t *opts)
191 {
192 
193  // generate canvas to display EEMC tower information
194  if ( !eemc ) {
195  eemc=new TCanvas(TString("eemc-")+GetName(),GetTitle(),600,400);
196  eemc->cd();
197  }
198  // draw and return if it already exists
199  if ( hTowers ) {
200  hTowers -> Draw(opts);
201  return hTowers;
202  }
203 
204  // create new histogram and fill it
205  hTowers = new TH2F(TString("hTowers-")+GetName(),GetTitle(),62,-1.,61.,12,0.,12.);
206 
207  // loop over all towers and set energy
208  for ( Int_t sec=0;sec<kEEmcNumSectors;sec++ )
209  for ( Int_t sub=0;sub<kEEmcNumSubSectors;sub++ )
210  for ( Int_t eta=0;eta<kEEmcNumEtas;eta++ )
211  {
212 
213  Float_t x = 5*sec+sub; x+=0.5;
214  Float_t y = eta; y+=0.5;
215  Int_t bin = hTowers->FindBin ( x, y );
216 
217  if ( !mTowerFail[sec][sub][eta] )
218  hTowers->SetBinContent( bin, mTowerEnergy[sec][sub][eta] );
219  else {
220  failTower(sec,sub,eta, hTowers);
221  /* nada */
222  };
223 
224  // wrap right hand edge
225  if ( sec==11 && sub==4 )
226  {
227  x=-0.5;
228  bin = hTowers->FindBin ( x, y );
229 
230  if ( !mTowerFail[sec][sub][eta] )
231  hTowers->SetBinContent( bin, mTowerEnergy[sec][sub][eta] );
232  else
233  failTower(0,-1,eta,hTowers);
234 
235  }
236 
237  // wrap left hand edge
238  if ( sec==0 && sub==0 )
239  {
240  x=60.5;
241  bin = hTowers->FindBin ( x, y );
242  if ( !mTowerFail[sec][sub][eta] )
243  hTowers->SetBinContent( bin, mTowerEnergy[sec][sub][eta] );
244  else
245  failTower(12,5,eta,hTowers);
246  }
247 
248  }
249 
250  // define sector boundaries and set initial boundary
251  for ( Float_t x=0.0; x<=60.0; x+=5.0 ) {
252  hTowers->GetListOfFunctions()->Add( new TLine( x, 0., x, 12.0 ) );
253  }
254  hTowers->GetXaxis()->SetRangeUser(0.,59.9);
255 
256  hTowers->Draw(opts);
257  return hTowers;
258 
259 }
260 
261 
262 
263 
264 
265 
266 TH2F *StEEmcDisplay::DrawLayer(Int_t layer, Option_t *opts)
267 {
268 
269 
270  if ( layer==0 ) return DrawTowers(opts);
271  if ( layer > 3 ) {
272  LOG_WARN<<" Invalid layer passed to DrawLayer(...)"<<endm;
273  return 0;
274  }
275 
276  TCanvas *mycanvas = 0;//can[layer];
277 
278  if ( layer==1 )
279  mycanvas=pre1;
280  if ( layer==2 )
281  mycanvas=pre2;
282  if ( layer==3 )
283  mycanvas=post;
284 
285  const Char_t *cnames[]={"eemc","pre1","pre2","post"};
286  TH2F *his[]={hTowers,hPre1,hPre2,hPost};
287  TH2F *myhist=his[layer];
288  const Char_t *hnames[]={"hTowers","hPre1","hPre2","hPost"};
289 
290  // generate canvas to display EEMC tower information
291  if ( !mycanvas ) {
292  mycanvas=new TCanvas(TString(cnames[layer])+GetName(),GetTitle(),600,400);
293  mycanvas->cd();
294  if ( layer==1 )pre1=mycanvas;
295  if ( layer==2 )pre2=mycanvas;
296  if ( layer==3 )post=mycanvas;
297  }
298 
299 
300  // draw and return if it already exists
301  if ( myhist ) {
302  myhist -> Draw(opts);
303  return myhist;
304  }
305 
306 
307  const Char_t *titles[]={"Towers: ","Preshower 1: ", "Preshower 2: ", "Postshower: "};
308 
309  // create new histogram and fill it
310  myhist = new TH2F(TString(hnames[layer])+GetName(),TString(titles[layer])+GetTitle(),62,-1.,61.,12,0.,12.);
311  assert(myhist);
312 
313  // loop over all towers and set energy
314  for ( Int_t sec=0;sec<kEEmcNumSectors;sec++ )
315  for ( Int_t sub=0;sub<kEEmcNumSubSectors;sub++ )
316  for ( Int_t eta=0;eta<kEEmcNumEtas;eta++ )
317  {
318 
319  Float_t x = 5*sec+sub; x+=0.5;
320  Float_t y = eta; y+=0.5;
321  Int_t bin = myhist->FindBin ( x, y );
322 
323  if ( !mPrepostFail[sec][sub][eta][layer-1] )
324  myhist->SetBinContent( bin,1000.* mPrepostEnergy[sec][sub][eta][layer-1] );
325  else {
326  failTower(sec,sub,eta, myhist);
327  /* nada */
328  };
329 
330  // wrap right hand edge
331  if ( sec==11 && sub==4 )
332  {
333  x=-0.5;
334  bin = myhist->FindBin ( x, y );
335 
336  if ( !mPrepostFail[sec][sub][eta][layer-1] )
337  myhist->SetBinContent( bin, 1000.* mPrepostEnergy[sec][sub][eta][layer-1] );
338  else
339  failTower(0,-1,eta,myhist);
340 
341  }
342 
343  // wrap left hand edge
344  if ( sec==0 && sub==0 )
345  {
346  x=60.5;
347  bin = myhist->FindBin ( x, y );
348  if ( !mPrepostFail[sec][sub][eta][layer-1] )
349  myhist->SetBinContent( bin, 1000.*mPrepostEnergy[sec][sub][eta][layer-1] );
350  else
351  failTower(12,5,eta,myhist);
352  }
353 
354  }
355 
356  // define sector boundaries and set initial boundary
357  for ( Float_t x=0.0; x<=60.0; x+=5.0 ) {
358  myhist->GetListOfFunctions()->Add( new TLine( x, 0., x, 12.0 ) );
359  }
360  myhist->GetXaxis()->SetRangeUser(0.,59.9);
361 
362  myhist->Draw(opts);
363  return myhist;
364 
365 }
366 
367 
368 
369 
370 
371 
372 TH2F *StEEmcDisplay::DrawPoints( Option_t *opts )
373 {
374 
375  TH2F *towers = DrawTowers();
376 
377  if ( !mPointMarker.size() )
378  for ( UInt_t ii=0;ii<mPointKey.size();ii++ )
379  {
380 
381  Float_t x=mPointX[ii];
382  Float_t y=mPointY[ii];
383  TVector3 position(x,y,kEEmcZSMD);
384 
385  Int_t sec,sub,eta;
386  Float_t dphi,deta;
387  if ( !geom->getTower( position, sec, sub, eta, dphi, deta ) ){
388  //LOG_WARN<<"************* tried to add point which missed endcap *************"<<endm;
389  position.Print();
390  return towers;
391  }
392  Float_t myphi = 0.5 + 5*sec + ((Float_t)sub) + 0.5*dphi;
393  Float_t myeta = 0.5 + ((Float_t)eta) + 0.5*deta;
394 
395  TMarker *m=new TMarker( myphi, myeta, mPointStyle[ii] );
396  m->SetMarkerColor( mPointColor[ii] );
397  mPointMarker.push_back(m);
398 
399  TLatex *tex=new TLatex( myphi+0.05, myeta, Form("uid=%i vid=%i",mPointUkey[ii],mPointVkey[ii]) );
400  tex->SetTextColor( mPointColor[ii] );
401  towers->GetListOfFunctions()->Add(tex);
402 
403  }
404 
405  for ( UInt_t ii=0;ii<mPointMarker.size();ii++ )
406  {
407  mPointMarker[ii]->Draw();
408  }
409 
410  return towers;
411 
412 
413 }
414 
415 
416 // ----------------------------------------------------------------------------
417 
418 TH1F *StEEmcDisplay::DrawSmd( Int_t sector, Int_t plane, Option_t *opts )
419 {
420 
421  const Char_t *name_planes[]={"smdu","smdv"};
422  const Char_t *name_uv[]={"U","V"};
423 
424  // generate canvas to draw smd information
425  TCanvas *mycanvas = (plane==0)? smdu : smdv;
426  if ( !mycanvas )
427  {
428  mycanvas = new TCanvas(TString(name_planes[plane])+"-"+GetName(),GetTitle(),600,400);
429  if ( plane==0 ) smdu=mycanvas; else smdv=mycanvas;
430  }
431  mycanvas->cd();
432 
433 
434  // draw histogram and exit if it exists
435  if ( hSmds[sector][plane] )
436  {
437  hSmds[sector][plane]->Draw(opts);
438  return hSmds[sector][plane];
439  }
440 
441 
442  // create histogram
443  TString hname="h";
444  if ( sector+1<10 ) hname+="0";
445  hname+=(sector+1);
446  hname+=name_uv[plane];
447  hname+="::";
448  hname+=GetName();
449  TH1F *histo=new TH1F(hname,TString(GetTitle())+";index;Nmips",288,0.,288.);
450  hSmds[sector][plane]=histo;
451 
452  for ( Int_t strip=0;strip<kEEmcNumStrips;strip++ )
453  {
454  Float_t energy = mStripEnergy[sector][plane][strip];
455  if ( !mStripFail[sector][plane][strip] )
456  histo->SetBinContent( strip+1, energy*mEnergy2Mip );
457  else { /* nada */ }
458  }
459 
460  hSmds[sector][plane]->Draw(opts);
461 
462  return hSmds[sector][plane];
463 
464 }
465 
466 // ----------------------------------------------------------------------------
467 
468 TH1F *StEEmcDisplay::DrawClusters( Int_t sector, Int_t plane, Option_t *opts )
469 {
470 
471  Bool_t draw_stats = false;
472  TString myopts=opts;
473  if ( myopts.Contains("stats") )
474  {
475  myopts.ReplaceAll("stats","");
476  opts=myopts.Data();
477  draw_stats=true;
478  }
479 
480  TH1F *hsmd = DrawSmd(sector, plane, opts );
481 
482  for ( UInt_t ii=0;ii<mClusterKey.size();ii++ )
483  {
484  if ( sector == mClusterSector[ii] &&
485  plane == mClusterPlane[ii] )
486  {
487  DrawCluster(ii,"same");
488  }
489  }
490 
491 
492  if ( draw_stats )
493  for ( UInt_t ii=0;ii<mClusterKey.size();ii++ )
494  {
495  if ( sector == mClusterSector[ii] &&
496  plane == mClusterPlane[ii] )
497  {
498 
499  Int_t key = mClusterKey[ii];
500  Float_t energy = mClusterEnergy[ii];
501  Float_t nmips = energy * mEnergy2Mip;
502  Float_t mean = mClusterMean[ii];
503  Float_t sigma = mClusterSigma[ii];
504  Int_t sector = mClusterSector[ii];
505  Int_t plane = mClusterPlane[ii];
506  Int_t color = mClusterColor[ii];
507  Int_t fill = mClusterFill[ii];
508  TCanvas *c = (plane==0)? smdu : smdv;
509  c->cd();
510 
511  Int_t imean=(Int_t)mean;
512  Float_t Iright = hSmds[sector][plane]->Integral( imean+6,imean+10 );
513  Float_t Ileft = hSmds[sector][plane]->Integral( imean-10, imean-6);
514 
515  Float_t xpave = mean + 6.0;
516  Float_t ypave = hSmds[sector][plane]->GetBinContent(imean+1);
517  if ( Iright > 0.4 * nmips && Ileft < 0.4 * nmips )
518  {
519  xpave = mean - 25.0;
520  }
521 
522  TPaveText *text=new TPaveText( xpave, ypave*0.7, xpave+20, ypave );
523  text->SetFillColor( color );
524  text->SetFillStyle( fill );
525  text->AddText(Form("cluster id = %i",key));
526  text->AddText(Form("energy = %5.2f MeV",energy*1000.0));
527  text->AddText(Form("mean = %5.1f", mean));
528  text->AddText(Form("sigma = %5.3f", sigma));
529  if ( mClusterSplit[ii] )
530  text->AddText(Form("split cluster"));
531  // mClusterStats.push_back(text);
532  // text->Draw("same");
533  hsmd->GetListOfFunctions()->Add( text );
534  text->Draw();
535 
536  }
537  }
538 
539 
540  return hsmd;
541 
542 }
543 
544 // ----------------------------------------------------------------------------
545 
546 
547 TH1F *StEEmcDisplay::DrawCluster( Int_t icluster, Option_t *opts )
548 {
549 
550  //Int_t sector = mClusterSector[ icluster ];
551  Int_t plane = mClusterPlane [ icluster ];
552 
553  assert( (plane==0)?smdu:smdv );
554 
555  if ( plane==0 ) smdu->cd();
556  if ( plane==1 ) smdv->cd();
557 
558  // if cluster histograms are available then draw the specified histogram
559  // and return
560  if ( mClusterHisto.size() )
561  {
562  mClusterHisto[ icluster ]->Draw(opts);
563  return mClusterHisto[icluster];
564  }
565 
566  // create cluster histograms
567  const Char_t *name_uv[]={"U","V"};
568  for ( UInt_t ii=0;ii<mClusterKey.size();ii++ )
569  {
570 
571  Int_t sector = mClusterSector[ ii ];
572  Int_t plane = mClusterPlane[ ii ];
573  TString UV=name_uv[plane];
574 
575  LOG_INFO <<"+ cluster "
576  << ( (sector<9)?"0":"" )
577  << (sector+1)
578  << UV
579  << " key=" << mClusterKey[ii]
580  << " col=" << mClusterColor[ii]
581  << " fill="<< mClusterFill[ii]
582  << endm;
583 
584  TString hname="h";
585  if ( sector+1<10 ) hname+="0";
586  hname+=(sector+1);
587  hname+=name_uv[plane];
588  hname+="key";
589  hname+=mClusterKey[ii];
590  hname+="::";
591  hname+=GetName();
592  hname+=ii;
593 
594  TH1F *histo = new TH1F(hname,GetTitle(),kEEmcNumStrips,0.,(Float_t)kEEmcNumStrips);
595  //LOG_INFO<<"sec=" << sector<<" pl="<<plane<<" nstrips="<< mClusterStrips[ii].size()<<endm;
596  for ( UInt_t jj=0;jj<mClusterStrips[ii].size();jj++ )
597  {
598  Int_t index=mClusterStrips[ii][jj];
599  Float_t energy = mStripEnergy[ sector ][ plane ][ index ];
600  histo->SetBinContent( index+1, energy*mEnergy2Mip );
601  }
602 
603  histo->SetFillColor( mClusterColor[ii] );
604  histo->SetFillStyle( mClusterFill[ii] );
605 
606  mClusterHisto.push_back( histo );
607 
608  }
609 
610 
611  mClusterHisto[icluster]->Draw(opts);
612 
613  return mClusterHisto[icluster];
614 
615 
616 }
617 
618 // ----------------------------------------------------------------------------
619 void StEEmcDisplay::failTower( Int_t sec, Int_t sub, Int_t eta, TH2F *histo )
620 {
621  Float_t x1=5*sec+sub;
622  Float_t x2=x1+1.0;
623  Float_t y1=eta;
624  Float_t y2=eta+1;
625  TLine *l1=new TLine(x1,y1,x2,y2);l1->SetLineColor(2);
626  TLine *l2=new TLine(x2,y1,x1,y2);l2->SetLineColor(2);
627  histo->GetListOfFunctions()->Add(l1);
628  histo->GetListOfFunctions()->Add(l2);
629 }
630 
631 // ----------------------------------------------------------------------------
632 Float_t StEEmcDisplay::sumEnergy(Int_t layer)
633 {
634 
635  if ( layer > 3 ) {
636  LOG_WARN<<" sumEnergy not yet implemented for SMD'ss"<<endm;
637  return -1.0;
638  }
639 
640  Float_t sum = 0.;
641  for ( Int_t sec=0;sec<12;sec++ )
642  for ( Int_t sub=0;sub<5;sub++ )
643  for ( Int_t eta=0;eta<12;eta++ )
644  {
645  if ( layer==0 ) {
646  sum += mTowerEnergy[sec][sub][eta];
647  }
648  else {
649  sum += mPrepostEnergy[sec][sub][eta][layer-1];
650  }
651  }
652 
653  if ( layer > 0 ) sum *= 1000.0;
654  return sum;
655 
656 }
657 
658 Int_t StEEmcDisplay::hitMultiplicity(Int_t layer, Float_t threshold)
659 {
660 
661  if ( layer > 3 ) {
662  LOG_WARN<<" sumEnergy not yet implemented for SMD'ss"<<endm;
663  return -1;
664  }
665 
666  Int_t sum = 0;
667  for ( Int_t sec=0;sec<12;sec++ )
668  for ( Int_t sub=0;sub<5;sub++ )
669  for ( Int_t eta=0;eta<12;eta++ )
670  {
671  if ( layer==0 ) {
672  if ( mTowerEnergy[sec][sub][eta] > threshold ) sum++;
673  }
674  else {
675  if ( mPrepostEnergy[sec][sub][eta][layer-1] *1000.0 > threshold ) sum++;
676  }
677  }
678 
679  return sum;
680 
681 }
void clear()
clears all storage arrays, deletes all canvases and histograms
void cluster(const StEEmcSmdCluster &c, Int_t plane)
Add an smd cluster to this point.
Definition: StEEmcPoint.h:40
TH1F * DrawClusters(Int_t sector, Int_t plane, Option_t *opts="")
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
Int_t mHighTowerEtabin
Definition: StEEmcDisplay.h:68
void layer(Int_t l)
Sets the layer, [0-4]=[TPQR].
Definition: StEEmcTower.h:31
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
Definition: StEEmcPoint.h:34
TH2F * DrawPoints(Option_t *opts="box")
Float_t sumEnergy(Int_t layer)
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
Int_t subsector() const
Returns subsector of this tower, pre- or postshower element.
Definition: StEEmcTower.h:43
Int_t mHighTowerPhibin
Definition: StEEmcDisplay.h:67
void index(Int_t i)
Sets the index for this SMD strip, 0..287.
Definition: StEEmcStrip.cxx:32
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
void add(StEEmcTower tower)
Add a tower to the display.
Int_t sector() const
Returns sector of this tower, pre- or postshower element.
Definition: StEEmcTower.h:41
TH2F * DrawTowers(Option_t *opts="box,text")
Float_t mHighTowerEnergy
Definition: StEEmcDisplay.h:69
Int_t key()
Return a unique key assigned by the cluster maker.
EEMC simple geometry.
TH2F * DrawLayer(Int_t layer, Option_t *opts="box,text")
A base class for representing clusters of EEMC smd strips.
TH1F * DrawCluster(Int_t cluster, Option_t *opts="")
Int_t phibin() const
Returns the phibin of this tower.
Definition: StEEmcTower.h:47
TH1F * DrawSmd(Int_t sector, Int_t plane, Option_t *opts="")
void position(const TVector3 &p)
Set the position of this point at the SMD plane.
Definition: StEEmcPoint.h:32
void plane(Int_t p)
Sets the plane for this SMD strip, 0=U, 1=V.
Definition: StEEmcStrip.h:19
bool getTower(const TVector3 &r, int &sec, int &sub, int &etabin, Float_t &dphi, Float_t &deta) const
void sector(Int_t s)
Sets the sector for this SMD strip.
Definition: StEEmcStrip.h:17
void energy(Float_t e)
Set the energy (adc-ped+0.5)/gain for this element.
Definition: StEEmcElement.h:21
StEEmcStrip & strip(Int_t s)
Returns the specified smd strip w/in the cluster.
Base class for describing an endcap SMD strip.
Definition: StEEmcStrip.h:8
Int_t hitMultiplicity(Int_t layer, Float_t threshold=0.0)
Returns the number of hit elements in the spcified layer above threshold.