This paragraph is ambigous to me. Is masking taking place with TCAMs so that the result is a network address which gets compared to the network address in the routing table or not?
No, not exactly. There is not a regular masking operation taking place. There is no software querying the CAM/TCAM at forwarding time. While usual memory is designed to be queried by a 'memory address' (pointer), CAM/TCAM is a kind of memory circuit (hardware) designed to lookup by content. It does in hardware what a hash table does in software: an associative array.
The point is: TCAM can be programmed with a network prefix entry. For instance, you can insert a /24 prefix into TCAM by marking last 8 bits as "DON'T CARE".
With plain binary CAM, you can't insert IP prefix, you can only insert full IP address (or MAC addresses) as lookup key.
"What I wanted to know is whether TCAMs need to calculate a network address before searching for a matching entry in their routing table."
No. TCAM circuitry can DIRECTLY lookup keys against entries built with 0s and 1s and Xs (X=don't care). For instance, you could insert entry=1.0.0.X then you can lookup key=18.104.22.168. The TCAM circuitry will find and return the matching 1.0.0.X entry (plus its associated information) without doing the "formal" masking you seem to be picturing. However, TCAM lookup does a kind of masking to distinguish between "care bits" and "don't care bits"