#include <ShareHolder.h>
Public Member Functions | |
| ShareHolder () | |
| ~ShareHolder () | |
| void | Insert (int chain, int chainhit, double e) |
| int | GetTotRemaining () |
| int | GetNumShared (int chain, int chainhit) |
| double | GetEShared (int chain, int chainhit) |
| void | Take (int chain, int chainhit, double e) |
| void | BulkInsert (std::vector< Particle3D * > &p3d) |
| void | Reset () |
| void | dump () |
Private Member Functions | |
| int | find (int chain, int chainhit) |
Private Attributes | |
| std::vector< hit > | hits |
|
|
Definition at line 9 of file ShareHolder.cxx. References hits. 00010 {
00011 hits.clear();
00012 }
|
|
|
Definition at line 14 of file ShareHolder.cxx. 00015 {
00016
00017 }
|
|
|
Definition at line 27 of file ShareHolder.cxx. References GetNumShared(), Insert(), and Reset(). 00028 {
00029 Reset();
00030
00031 for(unsigned int i=0;i<p3d.size();i++)
00032 for(int j=0;j<p3d[i]->entries;j++)
00033 Insert(p3d[i]->chain[j],p3d[i]->chainhit[j],p3d[i]->e[j]);
00034
00035 for(unsigned int i=0;i<p3d.size();i++)
00036 for(int j=0;j<p3d[i]->entries;j++)
00037 if(GetNumShared(p3d[i]->chain[j],p3d[i]->chainhit[j])>1)
00038 p3d[i]->SetShared(p3d[i]->chain[j],p3d[i]->chainhit[j]);
00039
00040
00041 }
|
|
|
Definition at line 120 of file ShareHolder.cxx. References hits. Referenced by Finder::RemoveSharedHits(). 00121 {
00122 return;
00123
00124 printf("\ndumping shareholder\n");
00125 for(int i=0;i<(int)hits.size();i++)
00126 printf("%d %d #%d e %f\n",hits[i].chain, hits[i].chainhit, hits[i].nshared,hits[i].e);
00127 printf("\n");
00128 }
|
|
||||||||||||
|
Definition at line 105 of file ShareHolder.cxx. References hits. Referenced by GetEShared(), GetNumShared(), Insert(), and Take(). 00106 {
00107 int idx=-1;
00108 for(int i=0;i<(int)hits.size();i++)
00109 if(hits[i].chain==chain && hits[i].chainhit==chainhit )
00110 {
00111 idx=i;
00112 break;
00113 }
00114
00115 return idx;
00116 }
|
|
||||||||||||
|
Definition at line 78 of file ShareHolder.cxx. References hit::e, find(), and hits. Referenced by Finder::RemoveSharedHits(). 00079 {
00080 int i=find(chain,chainhit);
00081 if(i>-1)
00082 return hits[i].e;
00083 else
00084 return 0;
00085 }
|
|
||||||||||||
|
Definition at line 69 of file ShareHolder.cxx. References find(), hits, and hit::nshared. Referenced by BulkInsert(), and Finder::RemoveSharedHits(). 00070 {
00071 int i=find(chain,chainhit);
00072 if(i>-1)
00073 return hits[i].nshared;
00074 else
00075 return 0;
00076 }
|
|
|
Definition at line 61 of file ShareHolder.cxx. References hits. Referenced by Finder::DumpParticle3D(). 00062 {
00063 int cnt=0;
00064 for(unsigned int i=0;i<hits.size();i++)
00065 if(hits[i].nshared>1)cnt++;
00066 return cnt;
00067 }
|
|
||||||||||||||||
|
Definition at line 44 of file ShareHolder.cxx. References hit::chain, hit::chainhit, hit::e, find(), hits, and hit::nshared. Referenced by BulkInsert(). 00045 {
00046 int i=find(chain,chainhit);
00047 if(i>-1)
00048 {
00049 //hits[i].e+=e;
00050 hits[i].nshared++;
00051 }else{
00052 hit h;
00053 h.e=e;
00054 h.chain=chain;
00055 h.chainhit=chainhit;
00056 h.nshared=1;
00057 hits.push_back(h);
00058 }
00059 }
|
|
|
Definition at line 21 of file ShareHolder.cxx. References hits. Referenced by BulkInsert(), and Finder::Reset(). 00022 {
00023 hits.clear();
00024 }
|
|
||||||||||||||||
|
Definition at line 87 of file ShareHolder.cxx. References hit::e, find(), hits, and hit::nshared. Referenced by Finder::RemoveSharedHits(), and Finder::StripMuon1(). 00088 {
00089
00090 //printf("taking hits from %d %d %f ",chain,chainhit,e);
00091
00092 int i=find(chain,chainhit);
00093 if(i>-1)
00094 {
00095
00096 hits[i].e-=e;
00097 hits[i].nshared--;
00098
00099 // printf(" now sharing %d\n",hits[i].nshared);
00100
00101 }
00102 }
|
|
|
Definition at line 41 of file ShareHolder.h. Referenced by dump(), find(), GetEShared(), GetNumShared(), GetTotRemaining(), Insert(), Reset(), ShareHolder(), and Take(). |
1.3.9.1