Esempio n. 1
0
void VandleProcessor::FillVandleOnlyHists(void) {
    for(BarMap::const_iterator it = bars_.begin(); it != bars_.end(); it++) {
        TimingDefs::TimingIdentifier barId = (*it).first;
        BarDetector bar = (*it).second;
        unsigned int OFFSET = ReturnOffset(barId.second);

        plot(DD_TQDCBARS + OFFSET,
             bar.GetLeftSide().GetTraceQdc(), barId.first*2);
        plot(DD_MAXIMUMBARS + OFFSET,
             bar.GetLeftSide().GetMaximumValue(), barId.first*2);
        plot(DD_TQDCBARS + OFFSET,
             bar.GetRightSide().GetTraceQdc(), barId.first*2+1);
        plot(DD_MAXIMUMBARS + OFFSET,
             bar.GetRightSide().GetMaximumValue(), barId.first*2+1);
        plot(DD_TIMEDIFFBARS+OFFSET,
            bar.GetTimeDifference()*plotMult_+plotOffset_, barId.first);
    }
}
Esempio n. 2
0
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);
}