Particle Identification and Tracking
corr_goftheta.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 #include "generic_wrapper.h"
40 
41 
42 
43 namespace tracking
44 {
50 class Corr_goftheta:public Corr
51 {
52 public:
53  // basic inherited stuff
54  void compute(const particle *,const std::vector<const particle*> & ) ;
55 
56  void out_to_wrapper(utilities::Generic_wrapper &,const std::string& name ) const ;
57 
58 
63  Corr_goftheta(int bins,float max,std::string &);
64 
68  void display() const;
72  float get_max_range()const
73  {
74  return max_range_;
75  }
76 
77 
78 
82  void normalize(std::vector<float> & out) const;
83 
84 
85 private:
86  // this could be done using a single histogram object, but
90  std::vector<int> bin_count_;
94  std::vector<float> bin_edges_;
98  unsigned int n_bins_;
102  float max_range_;
103 
107  std::string name_;
108 
113 
117  void trim_nhood(const particle * p_in,const std::vector<const particle * > & nhood_in,std::vector<const particle * > &nhood_out) const;
118 
119 };
120 
121 }
122 
123 
124 
125 #endif