## 1 Introduction  
The operation and maintenance (O&M) phase of buildings and civil infrastructures ranges between 20-30 years for buildings, but it can cover more than 50 years of the whole lifecycle [1]. It is essential to ensure an actual and efficient management of buildings during the O&M phase. Occupancy and actual use of spaces strongly affect the organizational effectiveness and functioning during the operational phase [2, 3]. Typically, standardized and fixed values of occupancy are considered during design phases, e.g., maximum occupancy values from fire regulations or scheduled occupancy for energy models [4]. Consequently, actual occupancy and space use levels may significantly vary from and rarely correspond to the values considered during the design phase. Occupancy strongly influences use and cleanness of spaces, which in turn are related to well-being, satisfaction, and productivity of users [5, 6]. In recent years, a consistent number of studies investigated the segment of the performance gap between expected energy consumptions, defined during the design phase, and actual consumptions, due to human-building interaction and variable occupancy [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]. However, other promising fields in building management include security, safety, cleanness, and space management. These aspects can have a crucial role,especially in light of current sanitary emergencies related to the spread of the COVID-19 pandemic: space monitoring is a key aspect to guarantee safety in existing buildings [18]. In this context, the aim of the ongoing research project here presented is to define a Building Management Systems (BMS) based on an occupancy-oriented Digital Twin (DT), evolving from and enriching the Building Information Model (BIM) and integrating occupancy levels and additional relevant data from Post-Occupancy Evaluations (POEs). Analyses and simulations of the occupancy-oriented DT would support the decision-making processes during the O&M phase. The case study for the application of the methodology is an existing office building hosting the Department of Architecture, built environment, and construction engineering (DABC) at Politecnico di Milano, Italy, used by people working at the university and performing their research and administrative activities in the indoor spaces of the building. The maintenance and cleanness of the distribution spaces and offices is a very important aspect in the facility management of the building and department business plan; strong variations in occupants' flows are experienced by the users and particularly during the pandemic. The IoT network of sensors that represents the source of data for the occupancy-oriented DT and that was tested and calibrated as described in this article was provided and installed by an external consulting company (Laser Navigation srl). They provided the hardware part of the system that is the camera-based sensors with an embedded deep learning algorithm, the installation, and the technical settings of the sensors. They also provided an online platform named SophyAI and integrated with the IoT system, that allows to visualize, store, and download collected data. This paper focuses on the preparatory phases for the definition of the DT, i.e., sensor system calibration and collected data quality validation. In fact, a fundamental characteristic of a DT is the connection, alignment, and reciprocity between the physical and virtual part [19]. Therefore, a key aspect is the data collection process, ensuring data quality on which the correct digital representation of the physical phenomenon depends [20; 21], since, in order to obtain satisfactory results, is essential to ensure the quality of input data [22]. In this perspective, fundamental steps are the selection of sensor types that are most suitable for the specific application [23], the spatial distribution of sensors in the indoor spaces [24], and the setting and calibration of the IoT sensor system [25; 26], to allow a correct detection and collection of data.