Distributed target allocation and tracking is an important research problem. This problem is complex but has many applications in various domains, including, pervasive computing, surveillance and military systems. In this paper we propose a technique to solve the target to sensor allocation problem by modeling the problem as a hierarchical Distributed Constraint Optimization Problem (HDCOP). Distributed Constrain Optimization Problems (DCOPs) tend to be computationally expensive and often intractable, particularly in large problem spaces such as Wireless Sensor Networks (WSNs). To address this challenge we propose changing the sensor to target allocation as a hierarchical set of smaller DCOPs with a shared system of constraints. Thus, we avoid significant computational and communication costs. Furthermore, in contrast to other DCOP modeling methods, a non-binary variable modeling is employed to reduce the number of intra-agent constraints. To evaluate the performance of the proposed approach, we use the surveillance system of the Regional Waterloo Airport as a test case. Two DCOP solution algorithms are considered, namely, the Distributed Breakout Algorithm (DBA) and the Asynchronous Distributed Optimization (ADOPT). We evaluate the computational and communication costs of these two algorithms for solving the target to sensor allocation problem using the proposed hierarchical formulation. We compare the performance of these algorithms with respect to the incurred computational and communication costs.