Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
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
10#include "larcoreobj/SimpleTypesAndConstants/geo_types.h"
11
12#include <map>
13#include <vector>
14
15namespace 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;
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
293
294 private:
295 unsigned int m_volumeID;
306 float m_widthX;
307 float m_widthY;
308 float m_widthZ;
310
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 { return m_x1; }
332
333 //------------------------------------------------------------------------------------------------------------------------------------------
334
335 inline float LArDetectorGap::GetY1() const { return m_y1; }
336
337 //------------------------------------------------------------------------------------------------------------------------------------------
338
339 inline float LArDetectorGap::GetZ1() const { return m_z1; }
340
341 //------------------------------------------------------------------------------------------------------------------------------------------
342
343 inline float LArDetectorGap::GetX2() const { return m_x2; }
344
345 //------------------------------------------------------------------------------------------------------------------------------------------
346
347 inline float LArDetectorGap::GetY2() const { return m_y2; }
348
349 //------------------------------------------------------------------------------------------------------------------------------------------
350
351 inline float LArDetectorGap::GetZ2() const { return m_z2; }
352
353 //------------------------------------------------------------------------------------------------------------------------------------------
354
355 inline float LArDetectorGap::GetMaxGapSize() noexcept
356 {
357 return 30.f; // TODO: 30cm should be fine but can we do better than a hard-coded number here?
358 }
359
360 //------------------------------------------------------------------------------------------------------------------------------------------
361 //------------------------------------------------------------------------------------------------------------------------------------------
362
363 inline LArDaughterDriftVolume::LArDaughterDriftVolume(const unsigned int cryostat,
364 const unsigned int tpc,
365 const float centerX,
366 const float centerY,
367 const float centerZ,
368 const float widthX,
369 const float widthY,
370 const float widthZ)
371 : m_cryostat(cryostat)
372 , m_tpc(tpc)
373 , m_centerX(centerX)
374 , m_centerY(centerY)
375 , m_centerZ(centerZ)
376 , m_widthX(widthX)
377 , m_widthY(widthY)
378 , m_widthZ(widthZ)
379 {}
380
381 //------------------------------------------------------------------------------------------------------------------------------------------
382
383 inline unsigned int LArDaughterDriftVolume::GetCryostat() const { return m_cryostat; }
384
385 //------------------------------------------------------------------------------------------------------------------------------------------
386
387 inline unsigned int LArDaughterDriftVolume::GetTpc() const { return m_tpc; }
388
389 //------------------------------------------------------------------------------------------------------------------------------------------
390
391 inline float LArDaughterDriftVolume::GetCenterX() const { return m_centerX; }
392
393 //------------------------------------------------------------------------------------------------------------------------------------------
394
395 inline float LArDaughterDriftVolume::GetCenterY() const { return m_centerY; }
396
397 //------------------------------------------------------------------------------------------------------------------------------------------
398
399 inline float LArDaughterDriftVolume::GetCenterZ() const { return m_centerZ; }
400
401 //------------------------------------------------------------------------------------------------------------------------------------------
402
403 inline float LArDaughterDriftVolume::GetWidthX() const { return m_widthX; }
404
405 //------------------------------------------------------------------------------------------------------------------------------------------
406
407 inline float LArDaughterDriftVolume::GetWidthY() const { return m_widthY; }
408
409 //------------------------------------------------------------------------------------------------------------------------------------------
410
411 inline float LArDaughterDriftVolume::GetWidthZ() const { return m_widthZ; }
412
413 //------------------------------------------------------------------------------------------------------------------------------------------
414 //------------------------------------------------------------------------------------------------------------------------------------------
415
416 inline unsigned int LArDriftVolume::GetVolumeID() const { return m_volumeID; }
417
418 //------------------------------------------------------------------------------------------------------------------------------------------
419
421
422 //------------------------------------------------------------------------------------------------------------------------------------------
423
424 inline float LArDriftVolume::GetWirePitchU() const { return m_wirePitchU; }
425
426 //------------------------------------------------------------------------------------------------------------------------------------------
427
428 inline float LArDriftVolume::GetWirePitchV() const { return m_wirePitchV; }
429
430 //------------------------------------------------------------------------------------------------------------------------------------------
431
432 inline float LArDriftVolume::GetWirePitchW() const { return m_wirePitchW; }
433
434 //------------------------------------------------------------------------------------------------------------------------------------------
435
436 inline float LArDriftVolume::GetWireAngleU() const { return m_wireAngleU; }
437
438 //------------------------------------------------------------------------------------------------------------------------------------------
439
440 inline float LArDriftVolume::GetWireAngleV() const { return m_wireAngleV; }
441
442 //------------------------------------------------------------------------------------------------------------------------------------------
443
444 inline float LArDriftVolume::GetWireAngleW() const { return m_wireAngleW; }
445
446 //------------------------------------------------------------------------------------------------------------------------------------------
447
448 inline float LArDriftVolume::GetCenterX() const { return m_centerX; }
449
450 //------------------------------------------------------------------------------------------------------------------------------------------
451
452 inline float LArDriftVolume::GetCenterY() const { return m_centerY; }
453
454 //------------------------------------------------------------------------------------------------------------------------------------------
455
456 inline float LArDriftVolume::GetCenterZ() const { return m_centerZ; }
457
458 //------------------------------------------------------------------------------------------------------------------------------------------
459
460 inline float LArDriftVolume::GetWidthX() const { return m_widthX; }
461
462 //------------------------------------------------------------------------------------------------------------------------------------------
463
464 inline float LArDriftVolume::GetWidthY() const { return m_widthY; }
465
466 //------------------------------------------------------------------------------------------------------------------------------------------
467
468 inline float LArDriftVolume::GetWidthZ() const { return m_widthZ; }
469
470 //------------------------------------------------------------------------------------------------------------------------------------------
471
472 inline float LArDriftVolume::GetSigmaUVZ() const { return m_sigmaUVZ; }
473
474 //------------------------------------------------------------------------------------------------------------------------------------------
475
480
481} // namespace lar_pandora
482
483#endif // #ifndef LAR_PANDORA_GEOMETRY_H
daughter drift volume class to hold properties of daughter drift volumes
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.
unsigned int GetTpc() const
Return tpc ID.
float GetWidthY() const
Return Y span of tpc volume.
float GetWidthZ() const
Return Z span of tpc volume.
float GetCenterZ() const
Return Z position at centre of tpc volume.
float GetCenterX() const
Return X position at centre of tpc volume.
float GetWidthX() const
Return X span of tpc volume.
float GetCenterY() const
Return Y position at centre of tpc volume.
unsigned int GetCryostat() const
Return cryostat ID.
drift volume class to hold properties of drift volume
float GetZ2() const
Get upper Z coordinate.
float GetY2() const
Get upper Y coordinate.
float GetX2() const
Get upper X coordinate.
float GetZ1() const
Get lower Z coordinate.
float GetY1() const
Get lower y coordinate.
static float GetMaxGapSize() noexcept
Get maximum gap size.
LArDetectorGap(const float x1, const float y1, const float z1, const float x2, const float y2, const float z2)
Constructor.
float GetX1() const
Get lower X coordinate.
drift volume class to hold properties of drift volume
float GetWireAngleU() const
Return wire angle in U view (Pandora convention)
float GetSigmaUVZ() const
Return sigmaUVZ parameter (used for matching views)
unsigned int GetVolumeID() const
Return unique ID.
float GetWireAngleW() const
Return wire angle in W view (Pandora convention)
float GetWirePitchW() const
Return wire pitch in W view.
float GetWirePitchV() const
Return wire pictch in V view.
float GetWidthY() const
Return Y span of drift volume.
bool IsPositiveDrift() const
Return drift direction (true if positive)
float GetCenterY() const
Return Y position at centre of drift volume.
float GetCenterX() const
Return X position at centre of drift volume.
const LArDaughterDriftVolumeList & GetTpcVolumeList() const
Return list of daughter drift volumes associated with this drift volume.
float GetWidthX() const
Return X span of drift volume.
float GetWirePitchU() const
Return wire pitch in U view.
float GetCenterZ() const
Return Z position at centre of drift volume.
float GetWidthZ() const
Return Z span of drift volume.
float GetWireAngleV() const
Return wire angle in V view (Pandora convention)
LArDaughterDriftVolumeList m_tpcVolumeList
std::vector< LArDaughterDriftVolume > LArDaughterDriftVolumeList
std::vector< LArDetectorGap > LArDetectorGapList
std::vector< LArDriftVolume > LArDriftVolumeList
std::map< unsigned int, LArDriftVolume > LArDriftVolumeMap