Project

General

Profile

LArIAT Trigger

The configuration file for the LArIAT trigger is located under the lariat account on lariat-daq00 at:

/opt/lariat-online/config/V1495.config

Global parameters

The first section of file sets various global parameters. The pulser period is important for the VST,
and the snippet is shown below. Change in any parameter requires a LArIAT DAQ restart from
the change to take effect.

  <firmwarePulser>
     <periodreg>0x101C</periodreg>
     <maskreg>0x1024</maskreg>
     <widthreg>0x1028</widthreg>
     <!-- Pulser period, in ticks (10 ns)       -->
     <!-- Reference value:                      -->
     <!--      100000000 = 1 Hz                  -->
     <!--       50000000 = 2 Hz                  -->
     <!-- <period>1000000</period> -->
     <period>50000000</period>

     <!-- Pulser width, in ticks (probably 40 ns) -->
     <!-- from 1 ticks (40 ns) to 4,294,967,295 ticks (about 40 s) -->
     <width>3</width>
  </firmwarePulser>

The period parameter should be set to the desired repetition time. I believe
the units are actually 20 ns rather than the noted 10 ns, be sure to verify the
result.

The post-trigger hold-off time is also important for VST. Currently it is
set to 66 milliseconds, corresponding to a 15 Hz rate limit, see below:

  <!-- These VETO ticks delay values are used to block further triggers    -->
  <!-- following the receipt of an initial trigger.  Some hardware         -->
  <!-- may be sensitive to frequent triggers, e.g. Sten says the wire      -->
  <!-- chamber TDCs need 5 microseconds minimum between triggers           -->
  <!-- Note our normal trigger rate on average is much lower, but we fear  -->
  <!-- so-called correlated triggers following the initial main trigger    -->
  <!-- One tick is 10 nanoseconds; normally trigger and vetos delayhs      -->
  <!-- should be the same                                                  -->
  <!-- For SBND@LArIAT, use microboone style 66 millisecond hold off       -->
  <veto> 
    <reg>0x1008</reg>
    <ticks>6600000</ticks>
    <!--  Nominal 369 microseconds : <ticks>36900</ticks> -->
  </veto>

The units of ticks are 10 ns (the clock period of the V1495)

When you change the above parameters, you must stop the current LArIAT run
and restart it for the changes to take effect.

Defining Trigger Inputs

The tags starting in define the names of the 32 trigger inputs, for example:

  <in5>
    <name>USTOF</name>
    <number> 5 </number>
    <reg> 0x1114 </reg>
  </in5>

This gives the fifth digital input number (counting from zero) the name USTOF. Only
the name should change, do not change number or reg. Short but descriptive names
should be used. This input can be easily recognized as Upstream Time of Flight. These names
will be used in the trigger pattern section to select logic.

Note that inputs 0,1,2 and 3 are special. They are used collectively in a majority logic
circuit. Derived input 3 will fire when M out of 4 inputs fire. See the parameter M
under the tag control in the global parameter section.

Defining Trigger Outputs/Paths/Patterns

The tags starting trigpat are used to define acceptable trigger logic based on the trigger
inputs. An example is below:

  <trigpat2> 
    <inreg>0x1408</inreg>
    <cntreg>0x1208</cntreg> 
    <maskreg>0x1608</maskreg>
    <prescreg>0x1808</prescreg>
    <prescaler>1</prescaler>
    <on> USTOF DSTOF WCCOINC3OF4 BEAMON  </on>
    <off> COSMICON </off>
  </trigpat2>

All of the inputs specified in the on list must be true for the trigpat2 to fire. All of the
inputs in the off list must be false in order for trigpat2 to fire. All 16 of the trigger
patterns run in parallel and all their results are or ed to provide the final global trigger.

Check spelling and capitalization carefully here, the names here must match the input names
exactly.