50 new TH3D( title.c_str(), title.c_str(), nBinsX, xlow, xup, nBinsY, ylow, yup, nBinsZ, zlow, zup ) );
160 std::string titlestr = h.title();
161 const char*
title = titlestr.c_str();
162 if ( h.xAxis().isFixedBinning() && h.yAxis().isFixedBinning() && h.zAxis().isFixedBinning() ) {
163 m_rep = std::make_unique<TH3D>(
title,
title, h.xAxis().bins(), h.xAxis().lowerEdge(), h.xAxis().upperEdge(),
164 h.yAxis().bins(), h.yAxis().lowerEdge(), h.yAxis().upperEdge(), h.zAxis().bins(),
165 h.zAxis().lowerEdge(), h.zAxis().upperEdge() );
168 for (
int i = 0; i < h.xAxis().bins(); ++i ) eX.push_back( h.xAxis().binLowerEdge( i ) );
170 eX.push_back( h.xAxis().upperEdge() );
171 for (
int i = 0; i < h.yAxis().bins(); ++i ) eY.push_back( h.yAxis().binLowerEdge( i ) );
173 eY.push_back( h.yAxis().upperEdge() );
174 for (
int i = 0; i < h.zAxis().bins(); ++i ) eZ.push_back( h.zAxis().binLowerEdge( i ) );
176 eZ.push_back( h.zAxis().upperEdge() );
178 new TH3D(
title,
title, eX.size() - 1, &eX.front(), eY.size() - 1, &eY.front(), eZ.size() - 1, &eZ.front() ) );
183 const TArrayD* a =
m_rep->GetSumw2();
184 if ( !a || ( a && a->GetSize() == 0 ) )
m_rep->Sumw2();
191 double sumw = h.sumBinHeights();
193 if (
std::abs( h.equivalentBinEntries() ) > std::numeric_limits<double>::epsilon() )
194 sumw2 = ( sumw * sumw ) / h.equivalentBinEntries();
195 double sumwx = h.meanX() * h.sumBinHeights();
196 double sumwx2 = ( h.meanX() * h.meanX() + h.rmsX() * h.rmsX() ) * h.sumBinHeights();
197 double sumwy = h.meanY() * h.sumBinHeights();
198 double sumwy2 = ( h.meanY() * h.meanY() + h.rmsY() * h.rmsY() ) * h.sumBinHeights();
199 double sumwz = h.meanZ() * h.sumBinHeights();
200 double sumwz2 = ( h.meanZ() * h.meanZ() + h.rmsZ() * h.rmsZ() ) * h.sumBinHeights();
206 for (
int i = -2; i <
xAxis().bins(); ++i ) {
207 for (
int j = -2; j <
yAxis().bins(); ++j ) {
208 for (
int k = -2; k <
zAxis().bins(); ++k ) {
212 if ( i >= 0 && j >= 0 && k >= 0 ) {
213 sumwxy += h.binHeight( i, j, k ) * h.binMeanX( i, j, k ) * h.binMeanY( i, j, k );
214 sumwxz += h.binHeight( i, j, k ) * h.binMeanX( i, j, k ) * h.binMeanZ( i, j, k );
215 sumwyz += h.binHeight( i, j, k ) * h.binMeanY( i, j, k ) * h.binMeanZ( i, j, k );
222 m_rep->SetEntries( h.allEntries() );
225 std::vector<double> stat( 11 );
237 m_rep->PutStats( &stat.front() );
virtual bool setBinContents(int i, int j, int k, int entries, double height, double error, double centreX, double centreY, double centreZ)
Fast filling method for a given bin. It can be also the over/underflow bin.