#include <Pixel.h>
Public Member Functions | |
| Pixel () | |
| Pixel (int id) | |
| ~Pixel () | |
| int | GetId () |
| PixelSpot * | GetPixelSpot (int id, int create=1) |
| std::vector< int > | GetPixelSpotVector () |
| double | GetE () |
| double | GetStripE () |
| int | GetNStrips () |
| void | AddE (double ee) |
| void | TakeE (double ee) |
| void | AddStripE (double ee) |
| void | Dump () |
| void | SetPMT (PMT *pmt) |
| PMT * | GetPMT () |
| int | GetStatus () |
| void | SetStatus (int s) |
Public Attributes | |
| int | type |
| int | hopstomixed |
Static Public Attributes | |
| int | printit = -1 |
Private Attributes | |
| int | id |
| std::vector< PixelSpot > | pixelspots |
| double | e |
| double | stripE |
| PMT * | parentPMT |
| int | status |
|
|
Definition at line 9 of file Pixel.cxx. 00010 {
00011 id=-1;
00012 }
|
|
|
Definition at line 14 of file Pixel.cxx. References e, hopstomixed, MsgService::Instance(), MsgService::IsActive(), parentPMT, pixelspots, printit, status, stripE, and type. 00015 {
00016 if(printit<0)
00017 {
00018 if(MsgService::Instance()->IsActive("XTalkFilter",
00019 Msg::kDebug))printit=1;
00020 else printit=0;
00021 }
00022
00023 this->id=id;
00024 parentPMT=0;
00025 stripE=0;
00026 e=0;
00027 pixelspots.clear();
00028 status=0;
00029 type=-1;
00030 hopstomixed=-1;
00031 }
|
|
|
Definition at line 33 of file Pixel.cxx. 00033 {}
|
|
|
Definition at line 26 of file Pixel.h. Referenced by PixelSpot::AddE(), PixelSpot::AddStrip(), and PixelSpot::TakeE().
|
|
|
Definition at line 29 of file Pixel.h. Referenced by PixelSpot::AddE(), PixelSpot::AddStrip(), and PixelSpot::TakeE().
|
|
|
Definition at line 91 of file Pixel.cxx. References PixelSpot::Dump(), e, and pixelspots. Referenced by PMT::Dump(). 00092 {
00093 if(printit)printf("\t Pixel %d e %f\n",id,e);
00094 for(unsigned int i=0;i<pixelspots.size();i++)pixelspots[i].Dump();
00095 }
|
|
|
Definition at line 22 of file Pixel.h. Referenced by XTalkFilter::CleanXTalk(). 00022 {return e;};
|
|
|
Definition at line 16 of file Pixel.h. Referenced by XTalkFilter::CleanXTalk(), XTalkFilter::GetHops(), GetPixelSpotVector(), and XTalkFilter::SaveAdjustment(). 00016 {return id;};
|
|
|
Definition at line 97 of file Pixel.cxx. References PixelSpot::GetNStrips(), and pixelspots. 00098 {
00099 int n=0;
00100 for(unsigned int i=0;i<pixelspots.size();i++)
00101 n+=pixelspots[i].GetNStrips();
00102 return n;
00103 }
|
|
||||||||||||
|
Definition at line 67 of file Pixel.cxx. References pixelspots, and PixelSpot::SetPixel(). Referenced by XTalkFilter::CleanXTalk(), XTalkFilter::DoTrueFilter(), and XTalkFilter::SaveAdjustment(). 00068 {
00069 for(unsigned int i=0;i<pixelspots.size();i++)
00070 {
00071 if(pixelspots[i].GetId()==id)
00072 {
00073 // make sure the address is correct...somehow it can get shifted!
00074 pixelspots[i].SetPixel(this);
00075 return &(pixelspots[i]);
00076 }
00077 }
00078
00079 if(!create)return 0;
00080
00081 // if its not there... create it
00082 PixelSpot newpixelspot(id);
00083 newpixelspot.SetPixel(this);
00084
00085 // if(printit)printf("creating pixelspot id %d with pixel addr %p\n",id,this);
00086 pixelspots.push_back(newpixelspot);
00087 return & (pixelspots[pixelspots.size()-1]);
00088 }
|
|
|
Definition at line 35 of file Pixel.cxx. References GetId(), and pixelspots. Referenced by XTalkFilter::CleanXTalk(), and XTalkFilter::SaveAdjustment(). 00036 {
00037 std::vector<int> ps;
00038 for(unsigned int i=0;i<pixelspots.size();i++)
00039 ps.push_back(pixelspots[i].GetId());
00040 return ps;
00041 }
|
|
|
Definition at line 35 of file Pixel.h. Referenced by PixelSpot::AddE(), PixelSpot::AddStrip(), and PixelSpot::TakeE(). 00035 {return parentPMT;};
|
|
|
Definition at line 37 of file Pixel.h. Referenced by XTalkFilter::SaveAdjustment(). 00037 {return status;};
|
|
|
Definition at line 23 of file Pixel.h. Referenced by XTalkFilter::CleanXTalk(). 00023 {return stripE;};
|
|
|
Definition at line 34 of file Pixel.h. Referenced by PMT::GetPixel(). 00034 {parentPMT=pmt;};
|
|
|
Definition at line 38 of file Pixel.h. Referenced by PixelSpot::AddE(), and PixelSpot::TakeE(). 00038 {status=s;};
|
|
|
Definition at line 44 of file Pixel.cxx. References e, and pixelspots. Referenced by XTalkFilter::CleanXTalk(). 00045 {
00046
00047 // if(printit)printf("pixel take %f\n",ee);
00048 if(e<=0)return;
00049
00050 // take the energy from the spots as well by proportion
00051 // that they contribute
00052
00053 for(unsigned int i=0;i<pixelspots.size();i++)
00054 {
00055 if(e<1e-5)break; //already took the energy
00056 double totake = ee * pixelspots[i].GetE()/e;
00057 pixelspots[i].TakeE(totake);
00058 // if(printit)printf("call pixelspot take %f from %d\n",
00059 // totake,i);
00060 }
00061
00062 // if(ee<=e)e=0;
00063 // else e-=ee;
00064
00065 }
|
|
|
|
|
|
Definition at line 41 of file Pixel.h. Referenced by XTalkFilter::CleanXTalk(), and Pixel(). |
|
|
|
|
|
Definition at line 50 of file Pixel.h. Referenced by Pixel(). |
|
|
Definition at line 47 of file Pixel.h. Referenced by Dump(), GetNStrips(), GetPixelSpot(), GetPixelSpotVector(), Pixel(), and TakeE(). |
|
|
Definition at line 7 of file Pixel.cxx. Referenced by Pixel(). |
|
|
Definition at line 52 of file Pixel.h. Referenced by Pixel(). |
|
|
Definition at line 49 of file Pixel.h. Referenced by Pixel(). |
|
|
Definition at line 40 of file Pixel.h. Referenced by XTalkFilter::CleanXTalk(), XTalkFilter::GetHops(), and Pixel(). |
1.3.9.1