Here is a flowchart-type graphic that I would like to remake with TikZ.

In principle, I know how to do these things, using \node (a) at (1,2) { text }; and \draw (a) -- (b); commands. However, I'm not very happy with that approach. I have the following concerns:
- The graphic here is very busy, and I fear that I will get confused with all the nodes and arrows.
- Sections of the flowchart are "inscribed" into other nodes - the colored nodes and arrows are always encapsulated within the grey nodes and arrows. I'm unsure about how to deal with this - should I make the "small" flowcharts
tikzpictures inside nodes of the "outer" flowchart, or is there a more elegant solution? If I split this up into severaltikzpictures, how would I make sure the alignment works out as intended? - The large node on the left is divided in "sections" with the dashed lines. What is the best way to go about this? Shall I draw the node (and the "sectioning") myself with
draw ... rectangle ..., or is there some nice way to "subsection" a TikZ node? - The small colored nodes on the left are multicolored - how can one make such nodes with TikZ?
Any suggestions on how to create a busy flowchart like this one in a nice way that is easy to edit and reformat is greatly appreciated!
EDIT
I've started implementing the suggestions from the comments. I started with the left part of the graphic, which looks like this:
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\newcommand\acr[1]{#1}
\usetikzlibrary{fit,positioning,calc}
\begin{document}
\tikzset{anacat/.style={anchor=north west,minimum height=1.5em,x=.3cm,y=.3cm,every node/.style={scale=0.4}}}
\tikzset{bin/.style={draw=black,anchor=west,text width=3cm}}
\begin{tikzpicture}[x=1cm,y=2cm]
\begin{scope}[at={(0,0)},local bounding box=Hyy,anacat]
\node[rotate=90,anchor=north,align=center] at (-1,3) {$H\to\gamma\gamma$};
\node[bin] at (0,0) {low $p_{\textrm{T}t}$};
\node[bin] at (0,1) {high $p_{\textrm{T}t}$};
\node[bin] at (0,2) {\acr{VBF} loose (\acr{MVA})};
\node[bin] at (0,3) {\acr{VBF} tight (\acr{MVA})};
\node[bin] at (0,4) {\acr{VH} leptonic};
\node[bin] at (0,5) {$VH$ leptonic};
\node[bin] at (0,6) {$t\bar{t}H$ leptonic};
\end{scope}
\node[draw,dotted,fit=(Hyy)] {};
\begin{scope}[at={($(Hyy.south)$)},local bounding box=HZZ,anacat]
\node[rotate=90,anchor=north,align=center] at (-1,2) {$H\to ZZ$};
\node[bin] at (0,0) {ggF $n_{j}=0$};
\node[bin] at (0,1) {ggF $n_{j}=1$};
\node[bin] at (0,2) {\acr{VBF} leptonic};
\node[bin] at (0,3) {\acr{VH} leptonic};
\node[bin] at (0,4) {\acr{VH} hadronic};
\end{scope}
\node[draw,dotted,fit=(HZZ)] {};
\begin{scope}[at={($(HZZ.south)$)},local bounding box=HWW,anacat]
\node[rotate=90,anchor=north,align=center] at (-1,2.5) {$H\to WW$};
\node[bin] at (0,0) {ggF $n_{j}=0$};
\node[bin] at (0,1) {ggF $n_{j}=1$};
\node[bin] at (0,2) {ggF $n_{j}\geq 2$};
\node[bin] at (0,3) {\acr{VBF} $n_{j}\geq 2$};
\node[bin] at (0,4) {\acr{WH}};
\node[bin] at (0,5) {\acr{ZH}};
\end{scope}
\node[draw,dotted,fit=(HWW)] {};
\begin{scope}[at={($(HWW.south)$)},local bounding box=Hbb,anacat]
\node[rotate=90,anchor=north,align=center] at (-1,2) {$H\to b\bar{b}$};
\node[bin] at (0,1) {\acr{MVA} low $p_{\textrm{T}^V}$};
\node[bin] at (0,2) {\acr{MVA} low $p_{\textrm{T}^V}$};
\node[bin] at (0,3) {$\cdots$};
\end{scope}
\node[draw,dotted,fit=(Hbb)] {};
\begin{scope}[at={($(Hbb.south)$)},local bounding box=Htt,anacat]
\node[rotate=90,anchor=north,align=center] at (-1,1) {$H\to \tau\bar{\tau}$};
\node[bin] at (0,1) {$\cdots$};
\end{scope}
\node[draw,dotted,fit=(Htt)] {};
\end{tikzpicture}
\end{document}
I'm trying to use the at=... syntax to facilitate relative positioning of the scopes, but it doesn't seem to work the way I intend. It currently looks like this:
Is there any non-obvious interaction between relative positioning and the fit package?


treeandgraphenvironment within tikz. For grouping,{scope}is a good option, that also allows you to set specific options for a limited set of commands. – Huang_d Jun 12 '17 at 15:29fitlibrary (nestingtikzpictures should be avoided if possible, I think). – Torbjørn T. Jun 12 '17 at 17:13