Particle Identification and Tracking
corr_gofr.h
Go to the documentation of this file.
1 //Copyright 2009 Thomas A Caswell
2 //tcaswell@uchicago.edu
3 //http://jfi.uchicago.edu/~tcaswell
4 //
5 //This program is free software; you can redistribute it and/or modify
6 //it under the terms of the GNU General Public License as published by
7 //the Free Software Foundation; either version 3 of the License, or (at
8 //your option) any later version.
9 //
10 //This program is distributed in the hope that it will be useful, but
11 //WITHOUT ANY WARRANTY; without even the implied warranty of
12 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 //General Public License for more details.
14 //
15 //You should have received a copy of the GNU General Public License
16 //along with this program; if not, see <http://www.gnu.org/licenses>.
17 //
18 //Additional permission under GNU GPL version 3 section 7
19 //
20 //If you modify this Program, or any covered work, by linking or
21 //combining it with MATLAB (or a modified version of that library),
22 //containing parts covered by the terms of MATLAB User License, the
23 //licensors of this Program grant you additional permission to convey
24 //the resulting work.
25 
26 //If you modify this Program, or any covered work, by linking or
27 //combining it with IPP (or a modified version of that library),
28 //containing parts covered by the terms of End User License Agreement
29 //for the Intel(R) Software Development Products, the licensors of
30 //this Program grant you additional permission to convey the resulting
31 //work.
32 
33 #ifndef CORR_GOFR
34 #define CORR_GOFR
35 
36 #include <vector>
37 #include <string>
38 #include "corr.h"
39 
40 
41 
42 namespace utilities
43 {
44 class Generic_wrapper;
45 class Md_store;
46 
47 }
48 
49 
50 namespace tracking
51 {
55 class Corr_gofr:public Corr
56 {
57 public:
58  // basic inherited stuff
59  void compute(const particle *,const std::vector<const particle*> & ) ;
60  void out_to_wrapper(utilities::Generic_wrapper &,const std::string &,const utilities::Md_store * ) const ;
61 
62  // special stuff
66  float normalize(std::vector<float> & gofr) const;
67 
71  void get_bin_edges(std::vector<float> & out) const;
72 
77  Corr_gofr(int bins,float max);
78 
82  void display() const;
86  float get_max_range()const
87  {
88  return max_range_;
89  }
90 
91 
92 private:
93  // this could be done using a single histogram object, but
97  std::vector<unsigned int> bin_count_;
101  std::vector<float> bin_edges_;
105  unsigned int n_bins_;
109  float max_range_;
110 
114  unsigned int parts_added_;
115 
116 
117 };
118 
119 }
120 
121 
122 
123 #endif