digraph stageone {
    rankdir=LR
    // data
    node[shape=ellipse]
    adc[label="TPC\nADC"]
    pds[label="PDS\nraw"]
    pds2[label="PDS\ncooked"]
    roi[label="Per-unit\nsignal-ROI"]
    clu[label="Per-unit\nTPC clusters"]
    glu[label="Whole-module\nTPC clusters"]
    ddd[label="..."]

    {rank=same pds2 glu}

    // proc
    node[shape=box]
    t1[label="TPC1: signal processing"]
    t2[label="TPC2: ionization"]
    m3[label="TPC3: merge over\ndetector module"]
    d3[label="Det1: flash matching"]
    p1[label="PDS1: PDS processing"]
    SIM

    {rank=same t1 p1}

    // external
    DAQ[shape=hexagon]

    SIM->adc
    SIM->pds
    DAQ->adc
    DAQ->pds
    adc->t1->roi->t2->clu->m3->glu->d3->ddd
    pds->p1->pds2->d3
}
