#include <PEGainMuxBox.h>
Public Member Functions | |
| PEGainMuxBox () | |
| virtual | ~PEGainMuxBox () |
| void | New (RawChannelId &rcid, PlexHandle &plex) |
| void | AddRealHit (const PulserSummary &ps, const RawChannelId &rcid) |
| void | AddOtherHit (const PulserSummary &ps, const RawChannelId &rcid) |
| TMultiGraph * | MakeGraphs (char *tag) |
Private Member Functions | |
| int | GetPixel (int channel) |
Private Attributes | |
| RawChannelId | fRcid |
| Int_t | fPlane |
| Int_t | fEnd |
| std::map< UInt_t, PulserSummary > | fRealHits |
| std::map< UInt_t, PulserSummary > | fOtherHits |
|
|
Definition at line 15 of file PEGainMuxBox.cxx. References MSG. 00016 {
00017
00018 MSG("PEGain",Msg::kVerbose) << "PEGainMuxBox::PEGainMuxBox()\n";
00019
00020 }
|
|
|
Definition at line 23 of file PEGainMuxBox.cxx. References MSG. 00024 {
00025
00026 MSG("PEGain",Msg::kVerbose) << "PEGainMuxBox::~PEGainMuxBox()\n";
00027
00028 }
|
|
||||||||||||
|
Definition at line 46 of file PEGainMuxBox.cxx. References fOtherHits, RawChannelId::GetEncoded(), and MSG. 00047 {
00048 MSG("PEGain",Msg::kVerbose) << "PEGainMuxBox::AddRealHit()\n";
00049 //Should be some sanity checking here.
00050 fOtherHits.insert(make_pair(rcid.GetEncoded(),ps));
00051 }
|
|
||||||||||||
|
Definition at line 39 of file PEGainMuxBox.cxx. References fRealHits, RawChannelId::GetEncoded(), and MSG. 00040 {
00041 MSG("PEGain",Msg::kVerbose) << "PEGainMuxBox::AddRealHit()\n";
00042 //Should be some sanity checking here.
00043 fRealHits.insert(make_pair(rcid.GetEncoded(),ps));
00044 }
|
|
|
Definition at line 53 of file PEGainMuxBox.cxx. Referenced by MakeGraphs(). 00053 {
00054 Int_t pixelnums[16]={15,1,16,2,11,5,12,6,7,9,8,10,3,14,4,13};
00055 if(channel<2 || channel>17) return -1;
00056 return pixelnums[channel-2];
00057
00058 }
|
|
|
Definition at line 60 of file PEGainMuxBox.cxx. References fEnd, fOtherHits, fPlane, fRealHits, PlexSEIdAltL::GetError(), and GetPixel(). 00060 {
00061 char name[180];
00062 // sprintf(name,"c%d_%d_%d_%d_%s",fRcid.GetCrate(),
00063 // fRcid.GetVarcId(),fRcid.GetVmm(),
00064 // fRcid.GetVaAdcSel(),tag);
00065 sprintf(name,"pl%d_end%d_%s",fPlane,fEnd,tag);
00066 TMultiGraph *mg = new TMultiGraph(name,name);
00067
00068 Int_t pmtNums[3]={0,2,1};
00069 Int_t numRealHits=fRealHits.size();
00070 Int_t numOtherHits=fOtherHits.size();
00071 Int_t uptoPoint=0;
00072 //cout << name << "\tReal: " << numRealHits
00073 // << "\tOther: " << numOtherHits << endl;
00074 if(numRealHits>0) {
00075 TGraphErrors *grReal = new TGraphErrors(numRealHits);
00076 for (std::map<UInt_t,PulserSummary>::iterator it =
00077 fRealHits.begin();
00078 it!=fRealHits.end(); it++) {
00079 RawChannelId rcid((*it).second.GetChannel());
00080 Int_t tempVaChip=rcid.GetVaChip();
00081 Int_t tempPmt=pmtNums[tempVaChip];
00082 Int_t tempVaChannel=rcid.GetVaChannel();
00083 Int_t tempPixel=GetPixel(tempVaChannel);
00084 Double_t x=(double)tempPixel+20*tempPmt;
00085 Double_t y=(*it).second.GetMean();
00086 Double_t ex=0;
00087 Double_t ey=(*it).second.GetError();
00088 grReal->SetPoint(uptoPoint,x,y);
00089 grReal->SetPointError(uptoPoint,ex,ey);
00090 uptoPoint++;
00091 }
00092 grReal->SetMarkerColor(kRed);
00093 sprintf(name,"real_pl%d_end%d_%s",fPlane,fEnd,tag);
00094 grReal->SetNameTitle(name,name);
00095 mg->Add(grReal,"p");
00096 }
00097
00098 if(numOtherHits>0) {
00099 TGraphErrors *grOther = new TGraphErrors(numOtherHits);
00100 uptoPoint=0;
00101 for (std::map<UInt_t,PulserSummary>::iterator it =
00102 fOtherHits.begin();
00103 it!=fOtherHits.end(); it++) {
00104 RawChannelId rcid((*it).second.GetChannel());
00105 Int_t tempVaChip=rcid.GetVaChip();
00106 Int_t tempPmt=pmtNums[tempVaChip];
00107 Int_t tempVaChannel=rcid.GetVaChannel();
00108 Int_t tempPixel=GetPixel(tempVaChannel);
00109 Double_t x=(double)tempPixel+20*tempPmt;
00110 Double_t y=(*it).second.GetMean();
00111 Double_t ex=0;
00112 Double_t ey=(*it).second.GetError();
00113 grOther->SetPoint(uptoPoint,x,y);
00114 grOther->SetPointError(uptoPoint,ex,ey);
00115 uptoPoint++;
00116 grOther->SetMarkerColor(kBlue);
00117 sprintf(name,"other_pl%d_end%d_%s",fPlane,fEnd,tag);
00118 grOther->SetNameTitle(name,name);
00119 mg->Add(grOther,"p");
00120
00121 }
00122 }
00123 return mg;
00124
00125 }
|
|
||||||||||||
|
Definition at line 31 of file PEGainMuxBox.cxx. References fEnd, fPlane, fRcid, PlexSEIdAltL::GetEnd(), PlexSEIdAltL::GetPlane(), PlexHandle::GetSEIdAltL(), and RawChannelId::SetVaChip(). 00031 {
00032 fRcid=rcid;
00033 fRcid.SetVaChip(0);
00034 fPlane=plex.GetSEIdAltL(rcid).GetPlane();
00035 fEnd=plex.GetSEIdAltL(rcid).GetEnd();
00036
00037 }
|
|
|
Definition at line 32 of file PEGainMuxBox.h. Referenced by MakeGraphs(), and New(). |
|
|
Definition at line 35 of file PEGainMuxBox.h. Referenced by AddOtherHit(), and MakeGraphs(). |
|
|
Definition at line 31 of file PEGainMuxBox.h. Referenced by MakeGraphs(), and New(). |
|
|
Definition at line 30 of file PEGainMuxBox.h. Referenced by New(). |
|
|
Definition at line 34 of file PEGainMuxBox.h. Referenced by AddRealHit(), and MakeGraphs(). |
1.3.9.1