DRS4 Forum
  DRS4 Discussion Forum  Not logged in ELOG logo
Entry  Fri Nov 18 05:52:45 2016, Kurtis Nishimura, Channel offsets in GetTime() offsetInstructions.png
    Reply  Mon Nov 21 14:13:32 2016, Stefan Ritt, Channel offsets in GetTime() 
Message ID: 563     Entry time: Fri Nov 18 05:52:45 2016     Reply to this: 565
Author: Kurtis Nishimura 
Subject: Channel offsets in GetTime() 


I have a question about the GetTime() method in DRS.cpp.  I understand how the DT values are applied for all channels, and I also understand from the evaluation board manual that the timing of each channel is synchronized at sample 0, so samples should really be aligned from channel-to-channel relative to sample 0.

However, DRS.cpp has the following snippet in DrsBoard::GetTime():

   if (channelIndex > 0) {
      // correct all channels to channel 0 (Daniel's method)
      iend = tc >= 700 ? 700+1024 : 700;
      for (i=tc,gt0=0 ; i<iend ; i++)
         gt0 += fCellDT[chipIndex][0][i % 1024];
      for (i=tc,gt=0 ; i<iend ; i++)
         gt += fCellDT[chipIndex][channelIndex][i % 1024];
      for (i=0 ; i<fChannelDepth ; i++)
         time[i] += (float)(gt0 - gt);

I can see what this is calculating and applying such an offset, but I don't understand why things seem to be referenced to sample 700.  Is there a particular reason why sample 700 is chosen here?  This does not seem like a straightforward application of the attached instructions from the evaluation board user's manual.

Any insight would be much appreciated!

Thanks so much,


Attachment 1: offsetInstructions.png  31 kB  | Hide | Hide all
ELOG V3.1.4-bcd7b50