Negation and Doulbler Barrels

Do both of these barrels just affect the field objects that are underneath them in a goal, or the whole goal. (For example: 3 red alliance balls/barrels with a negation barrel on top, then another 2 red balls/barrels on top). What would happen here?

Also, what if there were (for example: 3 red alliance balls/barrels with a negation barrel on top, then another 1 blue alliance ball/barrel with a doubler barrel on top). What would happen here.

The only rules I could find about these barrels were…
<SG3> A Barrel or Ball is not considered scored if it is being touched by a robot on an alliance of the same color at the end of the Match.
• If a Robot is touching a Doubler Barrel at the end of the Match, the Doubler Barrel will only
double the value of all points for the opposing Alliance in the Circular Goal.
• If a Robot is touching a Negation Barrel at the end of the Match, the Negation Barrel will only
cancel the value of all points for its own Alliance in the Circular Goal.

–and–

<SG8> If a Doubler Barrel and a Negation Barrel are scored in the same Circular Goal, they each have
no effect on the score. If more than one Doubler Barrel or Negation Barrel are scored in the same
Circular Goal only the one closest to the foam field tiles will count.

How would these rules apply to the above situations?

The definitions of Doubler and Negation barrels hold the answer to your question:
Doubler Barrel – A white Barrel which doubles the value of all points (including the Bonus Point) in a Circular Goal
*Negation Barrel – A black Barrel which cancels the value of all points (including the Bonus Point) with a Circular Goal. *
Similar information is given under the Scoring section of Game Rules.
The placement of the barrels does not matter. I think SG8 would only be used if a robot is touching one of the barrels (does anyone have clarification on when it would be used?).
In the example that you gave:

the doubler and negation barrels would cancel out, so red would receive 4 points (a bonus for having the scoring object on the bottom of the goal) and blue would receive 1 point. I think that if a doubler/negation barrel is on the bottom of the goal (this would probably never happen), then there would be no bonus point (clarification?).
Further examples using your situation (This is all speculation, I do not know if this is correct):
A red robot is touching the doubler barrel:
Red receives 0 points and blue receives 1
A red robot is touching the negation barrel:
Red receives 0 points and blue receives 1
A blue robot is touching the doubler barrel:
Red receives 4 points and blue receives 0
A blue robot is touching the negation barrel:
Red receives 4 points and blue receives 0

Just to clarify, Negation/Doubler barrels apply to the whole goal not just pieces underneath them?

Yes.

Game Rules > Scoring
• A Doubler Barrel that is Scored in a Circular Goal doubles the value of all points in the Goal including the Bonus Point.
• A Negation Barrel that is Scored in a Circular Goal cancels the value of all points in the Goal including the Bonus Point.

Thanks for the clarification