Data gathering in wireless sensor networks (WSNs) is vital for deploying and enabling WSNs with the Internet of Things (IoTs). In various applications, the network is deployed in a large-scale area, which affects the efficiency of the data collection, and the network is subject to multiple attacks that impact the reliability of the collected data. Hence, data collection should consider trust in sources and routing nodes. This makes trust an additional optimization objective of the data gathering in addition to energy consumption, traveling time, and cost. Joint optimization of the goals requires conducting multiobjective optimization. This article proposes a modified social class multiobjective particle swarm optimization (SC-MOPSO) method. The modified SC-MOPSO method is featured by application-dependent operators named interclass operators. In addition, it includes solution generation, adding and deleting rendezvous points, and moving to the upper and lower class. Considering that SC-MOPSO provides a set of nondominated solutions as a Pareto front, we employed one of the multicriteria decision-making (MCDM) methods, i.e., simple additive sum (SAW), for selecting one of the solutions from the Pareto front. The results show that both SC-MOPSO and SAW are superior in terms of domination. The set coverage of SC-MOPSO is 0.06 dominant over NSGA-II compared with only a mastery of 0.04 of NSGA-II over SC-MOPSO. At the same time, it showed competitive performance with NSGA-III.