Mark each cell and use in integrating over subdomains


I have a query related to usage of marker for each cell. I have input mesh with 5 subdomains. I have additional information of angle related to each cell (text file with cell#, angle, subdomain_id).

My query is how can use angle data of each cell while performing intergration? The MWE is:

from dolfin import *
def C_new(i):
    E= material_parameters[i]
    return E*cos(theta)
F = sum([C_new(i)*dx(i) for i in range(materials)])

Q- How can I mark each cell to take theta while integrating over subdomain?

Define a DG 0 function, and assign to it the values you read from file.