digraph dataprod {
        compound=true
        node[shape=folder]
        rawfile[label="raw\npacked"]
        sigfile[label="signal-ROI\nwaveforms"]
        wcout[label="Wire-Cell\ntuples"]
        lsout[label="LArSoft\ntuples"]
        node[shape=Mrecord]
        DAQ
        wcana[label="Wire-Cell Based\nAnalysis"]
        lsana[label="LArSoft Based\nAnalysis"]
        joint[label="Joint\nAnalysis"]
        subgraph cluster_stage1data {
                label="Stage 1 Data Production"
                node[shape=Mrecord]
                s1pdat[label="{raw decode|WC noise filter|WC signal processing}"]
        }
        subgraph cluster_stage1mc {
                label="Stage 1 MC Production"
                node[shape=Mrecord]
                s1pmc[label="{Int. Kinematics|Geant4|WC TPC Sim|WC noise filter|WC signal processing}"]
        }
        subgraph cluster_3dfirst {
                label="Stage 2+ Production\n(3D-first wire-cell)"
                node[shape=Mrecord]
                wc3d[label="{WC 3D imaging|WC 3D clustering|WC flash matching|wire-cell reco}"]
        }
        subgraph cluster_2dfirst {
                label="Stage 2+ Production\n(2D-first larsoft)"
                node[shape=Mrecord]
                ls2d[label="{2D Gaussian wf fits|LS 2D clustering|track stiching|LS flash matching|pandora reco}"]
        }
        DAQ->rawfile
        rawfile->s1pdat[lhead=cluster_stage1data]
        s1pdat->sigfile[ltail=cluster_stage1data]
        s1pmc->sigfile
        sigfile->wc3d[lhead=cluster_3dfirst]
        sigfile->ls2d[lhead=cluster_2dfirst]
        wc3d->wcout->wcana[ltail=cluster_3dfirst]
        ls2d->lsout->lsana[ltail=cluster_2dfirst]
        wcout->joint
        lsout->joint
        
}
