CTxWitness is for segwit. Specifically it is for the witnesses included in the segwit serialization.
and it has a data member:const uint256 hash /** Memory only. */, it means if a transaction in mempool, it has this data member:hash?
or if on disk, it has no data member:hash?
It means that that hash is kept in the memory and not on disk.