We assume that individuals in a vaccinated cohort respond heterogeneously and acquire a continuous spectrum of effective protection against an environmental exposure to infection that can be varying in time. The notion of dynamical invariants is applied to a proportional hazard model with an unvaccinated or placebo cohort as baseline. The hazard is expressed as a susceptibility factor times a measure of environmental exposure to infection. Using the time-evolving information for the aggregated vaccinated cohort and the unvaccinated cohort, it is possible to reconstruct the distribution of effective protection imparted by the vaccination at the beginning of observation. Efficacy is defined in terms of the hazard ratio at the beginning of observation.