21 , m_binDescriptor(size_t(0),0.,0.) {}
27 : m_defaultRanges(true)
28 , m_numberOfSums(numberOfSums)
30 , m_binDescriptor(theBins)
58 std::vector<double> lowEtas; lowEtas.push_back(etaLow);
59 std::vector<double> highEtas; highEtas.push_back(etaHigh);
60 return this->
setRegion(theRegion,lowEtas,highEtas);
95 const std::vector<double>& lowEtas,
96 const std::vector<double>& highEtas)
99 if ( lowEtas.size() != highEtas.size() || lowEtas.empty() )
111 for (
unsigned int i=0;
i<lowEtas.size();
i++ )
113 range_t theRange(lowEtas[
i],highEtas[
i]);
127 bool isFound =
false;
130 range_cont_t::const_iterator fRange = ((*fRegion).second).
begin();
131 while ( ! isFound && fRange != ((*fRegion).second).end() )
133 double lowEdge = (*fRange).first;
134 double highEdge = (*fRange).second;
135 isFound = ( lowEdge <= theEta && theEta < highEdge );
144 std::vector<double>& lowEtas,
145 std::vector<double>& highEtas)
const
147 range_map_t::const_iterator fRegion =
m_regionRanges.find(theRegion);
150 lowEtas.resize(((*fRegion).second).size());
151 highEtas.resize(((*fRegion).second).size());
152 for (
unsigned int i=0;
i<((*fRegion).second).
size();
i++ )
154 lowEtas[
i] = (((*fRegion).second)[
i]).first;
155 highEtas[
i] = (((*fRegion).second)[
i]).second;
190 return lowerLimit < upperLimit;
195 double& upperLimit)
const
199 return lowerLimit < upperLimit;
204 double lowEdge, highEdge;
205 if ( this->
getBinEdges(theIndex,lowEdge,highEdge) )
207 binCenter = ( highEdge + lowEdge ) / 2.;
227 double theBinnedVariable,
228 double theSummedVariable)
230 std::vector<double> theSums; theSums.push_back(theSummedVariable);
231 return this->
add(theCell,theBinnedVariable,theSums);
235 double theBinnedVariable,
236 const std::vector<double>& theSummedVariables)
241 return this->
add(theSampling,theCell->
eta(),theBinnedVariable,
248 double theBinnedVariable,
249 double theSummedVariable)
251 std::vector<double> theSums; theSums.push_back(theSummedVariable);
252 return this->
add(theSampling,theEta,theBinnedVariable,theSums);
257 double theBinnedVariable,
258 const std::vector<double>& theSummedVariables)
282 (((*theAllocator).second)[theIndex]).size() <= theSummedVariables.size()
283 ? (((*theAllocator).second)[theIndex]).size()
284 : theSummedVariables.size();
285 for (
unsigned int i=0;
i<theSize;
i++ )
287 (((*theAllocator).second)[theIndex])[
i] += theSummedVariables[
i];
310 return ((*theIterator).first).first;
316 return ((*theIterator).first).second;
321 std::vector<double>& theSums)
const
329 theSums.resize( (((*theIterator).second)[theIndex]).size(), 0. );
330 std::copy( (((*theIterator).second)[theIndex]).begin(),
331 (((*theIterator).second)[theIndex]).end(),
333 return !theSums.empty();
337 double theBinnedVariable,
338 std::vector<double>& theSums)
const
340 return this->
getSums(theIterator,
348 std::vector<double>& theSums)
const
360 theSums.resize((((*theAccessor).second)[theIndex]).size(),0.);
361 std::copy((((*theAccessor).second)[theIndex]).begin(),
362 (((*theAccessor).second)[theIndex]).end(),
364 return !theSums.empty();
371 double theBinnedVariable,
372 std::vector<double>& theSums)
const
374 return this->
getSums(theRegion,
394 while ( firstEntry != lastEntry && !
found )
396 found = ((*firstEntry).first).
first == theRegion;
407 while ( firstEntry != lastEntry && !
found )
409 found = ((*firstEntry).first).
second == theSampling;
430 range_t centralRange(-0.8,0.8);
447 return key_t(theRegion,theSampling);
455 return this->
getKey(theRegion,theSampling);