LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArPandoraGeometryComponents.h
Go to the documentation of this file.
1 
7 #ifndef LAR_PANDORA_GEOMETRY_COMPONENTS_H
8 #define LAR_PANDORA_GEOMETRY_COMPONENTS_H 1
9 
11 
12 #include <map>
13 #include <vector>
14 
15 namespace lar_pandora {
16 
21  public:
32  LArDetectorGap(const float x1,
33  const float y1,
34  const float z1,
35  const float x2,
36  const float y2,
37  const float z2);
38 
42  float GetX1() const;
43 
47  float GetY1() const;
48 
52  float GetZ1() const;
53 
57  float GetX2() const;
58 
62  float GetY2() const;
63 
67  float GetZ2() const;
68 
72  static float GetMaxGapSize() noexcept;
73 
74  private:
75  float m_x1;
76  float m_y1;
77  float m_z1;
78  float m_x2;
79  float m_y2;
80  float m_z2;
81  };
82 
83  typedef std::vector<LArDetectorGap> LArDetectorGapList;
84 
85  //------------------------------------------------------------------------------------------------------------------------------------------
86  //------------------------------------------------------------------------------------------------------------------------------------------
87 
92  public:
105  LArDaughterDriftVolume(const unsigned int cryostat,
106  const unsigned int tpc,
107  const float centerX,
108  const float centerY,
109  const float centerZ,
110  const float widthX,
111  const float widthY,
112  const float widthZ);
113 
117  unsigned int GetCryostat() const;
118 
122  unsigned int GetTpc() const;
123 
127  float GetCenterX() const;
128 
132  float GetCenterY() const;
133 
137  float GetCenterZ() const;
138 
142  float GetWidthX() const;
143 
147  float GetWidthY() const;
148 
152  float GetWidthZ() const;
153 
154  private:
155  unsigned int m_cryostat;
156  unsigned int m_tpc;
157  float m_centerX;
158  float m_centerY;
159  float m_centerZ;
160  float m_widthX;
161  float m_widthY;
162  float m_widthZ;
163  };
164 
165  typedef std::vector<LArDaughterDriftVolume> LArDaughterDriftVolumeList;
166 
167  //------------------------------------------------------------------------------------------------------------------------------------------
168  //------------------------------------------------------------------------------------------------------------------------------------------
169 
174  public:
197  LArDriftVolume(const unsigned int volumeID,
198  const bool isPositiveDrift,
199  const float wirePitchU,
200  const float wirePitchV,
201  const float wirePitchW,
202  const float wireAngleU,
203  const float wireAngleV,
204  const float wireAngleW,
205  const float centerX,
206  const float centerY,
207  const float centerZ,
208  const float widthX,
209  const float widthY,
210  const float widthZ,
211  const float sigmaUVZ,
212  const LArDaughterDriftVolumeList& tpcVolumeList);
213 
217  unsigned int GetVolumeID() const;
218 
222  bool IsPositiveDrift() const;
223 
227  float GetWirePitchU() const;
228 
232  float GetWirePitchV() const;
233 
237  float GetWirePitchW() const;
238 
242  float GetWireAngleU() const;
243 
247  float GetWireAngleV() const;
248 
252  float GetWireAngleW() const;
253 
257  float GetCenterX() const;
258 
262  float GetCenterY() const;
263 
267  float GetCenterZ() const;
268 
272  float GetWidthX() const;
273 
277  float GetWidthY() const;
278 
282  float GetWidthZ() const;
283 
287  float GetSigmaUVZ() const;
288 
292  const LArDaughterDriftVolumeList& GetTpcVolumeList() const;
293 
294  private:
295  unsigned int m_volumeID;
303  float m_centerX;
304  float m_centerY;
305  float m_centerZ;
306  float m_widthX;
307  float m_widthY;
308  float m_widthZ;
309  float m_sigmaUVZ;
310 
311  LArDaughterDriftVolumeList m_tpcVolumeList;
312  };
313 
314  typedef std::vector<LArDriftVolume> LArDriftVolumeList;
315  typedef std::map<unsigned int, LArDriftVolume> LArDriftVolumeMap;
316 
317  //------------------------------------------------------------------------------------------------------------------------------------------
318  //------------------------------------------------------------------------------------------------------------------------------------------
319 
320  inline LArDetectorGap::LArDetectorGap(const float x1,
321  const float y1,
322  const float z1,
323  const float x2,
324  const float y2,
325  const float z2)
326  : m_x1(x1), m_y1(y1), m_z1(z1), m_x2(x2), m_y2(y2), m_z2(z2)
327  {}
328 
329  //------------------------------------------------------------------------------------------------------------------------------------------
330 
331  inline float LArDetectorGap::GetX1() const
332  {
333  return m_x1;
334  }
335 
336  //------------------------------------------------------------------------------------------------------------------------------------------
337 
338  inline float LArDetectorGap::GetY1() const
339  {
340  return m_y1;
341  }
342 
343  //------------------------------------------------------------------------------------------------------------------------------------------
344 
345  inline float LArDetectorGap::GetZ1() const
346  {
347  return m_z1;
348  }
349 
350  //------------------------------------------------------------------------------------------------------------------------------------------
351 
352  inline float LArDetectorGap::GetX2() const
353  {
354  return m_x2;
355  }
356 
357  //------------------------------------------------------------------------------------------------------------------------------------------
358 
359  inline float LArDetectorGap::GetY2() const
360  {
361  return m_y2;
362  }
363 
364  //------------------------------------------------------------------------------------------------------------------------------------------
365 
366  inline float LArDetectorGap::GetZ2() const
367  {
368  return m_z2;
369  }
370 
371  //------------------------------------------------------------------------------------------------------------------------------------------
372 
373  inline float LArDetectorGap::GetMaxGapSize() noexcept
374  {
375  return 30.f; // TODO: 30cm should be fine but can we do better than a hard-coded number here?
376  }
377 
378  //------------------------------------------------------------------------------------------------------------------------------------------
379  //------------------------------------------------------------------------------------------------------------------------------------------
380 
381  inline LArDaughterDriftVolume::LArDaughterDriftVolume(const unsigned int cryostat,
382  const unsigned int tpc,
383  const float centerX,
384  const float centerY,
385  const float centerZ,
386  const float widthX,
387  const float widthY,
388  const float widthZ)
389  : m_cryostat(cryostat)
390  , m_tpc(tpc)
391  , m_centerX(centerX)
392  , m_centerY(centerY)
393  , m_centerZ(centerZ)
394  , m_widthX(widthX)
395  , m_widthY(widthY)
396  , m_widthZ(widthZ)
397  {}
398 
399  //------------------------------------------------------------------------------------------------------------------------------------------
400 
401  inline unsigned int LArDaughterDriftVolume::GetCryostat() const
402  {
403  return m_cryostat;
404  }
405 
406  //------------------------------------------------------------------------------------------------------------------------------------------
407 
408  inline unsigned int LArDaughterDriftVolume::GetTpc() const
409  {
410  return m_tpc;
411  }
412 
413  //------------------------------------------------------------------------------------------------------------------------------------------
414 
416  {
417  return m_centerX;
418  }
419 
420  //------------------------------------------------------------------------------------------------------------------------------------------
421 
423  {
424  return m_centerY;
425  }
426 
427  //------------------------------------------------------------------------------------------------------------------------------------------
428 
430  {
431  return m_centerZ;
432  }
433 
434  //------------------------------------------------------------------------------------------------------------------------------------------
435 
437  {
438  return m_widthX;
439  }
440 
441  //------------------------------------------------------------------------------------------------------------------------------------------
442 
444  {
445  return m_widthY;
446  }
447 
448  //------------------------------------------------------------------------------------------------------------------------------------------
449 
451  {
452  return m_widthZ;
453  }
454 
455  //------------------------------------------------------------------------------------------------------------------------------------------
456  //------------------------------------------------------------------------------------------------------------------------------------------
457 
458  inline unsigned int LArDriftVolume::GetVolumeID() const
459  {
460  return m_volumeID;
461  }
462 
463  //------------------------------------------------------------------------------------------------------------------------------------------
464 
466  {
467  return m_isPositiveDrift;
468  }
469 
470  //------------------------------------------------------------------------------------------------------------------------------------------
471 
472  inline float LArDriftVolume::GetWirePitchU() const
473  {
474  return m_wirePitchU;
475  }
476 
477  //------------------------------------------------------------------------------------------------------------------------------------------
478 
479  inline float LArDriftVolume::GetWirePitchV() const
480  {
481  return m_wirePitchV;
482  }
483 
484  //------------------------------------------------------------------------------------------------------------------------------------------
485 
486  inline float LArDriftVolume::GetWirePitchW() const
487  {
488  return m_wirePitchW;
489  }
490 
491  //------------------------------------------------------------------------------------------------------------------------------------------
492 
493  inline float LArDriftVolume::GetWireAngleU() const
494  {
495  return m_wireAngleU;
496  }
497 
498  //------------------------------------------------------------------------------------------------------------------------------------------
499 
500  inline float LArDriftVolume::GetWireAngleV() const
501  {
502  return m_wireAngleV;
503  }
504 
505  //------------------------------------------------------------------------------------------------------------------------------------------
506 
507  inline float LArDriftVolume::GetWireAngleW() const
508  {
509  return m_wireAngleW;
510  }
511 
512  //------------------------------------------------------------------------------------------------------------------------------------------
513 
514  inline float LArDriftVolume::GetCenterX() const
515  {
516  return m_centerX;
517  }
518 
519  //------------------------------------------------------------------------------------------------------------------------------------------
520 
521  inline float LArDriftVolume::GetCenterY() const
522  {
523  return m_centerY;
524  }
525 
526  //------------------------------------------------------------------------------------------------------------------------------------------
527 
528  inline float LArDriftVolume::GetCenterZ() const
529  {
530  return m_centerZ;
531  }
532 
533  //------------------------------------------------------------------------------------------------------------------------------------------
534 
535  inline float LArDriftVolume::GetWidthX() const
536  {
537  return m_widthX;
538  }
539 
540  //------------------------------------------------------------------------------------------------------------------------------------------
541 
542  inline float LArDriftVolume::GetWidthY() const
543  {
544  return m_widthY;
545  }
546 
547  //------------------------------------------------------------------------------------------------------------------------------------------
548 
549  inline float LArDriftVolume::GetWidthZ() const
550  {
551  return m_widthZ;
552  }
553 
554  //------------------------------------------------------------------------------------------------------------------------------------------
555 
556  inline float LArDriftVolume::GetSigmaUVZ() const
557  {
558  return m_sigmaUVZ;
559  }
560 
561  //------------------------------------------------------------------------------------------------------------------------------------------
562 
563  inline const LArDaughterDriftVolumeList& LArDriftVolume::GetTpcVolumeList() const
564  {
565  return m_tpcVolumeList;
566  }
567 
568 } // namespace lar_pandora
569 
570 #endif // #ifndef LAR_PANDORA_GEOMETRY_H
float GetCenterZ() const
Return Z position at centre of tpc volume.
float GetWidthZ() const
Return Z span of drift volume.
float GetWidthY() const
Return Y span of tpc volume.
daughter drift volume class to hold properties of daughter drift volumes
float GetWidthZ() const
Return Z span of tpc volume.
float GetWidthX() const
Return X span of tpc volume.
Float_t y1[n_points_granero]
Definition: compare.C:5
std::map< unsigned int, LArDriftVolume > LArDriftVolumeMap
LArDetectorGap(const float x1, const float y1, const float z1, const float x2, const float y2, const float z2)
Constructor.
Float_t x1[n_points_granero]
Definition: compare.C:5
unsigned int GetCryostat() const
Return cryostat ID.
LArDaughterDriftVolumeList m_tpcVolumeList
std::vector< LArDriftVolume > LArDriftVolumeList
float GetZ1() const
Get lower Z coordinate.
LArDaughterDriftVolume(const unsigned int cryostat, const unsigned int tpc, const float centerX, const float centerY, const float centerZ, const float widthX, const float widthY, const float widthZ)
Constructor.
float GetWireAngleW() const
Return wire angle in W view (Pandora convention)
Float_t y2[n_points_geant4]
Definition: compare.C:26
float GetCenterZ() const
Return Z position at centre of drift volume.
float GetWirePitchW() const
Return wire pitch in W view.
const LArDaughterDriftVolumeList & GetTpcVolumeList() const
Return list of daughter drift volumes associated with this drift volume.
float GetCenterX() const
Return X position at centre of drift volume.
unsigned int GetVolumeID() const
Return unique ID.
float GetCenterX() const
Return X position at centre of tpc volume.
bool IsPositiveDrift() const
Return drift direction (true if positive)
float GetCenterY() const
Return Y position at centre of tpc volume.
Definition of data types for geometry description.
float GetX1() const
Get lower X coordinate.
float GetWireAngleV() const
Return wire angle in V view (Pandora convention)
std::vector< LArDaughterDriftVolume > LArDaughterDriftVolumeList
static float GetMaxGapSize() noexcept
Get maximum gap size.
std::vector< LArDetectorGap > LArDetectorGapList
float GetWidthY() const
Return Y span of drift volume.
float GetCenterY() const
Return Y position at centre of drift volume.
float GetWirePitchU() const
Return wire pitch in U view.
float GetSigmaUVZ() const
Return sigmaUVZ parameter (used for matching views)
drift volume class to hold properties of drift volume
float GetWirePitchV() const
Return wire pictch in V view.
float GetWidthX() const
Return X span of drift volume.
Float_t x2[n_points_geant4]
Definition: compare.C:26
float GetY1() const
Get lower y coordinate.
float GetY2() const
Get upper Y coordinate.
drift volume class to hold properties of drift volume
float GetX2() const
Get upper X coordinate.
float GetZ2() const
Get upper Z coordinate.
float GetWireAngleU() const
Return wire angle in U view (Pandora convention)
unsigned int GetTpc() const
Return tpc ID.