LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
LArPandoraGeometry.h
Go to the documentation of this file.
1 
7 #ifndef LAR_PANDORA_GEOMETRY_H
8 #define LAR_PANDORA_GEOMETRY_H 1
9 
10 #include <map>
11 #include <vector>
12 
13 namespace lar_pandora
14 {
15 
20 {
21 public:
32  LArDetectorGap(const float x1, const float y1, const float z1, const float x2, const float y2, const float z2);
33 
37  float GetX1() const;
38 
42  float GetY1() const;
43 
47  float GetZ1() const;
48 
52  float GetX2() const;
53 
57  float GetY2() const;
58 
62  float GetZ2() const;
63 
64 private:
65  float m_x1;
66  float m_y1;
67  float m_z1;
68  float m_x2;
69  float m_y2;
70  float m_z2;
71 };
72 
73 typedef std::vector<LArDetectorGap> LArDetectorGapList;
74 
75 //------------------------------------------------------------------------------------------------------------------------------------------
76 //------------------------------------------------------------------------------------------------------------------------------------------
77 
82 {
83 public:
90  LArDaughterDriftVolume(const unsigned int cryostat, const unsigned int tpc);
91 
95  unsigned int GetCryostat() const;
96 
100  unsigned int GetTpc() const;
101 
102 private:
103  unsigned int m_cryostat;
104  unsigned int m_tpc;
105 };
106 
107 typedef std::vector<LArDaughterDriftVolume> LArDaughterDriftVolumeList;
108 
109 //------------------------------------------------------------------------------------------------------------------------------------------
110 //------------------------------------------------------------------------------------------------------------------------------------------
111 
116 {
117 public:
140  LArDriftVolume(const unsigned int volumeID, const bool isPositiveDrift,
141  const float wirePitchU, const float wirePitchV, const float wirePitchW, const float wireAngleU, const float wireAngleV, const float wireAngleW,
142  const float centerX, const float centerY, const float centerZ, const float widthX, const float widthY, const float widthZ,
143  const float sigmaUVZ, const LArDaughterDriftVolumeList &tpcVolumeList);
144 
148  unsigned int GetVolumeID() const;
149 
153  bool IsPositiveDrift() const;
154 
158  float GetWirePitchU() const;
159 
163  float GetWirePitchV() const;
164 
168  float GetWirePitchW() const;
169 
173  float GetWireAngleU() const;
174 
178  float GetWireAngleV() const;
179 
183  float GetWireAngleW() const;
184 
188  float GetCenterX() const;
189 
193  float GetCenterY() const;
194 
198  float GetCenterZ() const;
199 
203  float GetWidthX() const;
204 
208  float GetWidthY() const;
209 
213  float GetWidthZ() const;
214 
218  float GetSigmaUVZ() const;
219 
223  const LArDaughterDriftVolumeList &GetTpcVolumeList() const;
224 
225 private:
226  unsigned int m_volumeID;
234  float m_centerX;
235  float m_centerY;
236  float m_centerZ;
237  float m_widthX;
238  float m_widthY;
239  float m_widthZ;
240  float m_sigmaUVZ;
241 
242  LArDaughterDriftVolumeList m_tpcVolumeList;
243 };
244 
245 typedef std::vector<LArDriftVolume> LArDriftVolumeList;
246 typedef std::map<unsigned int, LArDriftVolume> LArDriftVolumeMap;
247 
248 //------------------------------------------------------------------------------------------------------------------------------------------
249 //------------------------------------------------------------------------------------------------------------------------------------------
250 
255 {
256 public:
262  static void LoadDetectorGaps(LArDetectorGapList &listOfGaps);
263 
270  static void LoadGeometry(LArDriftVolumeList &outputVolumeList, LArDriftVolumeMap &outputVolumeMap);
271 
279  static unsigned int GetVolumeID(const LArDriftVolumeMap &driftVolumeMap, const unsigned int cstat, const unsigned int tpc);
280 
288  static geo::View_t GetGlobalView(const unsigned int cstat, const unsigned int tpc, const geo::View_t hit_View);
289 
290 private:
297  static unsigned int GetTpcID(const unsigned int cstat, const unsigned int tpc);
298 
305  static bool ShouldSwitchUV(const unsigned int cstat, const unsigned int tpc);
306 
312  static bool ShouldSwitchUV(const bool isPositiveDrift);
313 
320  static void LoadGeometry(LArDriftVolumeList &driftVolumeList);
321 
329  static void LoadGlobalDaughterGeometry(const LArDriftVolumeList &driftVolumeList, LArDriftVolumeList &daughterVolumeList);
330 };
331 
332 //------------------------------------------------------------------------------------------------------------------------------------------
333 //------------------------------------------------------------------------------------------------------------------------------------------
334 
335 inline LArDetectorGap::LArDetectorGap(const float x1, const float y1, const float z1, const float x2, const float y2, const float z2) :
336  m_x1(x1), m_y1(y1), m_z1(z1), m_x2(x2), m_y2(y2), m_z2(z2)
337 {
338 }
339 
340 //------------------------------------------------------------------------------------------------------------------------------------------
341 
342 inline float LArDetectorGap::GetX1() const
343 {
344  return m_x1;
345 }
346 
347 //------------------------------------------------------------------------------------------------------------------------------------------
348 
349 inline float LArDetectorGap::GetY1() const
350 {
351  return m_y1;
352 }
353 
354 //------------------------------------------------------------------------------------------------------------------------------------------
355 
356 inline float LArDetectorGap::GetZ1() const
357 {
358  return m_z1;
359 }
360 
361 //------------------------------------------------------------------------------------------------------------------------------------------
362 
363 inline float LArDetectorGap::GetX2() const
364 {
365  return m_x2;
366 }
367 
368 //------------------------------------------------------------------------------------------------------------------------------------------
369 
370 inline float LArDetectorGap::GetY2() const
371 {
372  return m_y2;
373 }
374 
375 //------------------------------------------------------------------------------------------------------------------------------------------
376 
377 inline float LArDetectorGap::GetZ2() const
378 {
379  return m_z2;
380 }
381 
382 //------------------------------------------------------------------------------------------------------------------------------------------
383 //------------------------------------------------------------------------------------------------------------------------------------------
384 
385 inline LArDaughterDriftVolume::LArDaughterDriftVolume(const unsigned int cryostat, const unsigned int tpc) :
386  m_cryostat(cryostat), m_tpc(tpc)
387 {
388 }
389 
390 //------------------------------------------------------------------------------------------------------------------------------------------
391 
392 inline unsigned int LArDaughterDriftVolume::GetCryostat() const
393 {
394  return m_cryostat;
395 }
396 
397 //------------------------------------------------------------------------------------------------------------------------------------------
398 
399 inline unsigned int LArDaughterDriftVolume::GetTpc() const
400 {
401  return m_tpc;
402 }
403 
404 //------------------------------------------------------------------------------------------------------------------------------------------
405 //------------------------------------------------------------------------------------------------------------------------------------------
406 
407 inline unsigned int LArDriftVolume::GetVolumeID() const
408 {
409  return m_volumeID;
410 }
411 
412 //------------------------------------------------------------------------------------------------------------------------------------------
413 
415 {
416  return m_isPositiveDrift;
417 }
418 
419 //------------------------------------------------------------------------------------------------------------------------------------------
420 
421 inline float LArDriftVolume::GetWirePitchU() const
422 {
423  return m_wirePitchU;
424 }
425 
426 //------------------------------------------------------------------------------------------------------------------------------------------
427 
428 inline float LArDriftVolume::GetWirePitchV() const
429 {
430  return m_wirePitchV;
431 }
432 
433 //------------------------------------------------------------------------------------------------------------------------------------------
434 
435 inline float LArDriftVolume::GetWirePitchW() const
436 {
437  return m_wirePitchW;
438 }
439 
440 //------------------------------------------------------------------------------------------------------------------------------------------
441 
442 inline float LArDriftVolume::GetWireAngleU() const
443 {
444  return m_wireAngleU;
445 }
446 
447 //------------------------------------------------------------------------------------------------------------------------------------------
448 
449 inline float LArDriftVolume::GetWireAngleV() const
450 {
451  return m_wireAngleV;
452 }
453 
454 //------------------------------------------------------------------------------------------------------------------------------------------
455 
456 inline float LArDriftVolume::GetWireAngleW() const
457 {
458  return m_wireAngleW;
459 }
460 
461 //------------------------------------------------------------------------------------------------------------------------------------------
462 
463 inline float LArDriftVolume::GetCenterX() const
464 {
465  return m_centerX;
466 }
467 
468 //------------------------------------------------------------------------------------------------------------------------------------------
469 
470 inline float LArDriftVolume::GetCenterY() const
471 {
472  return m_centerY;
473 }
474 
475 //------------------------------------------------------------------------------------------------------------------------------------------
476 
477 inline float LArDriftVolume::GetCenterZ() const
478 {
479  return m_centerZ;
480 }
481 
482 //------------------------------------------------------------------------------------------------------------------------------------------
483 
484 inline float LArDriftVolume::GetWidthX() const
485 {
486  return m_widthX;
487 }
488 
489 //------------------------------------------------------------------------------------------------------------------------------------------
490 
491 inline float LArDriftVolume::GetWidthY() const
492 {
493  return m_widthY;
494 }
495 
496 //------------------------------------------------------------------------------------------------------------------------------------------
497 
498 inline float LArDriftVolume::GetWidthZ() const
499 {
500  return m_widthZ;
501 }
502 
503 //------------------------------------------------------------------------------------------------------------------------------------------
504 
505 inline float LArDriftVolume::GetSigmaUVZ() const
506 {
507  return m_sigmaUVZ;
508 }
509 
510 } // namespace lar_pandora
511 
512 #endif // #ifndef LAR_PANDORA_GEOMETRY_H
float GetWidthZ() const
Return Z span of drift volume.
daughter drift volume class to hold properties of daughter drift volumes
std::vector< LArDetectorGap > LArDetectorGapList
Float_t y1[n_points_granero]
Definition: compare.C:5
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
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.
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.
LArPandoraGeometry class.
float GetCenterX() const
Return X position at centre of drift volume.
unsigned int GetVolumeID() const
Return unique ID.
bool IsPositiveDrift() const
Return drift direction (true if positive)
float GetX1() const
Get lower X coordinate.
float GetWireAngleV() const
Return wire angle in V view (Pandora convention)
std::vector< LArDaughterDriftVolume > LArDaughterDriftVolumeList
float GetWidthY() const
Return Y span of drift volume.
LArDaughterDriftVolume(const unsigned int cryostat, const unsigned int tpc)
Constructor.
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