# Hadding TProfiles

**URL:** <https://root-forum.cern.ch/t/hadding-tprofiles/16309>\
**Category:** ROOT\
**Created:** [July 1, 2013, 3:56pm UTC](https://root-forum.cern.ch/t/hadding-tprofiles/16309 "2013-07-01T15:56:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntomasse](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/n/6bbea6/32.png) [@ntomasse](https://root-forum.cern.ch/u/ntomasse)\
**Post date:** [July 1, 2013, 3:56pm UTC](https://root-forum.cern.ch/t/hadding-tprofiles/16309/1 "2013-07-01T15:56:34Z")

</div>

Hello,  
I’m filling many TProfile objects, all with the same binning.  
At the end I will use “hadd” to create a unique TProfile histogram.  
I wonder if hadd makes just the simple bin-to-bin sum of the single contents (like in TH1 objects)…  
or maybe hadd/ROOT is smart enough to combine a real average of single TProfiles??  
[Same question for TProfile2D].  
Thank you

---

<div class="post-metadata">

**Author:** ![SebastianSchmitt](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/58f4c7/32.png) [@SebastianSchmitt](https://root-forum.cern.ch/u/SebastianSchmitt)\
**Post date:** [July 4, 2013, 1:27pm UTC](https://root-forum.cern.ch/t/hadding-tprofiles/16309/2 "2013-07-04T13:27:44Z")

</div>

Hi!

It will correctly average the profiles, but watch out when it comes to scaling, see:

[url][Scaling trouble with TProfile adding weighted MC samples](https://root-forum.cern.ch/t/scaling-trouble-with-tprofile-adding-weighted-mc-samples/16220/1)

Best,

Sebastian
