#include <TridModel.h>
Inheritance diagram for TridModel:

Public Member Functions | |
| TridModel () | |
| virtual | ~TridModel () |
| virtual Int_t | GetSortKey () const |
| virtual void | SetSortKey (Int_t i) |
| Int_t | GetId () const |
| virtual void | AddStrip (Int_t stripid, const VldContext &cx, const NtpSRStrip *stripobj, StripEnd::StripEnd_t ends=StripEnd::kWhole) |
| virtual void | AddDigit (CandDigitHandle cdh) |
| virtual void | AddCandidate (const CandHandle &handle) |
| virtual Int_t | GetSlice () const |
| virtual Int_t | GetEvent () const |
| virtual Double_t | GetTotalCharge (CalStripType::CalStripType_t t=CalStripType::kPE) const |
| virtual Double_t | GetMeanTime (CalTimeType::CalTimeType_t t=CalTimeType::kT0) const |
| virtual Double_t | GetEarliestTime (CalTimeType::CalTimeType_t t=CalTimeType::kT0) const |
| virtual Double_t | GetLatestTime (CalTimeType::CalTimeType_t t=CalTimeType::kT0) const |
| virtual Int_t | GetDigits () const |
| virtual Int_t | GetStrips () const |
| virtual Int_t | GetStripEnds () const |
| virtual Int_t | GetOccupancy () const |
| virtual void | PrintToDigitText (DigitText *dt) const |
| virtual void | Print (std::ostream &os=std::cout) const |
| virtual Bool_t | Intersects (const TridModel *other) const |
| virtual void | AddFromModel (const TridModel *other) |
Public Attributes | |
| Int_t | fSlice |
| Int_t | fEvent |
| Int_t | fNDigits |
| Int_t | fNStrips |
| std::vector< Double_t > | fTotalCharge |
| std::vector< Double_t > | fTotalTime |
| Int_t | fTimes |
| std::vector< Double_t > | fEarliestTime |
| std::vector< Double_t > | fLatestTime |
Private Types | |
| typedef std::set< PlexStripEndId > | StripEndList_t |
| typedef std::set< Int_t > | CompList_t |
Private Attributes | |
| Int_t | fSortKey |
| Int_t | fId |
| StripEndList_t | fStripEnds |
| UInt_t | fNStripEnds |
| CompList_t | fCompList |
| UInt_t | fNComps |
Static Private Attributes | |
| Int_t | fsIdCounter = 1 |
|
|
Definition at line 73 of file TridModel.h. |
|
|
Definition at line 69 of file TridModel.h. |
|
|
Definition at line 15 of file TridModel.cxx. 00015 : 00016 fId(fsIdCounter++), 00017 fNStripEnds(0), 00018 fNComps(0), 00019 fSlice(-1), 00020 fEvent(-1), 00021 fNDigits(0), 00022 fNStrips(0), 00023 fTotalCharge(CalStripType::kGeV+1,0), 00024 fTotalTime(CalTimeType::kT0+1,0), 00025 fEarliestTime(CalTimeType::kT0+1,99e9), 00026 fLatestTime(CalTimeType::kT0+1,-99e9) 00027 { 00028 }
|
|
|
Definition at line 21 of file TridModel.h. 00021 {};
|
|
|
Definition at line 118 of file TridModel.cxx. References AddDigit(), and CandHandle::GetDaughterIterator(). Referenced by TridModelMaker::CreateShowerModels(), and TridModelMaker::CreateTrackModels(). 00119 {
00120 // Is it a digit itself?
00121 const CandDigitHandle* cdh = dynamic_cast<const CandDigitHandle*>(&handle);
00122 if(cdh) {
00123 this->AddDigit(*cdh);
00124 return;
00125 }
00126
00127 // If not, burrow down looking for digits.
00128 TIter it = handle.GetDaughterIterator();
00129 TObject* obj;
00130 while( (obj=it.Next()) ) {
00131 const CandHandle* newHandle = dynamic_cast<const CandHandle*>(obj);
00132 if(newHandle)
00133 AddCandidate(*newHandle);
00134 };
00135 }
|
|
|
|
Definition at line 203 of file TridModel.cxx. References fCompList, fEarliestTime, fLatestTime, fNComps, fNStripEnds, fStripEnds, fTimes, fTotalCharge, and fTotalTime. Referenced by TridModelIntersect::TridModelIntersect(). 00204 {
00205 if(!other) return;
00206 for(int i=0;i<CalStripType::kGeV+1;i++) {
00207 fTotalCharge[i] += other->fTotalCharge[i];
00208 }
00209
00210 for(int i=0;i<CalTimeType::kT0+1;i++) {
00211 if(other->fEarliestTime[i] < fEarliestTime[i]) fEarliestTime[i]= other->fEarliestTime[i];
00212 if(other->fLatestTime[i] > fLatestTime[i] ) fLatestTime[i] = other->fLatestTime[i];
00213
00214 fTotalTime[i] += other->fTotalTime[i];
00215 }
00216 fTimes += other->fTimes;
00217
00218
00219 fCompList.insert(other->fCompList.begin(),other->fCompList.end());
00220 fNComps = fCompList.size();
00221
00222 fStripEnds.insert(other->fStripEnds.begin(),other->fStripEnds.end());
00223 fNStripEnds = fStripEnds.size();
00224 }
|
|
||||||||||||||||||||
|
Reimplemented in TridModelStrip. Definition at line 30 of file TridModel.cxx. References det, fCompList, fEarliestTime, fLatestTime, fNComps, fNStrips, fStripEnds, fTimes, fTotalCharge, fTotalTime, VldContext::GetDetector(), VldTimeStamp::GetNanoSec(), VldContext::GetTimeStamp(), NtpSRPulseHeight::pe, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRStrip::plane, NtpSRPulseHeight::raw, NtpSRPulseHeight::sigcor, NtpSRPulseHeight::siglin, NtpSRStrip::strip, NtpSRStrip::time0, and NtpSRStrip::time1. Referenced by TridModelStrip::AddStrip(), TridModelMaker::CreateChannelModels(), TridModelMaker::CreatePmtModels(), TridModelMaker::CreateShowerModels(), TridModelMaker::CreateSliceModels(), and TridModelMaker::CreateTrackModels(). 00034 {
00035 fCompList.insert(stripid);
00036 fNComps+=1;
00037
00038 fNStrips+=1;
00039
00040 Detector::Detector_t det = cx.GetDetector();
00041 double snarlt0 = cx.GetTimeStamp().GetNanoSec() * 1e-9;
00042
00043 if(stripobj) {
00044 PlexStripEndId seid(det, stripobj->plane, stripobj->strip, end);
00045 if(end & StripEnd::kNegative) {
00046 seid.SetEnd(StripEnd::kNegative);
00047 fStripEnds.insert(seid);
00048
00049 if(stripobj->ph0.raw>0) {
00050 double time0 = stripobj->time0 - snarlt0;
00051 fTotalTime[CalTimeType::kT0] += time0;
00052 fTotalTime[CalTimeType::kNone] += time0;
00053 fTimes++;
00054 if(stripobj->time0 < fEarliestTime[CalTimeType::kT0])
00055 fEarliestTime[CalTimeType::kT0] = time0;
00056 if(stripobj->time0 < fEarliestTime[CalTimeType::kNone])
00057 fEarliestTime[CalTimeType::kNone] = time0;
00058 if(stripobj->time0 > fLatestTime[CalTimeType::kT0])
00059 fLatestTime[CalTimeType::kT0] = time0;
00060 if(stripobj->time0 > fLatestTime[CalTimeType::kNone])
00061 fLatestTime[CalTimeType::kNone] = time0;
00062 }
00063
00064 fTotalCharge[CalStripType::kNone] += stripobj->ph0.raw;
00065 fTotalCharge[CalStripType::kSigLin] += stripobj->ph0.siglin;
00066 fTotalCharge[CalStripType::kSigCorr] += stripobj->ph0.sigcor;
00067 fTotalCharge[CalStripType::kPE] += stripobj->ph0.pe;
00068 }
00069
00070 if(end & StripEnd::kPositive) {
00071 seid.SetEnd(StripEnd::kPositive);
00072 fStripEnds.insert(seid);
00073
00074 if(stripobj->ph1.raw>0) {
00075 double time1 = stripobj->time1 - snarlt0;
00076 fTotalTime[CalTimeType::kT0] += time1;
00077 fTotalTime[CalTimeType::kNone] += time1;
00078 fTimes++;
00079 if(stripobj->time1 < fEarliestTime[CalTimeType::kT0])
00080 fEarliestTime[CalTimeType::kT0] = time1;
00081 if(stripobj->time1 < fEarliestTime[CalTimeType::kNone])
00082 fEarliestTime[CalTimeType::kNone] = time1;
00083 if(stripobj->time1 > fLatestTime[CalTimeType::kT0])
00084 fLatestTime[CalTimeType::kT0] = time1;
00085 if(stripobj->time1 > fLatestTime[CalTimeType::kNone])
00086 fLatestTime[CalTimeType::kNone] = time1;
00087 }
00088 fTotalCharge[CalStripType::kNone] += stripobj->ph1.raw;
00089 fTotalCharge[CalStripType::kSigLin] += stripobj->ph1.siglin;
00090 fTotalCharge[CalStripType::kSigCorr] += stripobj->ph1.sigcor;
00091 fTotalCharge[CalStripType::kPE] += stripobj->ph1.pe;
00092 }
00093 }
00094 }
|
|
|
Definition at line 51 of file TridModel.h. Referenced by TridModelCrate::Print(), and Print(). 00051 { return fNDigits; };
|
|
|
Definition at line 45 of file TridModel.h. Referenced by TridPmtPage::CreateSketches(), TridPageSlice::CreateSketches(), TridCratePage::CreateSketches(), TridControl::GetRangedModelColor(), and Print(). 00046 { return fEarliestTime[t]; }
|
|
|
Definition at line 37 of file TridModel.h. Referenced by Print(). 00037 { return fSlice; };
|
|
|
Definition at line 24 of file TridModel.h. Referenced by TridModelMaker::CreateIntersectionModels(), TridPageDetector::CreateSketches(), TridModelMaker::CreateStripModels(), TridPageSlice::ModifySketches(), and TridPageDetector::ModifySketches(). 00024 { return fId; };
|
|
|
Definition at line 48 of file TridModel.h. Referenced by TridPageSlice::CreateSketches(), and Print(). 00049 { return fLatestTime[t]; }
|
|
|
Definition at line 42 of file TridModel.h. Referenced by TridModelMaker::CreateIntersectionModels(), TridUVPage::CreateSketches(), TridPageDetector::CreateSketches(), TridModelMaker::CreateSliceModels(), TridControl::GetRangedModelColor(), TridControl::GetRangedModelTrans(), and Print(). 00043 { if(fTimes) return fTotalTime[t]/fTimes; return -99e9; }
|
|
|
Definition at line 54 of file TridModel.h. Referenced by TridCratePage::CreateSketches(), and TridControl::GetRangedModelColor(). 00054 { return GetDigits(); };
|
|
|
Definition at line 36 of file TridModel.h. Referenced by TridPageSlice::ModifySketches(), and Print(). 00036 { return fSlice; };
|
|
|
Definition at line 22 of file TridModel.h. Referenced by TridModelList::AddModel(), TridModelMaker::CreateChannelModels(), TridModelMaker::CreateIntersectionModels(), TridModelMaker::CreatePmtModels(), TridPageDetector::CreateSketches(), TridModelMaker::CreateStripModels(), TridUVPage::ModifySketches(), TridPageSlice::ModifySketches(), and TridPageDetector::ModifySketches(). 00022 { return fSortKey; };
|
|
|
Definition at line 53 of file TridModel.h. 00053 { return fStripEnds.size(); };
|
|
|
Definition at line 52 of file TridModel.h. Referenced by Print(). 00052 { return fNStrips; };
|
|
|
Definition at line 39 of file TridModel.h. Referenced by TridPmtPage::CreateSketches(), TridControl::GetRangedModelColor(), TridControl::GetRangedModelTrans(), TridModelCrate::Print(), and Print(). 00040 { return fTotalCharge[t]; }
|
|
|
Checks to see if there are any commonalities between this model and the other one. Definition at line 180 of file TridModel.cxx. References fCompList, fNComps, fStripEnds, and test_set_intersection(). Referenced by TridControl::IsPicked(). 00181 {
00186
00187
00188 // First, check for component IDs.
00189 if((fNComps>0)&&(other->fNComps>0)) {
00190 return test_set_intersection( fCompList.begin(), fCompList.end(),
00191 other->fCompList.begin(), other->fCompList.end() );
00192 }
00193
00194 // Next, check for strip end IDs
00195 if(fStripEnds.size()==0) return false;
00196 if(other->fStripEnds.size()==0) return false;
00197
00198 return test_set_intersection( fStripEnds.begin(), fStripEnds.end(),
00199 other->fStripEnds.begin(), other->fStripEnds.end() );
00200 }
|
|
|
Reimplemented in TridModelCrate, TridModelIntersect, TridModelPmt, TridModelPixel, TridModelRecoStrip, TridModelShower, TridModelStrip, and TridModelTrack. Definition at line 151 of file TridModel.cxx. References Form(), GetDigits(), GetEarliestTime(), GetEvent(), GetLatestTime(), GetMeanTime(), GetSlice(), GetStrips(), and GetTotalCharge(). Referenced by TridUVPage::ModifySketches(), TridPage::MouseOver(), TridModelTrack::Print(), TridModelStrip::Print(), TridModelShower::Print(), TridModelRecoStrip::Print(), TridModelPixel::Print(), TridModelPmt::Print(), TridModelIntersect::Print(), PrintToDigitText(), and TridPage::PrintToFile(). 00152 {
00153 os << "In slice: " << GetSlice() << std::endl;
00154 os << "In event: " << GetEvent() << std::endl;
00155 os << "Digits: " << GetDigits() << std::endl;
00156 os << "Strips: " << GetStrips() << std::endl;
00157 os << "Total Charge: " << std::endl;
00158 os << Form(" ADC: %6.0f PE: %4.1f\n SigLin: %4.1f SigCorr: %4.1f SigMap: %4.1f SigMip: %4.1f GeV: %4.1f",
00159 GetTotalCharge(CalStripType::kNone),
00160 GetTotalCharge(CalStripType::kPE),
00161 GetTotalCharge(CalStripType::kSigLin),
00162 GetTotalCharge(CalStripType::kSigCorr),
00163 GetTotalCharge(CalStripType::kSigMapped),
00164 GetTotalCharge(CalStripType::kMIP),
00165 GetTotalCharge(CalStripType::kGeV) ) << std::endl;
00166 os << "Time:" << std::endl;
00167 os << Form(" Mean Time: %6.1f ns (uncal) %6.1f ns (cal)",
00168 GetMeanTime(CalTimeType::kNone)/Munits::ns,
00169 GetMeanTime(CalTimeType::kT0)/Munits::ns ) << std::endl;
00170 os << Form(" Earliest Time: %6.1f ns (uncal) %6.1f ns (cal)",
00171 GetEarliestTime(CalTimeType::kNone)/Munits::ns,
00172 GetEarliestTime(CalTimeType::kT0)/Munits::ns ) << std::endl;
00173 os << Form(" Latest Time: %6.1f ns (uncal) %6.1f ns (cal)",
00174 GetLatestTime(CalTimeType::kNone)/Munits::ns,
00175 GetLatestTime(CalTimeType::kT0)/Munits::ns ) << std::endl;
00176
00177 }
|
|
|
Definition at line 138 of file TridModel.cxx. References DigitText::AddLine(), DigitText::Clear(), and Print(). 00139 {
00140 if(!dt) return;
00141 dt->Clear();
00142 std::stringstream buf;
00143 this->Print(buf);
00144 char line[1000];
00145 while(!buf.eof()) {
00146 buf.getline(line,1000);
00147 dt->AddLine(line);
00148 };
00149 }
|
|
|
Definition at line 23 of file TridModel.h. Referenced by TridModelMaker::CreateSliceModels(), TridModelCrate::TridModelCrate(), TridModelIntersect::TridModelIntersect(), TridModelPixel::TridModelPixel(), TridModelPmt::TridModelPmt(), and TridModelStrip::TridModelStrip(). 00023 { fSortKey = i; };
|
|
|
Definition at line 74 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), AddStrip(), and Intersects(). |
|
|
Definition at line 85 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), and AddStrip(). |
|
|
Definition at line 79 of file TridModel.h. |
|
|
Definition at line 65 of file TridModel.h. |
|
|
Definition at line 86 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), and AddStrip(). |
|
|
Definition at line 75 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), AddStrip(), and Intersects(). |
|
|
Definition at line 80 of file TridModel.h. Referenced by AddDigit(). |
|
|
Definition at line 71 of file TridModel.h. Referenced by AddDigit(), and AddFromModel(). |
|
|
Definition at line 81 of file TridModel.h. Referenced by AddStrip(). |
|
|
Definition at line 13 of file TridModel.cxx. |
|
|
Definition at line 78 of file TridModel.h. Referenced by TridModelMaker::CreateSliceModels(). |
|
|
Definition at line 64 of file TridModel.h. |
|
|
Definition at line 70 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), AddStrip(), and Intersects(). |
|
|
Definition at line 84 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), and AddStrip(). |
|
|
Definition at line 82 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), AddStrip(), TridModelMaker::CreateShowerModels(), and TridModelMaker::CreateTrackModels(). |
|
|
Definition at line 83 of file TridModel.h. Referenced by AddDigit(), AddFromModel(), and AddStrip(). |
1.3.9.1