g4tools  5.4.0
Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
tools::histo::b3< TC, TO, TN, TW, TH > Class Template Referenceabstract
Inheritance diagram for tools::histo::b3< TC, TO, TN, TW, TH >:
Inheritance graph
[legend]
Collaboration diagram for tools::histo::b3< TC, TO, TN, TW, TH >:
Collaboration graph
[legend]

Public Types

typedef base_histo< TC, TO, TN, TW, TH > base_histo_t
 
typedef parent::axis_t axis_t
 
typedef parent::bn_t bn_t
 
- Public Types inherited from tools::histo::base_histo< TC, TO, TN, TW, TH >
typedef histo_data< TC, TO, TN, TW > hd_t
 
typedef axis< TC, TO > axis_t
 
typedef axis_t::bn_t bn_t
 
typedef unsigned int dim_t
 
typedef TC coordinate_t
 
typedef TO offset_t
 
typedef TN num_entries_t
 
typedef TW weight_t
 
typedef TH height_t
 
typedef std::map< std::string, std::string > annotations_t
 

Public Member Functions

virtual TH bin_error (int, int, int) const =0
 
int coord_to_index_x (TC aCoord) const
 
int coord_to_index_y (TC aCoord) const
 
int coord_to_index_z (TC aCoord) const
 
TC mean_x () const
 
TC mean_y () const
 
TC mean_z () const
 
TC rms_x () const
 
TC rms_y () const
 
TC rms_z () const
 
TN bin_entries (int aI, int aJ, int aK) const
 
TH bin_height (int aI, int aJ, int aK) const
 
TC bin_center_x (int aI) const
 
TC bin_center_y (int aJ) const
 
TC bin_center_z (int aK) const
 
TC bin_mean_x (int aI, int aJ, int aK) const
 
TC bin_mean_y (int aI, int aJ, int aK) const
 
TC bin_mean_z (int aI, int aJ, int aK) const
 
TC bin_rms_x (int aI, int aJ, int aK) const
 
TC bin_rms_y (int aI, int aJ, int aK) const
 
TC bin_rms_z (int aI, int aJ, int aK) const
 
const axis_taxis_x () const
 
const axis_taxis_y () const
 
const axis_taxis_z () const
 
axis_taxis_x ()
 
axis_taxis_y ()
 
axis_taxis_z ()
 
TN bin_entries_x (int aI) const
 
TN bin_entries_y (int aJ) const
 
TN bin_entries_z (int aK) const
 
TW bin_height_x (int aI) const
 
TW bin_height_y (int aJ) const
 
TW bin_height_z (int aK) const
 
TC Sxyw () const
 
TC Syzw () const
 
TC Szxw () const
 
void hprint (std::ostream &a_out)
 
 b3 (const std::string &a_title, bn_t aXnumber, TC aXmin, TC aXmax, bn_t aYnumber, TC aYmin, TC aYmax, bn_t aZnumber, TC aZmin, TC aZmax)
 
 b3 (const std::string &a_title, const std::vector< TC > &a_edges_x, const std::vector< TC > &a_edges_y, const std::vector< TC > &a_edges_z)
 
virtual ~b3 ()
 
bool configure (bn_t aXnumber, TC aXmin, TC aXmax, bn_t aYnumber, TC aYmin, TC aYmax, bn_t aZnumber, TC aZmin, TC aZmax)
 
bool configure (const std::vector< TC > &a_edges_x, const std::vector< TC > &a_edges_y, const std::vector< TC > &a_edges_z)
 
- Public Member Functions inherited from tools::histo::base_histo< TC, TO, TN, TW, TH >
const hd_tdac () const
 
bool equals (const base_histo &a_from, const TW &a_prec, TW(*a_fabs)(TW)) const
 
const std::string & title () const
 
bool set_title (const std::string &a_title)
 
dim_t dimension () const
 
dim_t number_of_planes () const
 
TN entries () const
 
TN all_entries () const
 
TN extra_entries () const
 
TW equivalent_bin_entries () const
 
TH sum_bin_heights () const
 
TH sum_all_bin_heights () const
 
TH sum_extra_bin_heights () const
 
TH min_bin_height () const
 
TH max_bin_height () const
 
bool min_bin_height_with_entries (TH &a_value) const
 
bool max_bin_height_with_entries (TH &a_value) const
 
bool has_entries_per_bin () const
 
bool get_ith_axis_Sxw (dim_t a_axis, TC &a_value) const
 
bool get_ith_axis_Sx2w (dim_t a_axis, TC &a_value) const
 
TW get_in_range_Sw () const
 
TW get_in_range_Sw2 () const
 
void get_Sw_Sw2 (TW &a_sw, TW &a_sw2) const
 
void get_all_Sw_Sw2 (TW &a_sw, TW &a_sw2) const
 
const std::vector< TN > & bins_entries () const
 
const std::vector< TW > & bins_sum_w () const
 
const std::vector< TW > & bins_sum_w2 () const
 
const std::vector< std::vector< TC > > & bins_sum_xw () const
 
const std::vector< std::vector< TC > > & bins_sum_x2w () const
 
const std::vector< TC > & in_range_planes_xyw () const
 
const axis_tget_axis (int a_index) const
 
offset_t get_bins () const
 
const std::string & get_title () const
 
dim_t get_dimension () const
 
bool is_valid () const
 
const annotations_tannotations () const
 
annotations_t annotations ()
 
void add_annotation (const std::string &a_key, const std::string &a_value)
 
bool annotation (const std::string &a_key, std::string &a_value) const
 
void set_annotations (const annotations_t &a_annotations)
 
void hprint_annotations (std::ostream &a_out)
 

Protected Types

enum  { AxisX =0, AxisY =1, AxisZ =2 }
 
- Protected Types inherited from tools::histo::base_histo< TC, TO, TN, TW, TH >
enum  { AxisX =0, AxisY =1, AxisZ =2 }
 
- Protected Types inherited from tools::histo::histo_data< TC, TO, TN, TW >
typedef axis< TC, TO > axis_t
 
typedef unsigned int dim_t
 
typedef std::map< std::string, std::string > annotations_t
 

Protected Member Functions

 b3 (const b3 &a_from)
 
b3operator= (const b3 &a_from)
 
bool _find_offset (int aI, int aJ, int aK, TO &a_offset) const
 
- Protected Member Functions inherited from tools::histo::base_histo< TC, TO, TN, TW, TH >
virtual TH get_bin_height (TO) const =0
 
void base_from_data (const hd_t &a_from)
 
hd_t base_get_data () const
 
 base_histo ()
 
virtual ~base_histo ()
 
 base_histo (const base_histo &a_from)
 
base_histooperator= (const base_histo &a_from)
 
bool configure (dim_t a_dim, const std::vector< bn_t > &aNumbers, const std::vector< TC > &aMins, const std::vector< TC > &aMaxs)
 
bool configure (dim_t a_dim, const std::vector< std::vector< TC > > &a_edges)
 
void base_reset ()
 
void base_allocate ()
 
bool is_compatible (const base_histo &a_histo)
 
void base_add (const base_histo &a_histo)
 
void base_subtract (const base_histo &a_histo)
 
bool base_multiply (const base_histo &a_histo)
 
bool base_divide (const base_histo &a_histo)
 
bool base_multiply (TW a_factor)
 
bool get_ith_axis_mean (dim_t a_axis, TC &a_value) const
 
bool get_ith_axis_rms (dim_t a_axis, TC &a_value) const
 
TN get_bin_entries (const std::vector< int > &aIs) const
 
- Protected Member Functions inherited from tools::histo::histo_data< TC, TO, TN, TW >
void reset_fast_getters ()
 
 histo_data ()
 
 histo_data (const histo_data &a_from)
 
histo_dataoperator= (const histo_data &a_from)
 
virtual ~histo_data ()
 
void update_fast_getters ()
 
bool equals (const histo_data &a_from, const TW &a_prec, TW(*a_fabs)(TW)) const
 
bool equals_TH (const histo_data &a_from, const TW &a_prec, TW(*a_fabs)(TW), bool a_cmp_bin_Sw2) const
 

Additional Inherited Members

- Protected Attributes inherited from tools::histo::histo_data< TC, TO, TN, TW >
std::string m_title
 
dim_t m_dimension
 
TO m_bin_number
 
std::vector< TN > m_bin_entries
 
std::vector< TW > m_bin_Sw
 
std::vector< TW > m_bin_Sw2
 
std::vector< std::vector< TC > > m_bin_Sxw
 
std::vector< std::vector< TC > > m_bin_Sx2w
 
std::vector< axis_tm_axes
 
std::vector< TC > m_in_range_plane_Sxyw
 
std::map< std::string, std::string > m_annotations
 
TN m_all_entries
 
TN m_in_range_entries
 
TW m_in_range_Sw
 
TW m_in_range_Sw2
 
std::vector< TC > m_in_range_Sxw
 
std::vector< TC > m_in_range_Sx2w
 

Detailed Description

template<class TC, class TO, class TN, class TW, class TH>
class tools::histo::b3< TC, TO, TN, TW, TH >

Definition at line 15 of file b3.

Member Typedef Documentation

◆ axis_t

template<class TC , class TO , class TN , class TW , class TH >
typedef parent::axis_t tools::histo::b3< TC, TO, TN, TW, TH >::axis_t

Definition at line 19 of file b3.

◆ base_histo_t

template<class TC , class TO , class TN , class TW , class TH >
typedef base_histo<TC,TO,TN,TW,TH> tools::histo::b3< TC, TO, TN, TW, TH >::base_histo_t

Definition at line 18 of file b3.

◆ bn_t

template<class TC , class TO , class TN , class TW , class TH >
typedef parent::bn_t tools::histo::b3< TC, TO, TN, TW, TH >::bn_t

Definition at line 20 of file b3.

Member Enumeration Documentation

◆ anonymous enum

template<class TC , class TO , class TN , class TW , class TH >
anonymous enum
protected
Enumerator
AxisX 
AxisY 
AxisZ 

Definition at line 22 of file b3.

22 {AxisX=0,AxisY=1,AxisZ=2};

Constructor & Destructor Documentation

◆ b3() [1/3]

template<class TC , class TO , class TN , class TW , class TH >
tools::histo::b3< TC, TO, TN, TW, TH >::b3 ( const std::string &  a_title,
bn_t  aXnumber,
TC  aXmin,
TC  aXmax,
bn_t  aYnumber,
TC  aYmin,
TC  aYmax,
bn_t  aZnumber,
TC  aZmin,
TC  aZmax 
)
inline

Definition at line 310 of file b3.

314  {
315  parent::m_title = a_title;
316  std::vector<bn_t> nbins;
317  nbins.push_back(aXnumber);
318  nbins.push_back(aYnumber);
319  nbins.push_back(aZnumber);
320  std::vector<TC> mins;
321  mins.push_back(aXmin);
322  mins.push_back(aYmin);
323  mins.push_back(aZmin);
324  std::vector<TC> maxs;
325  maxs.push_back(aXmax);
326  maxs.push_back(aYmax);
327  maxs.push_back(aZmax);
328  parent::configure(3,nbins,mins,maxs);
329  }

◆ b3() [2/3]

template<class TC , class TO , class TN , class TW , class TH >
tools::histo::b3< TC, TO, TN, TW, TH >::b3 ( const std::string &  a_title,
const std::vector< TC > &  a_edges_x,
const std::vector< TC > &  a_edges_y,
const std::vector< TC > &  a_edges_z 
)
inline

Definition at line 331 of file b3.

335  {
336  parent::m_title = a_title;
337  std::vector< std::vector<TC> > edges(3);
338  edges[0] = a_edges_x;
339  edges[1] = a_edges_y;
340  edges[2] = a_edges_z;
341  parent::configure(3,edges);
342  }

◆ ~b3()

template<class TC , class TO , class TN , class TW , class TH >
virtual tools::histo::b3< TC, TO, TN, TW, TH >::~b3 ( )
inlinevirtual

Definition at line 344 of file b3.

344 {}

◆ b3() [3/3]

template<class TC , class TO , class TN , class TW , class TH >
tools::histo::b3< TC, TO, TN, TW, TH >::b3 ( const b3< TC, TO, TN, TW, TH > &  a_from)
inlineprotected

Definition at line 346 of file b3.

346 :parent(a_from) {}

Member Function Documentation

◆ _find_offset()

template<class TC , class TO , class TN , class TW , class TH >
bool tools::histo::b3< TC, TO, TN, TW, TH >::_find_offset ( int  aI,
int  aJ,
int  aK,
TO &  a_offset 
) const
inlineprotected

Definition at line 378 of file b3.

378  {
379  if(parent::m_dimension!=3) {a_offset=0;return false;}
380  bn_t ibin,jbin,kbin;
381  if(!parent::m_axes[0].in_range_to_absolute_index(aI,ibin)) {a_offset=0;return false;}
382  if(!parent::m_axes[1].in_range_to_absolute_index(aJ,jbin)) {a_offset=0;return false;}
383  if(!parent::m_axes[2].in_range_to_absolute_index(aK,kbin)) {a_offset=0;return false;}
384  a_offset = ibin + jbin * parent::m_axes[1].m_offset + kbin * parent::m_axes[2].m_offset;
385  return true;
386  }

◆ axis_x() [1/2]

template<class TC , class TO , class TN , class TW , class TH >
axis_t& tools::histo::b3< TC, TO, TN, TW, TH >::axis_x ( )
inline

Definition at line 148 of file b3.

148 {return parent::m_axes[0];} //touchy

◆ axis_x() [2/2]

template<class TC , class TO , class TN , class TW , class TH >
const axis_t& tools::histo::b3< TC, TO, TN, TW, TH >::axis_x ( ) const
inline

Definition at line 145 of file b3.

145 {return parent::m_axes[0];}

◆ axis_y() [1/2]

template<class TC , class TO , class TN , class TW , class TH >
axis_t& tools::histo::b3< TC, TO, TN, TW, TH >::axis_y ( )
inline

Definition at line 149 of file b3.

149 {return parent::m_axes[1];} //touchy

◆ axis_y() [2/2]

template<class TC , class TO , class TN , class TW , class TH >
const axis_t& tools::histo::b3< TC, TO, TN, TW, TH >::axis_y ( ) const
inline

Definition at line 146 of file b3.

146 {return parent::m_axes[1];}

◆ axis_z() [1/2]

template<class TC , class TO , class TN , class TW , class TH >
axis_t& tools::histo::b3< TC, TO, TN, TW, TH >::axis_z ( )
inline

Definition at line 150 of file b3.

150 {return parent::m_axes[2];} //touchy

◆ axis_z() [2/2]

template<class TC , class TO , class TN , class TW , class TH >
const axis_t& tools::histo::b3< TC, TO, TN, TW, TH >::axis_z ( ) const
inline

Definition at line 147 of file b3.

147 {return parent::m_axes[2];}

◆ bin_center_x()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_center_x ( int  aI) const
inline

Definition at line 83 of file b3.

83 {return parent::m_axes[0].bin_center(aI);}

◆ bin_center_y()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_center_y ( int  aJ) const
inline

Definition at line 84 of file b3.

84 {return parent::m_axes[1].bin_center(aJ);}

◆ bin_center_z()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_center_z ( int  aK) const
inline

Definition at line 85 of file b3.

85 {return parent::m_axes[2].bin_center(aK);}

◆ bin_entries()

template<class TC , class TO , class TN , class TW , class TH >
TN tools::histo::b3< TC, TO, TN, TW, TH >::bin_entries ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 71 of file b3.

71  {
72  TO offset;
73  if(!_find_offset(aI,aJ,aK,offset)) return 0;
74  return parent::m_bin_entries[offset];
75  }

◆ bin_entries_x()

template<class TC , class TO , class TN , class TW , class TH >
TN tools::histo::b3< TC, TO, TN, TW, TH >::bin_entries_x ( int  aI) const
inline

Definition at line 153 of file b3.

153  {
154  if(!parent::m_dimension) return 0;
155  bn_t ibin;
156  if(!parent::m_axes[0].in_range_to_absolute_index(aI,ibin)) return 0;
157  bn_t jbin,kbin,offset;
158  bn_t ybins = parent::m_axes[1].bins()+2;
159  bn_t zbins = parent::m_axes[2].bins()+2;
160  TO yoffset = parent::m_axes[1].m_offset;
161  TO zoffset = parent::m_axes[2].m_offset;
162  TO joffset = ibin;
163  TN _entries = 0;
164  for(jbin=0;jbin<ybins;jbin++) {
165  //joffset = ibin + jbin * parent::m_axes[1].m_offset;
166  offset = joffset;
167  for(kbin=0;kbin<zbins;kbin++) {
168  //offset = joffset + kbin * parent::m_axes[2].m_offset;
169  _entries += parent::m_bin_entries[offset];
170  offset += zoffset;
171  }
172  joffset += yoffset;
173  }
174  return _entries;
175  }

◆ bin_entries_y()

template<class TC , class TO , class TN , class TW , class TH >
TN tools::histo::b3< TC, TO, TN, TW, TH >::bin_entries_y ( int  aJ) const
inline

Definition at line 177 of file b3.

177  {
178  if(!parent::m_dimension) return 0;
179  bn_t jbin;
180  if(!parent::m_axes[1].in_range_to_absolute_index(aJ,jbin)) return 0;
181  bn_t ibin,kbin;
182  TO offset;
183  bn_t xbins = parent::m_axes[0].bins()+2;
184  bn_t zbins = parent::m_axes[2].bins()+2;
185  TO yoffset = parent::m_axes[1].m_offset;
186  TO zoffset = parent::m_axes[2].m_offset;
187  TO joffset = jbin * yoffset;
188  TN _entries = 0;
189  for(ibin=0;ibin<xbins;ibin++) {
190  //joffset = ibin + jbin * parent::m_axes[1].m_offset;
191  offset = joffset;
192  for(kbin=0;kbin<zbins;kbin++) {
193  //offset = joffset + kbin * parent::m_axes[2].m_offset;
194  _entries += parent::m_bin_entries[offset];
195  offset += zoffset;
196  }
197  joffset++;
198  }
199  return _entries;
200  }

◆ bin_entries_z()

template<class TC , class TO , class TN , class TW , class TH >
TN tools::histo::b3< TC, TO, TN, TW, TH >::bin_entries_z ( int  aK) const
inline

Definition at line 202 of file b3.

202  {
203  if(!parent::m_dimension) return 0;
204  bn_t kbin;
205  if(!parent::m_axes[2].in_range_to_absolute_index(aK,kbin)) return 0;
206  bn_t ibin,jbin;
207  TO offset;
208  bn_t xbins = parent::m_axes[0].bins()+2;
209  bn_t ybins = parent::m_axes[1].bins()+2;
210  TO yoffset = parent::m_axes[1].m_offset;
211  TO zoffset = parent::m_axes[2].m_offset;
212  TO koffset = kbin * zoffset;
213  TN _entries = 0;
214  for(ibin=0;ibin<xbins;ibin++) {
215  //koffset = ibin + kbin * parent::m_axes[2].m_offset;
216  offset = koffset;
217  for(jbin=0;jbin<ybins;jbin++) {
218  //offset = koffset + jbin * parent::m_axes[1].m_offset;
219  _entries += parent::m_bin_entries[offset];
220  offset += yoffset;
221  }
222  koffset++;
223  }
224  return _entries;
225  }

◆ bin_error()

template<class TC , class TO , class TN , class TW , class TH >
virtual TH tools::histo::b3< TC, TO, TN, TW, TH >::bin_error ( int  ,
int  ,
int   
) const
pure virtual

◆ bin_height()

template<class TC , class TO , class TN , class TW , class TH >
TH tools::histo::b3< TC, TO, TN, TW, TH >::bin_height ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 77 of file b3.

77  {
78  TO offset;
79  if(!_find_offset(aI,aJ,aK,offset)) return 0;
80  return this->get_bin_height(offset);
81  }

◆ bin_height_x()

template<class TC , class TO , class TN , class TW , class TH >
TW tools::histo::b3< TC, TO, TN, TW, TH >::bin_height_x ( int  aI) const
inline

Definition at line 227 of file b3.

227  {
228  //to slow : return get_ith_axis_bin_height(0,aI);
229  if(!parent::m_dimension) return 0;
230  bn_t ibin;
231  if(!parent::m_axes[0].in_range_to_absolute_index(aI,ibin)) return 0;
232  bn_t ybins = parent::m_axes[1].bins()+2;
233  bn_t zbins = parent::m_axes[2].bins()+2;
234  TO yoffset = parent::m_axes[1].m_offset;
235  TO zoffset = parent::m_axes[2].m_offset;
236  TO joffset = ibin;
237  TW sw = 0;
238  for(bn_t jbin=0;jbin<ybins;jbin++) {
239  //joffset = ibin + jbin * parent::m_axes[1].m_offset;
240  TO offset = joffset;
241  for(bn_t kbin=0;kbin<zbins;kbin++) {
242  //offset = joffset + kbin * parent::m_axes[2].m_offset;
243  sw += this->get_bin_height(offset);
244  offset += zoffset;
245  }
246  joffset += yoffset;
247  }
248  return sw;
249  }

◆ bin_height_y()

template<class TC , class TO , class TN , class TW , class TH >
TW tools::histo::b3< TC, TO, TN, TW, TH >::bin_height_y ( int  aJ) const
inline

Definition at line 251 of file b3.

251  {
252  if(!parent::m_dimension) return 0;
253  bn_t jbin;
254  if(!parent::m_axes[1].in_range_to_absolute_index(aJ,jbin)) return 0;
255  bn_t xbins = parent::m_axes[0].bins()+2;
256  bn_t zbins = parent::m_axes[2].bins()+2;
257  TO yoffset = parent::m_axes[1].m_offset;
258  TO zoffset = parent::m_axes[2].m_offset;
259  TO joffset = jbin * yoffset;
260  TW sw = 0;
261  for(bn_t ibin=0;ibin<xbins;ibin++) {
262  //joffset = ibin + jbin * parent::m_axes[1].m_offset;
263  TO offset = joffset;
264  for(bn_t kbin=0;kbin<zbins;kbin++) {
265  //offset = joffset + kbin * parent::m_axes[2].m_offset;
266  sw += this->get_bin_height(offset);
267  offset += zoffset;
268  }
269  joffset++;
270  }
271  return sw;
272  }

◆ bin_height_z()

template<class TC , class TO , class TN , class TW , class TH >
TW tools::histo::b3< TC, TO, TN, TW, TH >::bin_height_z ( int  aK) const
inline

Definition at line 274 of file b3.

274  {
275  if(!parent::m_dimension) return 0;
276  bn_t kbin;
277  if(!parent::m_axes[2].in_range_to_absolute_index(aK,kbin)) return 0;
278  bn_t xbins = parent::m_axes[0].bins()+2;
279  bn_t ybins = parent::m_axes[1].bins()+2;
280  TO yoffset = parent::m_axes[1].m_offset;
281  TO zoffset = parent::m_axes[2].m_offset;
282  TO koffset = kbin * zoffset;
283  TW sw = 0;
284  for(bn_t ibin=0;ibin<xbins;ibin++) {
285  //koffset = ibin + kbin * parent::m_axes[2].m_offset;
286  TO offset = koffset;
287  for(bn_t jbin=0;jbin<ybins;jbin++) {
288  //offset = koffset + jbin * parent::m_axes[1].m_offset;
289  sw += this->get_bin_height(offset);
290  offset += yoffset;
291  }
292  koffset++;
293  }
294  return sw;
295  }

◆ bin_mean_x()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_mean_x ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 87 of file b3.

87  {
88  TO offset;
89  if(!_find_offset(aI,aJ,aK,offset)) return 0;
90  TW sw = parent::m_bin_Sw[offset];
91  if(sw==0) return 0;
92  return parent::m_bin_Sxw[offset][AxisX]/sw;
93  }

◆ bin_mean_y()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_mean_y ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 95 of file b3.

95  {
96  TO offset;
97  if(!_find_offset(aI,aJ,aK,offset)) return 0;
98  TW sw = parent::m_bin_Sw[offset];
99  if(sw==0) return 0;
100  return parent::m_bin_Sxw[offset][AxisY]/sw;
101  }

◆ bin_mean_z()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_mean_z ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 103 of file b3.

103  {
104  TO offset;
105  if(!_find_offset(aI,aJ,aK,offset)) return 0;
106  TW sw = parent::m_bin_Sw[offset];
107  if(sw==0) return 0;
108  return parent::m_bin_Sxw[offset][AxisZ]/sw;
109  }

◆ bin_rms_x()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_rms_x ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 111 of file b3.

111  {
112  TO offset;
113  if(!_find_offset(aI,aJ,aK,offset)) return 0;
114  TW sw = parent::m_bin_Sw[offset];
115  if(sw==0) return 0;
116  TC sxw = parent::m_bin_Sxw[offset][AxisX];
117  TC sx2w = parent::m_bin_Sx2w[offset][AxisX];
118  TC mean = sxw/sw;
119  return ::sqrt(::fabs((sx2w / sw) - mean * mean));
120  }

◆ bin_rms_y()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_rms_y ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 122 of file b3.

122  {
123  TO offset;
124  if(!_find_offset(aI,aJ,aK,offset)) return 0;
125  TW sw = parent::m_bin_Sw[offset];
126  if(sw==0) return 0;
127  TC sxw = parent::m_bin_Sxw[offset][AxisY];
128  TC sx2w = parent::m_bin_Sx2w[offset][AxisY];
129  TC mean = sxw/sw;
130  return ::sqrt(::fabs((sx2w / sw) - mean * mean));
131  }

◆ bin_rms_z()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::bin_rms_z ( int  aI,
int  aJ,
int  aK 
) const
inline

Definition at line 133 of file b3.

133  {
134  TO offset;
135  if(!_find_offset(aI,aJ,aK,offset)) return 0;
136  TW sw = parent::m_bin_Sw[offset];
137  if(sw==0) return 0;
138  TC sxw = parent::m_bin_Sxw[offset][AxisZ];
139  TC sx2w = parent::m_bin_Sx2w[offset][AxisZ];
140  TC mean = sxw/sw;
141  return ::sqrt(::fabs((sx2w / sw) - mean * mean));
142  }

◆ configure() [1/2]

template<class TC , class TO , class TN , class TW , class TH >
bool tools::histo::b3< TC, TO, TN, TW, TH >::configure ( bn_t  aXnumber,
TC  aXmin,
TC  aXmax,
bn_t  aYnumber,
TC  aYmin,
TC  aYmax,
bn_t  aZnumber,
TC  aZmin,
TC  aZmax 
)
inline

Definition at line 349 of file b3.

351  {
352  std::vector<bn_t> nbins;
353  nbins.push_back(aXnumber);
354  nbins.push_back(aYnumber);
355  nbins.push_back(aZnumber);
356  std::vector<TC> mins;
357  mins.push_back(aXmin);
358  mins.push_back(aYmin);
359  mins.push_back(aZmin);
360  std::vector<TC> maxs;
361  maxs.push_back(aXmax);
362  maxs.push_back(aYmax);
363  maxs.push_back(aZmax);
364  return parent::configure(3,nbins,mins,maxs);
365  }

◆ configure() [2/2]

template<class TC , class TO , class TN , class TW , class TH >
bool tools::histo::b3< TC, TO, TN, TW, TH >::configure ( const std::vector< TC > &  a_edges_x,
const std::vector< TC > &  a_edges_y,
const std::vector< TC > &  a_edges_z 
)
inline

Definition at line 367 of file b3.

369  {
370  std::vector< std::vector<TC> > edges(3);
371  edges[0] = a_edges_x;
372  edges[1] = a_edges_y;
373  edges[2] = a_edges_z;
374  return parent::configure(3,edges);
375  }

◆ coord_to_index_x()

template<class TC , class TO , class TN , class TW , class TH >
int tools::histo::b3< TC, TO, TN, TW, TH >::coord_to_index_x ( TC  aCoord) const
inline

Definition at line 27 of file b3.

27  {
28  return axis_x().coord_to_index(aCoord);
29  }

◆ coord_to_index_y()

template<class TC , class TO , class TN , class TW , class TH >
int tools::histo::b3< TC, TO, TN, TW, TH >::coord_to_index_y ( TC  aCoord) const
inline

Definition at line 30 of file b3.

30  {
31  return axis_y().coord_to_index(aCoord);
32  }

◆ coord_to_index_z()

template<class TC , class TO , class TN , class TW , class TH >
int tools::histo::b3< TC, TO, TN, TW, TH >::coord_to_index_z ( TC  aCoord) const
inline

Definition at line 33 of file b3.

33  {
34  return axis_z().coord_to_index(aCoord);
35  }

◆ hprint()

template<class TC , class TO , class TN , class TW , class TH >
void tools::histo::b3< TC, TO, TN, TW, TH >::hprint ( std::ostream &  a_out)
inline

Definition at line 302 of file b3.

302  {
303  // A la HPRINT.
304  a_out << parent::dimension() << parent::title() << std::endl;
305  a_out
306  << " * ENTRIES = " << parent::all_entries() << std::endl;
307 
308  }

◆ mean_x()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::mean_x ( ) const
inline

Definition at line 37 of file b3.

37  {
38  if(parent::m_in_range_Sw==0) return 0;
40  }

◆ mean_y()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::mean_y ( ) const
inline

Definition at line 42 of file b3.

42  {
43  if(parent::m_in_range_Sw==0) return 0;
45  }

◆ mean_z()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::mean_z ( ) const
inline

Definition at line 47 of file b3.

47  {
48  if(parent::m_in_range_Sw==0) return 0;
50  }

◆ operator=()

template<class TC , class TO , class TN , class TW , class TH >
b3& tools::histo::b3< TC, TO, TN, TW, TH >::operator= ( const b3< TC, TO, TN, TW, TH > &  a_from)
inlineprotected

Definition at line 347 of file b3.

347 {parent::operator=(a_from);return *this;}

◆ rms_x()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::rms_x ( ) const
inline

Definition at line 52 of file b3.

52  {
53  if(parent::m_in_range_Sw==0) return 0;
55  return ::sqrt(::fabs((parent::m_in_range_Sx2w[0] / parent::m_in_range_Sw) - mean * mean));
56  }

◆ rms_y()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::rms_y ( ) const
inline

Definition at line 58 of file b3.

58  {
59  if(parent::m_in_range_Sw==0) return 0;
61  return ::sqrt(::fabs((parent::m_in_range_Sx2w[1] / parent::m_in_range_Sw) - mean * mean));
62  }

◆ rms_z()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::rms_z ( ) const
inline

Definition at line 64 of file b3.

64  {
65  if(parent::m_in_range_Sw==0) return 0;
67  return ::sqrt(::fabs((parent::m_in_range_Sx2w[2] / parent::m_in_range_Sw) - mean * mean));
68  }

◆ Sxyw()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::Sxyw ( ) const
inline

Definition at line 297 of file b3.

◆ Syzw()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::Syzw ( ) const
inline

Definition at line 298 of file b3.

◆ Szxw()

template<class TC , class TO , class TN , class TW , class TH >
TC tools::histo::b3< TC, TO, TN, TW, TH >::Szxw ( ) const
inline

Definition at line 299 of file b3.


The documentation for this class was generated from the following file:
tools::histo::axis::coord_to_index
int coord_to_index(TC a_value) const
Definition: axis:97
tools::histo::b3::bn_t
parent::bn_t bn_t
Definition: b3:20
tools::histo::histo_data::m_bin_Sx2w
std::vector< std::vector< TC > > m_bin_Sx2w
Definition: histo_data:179
tools::histo::histo_data::m_in_range_Sxw
std::vector< TC > m_in_range_Sxw
Definition: histo_data:190
tools::histo::histo_data::m_bin_entries
std::vector< TN > m_bin_entries
Definition: histo_data:175
tools::histo::b3::AxisZ
@ AxisZ
Definition: b3:22
tools::histo::histo_data::m_bin_Sw
std::vector< TW > m_bin_Sw
Definition: histo_data:176
tools::histo::base_histo::get_bin_height
virtual TH get_bin_height(TO) const =0
tools::histo::b3::axis_z
const axis_t & axis_z() const
Definition: b3:147
tools::histo::histo_data::m_in_range_Sx2w
std::vector< TC > m_in_range_Sx2w
Definition: histo_data:191
tools::histo::histo_data::m_title
std::string m_title
Definition: histo_data:171
tools::histo::b3::AxisY
@ AxisY
Definition: b3:22
tools::histo::b3::axis_y
const axis_t & axis_y() const
Definition: b3:146
tools::histo::b3::AxisX
@ AxisX
Definition: b3:22
tools::histo::histo_data::m_bin_Sxw
std::vector< std::vector< TC > > m_bin_Sxw
Definition: histo_data:178
tools::histo::base_histo::all_entries
TN all_entries() const
Definition: base_histo:95
tools::histo::histo_data::m_axes
std::vector< axis_t > m_axes
Definition: histo_data:181
tools::histo::base_histo::title
const std::string & title() const
Definition: base_histo:87
tools::histo::base_histo::configure
bool configure(dim_t a_dim, const std::vector< bn_t > &aNumbers, const std::vector< TC > &aMins, const std::vector< TC > &aMaxs)
Definition: base_histo:293
tools::histo::b3::_find_offset
bool _find_offset(int aI, int aJ, int aK, TO &a_offset) const
Definition: b3:378
tools::histo::histo_data::m_in_range_Sw
TW m_in_range_Sw
Definition: histo_data:188
tools::histo::b3::axis_x
const axis_t & axis_x() const
Definition: b3:145
tools::histo::base_histo::operator=
base_histo & operator=(const base_histo &a_from)
Definition: base_histo:76
tools::histo::histo_data::m_in_range_plane_Sxyw
std::vector< TC > m_in_range_plane_Sxyw
Definition: histo_data:183
tools::histo::histo_data::m_dimension
dim_t m_dimension
Definition: histo_data:172
tools::histo::base_histo::dimension
dim_t dimension() const
Definition: base_histo:89