  A method is described, which computes from an observed sample of events upper
limits for production rates of particles, or, in case of appearance of a
signal, the probability for an upwards fluctuation of the background. For any
candidate, a weight is defined, and the computation is based on the sum of
observed weights. Candidates may be distributed over many decay channels with
different detection efficiencies, physical observables and different or poorly
known background. Systematic errors with any possible correlations are taken
into account and they are incorporated into the weight definition. It is
investigated, under which conditions a Bayesian treatment of systematic errors
is correct. Some numerical examples are given and compared with the results of
other methods. Simple approximate formulas for observed and expected confidence
levels are given for the limiting case of high count rates. A special procedure
is introduced, which analyses input data in terms of polynomial distributions.
It extracts confidence levels for a signal or background hypothesis on the
basis of spectral shapes only, normalizing the total rate to the number of
observed events.
