void VandleProcessor::AnalyzeBarStarts(void) { for (BarMap::iterator it = bars_.begin(); it != bars_.end(); it++) { TimingDefs::TimingIdentifier barId = (*it).first; BarDetector bar = (*it).second; if(!bar.GetHasEvent()) continue; unsigned int histTypeOffset = ReturnOffset(bar.GetType()); unsigned int barLoc = barId.first; TimingCalibration cal = bar.GetCalibration(); for(BarMap::iterator itStart = barStarts_.begin(); itStart != barStarts_.end(); itStart++) { unsigned int startLoc = (*itStart).first.first; unsigned int barPlusStartLoc = barLoc*numStarts_ + startLoc; BarDetector start = (*itStart).second; double tofOffset = cal.GetTofOffset(startLoc); double tof = bar.GetWalkCorTimeAve() - start.GetWalkCorTimeAve() + tofOffset; double corTof = CorrectTOF(tof, bar.GetFlightPath(), cal.GetZ0()); plot(DD_TOFBARS+histTypeOffset, tof*plotMult_+plotOffset_, barPlusStartLoc); plot(DD_CORTOFBARS, corTof*plotMult_+plotOffset_, barPlusStartLoc); if(tofOffset != 0) { plot(DD_TQDCAVEVSTOF+histTypeOffset, tof*plotMult_+plotOffset_, bar.GetQdc()); plot(DD_TQDCAVEVSCORTOF+histTypeOffset, corTof*plotMult_+plotOffset_, bar.GetQdc()); } if (geSummary_) { if (geSummary_->GetMult() > 0) { const vector<ChanEvent *> &geList = geSummary_->GetList(); for (vector<ChanEvent *>::const_iterator itGe = geList.begin(); itGe != geList.end(); itGe++) { double calEnergy = (*itGe)->GetCalEnergy(); plot(DD_GAMMAENERGYVSTOF+histTypeOffset, calEnergy, tof); } } else { plot(DD_TQDCAVEVSTOF_VETO+histTypeOffset, tof, bar.GetQdc()); plot(DD_TOFBARS_VETO+histTypeOffset, tof, barPlusStartLoc); } } } // for(TimingMap::iterator itStart } //(BarMap::iterator itBar } //void VandleProcessor::AnalyzeData
bool WalkVandleBetaProcessor::Process(RawEvent &event) { if (!EventProcessor::Process(event)) return (false); if (!VandleProcessor::Process(event)) return (false); for (BarMap::iterator it = bars_.begin(); it != bars_.end(); it++) { TimingDefs::TimingIdentifier barId = (*it).first; BarDetector bar = (*it).second; if (!bar.GetHasEvent()) continue; unsigned int barLoc = barId.first; bool isLower = barLoc > 6 && barLoc < 16; if (!isLower) continue; TimingCalibration cal = bar.GetCalibration(); if (barLoc == 12) { plot(DD_DEBUGGING4, bar.GetLeftSide().GetTraceQdc(), 0); plot(DD_DEBUGGING4, bar.GetRightSide().GetTraceQdc(), 1); if (bar.GetLeftSide().GetTraceQdc() > 1500) plot(DD_DEBUGGING5, bar.GetWalkCorTimeDiff() * plotMult_ + plotOffset_, bar.GetRightSide().GetTraceQdc()); if (bar.GetRightSide().GetTraceQdc() > 1500) plot(DD_DEBUGGING6, bar.GetWalkCorTimeDiff() * plotMult_ + plotOffset_, bar.GetLeftSide().GetTraceQdc()); plot(DD_DEBUGGING7, bar.GetWalkCorTimeDiff() * plotMult_ + plotOffset_, bar.GetRightSide().GetTraceQdc()); plot(DD_DEBUGGING8, bar.GetTimeDifference() * plotMult_ + plotOffset_, bar.GetRightSide().GetTraceQdc()); } for (TimingMap::iterator itStart = starts_.begin(); itStart != starts_.end(); itStart++) { HighResTimingData start = (*itStart).second; if (!start.GetIsValidData()) continue; unsigned int startLoc = (*itStart).first.first; double tofOffset = cal.GetTofOffset(startLoc); double tofBarWalkCor = bar.GetWalkCorTimeAve() - start.GetWalkCorrectedTime() + tofOffset; double tofBarAve = bar.GetTimeAverage() - start.GetWalkCorrectedTime() + tofOffset; double thresh = 1500; if (startLoc == 0) { plot(DD_DEBUGGING2, tofBarWalkCor * plotMult_ + plotOffset_, bar.GetQdc()); plot(DD_DEBUGGING3, tofBarAve * plotMult_ + plotOffset_, bar.GetQdc()); if (bar.GetQdc() > thresh) { plot(DD_DEBUGGING0, tofBarWalkCor * plotMult_ + plotOffset_, start.GetPixieEnergy()); plot(DD_DEBUGGING1, tofBarAve * plotMult_ + plotOffset_, start.GetPixieEnergy()); } } }//loop over starts }//loop over bars EndProcess(); return (true); }