RobotStudio event

LoadData and ToolData values for q1-q4

Hello to all, from my understanding for definition of X,Y and Z vaules for tooldata and loaddata I'm using tool0 as reference in relation with tool TCP for tooldata and in relation with center of gravity  of load for loaddata. Am I mistaking ? Now how do I determine reorientation of tool and load data (q1-q4). My tool and load will rotate during process so robot values for q1-q4 will change. In attachment is usual position of tool and load during production. Please help, thanks in advance.