Carpets. Carpets are a traditional source of allergy as they harbor dust mites and mold spores. If the carpet got wet in the past more mold spores will be harbored there. The carpet also stores pet dander. A newer carpet also frquently emits chemicals that are irritants.
Dust mite. Carpet is an excellent reservoir for collecting large amounts of dust mites. Dust mites are a common trigger of allergies and asthma. If after vacuuming, there is cough, sneezing, etc, ii is more likely to be dust/dust mite rather than a true allergic reaction to the fibers of the carpet.
Allergy to carpet. Most carpet now is made of synthetic materials. Old carpet could be made from wool, and old pads could be made from horsehair! Medium old pads might have latex or other rubber in them. The carpet itself would have to be analyzed to try to figure out an apparent allergy to it. Most apparent reactions to contact with carpet would be reactions to pet dander or dust or mold in it, or its dyes.