Those who know tomatoes, know there are different types of tomatoes, and their acidity or sweetness comes from their ripeness and the different strains or types of tomato, and even where they;re grown. If they;re locally grown, they may have ripened more on the vine, if they're out of season, they will probably be more sour, but there are also types of tomato that are sweeter or not.
There's not much i can help you on with this,since my own experience of cooking with fresh tomatoes in the states has been mainly dismal. (I come from New England and tomato season is very short).
So i always used canned when i was there.
Now, what you're probably talking about is not acidity but sourness, a flavor, not a chemical consistency. And sugar certainly counters the sourness, as do carrots, but don;t forget the onion.
My tomato "consultant" - a guy at a market here in rome who sells exclusively tomatoes, some 20 varieties, in three stages of ripeness, green, red, and then somewhat wrinkly (they give body to sauce and are sweeter) - says that sauces with sweet tomatoes, where you want to enhance the sweetness, use onion, and those with the sharper tomatoes call for garlic. He says don;t put basil on the garlic sauces, basil is for "sweet" type sauces. Garlic sauces call for parsley on top at the very end, when you've already mixed the sauce with the pasta. Likewise, says my expert, don;t put parmigiano on garlic sauces, it doesn;t really go and fights the flavor. This guy is good. It;s not about what is "authentic" or any sort of "rule of snobbery" but whatever he suggests is always amazingly good.
Same for basil, which changes flavor considerably when it's cooked, i only like it on the pasta at the very end so it doesn';t cook. but that's a matter of taste.
If you have tomatoes that are sour and you want a sweeter sauce, then try this
sautee over very low heat, thinly sliced, or chopped onion (and carrot and celery if you like) in oil or butter till it's soft and tender and transparent. don't let it brown.
Add the tomatoes and cook. It's not necessary to cook hours if you have good canned tomatoes (and the imported kind are not always the best - i think italians keep the good ones for themselves and dont; send them abroad!). I generally give it 20 minutes of cooking, sort of, sometimes less, sometimes more, unless it's a ragu. If you find it's too sour at this point, add a bit of sugar if you like, or you can add a teaspoon (count 'em, ONE teaspoon) tomato paste but you need to cook it a little or it tastes of tomato paste
If you really want to get the smooth sweeter flavor, you can puree the sauce after cooking, so the onions, carrots, etc, really become part of the tomato flavor.
Another trick that gives a nice warmth is to abundantly sprinkle the pasta with parmigiano as soon as it's drained and still hot. Drain the pasta - put it back in the pot you cooked it in and sprinkle with parmigiano. Let it sit half a minute, without stirring, then add the sauce and mix it well so all the pasta is covered in sauce. If you stir the pasta and parmigiano the parmigiano will all stick to the spoon and the pot. put the sauce first then stir. ALWAYS mix the sauce with the pasta, don;t leave the pasta "nude" with a pile of sauce in the middle. The pasta gets gummy, and the sauce won;t really give it flavor.
Then you can add a chunk of butter with the sauce and that counteracts the experience of sourness as well.
Finally, on herbs. I think people use too much of herbs. You shouldn't be eating pasta and saying "oh oregano!" you should be saying, hey, what is that flavor?
Oregano goes best, in my opinion, on the garlic/parsley/sort-of-sharpish-tomatoes/no-parmigiano/maybe-some-hot-red-pepper type sauces. Personally I think it adds to the sharp profile rather than the sweet profile. There is really no need for it. the tomatoes should be the main flavor, and the other stuff is there just to support it,enhance it, round it out.
Try making a sauce WITHOUT herbs (parsley, basil, origano, thyme whtever) and see what it's like. The careful slow cooking of the onions will give it tons of flavor. Put a whole onion in with a small can of tomato.
Or go the other route and do a sautee of garlic (3 or 4 cloves, sliced) a sprinkling of hot red pepper flakes or a couple of small hot red peppers, olive oil, and cook slowly till garlic cooked, then add tomatoes, cook over high heat five minutes, and pour over and mix thoroughly with the pasta. (that would be a pasta all;'arrabbiata) - you won;t want it to be sweet.
let me know how it goes