Software Product Line (SPL) is a set of softwareintensive systems, sharing a common, managed set of features that satisfy the specific needs of a particular market segment or domain. Reference Architecture (RA) is the main asset shared by all SPL products; it covers commonality and variability of the SPL family of products or systems and it is used as a template to produce new products. We propose a semi-automatic bottom-up refactoring process to build RA considering the logic view (static aspects) of architectures of existing products in a domain, represented by a connected graph or valid architectural configuration. A candidate architecture (CA) is obtained automatically and manually completed by introducing new variants to satisfy quality properties. RA is finally built by grouping into variation points CA variants accomplishing similar tasks. We consider functional and non-functional variability modeling of components and connectors. The quality properties to be satisfied are specified by the ISO/IEC 25010 quality model, using scenarios of available architectural solutions for each quality property that can be traced to the original component requiring it; our approach combines quality standards with goaloriented techniques to consider non-functional variability, which is still an open research issue in SPL. The complete RA design process is applied to the domain of Integrated Healthcare Information Systems.Keywords-software product line, reference architecture, bottom-up design, non-functional requirements, quality model.