Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcPrototypeCluster.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcPrototypeCluster.h
1 
7 #ifndef TRACKBASE_TRKRCLUSTERV1_H
8 #define TRACKBASE_TRKRCLUSTERV1_H
9 
10 #include <trackbase/TrkrCluster.h>
11 #include <trackbase/TrkrDefs.h>
12 
13 #include <iostream>
14 #include <map>
15 #include <set>
16 #include <vector>
17 
18 class PHObject;
19 
29 {
30  public:
33 
35  virtual ~TpcPrototypeCluster() {}
36  // PHObject virtual overloads
37  virtual void identify(std::ostream& os = std::cout) const;
38  virtual void Reset() {}
39  virtual int isValid() const;
40  virtual PHObject* CloneMe() const { return new TpcPrototypeCluster(*this); }
41  virtual void setClusKey(TrkrDefs::cluskey id) { m_cluskey = id; }
42  virtual TrkrDefs::cluskey getClusKey() const { return m_cluskey; }
43  //
44  // cluster position
45  //
46  virtual float getX() const { return m_pos[0]; }
47  virtual void setX(float x) { m_pos[0] = x; }
48  virtual float getY() const { return m_pos[1]; }
49  virtual void setY(float y) { m_pos[1] = y; }
50  virtual float getZ() const { return m_pos[2]; }
51  virtual void setZ(float z) { m_pos[2] = z; }
52  virtual float getPosition(int coor) const { return m_pos[coor]; }
53  virtual void setPosition(int coor, float xi) { m_pos[coor] = xi; }
54  virtual void setGlobal() { m_isGlobal = true; }
55  virtual void setLocal() { m_isGlobal = false; }
56  virtual bool isGlobal() { return m_isGlobal; }
57  //
58  // cluster info
59  //
60  virtual unsigned int getAdc() const { return m_adc; }
61  virtual void setAdc(unsigned int adc) { m_adc = adc; }
62  virtual float getSize(unsigned int i, unsigned int j) const; //< get cluster dimension covar
63  virtual void setSize(unsigned int i, unsigned int j, float value); //< set cluster dimension covar
64 
65  virtual float getError(unsigned int i, unsigned int j) const; //< get cluster error covar
66  virtual void setError(unsigned int i, unsigned int j, float value); //< set cluster error covar
67 
68  //
69  // convenience interface
70  //
71  virtual float getPhiSize() const;
72  virtual float getZSize() const;
73 
74  virtual float getRPhiError() const;
75  virtual float getPhiError() const;
76  virtual float getZError() const;
77 
78  // prototype specific interface.
79 
80  double getAvgPadAzimuth() const
81  {
82  return avg_pad_azimuth;
83  }
84 
85  void setAvgPadAzimuth(double avgPadAzimuth)
86  {
87  avg_pad_azimuth = avgPadAzimuth;
88  }
89 
90  int getAvgPadRadial() const
91  {
92  return avg_pad_radial;
93  }
94 
95  void setAvgPadRadial(int avgPadRadial)
96  {
97  avg_pad_radial = avgPadRadial;
98  }
99 
100  double getDeltaAzimuthBin() const
101  {
102  return delta_azimuth_bin;
103  }
104 
105  void setDeltaAzimuthBin(double deltaAzimuthBin)
106  {
107  delta_azimuth_bin = deltaAzimuthBin;
108  }
109 
110  double getDeltaZ() const
111  {
112  return delta_z;
113  }
114 
115  void setDeltaZ(double deltaZ)
116  {
117  delta_z = deltaZ;
118  }
119 
120  int getMaxPadAzimuth() const
121  {
122  return max_pad_azimuth;
123  }
124 
125  void setMaxPadAzimuth(int maxPadAzimuth)
126  {
127  max_pad_azimuth = maxPadAzimuth;
128  }
129 
130  int getMaxSample() const
131  {
132  return max_sample;
133  }
134 
135  void setMaxSample(int maxSample)
136  {
137  max_sample = maxSample;
138  }
139 
140  int getMinPadAzimuth() const
141  {
142  return min_pad_azimuth;
143  }
144 
145  void setMinPadAzimuth(int minPadAzimuth)
146  {
147  min_pad_azimuth = minPadAzimuth;
148  }
149 
150  int getMinSample() const
151  {
152  return min_sample;
153  }
154 
155  void setMinSample(int minSample)
156  {
157  min_sample = minSample;
158  }
159 
160  const std::map<int, double>& getPadAzimuthPeaks() const
161  {
162  return pad_azimuth_peaks;
163  }
164 
165  void setPadAzimuthPeaks(const std::map<int, double>& padAzimuthPeaks)
166  {
167  pad_azimuth_peaks = padAzimuthPeaks;
168  }
169 
170  const std::map<int, std::vector<double>>& getPadAzimuthSamples() const
171  {
172  return pad_azimuth_samples;
173  }
174 
175  void setPadAzimuthSamples(const std::map<int, std::vector<double>>& padAzimuthSamples)
176  {
177  pad_azimuth_samples = padAzimuthSamples;
178  }
179 
180  const std::set<int>& getPadAzimuths() const
181  {
182  return pad_azimuths;
183  }
184 
185  void setPadAzimuths(const std::set<int>& padAzimuths)
186  {
187  pad_azimuths = padAzimuths;
188  }
189 
190  const std::map<int, std::vector<double>>& getPadRadialSamples() const
191  {
192  return pad_radial_samples;
193  }
194 
195  void setPadRadialSamples(const std::map<int, std::vector<double>>& padRadialSamples)
196  {
197  pad_radial_samples = padRadialSamples;
198  }
199 
200  const std::set<int>& getPadRadials() const
201  {
202  return pad_radials;
203  }
204 
205  void setPadRadials(const std::set<int>& padRadials)
206  {
207  pad_radials = padRadials;
208  }
209 
210  double getPeak() const
211  {
212  return peak;
213  }
214 
215  void setPeak(double peak)
216  {
217  this->peak = peak;
218  }
219 
220  double getPeakSample() const
221  {
222  return peak_sample;
223  }
224 
225  void setPeakSample(double peakSample)
226  {
227  peak_sample = peakSample;
228  }
229 
230  double getPedstal() const
231  {
232  return pedstal;
233  }
234 
235  void setPedstal(double pedstal)
236  {
237  this->pedstal = pedstal;
238  }
239 
240  const std::set<int>& getSamples() const
241  {
242  return samples;
243  }
244 
245  void setSamples(const std::set<int>& samples)
246  {
247  this->samples = samples;
248  }
249 
250  int getSizePadAzimuth() const
251  {
252  return size_pad_azimuth;
253  }
254 
255  void setSizePadAzimuth(int sizePadAzimuth)
256  {
257  size_pad_azimuth = sizePadAzimuth;
258  }
259 
260  int getSizePadRadial() const
261  {
262  return size_pad_radial;
263  }
264 
265  void setSizePadRadial(int sizePadRadial)
266  {
267  size_pad_radial = sizePadRadial;
268  }
269 
270  const std::vector<double>& getSumSamples() const
271  {
272  return sum_samples;
273  }
274 
275  void setSumSamples(const std::vector<double>& sumSamples)
276  {
277  sum_samples = sumSamples;
278  }
279 
280  protected:
281  TrkrDefs::cluskey m_cluskey; //< unique identifier within container
282  float m_pos[3]; //< mean position x,y,z
283  bool m_isGlobal; //< flag for coord sys (true = global)
284  unsigned int m_adc; //< cluster sum adc (D. McGlinchey - Do we need this?)
285  float m_size[6]; //< size covariance matrix (packed storage) (+/- cm^2)
286  float m_err[6]; //< covariance matrix: rad, arc and z
287 
288  // prototype specifics
289 
290  std::set<int> pad_radials;
291  std::set<int> pad_azimuths;
292  std::set<int> samples;
293 
294  std::map<int, std::vector<double>> pad_radial_samples;
295  std::map<int, std::vector<double>> pad_azimuth_samples;
296  std::vector<double> sum_samples;
297 
302 
303  double peak;
304  double peak_sample;
305  double pedstal;
306 
307  // std::map<int, double> pad_radial_peaks; // radial always have size = 1 in this analysis
308  std::map<int, double> pad_azimuth_peaks;
309 
313 
317 
322  double delta_z;
323 
324  ClassDefOverride(TpcPrototypeCluster, 1)
325 };
326 
327 #endif //TRACKBASE_TRKRCLUSTERV1_H